/* The shell belongs only to /v2/. Its documents keep their own scrolling regions. */
:root {
  --rail-bg:#25262a; --welcome-bg:#202124; --on-rail:#fff;
  --paper:#f7f7f7; --surface:#fff; --ink:#242528; --sub:#606267; --rule:#dadbdd;
  --rail:202px; --pad:clamp(16px,2.2vw,36px);
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.edition[data-theme="dark"] { --paper:#191a1c; --surface:#242528; --ink:#f4f4f5; --sub:#c0c1c4; --rule:#444549; }
.edition body { height:100%; height:100dvh; margin:0; padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) calc(var(--rail) + env(safe-area-inset-left));   /* the site runs edge to edge on iPhones, so keep pages clear of the clock, notch and home bar */ box-sizing:border-box; color:var(--ink); background:var(--paper); font:16px/1.45 var(--sans); }
.edition [hidden] { display:none !important; }
.edition :is(a,button):focus-visible { outline:3px solid #6d9dff !important; outline-offset:-3px; }
.edition #rail {
  position:fixed; inset:0 auto 0 0; z-index:16; width:var(--rail); display:flex; flex-direction:column;
  padding:calc(26px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left)); background:var(--rail-bg); color:#f4f4f5; box-sizing:border-box;
}
.identity { display:flex; align-items:center; gap:9px; font-family:var(--sans); color:inherit; }
#rail .identity { padding:2px 8px 18px 10px; justify-content:flex-start; border-bottom:1px solid #ffffff29; }   /* the logo's left edge lines up with the menu icons; a line under it */
.identity b { font-size:25px; line-height:1; letter-spacing:-.065em; font-weight:800; }
.identity em { border:1px solid #87898d; border-radius:4px; padding:1px 5px; color:#ececef; font:600 11px/1.5 ui-monospace,monospace; }
.edition .identity em { display:none; }
.wing { display:inline-block; width:31px; height:24px; flex:none; background:var(--on-rail); clip-path:polygon(0 4%,100% 4%,89% 26%,12% 26%,19% 38%,83% 38%,72% 60%,31% 60%,39% 72%,66% 72%,54% 96%,46% 96%); }
.tval-logo { display:block; flex:none; width:40px; height:40px; }
.welcome .title-row { display:flex; align-items:center; gap:clamp(14px,2vw,26px); margin:12px 0 20px; }
.welcome .title-row .tval-logo { width:clamp(48px,5vw,90px); height:auto; aspect-ratio:1; }
.edition #landing .title-row h1 { margin:0; white-space:nowrap; font-size:clamp(22px,2.8vw,60px); }   /* one line beside the logo */
.rail-links { flex:1; min-height:0; overflow:auto; scrollbar-width:thin; scrollbar-color:#6b6c71 transparent; }
.rail-links section { margin:22px 0 0; }
.rail-links h2 { margin:0 11px 9px; color:#bcbec3; font:600 11px/1.4 var(--sans); letter-spacing:.13em; text-transform:uppercase; }
.rail-links button { display:flex; align-items:center; gap:11px; min-height:38px; width:100%; padding:8px 10px; border:0; border-radius:6px; color:#ededee; background:transparent; text-align:left; cursor:pointer; font:550 14px/1.3 var(--sans); }
.rail-links button svg { width:17px; height:17px; flex:none; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round; }
.rail-links button:hover { background:#ffffff12; }
.rail-links button[aria-current] { color:#214b9a; background:#e6edfc; font-weight:700; }
.rail-links .count { margin-left:auto; color:#fff; background:#a63529; border-radius:12px; padding:1px 6px; font-size:12px; }
.edition #rail-sync { display:block; min-height:0; margin:0; padding:0; border:0; color:#bcbec3; font:500 12px/1.4 var(--sans); white-space:nowrap; }
.build-no { margin:0; font:500 11px/1 var(--sans); letter-spacing:.06em; color:#8d9096; }
#rail .rail-meta { order:99; display:flex; align-items:center; justify-content:space-between; gap:10px; margin:12px 5px 0; }   /* very bottom of the side menu: build number, then Synced */
#rail .rail-meta .build-no { margin:0; }
.work-head .head-logo { flex:none; display:inline-flex; }   /* small logo between the menu button and the page title */
.work-head .head-logo img { display:block; width:34px; height:34px; }
.work-head .head-logo .hl-dark, html[data-theme="dark"] .work-head .head-logo .hl-light { display:none; }
html[data-theme="dark"] .work-head .head-logo .hl-dark { display:block; }
.work-head .head-build { margin-left:auto; padding-right:4px; color:var(--sub); font:500 11px/1 var(--sans); letter-spacing:.06em; }   /* top bar: the build number on the right */
.edition #landing p.build-no { font:500 11px/1 var(--sans); color:#8d9096; max-width:none; margin:0; }
.rail-footer { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin:14px 5px 0; }
html.edition[data-look] .rail-footer :is(#themeToggle,[data-out]) { display:block; width:100%; min-width:0; height:32px; margin:0 !important; padding:0 7px !important; border:1px solid #ffffff35 !important; border-radius:6px !important; background:#ffffff0d !important; color:#ededee !important; box-shadow:none !important; cursor:pointer; font:600 12px var(--sans) !important; }
html.edition[data-look] .rail-footer :is(#themeToggle,[data-out]):hover { background:#ffffff18 !important; }
.edition-link { display:flex; justify-content:space-between; color:#d7d8da; margin:16px 5px 0; padding:14px 5px 0; border-top:1px solid #ffffff29; text-decoration:none; font:500 13px var(--sans); }
.edition-link:hover { text-decoration:underline; }
.edition #rail-open,.edition #rail-close,.edition #scrim { display:none; }
html.edition[data-look][data-version] body:has(.panels) > nav {
  display:flex; align-items:center; flex:none; gap:10px; height:84px; min-height:0; padding:0 var(--pad);
  background:var(--surface) !important; color:var(--ink); border:0; border-bottom:1px solid var(--rule); box-shadow:none; z-index:5;
}
.edition nav > :is(.brand,#l2nav,#burger,#burgerlabel,[role=tab]) { display:none !important; }
.edition nav #tval-status { display:none !important; }
.work-head { display:flex; align-items:center; gap:13px; flex:1; min-width:0; }
.work-title { min-width:0; }
.work-title span { color:var(--sub); font-size:.74rem; letter-spacing:.08em; font-weight:600; text-transform:uppercase; }
.work-title h1 { margin:2px 0 0; color:var(--ink); font:700 clamp(25px,2.6vw,38px)/1.08 var(--sans); letter-spacing:-.035em; }
.calendar-head-icon { display:none; }
.work-title-group { display:contents; }
.work-title { position:relative; }
.work-intro { position:absolute; left:0; top:calc(100% + 5px); width:max-content; max-width:calc(100vw - 520px); margin:0; color:var(--sub); font:400 15px/1.45 var(--sans); letter-spacing:0; text-transform:none; white-space:normal; }   /* the page's description, under the title; placed on its own so the icon and title stay put */
@media (max-width:1279px) { .work-intro { display:none !important; } }   /* smaller screens: the bar is too short, the page shows its own grey line */
.work-title :is(span,h1) { white-space:nowrap; }   /* page title: always two lines, one each (menu group, then page name), on every page and screen */
html.edition[data-look][data-version] body:has(:is(#f-weekends,#f-preassign,#f-documents,#f-crewaccounts,#f-crew2,#f-reports2,#f-profile,#f-myflying,#f-wishlist,#f-maintenance,#f-attendance,#f-briefing,#f-reports).on):has(.calendar-head-icon) > nav {
  height:clamp(108px, 12vw, 170px);
  background:linear-gradient(90deg, var(--surface) 0%, color-mix(in srgb, var(--surface) 96%, transparent) 48%, transparent 96%),
    url("../assets/banners/preassign.jpg?v=3") right center / cover no-repeat !important;
}
body:has(:is(#f-programme,#f-weekends,#f-preassign,#f-documents,#f-crewaccounts,#f-crew2,#f-reports2,#f-profile,#f-myflying,#f-aircraft,#f-wishlist,#f-maintenance,#f-attendance,#f-briefing,#f-reports).on) .work-head { --calendar-icon-size:clamp(34px, 4vw, 52px); }
body:has(:is(#f-programme,#f-weekends,#f-preassign,#f-documents,#f-crewaccounts,#f-crew2,#f-reports2,#f-profile,#f-myflying,#f-aircraft,#f-wishlist,#f-maintenance,#f-attendance,#f-briefing,#f-reports).on) .work-title {
  display:grid; align-content:center; min-height:var(--calendar-icon-size);
}
body:has(:is(#f-programme,#f-weekends,#f-preassign,#f-documents,#f-crewaccounts,#f-crew2,#f-reports2,#f-profile,#f-myflying,#f-aircraft,#f-wishlist,#f-maintenance,#f-attendance,#f-briefing,#f-reports).on) .work-title span { font-size:.74rem; line-height:1; }
body:has(:is(#f-programme,#f-weekends,#f-preassign,#f-documents,#f-crewaccounts,#f-crew2,#f-reports2,#f-profile,#f-myflying,#f-aircraft,#f-wishlist,#f-maintenance,#f-attendance,#f-briefing,#f-reports).on) .work-title span::before { content:none; }
body:has(:is(#f-programme,#f-weekends,#f-preassign,#f-documents,#f-crewaccounts,#f-crew2,#f-reports2,#f-profile,#f-myflying,#f-aircraft,#f-wishlist,#f-maintenance,#f-attendance,#f-briefing,#f-reports).on) .work-title h1 { margin:0; line-height:1; }
body:has(:is(#f-programme,#f-weekends,#f-preassign,#f-documents,#f-crewaccounts,#f-crew2,#f-reports2,#f-profile,#f-myflying,#f-aircraft,#f-wishlist,#f-maintenance,#f-attendance,#f-briefing,#f-reports).on):has(.calendar-head-icon) .work-head .head-logo { display:none; }
body:has(:is(#f-programme,#f-weekends,#f-preassign,#f-documents,#f-crewaccounts,#f-crew2,#f-reports2,#f-profile,#f-myflying,#f-aircraft,#f-wishlist,#f-maintenance,#f-attendance,#f-briefing,#f-reports).on) .calendar-head-icon {
  display:grid; place-items:center; flex:none;
  width:var(--calendar-icon-size); aspect-ratio:1;
  border-radius:8px; background:var(--rail-bg); color:var(--on-rail);
}
.calendar-head-icon svg {
  width:62%; height:62%; fill:none; stroke:currentColor; stroke-width:1.65;
  stroke-linecap:round; stroke-linejoin:round;
}
@supports (text-box:trim-both cap alphabetic) {
  body:has(:is(#f-programme,#f-weekends,#f-preassign,#f-documents,#f-crewaccounts,#f-crew2,#f-reports2,#f-profile,#f-myflying,#f-aircraft,#f-wishlist,#f-maintenance,#f-attendance,#f-briefing,#f-reports).on) .work-title-group { display:grid; grid-auto-flow:column; gap:inherit; }
  body:has(:is(#f-programme,#f-weekends,#f-preassign,#f-documents,#f-crewaccounts,#f-crew2,#f-reports2,#f-profile,#f-myflying,#f-aircraft,#f-wishlist,#f-maintenance,#f-attendance,#f-briefing,#f-reports).on) .work-title { min-height:0; }
  body:has(:is(#f-programme,#f-weekends,#f-preassign,#f-documents,#f-crewaccounts,#f-crew2,#f-reports2,#f-profile,#f-myflying,#f-aircraft,#f-wishlist,#f-maintenance,#f-attendance,#f-briefing,#f-reports).on) .work-title span { text-box:trim-start cap alphabetic; line-height:inherit; }
  body:has(:is(#f-programme,#f-weekends,#f-preassign,#f-documents,#f-crewaccounts,#f-crew2,#f-reports2,#f-profile,#f-myflying,#f-aircraft,#f-wishlist,#f-maintenance,#f-attendance,#f-briefing,#f-reports).on) .work-title h1 { text-box:trim-end cap alphabetic; margin-top:2px; line-height:1.08; }
  body:has(:is(#f-programme,#f-weekends,#f-preassign,#f-documents,#f-crewaccounts,#f-crew2,#f-reports2,#f-profile,#f-myflying,#f-aircraft,#f-wishlist,#f-maintenance,#f-attendance,#f-briefing,#f-reports).on) .calendar-head-icon { height:auto; width:auto; align-self:stretch; position:relative; }
  body:has(:is(#f-programme,#f-weekends,#f-preassign,#f-documents,#f-crewaccounts,#f-crew2,#f-reports2,#f-profile,#f-myflying,#f-aircraft,#f-wishlist,#f-maintenance,#f-attendance,#f-briefing,#f-reports).on) .calendar-head-icon svg { position:absolute; inset:0; margin:auto; }
}
body:has(:is(#f-programme,#f-weekends,#f-preassign,#f-documents,#f-crewaccounts,#f-crew2,#f-reports2,#f-profile,#f-myflying,#f-aircraft,#f-wishlist,#f-maintenance,#f-attendance,#f-briefing,#f-reports).on) .head-build {
  padding:4px 6px; border:1px solid var(--rule); border-radius:6px; background:var(--surface);
}
html.edition[data-look][data-version] body:has(:is(#f-programme,#f-aircraft).on) > nav { height:50px; }
@media (min-width:1050px) { html.edition[data-look][data-version] body:has(:is(#f-programme,#f-aircraft).on) > nav { height:68px; } }   /* wide screens: Programme has the top bar too, kept short so the grid stays big */
/* Programme, sideways phones and wider screens: the date picker and Actions sit in the top bar, on the title's row.
   The date is centred in the space between the title and the buttons on the right. */
html.edition.l2inbar[data-look][data-theme] nav > #l2day, html.edition.l2inbar[data-look] nav > #l2day { flex:1 1 auto; align-self:stretch; min-width:0; height:auto; min-height:0; margin:0; padding:0; border:0 !important; background:transparent !important; gap:4px; }
html.edition.l2inbar[data-look] nav > #l2day[hidden] { display:none; }
html.edition.l2inbar[data-look] nav > #l2day #l2prev { margin-left:auto; }
html.edition.l2inbar[data-look] nav > #l2day .programme-tools { position:static; transform:none; margin-left:auto; pointer-events:auto; }
html.edition.l2inbar[data-look] nav > #l2day #l2lc { position:static; transform:none; margin:0 0 0 8px; }
html.edition.l2inbar body:has(#f-programme.on) .work-head { flex:0 1 auto; }
/* The date always sits in the middle of the page area (right of the side menu), whatever buttons show on the right (26 Nov 2026).
   Small sideways phones keep it between the title and the buttons, where the title would otherwise be in the way. */
@media (min-width:1050px), (orientation:landscape) and (max-height:560px) and (min-width:821px) {
  html.edition.l2inbar[data-version] body:has(#f-programme.on) > nav { position:relative; }
  html.edition.l2inbar[data-look][data-theme] nav > #l2day, html.edition.l2inbar[data-look] nav > #l2day { position:absolute; inset:0; padding:0 var(--pad); display:grid; grid-template-columns:minmax(0,1fr) auto auto auto minmax(0,1fr); align-items:center; gap:4px; pointer-events:none; }
  html.edition.l2inbar[data-look] nav > #l2day[hidden] { display:none; }
  html.edition.l2inbar[data-look] nav > #l2day > * { pointer-events:auto; grid-row:1; }
  html.edition.l2inbar[data-look] nav > #l2day #l2prev { grid-column:2; margin:0; }
  html.edition.l2inbar[data-look] nav > #l2day #l2date { grid-column:3; }
  html.edition.l2inbar[data-look] nav > #l2day #l2next { grid-column:4; }
  html.edition.l2inbar[data-look] nav > #l2day #l2lc { grid-column:5; justify-self:start; margin-left:10px; }
  html.edition.l2inbar[data-look] nav > #l2day .programme-tools { grid-column:5; justify-self:end; margin:0; }
}
@media (orientation:landscape) and (max-height:560px) and (max-width:820px) {   /* small sideways phones: the draft badge shrinks to its pencil and the year goes, so everything fits on one row */
  html.edition.l2inbar[data-look] nav > #l2day #l2note { width:32px; padding:0; }
  html.edition.l2inbar[data-look] nav > #l2day #l2note strong, html.edition.l2inbar[data-look] nav > #l2day #l2yr { display:none; }
}
html.edition[data-look] nav :is(#themeToggle,#tval-status button) {
  background:var(--surface) !important; border:1px solid var(--rule) !important; border-radius:6px !important;
  box-shadow:none !important; color:var(--ink) !important; height:32px; margin:0 !important; padding:0 10px !important; opacity:1; font:600 13px var(--sans) !important;
}
.edition #tval-status { color:var(--sub); opacity:1; }
html.edition[data-look] #l2day { position:relative; justify-content:center; gap:4px; height:auto; min-height:51px; padding:4px var(--pad); box-sizing:border-box; background:var(--paper); border-color:var(--rule); }
html.edition[data-look] #l2day button { color:var(--ink); background:var(--surface); border-color:var(--rule); border-radius:6px; opacity:1; }
html.edition #l2day .l2hop { width:34px; justify-content:center; padding:0; }
html.edition #l2day .l2hop .w { display:none; }
html.edition[data-look] #l2day .ar { color:var(--ink); }
html.edition[data-look] #l2day #l2date { color:var(--ink); font:650 16px var(--sans); }
html.edition[data-look] #l2day .programme-tools { position:absolute; right:var(--pad); top:50%; transform:translateY(-50%); display:flex; align-items:center; gap:6px; pointer-events:none; }
html.edition[data-look] #l2day .programme-tools button { pointer-events:auto; }
html.edition[data-look] #l2day #l2lock { display:none !important; }   /* no dot beside the date: the padlock / lock chip shows a locked day */
html.edition[data-look] #l2day #l2actb { order:9; position:static; height:32px; transform:none; margin:0; color:#fff; background:var(--rail-bg); border:0; }
html.edition[data-look] #l2day #l2warn { display:inline-flex; align-items:center; justify-content:center; gap:5px; min-width:44px; height:32px; margin:0; padding:0 12px; border:1px solid #e3a9a5; border-radius:999px; background:#fbe3e1; color:#8a1f1f; box-shadow:none; font:750 13px var(--sans); cursor:pointer; }
html.edition[data-look] #l2day #l2warn strong { font:inherit; }
html.edition[data-look] #l2day #l2note { display:inline-flex; align-items:center; justify-content:center; gap:5px; height:32px; margin:0; padding:0 12px; border:1px solid #e0b36b; border-radius:999px; background:#fdf0dc; color:#7a4a0c; font:800 13px var(--sans); white-space:nowrap; }
html.edition[data-look] #l2day #l2note[hidden] { display:none; }
html.edition[data-look] #l2day #l2lockb { display:none; width:32px; height:32px; padding:0; border:1px solid #f2b01e; border-radius:999px; background:#ffc428; color:#14283a; align-items:center; justify-content:center; }
/* the padlock swings open while the day is unlocked, and shut again when it locks (Simon, 27 Nov 2026) */
html.edition[data-look] #l2day #l2lockb svg { overflow:visible; }
html.edition[data-look] #l2day #l2lockb .shk { transform-box:view-box; transform-origin:16px 11px; transition:transform .55s cubic-bezier(.3,1.6,.5,1); }
html.edition[data-look] #l2day #l2lockb.open .shk { transform:translateY(-2.5px) rotate(28deg); }
@media (prefers-reduced-motion: reduce) { html.edition[data-look] #l2day #l2lockb .shk { transition:none; } }
html.edition[data-look] #l2day:has(:is(#l2warn,#l2note):not([hidden])) #l2lc { display:none !important; }   /* with the ⚠ or draft badge showing there's no room for the lock chip: it becomes a padlock beside them */
html.edition[data-look] #l2day:has(:is(#l2warn,#l2note):not([hidden])) #l2lockb:not([hidden]) { display:inline-flex; }
@media (max-width:1199px) {   /* phones sideways, iPads, small laptops: the full lock chip would cover the date, so it is always the padlock */
  html.edition[data-look] #l2day #l2lc { display:none !important; }
  html.edition[data-look] #l2day #l2lockb:not([hidden]) { display:inline-flex; }
}
html.edition[data-look] #l2day #l2note strong { font:inherit; }
html.edition[data-theme="dark"] #l2day #l2note { border-color:#8a6a35; background:#3f3220; color:#ffd59a; }
html.edition[data-theme="dark"] #l2day #l2warn { border-color:#824f4b; background:#442a2a; color:#ffb7b0; }
html.edition[data-look] #l2day #l2lc { position:absolute; right:calc(var(--pad) + 92px); top:50%; transform:translateY(-50%); margin:0; }
.edition .panels { min-width:0; }
.edition #landing {
  z-index:30; display:grid; grid-template-columns:minmax(320px,.7fr) 1.3fr; padding:0; gap:0; text-align:left;
  align-items:stretch; justify-content:stretch; background:var(--welcome-bg); color:#fafafa; overflow:auto;
}
.welcome { display:flex; flex-direction:column; padding:clamp(24px,5vw,90px); padding-right:clamp(24px,4vw,68px); padding-left:max(clamp(24px,5vw,90px), env(safe-area-inset-left)); }
.welcome-copy { margin:auto 0; padding:50px 0; }
.edition #landing .welcome-copy p:first-child { color:#c4d4f7; font-size:.88rem; font-weight:650; letter-spacing:.09em; text-transform:uppercase; }
.edition #landing h1 { font:550 clamp(52px,7vw,110px)/1 var(--sans); letter-spacing:-.075em; margin:12px 0 20px; }
.edition #landing p { font:400 17px/1.55 var(--sans); color:#d6d7d9; max-width:28ch; }
.edition #landing button { display:block; padding:13px 22px; margin:28px 0 16px; border:0; border-radius:6px; background:var(--on-rail); color:var(--welcome-bg); font:700 16px var(--sans); }
.edition #landing p.photo-credit { grid-column:2; grid-row:1; align-self:end; justify-self:stretch; position:relative; z-index:2; display:flex; align-items:center; gap:7px; margin:0; max-width:none; padding:34px max(16px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) 16px; background:linear-gradient(to bottom, transparent, rgba(12,13,15,.78)); color:#eceef0; font:500 12px/1.45 var(--sans); letter-spacing:.02em; pointer-events:none; text-shadow:0 1px 2px rgba(0,0,0,.5); }
.photo-credit svg { width:13px; height:13px; flex:none; opacity:.9; align-self:flex-start; margin-top:2px; }
.photo-credit span { max-width:70ch; }
.welcome-photo { grid-column:2; grid-row:1; position:relative; background:#57585a var(--login-photo, url("../assets/banners/crew-room-login.jpg")) center center/cover no-repeat; }
.welcome-photo::after { content:""; position:absolute; inset:0; background:var(--next-login-photo) center/cover no-repeat; opacity:0; transition:opacity 1s; pointer-events:none; }
.welcome-photo.login-photo-fading::after { opacity:1; }
@media (max-width:1049px) {
  .edition body { padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  html.edition[data-look][data-version] body:has(.panels) > nav { height:67px; gap:6px; }
  html.edition[data-look][data-version] body:has(:is(#f-programme,#f-aircraft).on) > nav { height:50px; }
  .edition #rail { width:min(285px,86vw); transform:translateX(-101%); visibility:hidden; z-index:19; }
  .edition .drawer-open #rail { transform:none; visibility:visible; }
  .edition #rail-open,.edition #rail-close { display:inline-grid; place-content:center; width:42px; height:42px; min-width:42px; padding:0; margin:0; opacity:1; flex:none; border:1px solid var(--rule); border-radius:6px; background:var(--surface); color:var(--ink); cursor:pointer; }
  .edition #rail-open span { width:16px; height:2px; margin:1.5px 0; background:currentColor; }
  .edition #rail-close { position:absolute; top:calc(17px + env(safe-area-inset-top)); right:10px; border:0; background:transparent; color:white; font-size:26px; }
  .edition .drawer-open #scrim { display:block; position:fixed; inset:0; z-index:18; margin:0; border:0; background:#191a1c70; }
  .rail-links button { min-height:44px; }
  .work-title h1 { font-size:24px; }
}
@media (max-width:620px) {
  :root { --pad:12px; }
  .edition #landing { grid-template-columns:1fr; overflow:hidden; grid-template-rows:minmax(0,1fr) 50%; inset:-80px 0; }   /* reaches 80px past the top and bottom so Safari's clock strip and the strip under its bar are covered too; the photo still starts mid-screen */
  html:has(#landing:not([hidden])), html:has(#landing:not([hidden])) body { background:#202124; }
  .welcome { padding:calc(80px + max(24px, env(safe-area-inset-top))) 24px 24px; }
  .welcome-copy { padding:20px 0; }
  .edition #landing p.photo-credit { grid-column:1; grid-row:2; padding-bottom:calc(80px + max(12px, env(safe-area-inset-bottom) + 6px)); }
  .welcome-photo, .welcome-photo::after { background-position:center bottom; }   /* bottom half of the screen; the photo keeps its shape and stays centred, sitting on the bottom edge */
  .welcome-photo { grid-column:1; grid-row:2; }
  .welcome .title-row { position:relative; top:20px; gap:12px; margin:10px 0 10px; }   /* centred visually between the eyebrow and sign-in button */
  .welcome .title-row .tval-logo { width:16vw; max-width:96px; }
  .edition #landing .title-row h1 { white-space:nowrap; font-size:min(52px, calc((84vw - 60px) / 7.6)); }   /* one line beside the logo, scaled to the screen width */
  .edition #landing button { position:relative; top:30px; margin:24px 0 16px; }   /* equal visual spacing below the logo and title */
  .work-head { gap:8px; }
  .work-title span { display:block; font-size:11px; }   /* phones: the menu label, smaller */
  .work-title h1 { font-size:20px; }
  html.edition[data-look] #l2day { min-height:46px; flex-wrap:wrap; padding-block:4px; }
  html.edition[data-look] #l2day #l2date { font-size:14px; }
  html.edition[data-look] #l2day #l2lc { display:none !important; }   /* phones: the lock chip would cover the date, so it shows as a padlock on the right instead */
  html.edition[data-look] #l2day #l2lockb:not([hidden]) { display:inline-flex; }
  html.edition[data-look] #l2day .l2hop { width:30px; }
  html.edition[data-look] #l2day { justify-content:center; }                                   /* phone: the date always in the middle */
  html.edition[data-look] #l2day .programme-tools { left:4px; right:4px; justify-content:flex-start; }   /* badges (padlock, ⚠, ✎) on the left, Actions on the right */
  html.edition[data-look] #l2day #l2actb { padding-inline:8px; margin-left:auto; }
  html.edition[data-look] #l2day #l2warn { padding-inline:8px; }
  html.edition[data-look] #l2day #l2note { height:32px; width:32px; padding:0; font-size:14px; }   /* phone: just the pencil, so it fits beside the date; tapping it opens the full message */
  html.edition[data-look] #l2day #l2note strong { display:none; }
  html.edition[data-look] #l2day .programme-tools { gap:4px; }
  html.edition[data-look] #l2day:has(#l2warn:not([hidden])):has(:is(#l2note,#l2lockb):not([hidden])) #l2yr { display:none; }   /* several badges on the left: drop the year so the date stays clear in the middle */
}
@media (max-width:620px) and (max-height:700px) and (orientation:portrait) {   /* short phones: tighter spacing so the top half still breathes */
  .welcome { padding:96px 20px 18px; }
  .welcome-copy { padding:0; }
  .edition #landing .title-row { margin:6px 0 10px; }
  .edition #landing p { font-size:15px; line-height:1.4; }
  .edition #landing button { margin:14px 0 0; padding:11px 20px; font-size:15px; }
}
@media (orientation:landscape) and (max-height:560px) {   /* sideways phones: everything fits on one screen, no scrolling */
  .edition #landing { overflow:hidden; grid-template-columns:minmax(300px,.9fr) 1.1fr; }
  .welcome { padding:max(16px, env(safe-area-inset-top)) 24px max(14px, env(safe-area-inset-bottom)); padding-left:max(24px, env(safe-area-inset-left)); }
  .welcome .title-row { margin:6px 0 8px; gap:12px; }
  .welcome .title-row .tval-logo { width:clamp(44px,13vh,60px); }
  .welcome-copy { padding:8px 0; }
  .edition #landing .welcome-copy p:first-child { font-size:.72rem; }
  .edition #landing h1 { font-size:clamp(30px,8vh,44px); margin:6px 0 8px; }
  .edition #landing p { font-size:14px; line-height:1.4; max-width:34ch; }
  .edition #landing button { margin:12px 0 0; padding:10px 18px; font-size:14px; }
}
@media (max-width:390px) {
  html.edition[data-look] nav :is(#themeToggle,#tval-status button) { padding:0 6px !important; font-size:12px !important; }
  .work-title h1 { font-size:18px; }
}
/* Home-screen app on a phone: a little space above the header, so the iPhone's own soft fade under the clock falls on empty space, not on the page title (Simon, 26 Nov 2026) */
@media (display-mode: standalone) and (max-width:1049px) {
  .edition body { padding-top:calc(env(safe-area-inset-top) + 16px); }
  .edition body::before { content:""; position:fixed; top:0; left:0; right:0; height:calc(env(safe-area-inset-top) + 16px); background:var(--surface); z-index:6; pointer-events:none; }   /* the strip above the header is the header's own white (dark grey in dark mode), so the top reads as one clean block (Simon, 26 Nov 2026) */
}

/* Briefing slideshow (29 Nov 2026): while presenting, every menu and bar is hidden and the Briefing page fills the whole screen */
html.presenting body > :not(.panels):not(script):not(style) { display:none !important; }
html.presenting .panels > :not(#f-briefing) { display:none !important; }
html.presenting #f-briefing { position:fixed !important; inset:0 !important; width:100vw !important; height:100vh !important; height:100dvh !important; max-width:none !important; max-height:none !important; margin:0 !important; border:0 !important; border-radius:0 !important; z-index:2147483000 !important; display:block !important; visibility:visible !important; opacity:1 !important; transform:none !important; }
html.presenting, html.presenting body { overflow:hidden !important; background:#191a1c !important; }
