/* Phone-only homepage UX overrides. Desktop rules remain unchanged. */
@media (max-width: 700px) {
  /* The pinned scroll-story made the hero taller than its actual content. */
  .hero { height:auto !important; min-height:0 !important; padding:0 !important; overflow:visible !important; }
  .hero-stage { position:relative !important; top:auto !important; height:auto !important; min-height:0 !important; overflow:hidden !important; }
  .hero-ascii-wrap, .hero-ascii-particles { display:none !important; }
  .hero-main-layout { display:block !important; width:100% !important; height:auto !important; min-height:0 !important; margin:0 !important; padding:clamp(26px,5svh,38px) 18px 28px !important; }
  .hero-center { width:100% !important; max-width:none !important; margin:0 !important; }
  .hero-center .kicker { max-width:100%; margin:0 0 12px !important; font-size:clamp(8px,2.2vw,10px) !important; line-height:1.6; letter-spacing:.08em !important; }

  /* Keep the ASCII word loop on phones, but not the face portrait. */
  .hero-title-dissolve { --dissolve-font-size:clamp(4.4px,.78vw,6px) !important; display:block !important; width:100% !important; max-width:100% !important; height:14.04em !important; min-height:0 !important; margin:0 !important; overflow:hidden !important; }
  .hero-title-dissolve .ascii-dissolve-output { display:block !important; width:64ch !important; max-width:100% !important; height:14.04em !important; font-size:var(--dissolve-font-size) !important; line-height:1.08 !important; overflow:hidden !important; }
  .hero-title-dissolve.ascii-dissolve-ready .hero-title-fallback { display:none !important; }
  .hero-subtitle { max-width:24ch !important; margin:13px 0 0 !important; font-size:clamp(25px,7.2vw,31px) !important; line-height:1.12 !important; letter-spacing:-.045em !important; }
  .hero-lede { max-width:39ch !important; margin:12px 0 0 !important; font-size:14px !important; line-height:1.62 !important; }
  .hero-buttons { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; width:100% !important; max-width:460px; gap:8px !important; margin-top:19px !important; }
  .hero-buttons .button { display:flex !important; align-items:center; justify-content:space-between; width:100% !important; min-width:0 !important; min-height:48px !important; padding:0 10px !important; gap:5px !important; font-size:clamp(7px,2.1vw,9px) !important; line-height:1.25; letter-spacing:.035em !important; white-space:normal !important; text-align:left; }
  .hero-meta { display:flex !important; flex-wrap:wrap; justify-content:flex-start !important; gap:5px 9px !important; max-width:100% !important; margin:15px 0 0 !important; font-size:8px !important; line-height:1.6 !important; }
  .hero-bottom { position:relative !important; inset:auto !important; display:flex !important; justify-content:space-between; gap:12px; margin:0 18px 16px !important; font-size:8px !important; }
  .hero-coordinate { display:none !important; }

  /* Compact preview of the first workflow; preserve its title, summary and full-case link. */
  .project-grid { row-gap:16px !important; }
  .project-featured .featured-layout { display:block !important; min-width:0; }
  .project-featured .featured-copy { min-width:0; padding:20px 17px 22px !important; }
  .project-featured .home-system-map, .project-featured .featured-metrics { display:none !important; }
  .project-featured .featured-copy h3 { margin:12px 0 9px !important; font-size:clamp(24px,7vw,30px) !important; line-height:1.08 !important; }
  .project-featured .featured-copy > p:not(.mono-label) { display:-webkit-box !important; overflow:hidden !important; -webkit-box-orient:vertical; -webkit-line-clamp:3; line-clamp:3; font-size:13px !important; line-height:1.62 !important; }
  .project-featured .featured-cta { display:inline-flex; min-height:44px; align-items:center; margin-top:10px; }

  /* Preserve the POSM dashboard proportions and keep the three areas legible. */
  .project-posm .project-art { min-height:0 !important; height:auto !important; aspect-ratio:1.34 / 1; padding:10px !important; overflow:hidden !important; }
  .posm-dashboard { width:100% !important; height:100%; max-width:none !important; min-width:0; padding:8px !important; overflow:hidden; }
  .posm-header { gap:8px; padding-bottom:8px; }
  .posm-header span { font-size:8px !important; }
  .posm-header b { font-size:7px !important; }
  .posm-dashboard-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:6px !important; margin-top:8px !important; }
  .posm-store, .posm-list { min-height:0 !important; height:112px; padding:7px !important; overflow:hidden; }
  .posm-calendar { grid-column:1 / -1 !important; min-height:0 !important; height:58px; padding:6px !important; grid-template-columns:repeat(6,minmax(0,1fr)) !important; grid-auto-rows:8px !important; gap:3px !important; }
  .store-label { font-size:6px !important; line-height:1.35; }
  .posm-store i { width:calc(50% - 4px) !important; height:27px !important; margin-top:8px !important; }
  .posm-list > i { margin-top:8px !important; }
  .posm-store > b, .posm-list > b { font-size:7px !important; }

  /* Scroll-centred, reversible approach cards with a manual touch control. */
  .process-track { display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:0 !important; margin-top:24px !important; border-top:1px solid var(--line-strong); }
  .process-step, .process-step:not(:first-child) { display:flex !important; min-height:0 !important; padding:17px 0 !important; border-right:0 !important; border-bottom:1px solid var(--line) !important; background:transparent; }
  .process-top { font-size:9px !important; }
  .process-step h3 { margin:12px 0 0 !important; font-size:clamp(21px,5.9vw,25px) !important; line-height:1.18 !important; }
  .process-step p { max-width:100% !important; max-height:0; margin:0 !important; overflow:hidden; opacity:0; font-size:13px !important; line-height:1.68 !important; transition:max-height 320ms ease,opacity 220ms ease,margin 220ms ease; }
  .process-step .process-base { max-height:0; margin:0 !important; padding:0 !important; overflow:hidden; opacity:0; transition:max-height 320ms ease,opacity 220ms ease,padding 220ms ease; }
  .process-step.is-mobile-active p { max-height:240px; margin-top:10px !important; opacity:1; }
  .process-step.is-mobile-active .process-base { max-height:60px; margin-top:8px !important; padding:12px 0 0 !important; opacity:1; }
  .process-step-toggle { display:inline-flex; align-items:center; justify-content:space-between; align-self:flex-start; gap:14px; min-width:128px; min-height:42px; margin-top:11px; padding:0 11px; border:1px solid var(--line-strong); background:transparent; color:var(--ink); font:600 9px/1.2 var(--mono); letter-spacing:.055em; cursor:pointer; }
  .process-step-toggle::after { content:"+"; color:var(--accent); font-size:15px; }
  .process-step.is-mobile-active .process-step-toggle::after { content:"−"; }

  /* Preserve the blog introduction; replace the carousel with a visible archive CTA. */
  .blog-heading.section-inner { padding-top:34px !important; padding-bottom:20px !important; }
  .blog-heading h2 { font-size:clamp(36px,9.7vw,49px) !important; line-height:1 !important; }
  .blog-heading-copy > .kicker { color:var(--accent) !important; font-size:9px !important; letter-spacing:.1em !important; }
  .blog-heading-copy > p:last-child { max-width:42ch !important; margin-top:13px !important; color:var(--ink) !important; opacity:.88; font-size:13px !important; line-height:1.65 !important; }
  .blog-heading-index.blog-archive-link { position:relative !important; inset:auto !important; display:inline-flex !important; align-items:center; justify-content:space-between; gap:14px; width:min(100%,260px); min-height:49px; margin:20px 0 0 !important; padding:0 14px !important; border:1px solid var(--line-strong); border-radius:2px; background:var(--panel); color:var(--ink); transform:none !important; }
  .blog-heading-index.blog-archive-link b { display:none !important; }
  .blog-heading-index.blog-archive-link small { color:var(--ink) !important; font:600 10px/1.2 var(--mono) !important; letter-spacing:.08em; white-space:nowrap; }
  .blog-heading-index.blog-archive-link i { color:var(--accent); font-size:17px; }
  .blog-carousel { display:none !important; }

  /* Remove phone-only decoration and simplify the footer. */
  .contact-stamp { display:none !important; }
  .contact-content { width:100% !important; max-width:100% !important; margin:175px 0 0 !important; }
  .site-footer { display:grid !important; grid-template-columns:minmax(0,1fr) !important; align-items:start !important; justify-content:start !important; gap:9px !important; min-height:0 !important; padding:17px 18px 20px !important; }
  .site-footer .wordmark { min-height:0 !important; padding:0 !important; }
  .site-footer > span:first-of-type { display:block !important; padding:0 !important; color:var(--muted) !important; font-size:8px !important; line-height:1.5; }
  .site-footer > span:last-of-type { padding:0 !important; color:var(--muted) !important; font-size:8px !important; }
  .site-footer .back-top { display:none !important; }

  /* Consistent mobile gutters; the profile's internal framing is left intact. */
  .section-bar { gap:10px !important; padding-inline:18px !important; font-size:8px !important; line-height:1.45; }
  .section-bar span:nth-child(2) { display:none; }
  .section-inner { padding-inline:18px !important; }
  .work-heading.section-inner, .approach-heading, .blog-heading.section-inner { gap:16px; }
  .work-heading .heading-note { margin-top:12px; font-size:13px; line-height:1.65; }
}
@media (max-width:370px) {
  .hero-main-layout { padding-inline:15px !important; }
  .hero-buttons .button { padding-inline:7px !important; font-size:7px !important; }
  .hero-subtitle { font-size:24px !important; }
  .blog-heading-index.blog-archive-link { width:100%; }
  .posm-header b { display:none; }
}
@media (prefers-reduced-motion:reduce) {
  html:not([data-motion-mode="full"]) .hero-title-dissolve .ascii-dissolve-output { display:none !important; }
  html:not([data-motion-mode="full"]) .hero-title-dissolve .hero-title-fallback { display:block !important; position:relative !important; top:auto !important; left:auto !important; font-size:clamp(58px,15vw,70px) !important; opacity:1 !important; visibility:visible !important; animation:none !important; }
  html:not([data-motion-mode="full"]) .process-step p,
  html:not([data-motion-mode="full"]) .process-step .process-base,
  html:not([data-motion-mode="full"]) .process-step-toggle { transition:none !important; }
}
