/* Shared phone layouts, including the standalone trading demo. */
*, *::before, *::after { box-sizing: border-box; }
.menu-toggle { display: none; }
.brand, .demo-brand { flex-shrink: 0; white-space: nowrap; }
.multi-header nav a, .multi-footer nav a, .demo-site-header nav a, .demo-section-nav a {
  display: inline-flex !important; align-items: center; gap: 7px;
}
.nav-icon { display: block; width: 22px; height: 22px; flex: 0 0 22px; }
@media (max-width: 760px) {
  .multi-header, .demo-site-header {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 0 16px; min-height: 68px; padding: 10px 20px; margin: 0;
    position: sticky; top: 0; z-index: 100; width: 100%;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .multi-header .brand, .demo-brand { font-size: 26px; margin: 0; }
  .navigation-enhanced .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 8px 14px; border: 1px solid var(--line);
    border-radius: 5px; background: var(--surface); color: var(--text, var(--fg));
    font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.4; cursor: pointer;
  }
  .multi-header nav, .demo-site-header nav {
    width: 100%; padding: 12px 0 6px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px; font-size: 15px;
  }
  .navigation-enhanced:not(.menu-open) nav { display: none; }
  .multi-header nav a, .demo-site-header nav a { display: flex !important; align-items: center; min-height: 44px; padding: 8px; }
  .copy-page-link { min-height: 44px; font-size: 13px; margin-top: 4px; }
  .project-subnav, .demo-section-nav {
    display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 14px;
    padding: 8px 20px; font-size: 13px; scrollbar-width: thin;
    max-width: 100%; -webkit-overflow-scrolling: touch;
  }
  .project-subnav { top: var(--site-header-height, 68px); }
  .section-nav-item, .demo-section-nav > a { flex: 0 0 auto; white-space: nowrap; }
  .section-nav-item > a, .demo-section-nav > a { display: inline-flex; align-items: center; min-height: 44px; }
  .copy-section-link { min-width: 36px; min-height: 44px; }
  .wrap { padding-inline: 20px; }
  .page-intro { padding-top: 36px; }
  .page-intro h1, .hero h1 { font-size: clamp(40px, 10.5vw, 64px); letter-spacing: -.055em; overflow-wrap: break-word; }
  .page-lead, .intro { font-size: 16px; line-height: 1.7; }
  .section { padding-block: 44px; }
  .visual::before { inset: 0; }
  .section-title, .features, .editorial-pair, .detail-layout, .guide-layout, .html-tour { min-width: 0; }
  .section-title h2 { font-size: clamp(30px, 8vw, 38px); }
  .features article, .editorial-pair article, .detail-copy, .project-facts, .catalogue-title { min-width: 0; }
  .actions { align-items: flex-start; gap: 12px 20px; }
  .button, .text-link, .manual-link, .home-shortcuts a, .related-work a { min-height: 44px; align-items: center; }
  .manual-link { display: inline-flex; margin: 0; }
  .faq summary { min-height: 44px; font-size: 16px; }
  .multi-footer nav { gap: 2px 18px; }
  .multi-footer nav a { display: inline-flex !important; align-items: center; min-height: 44px; font-size: 14px; }
  .catalogue-controls input, .catalogue-controls select, .share-dialog input { font-size: 16px; min-height: 48px; }
  .catalogue-controls button, .catalogue-source-tabs button { min-height: 44px; font-size: 14px; }
  .catalogue-title h3, .featured-release h3 { overflow-wrap: anywhere; }
  .catalogue-title p { font-size: 12px; overflow-wrap: anywhere; }
  .catalogue-listen { gap: 4px 12px; }
  .catalogue-listen .platform-link, .music-platform-links > .platform-link, .featured-release .platform-link {
    min-height: 44px; font-size: 12px; white-space: normal;
  }
  .catalogue-listen .platform-icon, .featured-release .platform-icon { width: 17px; height: 17px; }
  .catalogue-source-tabs { gap: 8px; }
  .catalogue-source-tabs button { flex: 1 1 auto; }
  .replica-stage { padding-inline: 14px; }
  .tour-explainer { min-width: 0; }
  .tp-replica { width: 100%; }
  .tp-replica button { min-height: 36px; }
  .tour-navigation button { min-width: 44px; min-height: 44px; }
  .project-facts { padding: 22px; }
  .project-facts dl > div { grid-template-columns: 80px minmax(0, 1fr); }
  dd { overflow-wrap: anywhere; }
  /* The demo's controls come first, with the chart underneath. */
  body:has(.demo-site-header) { padding: 0 0 24px; }
  .demo-site-header + .demo-section-nav { margin-bottom: 20px; }
  .demo-section-nav + main.wrap { padding-inline: 16px; width: 100%; min-width: 0; }
  .demo-section-nav + main.wrap > * { min-width: 0; }
  .demo-section-nav + main .intro { margin-bottom: 0; }
  .stage { display: flex; flex-direction: column; }
  .stage .panel-slot { order: 0; padding: 16px; border-top: 0; border-bottom: 1px solid var(--line); }
  .stage .chart { order: 1; height: 300px; }
  .stage .tp { width: 100%; max-width: 360px; padding-inline: 12px; font-size: 13px; }
  .stage .tp-h { height: 52px; }
  .stage .tp-ib { width: 44px; height: 44px; }
  .stage .tp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 8px; }
  .stage .tp-cap { font-size: 11px; height: 18px; }
  .stage .tp input { height: 44px; font-size: 16px; }
  .stage .tp-trend { grid-template-columns: repeat(4, 1fr) auto; font-size: 12px; height: 28px; align-items: center; }
  .stage .tp-trade { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stage .tp-trade button.big, .stage .tp-trade button.small { min-height: 44px; margin: 0; }
  .stage .tp-autoh { height: 48px; }
  .stage .tp-autoh button { width: 64px; height: 44px; font-size: 12px; }
  .stage .tp-rule { grid-template-columns: 64px minmax(0, 1fr) 48px 48px; }
  .stage .tp-rule button, .stage .tp-help button { min-height: 44px; }
  .stage .tp-rule span { font-size: 10px; }
  .stage .tp-pos { font-size: 11px; }
  .controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .controls button { min-height: 48px; }
  .caption { grid-template-columns: minmax(0, 1fr); }
  .caption > div { min-width: 0; }
  .dots i { flex: 1 1 0; min-width: 0; max-width: 18px; }
}
@media (max-width: 480px) {
  .features { grid-template-columns: 1fr; }
  .features article { padding: 24px; }
  .catalogue-controls { grid-template-columns: 1fr; }
  .catalogue-controls label, .catalogue-controls button { grid-column: 1; width: 100%; }
  .catalogue-row { gap: 5px 12px; }
  .catalogue-year { font-size: 11px !important; }
  .featured-release-grid { gap: 24px 14px; }
  .featured-release h3 { font-size: 15px; }
}
