/* iPhone layouts: safe areas, readable text, native scrolling and touch targets. */
html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
@media (max-width:720px), (pointer:coarse) and (max-width:1000px) {
  :root { --phone-gutter:max(20px,env(safe-area-inset-left),env(safe-area-inset-right)); }
  body { font-size:16px; }
  .about-main,.direction-main { overflow-wrap:break-word; }
  .wrap { width:calc(100% - var(--phone-gutter)*2); min-width:0; }
  .site-header,.about-page .site-header { height:auto; min-height:124px; flex-wrap:wrap; gap:8px 16px; padding-block:calc(12px + env(safe-area-inset-top)) 10px; }
  .brand { min-height:44px; }
  .brand-name,.about-page .brand-name { font-size:13px; }
  .header-nav,.about-page .header-nav { order:1; flex-basis:100%; margin-left:0; max-width:none; justify-content:space-between; gap:8px; }
  .nav-link,.nav-link-about,.about-page .nav-link { display:inline-flex; align-items:center; min-height:44px; padding-block:8px; font-size:13px; }
  .login,.about-page .login { min-height:44px; padding:9px 12px; font-size:13px; gap:9px; }
  .theme-switch { margin-left:auto; gap:2px; padding:2px; }
  .theme-button { width:44px; height:44px; padding:11px; }
  .theme-button svg { width:20px; height:20px; }
  .site-footer { padding-bottom:calc(24px + env(safe-area-inset-bottom)); font-size:12px; }
  .footer-links a,.about-text-link { display:inline-flex; align-items:center; min-height:44px; font-size:14px; }
  .cosmos-stage { height:1500px; min-height:1500px; max-height:none; overflow:clip; }
  body .cosmic-scene[data-neon-logo][data-neon-size=hero] { overflow:clip; }
  body .cosmic-scene[data-neon-size=hero] .neon-fallback { left:50%; top:38%; width:min(124.1379vw,560px); transform:translate(-50%,-48.5294118%); }
  .hero-copy { top:calc(150px + env(safe-area-inset-top)); left:0; width:100%; max-width:370px; }
  .hero-copy h1 { font-size:34px; line-height:1.1; }
  .eyebrow { margin-bottom:12px; font-size:9px; letter-spacing:.12em; }
  .hero-description { margin-top:14px; max-width:42ch; font-size:14px; line-height:1.7; }
  .hero-cta { min-height:44px; margin-top:12px; font-size:13px; }
  .cosmos-shade { height:440px; }
  body .cosmic-scene .neon-tools {
    position:sticky; top:calc(100svh - var(--neon-tools-height,140px) - 12px - env(safe-area-inset-bottom));
    top:calc(100dvh - var(--neon-tools-height,140px) - 12px - env(safe-area-inset-bottom));
    left:auto; right:auto; bottom:auto; z-index:4; width:calc(100% - var(--phone-gutter)*2);
    max-width:none; margin-inline:var(--phone-gutter); padding:8px; gap:6px;
    border:1px solid #a9cfff30; border-radius:10px; background:#06101eec; backdrop-filter:blur(12px);
  }
  body .cosmic-scene :is(.neon-pause,.neon-attach,.neon-clear),.neon-object-trigger { min-height:44px; padding:10px; font-size:12px; line-height:1.35; }
  body .cosmic-scene .neon-count { min-width:60px; font-size:11px; }
  .neon-object-picker { font-size:12px; }
  .neon-object-list { width:340px; max-width:100%; max-height:min(360px,45svh); -webkit-overflow-scrolling:touch; }
  .neon-object-option { min-height:44px; padding:11px 10px; font-size:14px; }
  .neon-touch-mode[aria-pressed=true] { background:#183f5b; border-color:#8edfff; color:#f1fbff; }
  [data-neon-logo][data-neon-touch-mode=true] { touch-action:none; -webkit-user-select:none; user-select:none; }
  .scene-guidance { left:var(--phone-gutter); right:var(--phone-gutter); bottom:180px; font-size:11px; line-height:1.5; }
  .scene-guidance-title { font-size:12px; }
  .scene-down { display:none; }
  .directions { padding-block:36px 42px; }
  .section-top h2 { font-size:21px; }
  .card-heading { font-size:24px; }
  .card-description { max-width:42ch; font-size:15px; line-height:1.75; }
  .direction-card,.direction-card:first-child,.direction-card:last-child { padding-block:26px; }
  .offshore-atlas__heading { display:block; }
  .offshore-atlas__heading h2 { font-size:21px; }
  .offshore-atlas__heading p,.offshore-atlas__summary { font-size:14px; }
  .offshore-atlas__legend { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 12px; font-size:12px; }
  .offshore-atlas__layout { display:block; }
  .offshore-atlas__options { grid-template-columns:minmax(0,1fr); padding:16px 0; border-right:0; border-bottom:1px solid var(--line); }
  .offshore-atlas__option { min-height:48px; font-size:14px; gap:12px; }
  .offshore-atlas__panel { padding:24px 0; }
  .offshore-atlas__nodes { grid-template-columns:minmax(0,1fr); }
  .offshore-atlas__node { font-size:14px; }
  .offshore-atlas__note { font-size:12px; }
  .about-intro { padding-block:48px; }
  .about-intro h1 { font-size:clamp(38px,10vw,60px); }
  .about-lead { font-size:23px; }
  .about-focus,.about-direction p { font-size:16px; }
  .about-direction-grid { grid-template-columns:minmax(0,1fr); }
  .about-direction h3 { overflow-wrap:break-word; }
  .direction-page .direction-nav { display:grid; grid-template-columns:minmax(0,1fr); gap:0; font-size:14px; }
  .direction-nav a { display:flex; align-items:center; min-height:44px; padding-block:10px; }
  .direction-hero { padding-block:36px 44px; }
  .direction-hero h1 { font-size:clamp(32px,8.8vw,54px); overflow-wrap:break-word; }
  .direction-hero-split,.direction-hero-digital,.direction-section-split,.direction-format-list,.direction-prose-columns,.direction-track-list li,.direction-tool,.direction-io { grid-template-columns:minmax(0,1fr); }
  .direction-hero-wide .direction-hero-copy { margin-left:0; }
  .direction-hero-digital .direction-lead { margin-top:24px; }
  .direction-lead { font-size:22px; }
  .direction-definition-list>div { grid-template-columns:minmax(0,1fr); gap:10px; }
  .direction-section-heading { display:block; }
  .direction-section-heading>p { margin-top:16px; }
  .direction-section p,.direction-definition-list dd,.direction-io dd { font-size:16px; }
  .direction-section .direction-status { font-size:13px; }
  dialog { width:calc(100% - 32px); max-height:calc(100svh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .close { width:44px; height:44px; }
  .modal-head { padding:14px 18px; }
  .modal-body { padding:24px 20px calc(24px + env(safe-area-inset-bottom)); }
  .modal-body p { font-size:16px; }
  .modal-secondary { min-height:44px; font-size:14px; }
}
@media (max-width:359px) {
  :root { --phone-gutter:max(16px,env(safe-area-inset-left),env(safe-area-inset-right)); }
  .hero-copy h1 { font-size:31px; }
  .header-nav .login { padding-inline:10px; gap:6px; }
  body .cosmic-scene :is(.neon-pause,.neon-attach,.neon-clear),.neon-object-trigger { padding-inline:8px; font-size:11px; }
}
