/* ==========================================================================
   Aviation South West — 2026 design system
   ========================================================================== */

:root {
  --navy-950: #041021;
  --navy-900: #06162b;
  --navy-800: #0b2545;
  --navy-700: #12355f;
  --blue-700: #084f91;
  --blue-600: #0b63b3;   /* logo blue */
  --blue-500: #1a7fd6;
  --blue-300: #7cb8ec;
  --sky-100: #e4effa;
  --sky-50:  #f3f8fd;
  --ink:     #0f1b2d;
  --body:    #33435a;
  --muted:   #5f6f84;
  --line:    #e1e8f0;
  --white:   #ffffff;
  --silver:  #9b9b9b;   /* logo grey */

  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Tight", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgb(6 22 43 / .06), 0 2px 8px rgb(6 22 43 / .05);
  --shadow:    0 2px 4px rgb(6 22 43 / .04), 0 12px 32px -8px rgb(6 22 43 / .14);
  --shadow-lg: 0 24px 60px -16px rgb(6 22 43 / .28);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --container: 1800px; /* same width as the admin portal */
  --gutter: clamp(1rem, 2.5vw, 2.5rem);
  --header-h: 100px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--blue-600); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-700); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 5.2vw, 4.25rem); font-weight: 750; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 650; }
p { margin: 0 0 1em; text-wrap: pretty; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--blue-600); color: #fff; }

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--navy-900); color: #fff; padding: .75rem 1rem; border-radius: var(--radius-sm); }
.skip-link:focus { top: 1rem; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container.narrow { max-width: 860px; }

.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.15em; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--blue-600); --btn-fg: #fff; --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .8em 1.35em;
  font: 600 .975rem/1.1 var(--font);
  letter-spacing: .005em;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1.5px solid var(--btn-bd); border-radius: 999px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), background-color .2s, box-shadow .25s var(--ease), color .2s, border-color .2s;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); }
.btn .icon { transition: transform .25s var(--ease); }
.btn:hover .icon:last-child { transform: translateX(3px); }
.btn-primary { box-shadow: 0 8px 20px -8px rgb(11 99 179 / .6); }
.btn-primary:hover { --btn-bg: var(--blue-700); box-shadow: 0 12px 26px -10px rgb(11 99 179 / .7); }
.btn-outline { --btn-bg: transparent; --btn-fg: var(--blue-600); --btn-bd: var(--blue-600); }
.btn-outline:hover { --btn-bg: var(--blue-600); --btn-fg: #fff; }
.btn-light { --btn-bg: #fff; --btn-fg: var(--navy-800); }
.btn-light:hover { --btn-bg: var(--sky-100); --btn-fg: var(--navy-900); }
.btn-ghost-light { --btn-bg: rgb(255 255 255 / .08); --btn-fg: #fff; --btn-bd: rgb(255 255 255 / .4); backdrop-filter: blur(6px); }
.btn-ghost-light:hover { --btn-bg: rgb(255 255 255 / .18); --btn-bd: #fff; }
.btn-lg { padding: 1em 1.7em; font-size: 1.025rem; }
.btn-block { display: flex; width: 100%; }

/* ---------- Eyebrows & helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue-600); margin: 0 0 1rem;
}
.eyebrow::before { content: ""; width: 1.6rem; height: 2px; background: currentColor; border-radius: 2px; }
.eyebrow .icon { display: none; }
.eyebrow-light { color: var(--blue-300); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); line-height: 1.6; color: var(--body); }
.center-cta { display: flex; justify-content: center; margin-top: 3rem; }
.note-center { display: flex; gap: .6rem; align-items: center; justify-content: flex-start; text-align: left; color: var(--muted); margin-top: 2rem; }
.note-center .icon { color: var(--blue-600); }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy-900); color: rgb(255 255 255 / .78); font-size: .85rem; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 40px; }
.topbar-tag { display: flex; align-items: center; gap: .9rem; margin: 0; letter-spacing: .02em; }
.open-status { display: inline-flex; align-items: center; gap: .45rem; padding-left: .9rem; border-left: 1px solid rgb(255 255 255 / .25); color: inherit; text-decoration: none; transition: color .2s; }
.open-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e0605a; }
.open-status.is-open::before { background: #4cc37a; box-shadow: 0 0 0 3px rgb(76 195 122 / .25); }
.open-status.is-closing::before { background: #f5c542; box-shadow: 0 0 0 3px rgb(245 197 66 / .25); }
.open-status:hover { color: #fff; text-decoration: underline; }
.topbar-links { display: flex; align-items: center; gap: 1.25rem; }
.topbar-links a { display: inline-flex; align-items: center; gap: .45rem; color: inherit; text-decoration: none; transition: color .2s; }
.topbar-links a:hover { color: #fff; }
.topbar-links .icon { width: 15px; height: 15px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -12px rgb(6 22 43 / .18); }
.header-inner { display: flex; align-items: center; gap: 2rem; height: var(--header-h); }
.brand { flex: none; display: block; }
.brand img { height: 75px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav-list > li { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .6rem .8rem; border: 0; background: none; border-radius: 999px;
  font: 600 .935rem/1.2 var(--font); color: var(--ink);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.nav-link .icon { width: 14px; height: 14px; color: var(--muted); transition: transform .25s var(--ease); }
.nav-link:hover, .nav-link[aria-current="page"], .is-active > .nav-link { color: var(--blue-600); background: var(--sky-50); }
/* The arrow turns over only on the phone menu, where tapping opens and closes the list (on a computer it stays pointing down) */
@media (max-width: 1080px) { .has-menu > .nav-link[aria-expanded="true"] .icon { transform: rotate(180deg); } }

.menu {
  position: absolute; top: calc(100% + 10px); left: 50%;
  width: 340px; padding: .6rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translate(-50%, 6px);
  transition: opacity .2s, transform .25s var(--ease), visibility .2s;
}
.menu::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
.has-menu:hover > .menu, .has-menu.is-open > .menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu a { display: block; padding: .6rem .85rem; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-size: .935rem; line-height: 1.35; transition: background-color .15s, color .15s; }
.menu a:hover, .menu a[aria-current="page"] { background: var(--sky-50); color: var(--blue-600); }
.menu .menu-overview { display: flex; align-items: center; justify-content: space-between; font-weight: 650; color: var(--blue-600); background: var(--sky-50); margin-bottom: .35rem; }
.menu .menu-overview .icon { width: 16px; height: 16px; }
.nav-cta { padding: .7em 1.2em; }

.nav-toggle { display: none; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(88svh, 820px);
  display: grid; align-items: end;
  background: var(--navy-900) url("../img/front-page-website-1080x1080.jpg") center / cover;
  color: #fff;
}
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    /* Light shade: just enough behind the text on the left; the video stays bright */
    linear-gradient(90deg, rgb(4 16 33 / .6) 0%, rgb(4 16 33 / .38) 40%, rgb(4 16 33 / .08) 75%, transparent 100%),
    linear-gradient(0deg, rgb(4 16 33 / .45) 0%, transparent 40%);
}
.hero-content { position: relative; padding-block: clamp(6rem, 14vh, 9rem) clamp(5.5rem, 12vh, 8rem); max-width: var(--container); }
.hero h1 { color: #fff; max-width: 15ch; margin-bottom: 1.5rem; text-shadow: 0 2px 18px rgb(4 16 33 / .45); }
.hero-lead, .hero .eyebrow { text-shadow: 0 1px 12px rgb(4 16 33 / .55); }
.hero-lead { font-size: clamp(1.1rem, 1.7vw, 1.3rem); max-width: 40rem; color: rgb(255 255 255 / .86); margin-bottom: 2.25rem; }
.hero-lead strong { color: #fff; }
/* Homepage: white ASW logo instead of the heading, centred over the "Founded at…" paragraph */
.hero-intro { max-width: 40rem; }
/* Same font size as .hero-lead, so 25em = from the paragraph's left edge to the end of "Aviation" on its first line */
.hero .hero-logo { max-width: none; margin: 0 0 60px; text-align: left; line-height: 0; font-size: clamp(1.1rem, 1.7vw, 1.3rem); }
/* The content sits at the bottom of the video, so the big gap under the logo lifts it up; less top padding keeps the video the same height */
.hero-content:has(.hero-intro) { padding-top: 2.5rem; }
@media (max-width: 760px) { .hero .hero-logo { margin-bottom: 4rem; } }
.hero-logo img { display: inline-block; width: min(25em, 100%); height: auto; filter: drop-shadow(0 2px 14px rgb(4 16 33 / .45)); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; }
.hero-video-toggle {
  position: absolute; right: var(--gutter); bottom: 5.5rem;
  padding: .45rem .9rem; border-radius: 999px;
  background: rgb(255 255 255 / .1); color: rgb(255 255 255 / .85);
  border: 1px solid rgb(255 255 255 / .3); font: 500 .8rem var(--font); cursor: pointer;
  backdrop-filter: blur(6px);
}
.hero-video-toggle:hover { background: rgb(255 255 255 / .2); color: #fff; }

/* ---------- Stats ---------- */
.stats { position: relative; z-index: 2; margin-top: -3.5rem; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 0;
  max-width: calc(var(--container) - 2 * var(--gutter));
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 6vw, 4.75rem); }
/* Two white sections in a row: don't double the space between them */
.section:not(.section-tint):not(.section-dark) + .section:not(.section-tint):not(.section-dark) { padding-top: 0; }
.section-tint { background: var(--sky-50); }
.section-dark { background: radial-gradient(1200px 500px at 85% -10%, rgb(26 127 214 / .35), transparent 60%), var(--navy-900); color: rgb(255 255 255 / .82); }
.section-dark h2 { color: #fff; }
.section-head { max-width: 46rem; margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem); }
.section-head p:last-child { margin-bottom: 0; }
.section-head-center { margin-inline: auto; text-align: center; }
.section-head-center .eyebrow { justify-content: center; }
.section-head-row { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; }
.section-head h2 { margin-bottom: .4em; }
.section-head-wide { max-width: none; }

/* ---------- Pathway cards ---------- */
.pathways { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.pathway {
  position: relative; display: block; overflow: hidden; isolation: isolate;
  border-radius: var(--radius-lg); aspect-ratio: 16 / 9;
  text-decoration: none; color: #fff; box-shadow: var(--shadow);
  background: var(--navy-800);
}
.pathway img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: -2; transition: transform .8s var(--ease); }
.pathway::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgb(4 16 33 / 0) 35%, rgb(4 16 33 / .85) 100%); transition: background .4s; }
.pathway:hover img { transform: scale(1.05); }
.pathway-body { position: absolute; inset: auto 0 0 0; padding: 1.75rem 2rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.pathway h3 { color: #fff; font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin: 0; }
.pathway-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 650; white-space: nowrap; }
.pathway .pathway-link { padding: .5rem .95rem; border-radius: 999px; background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .3); backdrop-filter: blur(6px); transition: background .2s; }
.pathway:hover .pathway-link { background: #fff; color: var(--navy-800); }
.pathway:hover { color: #fff; }

/* ---------- Feature split ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.feature-reverse .feature-media { order: 2; }
.feature-media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 1; object-fit: cover; }
.checklist { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: .75rem; }
.checklist li { display: flex; gap: .75rem; align-items: flex-start; }
.checklist .icon { color: var(--blue-600); margin-top: .25rem; }
.ato-note { display: flex; gap: .85rem; align-items: flex-start; padding: 1.1rem 1.25rem; border-radius: var(--radius); background: var(--sky-50); border: 1px solid var(--sky-100); margin-top: 1.5rem; color: var(--ink); }
.ato-note .icon { color: var(--blue-600); width: 1.5rem; height: 1.5rem; margin-top: .1rem; }

/* ---------- Offer grid ---------- */
.offer-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.offer-grid li {
  display: flex; flex-direction: column; gap: 1rem;
  padding: 1.6rem; border-radius: var(--radius);
  background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .1);
  color: #fff; font-weight: 550; line-height: 1.45;
  transition: background .25s, border-color .25s, transform .3s var(--ease);
}
.offer-grid li:hover { background: rgb(255 255 255 / .09); border-color: rgb(124 184 236 / .45); transform: translateY(-3px); }
.offer-grid .icon { width: 2.6rem; height: 2.6rem; padding: .6rem; border-radius: 12px; background: rgb(26 127 214 / .25); color: var(--blue-300); }

/* ---------- Testimonials ---------- */
.carousel-controls { display: flex; gap: .5rem; }
.round-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: all .2s; }
.round-btn:hover { border-color: var(--blue-600); color: var(--blue-600); }
.testimonials {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(420px, 85%);
  gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: .5rem .25rem 1.5rem; margin: -.5rem -.25rem 0;
  scrollbar-width: thin; scrollbar-color: var(--sky-100) transparent;
}
.testimonial {
  scroll-snap-align: start; margin: 0;
  display: flex; flex-direction: column; gap: 1.25rem;
  padding: 2rem; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.testimonial .icon { width: 2rem; height: 2rem; color: var(--blue-600); opacity: .25; fill: currentColor; stroke: none; }
.testimonial blockquote { margin: 0; color: var(--ink); font-size: 1.04rem; line-height: 1.65; }

/* ---------- Airlines & RDPE ---------- */
/* "Our students are now flying with": logos scroll slowly in a loop (the list is repeated once so it joins up) */
.logo-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logo-track { display: flex; align-items: center; gap: clamp(2.5rem, 5vw, 4.5rem); width: max-content; margin: 0; padding: .75rem 0; list-style: none; animation: logo-scroll 55s linear infinite; }
.logo-track li { flex: none; }
.logo-track img { display: block; height: clamp(40px, 4vw, 58px); width: auto; max-width: 190px; object-fit: contain; }
/* (keeps scrolling under the mouse) */
@keyframes logo-scroll { to { transform: translateX(calc(-50% - clamp(2.5rem, 5vw, 4.5rem) / 2)); } }
@media (prefers-reduced-motion: reduce) {
  .logo-marquee { -webkit-mask-image: none; mask-image: none; }
  .logo-track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; row-gap: 1.5rem; }
  .logo-track li:nth-child(n + 17) { display: none; }
}
.rdpe { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2.5rem; align-items: center; width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--container) - 2 * var(--gutter)); margin-inline: auto; padding: 2rem 2.5rem; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.rdpe h3 { margin: 0; font-size: clamp(1.05rem, 1.6vw, 1.25rem); font-weight: 550; line-height: 1.5; color: var(--body); letter-spacing: 0; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--blue-700), var(--blue-500)); color: rgb(255 255 255 / .85); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: clamp(3rem, 6vw, 4.5rem); flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .35em; }
.cta-band p { margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .85rem; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(900px 420px at 90% 0%, rgb(26 127 214 / .45), transparent 65%), linear-gradient(160deg, var(--navy-800), var(--navy-950));
  color: rgb(255 255 255 / .82);
  padding-block: clamp(3.5rem, 8vw, 6rem) clamp(3rem, 6vw, 4.5rem);
}
.page-hero::after {
  /* subtle runway / heading lines motif */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgb(255 255 255 / .05) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / .05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
}
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.5rem); max-width: 22ch; }
.page-hero .lead { color: rgb(255 255 255 / .8); max-width: 48rem; margin-bottom: 0; }
.page-hero .hero-actions { margin-top: 2rem; }
.page-hero .container { position: relative; }
/* Partner logo in the banner (e.g. BGS): the logo tile keeps its own red */
.hero-badge { display: inline-flex; margin-top: 2rem; }
.hero-badge img { width: 64px; height: auto; border-radius: 6px; box-shadow: 0 6px 20px rgb(0 0 0 / .3); }
@media (min-width: 900px) {
  .hero-badge { position: absolute; right: var(--gutter); bottom: 0; margin: 0; }
  .hero-badge img { width: 104px; }
}
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .875rem; margin-bottom: 1.5rem; color: rgb(255 255 255 / .5); }
.breadcrumb a { color: rgb(255 255 255 / .75); text-decoration: none; }
.breadcrumb a:hover { color: #fff; text-decoration: underline; }
.breadcrumb > span:last-child { display: none; }

/* ---------- Course layout ---------- */
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; padding-block: clamp(3rem, 6vw, 5rem); }
.section > .course-layout { padding-block: 0; }
.course-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; min-width: 0; }
.block {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.block > :last-child { margin-bottom: 0; }
.block h2 {
  display: flex; align-items: center; gap: .75rem;
  font-size: clamp(1.25rem, 2vw, 1.5rem); margin-bottom: 1rem;
}
.block h2::before { content: ""; width: 4px; height: 1.1em; border-radius: 4px; background: linear-gradient(var(--blue-500), var(--blue-700)); flex: none; }
.block-highlight { background: var(--sky-50); border-color: var(--sky-100); }
.group-title {
  margin: 1.25rem 0 -.25rem; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-600);
  display: flex; align-items: center; gap: .75rem;
}
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.prose ul { list-style: none; padding: 0; margin: 0 0 1.25em; display: grid; gap: .6rem; }
.prose ul ul { margin: .6rem 0 0; padding-left: 1.6rem; gap: .45rem; }
.prose li { position: relative; padding-left: 1.75rem; }
.prose li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 1rem; height: 1rem; border-radius: 50%;
  background: var(--sky-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b63b3' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 60% no-repeat;
  transform: translateY(-.1em);
}
.prose ul ul li::before { width: .45rem; height: .45rem; top: .65em; left: .4rem; background: var(--blue-300); transform: none; }
.prose ul ul li { padding-left: 1.4rem; color: var(--muted); }

.modules { display: grid; gap: .75rem; margin-top: 1.25rem; }
.module { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; align-items: baseline; padding: 1rem 1.25rem; border-radius: var(--radius-sm); background: var(--sky-50); }
.module p { margin: 0; color: var(--ink); }
.module-num { font-weight: 700; color: var(--blue-600); font-size: .9rem; letter-spacing: .02em; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.dates { width: 100%; border-collapse: collapse; font-size: 1rem; }
.dates th, .dates td { padding: .9rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); }
.dates thead th { background: var(--sky-50); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dates tbody tr:last-child > * { border-bottom: 0; }
.dates tbody th { color: var(--blue-600); }
.dates td { color: var(--ink); font-weight: 550; }

.course-aside { position: sticky; top: calc(var(--header-h) + 1.5rem); display: grid; gap: 1.25rem; }
.aside-card { padding: 1.75rem; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.aside-title { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); margin-bottom: .6rem; }
.aside-cta { background: linear-gradient(160deg, var(--navy-800), var(--navy-950)); border: 0; color: rgb(255 255 255 / .78); box-shadow: var(--shadow); }
.aside-cta .aside-title { color: #fff; }
.aside-cta .btn { margin: 1.25rem 0 1rem; }
.aside-contact { display: flex; align-items: center; gap: .6rem; color: rgb(255 255 255 / .85); text-decoration: none; font-size: .925rem; padding: .3rem 0; margin: 0; word-break: break-word; }
a.aside-contact:hover { color: #fff; }
.aside-contact .icon { color: var(--blue-300); }
.aside-links { list-style: none; padding: 0; margin: 0; display: grid; }
.aside-links a { display: block; padding: .6rem 0; color: var(--body); text-decoration: none; border-bottom: 1px solid var(--line); font-size: .95rem; line-height: 1.4; transition: color .15s, padding .2s var(--ease); }
.aside-links li:last-child a { border-bottom: 0; }
.aside-links a:hover { color: var(--blue-600); padding-left: .35rem; }
.aside-links a[aria-current="page"] { color: var(--blue-600); font-weight: 650; }

/* ---------- Course listing cards ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.25rem; }
.course-card {
  position: relative; display: flex; flex-direction: column; gap: .75rem; min-height: 220px;
  padding: 1.75rem; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  text-decoration: none; color: var(--ink); overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s;
}
.course-card::after { content: ""; position: absolute; inset: auto -30% -60% auto; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, var(--sky-100), transparent 70%); transition: transform .5s var(--ease); z-index: 0; }
.course-card > * { position: relative; z-index: 1; }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue-300); color: var(--ink); }
.course-card:hover::after { transform: scale(1.4); }
.course-code { align-self: flex-start; padding: .3rem .7rem; border-radius: 999px; background: var(--navy-800); color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .06em; }
.course-card h2 { font-size: 1.3rem; margin: 0; flex: 1; }
.course-card .pathway-link { color: var(--blue-600); }

/* ---------- Flight experiences ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; align-items: stretch; }
.price-card { display: flex; flex-direction: column; gap: .5rem; padding: 2.25rem 2rem 2rem; border-radius: var(--radius-lg); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); text-align: center; }
.price-card-featured { border: 2px solid var(--blue-600); box-shadow: var(--shadow); transform: translateY(-8px); }
.price-duration { font-family: var(--font-display); font-size: 3.5rem; font-weight: 800; color: var(--navy-800); letter-spacing: -0.04em; line-height: 1; margin: 0; }
.price-duration span { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: .25rem; }
.price-card h3 { font-size: 1.05rem; margin: .5rem 0 0; flex: 1; }
.price-card h3 a { color: var(--ink); text-decoration: none; }
.price-card h3 a:hover { color: var(--blue-600); }
.price { font-size: 1.6rem; font-weight: 750; color: var(--blue-600); margin: .5rem 0 1.25rem; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.info-card { padding: 2rem; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); }
.info-card-wide { grid-column: 1 / -1; }
.info-card h2 { font-size: 1.35rem; margin-bottom: .75rem; }
.info-card p:last-child { margin-bottom: 0; }
.info-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--sky-100); color: var(--blue-600); margin-bottom: 1.25rem; }
.info-icon .icon { width: 22px; height: 22px; }
.callout { padding: 1rem 1.15rem; border-left: 3px solid var(--blue-600); background: var(--sky-50); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink); }

/* ---------- Voucher order dialog ---------- */
.order-dialog {
  width: min(560px, calc(100vw - 2rem)); max-height: calc(100svh - 2rem); padding: 0;
  border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); color: var(--body);
}
.order-dialog::backdrop { background: rgb(4 16 33 / .55); backdrop-filter: blur(3px); }
.order-dialog[open] { animation: dialog-in .3s var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.order-dialog form, .order-dialog > .enquiry-form { padding: clamp(1.5rem, 4vw, 2.25rem); }
.order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.order-head h2 { font-size: 1.5rem; margin: 0; }
.order-close { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer; }
.order-close:hover { color: var(--ink); border-color: var(--ink); }
.choice-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.choice-row-2 { grid-template-columns: 1fr 1fr; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--sky-50); font-size: .85rem; color: var(--muted); transition: border-color .15s, background .15s, box-shadow .15s; }
.choice strong { color: var(--ink); font-size: .95rem; }
.choice input:checked + span { border-color: var(--blue-600); background: #fff; box-shadow: 0 0 0 3px rgb(11 99 179 / .15); }
.choice input:focus-visible + span { outline: 3px solid var(--blue-500); outline-offset: 2px; }
.order-dialog .btn[disabled] { opacity: .7; cursor: progress; transform: none; }
@media (max-width: 520px) { .choice-row, .choice-row-2 { grid-template-columns: 1fr; } }

/* ---------- Voucher thank-you ---------- */
.voucher-result { padding: clamp(1.75rem, 4vw, 2.75rem); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); background: #fff; }
.voucher-state h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.voucher-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1.5rem 0 2rem; }
.voucher-summary div { padding: 1rem 1.15rem; border-radius: 12px; background: var(--sky-50); }
.voucher-summary dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.voucher-summary dd { margin: .2rem 0 0; font-size: 1.15rem; font-weight: 650; color: var(--ink); overflow-wrap: anywhere; }
.voucher-state .hint { margin-top: 1.25rem; }
.voucher-next { margin: 2rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.spinner { display: block; width: 40px; height: 40px; margin-bottom: 1.25rem; border-radius: 50%; border: 4px solid var(--sky-100); border-top-color: var(--blue-600); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 520px) { .voucher-summary { grid-template-columns: 1fr; } }

/* ---------- Fleet ---------- */
.fleet-tabs { display: inline-flex; gap: .35rem; padding: .35rem; border-radius: 999px; background: var(--sky-50); border: 1px solid var(--line); margin-bottom: 2.5rem; }
.fleet-tab { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1.1rem; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .925rem; }
.fleet-tab:hover { background: #fff; color: var(--blue-600); box-shadow: var(--shadow-sm); }
.base-title { display: flex; align-items: center; gap: 1rem; font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0 0 1.5rem; }
.base-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.base-title + .fleet-grid { margin-bottom: 4rem; }
.fleet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.aircraft { display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.aircraft:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.aircraft img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--sky-50); }
.aircraft-body { padding: 1.75rem; }
.aircraft h3 { font-size: 1.35rem; }
.aircraft p { margin: 0; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.contact-cards { display: grid; gap: 1.25rem; }
.office { padding: 2rem; border-radius: var(--radius-lg); border: 1px solid var(--line); background: #fff; }
.office h2 { font-size: 1.4rem; margin-bottom: 1rem; display: flex; align-items: center; gap: .6rem; }
.office .eyebrow { margin-bottom: .5rem; }
.office address { margin-bottom: 1.25rem; line-height: 1.6; }
.office-line { display: flex; gap: .7rem; align-items: center; margin: .35rem 0; word-break: break-word; }
.office-line .icon { color: var(--blue-600); }
.office-hours { background: var(--sky-50); border-color: var(--sky-100); }
.office-hours h2 .icon { color: var(--blue-600); }
.hours { margin: 0; display: grid; gap: .5rem; }
.hours div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .5rem; border-bottom: 1px dashed var(--line); }
.hours div:last-child { border-bottom: 0; padding-bottom: 0; }
.hours dt { color: var(--ink); font-weight: 550; }
.hours dd { margin: 0; font-variant-numeric: tabular-nums; }

.form-card { position: sticky; top: calc(var(--header-h) + 1.5rem); padding: clamp(1.75rem, 3vw, 2.5rem); border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.form-card h2 { font-size: 1.6rem; }
.enquiry-form { display: grid; gap: 1.1rem; }
.enquiry-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.enquiry-form legend { font-weight: 600; color: var(--ink); font-size: .925rem; margin-bottom: .5rem; padding: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.field-row legend { grid-column: 1 / -1; }
.field { display: grid; gap: .4rem; }
.field > span { font-weight: 600; color: var(--ink); font-size: .925rem; }
.field-row .field > span { font-weight: 500; color: var(--muted); font-size: .825rem; order: 2; }
.req { color: #c2410c; margin-left: .15rem; }
.field input, .field textarea {
  width: 100%; padding: .85rem 1rem; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--sky-50); border: 1.5px solid var(--line); border-radius: 12px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; background: #fff; border-color: var(--blue-600); box-shadow: 0 0 0 4px rgb(11 99 179 / .12); }
.field textarea { resize: vertical; min-height: 140px; }
.was-validated .field :invalid, .was-validated .check :invalid { border-color: #c2410c; }
.consent { padding: 1.1rem !important; border-radius: 12px !important; background: var(--sky-50) !important; }
.check { display: flex; gap: .7rem; align-items: flex-start; font-size: .925rem; color: var(--ink); cursor: pointer; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; accent-color: var(--blue-600); flex: none; }
.hint { font-size: .85rem; color: var(--muted); margin: .6rem 0 0; }
.form-error { color: #c2410c; font-weight: 600; margin: 0; }
.form-success { padding: 1rem 1.15rem; border-radius: 12px; background: #ecfdf3; color: #14532d; border: 1px solid #bbf7d0; margin: 0; }
.enquiry-form .btn { justify-self: start; }
.map-wrap { height: clamp(320px, 45vw, 480px); filter: saturate(.85); }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Legal ---------- */
.container.narrow.legal { max-width: calc(1000px + 2 * var(--gutter)); } /* Privacy Policy: 1000px of text plus the side gutters */
.legal h2 { font-size: 1.4rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.legal h2:first-of-type { margin-top: 1rem; }
/* Terms & Conditions: "General" and "Website" part headings */
.legal h2.legal-part { font-size: 1.85rem; color: var(--navy-800); margin-top: 4rem; padding-top: 2rem; border-top: 3px solid var(--blue-600); }
.legal h2.legal-part + h2 { margin-top: 1.25rem; border-top: 0; padding-top: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: rgb(255 255 255 / .65); font-size: .935rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr 1.1fr; gap: 2.5rem; padding-block: 4.5rem 3rem; }

.footer-heading { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 1.1rem; }
.site-footer a { color: rgb(255 255 255 / .75); text-decoration: none; transition: color .15s; }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer-links a[aria-current] { color: rgb(255 255 255 / .75); }
.site-footer address { margin-bottom: 1rem; line-height: 1.7; }
.footer-social { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: 1.5rem; }
.footer-social a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .2); }
.footer-social a:hover { background: var(--blue-600); border-color: var(--blue-600); }
.footer-logo { display: inline-block; margin-bottom: 1.25rem; }
.footer-logo img { width: 210px; height: auto; }
.back-to-top {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.25rem;
  padding: .55rem 1rem; border-radius: 999px; border: 1px solid rgb(255 255 255 / .2);
  font-size: .875rem; font-weight: 600;
}
.site-footer .back-to-top:hover { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .45); }
.back-to-top .icon { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.back-to-top:hover .icon { transform: translateY(-2px); }
.footer-social .back-to-top { width: auto; height: 42px; display: inline-flex; margin: 0 0 0 .4rem; padding: 0 1.05rem; border-radius: 999px; }
.site-footer .footer-social .back-to-top:hover { background: rgb(255 255 255 / .08); border-color: rgb(255 255 255 / .45); }
.footer-grid .footer-links + .footer-links, address + p + .footer-links { margin-top: 1rem; }
/* Same columns as .footer-grid above, so the weather lines up with Contact Details (2nd column) */
.footer-regulators { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr 1.1fr; gap: 2rem 2.5rem; align-items: center; padding-block: 2rem; border-top: 1px solid rgb(255 255 255 / .1); }
.footer-logos { display: flex; align-items: center; gap: 1.5rem 2.25rem; flex-wrap: wrap; }
.footer-regulators img { width: auto; }
.footer-logos a { display: inline-flex; opacity: .85; transition: opacity .2s; }
.footer-logos a:hover, .footer-logos a:focus-visible { opacity: 1; }
/* EGTE METAR/TAF beside the logos (filled in by main.js from /api/weather; stays hidden if it can't load) */
.footer-weather { grid-column: 2 / -1; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.75rem 2.5rem; align-items: start; }
.wx-station { min-width: 0; }
.footer-weather .footer-heading { display: flex; align-items: center; gap: .6rem; margin-bottom: .7rem; }
.footer-weather dl { margin: 0; display: grid; gap: .45rem; }
.footer-weather dl > div { display: grid; grid-template-columns: 3.6rem 1fr; gap: .75rem; align-items: baseline; }
.footer-weather dt { font-size: .72rem; font-weight: 700; letter-spacing: .1em; color: rgb(255 255 255 / .5); }
.footer-weather dd { margin: 0; min-width: 0; }
.footer-weather code { display: block; font: .8rem/1.55 ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace; color: rgb(255 255 255 / .85); white-space: pre-wrap; overflow-wrap: anywhere; }
.wx-cat { padding: .1rem .5rem; border-radius: 999px; font-size: .68rem; letter-spacing: .06em; color: #fff; }
.wx-cat[data-cat="VFR"] { background: #15803d; }
.wx-cat[data-cat="MVFR"] { background: #1d4ed8; }
.wx-cat[data-cat="IFR"] { background: #b91c1c; }
.wx-cat[data-cat="LIFR"] { background: #a21caf; }
.footer-regulators img[src*="easa"] { height: 44px; }
.footer-regulators img[src*="uk-caa"] { height: 64px; border-radius: 4px; }
.footer-regulators img[src*="transport-malta"] { height: 44px; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / .1); font-size: .85rem; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; flex-wrap: wrap; padding-block: 1.5rem; }
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }

/* ---------- Reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- Responsive ---------- */
/* Larger (75px) logo: tighten the menu a little on laptop-width screens so it still fits on one line */
@media (max-width: 1400px) {
  .header-inner { gap: 1.1rem; }
  .nav-link { padding: .55rem .6rem; font-size: .92rem; }
}
@media (max-width: 1180px) {
  .nav-link { padding: .55rem .6rem; font-size: .9rem; }
  .header-inner { gap: 1rem; }
  .brand img { height: 46px; }
}

@media (max-width: 1080px) {
  :root { --header-h: 72px; }
  .topbar-tag { display: none; }
  .topbar-inner { justify-content: center; }
  .nav-toggle {
    display: grid; place-items: center; margin-left: auto;
    width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer;
  }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), background .2s; position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; }
  .nav-toggle-bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 1.5rem;
    padding: 1.25rem var(--gutter) 2rem; margin: 0;
    background: #fff; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, transform .3s var(--ease), visibility .25s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-link { width: 100%; justify-content: space-between; padding: 1.05rem .25rem; font-size: 1.05rem; border-radius: 0; }
  .nav-link:hover, .nav-link[aria-current="page"], .is-active > .nav-link { background: none; }
  .menu { position: static; width: auto; padding: 0 0 .75rem; border: 0; box-shadow: none; transform: none; opacity: 1; visibility: visible; display: none; }
  .has-menu:hover > .menu { transform: none; }
  .has-menu.is-open > .menu { display: block; transform: none; }
  .nav-cta { justify-content: center; padding: 1em; }
  body.nav-open { overflow: hidden; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .course-layout, .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .course-aside, .form-card { position: static; }
  .footer-grid, .footer-regulators { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 1rem; }
  .topbar-links span { display: none; }
  .topbar-links { gap: 1.5rem; }
  .topbar-links .icon { width: 18px; height: 18px; }
  .hero { min-height: 92svh; }
  .hero-content { padding-bottom: 6.5rem; }
  .hero-video-toggle { bottom: 4.5rem; }
  .pathways, .feature, .fleet-grid, .info-grid, .price-grid { grid-template-columns: 1fr; }
  .feature-reverse .feature-media { order: 0; }
  .pathway { aspect-ratio: 4 / 3; }
  .pathway-body { padding: 1.25rem 1.4rem; }
  .price-card-featured { transform: none; }
  .rdpe { grid-template-columns: 1fr; text-align: center; padding: 1.75rem; }
  .rdpe img { margin-inline: auto; max-width: 200px; }
  .section-head-row { flex-direction: column; align-items: flex-start; }
  .module { grid-template-columns: 1fr; gap: .25rem; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; padding-top: 3.5rem; }
  .footer-regulators { grid-template-columns: 1fr; }
  .footer-weather { grid-column: auto; }

}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: minmax(0, 1fr); }

  .check span, .hint { overflow-wrap: anywhere; }
}

/* ---------- Admin portal ---------- */
.admin-header { background: var(--navy-900); color: #fff; }
.admin-header-inner { display: flex; align-items: center; gap: 1rem; min-height: 72px; }
.admin-header .brand img { height: 44px; width: auto; mix-blend-mode: normal; }

.admin-user { margin-left: auto; display: flex; align-items: center; gap: 1rem; font-size: .9rem; color: rgb(255 255 255 / .8); }
.admin-user .btn { padding: .55em 1.05em; font-size: .875rem; }
/* "Session ends in xx mins" beside the light/dark switch; amber for the last 5 minutes */
.session-timer { white-space: nowrap; font-size: .8rem; font-variant-numeric: tabular-nums; padding: .3em .75em; border: 1px solid rgb(255 255 255 / .25); border-radius: 999px; color: rgb(255 255 255 / .85); }
.admin-user { flex-wrap: wrap; justify-content: flex-end; row-gap: .5rem; min-width: 0; } /* never wider than the header */
@media (max-width: 1200px) { .admin-user [data-admin-email] { display: none; } } /* room for the session timer; the email is on Home and My account */
.session-timer.is-ending { color: #fde68a; border-color: rgb(253 230 138 / .6); background: rgb(253 230 138 / .08); }
.admin-section { min-height: calc(100svh - 72px); padding-block: clamp(2rem, 5vw, 3.5rem); background: var(--sky-50); }
/* Admin pages use the same width as the rest of the site (--container) */
.setup-steps { margin: 0; padding-left: 1.25rem; display: grid; gap: .9rem; font-size: .95rem; }
.setup-steps .qr { display: block; width: 200px; height: 200px; margin: .75rem 0 .5rem; border: 1px solid var(--line); border-radius: 12px; image-rendering: pixelated; background: #fff; }
.setup-key summary { cursor: pointer; color: var(--blue-700); font-size: .875rem; }
.setup-key code { display: inline-block; margin-top: .4rem; padding: .35rem .6rem; border-radius: 8px; background: var(--sky-50); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .05em; user-select: all; overflow-wrap: anywhere; }
.code-card input[name="code"] { font-size: 1.4rem; letter-spacing: .3em; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.code-help { font-size: .85rem; }
.link-btn { padding: 0; border: 0; background: none; font: inherit; color: var(--blue-700); text-decoration: underline; cursor: pointer; }
.admin-login h1 { font-size: 1.75rem; margin-bottom: .25rem; }
.admin-loading { display: grid; place-items: center; min-height: 40svh; }
.admin-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.admin-toolbar h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: .2rem; }

.users-panel { gap: 0; }
.users-panel .admin-toolbar { margin-bottom: 1rem; }
.users-panel .add-user { margin-bottom: 1.25rem; }
/* Admin home: "Welcome, Name" and the pages you can go to */
.admin-home { max-width: 880px; margin: clamp(1rem, 4vw, 3rem) auto 0; }
.admin-home h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0 0 .35rem; }
.admin-home-sub { margin: 0 0 1.75rem; font-size: 1.1rem; color: var(--muted); }
.home-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.home-links li[hidden] { display: none; }
.home-link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: center; height: 100%; padding: 1.25rem 1.35rem; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.home-link:hover { border-color: var(--blue-600); box-shadow: var(--shadow); transform: translateY(-2px); }
.home-link:focus-visible { outline: 3px solid rgb(11 99 179 / .35); outline-offset: 2px; }
.home-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--sky-100); color: var(--blue-600); }
.home-icon .icon { width: 24px; height: 24px; }
.home-text strong { display: block; font-size: 1.1rem; }
.home-text small { display: block; margin-top: .2rem; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.home-arrow { color: var(--muted); transition: color .2s, transform .2s var(--ease); }
.home-arrow .icon { width: 20px; height: 20px; }
.home-link:hover .home-arrow { color: var(--blue-600); transform: translateX(3px); }
.admin-stats { margin: 0; color: var(--muted); font-size: .925rem; }
.admin-filters { display: flex; gap: .6rem; flex-wrap: wrap; }
.admin-filters input, .admin-filters select { padding: .65rem .9rem; font: inherit; font-size: .925rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.admin-filters input { width: min(300px, 70vw); }
.admin-table-wrap { background: #fff; box-shadow: var(--shadow-sm); }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { padding: .8rem .9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.admin-table thead th { background: var(--sky-50); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.admin-table td { color: var(--ink); }
.admin-table small { color: var(--muted); }
.admin-table tbody tr:last-child td { border-bottom: 0; }
/* Voucher table: fixed column widths so nothing shifts when a row changes (e.g. marked flown).
   Long text is cut off with … and shown in full on hover (see addOverflowTitles in admin.js). */
.voucher-table { table-layout: fixed; min-width: 1180px; }
.voucher-table .c-voucher { width: 185px; }
.voucher-table .c-name { width: 13%; }
.voucher-table .c-flight { width: 92px; }
.voucher-table .c-date { width: 110px; }
.voucher-table .c-customer { width: auto; }
.voucher-table .c-status { width: 172px; }
.voucher-table .c-actions { width: 265px; }
.voucher-table th, .voucher-table td:not(.admin-actions) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voucher-table td.admin-none { white-space: normal; }
.voucher-table th, .voucher-table td { padding-inline: .7rem; }
.voucher-table thead th { letter-spacing: .05em; }
/* Users table: fixed column widths so nothing shifts when a user is added, removed or has 2-step reset */
.users-table { table-layout: fixed; min-width: 1040px; }
.users-table .c-email { width: auto; }
.users-table .c-role { width: 170px; }
.users-table .c-added { width: 165px; }
.users-table .c-signin { width: 175px; }
.users-table .c-2step { width: 110px; }
.users-table .c-actions { width: 220px; }
.users-table td { overflow-wrap: anywhere; }
.users-table td.admin-actions { overflow-wrap: normal; }
.admin-actions { white-space: nowrap; }
.admin-actions .btn { padding: .45em .8em; font-size: .8rem; box-shadow: none; }
.admin-none, .admin-empty { color: var(--muted); text-align: center; padding: 2rem; }
.status { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 650; white-space: nowrap; }
.status-open { background: var(--sky-100); color: var(--blue-700); }
.status-redeemed { background: #dcfce7; color: #166534; }
.status-expired { background: #fde8e8; color: #9b1c1c; }
.order-total { margin: 0; padding: .8rem 1rem; border-radius: 12px; background: var(--sky-50); color: var(--ink); font-size: .95rem; }
.order-total:empty { display: none; }
.order-total strong { font-size: 1.1rem; }
.order-total span { color: var(--muted); font-size: .85rem; }
.src-tag { display: inline-block; margin-top: .25rem; padding: .1rem .5rem; border-radius: 999px; background: #f1f5f9; color: var(--muted); font-size: .72rem; font-weight: 650; }
.admin-note { font-style: italic; }
.import-dialog { width: min(620px, calc(100vw - 2rem)); }
.activity-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.activity-head h2 { margin-bottom: .35rem; }
.activity-more { justify-self: center; }
/* Settings: side menu (General, Website Data, Opening Hours, Activity log) with the platform version underneath */
.settings-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.settings-nav { position: sticky; top: 1.5rem; padding: .75rem; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.settings-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.settings-nav button { display: block; width: 100%; padding: .65rem .85rem; border: 0; border-radius: 10px; background: none; font: inherit; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.settings-nav button:hover { background: var(--sky-50); }
.settings-nav button[aria-current="page"] { background: var(--sky-100); color: var(--blue-600); }
.settings-nav button:focus-visible { outline: 3px solid rgb(11 99 179 / .35); outline-offset: 1px; }
.settings-panels, .settings-panel { display: grid; gap: 1.5rem; min-width: 0; }
.settings-panel[hidden], .settings-form[hidden] { display: none; }
/* Settings > General: account details and change password */
.account-list { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.1rem 1.5rem; }
.account-list dt { font-size: .75rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; }
.account-list dd { margin: 0; overflow-wrap: anywhere; }
.account-list .status { white-space: normal; }
.password-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; max-width: 760px; }
.password-grid .field { margin: 0; }
.password-grid .code-field { max-width: 240px; }
.password-form .form-error, .password-form .form-success { margin: 0; }
@media (max-width: 640px) { .password-grid { grid-template-columns: minmax(0, 1fr); } }
.platform-version { margin: .75rem 0 0; padding: .9rem .85rem .25rem; border-top: 1px solid var(--line); font-size: .8rem; line-height: 1.5; color: var(--muted); }
.platform-version strong { display: block; color: var(--ink); font-weight: 650; }
.platform-version span + strong { margin-top: .5rem; }
.platform-version code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .95em; word-break: break-all; user-select: all; }
.platform-version .pv-sep { display: none; }
@media (max-width: 860px) {
  .settings-shell { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { position: static; }
  .settings-nav ul { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
}
.activity-wrap { max-height: min(60vh, 560px); overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.activity-wrap thead th { position: sticky; top: 0; z-index: 1; }
.activity-wrap td:first-child, .activity-wrap td:nth-child(2) { white-space: nowrap; }
.btn-danger-solid { --btn-bg: #b42318; --btn-bd: #b42318; --btn-fg: #fff; }
.btn-danger-solid:hover { --btn-bg: #912018; --btn-bd: #912018; }
.import-preview { padding: 1rem 1.15rem; border-radius: 12px; background: var(--sky-50); border: 1px solid var(--sky-100); font-size: .9rem; }
.import-preview p { margin: 0 0 .5rem; }
.import-preview ul { margin: 0 0 .75rem; padding-left: 1.2rem; }
.import-big { font-size: 1.05rem; color: var(--ink); }
.import-sample { max-height: 12rem; overflow: auto; }
.import-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.admin-pager { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; flex-wrap: wrap; margin-top: 1rem; font-size: .9rem; color: var(--muted); }
.pager-info { margin: 0; }
.pager-pages { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.pager-btn { min-width: 38px; height: 38px; padding: 0 .7rem; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font: 600 .875rem var(--font); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.pager-btn:hover:not(:disabled) { border-color: var(--blue-600); color: var(--blue-600); }
.pager-btn.is-current { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.pager-btn:disabled { opacity: .45; cursor: not-allowed; }
.pager-gap { padding: 0 .2rem; }
.pager-size { display: flex; align-items: center; gap: .5rem; }
.pager-size select { padding: .45rem .6rem; font: inherit; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
@media (max-width: 760px) { .admin-pager { flex-direction: column; align-items: flex-start; } }
.sort-btn { display: inline-flex; align-items: center; gap: .35rem; padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.sort-btn::after { content: "↕"; font-size: .85em; opacity: .35; }
.sort-btn[data-dir="asc"]::after { content: "↑"; opacity: 1; color: var(--blue-600); }
.sort-btn[data-dir="desc"]::after { content: "↓"; opacity: 1; color: var(--blue-600); }
.sort-btn:hover { color: var(--blue-600); }
th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--ink) !important; }
/* Vouchers: search and filters on the left, More options and Add voucher on the right */
.voucher-bar { display: flex; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; margin: -.25rem 0 1.25rem; }

/* Vouchers: "⋯ More options" and "+ Add voucher" at the right of the date row */
.voucher-actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.more-menu { position: relative; }
.more-btn { width: 44px; height: 44px; }
.more-btn .icon { width: 20px; height: 20px; }
.more-btn.is-open { border-color: var(--blue-600); color: var(--blue-600); }
.more-list { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 20; min-width: 230px; padding: .35rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -16px rgb(15 27 45 / .35); }
.more-list button { display: block; width: 100%; padding: .65rem .8rem; border: 0; border-radius: 8px; background: none; font: inherit; font-size: .925rem; text-align: left; color: var(--ink); cursor: pointer; }
.more-list button:hover, .more-list button:focus-visible { background: var(--sky-100); color: var(--blue-700); outline: none; }
.more-list .menu-danger { color: #b42318; }
.more-list .menu-danger:hover, .more-list .menu-danger:focus-visible { background: #fef3f2; color: #912018; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .more-list .menu-danger { color: #f87171; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .more-list .menu-danger:is(:hover, :focus-visible) { background: rgb(239 68 68 / .14); color: #fca5a5; }
.field-legend { font-weight: 600; color: var(--ink); font-size: .925rem; margin-bottom: .5rem; padding: 0; }
.add-voucher-btn { display: inline-flex; align-items: center; gap: .6rem; padding: 0 .2rem 0 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.add-voucher-btn .add-toggle { margin: 0; }
.add-voucher-btn:hover { color: var(--blue-600); }
.add-voucher-btn:hover .add-toggle:not(.is-open) { background: var(--blue-700); border-color: var(--blue-700); }
.add-voucher { position: static; margin: 0 0 1.5rem; }
.add-voucher h2 { font-size: 1.25rem; margin: 0; }
.add-voucher .form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem 1.25rem; }
.voucher-type { border: 0; padding: 0; margin: 0; display: grid; gap: .45rem; }
.voucher-type legend { padding: 0; margin-bottom: .35rem; font-weight: 600; font-size: .9rem; }
.add-voucher .field select, .order-dialog .field select { width: 100%; padding: .85rem 1rem; font: inherit; font-size: 1rem; color: var(--ink); background: var(--sky-50); border: 1.5px solid var(--line); border-radius: 12px; }
.add-voucher .field select:focus, .order-dialog .field select:focus { outline: none; background: #fff; border-color: var(--blue-600); box-shadow: 0 0 0 4px rgb(11 99 179 / .12); }
.add-voucher .voucher-type .check input { width: 1.2rem; padding: 0; }
.add-voucher input[readonly] { background: var(--sky-50, #f4f8fc); color: var(--muted); }
.voucher-total { margin: 0; font-size: 1.05rem; }
.voucher-total strong { font-size: 1.35rem; color: var(--navy-900); margin-left: .35rem; }
.voucher-total small { color: var(--muted); margin-left: .35rem; }
[data-voucher-added] { margin: 0 0 1.25rem; }
[data-voucher-added].form-error { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 10px; border: 1.5px solid transparent; background: none; cursor: pointer; vertical-align: middle; }
.icon-btn .icon { width: 19px; height: 19px; }
.btn-trash { color: #b42318; }
.btn-trash:hover, .btn-trash:focus-visible { background: #fef3f2; border-color: #f3b4ac; }
@media (max-width: 760px) { .voucher-actions { margin-left: 0; width: 100%; justify-content: flex-end; } }

/* ---------- Admin: page tabs and Users page ---------- */
.admin-tabs { display: flex; gap: .25rem; margin-left: 1rem; }
.admin-tabs a { padding: .5rem .95rem; border-radius: 999px; color: rgb(255 255 255 / .75); text-decoration: none; font-weight: 600; font-size: .9rem; }
.admin-tabs a:hover { color: #fff; background: rgb(255 255 255 / .08); }
.admin-tabs a.is-active { color: var(--navy-900); background: #fff; }
.add-toggle { align-self: flex-start; margin-top: -.45rem; width: 44px; height: 44px; background: var(--blue-600); border-color: var(--blue-600); color: #fff; box-shadow: 0 8px 20px -8px rgb(11 99 179 / .6); }
.add-toggle:hover { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }
.add-toggle .icon { width: 20px; height: 20px; transition: transform .25s var(--ease); }
.add-toggle.is-open { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: none; }
.add-toggle.is-open .icon { transform: rotate(45deg); }
.add-user h2 { font-size: 1.25rem; margin: 0; }
.add-user .add-user-grid { grid-template-columns: minmax(220px, 1fr) minmax(150px, .5fr) minmax(320px, 1.6fr); }
@media (max-width: 760px) { .add-user .add-user-grid { grid-template-columns: minmax(0, 1fr); } }
.users-panel .admin-toolbar { align-items: center; }
.field > span small { font-weight: 500; color: var(--muted); }
.pw-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.pw-row input { flex: 1 1 200px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.pw-row .btn { padding: .6em 1em; font-size: .85rem; box-shadow: none; }
.pw-once { display: inline-block; margin-top: .4rem; padding: .3rem .6rem; border-radius: 8px; background: #fff; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; user-select: all; }
.btn-danger { --btn-fg: #b42318; --btn-bd: #f3b4ac; }
.btn-danger:hover { --btn-bg: #b42318; --btn-fg: #fff; --btn-bd: #b42318; }
.users-note { margin-top: 1rem; max-width: 60rem; }
@media (max-width: 900px) { .admin-tabs { margin-left: 0; } .admin-header-inner { flex-wrap: wrap; padding-block: .6rem; } }

/* Homepage: single approval statement under the hero */
.stats-grid.stats-single { display: flex; justify-content: center; align-items: center; padding: 1.6rem 2rem; }
.stat-statement { display: flex; align-items: center; justify-content: center; gap: .75rem; margin: 0; text-align: center; font-family: var(--font-display); font-size: clamp(1.15rem, 2.2vw, 1.6rem); font-weight: 700; letter-spacing: -0.01em; color: var(--navy-800); }
.stat-statement .icon { width: 1.6em; height: 1.6em; padding: .3em; border-radius: 50%; background: var(--sky-100); color: var(--blue-600); flex: none; }
.stat-statement .flags { display: inline-flex; align-items: center; gap: .4rem; flex: none; }
.stat-statement .flag { display: block; height: 1em; width: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgb(4 16 33 / .12); }
/* DCT page: static airline logo grid */
.airlines { display: block; width: 100%; max-width: 1000px; margin-inline: auto; mix-blend-mode: multiply; }
/* Homepage ATPL image: kept smaller and tucked in beside the text */
.feature-media-sm img { max-width: 520px; margin-inline-start: auto; display: block; }
@media (max-width: 760px) { .feature-media-sm img { margin-inline: auto; } }
.eyebrow a { color: inherit; text-decoration: underline; text-underline-offset: .2em; }
.eyebrow a:hover { color: var(--navy-800); }
@media (max-width: 400px) { .stats-grid.stats-single { padding: 1.25rem 1rem; } .stat-statement { font-size: 1.05rem; } }

/* Website notice banner (Settings page) */
.site-notice { position: relative; display: flex; align-items: center; justify-content: center; gap: 1rem; padding: .7rem 3rem; background: #fff4d6; color: #5c3d00; border-bottom: 1px solid #f3d58a; font-size: .95rem; font-weight: 600; text-align: center; }
.site-notice p { margin: 0; max-width: 70rem; }
.site-notice-close { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.site-notice-close:hover { background: rgb(0 0 0 / .07); }

/* ---------- Admin: Settings page (owners) ---------- */
.settings-form { display: grid; gap: 1.5rem; }
.settings-card { padding: clamp(1.25rem, 2.5vw, 1.75rem); border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: grid; gap: 1rem; }
.settings-card h2 { font-size: 1.2rem; margin: 0; }
.settings-card .hint { margin: 0; }
.status-list { margin: 0; display: grid; gap: .85rem; }
.status-list dt { font-size: .75rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .25rem; }
.status-list dd { margin: 0; }
.status-list .status { white-space: normal; line-height: 1.4; }
.switch { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: start; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { position: relative; width: 46px; height: 26px; margin-top: .1rem; border-radius: 999px; background: #cbd5e1; transition: background .2s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s var(--ease); }
.switch input:checked + .switch-ui { background: var(--blue-600); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid rgb(11 99 179 / .35); outline-offset: 2px; }
.switch strong { display: block; }
.switch small { display: block; color: var(--muted); font-size: .875rem; margin-top: .15rem; }
.price-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.money-input { display: flex; align-items: center; gap: .4rem; }
.money-input > span { font-weight: 700; color: var(--muted); }
.settings-card textarea { width: 100%; padding: .85rem 1rem; font: inherit; color: var(--ink); background: var(--sky-50); border: 1.5px solid var(--line); border-radius: 12px; resize: vertical; min-height: 0; }
.notice-until { max-width: 260px; }
/* Office open/closed status */
.office-modes { display: grid; gap: .75rem; margin: 0; padding: 0; border: 0; }
.radio-row { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.radio-row:has(input:checked) { border-color: var(--blue-600); background: var(--sky-50); }
.radio-row input { width: 18px; height: 18px; margin: .15rem 0 0; accent-color: var(--blue-600); }
.radio-row strong { display: block; }
.radio-row small { display: block; color: var(--muted); font-size: .875rem; margin-top: .15rem; }
.closed-days-title { font-size: 1rem; margin: .5rem 0 0; }
.closed-days { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.closed-days li { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto auto; gap: .75rem; align-items: center; }
.closed-days input[type="date"], .closed-days input[type="text"] { width: 100%; padding: .6rem .8rem; font: inherit; color: var(--ink); background: var(--sky-50); border: 1.5px solid var(--line); border-radius: 10px; }
.closed-days input:focus { outline: none; background: #fff; border-color: var(--blue-600); box-shadow: 0 0 0 4px rgb(11 99 179 / .12); }
.closed-days .yearly { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; white-space: nowrap; cursor: pointer; }
.closed-days .yearly input { accent-color: var(--blue-600); width: 16px; height: 16px; }
.closed-days .icon-btn { color: var(--muted); }
.closed-days .icon-btn:hover { color: #b42318; border-color: #f3b4ac; }
.closed-days-add { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.closed-days-add .hint { margin-left: .5rem; }
.chip { padding: .35rem .8rem; font: inherit; font-size: .85rem; color: var(--navy-800); background: var(--sky-50); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.chip:hover { border-color: var(--blue-600); color: var(--blue-600); }
.chip:disabled { opacity: .45; cursor: default; border-color: var(--line); color: var(--muted); }
.btn-sm { padding: .5rem 1rem; font-size: .875rem; }
@media (max-width: 640px) { .closed-days li { grid-template-columns: 1fr auto auto; padding-bottom: .6rem; border-bottom: 1px solid var(--line); } .closed-days li input[type="text"] { grid-column: 1 / -1; grid-row: 2; } }
.notice-preview { display: grid; gap: .35rem; }
.notice-preview .site-notice { border-radius: 10px; border: 1px solid #f3d58a; padding-inline: 1rem; }
.settings-actions { display: flex; justify-content: flex-end; align-items: center; gap: .75rem; flex-wrap: wrap; }
.settings-actions .form-success { margin-right: auto; padding: .6rem .9rem; }
.confirm-dialog { width: min(480px, calc(100vw - 2rem)); }
.confirm-changes { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; font-size: .925rem; }
.confirm-dialog input[name="code"] { font-size: 1.3rem; letter-spacing: .3em; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }

/* ---------- Admin: sign-in screen (photo behind, blurred right half with the sign-in box) ---------- */
.is-signin .admin-section { padding: 0; background: #0b2545 url("../img/admin-signin-wing.webp") center / cover no-repeat; }
/* Smaller copy only for small screens that aren't high-resolution; sharp phone/tablet screens get the full photo */
@media (max-width: 1100px) and (max-resolution: 1.5dppx) { .is-signin .admin-section { background-image: url("../img/admin-signin-wing-1200.webp"); } }
.is-signin .admin-section > .container { max-width: none; padding: 0; }
.admin-login { position: relative; display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100svh - 72px); place-items: stretch; }
.back-to-site { position: absolute; left: clamp(1rem, 2.5vw, 2rem); bottom: clamp(1rem, 2.5vw, 2rem); z-index: 2; display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.2rem; border-radius: 999px; background: rgb(4 16 33 / .55); border: 1px solid rgb(255 255 255 / .28); color: #fff; font-weight: 600; text-decoration: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .2s, border-color .2s; }
.back-to-site .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.back-to-site:hover, .back-to-site:focus-visible { color: #fff; background: rgb(4 16 33 / .75); border-color: rgb(255 255 255 / .5); }
.back-to-site:hover .icon { transform: translateX(-3px); }
.back-to-site:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.signin-panel { grid-column: 2; display: grid; place-items: center; padding: clamp(1.5rem, 4vw, 3rem); background: rgb(11 37 69 / .18); -webkit-backdrop-filter: blur(18px) saturate(1.1); backdrop-filter: blur(18px) saturate(1.1); border-left: 1px solid rgb(255 255 255 / .18); }
.signin-card { width: min(460px, 100%); display: grid; gap: 1.15rem; padding: clamp(1.75rem, 3.5vw, 2.75rem); border-radius: 18px; background: #fff; box-shadow: 0 30px 60px -25px rgb(4 16 33 / .55); }
.signin-card.code-card { width: min(540px, 100%); }
.signin-card h1 { font-size: 1.6rem; margin: 0; }
.signin-card .hint { margin: 0; }
.pill-field { position: relative; display: block; }
.pill-field .pill-icon { position: absolute; left: 1.35rem; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: #9aa3ad; pointer-events: none; }
.pill-field input { width: 100%; height: 64px; padding: 0 1.4rem 0 3.6rem; font: inherit; font-size: 1.05rem; color: var(--ink); background: #fff; border: 1.5px solid #d5dbe2; border-radius: 999px; transition: border-color .2s, box-shadow .2s; }
.pill-field input::placeholder { color: #9aa3ad; }
.pill-field input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 4px rgb(11 99 179 / .14); }
.code-card .pill-field input { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.3rem; letter-spacing: .25em; }
.code-card .pill-field input::placeholder { font-family: var(--font-body, inherit); font-size: 1.05rem; letter-spacing: normal; }
.pill-btn { width: 100%; height: 60px; justify-content: center; border-radius: 999px; font-size: 1.05rem; font-weight: 600; box-shadow: none; }
.signin-card .form-error, .signin-card [data-login-message] { margin: 0; }
@media (max-width: 900px) {
  .admin-login { grid-template-columns: minmax(0, 1fr); }
  .signin-panel { grid-column: 1; border-left: 0; background: rgb(11 37 69 / .25); }
}

/* ---------- Admin: light/dark mode switch (next to Sign out) ---------- */
.theme-toggle { flex: none; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 999px; }
.theme-toggle:focus-visible { outline: 3px solid rgb(255 255 255 / .7); outline-offset: 3px; }
.theme-track { position: relative; display: flex; align-items: center; justify-content: space-between; width: 62px; height: 32px; padding: 0 8px; border-radius: 999px; background: rgb(255 255 255 / .12); border: 1px solid rgb(255 255 255 / .3); transition: background .2s, border-color .2s; }
.theme-toggle:hover .theme-track { background: rgb(255 255 255 / .2); border-color: rgb(255 255 255 / .55); }
.theme-icon { position: relative; z-index: 1; width: 15px; height: 15px; color: rgb(255 255 255 / .85); transition: color .2s; }
.theme-thumb { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform .25s var(--ease); }
.theme-toggle[aria-checked="false"] .theme-sun { color: var(--navy-900); }
.theme-toggle[aria-checked="true"] .theme-thumb { transform: translateX(30px); }
.theme-toggle[aria-checked="true"] .theme-moon { color: var(--navy-900); }
@media (prefers-reduced-motion: reduce) { .theme-thumb { transition: none; } }

/* ---------- Admin: dark mode (signed-in pages only; the sign-in screen and public site stay as they are) ---------- */
html[data-theme="dark"] body.page-admin:not(.is-signin) {
  color-scheme: dark; /* dark date pickers, dropdowns and scrollbars */
  --ink: #e7eef7;
  --body: #c3cfdd;
  --muted: #93a4b9;
  --line: #273a54;
  --sky-50: #13233a;
  --sky-100: #1b3252;
  --navy-800: #d4e3f5;
  --white: #0a1524;
  --surface: #0f1c30;
  --link: #8cc4f5;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .35);
  --shadow: 0 2px 4px rgb(0 0 0 / .3), 0 12px 32px -8px rgb(0 0 0 / .5);
  --shadow-lg: 0 24px 60px -16px rgb(0 0 0 / .7);
  background: #0a1524;
}
html[data-theme="dark"] body.page-admin:not(.is-signin) .admin-section { background: #0a1524; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .admin-section a:not(.btn):not(.home-link) { color: var(--link); }
/* Cards, panels, menus and inputs that are white in light mode */
html[data-theme="dark"] body.page-admin:not(.is-signin) :is(.admin-table-wrap, .settings-nav, .settings-card, .form-card, .more-list, .home-link, .order-dialog, .pw-once) { background: var(--surface); }
html[data-theme="dark"] body.page-admin:not(.is-signin) :is(.pager-btn:not(.is-current), .pager-size select, .admin-filters input, .admin-filters select, .round-btn, .order-close, .add-toggle.is-open) { background: var(--sky-50); color: var(--ink); }
html[data-theme="dark"] body.page-admin:not(.is-signin) :is(.field input:focus, .field textarea:focus, .closed-days input:focus, .add-voucher .field select:focus, .order-dialog .field select:focus) { background: #0b1729; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .admin-table thead th { background: #13233a; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .src-tag { background: #1c2c42; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .switch-ui { background: #3a4c66; }
/* Status pills and messages */
html[data-theme="dark"] body.page-admin:not(.is-signin) .status-open { background: rgb(59 130 246 / .2); color: #a5ccf7; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .status-redeemed { background: rgb(34 197 94 / .18); color: #86efac; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .status-expired { background: rgb(239 68 68 / .18); color: #fca5a5; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .form-success { background: rgb(34 197 94 / .12); color: #a7f3c4; border-color: rgb(34 197 94 / .35); }
html[data-theme="dark"] body.page-admin:not(.is-signin) .form-error { color: #fdba74; }
html[data-theme="dark"] body.page-admin:not(.is-signin) [data-voucher-added].form-error { background: rgb(249 115 22 / .12); border-color: rgb(249 115 22 / .35); color: #fdba74; }
/* Blue text and outlines that are too dark on a dark background */
html[data-theme="dark"] body.page-admin:not(.is-signin) .btn-outline { --btn-fg: #9ccbf5; --btn-bd: #3f7fbf; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .btn-outline:hover { --btn-fg: #fff; --btn-bd: var(--blue-600); }
html[data-theme="dark"] body.page-admin:not(.is-signin) :is(.home-icon, .settings-nav button[aria-current="page"], .more-list button:hover, .more-list button:focus-visible, .more-btn.is-open, .round-btn:hover, .chip:hover) { color: #9ccbf5; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .radio-row:has(input:checked) { background: #13233a; }
html[data-theme="dark"] body.page-admin:not(.is-signin) :is(.btn-trash, .closed-days .icon-btn:hover) { color: #f87171; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .btn-trash:is(:hover, :focus-visible) { background: rgb(239 68 68 / .14); border-color: rgb(248 113 113 / .45); }
html[data-theme="dark"] body.page-admin:not(.is-signin) .btn-danger { --btn-fg: #fca5a5; --btn-bd: rgb(248 113 113 / .45); }
html[data-theme="dark"] body.page-admin:not(.is-signin) .btn-danger:hover { --btn-fg: #fff; --btn-bd: #b42318; }
/* The QR code for setting up two-step sign-in must stay dark-on-white to scan */
html[data-theme="dark"] body.page-admin:not(.is-signin) .setup-steps .qr { background: #fff; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .voucher-total strong { color: var(--ink); }
html[data-theme="dark"] body.page-admin:not(.is-signin) .admin-header { box-shadow: inset 0 -1px 0 #1d2e47; } /* a line that takes no space, so dark mode is the same height as light */

/* Our Fleet: photo credits (freely licensed photos) and a placeholder where no licensed photo exists yet */

/* Admin: Tech Logs (Captain's Technical Log). Aircraft down the side like Settings; the page drawn like the paper form */
.techlog-nav button small { margin-left: .35rem; font-size: .75rem; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.techlog-nav button[aria-current="page"] small { color: inherit; opacity: .75; }
.techlog-toolbar { align-items: flex-end; }
.techlog-bar { display: flex; justify-content: flex-end; align-items: center; gap: 1.25rem; flex-wrap: wrap; margin-left: auto; }
.techlog-pager .round-btn { flex: none; }
.techlog-pager { display: flex; align-items: center; gap: .5rem; }
.techlog-empty { padding: 2.5rem 1rem; border-radius: var(--radius-lg); border: 1px dashed var(--line); }
.techlog-pager .round-btn { width: 40px; height: 40px; }
.techlog-pager .round-btn:disabled { opacity: .4; cursor: default; }
.techlog-pager .field { margin: 0; }
.techlog-pager input[type="date"] { width: 11.5rem; padding: .6rem .8rem; font: inherit; font-size: .925rem; font-variant-numeric: tabular-nums; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.techlog-sheet { display: grid; gap: 1rem; min-width: 0; }
.techlog-scroll { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.tl-page { min-width: 1080px; padding: 1.5rem; display: flex; flex-direction: column; gap: 1.1rem; color: var(--ink); font-size: .85rem; }
.tl-head { display: flex; justify-content: space-between; gap: 2rem; align-items: end; }
.tl-title { margin: 0 0 .35rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.tl-date { margin: 0; font-weight: 650; text-transform: uppercase; }
.tl-date span { display: inline-block; min-width: 2.2em; text-align: center; border-bottom: 1px dotted var(--muted); font-variant-numeric: tabular-nums; }
.tl-notice { text-align: right; text-transform: uppercase; font-size: .78rem; font-weight: 600; }
.tl-notice p { margin: 0; }
.tl-notice .tl-reg { margin-top: .5rem; font-size: .9rem; }
.tl-notice .tl-reg small { font-weight: 500; color: var(--muted); }
.tl-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tl-table th, .tl-table td { border: 1px solid #9aa8b9; padding: 0; vertical-align: middle; }
.tl-table thead th { padding: .4rem .35rem; font-size: .75rem; font-weight: 700; line-height: 1.2; text-align: center; background: var(--sky-50); }
.tl-table tbody th { padding: .35rem .5rem; font-weight: 700; text-align: left; background: var(--sky-50); }
.tl-table .tl-no { width: 2.6rem; text-align: center; }
.tl-main td { height: 2.6rem; }
.tl-main input, .tl-main select { width: 100%; height: 100%; min-height: 2.6rem; padding: .3rem .4rem; border: 0; background: transparent; font: inherit; color: var(--ink); }
.tl-main select { padding-right: .1rem; cursor: pointer; }
.tl-main select option { color: #0f1b2d; background: #fff; }
.tl-main input:focus, .tl-main select:focus { outline: 2px solid var(--blue-600); outline-offset: -2px; background: var(--sky-50); }
.tl-main input:invalid { background: rgb(239 68 68 / .1); }
.tl-main input[type="time"] { font-variant-numeric: tabular-nums; padding-right: .1rem; }
.tl-calc { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--sky-50); cursor: not-allowed; }
.tl-calc.is-bad { color: #b42318; background: rgb(239 68 68 / .1); }
.tl-off { background: repeating-linear-gradient(135deg, transparent 0 6px, rgb(15 27 45 / .035) 6px 7px); color: var(--muted); }
.tl-c-no { width: 2.6rem; } .tl-c-type { width: 7%; } .tl-c-acc { width: 6%; }
.tl-c-place { width: 5.5%; } .tl-c-time { width: 7.6rem; } .tl-c-ft { width: 4.4rem; } .tl-c-ldg { width: 5rem; }
.tl-c-def { width: 9%; } .tl-c-inv { width: 8%; } .tl-c-sign { width: 28%; }
/* Days total / Time B/F / Total time: part of the main table, so they sit under Flight Time and No of Landings */
.tl-table .tl-blank { border: 0; background: none; }
.tl-foot .tl-spacer td { height: .9rem; border: 0; background: none; }
.tl-foot td, .tl-foot th { height: 2.4rem; }
.tl-table .tl-sumlabel { text-align: center; text-transform: uppercase; }
.tl-next { vertical-align: middle !important; padding: 0 .4rem 0 0 !important; }
.tl-next p { margin: 0; text-transform: uppercase; line-height: 1.35; }
.tl-next p + p { margin-top: .55rem; }
.tl-gap { display: inline-block; min-width: 2.5rem; text-align: center; font-weight: 700; }
.tl-line { display: inline-block; min-width: 9rem; border-bottom: 1px dotted var(--muted); }

.tl-deice { padding: .3rem .75rem !important; vertical-align: middle !important; }
.tl-deice p { display: flex; align-items: baseline; gap: .4rem; margin: 0; line-height: 1.55; }
.tl-deice .tl-line { flex: 1; min-width: 0; }
.tl-sub { margin: .25rem 0 -.4rem; font-size: .9rem; text-transform: uppercase; text-align: center; }
.tl-defects td { height: 2.4rem; }
.tl-defects thead th { text-align: left; }
.tl-sign, .tl-cert { padding: .4rem .6rem !important; height: auto !important; }
.tl-sign { display: table-cell; }
.tl-sign span + span { float: right; }
.tl-bottom { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.tl-fuel td, .tl-check td { height: 1.9rem; }
.tl-check tbody th { width: 30%; }
.techlog-actions { justify-content: flex-start; }
.techlog-actions .techlog-saved { margin: 0 auto 0 0; }
.techlog-status { margin: 0; padding: .35rem .75rem; border-radius: 999px; font-size: .85rem; font-weight: 600; background: var(--sky-50); color: var(--muted); }
.techlog-status[data-tone="ok"] { background: rgb(34 197 94 / .12); color: #15803d; }
.techlog-status[data-tone="bad"] { background: rgb(239 68 68 / .1); color: #b42318; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .techlog-status[data-tone="ok"] { color: #86efac; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .techlog-status[data-tone="bad"] { color: #fca5a5; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .techlog-scroll { background: var(--surface); }
html[data-theme="dark"] body.page-admin:not(.is-signin) .techlog-pager input[type="date"] { background: var(--sky-50); color: var(--ink); color-scheme: dark; }
html[data-theme="dark"] body.page-admin:not(.is-signin) :is(.tl-table th, .tl-table td) { border-color: #3a4c66; }
html[data-theme="dark"] body.page-admin:not(.is-signin) :is(.tl-table thead th, .tl-table tbody th, .tl-calc) { background: #13233a; }
html[data-theme="dark"] body.page-admin:not(.is-signin) :is(.tl-main input:focus, .tl-main select:focus) { background: #0b1729; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-main select { color-scheme: dark; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-main input[type="time"] { color-scheme: dark; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-off { background: repeating-linear-gradient(135deg, transparent 0 6px, rgb(255 255 255 / .035) 6px 7px); }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-calc.is-bad { color: #fca5a5; background: rgb(239 68 68 / .18); }

/* Settings > General: two-step sign-in (optional) */
.twostep-card h2 { display: flex; align-items: center; gap: .6rem; }
.twostep-card h2 .status { font-size: .75rem; }
.twostep-form { display: grid; gap: 1rem; max-width: 640px; }
.twostep-form[hidden] { display: none; }
.twostep-form .field { margin: 0; max-width: 240px; }
.twostep-form .form-error { margin: 0; }
.twostep-buttons { display: flex; gap: .75rem; flex-wrap: wrap; }
.twostep-card .form-success { margin: 0; }

/* Settings > Tech Logs */
.tls-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem 1.25rem; max-width: 980px; }
.tls-grid .field { margin: 0; }
.tls-grid select, .tls-grid input { width: 100%; }
.techlog-settings .form-error { margin: 0; }
.tl-next p { font-size: 1.05rem; font-weight: 600; white-space: nowrap; }
.tl-next .tl-line { min-width: 0; font-weight: 700; font-variant-numeric: tabular-nums; padding: 0 .25rem; text-align: center; }
.tl-next .tl-line:empty { min-width: 6rem; }

.tl-next .is-over { color: #b42318; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-next .is-over { color: #fca5a5; }

/* Tech Logs: Check A / Daily Inspection */
.tl-check input[type="time"] { width: 100%; height: 100%; min-height: 1.9rem; padding: .2rem .4rem; border: 0; background: transparent; font: inherit; color: var(--ink); }
.tl-check input[type="time"]:focus { outline: 2px solid var(--blue-600); outline-offset: -2px; background: var(--sky-50); }
.tl-checka-val { text-align: left !important; padding-left: .5rem !important; }
.tl-sign-cell { padding: 0 !important; }
.tl-sign-btn { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 2.6rem; padding: .2rem .4rem; border: 0; background: transparent; font: inherit; font-weight: 700; color: var(--blue-600); cursor: pointer; }
.tl-sign-btn:hover, .tl-sign-btn:focus-visible { background: var(--sky-50); outline: none; }
.tl-sign-btn.is-signed { padding: .15rem; }
.tl-sign-btn.is-signed { flex-direction: column; gap: .1rem; }
.tl-sign-name { font-size: .78rem; font-weight: 600; color: var(--ink); }
.tl-sign-btn img { display: block; max-width: 100%; max-height: 3.2rem; padding: .15rem .4rem; border-radius: 6px; background: #fff; }
.tl-check.is-needed { outline: 3px solid #f59e0b; outline-offset: 2px; border-radius: 4px; }
.tl-gate { margin: 0 0 -.4rem; padding: .7rem 1rem; border-radius: 10px; background: rgb(245 158 11 / .14); border: 1px solid rgb(245 158 11 / .45); color: var(--ink); font-size: .9rem; }
.tl-gate .link-btn { margin-left: .4rem; }
.sign-dialog { width: min(680px, calc(100vw - 2rem)); }
.sign-pad { position: relative; border: 1.5px dashed var(--line); border-radius: 12px; background: #fff; touch-action: none; }
.sign-pad canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; cursor: crosshair; touch-action: none; }
.sign-line { position: absolute; left: 6%; right: 6%; bottom: 22%; border-bottom: 1px solid #c7d2e0; pointer-events: none; }
.sign-actions { flex-wrap: wrap; }
.sign-actions [data-sign-clear] { margin-left: auto; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-sign-btn { color: #9ccbf5; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-check input[type="time"] { color-scheme: dark; }
.sign-name { margin: 0; max-width: 320px; }

/* Settings > General: saved signature */
.mysig-saved { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.mysig-img { padding: .5rem .9rem; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.mysig-img img { display: block; max-height: 4.5rem; max-width: 280px; }
.mysig-saved p { margin: 0; display: grid; gap: .15rem; }
.mysig-saved small { color: var(--muted); }
.mysig-form { display: grid; gap: .9rem; max-width: 640px; }
.mysig-form .form-error, .mysig-form .form-success { margin: 0; }
.mysig-pad-label { display: block; margin-bottom: .35rem; font-size: .9rem; font-weight: 600; color: var(--ink); }
.tl-main .tl-initials input { text-align: center; font-weight: 700; cursor: default; }
.tl-main .tl-initials input:focus { outline: none; background: transparent; }

/* Tech Logs: ICAO codes, defects */
.tl-main input.tl-icao { text-align: center; letter-spacing: .02em; }
.tl-main td.is-bad input.tl-icao { background: rgb(239 68 68 / .12); }
.tl-defect-cell { text-align: center; }
.tl-declare { margin: .25rem; padding: .3rem .7rem; border: 1.5px solid var(--blue-600); border-radius: 999px; background: none; font: inherit; font-size: .8rem; font-weight: 700; color: var(--blue-600); cursor: pointer; }
.tl-declare:hover, .tl-declare:focus-visible { background: var(--blue-600); color: #fff; outline: none; }
.tl-defect-val { font-weight: 700; }
.tl-grounded { margin: 0 0 -.4rem; padding: .75rem 1rem; border-radius: 10px; background: rgb(239 68 68 / .14); border: 1.5px solid rgb(239 68 68 / .55); color: #b42318; }
.tl-rect-defect { padding: .35rem .6rem !important; }
.tl-rect-defect small { display: block; color: var(--muted); font-size: .75rem; }
.tl-severe-tag { display: inline-block; margin-left: .4rem; padding: .05rem .45rem; border-radius: 999px; background: #b42318; color: #fff; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.defect-dialog { width: min(640px, calc(100vw - 2rem)); }
.defect-choice { display: flex; gap: .75rem; flex-wrap: wrap; }
.defect-details { display: grid; gap: 1rem; }
.defect-details textarea { width: 100%; padding: .75rem .9rem; font: inherit; color: var(--ink); background: var(--sky-50); border: 1.5px solid var(--line); border-radius: 12px; resize: vertical; }
.radio-row.is-severe:has(input:checked) { border-color: #b42318; }

.count-badge { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: 999px; background: #d97706; color: #fff; font-size: .75rem; font-weight: 700; }
.count-badge[hidden] { display: none; }
.deferred-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; max-height: min(60vh, 520px); overflow: auto; }
.deferred-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 12px; }
.deferred-item.is-done { opacity: .7; }
.deferred-desc { margin: 0 0 .2rem; font-weight: 600; color: var(--ink); }
.deferred-meta { margin: 0; font-size: .8rem; color: var(--muted); }
.deferred-sub { margin-top: .5rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-declare { color: #9ccbf5; border-color: #3f7fbf; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-declare:hover { color: #fff; background: var(--blue-600); }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-grounded { color: #fca5a5; }

/* From / To airfield search */
.ap-list { position: fixed; z-index: 50; width: 370px; max-width: calc(100vw - 1rem); margin: 0; padding: .35rem; list-style: none; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.ap-list[hidden] { display: none; }
.ap-list li { display: grid; grid-template-columns: 3.6rem minmax(0, 1fr); gap: .6rem; align-items: start; padding: .45rem .6rem; border-radius: 8px; cursor: pointer; font-size: .85rem; color: var(--ink); }
.ap-list li strong { font-variant-numeric: tabular-nums; letter-spacing: .03em; color: var(--blue-600); }
.ap-list li span { min-width: 0; }
.ap-list li small { display: block; color: var(--muted); font-size: .75rem; }
.ap-list li.is-active, .ap-list li:hover { background: var(--sky-100); }
.ap-list .ap-none { display: block; cursor: default; color: var(--muted); }
html[data-theme="dark"] body.page-admin:not(.is-signin) .ap-list { background: var(--surface); }
html[data-theme="dark"] body.page-admin:not(.is-signin) .ap-list li strong { color: #9ccbf5; }

/* Tech Logs: archived aircraft, and Settings > Tech Logs > Aircraft */

.techlog-nav .ac-archived-toggle { display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: var(--muted); font-size: .9rem; }
.techlog-nav .ac-archived-toggle .icon { width: 1.1rem; height: 1.1rem; transition: transform .2s; }
.techlog-nav .ac-archived-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.techlog-nav [data-ac-archived] { margin-top: .2rem; }
.techlog-nav [data-ac-archived] button { opacity: .85; }
.ac-add { display: flex; gap: 1rem; align-items: end; flex-wrap: wrap; }
.ac-add .field { margin: 0; width: 12rem; }
.ac-card .form-error, .ac-card .form-success { margin: 0; }
.ac-manage { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; max-width: 560px; }
.ac-manage li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 10px; }
.ac-manage li small { color: var(--muted); }
.ac-manage li.is-archived strong { color: var(--muted); }
.ac-manage .ac-buttons { display: flex; gap: .5rem; }
.export-btn { display: inline-flex; align-items: center; gap: .45rem; }
.export-btn .icon { width: 1.1rem; height: 1.1rem; }
.export-dialog { width: min(600px, calc(100vw - 2rem)); }
.export-dialog textarea { width: 100%; padding: .75rem .9rem; font: inherit; color: var(--ink); background: var(--sky-50); border: 1.5px solid var(--line); border-radius: 12px; resize: vertical; }
.export-date input { max-width: 14rem; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .export-dialog { background: var(--surface); }
.export-part { display: grid; gap: 1rem; }
.export-part[hidden] { display: none; }

.service-dialog { width: min(560px, calc(100vw - 2rem)); }
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; }
.service-grid select, .service-grid input { width: 100%; }

html[data-theme="dark"] body.page-admin:not(.is-signin) .service-dialog { background: var(--surface); }

/* Tech Logs: End of day */
.tl-locked { margin: 0 0 -.4rem; padding: .7rem 1rem; border-radius: 10px; background: rgb(11 99 179 / .12); border: 1.5px solid rgb(11 99 179 / .4); color: var(--ink); font-size: .9rem; }
.techlog-sheet.is-locked .tl-main input, .techlog-sheet.is-locked .tl-main select { cursor: not-allowed; }
.tl-nil-row .tl-rect-defect strong { letter-spacing: .05em; }
.tl-eod-sign { padding: .25rem .5rem !important; text-align: center; }
.tl-eod-sign img { display: block; max-height: 2.4rem; max-width: 100%; margin: 0 auto .1rem; padding: .1rem .35rem; border-radius: 6px; background: #fff; }
.tl-eod-sign span { display: block; font-weight: 700; font-size: .8rem; }
.tl-eod-sign small { display: block; color: var(--muted); font-size: .72rem; }
.eod-dialog { width: min(660px, calc(100vw - 2rem)); }
.eod-sign { display: grid; gap: .8rem; }
.eod-signed { margin: 0; font-weight: 600; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .eod-dialog { background: var(--surface); }

/* Admin: confirmations and messages shown in the page */
.ask-dialog { width: min(480px, calc(100vw - 2rem)); }
.ask-dialog .ask-title { margin: 0; font-size: 1.15rem; line-height: 1.35; }
.ask-dialog .ask-body:empty { display: none; }
.ask-dialog .ask-body p { margin: 0 0 .6rem; color: var(--body); line-height: 1.5; overflow-wrap: anywhere; }
.ask-dialog .ask-body p:last-child { margin-bottom: 0; }
.ask-dialog .ask-actions { justify-content: flex-end; }
.ask-dialog .ask-actions [hidden] { display: none; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .ask-dialog { background: var(--surface); }

/* Tech Logs: Fuel and Oil Report, Captain's signature at End of day */
.tl-fuel input { width: 100%; height: 100%; min-height: 2.2rem; padding: .2rem .35rem; border: 0; background: transparent; font: inherit; color: var(--ink); text-align: center; }
.tl-fuel input:focus { outline: 2px solid var(--blue-600); outline-offset: -2px; background: var(--sky-50); }
.tl-fuel input.tl-icao { letter-spacing: .02em; }
.tl-fuel td.is-bad input { background: rgb(239 68 68 / .12); }
.tl-fuel td { height: 2.4rem; }
.tl-fuel .tl-sign-btn { min-height: 2.2rem; font-size: .8rem; }
.tl-fuel .tl-sign-btn img { max-height: 1.8rem; }
.tl-fuel .tl-sign-btn .tl-sign-name { font-size: .7rem; }
.tl-unit-fixed { font-weight: 600; }
.tl-fuel.is-needed { outline: 3px solid #f59e0b; outline-offset: 2px; border-radius: 4px; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-fuel input:focus { background: #0b1729; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-fuel input[type="time"] { color-scheme: dark; }
.tl-sign-eod { display: table-cell; padding: .3rem .6rem !important; }
.tl-sign-eod { position: relative; }
.tl-eod-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .5rem; }
.tl-eod-grid > span:last-child { justify-self: end; }
.tl-sign-eod span + span { float: none; }
.tl-sign-eod .tl-captain { display: flex; flex-direction: column; align-items: center; gap: .1rem; }
.tl-sign-eod .tl-captain img { display: block; max-height: 2.2rem; padding: .1rem .35rem; border-radius: 6px; background: #fff; }
.tl-sign-eod .tl-captain b { font-size: .8rem; }

/* Rows No. 1-6: everything centred */
.tl-main input, .tl-main select { text-align: center; text-align-last: center; }
.tl-main td { text-align: center; }
/* Fuel and Oil: oil uplift list, Sign / Time held back until the line has something in it, low oil */
.tl-fuel select { width: 100%; height: 100%; min-height: 2.2rem; padding: .2rem .35rem; border: 0; background: transparent; font: inherit; color: var(--ink); text-align: center; text-align-last: center; cursor: pointer; }
.tl-fuel select option { color: #0f1b2d; background: #fff; }
.tl-fuel select:focus { outline: 2px solid var(--blue-600); outline-offset: -2px; background: var(--sky-50); }
.tl-fuel-later.is-waiting > * { visibility: hidden; }
.tl-fuel td.is-low input { background: rgb(245 158 11 / .22); font-weight: 700; }
.tl-oil-warning { margin: .5rem 0 0; padding: .6rem .8rem; border: 1px solid #f59e0b; border-radius: 8px; background: #fef3c7; color: #78350f; font-size: .85rem; }
.tl-tip { position: fixed; z-index: 1000; max-width: 260px; padding: .45rem .65rem; border-radius: 8px; background: #0f1b2d; color: #fff; font-size: .8rem; line-height: 1.35; box-shadow: 0 6px 18px rgb(0 0 0 / .25); pointer-events: none; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-fuel select { color-scheme: dark; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-fuel select:focus { background: #0b1729; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-tip { background: #e6eefb; color: #0f1b2d; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-oil-warning { background: rgb(245 158 11 / .15); color: #fde68a; }

/* Ground De-Icing: YES / NO choice, times when YES, signature */
.tl-deice-pick { display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: .35rem; margin: 0; padding: .15rem 0; border: 0; }
.tl-deice-pick legend { float: left; margin-right: .2rem; padding: 0; font-weight: 600; white-space: nowrap; }
.tl-deice-pick label { position: relative; cursor: pointer; }
.tl-deice-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tl-deice-pick span { display: inline-block; min-width: 2.6rem; padding: .12rem .5rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 700; font-size: .78rem; text-align: center; }
.tl-deice-pick input:checked + span { border-color: var(--blue-600); background: var(--blue-600); color: #fff; }
.tl-deice-pick input:focus-visible + span { outline: 2px solid var(--blue-600); outline-offset: 2px; }
.tl-deice-pick input:disabled + span { opacity: .6; cursor: not-allowed; }
.tl-deice p { align-items: center; }
.tl-deice p[hidden] { display: none; }
.tl-deice input[type="time"] { flex: 1; min-width: 0; padding: .1rem .3rem; border: 0; border-bottom: 1px dotted var(--line); background: transparent; font: inherit; color: var(--ink); text-align: center; font-variant-numeric: tabular-nums; }
.tl-deice input[type="time"]:focus { outline: 2px solid var(--blue-600); outline-offset: 0; background: var(--sky-50); }
.tl-deice input.is-bad { background: rgb(239 68 68 / .12); }
.tl-deice .tl-deice-sign { flex: 1; min-height: 1.9rem; width: auto; font-size: .8rem; }
.tl-deice .tl-deice-sign img { max-height: 1.8rem; }
.tl-deice .tl-deice-sign .tl-sign-name { font-size: .7rem; }
.tl-deice-hint { justify-content: center; color: var(--muted, #64748b); font-size: .8rem; font-style: italic; }
td.is-needed[data-deice-box], td.is-needed[data-deice-body] { outline: 3px solid #f59e0b; outline-offset: -3px; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-deice input[type="time"] { color-scheme: dark; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-deice input[type="time"]:focus { background: #0b1729; }
/* Ground De-Icing box: compact boxes (not the full-height row inputs), and the two rows it spans sized to hold it,
   because Chrome doesn't grow the table for a taller box that spans rows */
.tl-main .tl-deice input[type="time"] { width: auto; height: auto; min-height: 0; padding: .05rem .3rem; }
.tl-main .tl-deice .tl-deice-sign { min-height: 0; padding: .1rem; }
.tl-deice p { line-height: 1.35; }
.tl-main tr:has(> [data-deice-body]) + tr > *, .tl-main tr:has(> [data-deice-body]) + tr + tr > * { height: 3.4rem; }
/* One Ground De-Icing box (one outline when it still needs doing): the YES / NO choice at the top */
.tl-deice-one .tl-deice-pick { margin-bottom: .2rem; }

/* Time B/F and Total Time: larger figures */
.tl-main output[name="time-bf"], .tl-main output[name="total-time"], .tl-main output[name="day-flight"], .tl-main output[name="day-landings"] { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Columns: a wider Flight Time (its day total, Time B/F and Total Time sit under it), No of Landings beside it,
   Invoice Number a third narrower and No of defects trimmed so the table keeps its width */
.tl-main .tl-c-ft { width: 6.4rem; }
.tl-main .tl-c-def { width: 8.5%; }
.tl-main .tl-c-inv { width: 5.33%; }
/* Ground De-Icing heading: label on its own line above YES / NO (the box is narrower now) */
.tl-deice-pick { flex-wrap: wrap; row-gap: .2rem; }
.tl-deice-pick legend { float: none; width: 100%; margin: 0; text-align: center; }
/* Pilots Acceptance a third narrower (2 x 6% -> 2 x 4%); Invoice Number takes the 4% so the table keeps its width */
.tl-main .tl-c-acc { width: 4%; }
.tl-main .tl-c-inv { width: 9.33%; }

/* The row that has to be finished before the next one can be started */
.tl-main tr.is-needed > td { box-shadow: inset 0 0 0 9999px rgb(245 158 11 / .12); }
.tl-main tr.is-needed > td:first-child { box-shadow: inset 3px 0 0 #f59e0b, inset 0 0 0 9999px rgb(245 158 11 / .12); }

/* Rectify defect */
.tl-rect-action { text-align: center; vertical-align: middle !important; }
.tl-rectify-btn { padding: .3rem .8rem; border: 1px solid #dc2626; border-radius: 999px; background: #fef2f2; color: #b91c1c; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }
.tl-rectify-btn:hover, .tl-rectify-btn:focus-visible { background: #dc2626; color: #fff; outline: none; }
.tl-severe-tag.is-done { background: #dcfce7; color: #166534; border-color: #86efac; }
.rect-dialog textarea { width: 100%; resize: vertical; }
.rect-who { display: grid; grid-template-columns: 1fr auto; gap: .75rem; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-rectify-btn { background: rgb(220 38 38 / .15); color: #fca5a5; border-color: #f87171; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-rectify-btn:hover { background: #dc2626; color: #fff; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-severe-tag.is-done { background: rgb(34 197 94 / .15); color: #86efac; border-color: #22c55e; }
.tl-grounded .link-btn { color: inherit; font-weight: 700; text-decoration: underline; }

/* Update dialog: Variation on top, then Service done */
.variation-box { display: grid; gap: .5rem; justify-items: start; margin-bottom: 1rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--sky-50); }
.variation-box h3, .service-sub { margin: 0; font-size: 1rem; }
.variation-box .hint { margin: 0; }
.variation-now { margin: 0; font-weight: 600; }
.service-sub { margin-bottom: .25rem; }
.tl-svc-tag { display: inline-block; margin-left: .25rem; padding: .05rem .45rem; border-radius: 999px; background: #dcfce7; color: #166534; font-size: .7rem; font-weight: 700; vertical-align: middle; }
.tl-svc-tag.is-var { background: #fef3c7; color: #92400e; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .variation-box { background: rgb(255 255 255 / .04); }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-svc-tag { background: rgb(34 197 94 / .15); color: #86efac; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-svc-tag.is-var { background: rgb(245 158 11 / .15); color: #fcd34d; }
/* Settings > Users: no title; Add user and the list start at the top of the panel, the count sits under the list */

.users-panel .users-stats { margin: .75rem 0 0; }
.admin-toolbar > [data-users-only] { align-self: flex-start; margin-top: .35rem; }
.users-panel .table-wrap + .users-stats { margin-top: -1rem; }

/* Settings > Users: role menu in the Role column */
.users-table .role-select { width: 100%; max-width: 150px; padding: .35rem .45rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--sky-50); font: inherit; font-size: .85rem; color: var(--ink); cursor: pointer; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .users-table .role-select { color-scheme: dark; }
.tl-readonly { margin-bottom: .75rem; }

/* Export: Raw Tech Log pages (pages are drawn behind the dialog while the PDF is made) */
.export-progress { margin: 0; font-weight: 600; }
.techlog-sheet.is-exporting { visibility: hidden; }

/* Export: two fields side by side (From / To, Month / Year) */
.export-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.export-pair input, .export-pair select, .export-part > .field > select { width: 100%; }
@media (max-width: 420px) { .export-pair { grid-template-columns: 1fr; } }

/* Settings > Tech Logs: Automatic End of day */
.autoeod-card { margin-bottom: 1.25rem; }
.autoeod-row { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem 2rem; }
.autoeod-row .switch { flex: 1 1 260px; align-self: center; }
.autoeod-time input { width: 10rem; }

/* Tech Logs aircraft list: hours left before the next check (yellow at 20.00 or less, red at 10.00 or less) */

/* Aircraft list: orange (10.00 hrs or less); red is 0.00 or less, or grounded */

/* Tech log page: Next check hours and date on the left; Hours Left / Days Left coloured as a warning */
.tl-next p { text-align: left; }
.tl-next [data-warn="yellow"], .tl-next [data-warn="orange"], .tl-next [data-warn="red"] { border-bottom-color: transparent; border-radius: 6px; padding: .05rem .4rem; }
.tl-next [data-warn="yellow"] { background: #fef3c7; color: #78350f; }
.tl-next [data-warn="orange"] { background: #ffedd5; color: #9a3412; }
.tl-next [data-warn="red"] { background: #fee2e2; color: #991b1b; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-next [data-warn="yellow"] { background: rgb(245 158 11 / .3); color: #fde68a; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-next [data-warn="orange"] { background: rgb(249 115 22 / .32); color: #fed7aa; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-next [data-warn="red"] { background: rgb(239 68 68 / .32); color: #fecaca; }

/* Delete buttons for defects (Administrators) */
.tl-defect-del { margin-left: .4rem; padding: .05rem .45rem; border: 1px solid #fca5a5; border-radius: 6px; background: none; color: #b42318; font: inherit; font-size: .7rem; font-weight: 700; cursor: pointer; }
.tl-defect-del:hover { background: #fee2e2; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-defect-del { color: #fca5a5; border-color: rgb(252 165 165 / .5); }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-defect-del:hover { background: rgb(239 68 68 / .2); }
.deferred-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* Aircraft grounded message: flashes a bold red outline for 3 seconds when something is blocked by the grounding */
@keyframes tl-grounded-flash { 0%, 100% { box-shadow: 0 0 0 3px #dc2626; } 50% { box-shadow: 0 0 0 3px transparent; } }
.tl-grounded.is-flashing { border-color: #dc2626; animation: tl-grounded-flash .5s ease-in-out 6; }
@media (prefers-reduced-motion: reduce) { .tl-grounded.is-flashing { animation: none; box-shadow: 0 0 0 3px #dc2626; } }

/* ---------- Technical Logs: fleet cards, photos, cards, pills, tabs and squares ---------- */
.tln { display: grid; gap: 1.25rem; }
.tln-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.tln-top h1 { margin: 0; }
.tln-top .admin-stats { margin: .15rem 0 0; }
.tln-title { display: flex; align-items: center; gap: .9rem; }

.tln-muted { color: var(--muted); margin: 0; }
.tln-small { font-size: .85rem; color: var(--muted); margin: 0; }
.tln-amber { color: #b45309; font-weight: 600; }

.tln-pill { display: inline-flex; align-items: center; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.tln-pill.is-green { background: #dcfce7; color: #166534; } .tln-pill.is-amber { background: #fef3c7; color: #92400e; } .tln-pill.is-red { background: #fee2e2; color: #991b1b; }
.tln-warn[data-warn="yellow"] { color: #a16207; } .tln-warn[data-warn="orange"] { color: #c2410c; } .tln-warn[data-warn="red"] { color: #b91c1c; }
/* Fleet */
.tln-fleet { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.tln-ac { display: grid; gap: .9rem; padding: 1.1rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface, #fff); box-shadow: var(--shadow-sm); text-align: left; font: inherit; color: var(--ink); cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s; }
.tln-ac:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tln-ac-head { display: flex; align-items: baseline; gap: .5rem; } .tln-ac-head strong { font-size: 1.3rem; } .tln-ac-head small { color: var(--muted); font-weight: 600; } .tln-ac-head .tln-pill { margin-left: auto; }
.tln-ac-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.tln-ac-stats span { display: grid; gap: .1rem; } .tln-ac-stats small { color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.tln-ac-stats b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.tln-ac-foot { display: flex; justify-content: space-between; gap: .5rem; font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .7rem; }
/* Aircraft day */

.tln-card { padding: 1.1rem 1.2rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface, #fff); box-shadow: var(--shadow-sm); display: grid; gap: .8rem; }
.tln-card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; } .tln-card-head h2 { margin: 0; font-size: 1.1rem; }

.tln-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.tln-list li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .65rem 0; border-top: 1px solid var(--line); } .tln-list li:first-child { border-top: 0; }
.tln-list small { display: block; color: var(--muted); font-size: .82rem; margin-top: .1rem; }
.tln-check { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 2px solid var(--line); font-weight: 800; font-size: .85rem; color: #fff; }
.tln-check.is-ok { background: #16a34a; border-color: #16a34a; }

/* Dialogs */

.tln-two { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; } @media (max-width: 560px) { .tln-two { grid-template-columns: 1fr; } }
.tln-two[hidden] { display: none; }

.tln-pad { position: relative; border: 1.5px dashed var(--line); border-radius: 10px; background: #fff; }
.tln-pad canvas { display: block; width: 100%; height: 140px; touch-action: none; cursor: crosshair; }
.tln-pad-hint { position: absolute; inset: 0; display: grid; place-items: center; color: #94a3b8; pointer-events: none; }
.tln-sig-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tln-pill.is-green { background: rgb(34 197 94 / .18); color: #86efac; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tln-pill.is-amber { background: rgb(245 158 11 / .18); color: #fcd34d; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tln-pill.is-red { background: rgb(239 68 68 / .22); color: #fca5a5; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tln-warn[data-warn="yellow"] { color: #fcd34d; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tln-warn[data-warn="orange"] { color: #fdba74; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tln-warn[data-warn="red"] { color: #fca5a5; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tln-amber { color: #fcd34d; }

.tln-card > .btn { justify-self: start; }

/* Technical Logs: a flight row is the flight (opens its details) and, while pending, Complete flight */

/* Technical Logs: left cards end at the Total Time tile; Defects + Documents and End of day on the right */

.tln-docs { aspect-ratio: 1; place-content: center; justify-items: center; gap: .6rem; font: inherit; color: var(--ink); cursor: pointer; text-align: center; }
.tln-docs svg { width: 3rem; height: 3rem; color: var(--blue-600); }
.tln-docs span { font-weight: 700; }
.tln-docs:hover { border-color: var(--blue-500); box-shadow: var(--shadow); }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tln-docs svg { color: #8cc4f5; }

/* Technical Logs: aircraft photos, two square boxes beside Defects */
.tln-ac-photo { display: block; margin: -1.1rem -1.2rem 0; aspect-ratio: 16 / 7; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; background: var(--sky-50); }
.tln-ac-photo img, .tln-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tln-ac-photo.is-empty img, .tln-photo.is-empty img { display: none; }
.tln-photo { position: relative; flex: none; width: 168px; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--sky-50); border: 1px solid var(--line); }
.tln-photo-btn { position: absolute; left: .35rem; bottom: .35rem; padding: .15rem .5rem; border: 0; border-radius: 999px; background: rgb(6 22 43 / .72); color: #fff; font: inherit; font-size: .7rem; font-weight: 700; cursor: pointer; opacity: 0; transition: opacity .15s; }
.tln-photo:hover .tln-photo-btn, .tln-photo-btn:focus-visible, .tln-photo.is-empty .tln-photo-btn { opacity: 1; }

@media (max-width: 700px) { .tln-photo { width: 110px; } }

/* Technical Logs: Defects, Documents and Mass & Balance / Performance as three squares; Defects shows its open count */

/* Technical Logs: the badge on a fleet card (Simulator) */
.tln-ac-air { justify-self: start; display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--sky-50); color: var(--muted); border: 1px solid var(--line); }
.tln-ac-air::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; opacity: .6; }

/* Technical Logs: order of the fleet cards, top right */
.tln-order { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .9rem; color: var(--muted); }
.tln-order select { padding: .55rem 2rem .55rem .8rem; border: 1.5px solid var(--line); border-radius: 10px; background-color: var(--sky-50); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }

/* Technical Logs: four squares (Defects, Mass & Balance / Performance, Documents, Export) */

/* Raw Tech Log pages export: the Technical Logs page is drawn off screen */

/* Technical Logs: Mass & Balance / Performance (tabs, the PA28 2325 sheet and the Weight vs C.G. envelope) */
.tln-tabs { display: flex; gap: .4rem; border-bottom: 1px solid var(--line); }
.tln-tabs button { padding: .6rem 1rem; border: 0; border-bottom: 3px solid transparent; background: none; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.tln-tabs button[aria-selected="true"] { color: var(--blue-600); border-bottom-color: var(--blue-600); }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tln-tabs button[aria-selected="true"] { color: #8cc4f5; border-bottom-color: #8cc4f5; }
.tln-mb { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1100px) { .tln-mb { grid-template-columns: 1fr; } }
.tln-mb-title { margin: 0; font-size: 1.15rem; text-decoration: underline; text-align: center; }
.tln-mb-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tln-mb-table th, .tln-mb-table td { border: 1.5px solid var(--ink); padding: .45rem .5rem; text-align: center; height: 2.6rem; }
.tln-mb-table thead th { font-weight: 800; }
.tln-mb-table tbody th { font-weight: 500; width: 34%; }
.tln-mb-table tbody th small { display: block; font-size: .8rem; color: var(--muted); }
.tln-mb-table td { width: 22%; }
.tln-mb-table input { width: 100%; max-width: 7rem; padding: .3rem .4rem; text-align: center; font: inherit; border: 1.5px solid var(--line); border-radius: 6px; background: var(--sky-50); color: var(--ink); }
.tln-mb-table input.is-bad { border-color: #dc2626; }
.tln-mb-total th, .tln-mb-total td { font-weight: 800; height: 3.2rem; }
.tln-mb-total td.is-cg { outline: 2px solid #dc2626; outline-offset: -3px; }
.tln-mb-total td.is-grey { background: #5f5f5f; }
.tln-mb-total.is-out td { color: #b42318; }
.tln-mb-warn { margin: 0; padding: .7rem .9rem; border-radius: 10px; background: rgb(239 68 68 / .12); border: 1.5px solid rgb(239 68 68 / .5); color: #b42318; font-weight: 600; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tln-mb-warn { color: #fca5a5; }
.tln-mb-sign { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem 1rem; }
.tln-mb-sign > div.field { grid-column: 1 / -1; }
.tln-mb-sign input { width: 100%; }
.tln-mb-pad canvas { height: 110px; }
.tln-mb-actions { display: flex; justify-content: flex-end; gap: .6rem; }
.tln-mb-chart h2 { margin: 0; font-size: 1.05rem; }
.tln-env { width: 100%; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.tln-env .g { stroke: #cbd5e1; stroke-width: 1; } .tln-env .g5 { stroke: #94a3b8; }
.tln-env .env { fill: rgb(11 99 179 / .08); stroke: #0f1b2d; stroke-width: 2.2; stroke-linejoin: round; }
.tln-env .util { stroke: #0f1b2d; stroke-width: 1.4; stroke-dasharray: 8 5; }
.tln-env .tx { font: 11px var(--font); fill: #334155; } .tln-env .lbl { font-weight: 700; font-size: 10.5px; fill: #0f1b2d; } .tln-env .ax { font-weight: 700; font-size: 11px; fill: #0f1b2d; } .tln-env .pl { font-weight: 800; font-size: 12px; fill: #0f1b2d; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.tln-env .trail { fill: none; stroke: #64748b; stroke-width: 1.6; stroke-dasharray: 4 3; }
.tln-env .pt circle { stroke: #fff; stroke-width: 2; }
.tln-env .pt.is-zfw circle { fill: #0b63b3; } .tln-env .pt.is-tow circle { fill: #16a34a; } .tln-env .pt.is-ldg circle { fill: #f59e0b; }
.tln-env .pt.is-out circle { fill: #dc2626; }
.tln-mb-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: .9rem; }
.tln-mb-legend li { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tln-mb-dot { width: .8rem; height: .8rem; border-radius: 50%; display: inline-block; }
.tln-mb-legend .is-zfw .tln-mb-dot { background: #0b63b3; } .tln-mb-legend .is-tow .tln-mb-dot { background: #16a34a; } .tln-mb-legend .is-ldg .tln-mb-dot { background: #f59e0b; }
/* Print / Save as PDF: only the sheet and the envelope */
@media print {
  body.is-printing-mb * { visibility: hidden; }
  body.is-printing-mb .tln-mb-print, body.is-printing-mb .tln-mb-print * { visibility: visible; }
  body.is-printing-mb .tln-mb-print { position: absolute; left: 0; top: 0; width: 100%; color: #000; }
  body.is-printing-mb .tln-mb-actions, body.is-printing-mb .tln-sig-actions, body.is-printing-mb .tln-pad-hint { display: none !important; }
  body.is-printing-mb .tln-card { box-shadow: none; border: 0; background: #fff; }
  body.is-printing-mb .tln-mb { grid-template-columns: 1.15fr 1fr; }
  body.is-printing-mb .tln-mb-table th, body.is-printing-mb .tln-mb-table td { border-color: #000; color: #000; }
  body.is-printing-mb .tln-mb-table input { border: 0; background: none; color: #000; }
  @page { size: A4 landscape; margin: 10mm; }
}

/* Technical Logs: airworthiness documents */

/* Technical Logs: Delete flight sits on the left of the dialog buttons */
.import-actions .tln-dlg-left { margin-right: auto; }

/* Tech Logs: Delete flight (administrators), in the row number box */
.tl-table th.tl-no { position: relative; }
.tl-row-del { display: block; margin: .15rem auto 0; padding: .1rem; border: 0; border-radius: 4px; background: none; color: #b42318; cursor: pointer; line-height: 0; opacity: .55; }
.tl-row-del:hover, .tl-row-del:focus-visible { opacity: 1; background: #fee2e2; }
.tl-row-del svg { width: .85rem; height: .85rem; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-row-del { color: #fca5a5; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-row-del:hover { background: rgb(239 68 68 / .2); }
@media print { .tl-row-del { display: none !important; } }

/* ---- Technical Logs: fleet cards (last landing), the aircraft header, its pages down the side, document pages ---- */
.tl-ac-loc { gap: .35rem; color: var(--ink); }
.tl-ac-loc::before { display: none; }
.tl-ac-loc svg { width: .95rem; height: .95rem; color: var(--blue-600); flex: none; }
.tl-ac-loc small { font-weight: 500; color: var(--muted); }
.tl-archived { display: grid; gap: .8rem; }
.tl-archived .ac-archived-toggle { justify-self: start; display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .2rem; border: 0; background: none; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; }
.tl-archived .ac-archived-toggle .icon { width: 1.1rem; height: 1.1rem; transition: transform .2s; }
.tl-archived .ac-archived-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.tl-archived .tln-ac { opacity: .85; }
[data-tl-ac-view] .techlog-toolbar { align-items: center; }
[data-tl-ac-view] .tln-title h1 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); line-height: 1; }
[data-tl-ac-view] .tln-title .admin-stats { margin: .35rem 0 0; }
.tl-reg-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.techlog-nav button { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
/* On a document page the tech log, its note and the date picker step aside */
[data-tl-ac-view]:not([data-sub=""]) :is([data-techlog-form], [data-techlog-empty], .techlog-pager, [data-techlog-done]) { display: none !important; }
.tl-doc-view { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--sky-50); }
.tl-doc-view iframe { display: block; width: 100%; height: min(80vh, 900px); border: 0; }
.tl-doc-view img { display: block; max-width: 100%; margin: 0 auto; }
/* The aircraft's pages down the side: wide enough for each name on one line, with Mass & Balance / Performance below */
[data-tl-ac-view] .settings-shell { grid-template-columns: 300px minmax(0, 1fr); }
.tl-side { position: sticky; top: 1.5rem; display: grid; gap: 1rem; }
.tl-side .settings-nav { position: static; }
.techlog-nav button { font-size: .9rem; white-space: nowrap; padding: .6rem .8rem; }
.tl-mb-square { width: 100%; aspect-ratio: auto; min-height: 9rem; padding: 1rem; }
.tl-mb-square[aria-current="page"] { border-color: var(--blue-600); box-shadow: 0 0 0 2px rgb(11 99 179 / .25); }
.tl-mb-square[hidden] { display: none; }
.tl-mb-panel { display: grid; gap: 1rem; }
.tl-mb-panel[hidden] { display: none; }
@media (max-width: 900px) {
  [data-tl-ac-view] .settings-shell { grid-template-columns: minmax(0, 1fr); }
  .tl-side { position: static; }
  .tl-mb-square { min-height: 0; grid-auto-flow: column; justify-content: start; }
  .tl-mb-square svg { width: 2rem; height: 2rem; }
}
/* A document page: just the document */
.tl-doc-panel { display: grid; gap: .8rem; }
.tl-doc-panel[hidden] { display: none; }
.tl-doc-panel .tl-doc-view iframe { height: calc(100vh - 13rem); min-height: 520px; }
.tl-doc-none { padding: 2rem 1.2rem; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }
.tl-update-dialog { width: min(560px, calc(100vw - 2rem)); }
.tl-update-reading { margin: 0; font-weight: 600; color: var(--blue-600); }
.tl-update-reading::before { content: ""; display: inline-block; width: .8rem; height: .8rem; margin-right: .5rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: tl-spin .8s linear infinite; }
@keyframes tl-spin { to { transform: rotate(360deg); } }
.tl-update-found { display: grid; gap: .6rem; }
.tl-update-found[hidden] { display: none; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-update-reading { color: #8cc4f5; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-update-dialog { background: var(--surface); }
/* A document with no file uploaded: red, with "!" */
.techlog-nav button.is-missing { color: #b91c1c; }
.techlog-nav button.is-missing[aria-current="page"] { background: #fee2e2; color: #991b1b; }
.tl-missing { flex: none; display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: #dc2626; color: #fff; font-size: .8rem; font-weight: 800; line-height: 1; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .techlog-nav button.is-missing { color: #fca5a5; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .techlog-nav button.is-missing[aria-current="page"] { background: rgb(239 68 68 / .2); color: #fecaca; }
/* The Journey Log until the aircraft's documents are all uploaded: shown, not usable */
.tl-docs-needed { background: rgb(239 68 68 / .12); border-color: rgb(239 68 68 / .5); }
.tl-docs-needed .link-btn { margin-left: 0; font-weight: 700; }
/* Days and hours to the next service, and days to the Annual: rings beside the registration, as tall as the photo */
.tl-rings { display: flex; gap: 1rem; margin-left: 1.5rem; }
.tl-rings[hidden] { display: none; }
.tl-ring { position: relative; flex: none; width: 105px; aspect-ratio: 1; } /* as tall as the photo (168 × 10/16) */
.tl-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tl-ring-track { fill: none; stroke: var(--line); stroke-width: 5; }
.tl-ring-bar { fill: none; stroke-width: 5; stroke-linecap: round; stroke: #22c55e; transition: stroke-dasharray .4s var(--ease); }
.tl-ring[data-tone="yellow"] .tl-ring-bar { stroke: #eab308; }
.tl-ring[data-tone="orange"] .tl-ring-bar { stroke: #f59e0b; }
.tl-ring[data-tone="red"] .tl-ring-bar { stroke: #ef4444; }
.tl-ring[data-tone="none"] .tl-ring-bar { stroke: transparent; }
.tl-ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; text-align: center; line-height: 1; }
.tl-ring-text b { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tl-ring-text small { font-size: .72rem; color: var(--muted); }
.tl-ring[data-tone="red"] .tl-ring-text b { color: #dc2626; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-ring[data-tone="red"] .tl-ring-text b { color: #fca5a5; }
@media (max-width: 1500px) { [data-tl-ac-view] .tln-title { flex-wrap: wrap; } }
@media (max-width: 700px) { .tl-rings { margin-left: 0; gap: .6rem; } .tl-ring { width: 69px; } .tl-ring-text b { font-size: .95rem; } .tl-ring-text small { font-size: .62rem; } } /* the photo is 110 px wide there */
/* Update: what a Certificate of Release to Service says, before it's uploaded */
.tl-update-crs[hidden] { display: none; }
.tl-crs { display: grid; gap: .45rem; margin: 0; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--sky-50); font-size: .9rem; }
.tl-crs > div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .75rem; }
.tl-crs dt { color: var(--muted); font-weight: 600; }
.tl-crs dd { margin: 0; }
.tl-crs .is-result { padding-top: .45rem; border-top: 1px solid var(--line); }
.tl-crs-warn { margin: .6rem 0 0; padding: .6rem .8rem; border-radius: 10px; background: rgb(245 158 11 / .14); border: 1px solid rgb(245 158 11 / .5); font-size: .88rem; }
.tl-svc-tag.is-crs { background: #dbeafe; color: #1e40af; cursor: help; }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-crs { background: rgb(255 255 255 / .04); }
html[data-theme="dark"] body.page-admin:not(.is-signin) .tl-svc-tag.is-crs { background: rgb(59 130 246 / .2); color: #93c5fd; }

/* Public account: Settings stay blurred behind the PIN window */
.pin-dialog { width: min(420px, calc(100vw - 2rem)); }
.pin-dialog::backdrop { background: rgb(6 22 43 / .45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
html[data-theme="dark"] body.page-admin:not(.is-signin) .pin-dialog { background: var(--surface); }
/* Rings: a small title above the number; ARC and Insurance are left out on phones */
.tl-ring-text em { font-style: normal; font-size: .62rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: .1rem; }
@media (max-width: 700px) { .tl-ring-wide { display: none; } .tl-ring-text em { font-size: .5rem; } }
/* The CRS tag on the Journey Log's Next check opens the CRS page */
a.tl-svc-tag { text-decoration: none; }
a.tl-svc-tag:hover { text-decoration: underline; }
/* Mass & Balance: the registration line, shown when the sheet is printed */
.tln-mb-reg { margin: 0; text-align: center; font-weight: 600; }
/* Technical Logs: Show hidden aircraft (Administrators) beside Order */
.tl-fleet-tools { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.tl-show-hidden { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .9rem; color: var(--muted); cursor: pointer; }
.tl-show-hidden[hidden] { display: none; }
.tl-show-hidden input { width: 1.05rem; height: 1.05rem; accent-color: var(--blue-600); }
.tln-ac-head .tln-pill + .tln-pill { margin-left: .35rem; }

/* Contact page: the map placeholder (Google Maps loads only when asked) */
.map-wrap[data-map]:not(.is-loaded) { display: grid; place-items: center; padding: 2rem 1.25rem; background: linear-gradient(135deg, var(--sky-50), #fff); filter: none; }
.map-consent { max-width: 560px; text-align: center; display: grid; gap: .6rem; justify-items: center; }
.map-consent p { margin: 0; }
.map-consent-title { display: inline-flex; align-items: center; gap: .4rem; font-weight: 800; font-size: 1.2rem; color: var(--ink); }
.map-consent-title .icon { width: 1.3rem; height: 1.3rem; color: var(--blue-600); }
.map-consent-note { font-size: .88rem; color: var(--muted); }
.map-consent-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: .4rem; }

/* Technical Logs: the columns keep their full-screen widths (zoomed in or on an iPad the page scrolls sideways instead of squashing them) */
.tl-page { min-width: 1380px; }
/* Compact header: no photo; on the Journey Log the side menu is tucked away (Show menu brings it back) */
[data-tl-ac-view].is-compact .tln-photo { display: none; }
[data-tl-ac-view].is-nav-hidden .settings-shell { grid-template-columns: minmax(0, 1fr); }
[data-tl-ac-view].is-nav-hidden .tl-side { display: none; }
.tl-under { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.tl-under[hidden] { display: none; }
.tl-nav-toggle { display: inline-flex; align-items: center; gap: .4rem; }
.tl-nav-toggle .icon { width: 1.1rem; height: 1.1rem; }
.tl-nav-toggle[hidden] { display: none; }

/* Compact header, step by step: no photo, then no ARC / Insurance rings, then no rings */
[data-tl-ac-view].is-rings-short .tl-ring-wide { display: none; }
[data-tl-ac-view].is-rings-off .tl-rings { display: none; }
/* Admin header: "Session ends in …" left out when the header would need two rows */
.admin-header.is-tight .session-timer { display: none; }
/* Narrow screens (heavily zoomed in): the aircraft's pages stay a list (not one long row that runs off to the right) */
.tl-side { min-width: 0; grid-template-columns: minmax(0, 1fr); }
@media (max-width: 860px) {
  .techlog-nav ul { grid-auto-flow: row; grid-auto-columns: auto; overflow-x: visible; }
}

/* Settings > Tech Logs > Instructors */
.ac-add .inst-name { width: 18rem; max-width: 100%; }

/* Tech log rows keep their height (zoomed in, on an iPad, or as boxes fill in): the header, each flight row (a long
   Defects entry is cut short with "...", its full text in the tooltip) and the Days total row beside Ground De-Icing,
   whose YES / NO, times and signature fit inside the three rows it spans */
.tl-main thead tr > * { height: 4.5rem; }
.tl-main tr[data-tl-row] > * { height: 2.66rem; }
.tl-main tr[data-tl-row] .tl-defect-cell { overflow: hidden; }
.tl-main tr[data-tl-row] .tl-defect-val { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tl-main .tl-foot tr:has(> [data-deice-body]) > * { height: 3.4rem; } /* Days total: as tall as Time B/F and Total time */
.tl-deice-one p { line-height: 1.25; }
.tl-deice-one .tl-deice-pick { padding: 0; margin-bottom: .1rem; }

/* FTLs: instructors down the side, the day's flights, and rings for flight time against the limits */
.ftl-shell { grid-template-columns: 300px minmax(0, 1fr); }
.ftl-toolbar .tl-rings { margin-left: 1rem; }
.ftl-table td:first-child, .ftl-table thead th:first-child { width: 6.5rem; }
.ftl-table tbody td:nth-child(n+3), .ftl-table thead th:nth-child(n+3) { width: 8.5rem; } /* the figures: fixed, so Student gets the rest */
.ftl-table tbody td:nth-child(2), .ftl-table thead th:nth-child(2) { min-width: 14rem; }
.ftl-table td:nth-child(n+3), .ftl-table thead th:nth-child(n+3), .ftl-table tfoot td { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ftl-table tfoot th, .ftl-table tfoot td { font-weight: 800; border-top: 2px solid var(--line); }
.ftl-table .ftl-none { text-align: left !important; color: var(--muted); font-style: italic; }
.ftl-card { display: grid; gap: 1rem; }
.ftl-card .hint { margin: 0; }
@media (max-width: 900px) { .ftl-shell { grid-template-columns: minmax(0, 1fr); } }

/* Settings > Users: Full name, edited in place */
.users-table .c-fullname { width: 220px; }
.user-name-cell .link-btn { margin-left: .35rem; font-size: .82rem; }
.user-noname { color: var(--muted); font-style: italic; }
.user-name-edit { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.user-name-edit input { flex: 1 1 9rem; min-width: 0; padding: .35rem .5rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--sky-50); font: inherit; font-size: .88rem; color: var(--ink); }
.users-table { min-width: 1260px; }
/* FTLs: an Instructor's own page has no menu of instructors */
.ftl-shell.is-own { grid-template-columns: minmax(0, 1fr); }
.ftl-shell[hidden] { display: none; }
.field[hidden] { display: none; }

/* Settings > General > Signature: the drawing box shows only when no signature is saved */
.mysig-pad-wrap[hidden] { display: none; }

/* Settings > Users: Add a user as a pop-up box */
.add-user-dialog { width: min(720px, calc(100vw - 2rem)); }
.add-user-dialog .add-user { display: grid; gap: 1rem; }
.add-user-dialog .add-user .add-user-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.add-user-dialog .add-user-grid .field:last-child { grid-column: 1 / -1; }
@media (max-width: 600px) { .add-user-dialog .add-user .add-user-grid { grid-template-columns: minmax(0, 1fr); } }

/* Phones (and a laptop zoomed to about 500%): no Orders tab in the header, and the tech log's buttons
   (Export, Add defect, Previous, Update, Show/Hide menu) show only their symbol */
@media (max-width: 600px) {
  .admin-tabs a[data-tab="vouchers"] { display: none; }
  /* Sign out and the light/dark switch on the logo's row; the page tabs on the row below */
  .admin-user { order: 2; flex-wrap: nowrap; }
  .admin-tabs { order: 3; flex-basis: 100%; }
  .export-btn .btn-label { display: none; }
  .export-btn { gap: 0; padding-left: .85rem; padding-right: .85rem; }
}

/* Compact tech log: the date sits at the end of the Show menu / Export row */
.tl-under .techlog-pager { margin-left: auto; }
@media (max-width: 600px) {
  .tl-under { gap: .375rem; }
  .tl-under .export-btn { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .tl-under .techlog-pager { gap: .25rem; }
  .tl-under .techlog-pager .round-btn { width: 36px; height: 36px; }
  .tl-under .techlog-pager input[type="date"] { width: 7.9rem; padding: .5rem .45rem; font-size: .875rem; }
}

/* Settings > Tech Logs > Instructors: the name (same size as the other lists) with its User / Added manually / Hidden labels */
.inst-head { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; min-width: 0; }

/* Settings: Save changes / Undo changes on the title row (Website and Tech Logs) */
.settings-save-bar { display: flex; gap: .75rem; align-items: center; margin-left: auto; }
.settings-save-bar[hidden] { display: none; }

/* FTLs: the rings line up with the flights table (the name takes the menu's width beside them) */
@media (min-width: 901px) {
  [data-page="ftl"]:has(.ftl-shell:not(.is-own)) .ftl-toolbar .tln-title > div:first-child { min-width: calc(300px + 1.5rem - .9rem); }
  [data-page="ftl"]:has(.ftl-shell:not(.is-own)) .ftl-toolbar .tl-rings { margin-left: 0; }
}
/* FTLs, zoomed in: no Off-Block / On-Block when the table would otherwise scroll sideways */
.ftl-table.is-narrow :is(thead th, tbody td):is(:nth-child(5), :nth-child(6)) { display: none; }
.ftl-table.is-narrow tbody td:nth-child(n+3), .ftl-table.is-narrow thead th:nth-child(n+3) { width: auto; }
.ftl-table.is-narrow tbody td:nth-child(2), .ftl-table.is-narrow thead th:nth-child(2) { min-width: 9rem; }
/* FTLs on a narrow screen (or zoomed in): the instructors are one row that scrolls sideways, so the table stays in view */
@media (max-width: 900px) {
  .ftl-shell .settings-nav { position: static; }
  .ftl-shell .settings-nav ul { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .ftl-shell .settings-nav button { white-space: nowrap; }
}

/* Loading screen (Settings > Website): added by the server to public pages when it's on. The page fades in from behind
   it once everything has loaded (main.js adds .asw-loaded); without scripts it fades by itself after 6 seconds. */
.asw-loader { display: none; }
html.asw-loading .asw-loader { position: fixed; inset: 0; z-index: 10000; display: grid; place-content: center; justify-items: center; gap: 1.5rem; background: var(--navy-900, #0b1a2e); animation: asw-loader-out .5s ease 6s forwards; }
.asw-loader img { width: min(260px, 60vw); height: auto; animation: asw-loader-in .6s ease both; }
.asw-loader-bar { width: min(180px, 40vw); height: 3px; border-radius: 3px; background: rgb(255 255 255 / .15); overflow: hidden; position: relative; }
.asw-loader-bar::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: inherit; background: #fff; animation: asw-loader-slide 1.1s ease-in-out infinite; }
html.asw-loading.asw-loaded .asw-loader { opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s; animation: none; }
html.asw-loading body > :not(.asw-loader) { opacity: 0; }
html.asw-loading.asw-loaded body > :not(.asw-loader) { opacity: 1; transition: opacity .6s ease; }
@keyframes asw-loader-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes asw-loader-out { to { opacity: 0; visibility: hidden; } }
@keyframes asw-loader-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) {
  .asw-loader img, .asw-loader-bar::after { animation: none; }
  html.asw-loading.asw-loaded .asw-loader, html.asw-loading.asw-loaded body > :not(.asw-loader) { transition: none; }
}
@media print { .asw-loader { display: none !important; } html.asw-loading body > * { opacity: 1 !important; } }
/* "Start your training" banner: the ASW wings, large and faint, sweeping across behind it (fitted to the approved design at 1908 px wide) */
.cta-band { position: relative; overflow: hidden; isolation: isolate; }
.cta-band::before { content: ""; position: absolute; z-index: -1; left: calc(64.54% - 683.5px); top: -143.4px; width: 1367px; aspect-ratio: 2000 / 639; background: url("../img/asw-wings-white.webp") center / contain no-repeat; opacity: .099; transform: rotate(-10.15deg); pointer-events: none; }

/* Home: the wide ATPL Ground School flyer (1200 x 628) takes the wider column, shown whole */
.atpl-feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
@media (max-width: 900px) { .atpl-feature { grid-template-columns: minmax(0, 1fr); } }
.feature-media img.atpl-flyer { aspect-ratio: 1200 / 628; height: auto; object-fit: contain; }

/* DCT: course breakdown. A summary bar, then the stages in order on a numbered timeline: each stage's title, hours and
   place, a short description, and its key figures ("Need to know") beside it. Then What we offer / Why choose us. */
.dct-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0 0 2.5rem; border-radius: var(--radius); overflow: hidden; background: var(--line); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.dct-summary > div { background: #fff; padding: 1.1rem 1.25rem; }
.dct-summary dt { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-600); }
.dct-summary dd { margin: .3rem 0 0; font: 800 clamp(1.15rem, 2vw, 1.5rem)/1.2 var(--font-display); color: var(--ink); }
.breakdown { list-style: none; margin: 0; padding: 0; counter-reset: phase; display: grid; gap: 1.25rem; position: relative; }
.breakdown::before { content: ""; position: absolute; left: 1.35rem; top: 1.5rem; bottom: 1.5rem; width: 2px; background: linear-gradient(var(--blue-300), var(--blue-600)); }
.phase { counter-increment: phase; position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.5rem 2.5rem; margin-left: 3.75rem; padding: clamp(1.25rem, 2.5vw, 1.75rem); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.phase::before { content: counter(phase); position: absolute; left: -3.75rem; top: clamp(1.1rem, 2.3vw, 1.55rem); width: 2.7rem; height: 2.7rem; display: grid; place-items: center; border-radius: 50%; background: var(--blue-600); color: #fff; font: 800 1.1rem/1 var(--font-display); box-shadow: 0 0 0 5px var(--sky-50); }
.phase h3 { margin: 0 0 .5rem; font-size: clamp(1.15rem, 1.8vw, 1.35rem); }
.phase-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin: 0 0 .85rem; padding-bottom: .85rem; border-bottom: 1px solid var(--line); font-size: .9rem; font-weight: 600; color: var(--blue-700); }
.phase-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.phase-meta .icon { width: 1rem; height: 1rem; color: var(--blue-500); }
.phase-main > p:last-child { margin: 0; color: var(--body); }
.phase-facts { padding: 1rem 1.15rem; border-radius: var(--radius-sm); background: var(--sky-50); align-self: start; }
.phase-facts-title { margin: 0 0 .5rem; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue-600); }
.phase-facts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: .925rem; }
.phase-facts li { position: relative; padding-left: 1.1rem; }
.phase-facts li::before { content: ""; position: absolute; left: 0; top: .55em; width: .45rem; height: .45rem; border-radius: 50%; background: var(--blue-500); }
.breakdown-end { display: flex; align-items: center; gap: 1.1rem; margin: 1.25rem 0 0 3.75rem; padding: 1.25rem 1.5rem; border-radius: var(--radius); background: linear-gradient(120deg, var(--blue-700), var(--blue-500)); color: rgb(255 255 255 / .9); }
.breakdown-end-icon { flex: none; display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: 50%; background: rgb(255 255 255 / .15); }
.breakdown-end-icon .icon { width: 1.3rem; height: 1.3rem; color: #fff; }
.breakdown-end p { margin: 0; }
.breakdown-end .breakdown-end-title { font: 800 1.2rem/1.2 var(--font-display); color: #fff; margin-bottom: .2rem; }
.dct-more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
.dct-more .dct-airlines { grid-column: 1 / -1; }
.dct-more .airlines { width: 100%; height: auto; }
@media (max-width: 860px) {
  .dct-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phase { grid-template-columns: minmax(0, 1fr); margin-left: 3rem; }
  .phase::before { left: -3rem; width: 2.2rem; height: 2.2rem; font-size: .95rem; }
  .breakdown::before { left: 1.05rem; }
  .breakdown-end { margin-left: 3rem; }
  .dct-more { grid-template-columns: minmax(0, 1fr); }
}

/* FAQ (DCT): topic tabs, each holding questions that open to show the answer */
.faq { max-width: 920px; }
.faq-tabs { display: flex; flex-wrap: wrap; gap: .4rem; padding: .35rem; margin-bottom: 1.5rem; border-radius: 999px; background: var(--sky-50); border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.faq-tabs [role="tab"] { border: 0; background: none; padding: .6rem 1.15rem; border-radius: 999px; font: 600 .95rem/1.2 var(--font); color: var(--ink); cursor: pointer; transition: background-color .2s, color .2s; }
.faq-tabs [role="tab"]:hover { color: var(--blue-600); }
.faq-tabs [role="tab"][aria-selected="true"] { background: var(--blue-600); color: #fff; box-shadow: var(--shadow-sm); }
.faq-panel { display: grid; gap: .75rem; }
.faq-panel[hidden] { display: none; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-sm); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.05rem 1.25rem; font-weight: 700; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; flex: none; width: .65rem; height: .65rem; border-right: 2px solid var(--blue-600); border-bottom: 2px solid var(--blue-600); transform: rotate(45deg) translateY(-25%); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(-135deg) translateY(-25%); }
.faq-item[open] summary { color: var(--blue-700); }
.faq-item p { margin: 0; padding: 0 1.25rem 1.15rem; color: var(--body); }
@media (max-width: 600px) { .faq-tabs { border-radius: var(--radius-sm); } .faq-tabs [role="tab"] { border-radius: var(--radius-sm); } }

/* DCT: the ACCELERATED DCT banner (Malta for the early stages): navy, with a warm sun glow and the faint wings */
.accel-band { position: relative; overflow: hidden; isolation: isolate; color: rgb(255 255 255 / .85);
  background: radial-gradient(60% 120% at 92% 10%, rgb(255 183 77 / .35), rgb(255 183 77 / 0) 60%), linear-gradient(120deg, var(--navy-900, #0b1a2e), var(--blue-700)); }
.accel-band::before { content: ""; position: absolute; z-index: -1; right: -8%; top: 50%; width: min(900px, 80vw); aspect-ratio: 2000 / 639; background: url("../img/asw-wings-white.webp") center / contain no-repeat; opacity: .08; transform: translateY(-50%) rotate(-10deg); pointer-events: none; }
.accel-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: clamp(3rem, 6vw, 4.5rem); flex-wrap: wrap; }
.accel-inner > div:first-child { max-width: 46rem; }
.accel-band h2 { color: #fff; margin-bottom: .45em; font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: .01em; }
.accel-band h2 em { font-style: italic; color: #ffcf87; }
.accel-band p { margin: 0; }
.accel-band .eyebrow { margin-bottom: .6rem; }
/* DCT: Why choose Aviation South West? one box, its points in two columns on wide screens */
.dct-more { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) {
  .prose ul.dct-why { display: block; columns: 2; column-gap: 2.5rem; } /* points flow down each column: no gaps beside shorter points */
  .prose ul.dct-why li { break-inside: avoid; margin-bottom: .6rem; }
}

/* A page banner's logo (page meta "logo"), e.g. the DCT logo: bottom-right corner on wide screens, under the lead on phones */
.page-hero-logo { display: block; width: clamp(96px, 9vw, 150px); height: auto; margin-top: 1.5rem; }
@media (min-width: 761px) { .page-hero-logo { position: absolute; right: var(--gutter); bottom: 0; margin: 0; } }

/* Public website: pictures and videos can't be dragged out or long-pressed to save (iPhone / iPad); see main.js.
   Not the admin portal. */
body:not(.page-admin) :is(img, video) { -webkit-user-drag: none; user-drag: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.phase-meta a { color: inherit; text-decoration: underline; text-underline-offset: .2em; }
.phase-meta a:hover { color: var(--blue-600); }
