/* Shared small-screen refinements. Keep the existing desktop and print layouts. */
@media screen {
  :root { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  button, a, input, select, textarea { -webkit-tap-highlight-color: #d6a0f244; }
  button, .button { touch-action: manipulation; }
  .skip-link { position: absolute; top: -100px; left: 16px; z-index: 100; padding: 12px 18px; background: #f3eafb; color: #2d1647; }
  .skip-link:focus { top: 12px; }
  .table-scroll, .tablewrap { max-width: 100%; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  .mobile-table-hint { display: none; }
  .map-touch-toggle { display: none; }
}
@media screen and (max-width: 1050px) {
  body:not(.deck) > header { position: sticky; top: 0; z-index: 30; padding: 14px max(20px, env(safe-area-inset-left)) 14px max(20px, env(safe-area-inset-right)); box-shadow: 0 3px 18px #16082233; }
  .menu { min-height: 44px; min-width: 64px; font: 15px Arial, sans-serif; }
  #navigation { gap: 0; padding-top: 14px; max-height: 70vh; max-height: 70svh; overflow-y: auto; overscroll-behavior: contain; }
  #navigation a { display: flex; align-items: center; min-height: 48px; padding: 10px 8px; font-size: 16px; border-bottom: 1px solid #755388; }
  #navigation a[aria-current=page] { color: #f2d992; }
  section[id], .activity-detail { scroll-margin-top: 100px; }
}
@media screen and (max-width: 900px) {
  .intro, .split, .vision-profile, .vision-contact, .app-ad, .travel-programme, .doorman-workspace, .pyramid-section { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .travel-programme:nth-child(even) > figure { order: 0; }
  .guest-app { grid-template-columns: minmax(0, 1fr); }
  .guest-app-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-table-hint { display: block; font-size: 13px; color: #e0d0eb; margin-bottom: 10px; }
}
@media screen and (max-width: 760px) {
  main, .section, .hero, main > *, .section > *, .hero > *, .grid > *, .activity-results > *, .guest-app > *, .travel-mini-grid > *, .model-statistics > *, .map-grid > * { min-width: 0; }
  h1, h2, h3, p, li, dd, dt, .button, label, summary, figcaption { overflow-wrap: anywhere; }
  h1 { font-size: clamp(34px, 9vw, 52px); line-height: 1.12; letter-spacing: -1px; }
  h2 { font-size: clamp(29px, 7.4vw, 40px); }
  h3 { font-size: 25px; }
  .hero { padding: 36px 20px 30px; }
  .section { padding: 42px 20px; }
  .eyebrow { font-size: 11px; letter-spacing: 2px; }
  .lead { font-size: 18px; line-height: 1.65; }
  .actions, .deck-actions { gap: 12px; }
  .button, button { min-height: 44px; font-size: 14px; line-height: 1.45; white-space: normal; }
  .button { padding: 12px 18px; text-align: center; max-width: 100%; }
  input, select, textarea, .vision-form input, .vision-form select, .vision-form textarea, .model-controls select, .model-inputs input, .doorman-workspace select, .doorman-workspace input, .map-top select { font-size: 16px; min-height: 48px; max-width: 100%; }
  input[type=checkbox], input[type=radio] { min-height: 0; }
  .check-label, .app-row label { min-height: 44px; padding: 6px 0; }
  label { font-size: 15px; }
  .mini-note, .activity-place, .group-status, .model-inputs small, .app-row small, .new-earth-credit { font-size: 12px !important; line-height: 1.65; }
  .landscape img { height: auto; aspect-ratio: 4 / 3; }
  .landscape figcaption { padding: 14px 20px; font-size: 12px; }
  .landscape figcaption span { font-size: 12px; }
  .editorial-image { margin: 16px 20px; }
  .vision-portrait img, .travel-programme img, .render-grid img, .photo-grid img, .app-ad-image img { max-width: 100%; }
  .grid, .timeline, .pathway-grid, .render-grid, .community-visions, .activity-results, .photo-grid, .membership-grid, .group-grid { gap: 24px; }
  .grid, .layers, .render-grid, .community-visions, .activity-results, .photo-grid, .membership-grid, .group-grid { grid-template-columns: minmax(0, 1fr); }
  .activity-card { padding: 20px; }
  .activity-image { width: calc(100% + 40px); margin: -20px -20px 20px; height: auto; aspect-ratio: 3 / 2; }
  .activity-meta { flex-wrap: wrap; font-size: 12px; }
  .activity-card p, .group-grid p, .agenda-card p, .travel-mini-grid p { font-size: 15px; }
  .activity-card .activity-place { font-size: 12px !important; }
  .activity-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .activity-actions button { font-size: 14px; }
  .activity-detail { padding: 22px 18px; }
  .activity-detail dl { font-size: 15px; }
  .season-tabs > button { flex: 1 1 125px; min-height: 74px; }
  .season-feature > div { padding: 24px 20px; }
  .colour-tabs button, .day-tabs button, .gallery-filters button { font-size: 14px; padding: 11px 13px; }
  .programme-toolbar .button { flex: 1 1 145px; }
  .return-scenario dl { grid-template-columns: minmax(0, 1fr); }
  .table-scroll table, .stakeholder-table { font-size: 14px; }
  .table-scroll:focus-visible, .tablewrap:focus-visible { outline: 3px solid #e7c580; outline-offset: 3px; }
  .model-verdict, .capital-test, .doorman-result, .doorman-notice { padding: 20px 18px; }
  .model-statistics strong { font-size: clamp(25px, 6vw, 32px); }
  .model-definitions dd { margin-left: 0; }
  .guest-app > aside { padding: 22px 18px; }
  .guest-app-tabs { gap: 10px; }
  .guest-app-tabs button { padding: 12px; font-size: 15px; min-height: 54px; }
  #guest-app-content { padding: 24px 18px; }
  .app-ad h2, .vision-contact h2 { font-size: clamp(30px, 8vw, 40px); }
  .app-ad-image { margin: 0; }
  .map-experience { padding: 0 16px 36px; }
  .map-toolbar { position: static; padding: 10px; flex-wrap: wrap; background: #2d1647; }
  .map-toolbar button { min-width: 44px; padding: 10px 12px; font-size: 14px; }
  .map-touch-toggle { display: inline-block; }
  #estate-svg { height: clamp(280px, 85vw, 420px); min-height: 0; touch-action: pan-y pinch-zoom; }
  #estate-svg.map-pan-enabled { touch-action: none; }
  .map-help { font-size: 13px; }
  .filterbar button, .location-list button { min-height: 44px; font-size: 14px; }
  .location-list { display: grid; grid-template-columns: minmax(0, 1fr); }
  .panel-copy p, .panel-copy li { font-size: 15px; }
  .floor { min-height: 85px; font-size: 14px; padding-left: 9%; padding-right: 9%; }
  .floor span { font-size: 12px; letter-spacing: 1px; }
  footer { padding: 30px 20px calc(30px + env(safe-area-inset-bottom)); gap: 24px; font-size: 14px; }
  footer a, footer .print { display: inline-block; padding: 8px 0; min-height: 40px; }
  .deck { padding-bottom: calc(85px + env(safe-area-inset-bottom)); }
  .decktools { padding: 16px; gap: 10px; position: static; }
  .decktools a { white-space: normal; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }
  .decktools select { min-width: 0; width: 100%; max-width: 100%; font-size: 16px; }
  .decktools button { flex: 1 1 110px; font-size: 14px; }
  .slide, .show-notes .slide { width: calc(100% - 24px); min-height: 0; height: auto; padding: 28px 22px; margin: 12px auto; }
  .slide h1, .slide.cover h1 { font-size: clamp(30px, 8vw, 42px); }
  .slide p, .slide .deck-lead { font-size: 17px; }
  .slidebrand { font-size: 10px !important; line-height: 1.65; }
  .slide dl > div { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .slide dd { font-size: 17px; }
  .slide .statement, .slide.cover .statement { font-size: clamp(24px, 6vw, 30px); }
  .slide .deck-byline, .slide .deck-contact { font-size: 14px; }
  .slidefoot { position: static; margin-top: 30px; padding-top: 18px; border-top: 1px solid #755388; flex-wrap: wrap; gap: 10px; font-size: 11px; }
  .slidefoot span:last-child { margin-left: auto; white-space: nowrap; }
  .slide .notes p { font-size: 14px; }
  .finance-top { flex-direction: column; gap: 20px; }
  .slide .cash-bridge { font-size: 14px; table-layout: fixed; }
  .slide .cash-bridge td:first-child { width: 65%; overflow-wrap: anywhere; }
  .slide .cash-bridge td:last-child { width: 35%; white-space: normal; overflow-wrap: anywhere; }
  .controls { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; gap: 16px; background: #2d1647; border-top: 1px solid #9474a9; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .controls button { min-width: 90px; font-size: 15px; }
}
@media screen and (max-width: 600px) {
  .programme-filters, .model-controls, .model-inputs, .travel-mini-grid, .form-pair { grid-template-columns: minmax(0, 1fr); }
  .timeline { grid-template-columns: minmax(0, 1fr); }
  .actions > .button { width: 100%; }
}
@media screen and (max-width: 380px) {
  .brand { font-size: 19px; letter-spacing: 4px; }
  .brand small { letter-spacing: 3px; }
  .model-statistics { grid-template-columns: minmax(0, 1fr); }
  .slide { padding: 24px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print { .skip-link, .mobile-table-hint, .map-touch-toggle { display: none !important; } }
