.mobile-phone-hero,
.mobile-phone-experience { display: none; }

/* Phone-only composition: tablet and desktop keep their existing layout. */
@media (max-width: 520px) {
  .cloud-story { display: none; }
  .cloud-story-mobile > .mobile-tablet-layout { display: none; }
  .mobile-phone-hero, .mobile-phone-experience {
    --phone-bg: #081510;
    --phone-surface: #10251c;
    --phone-soft: #19382a;
    --phone-line: #2e493b;
    --phone-text: #f0f7f2;
    --phone-muted: #aec4b8;
    --phone-accent: #79e7a4;
    --phone-button: #087a43;
    --phone-accent-soft: #163c26;
    color: var(--phone-text); background: var(--phone-bg);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  }
  html[data-public-theme="light"] .mobile-phone-hero,
  html[data-public-theme="light"] .mobile-phone-experience {
    --phone-bg: #f2f6f0;
    --phone-surface: #fff;
    --phone-soft: #e5eee6;
    --phone-line: #cbdace;
    --phone-text: #12281b;
    --phone-muted: #506557;
    --phone-accent: #087a43;
    --phone-accent-soft: #dcefe1;
  }
  .mobile-phone-hero {
    position: relative; display: flex; flex-direction: column; overflow: clip;
    min-height: 100svh; padding: 7rem 1.25rem 1.5rem;
    background: radial-gradient(ellipse at 100% 45%, #79e7a414, transparent 60%), var(--phone-bg);
  }
  .mobile-phone-hero-copy > span, .mobile-phone-heading > span, .mobile-phone-final > span {
    display: flex; align-items: center; gap: .6rem; color: var(--phone-accent);
    font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  }
  .mobile-phone-hero-copy > span::before, .mobile-phone-heading > span::before {
    content: ''; width: 1.25rem; height: 1px; background: currentColor;
  }
  .mobile-phone-hero h1 {
    margin: 1.3rem 0 0; color: var(--phone-text); font-family: inherit;
    font-size: clamp(3.5rem, 16.6vw, 5rem); font-weight: 550; letter-spacing: -.065em; line-height: .98;
  }
  .mobile-phone-hero h1 em { color: var(--phone-accent); font-style: normal; }
  .mobile-phone-hero-copy > p, .mobile-phone-heading p, .mobile-phone-final p {
    max-width: 32ch; margin: 1.3rem 0 0; color: var(--phone-muted); font-size: 1rem; line-height: 1.65;
  }
  .mobile-phone-hero-actions { display: grid; grid-template-columns: 1.15fr .85fr; gap: .55rem; margin-top: 1.5rem; }
  .mobile-phone-hero-actions a, .mobile-phone-final a {
    display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3.25rem;
    padding: .75rem; border: 1px solid var(--phone-line); border-radius: 1rem;
    color: var(--phone-text); background: var(--phone-bg); font-size: .82rem; font-weight: 600;
  }
  .mobile-phone-hero-actions a:first-child, .mobile-phone-final a:first-child {
    border-color: var(--phone-button); color: #fff; background: var(--phone-button);
  }
  .mobile-phone-hero-actions svg, .mobile-phone-final a svg, .mobile-inline-link svg { width: 1rem; height: 1rem; }
  .mobile-cloud-stage { position: relative; margin: 2rem 0 1rem; padding-top: 3.7rem; }
  .mobile-cloud-stage::before, .mobile-cloud-stage::after {
    content: ''; position: absolute; inset: 5rem .8rem 4rem; border: 1px solid var(--phone-line);
    border-radius: 1.25rem; background: var(--phone-soft); transform: rotate(-6deg);
  }
  .mobile-cloud-stage::after { transform: rotate(5deg); }
  .mobile-cloud-orbit {
    position: absolute; z-index: 2; top: -1.5rem; right: 1.2rem; width: 5rem; height: 5rem;
    display: grid; place-items: center; border: 1px solid var(--phone-line); border-radius: 1.5rem;
    color: var(--phone-accent); background: var(--phone-surface); transform: rotate(10deg); box-shadow: 0 1rem 3rem #0002;
  }
  .mobile-cloud-orbit svg { width: 3.8rem; }
  .mobile-stage-caption { position: absolute; top: 1.6rem; left: .3rem; color: var(--phone-muted); font-size: .8rem; }
  .mobile-live-brief {
    position: relative; z-index: 1; overflow: hidden; border: 1px solid var(--phone-line);
    border-radius: 1.25rem; background: var(--phone-surface); transform: rotate(-2deg); box-shadow: 0 1.5rem 4rem #0002;
  }
  .mobile-live-brief > header {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    min-height: 2.75rem; padding: .75rem; border-bottom: 1px solid var(--phone-line);
  }
  .mobile-live-brief header span { display: flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 600; }
  .mobile-live-brief header i, .mobile-thread-resources i { width: .45rem; height: .45rem; border-radius: 50%; background: var(--phone-accent); }
  .mobile-live-brief small, .mobile-project-thread small { color: var(--phone-muted); font-size: .75rem; }
  .mobile-live-primary {
    display: grid; grid-template-columns: 2.5rem 1fr 1rem; align-items: center; gap: .65rem;
    margin: 1rem .75rem .5rem; padding: .75rem; border: 1px solid var(--phone-line); border-radius: .9rem;
    background: var(--phone-accent-soft);
  }
  .mobile-live-primary > svg { width: 1.25rem; color: var(--phone-accent); }
  .mobile-live-primary span, .mobile-live-services > span, .mobile-live-brief footer span { display: grid; gap: .3rem; }
  .mobile-live-primary strong { font-size: .95rem; font-weight: 600; }
  .mobile-preview-detail { margin: 0 1rem; color: var(--phone-muted); font-size: .8rem; }
  .mobile-live-links { display: flex; justify-content: space-around; height: 1.5rem; margin-inline: 3rem; border-bottom: 1px solid var(--phone-line); }
  .mobile-live-links i { width: 1px; background: var(--phone-accent); }
  .mobile-live-services { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .75rem; }
  .mobile-live-services > span { position: relative; padding: .75rem .5rem .75rem 2.25rem; border: 1px solid var(--phone-line); border-radius: .8rem; }
  .mobile-live-services svg { position: absolute; left: .6rem; top: .8rem; width: 1rem; color: var(--phone-accent); }
  .mobile-live-services strong { font-size: .75rem; font-weight: 600; }
  .mobile-live-brief footer { padding: 1rem; border-top: 1px solid var(--phone-line); background: var(--phone-soft); }
  .mobile-live-brief footer strong { font-size: 1rem; font-weight: 500; }
  .mobile-preview-switch { position: relative; z-index: 2; display: flex; justify-content: center; gap: .4rem; margin-top: 1.5rem; }
  .mobile-preview-switch button, .mobile-interface-tabs button {
    display: flex; align-items: center; justify-content: center; gap: .35rem; min-height: 2.75rem;
    border: 1px solid var(--phone-line); border-radius: 99px; padding: .5rem .7rem;
    color: var(--phone-muted); background: var(--phone-bg); font-size: .75rem; font-weight: 600; cursor: pointer;
  }
  .mobile-preview-switch svg { width: .95rem; height: .95rem; }
  .mobile-preview-switch button[aria-pressed="true"] { color: var(--phone-bg); background: var(--phone-accent); border-color: var(--phone-accent); }
  .mobile-phone-hero-proof { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem .75rem; color: var(--phone-muted); font-size: .75rem; }
  .mobile-phone-hero-next { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem; margin-top: .75rem; color: var(--phone-accent); font-size: .8rem; }
  .mobile-phone-hero-next svg { width: 1rem; }
  .mobile-phone-experience { display: block; overflow: clip; }
  .mobile-phone-experience > section { position: relative; padding: 4.75rem 1.25rem; scroll-margin-top: 5rem; }
  .mobile-phone-heading h2, .mobile-phone-final h2 {
    max-width: 13ch; margin: 1rem 0 0; color: var(--phone-text); font-family: inherit;
    font-size: clamp(2.5rem, 11.6vw, 3.6rem); font-weight: 500; letter-spacing: -.055em; line-height: 1.06;
  }
  .mobile-phone-start, .mobile-phone-spaces { background: var(--phone-surface); }
  .mobile-phone-start { border-radius: 2rem 2rem 0 0; }
  .mobile-outcome-list { display: grid; gap: .75rem; margin-top: 2rem; }
  .mobile-outcome-list a {
    display: grid; min-height: 6rem; grid-template-columns: 2.3rem 1fr 1rem; align-items: center; gap: .6rem;
    padding: 1rem; border: 1px solid var(--phone-line); border-radius: 1.2rem; background: var(--phone-bg);
    transition: transform .2s;
  }
  .mobile-outcome-list a:nth-child(2) { margin-left: .6rem; }
  .mobile-outcome-list a:nth-child(3) { margin-left: 1.2rem; }
  .mobile-outcome-list svg { width: 1.3rem; color: var(--phone-accent); }
  .mobile-outcome-list a span, .mobile-thread-root span, .mobile-thread-context span, .mobile-thread-resources span { display: grid; gap: .25rem; }
  .mobile-outcome-list b { font-size: 1rem; font-weight: 600; }
  .mobile-outcome-list small { color: var(--phone-muted); font-size: .75rem; line-height: 1.5; }
  .mobile-phone-proof { display: flex; gap: .5rem; margin-top: 1rem; color: var(--phone-muted); font-size: .75rem; line-height: 1.6; }
  .mobile-phone-proof svg { flex: 0 0 1rem; color: var(--phone-accent); }
  .mobile-project-thread { position: relative; display: grid; gap: .75rem; margin-top: 2rem; padding: 1rem; border-radius: 1.5rem; background: var(--phone-soft); }
  .mobile-thread-root, .mobile-thread-resources article {
    display: grid; grid-template-columns: 2rem 1fr auto; align-items: center; gap: .5rem;
    min-height: 4.5rem; padding: .75rem; border: 1px solid var(--phone-line); border-radius: .8rem; background: var(--phone-surface);
  }
  .mobile-thread-root svg, .mobile-thread-resources svg { width: 1.3rem; color: var(--phone-accent); }
  .mobile-thread-root strong, .mobile-thread-context strong, .mobile-thread-resources strong { font-size: .9rem; font-weight: 600; }
  .mobile-thread-root i { color: var(--phone-accent); font-size: .75rem; font-style: normal; }
  .mobile-thread-context { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .5rem; }
  .mobile-thread-resources { display: grid; gap: .5rem; border-left: 1px solid var(--phone-accent); padding-left: .75rem; margin-left: .5rem; }
  .mobile-space-directory { margin-top: 1.5rem; }
  .mobile-space-directory details { border-bottom: 1px solid var(--phone-line); }
  .mobile-space-directory summary {
    display: grid; grid-template-columns: 1fr 2rem; align-items: center; gap: .75rem;
    min-height: 5.5rem; padding-block: 1rem; cursor: pointer; list-style: none;
  }
  .mobile-space-directory summary::-webkit-details-marker { display: none; }
  .mobile-space-directory summary > span { display: grid; gap: .4rem; font-size: 1.15rem; font-weight: 500; }
  .mobile-space-directory small { color: var(--phone-muted); font-size: .75rem; line-height: 1.5; }
  .mobile-space-directory summary b { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: var(--phone-accent); background: var(--phone-soft); font-size: .75rem; }
  .mobile-space-directory summary b::after { content: '+'; }
  .mobile-space-directory details[open] summary b::after { content: '−'; }
  .mobile-space-directory details > div { display: grid; gap: .5rem; padding-bottom: 1rem; }
  .mobile-space-directory details > div > span { display: flex; align-items: center; gap: .75rem; padding: .75rem; border-radius: .8rem; background: var(--phone-bg); }
  .mobile-space-directory details svg { flex: 0 0 1.3rem; width: 1.3rem; color: var(--phone-accent); }
  .mobile-space-directory details i { display: grid; gap: .25rem; font-style: normal; }
  .mobile-space-directory strong { font-size: .9rem; font-weight: 600; }
  .mobile-interface-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; margin-top: 2rem; }
  .mobile-interface-tabs button[aria-selected="true"] { color: #fff; background: var(--phone-button); border-color: var(--phone-button); }
  .mobile-interface-panel { overflow: hidden; margin-top: 1rem; border: 1px solid var(--phone-line); border-radius: 1.3rem; color: #f0f7f2; background: #081510; }
  .mobile-interface-panel > header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 3rem; border-bottom: 1px solid #2e493b; padding: .85rem; font-size: .8rem; }
  .mobile-interface-panel header small { color: #aec4b8; font-size: .75rem; }
  .mobile-interface-panel p { margin: 0; padding: .85rem; color: #aec4b8; font-size: .8rem; line-height: 1.6; }
  .mobile-interface-panel pre { overflow-x: auto; min-height: 10rem; padding: .85rem; font: .8rem/1.8 ui-monospace, monospace; }
  .mobile-interface-panel code { display: grid; }
  .mobile-inline-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 3rem; margin-top: .75rem; color: var(--phone-accent); font-size: .85rem; font-weight: 600; }
  .mobile-phone-cost { background: var(--phone-surface); }
  .mobile-cost-ledger { margin-top: 2rem; overflow: hidden; border: 1px solid var(--phone-line); border-radius: 1.3rem; background: var(--phone-bg); }
  .mobile-cost-ledger > div { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem .75rem; border-bottom: 1px solid var(--phone-line); }
  .mobile-cost-ledger span { display: flex; align-items: center; gap: .5rem; font-size: .8rem; }
  .mobile-cost-ledger svg { width: 1rem; color: var(--phone-accent); }
  .mobile-cost-ledger b, .mobile-cost-ledger strong { font-size: .8rem; font-weight: 600; }
  .mobile-cost-ledger .is-active, .mobile-cost-ledger footer { background: var(--phone-accent-soft); }
  .mobile-cost-ledger footer { display: grid; gap: .5rem; padding: 1.25rem; }
  .mobile-cost-ledger footer strong { color: var(--phone-accent); font-size: 2rem; font-weight: 500; letter-spacing: -.04em; }
  .mobile-phone-experience > .mobile-phone-final { border-radius: 2rem 2rem 0 0; padding-bottom: 4rem; background: var(--phone-accent-soft); }
  .mobile-phone-final > div { display: grid; gap: .75rem; margin-top: 2rem; }
  .mobile-phone-hero :focus-visible, .mobile-phone-experience :focus-visible { outline: 3px solid var(--phone-accent); outline-offset: 4px; }
  .mobile-preview-switch button:active, .mobile-outcome-list a:active { transform: scale(.97); }
  @media (prefers-reduced-motion: no-preference) {
    .mobile-phone-hero-copy { animation: phone-arrive .8s both; }
    .mobile-cloud-stage { animation: phone-arrive 1s .15s both; }
    .mobile-cloud-orbit { animation: phone-float 6s ease-in-out infinite; }
    .mobile-live-primary { animation: phone-arrive .35s both; }
    .mobile-live-links i { animation: phone-signal 2.8s ease-in-out infinite; }
    .mobile-live-links i:nth-child(2) { animation-delay: .3s; }
    .mobile-live-links i:nth-child(3) { animation-delay: .6s; }
    @supports (animation-timeline: view()) {
      .mobile-phone-heading, .mobile-project-thread, .mobile-outcome-list, .mobile-cost-ledger {
        animation: phone-arrive linear both; animation-timeline: view(); animation-range: entry 0% entry 80%;
      }
    }
  }
  @keyframes phone-arrive { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
  @keyframes phone-float { 50% { translate: 0 -9px; rotate: -5deg; } }
  @keyframes phone-signal { 0%, 100% { opacity: .35; } 50% { opacity: 1; box-shadow: 0 0 10px var(--phone-accent); } }
}
@media (max-width: 350px) {
  .mobile-phone-hero { padding-inline: 1rem; }
  .mobile-phone-hero-actions { grid-template-columns: 1fr; }
  .mobile-phone-experience > section { padding-inline: 1rem; }
  .mobile-thread-root i { display: none; }
  .mobile-interface-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-phone-hero *, .mobile-phone-experience * { scroll-behavior: auto; transition: none !important; animation: none !important; }
}
