.header form { margin: 0; }
.header nav { flex-wrap: wrap; }
.header .brand em { font-style: normal; font-weight: 400; }
.demo-logins { display: grid; gap: 10px; }
.demo-logins form, .demo-logins button { width: 100%; margin: 0; }
.flash-wrapper { padding-top: 15px; padding-bottom: 0; }
.login-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 70px; padding-top: 70px; }
.login-layout h1 { font-size: 36px; margin-top: 26px; }
.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field label { font-weight: 700; font-size: 13px; }
.field input, .field select, .field textarea { width: 100%; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.button_to { display: inline-block; }
.pagination { display: flex; gap: 10px; margin-top: 20px; }
@media (max-width: 800px) { .login-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 30px; } .login-layout h1 { font-size: 28px; } }
[hidden] { display: none !important; }

/* Shrink grid/flex children before text or native controls force overflow. */
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:is(.detail-layout, .hiring-detail-grid, .form-grid, .catalog-image-editor, .catalog-inline-forms) > * { min-width: 0; }
fieldset { min-inline-size: 0; }
.page, .ops-page { overflow-wrap: anywhere; }
.page :is(img, video, iframe) { max-width: 100%; }
.hiring-upload > label, .hiring-inline-form > label, .hiring-inbox-item > div { min-width: 0; }
.hiring-upload input[type=file] { width: 100%; min-width: 0; max-width: 100%; }
.tab-nav a { flex-shrink: 0; padding: 14px 5px; white-space: nowrap; border-bottom: 2px solid transparent; }
.tab-nav a.active { border-bottom-color: var(--navy); }
.detail-stats strong.detail-wage { font-size: 24px; line-height: 1.5; letter-spacing: -.03em; }
.detail-stats strong { font-variant-numeric: tabular-nums; }
.detail-stats strong small { display: inline-block; white-space: nowrap; }
.catalog-metrics strong, .ops-stat strong { overflow-wrap: anywhere; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.member-revoke { display: flex; flex-direction: column; gap: 10px; min-width: 180px; white-space: normal; }
.member-revoke .field { margin-bottom: 0; }

@media (max-width: 1100px) {
  .detail-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px 16px; gap: 12px 0; }
  .detail-stats > div { padding: 0 12px; min-width: 0; }
  .detail-stats > div:first-child { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 0 0 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  .detail-stats > div:nth-child(2) { padding-left: 0; }
  .detail-stats > div:last-child { padding-right: 0; }
}

@media (max-width: 800px) {
  /* 16px avoids focus zoom on iOS without disabling user zoom. */
  body :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]), select, textarea) { font-size: 16px !important; max-width: 100%; min-width: 0; min-height: 44px; }
  input:is([type=date], [type=time], [type=month], [type=datetime-local]) { appearance: none; min-inline-size: 0; }
  input::-webkit-date-and-time-value { text-align: left; min-height: 1.5em; }
  .header nav { gap: 4px 14px; font-size: 12px; }
  .header nav > a { display: inline-flex; align-items: center; min-height: 44px; }
  .header nav .button { min-height: 44px; font-size: 12px; padding: 10px 12px; }
  .demo-banner, .demo-banner a { font-size: 11px; }
  .demo-banner { flex-wrap: wrap; gap: 4px 12px; }
  .demo-banner a { min-width: 0; margin-left: 0; }
  select { text-overflow: ellipsis; }
  .search-layout { grid-template-columns: minmax(0, 1fr); }
  .filter-panel { display: block; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .catalog-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-filter-row > .field:first-child { grid-column: 1 / -1; }
  .catalog-filter-row > .text-button { justify-self: start; }
  .catalog-search .field :is(input, select) { padding: 11px 12px; }
  .catalog-search summary, .catalog-filter-builder > summary { min-height: 44px; }
  :is(.hiring-check, .check, .ops-check) { min-height: 44px; }
  .hiring-page :is(input, select, textarea) { scroll-margin-top: 72px; }
  .tags span { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .apply-aside .paper { padding: 0; border: 0; background: transparent; flex-wrap: wrap; gap: 10px; }
  .apply-aside .recruitment-badge { flex-shrink: 0; }
  .job-preview-toolbar { flex-wrap: wrap; position: static; }
  .footer { grid-template-columns: minmax(0, 1fr); }
  .footer > * { grid-column: 1; min-width: 0; }
  .footer nav { gap: 4px 18px; font-size: 12px; }
  .footer nav > a { display: inline-flex; align-items: center; min-height: 44px; }
  .catalog-team-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
  .catalog-team-counts > div { padding: 12px; background: #f3f7f8; border-radius: 8px; }
  .hiring-inline-form { flex-wrap: wrap; align-items: stretch; }
  .hiring-inline-form > label { flex: 1 1 100%; }
  .hiring-document > div { min-width: 0; overflow-wrap: anywhere; }
  .hiring-section-heading { gap: 8px; }
  .hiring-section-heading h2 { margin-bottom: 0; }
  .ops-chart { margin: 24px 0; }
  .ops-compact .ops-field, .ops-filter .ops-field { min-width: min(170px, 100%); }
  .editor-actions { flex-wrap: wrap; }
}

@media (max-width: 600px) {
  .detail-stats strong, .detail-stats strong.detail-wage { font-size: 28px; line-height: 1.4; }
  .detail-stats small, .detail-stats strong small { font-size: 12px; }
  .detail-hero .location { font-size: 12px; }
  .detail-hero p, .paper p, .conditions dd { font-size: 14px; }
  .detail-hero h1 { font-size: 24px; }
  .conditions > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .conditions dt { font-size: 12px; font-weight: 600; }
  .slot-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; }
  .slot-list small { grid-column: 2; font-size: 12px; }
  .slot-list li > span { white-space: nowrap; font-variant-numeric: tabular-nums; }
  .catalog-gallery .button-row { gap: 8px; }
  .catalog-gallery .button-row .button { padding: 10px; min-height: 44px; }
  .catalog-gallery .button-row [data-catalog-media-target=toggle] { order: 3; flex-basis: 100%; }
  .catalog-filter-row { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 16px 0; border-top: 1px solid var(--border); }
  .catalog-filter-row > .field { grid-column: 1; margin-bottom: 12px; }
  .hiring-page .hiring-slot { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; padding: 12px 0; }
  .hiring-slot > label:first-child { grid-column: 1; min-width: 0; }
  .hiring-slot > label:nth-child(2) { grid-column: 2 / -1; }
  .hiring-slot > label:nth-child(3) { grid-column: 1; }
  .hiring-slot > button { grid-column: 1 / -1; justify-self: end; min-height: 44px; }
  .hiring-page .hiring-slot :is(input[type=time], select) { width: 100%; min-width: 0; }
  .hiring-page .hiring-slot input[type=time] { padding-inline: 6px; }
  .hiring-slot > label { min-width: 0; }
  .hiring-surface .hiring-status { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 14px !important; }
  .hiring-surface .hiring-status label { grid-column: 1 / -1; min-width: 0; }
  .hiring-surface .hiring-status select { width: 100%; min-width: 0; }
  .hiring-composer-actions { justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
  .hiring-composer-actions > small { display: none; }
  .hiring-bubble { font-size: 14px; padding: 10px 12px; }
  .hiring-message-meta { flex-shrink: 0; font-size: 11px; }
  .hiring-inbox-item h2 { font-size: 17px; }
  .catalog-segments a { padding: 14px 16px; gap: 8px; }
  .catalog-segments small { font-size: 12px; }
  .catalog-segments a > span { min-width: 0; }
  .editor-actions { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 16px 0; }
  .editor-actions .button { font-size: 13px; min-height: 44px; }
  .editor-actions .button:last-child { grid-column: 1 / -1; }
}
