/* Stage 4: the remaining homepage sections and case reader, phones only. */
@media (max-width: 700px) {
  #cases,#about,#faq { padding-top: 56px; }
  /* Anchor jumps align the content below the compact sticky header. */
  #cases,#about,#faq { scroll-margin-top: -44px; }
  #contact { scroll-margin-top: -14px; }
  #cases h2,#about h2,#contact h2,#faq .section-heading h2 {
    font-size: clamp(30px, 8.2vw, 42px); line-height: 1.13; letter-spacing: -.015em;
  }
  #cases .section-topline { margin-bottom: 22px; }
  #cases h2 { margin-top: 14px; font-size: clamp(28px, 7.6vw, 40px); text-wrap: balance; }
  #cases .section-aside { margin-top: 14px; font-size: 15px; line-height: 1.6; }
  #cases .case-card-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  #cases .case-card { padding: 22px 20px; border: 1px solid var(--line); background: var(--soft); }
  #cases .case-card > .eyebrow { font-size: 11px; line-height: 1.55; letter-spacing: .06em; }
  #cases .case-card > h3 { margin: 14px 0 0; font: 400 clamp(27px, 7.2vw, 34px)/1.17 var(--display); letter-spacing: -.015em; }
  #cases .case-card > .case-result { width: 100%; margin: 18px 0 16px; padding: 15px 0; }
  #cases .case-result strong { font-size: 35px; line-height: 1.1; }
  #cases .case-result span { margin-top: 7px; font-size: 13px; line-height: 1.5; }
  #cases .case-card-intro { font-size: 15px; line-height: 1.65; }
  #cases .case-human-outcome { padding: 2px 0 2px 14px; margin: 18px 0; }
  #cases .case-human-outcome > .case-copy-label { font-size: 11px !important; line-height: 1.5; letter-spacing: .04em; margin-bottom: 8px; }
  #cases .case-human-outcome > p + p { font-size: 16px; line-height: 1.55; }
  #cases .case-card > .text-link { width: 100%; min-height: 48px; margin: auto 0 0; padding-block: 10px; justify-content: space-between; gap: 16px; font-size: 16px; }
  #cases .cases-controls { display: grid; gap: 12px; margin-top: 20px; text-align: center; }
  #cases [data-cases-more] { width: 100%; min-height: 56px; font-size: 16px; justify-content: space-between; }
  #cases .cases-count { font-size: 12px; line-height: 1.5; }

  #about.has-career-path { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  #about .about-copy,#about .about-portrait-column,#about .about-photo { display: contents; }
  #about .about-copy > .eyebrow { grid-column: 1 / -1; grid-row: 1; margin: 0; }
  #about h2 { grid-column: 1 / -1; grid-row: 2; margin: 0; }
  #about .about-copy > .about-lead { grid-column: 1 / -1; grid-row: 3; margin: 0; font-size: 16px !important; line-height: 1.65; }
  #about .about-photo::before { display: none; }
  #about .about-photo img { grid-column: 1 / -1; grid-row: 4; align-self: start; width: 100%; height: clamp(320px, 110vw, 500px); max-height: none; aspect-ratio: auto; object-fit: cover; object-position: center 30%; filter: none; border: 1px solid var(--line); border-bottom: 2px solid var(--accent); }
  #about .about-photo figcaption { grid-column: 1 / -1; grid-row: 5; padding: 0; margin-top: -8px; background: transparent; color: var(--muted); font-size: 11px; line-height: 1.5; }
  #about .about-copy > .about-career { grid-column: 1 / -1; grid-row: 7; margin: 0; font-size: 16px; line-height: 1.65; }
  #about .approach-map { grid-column: 1 / -1; grid-row: 8; width: 100%; margin: 6px 0; }
  #about .approach-inputs { gap: 8px; }
  #about .approach-inputs > div { padding: 14px 8px; min-width: 0; }
  #about .approach-inputs span { font-size: 18px; line-height: 1.2; }
  #about .approach-inputs p { font-size: 12px; line-height: 1.5; margin-top: 8px; }
  #about .approach-connectors { height: 32px; }
  #about .approach-map > figcaption { padding: 10px; font-size: 14px; line-height: 1.5; }
  #about .about-copy > p:last-child { grid-column: 1 / -1; grid-row: 9; margin: 0; font-size: 16px; line-height: 1.65; }
  #about .about-voice { grid-column: 1 / -1; grid-row: 6; padding: 2px 0 2px 14px; margin: 6px 0; border-left-width: 2px; }
  #about .about-voice p { font-size: 16px; line-height: 1.65; }
  #about .about-voice footer { font-size: 12px; margin-top: 12px; }
  #about .career-path { grid-column: 1 / -1; grid-row: 10; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 0; padding-top: 24px; }
  #about .career-heading h3 { margin-top: 12px; font-size: 25px; line-height: 1.2; }
  #about .career-heading h3 br { display: none; }
  #about .career-heading > p:last-child { margin-top: 12px; font-size: 15px; line-height: 1.6; max-width: none; }
  #about .mobile-career-toggle { position: relative; display: block; width: 100%; min-height: 48px; padding: 0 38px 0 0; border: 0; background: transparent; color: inherit; font: inherit; text-transform: inherit; text-align: left; }
  #about .mobile-career-toggle::after { content: ''; position: absolute; right: 0; top: calc(50% - 11px); width: 22px; height: 22px; background: linear-gradient(var(--accent), var(--accent)) center / 14px 2px no-repeat, linear-gradient(var(--accent), var(--accent)) center / 2px 14px no-repeat; }
  #about .mobile-career-toggle[aria-expanded="true"]::after { background-size: 14px 2px, 0 0; }
  #about .career-stages li { grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding-bottom: 24px; }
  #about .career-stages li + li { padding-top: 20px; }
  #about .career-index { width: 28px; height: 28px; font-size: 18px; }
  #about .career-stages li:not(:last-child)::after { left: 13px; top: 33px; bottom: 7px; }
  #about .career-context { font-size: 12px; line-height: 1.5; letter-spacing: 0; }
  #about .career-stage h4 { font-size: 19px; line-height: 1.4; margin-top: 7px; }
  #about .career-body { font-size: 15px; line-height: 1.65; margin-top: 8px; }

  html[data-theme="capture"] #contact { margin-top: 56px; padding: 26px 20px; gap: 24px; }
  #contact h2 { margin-top: 14px; }
  #contact .contact-intro { margin-top: 16px; font-size: 16px; line-height: 1.65; }
  #contact .button { width: 100%; min-width: 0; min-height: 56px; margin-top: 20px; padding: 13px 16px; font-size: 16px; line-height: 1.5; justify-content: space-between; white-space: normal; }
  #contact .button > span { flex: 0 0 24px; }
  #contact .contact-note { padding: 18px; transform: none; border: 0; border-left: 2px solid var(--accent); background: var(--paper); }
  #contact .contact-note::before { display: none; }
  #contact .note-kicker { font-size: 11px; letter-spacing: .07em; }
  #contact .contact-note p { font-size: 16px; line-height: 1.65; margin-top: 14px; }
  #contact .note-signoff { font-size: 12px; line-height: 1.5; margin-top: 14px; }

  #faq { gap: 22px; padding-bottom: 56px; }
  #faq .section-heading h2 { margin-top: 14px; }
  #faq .section-intro { max-width: none; margin-top: 14px; font-size: 15px; line-height: 1.6; }
  #faq .material-list { min-width: 0; }
  #faq .faq-item { padding: 0; }
  #faq .faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 68px; padding: 18px 0; }
  #faq .faq-item h3 { flex: 1; margin: 0; font-size: 17px; line-height: 1.5; letter-spacing: -.015em; }
  #faq .expand-icon { position: static; flex: 0 0 22px; display: grid; place-items: center; width: 22px; height: 22px; font-size: 0; transform: none; background: linear-gradient(var(--accent), var(--accent)) center / 12px 2px no-repeat, linear-gradient(var(--accent), var(--accent)) center / 2px 12px no-repeat; }
  #faq .faq-item[open] .expand-icon { transform: none; background-size: 12px 2px, 0 0; }
  #faq .material-content { padding: 0 30px 20px 0; max-width: none; font-size: 16px; line-height: 1.65; }
  #faq .faq-item[open] summary { color: var(--accent); }
  #faq > .text-link { width: 100%; min-height: 48px; margin-top: 0; padding-block: 12px; font-size: 16px; justify-content: space-between; }

  html:has(.case-dialog[data-mobile-case][open]) { overflow: hidden; }
  .case-dialog[data-mobile-case][open] { display: flex; flex-direction: column; position: fixed; inset: 0; margin: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; padding: 0; border: 0; border-radius: 0; overflow: hidden; }
  .mobile-case-heading { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; padding: calc(10px + env(safe-area-inset-top)) 18px 10px; border-bottom: 1px solid var(--line); background: var(--paper); }
  .case-dialog[data-mobile-case] .mobile-case-heading .eyebrow { margin: 0; font-size: 11px; line-height: 1.5; color: var(--accent); }
  .case-dialog[data-mobile-case] .dialog-close { position: static; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; }
  .case-dialog[data-mobile-case] .dialog-content { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); scrollbar-width: thin; }
  .case-dialog[data-mobile-case] h2 { margin: 0; font-size: 31px; line-height: 1.2; }
  .case-dialog[data-mobile-case] .dialog-result { margin-top: 20px; padding-block: 14px; font-size: 16px; line-height: 1.55; }
  .case-dialog[data-mobile-case] h3 { margin: 26px 0 10px; font-size: 20px; line-height: 1.4; }
  .case-dialog[data-mobile-case] p,.case-dialog[data-mobile-case] li { font-size: 16px; line-height: 1.65; }
  .case-dialog[data-mobile-case] li + li { margin-top: 12px; }
  .case-dialog[data-mobile-case] .case-human-outcome { padding-left: 14px; }
  .case-dialog[data-mobile-case] .case-copy-label { font-size: 11px !important; line-height: 1.5; }
  .case-dialog[data-mobile-case] .button { width: 100%; min-height: 56px; padding-inline: 16px; font-size: 16px; line-height: 1.5; justify-content: space-between; white-space: normal; }
  .case-dialog[data-mobile-case] .button > span { flex-shrink: 0; }
  .case-dialog[data-mobile-case] a[href$="#services"] { width: 100%; min-height: 48px; margin-top: 12px; padding-block: 12px; font-size: 16px; justify-content: space-between; white-space: normal; }
}

@media (max-width: 360px) {
  #cases .case-card { padding-inline: 16px; }
  #cases .case-result strong { font-size: 32px; }
  #about.has-career-path { gap: 16px; }
  #about .approach-inputs { gap: 6px; }
  #about .approach-inputs span { font-size: 16px; }
  #about .approach-inputs p { font-size: 11px; }
  #about .approach-inputs > div { padding-inline: 5px; }
  html[data-theme="capture"] #contact { padding-inline: 16px; }
  #contact .contact-note { padding: 16px 12px; }
}
