/* Swanflask public site.
   Fonts are two open licence families (Fraunces and Inter) served from this folder (assets/fonts/).
   Nothing loads from another website. No gradients. Colours are the app's own (static/css/app.css).
   Every text and background pair below meets WCAG AA. */

/* ---------- Fonts: local files, swap, with tuned fallbacks so the text does not jump ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/fraunces-latin-opsz-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Fallbacks: a system font stretched to the size and line height of the real one while it loads */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 107.4%;
  ascent-override: 90.2%;
  descent-override: 22.5%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Fraunces Fallback";
  font-style: normal;
  src: local("Georgia");
  size-adjust: 100%;
  ascent-override: 93%;
  descent-override: 24%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Fraunces Fallback";
  font-style: italic;
  src: local("Georgia Italic"), local("Georgia-Italic");
  size-adjust: 92.7%;
  ascent-override: 93%;
  descent-override: 24%;
  line-gap-override: 0%;
}

:root {
  --bg: #f4f5f8;          /* page background */
  --ink: #111827;         /* main text */
  --muted: #566072;       /* secondary text (5.8:1 on page background) */
  --card: #ffffff;        /* cards and table */
  --line: #e3e6ec;        /* thin decorative borders */
  --line-strong: #6b7485; /* borders that mark a control or a frame */
  --accent: #1f3a5f;      /* the one accent: buttons, links, dark band */
  --accent-dark: #152a47; /* button hover */
  --accent-soft: #e8eef6; /* quiet tint for notes and hovers */
  --focus: #b45309;       /* keyboard focus ring on light areas */
  --focus-dark: #fbbf24;  /* keyboard focus ring on the dark band */
  --yes: #15803d;         /* tick: 5.0:1 on white */
  --no: #6b7280;          /* dash for "not included": 4.8:1 on white */
  --serif: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  --wrap: 1120px;
  --bar: 64px;            /* height of the top bar, also used by the zoom block */
  /* Type scale: a ratio of 1.25 from 17px */
  --step-0: 1.0625rem;
  --step-1: 1.33rem;
  --step-2: 1.66rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 12px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: var(--step-0)/1.65 var(--sans); font-optical-sizing: auto; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, .button:focus-visible, .table-scroll:focus-visible, .nav-top:focus-visible, .menu-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.band a:focus-visible, .band .button:focus-visible { outline-color: var(--focus-dark); }

/* Headings: Fraunces, large, tight, with one italic phrase each */
h1, h2, h3 { font-family: var(--serif); color: var(--ink); margin: 0 0 .5em; text-wrap: balance; }
/* No f-l ligature: the f and the l stay two separate letters, so the l reads as a plain ascender */
h1, h2, h3, .brand { font-variant-ligatures: no-common-ligatures; }
h1 { font-size: clamp(2.65rem, 1.5rem + 5.4vw, 5.25rem); font-weight: 440; line-height: 1.02; letter-spacing: -0.038em; }
h2 { font-size: clamp(2.05rem, 1.35rem + 3vw, 3.4rem); font-weight: 450; line-height: 1.08; letter-spacing: -0.03em; max-width: 18ch; }
h3 { font-size: var(--step-1); font-weight: 560; line-height: 1.2; letter-spacing: -0.015em; }
/* The italic phrase is drawn in Fraunces' small-size shapes (opsz 14). At display sizes the italic l curls like the f;
   at opsz 14 it is a plain ascender like b, h and k, so the f stays the one distinctive letter. */
h1 em, h2 em { font-style: italic; font-weight: 420; letter-spacing: -0.03em; color: var(--accent); font-variation-settings: "opsz" 14; }
.band h2 em { color: #fff; }
.eyebrow { font-size: .78rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 1.1em; }
.lede { font-size: clamp(1.2rem, 1.05rem + .8vw, 1.5rem); line-height: 1.5; color: var(--muted); max-width: 36ch; letter-spacing: -0.01em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
section { padding: 72px 0; }
.section-intro { max-width: 46ch; color: var(--muted); }

/* Skip link: visible only when focused */
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); color: var(--ink); padding: 10px 14px; border: 2px solid var(--ink); border-radius: 6px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Buttons: at least 44px tall; here 48px */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 22px; background: var(--accent);
  color: #fff; border: 2px solid var(--accent); border-radius: 6px; font: inherit; font-weight: 650; text-decoration: none; text-align: center; }
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button.small { padding: 8px 16px; font-size: .95rem; }
/* Outline button: the quiet choice next to a filled one. Same height, navy 1.5px border, navy text on white */
.button.outline { background: var(--card); color: var(--accent); border: 1.5px solid var(--accent); }
.button.outline:hover { background: var(--accent-soft); border-color: var(--accent-dark); color: var(--accent-dark); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; }

/* ---------- 1 Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--card); box-shadow: 0 1px 0 var(--line); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; min-height: var(--bar); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--serif); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 4px; }
.nav-top, .nav-plain a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; font: inherit; font-size: .97rem; font-weight: 560; color: var(--ink); text-decoration: none; background: none; border: 0; border-radius: 8px; cursor: pointer; }
.nav-top:hover, .nav-plain a:hover, .nav-top[aria-expanded="true"] { background: var(--accent-soft); }
.chev { width: 14px; height: 14px; transition: transform .15s ease; }
.nav-top[aria-expanded="true"] .chev { transform: rotate(180deg); }
.panel, .panel-title, .nav-cta-m, .menu-toggle { display: none; }
.panel ul { list-style: none; margin: 0; padding: 0; }
.panel a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.panel a:hover { background: var(--accent-soft); }
.panel a:focus-visible { outline: 3px solid var(--focus); outline-offset: -2px; }
.panel .t { display: block; font-weight: 600; line-height: 1.3; }
.panel .d { display: block; font-size: .875rem; line-height: 1.4; color: var(--muted); margin-top: 2px; }
/* Without JavaScript: the bar wraps and the top level items stay plain links */
.nav { order: 3; width: 100%; }
.bar-cta { order: 2; }
@media (max-width: 480px) {
  .brand { font-size: 1.15rem; gap: 8px; }
  .brand img { width: 32px; height: 32px; }
  .topbar .button.small { padding: 6px 12px; font-size: .88rem; line-height: 1.2; }
}

/* With JavaScript the bar is a fixed height, so nothing moves */
.js .topbar { height: var(--bar); }
.js .bar { height: var(--bar); min-height: 0; flex-wrap: nowrap; }
.js .nav { order: 0; width: auto; }

/* Phones and small tablets: a Menu button opens a full width panel with the groups listed out */
@media (max-width: 959.98px) {
  .js .menu-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; margin-left: auto; font: inherit; font-weight: 650; color: var(--ink); background: var(--card); border: 2px solid var(--line-strong); border-radius: 8px; cursor: pointer; }
  .js .menu-toggle svg { width: 22px; height: 22px; }
  .js .bar-cta { display: none; }
  .js .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--card); border-bottom: 1px solid var(--line-strong);
    max-height: calc(100vh - var(--bar)); max-height: calc(100dvh - var(--bar)); overflow-y: auto; padding: 8px 16px 28px; }
  .js .menu-open .nav { display: block; }
  .js .nav-list { display: block; max-width: 640px; margin: 0 auto; }
  .js .nav-top { display: none; }
  .js .nav-group { padding: 8px 0 4px; border-bottom: 1px solid var(--line); }
  .js .panel { display: block; }
  .js .panel .d { display: none; }
  .js .panel a { padding: 10px 12px; min-height: 44px; display: flex; align-items: center; }
  .js .panel-title { display: block; margin: 8px 0 4px; padding: 0 12px; font-size: .78rem; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
  .js .nav-plain a { display: flex; min-height: 48px; padding: 0 12px; font-size: 1.05rem; }
  .js .nav-cta-m { display: block; margin-top: 20px; }
  .js .nav-cta-m .button { width: 100%; }
}

/* Laptops: logo left, grouped menus in the middle, the button on the right */
@media (min-width: 960px) {
  .bar { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0 12px; }
  .nav, .js .nav { order: 0; width: auto; }
  .bar-cta { order: 0; justify-self: end; }
  .js .nav-list { flex-wrap: nowrap; height: var(--bar); align-items: center; }
  .js .nav-group { position: relative; height: 100%; display: flex; align-items: center; }
  .js .nav-group.open .panel { display: block; }
  .js .panel { position: absolute; top: 100%; left: -8px; width: 460px; padding: 8px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 8px 24px rgba(17, 24, 39, .12); }
}

/* ---------- 2 Opening ---------- */
.opening { padding: 56px 0 0; }
/* The headline is three short questions, one per line, so it is set a little smaller than a one-phrase headline */
.opening h1 { max-width: none; font-size: clamp(2.2rem, 1.3rem + 4.2vw, 4.4rem); line-height: 1.08; text-wrap: wrap; }
.opening h1 .q { display: block; }
.opening .lede { max-width: 44ch; }
/* The founding places, named in the opening */
.opening-offer { max-width: 44ch; margin: 0; font-size: 1.1rem; font-weight: 650; color: var(--ink); }
.opening .actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }

/* The screens, shown one after the other when the animation is off (no JavaScript, reduced motion, tiny screens) */
.zoom { margin-top: 56px; padding-bottom: 24px; }
.zoom-fig { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.zoom .shot { border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); overflow: hidden; }
.zoom .shot + .shot { margin-top: 32px; }
.zoom .shot-phone, .zoom .base { display: none; }
.zoom figcaption { font-size: .9rem; color: var(--muted); margin-top: 12px; }

/* Framed screenshots elsewhere */
.frame { margin: 40px 0 0; }
.frame .shot { border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); overflow: hidden; }
/* No grey title strip above the laptop screenshots: the screenshot starts right at the frame edge */
.frame.phone .shot { border: 8px solid var(--ink); border-radius: 30px; max-width: 280px; margin: 0 auto; background: var(--ink); }
.frame.phone .shot img { border-radius: 20px; }
.frame figcaption { font-size: .9rem; color: var(--muted); margin-top: 10px; }
.frame.phone figcaption { text-align: center; }
.what-laptop { display: none; }
.zoom-phone .what-laptop { display: block; }
.zoom-phone .what-phone { display: none; }

/* ---------- The scroll zoom ----------
   .zoom is a tall block. Inside it .zoom-stick stays fixed to the screen while you scroll through the block.
   site.js writes two numbers: --p (0 to 1: the laptop grows and tilts flat) and --f (0 to 1: the second screen fades in),
   plus --s0, --ds, --ty, --tilt that only change when the window is resized. Beats on a laptop, as a share of the
   scrolling inside the block: grow 0 to 43 percent, hold the first screen 20 percent, cross-fade 13.5 percent, hold
   the second screen the rest. On a phone: grow 55 percent, then hold. The block is 300vh on a laptop and 150vh on a phone
   (it was 500vh and 200vh: shortened so the page reaches its argument sooner). */
.zoom-on .zoom { --p: 0; --f: 0; --s0: .8; --ds: 1; --ty: 0px; --tilt: 18deg; height: 300vh; height: 300svh; margin: 0; padding: 0;
  --chrome: clamp(0, calc((0.93 - var(--p)) * 3), 1); }
.zoom-on .zoom-stick { position: sticky; top: var(--bar); height: calc(100vh - var(--bar)); height: calc(100svh - var(--bar)); overflow: clip; }
.zoom-on .zoom-fig { position: relative; width: 100%; height: 100%; max-width: none; padding: 0; display: grid; place-items: center; }
.zoom-on .device { position: relative; width: min(calc(100% - 64px), 960px); will-change: transform; transform-origin: 50% 50%;
  transform: translate3d(0, calc(var(--p) * var(--ty)), 0) perspective(1600px) rotateX(calc(clamp(0, calc(1 - var(--p) / .7), 1) * var(--tilt))) scale(calc(var(--s0) + var(--p) * var(--ds))); }
.zoom-on .lid { position: relative; padding: 14px 14px 16px; }
.zoom-on .lid::before { content: ""; position: absolute; inset: 0; background: #1b2433; border-radius: 18px 18px 6px 6px; opacity: var(--chrome); }
.zoom-on .screen { position: relative; display: grid; aspect-ratio: 1280 / 800; background: var(--card); border-radius: 4px; overflow: hidden; }
/* Both screens sit in the same grid cell with exactly the same box: no margin, no bar, same size and fit.
   (.zoom .shot + .shot is listed so the 32px gap used when the screens are stacked cannot leak in here.) */
.zoom-on .shot, .zoom-on .shot + .shot { grid-area: 1 / 1; border: 0; border-radius: 0; margin: 0; padding: 0; background: var(--card); min-width: 0; min-height: 0; }
.zoom-on .shot::before { display: none; }
.zoom-on .shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 0 0; }
/* The second screen fades in over the first. site.js writes --f as exactly 0 or exactly 1 outside the fade, and
   adds .f-none (nothing of screen 2 shows) or .f-done (screen 1 is hidden for good), so no trace of one shows through the other. */
.zoom-on .shot-2 { opacity: var(--f); }
.zoom-on .f-none .shot-2 { visibility: hidden; }
.zoom-on .f-done .shot-1 { visibility: hidden; }
.zoom-on .base { display: block; position: relative; height: 16px; margin: 0 -3%; background: #cfd4de; border-top: 2px solid #aab1bf; border-radius: 0 0 18px 18px; opacity: var(--chrome); }
.zoom-on .zoom figcaption { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); margin: 0;
  padding: 6px 14px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 999px; text-align: center; }
/* Phone version: the phone screen instead of the laptop, a short block */
.zoom-phone .zoom { --tilt: 10deg; --chrome: 1; height: 150vh; height: 150svh; }
.zoom-phone .device { width: 280px; }
.zoom-phone .lid { padding: 8px; }
.zoom-phone .lid::before { background: var(--ink); border-radius: 30px; }
.zoom-phone .screen { aspect-ratio: 720 / 1480; border-radius: 22px; }
.zoom-phone .shot-1, .zoom-phone .shot-2, .zoom-phone .base { display: none; }
.zoom-phone .shot-phone { display: block; }

/* One caption per screen: the first until the second screen has faded half way in (site.js adds .f-half) */
.zoom-on .cap-2 { display: none; }
.zoom-on .f-half .cap-1 { display: none; }
.zoom-on .f-half .cap-2 { display: inline; }
/* Small screens with the animation off (reduced motion, or no JavaScript): the phone screen, in its frame,
   instead of two laptop screens too small to read. The section below then shows the calendar. */
@media (max-width: 699.98px) {
  html:not(.zoom-on) .zoom .shot-1, html:not(.zoom-on) .zoom .shot-2, html:not(.zoom-on) .zoom .cap-2 { display: none; }
  html:not(.zoom-on) .zoom .shot-phone { display: block; max-width: 280px; margin: 0 auto; border: 8px solid var(--ink); border-radius: 30px; background: var(--ink); }
  html:not(.zoom-on) .zoom .shot-phone img { border-radius: 20px; }
  html:not(.zoom-on) .zoom figcaption { text-align: center; }
  html:not(.zoom-on) .what-phone { display: none; }
  html:not(.zoom-on) .what-laptop { display: block; }
}

/* ---------- 3 Who it is for ---------- */
.who { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.who .copy { max-width: 62ch; font-size: 1.15rem; }
.roles { margin: 0 0 1em; padding-left: 1.2em; }
.roles li { margin: 0 0 .5em; }

/* ---------- 4 What it does: cards ---------- */
.cards { display: grid; gap: 16px; margin: 32px 0 0; padding: 0; list-style: none; }
.card { background: var(--card); border: 1px solid var(--line-strong); border-radius: 10px; padding: 24px; }
.card h3 { margin-bottom: .4em; }
.card p { margin: 0; color: var(--muted); max-width: 60ch; }
/* Which plans include a card: a small outlined label, in words */
.card p.tag { display: inline-block; margin: 0 0 10px; padding: 2px 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .78rem; font-weight: 650; letter-spacing: .02em; line-height: 1.5; color: var(--ink); }
#what .section-intro { max-width: 62ch; }

/* ---------- 5 Safety: the one dark band ---------- */
.band { background: var(--accent); color: #fff; }
.band h2, .band h3 { color: #fff; }
.band .eyebrow { color: var(--accent-soft); }
.band a { color: #fff; }
.band .copy { max-width: 62ch; font-size: 1.15rem; color: var(--accent-soft); }
.band .copy strong { color: #fff; }

/* ---------- 6 One teacher or a whole department ---------- */
.two { display: grid; gap: 16px; margin-top: 32px; }
.two .card { padding: 28px; }
.two .card h3 { font-size: var(--step-2); }

/* Buttons that sit at the foot of a card, and the small note and figure after the two cards */
.card-action { margin-top: 18px; }
.two .card { display: flex; flex-direction: column; }
.two .card .card-action { margin-top: auto; padding-top: 18px; }
.summary-note { max-width: 62ch; margin: 16px 0 0; font-size: 1.05rem; }
.summary-fig { max-width: 880px; margin-top: 24px; }

/* ---------- 6b Founding places: compact, same cards as above ---------- */
.founding { padding: 44px 0; }
.founding h2 { margin-bottom: .35em; }
.founding .section-intro { max-width: 78ch; margin-bottom: 0; }
.founding .two { margin-top: 20px; }
.founding .two .card { padding: 20px 24px; }
.founding .two .card h3 { font-size: var(--step-1); }
.place-card h3 { margin-bottom: .15em; }
.card p.places { margin: 0 0 12px; font-family: var(--sans); font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; color: var(--accent); }
.card .plain, .card ul.plain { margin: 0 0 6px; padding-left: 1.2em; color: var(--ink); max-width: 60ch; }
.plain li { margin: 0 0 6px; line-height: 1.45; }
.founding-note { max-width: 62ch; margin: 20px 0 0; color: var(--muted); font-size: .95rem; }

/* ---------- 7 Plans and prices ----------
   Kept compact so the whole table fits on one laptop screen: one line per row, small padding, the buttons in the header. */
.plans { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 40px 0 48px; }
.plans .eyebrow { margin-bottom: .6em; }
.plans h2 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.7rem); max-width: none; margin-bottom: .2em; }
.plans .section-intro { max-width: none; margin: 0 0 .35em; }
.plans .section-intro { margin-bottom: 12px; }
.table-hint { font-size: .9rem; color: var(--muted); margin: 0 0 8px; }
.table-scroll { position: relative; overflow-x: auto; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--card); }
table { border-collapse: collapse; width: 100%; min-width: 560px; text-align: left; }
th, td { padding: 1px 14px; vertical-align: middle; border-bottom: 1px solid var(--line); font-size: .9rem; line-height: 1.2; }
thead th { vertical-align: top; padding: 6px 14px 8px; border-bottom: 2px solid var(--ink); background: var(--bg); }
.plan-name { display: block; font-family: var(--serif); font-size: 1.15rem; font-weight: 560; letter-spacing: -0.015em; line-height: 1.2; }
.price { display: block; font-family: var(--sans); font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums lining-nums; font-feature-settings: "tnum" 1, "lnum" 1; }
.per { display: block; font-size: .85rem; font-weight: 400; color: var(--muted); margin: 0 0 8px; line-height: 1.3; }
/* Plan headers: every cell has the same rows (name, price line, who, summary) and the button is pinned
   to the bottom of its cell, so names, prices and buttons line up across the three plans. */
thead th:not(:first-child) { position: relative; padding-bottom: 66px; }
thead .price { display: flex; align-items: center; min-height: 1.9rem; }
thead .per { margin: 0 0 4px; min-height: 2.6em; }
thead .button { position: absolute; left: 14px; right: 14px; bottom: 9px; width: auto; height: 48px; display: inline-flex; align-items: center; justify-content: center; margin: 0; }
.gist { display: block; margin: 2px 0 6px; font-size: .8rem; font-weight: 400; line-height: 1.3; color: var(--muted); }
table { table-layout: fixed; }
.c-grp { width: 88px; }
.c-feat { width: 272px; }
tbody th { font-weight: 600; background: var(--bg); padding-left: 10px; padding-right: 8px; }
/* Theme name: a narrow first column, one cell per group (rowspan), so the groups add almost no height */
tbody th.grp { font-size: .75rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--card); border-right: 1px solid var(--line); line-height: 1.25; }
tbody + tbody th, tbody + tbody td { border-top: 2px solid var(--line-strong); }
tbody + tbody tr + tr th, tbody + tbody tr + tr td { border-top: 0; }
tbody:last-of-type tr:last-child th, tbody:last-of-type tr:last-child td { border-bottom: 0; }
.ico { display: block; width: 18px; height: 18px; }
/* Three rows of the table, explained underneath so the table itself stays compact */
.row-notes { display: grid; gap: 8px 24px; margin: 14px 0 0; font-size: .9rem; line-height: 1.4; }
.row-notes dt { font-weight: 650; }
.row-notes dd { margin: 0; color: var(--muted); }
.hint-school { display: none; }
.school-first .hint-plain { display: none; }
.school-first .hint-school { display: inline; }
.yes .ico { color: var(--yes); }
.no .ico { color: var(--no); }

/* ---------- 8 Pilot note ---------- */
.note { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 10px; padding: 28px; max-width: 760px; }
.note h2 { font-size: 2rem; }
.note-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin: 0; }

/* ---------- 9 Footer ---------- */
.site-footer { background: var(--card); border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: .95rem; }
.site-footer p { margin: 0 0 .5em; }
.site-footer a { color: var(--accent); font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; }

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .two { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .wrap { padding: 0 32px; }
  .zoom-fig { padding: 0 32px; }
  section { padding: 104px 0; }
  .founding { padding: 48px 0; }
  .plans { padding: 16px 0 40px; }
  .plans .eyebrow { margin-bottom: .3em; }
  .plans h2 { font-size: 2.25rem; }
  .opening { padding: 88px 0 0; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .row-notes { grid-template-columns: repeat(3, 1fr); }
  .table-hint { display: none; }
  table { min-width: 0; }
}
@media (max-width: 899px) {
  /* Plan names stay visible while the table is swiped sideways */
  tbody th, thead th:first-child { position: sticky; left: 0; z-index: 1; border-right: 0; box-shadow: inset -1px 0 0 var(--line-strong); }
  thead th:first-child { background: var(--bg); }
  tbody th { width: 104px; min-width: 104px; max-width: 104px; padding: 3px 6px; font-size: .76rem; line-height: 1.2; left: 24px; overflow-wrap: anywhere; }
  /* On a phone the theme name is turned on its side, so the column is only 30px wide */
  tbody th.grp { left: 0; width: 24px; min-width: 24px; max-width: 24px; padding: 4px 0; text-align: center; letter-spacing: 0; text-transform: none; font-size: .7rem; line-height: 1.1; border-right: 0; box-shadow: inset -1px 0 0 var(--line-strong); }
  tbody th.grp span { display: block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; margin: 0 auto; }
  .gist { font-size: .75rem; }
  .c-grp { width: 24px; }
  .c-feat { width: 104px; }
  colgroup col:nth-child(n+3) { width: 160px; }
  table { min-width: 608px; }
  /* Swiping lands on a plan: the sticky labels are 128px wide, so a plan stops just beside them */
  .table-scroll { scroll-snap-type: x mandatory; scroll-padding-left: 128px; }
  thead th:not(:first-child) { scroll-snap-align: start; }
  th, td { padding: 3px 8px; font-size: .85rem; }
  thead th { padding: 8px 8px 10px; }
  thead th:not(:first-child) { padding-bottom: 58px; }
  thead .button, thead .button.small { left: 8px; right: 8px; bottom: 8px; height: 44px; }
  .plan-name { font-size: 1.02rem; }
  .price { font-size: 1.15rem; }
  .per { font-size: .78rem; margin-bottom: 6px; }
  thead .button.small { padding: 4px 8px; font-size: .85rem; line-height: 1.15; }
  .plans { padding: 40px 0 44px; }
  th, td { line-height: 1.2; }
}
@media (prefers-reduced-motion: reduce) { .chev { transition: none; } }
@media print { .topbar { position: static; } .button { border-color: #000; } }


/* ---- What it does: five numbered steps, then two cards ---- */
.steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; gap: 56px; }
.step { display: grid; gap: 20px; scroll-margin-top: 88px; }
.step-no { margin: 0 0 6px; font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--accent); letter-spacing: -0.02em; }
.step h3 { font-size: var(--step-2); margin-bottom: .35em; }
.step .skip-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.step p { margin: 0; color: var(--muted); max-width: 46ch; }
.step p.tag { display: inline-block; margin: 0 0 12px; padding: 2px 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .78rem; font-weight: 650; letter-spacing: .02em; line-height: 1.6; color: var(--ink); }
.ticks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; max-width: 46ch; }
.ticks li { position: relative; padding-left: 30px; color: var(--ink); }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .42em; width: 13px; height: 7px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }
.step-shot { margin: 0; }
.step-shot .shot img { display: block; width: 100%; height: auto; }
/* On a phone the whole screen would be too small to read, so the picture shows its top left part, larger, without the side menu. */
@media (max-width: 699.98px) {
  .step-shot .shot { aspect-ratio: 5 / 4; }
  .step-shot .shot img { width: 160%; max-width: none; margin-left: -12.2%; }
}
@media (min-width: 900px) {
  .steps { gap: 88px; }
  .step { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 56px; align-items: center; }
}
.also-title { margin: 88px 0 .5em; font-size: var(--step-2); }
.cards.also { margin-top: 24px; }
.cards.also h4 { font-family: var(--serif); font-size: var(--step-1); color: var(--ink); margin: 0 0 .4em; }
@media (min-width: 900px) { .cards.also { grid-template-columns: 1fr 1fr; } }
.step-shot .shot { border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--card); }

/* ---- The five steps, made interactive by site.js (.steps-acc on a laptop, .steps-swipe on a phone).
        Without site.js neither class is set and the steps stay stacked. With motion switched off, the change is instant. ---- */
.step-btn { display: flex; flex-direction: column; gap: 6px; }
.step-n { font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--accent); letter-spacing: -0.02em; }
.steps-nav { display: none; }

/* Laptop: the list on the left, one screen on the right */
.steps-acc { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); column-gap: 56px; row-gap: 0; align-items: start; }
.steps-acc .step { display: contents; }
.steps-acc .step-text { grid-column: 1; padding-left: 20px; border-left: 3px solid var(--line); transition: border-color .3s ease; }
.steps-acc .is-on .step-text { border-left-color: var(--accent); }
.steps-acc h3 { margin: 0; font-size: var(--step-1); }
.steps-acc .step-btn { flex-direction: row; align-items: center; gap: 14px; min-height: 56px; padding: 10px 0; cursor: pointer; color: var(--muted); border-radius: 6px; transition: color .2s ease; }
.steps-acc .step-btn:hover, .steps-acc .is-on .step-btn { color: var(--ink); }
.steps-acc .step-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.steps-acc .step-n { font-family: var(--sans); font-size: .95rem; font-weight: 650; letter-spacing: .04em; color: inherit; font-variant-numeric: tabular-nums; }
.steps-acc .is-on .step-n { color: var(--accent); }
.steps-acc .step-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .38s cubic-bezier(.2, .7, .2, 1); }
.steps-acc .is-on .step-body { grid-template-rows: 1fr; }
.steps-acc .step-inner { min-height: 0; overflow: hidden; visibility: hidden; opacity: 0; transition: opacity .3s ease, visibility 0s .38s; }
.steps-acc .is-on .step-inner { visibility: visible; opacity: 1; transition: opacity .3s ease .08s, visibility 0s; }
.steps-acc .ticks { margin-bottom: 20px; }
.steps-stage .step-shot { grid-column: 2; grid-row: 1 / span 5; opacity: 0; visibility: hidden; transform: translateY(16px) scale(.985); transition: opacity .4s ease, transform .45s cubic-bezier(.2, .7, .2, 1), visibility 0s .45s; }
.steps-stage .step-shot.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .4s ease, transform .45s cubic-bezier(.2, .7, .2, 1), visibility 0s; }

/* Phone: one card per step, swiped sideways. The edge of the next card shows that there is more. */
.steps-swipe { display: flex; gap: 12px; margin: 32px -16px 0; padding: 4px 16px 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; position: relative; }
.steps-swipe::-webkit-scrollbar { display: none; }
.steps-swipe .step { flex: 0 0 86%; scroll-snap-align: center; align-content: start; padding: 20px; background: var(--card); border: 1px solid var(--line-strong); border-radius: 12px; }
.steps-swipe + .steps-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin-top: 4px; }
.steps-nav button { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; background: var(--card); color: var(--accent); border: 2px solid var(--accent); border-radius: 999px; cursor: pointer; }
.steps-nav button[disabled] { color: var(--muted); border-color: var(--line); cursor: default; }
.steps-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.steps-prev svg { transform: rotate(90deg); }
.steps-next svg { transform: rotate(-90deg); }
.steps-dots { display: inline-flex; gap: 6px; }
.steps-dots i { width: 8px; height: 8px; border-radius: 999px; background: var(--line-strong); transition: width .3s ease, background-color .3s ease; }
.steps-dots i.on { width: 24px; background: var(--accent); }
.steps-status { flex: 0 0 100%; margin: 0; text-align: center; font-size: .9rem; font-weight: 650; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .steps-acc .step-text, .steps-acc .step-btn, .steps-acc .step-body, .steps-acc .step-inner, .steps-acc .is-on .step-inner, .steps-stage .step-shot, .steps-stage .step-shot.is-on, .steps-dots i { transition: none; } .steps-stage .step-shot { transform: none; } }

/* Making it plain that the steps can be chosen: a hint line, a hover tint and an arrow on each row,
   and the same arrows and "Step 1 of 5" under the screen on a laptop as on a phone. */
.steps-hint { margin: 32px 0 0; font-size: .9rem; font-weight: 650; color: var(--muted); }
.steps-hint + .steps { margin-top: 16px; }
.step-chev { display: none; }
.steps-acc .step-text { padding-left: 8px; border-bottom: 1px solid var(--line); }
.steps-acc .step-btn { padding: 10px 12px; }
.steps-acc .step-btn:hover { background: var(--accent-soft); }
.steps-acc .step-inner { padding-left: 12px; }
.steps-acc .step-chev { display: block; flex: none; width: 18px; height: 18px; margin-left: auto; color: var(--accent); transition: transform .3s ease; }
.steps-acc .is-on .step-chev { transform: rotate(180deg); }
.steps-acc + .steps-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin: 20px 0 0 calc((100% - 56px) * 5 / 13 + 56px); }
@media (prefers-reduced-motion: reduce) { .steps-acc .step-chev { transition: none; } }

/* Laptop layout, second pass: the list is one column and the screens share a second column with the arrows
   directly beneath them (site.js moves the screens into .steps-stage). */
.steps-wrap.acc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); column-gap: 56px; align-items: start; margin-top: 16px; }
.steps-wrap > .steps-acc { display: block; margin-top: 0; }
.steps-acc .step { display: block; }
.steps-stage { display: grid; }
.steps-stage .step-shot { grid-area: 1 / 1; }
.steps-stage .steps-nav { grid-area: 2 / 1; display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0 0; }
.steps-wrap > .steps-swipe { margin-top: 16px; }
/* "Step 1 of 5" is kept for screen readers only */
.steps-status { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- Two languages: the top bar holds one more link, so the button never wraps and the links sit closer on narrow laptops ---- */
.bar-cta { white-space: nowrap; }
@media (min-width: 960px) and (max-width: 1099.98px) {
  .nav-top, .nav-plain a { padding: 0 8px; font-size: .93rem; }
  .bar-cta { padding-left: 14px; padding-right: 14px; }
}
/* Portuguese group names are longer ("Segurança"), so their column is a little wider on a laptop */
@media (min-width: 900px) { :lang(pt) .c-grp { width: 108px; } }

/* The line under the two founding cards: standard prices and when the free year starts */
.founding-note { margin: 20px 0 0; max-width: 72ch; color: var(--muted); font-size: .95rem; }

/* The language link in the top bar is a flag; the language name is kept for screen readers and as a tooltip */
.flag { display: block; border-radius: 3px; box-shadow: 0 0 0 1px rgba(17, 24, 39, .2); }

/* The right end of the top bar: the button, then the language flag at the far right */
.bar-end { order: 2; display: flex; align-items: center; gap: 6px; }
.bar-lang { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 8px; }
.bar-lang:hover { background: var(--accent-soft); }
@media (min-width: 960px) { .bar-end { order: 0; justify-self: end; } }
/* Laptops and wider: the flag leaves the centred column and sits at the right edge of the window */
@media (min-width: 960px) { .bar-lang { position: absolute; right: 12px; top: calc((var(--bar) - 44px) / 2); } }
/* Until the window is wider than the column, the button keeps clear of the flag */
@media (min-width: 960px) and (max-width: 1239.98px) { .bar-end { padding-right: 46px; } }
/* Cards that sit side by side share their rows, so the title, the plan tag and the text of one card
   line up with the same parts of its neighbour even when one title runs to two lines */
.cards.also h4 { line-height: 1.25; margin-bottom: 12px; }
.cards.also .card { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 0; align-content: start; }
.cards.also .card p.tag { justify-self: start; align-self: start; }
/* Portuguese plan headers: the line under the price runs to three lines, so every plan keeps room for three
   and the summaries below start level */
:lang(pt) thead .per { min-height: 3.9em; }
/* The two founding cards share their rows too: title, number of places, list and button stay level
   when one title runs to two lines */
.two .card { display: grid; grid-template-rows: subgrid; grid-row: span 4; row-gap: 0; }
.two .card .card-action { margin-top: 0; align-self: end; }
/* Plan headers on narrower screens: a price in words stays on one line, and the line under it keeps room for three */
@media (min-width: 900px) and (max-width: 1099.98px) { thead .price { font-size: 1.25rem; white-space: nowrap; } }
@media (max-width: 1099.98px) { thead .per { min-height: 3.9em; } }

/* A plan table cell for something built but not offered yet: words, in the muted colour, never a tick */
td.soon { color: var(--muted); font-size: .85em; line-height: 1.25; }
/* Three cards under "Also in Swanflask" on wide screens, two on tablets and small laptops */
@media (min-width: 1100px) { .cards.also { grid-template-columns: repeat(3, 1fr); } }

/* A card whose text has two paragraphs */
.card-text p + p { margin-top: .7em; }

/* The budget report under the safety summary: a line of text, then the screenshot with its "in testing" tag */
.summary-next { margin-top: 48px; }
.fig-tag { display: inline-block; margin: 0 0 10px; padding: 2px 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: .78rem; font-weight: 650; letter-spacing: .02em; line-height: 1.5; color: var(--ink); }

/* ---- For Heads of Science: two reports on the five step chooser (.steps-plain). No numbers, arrows or dots.
        Each label keeps its plan tag in view; the chosen report's text opens under it and its page shows beside it,
        or below the list on a phone. ---- */
.steps-plain .step-text > .tag { margin: 0 0 12px 12px; }
.steps-plain .step-btn { min-height: 48px; padding-bottom: 6px; }
@media (max-width: 899.98px) {
  .steps-wrap.plain.acc { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
}
.steps-plain .step-inner > p:last-child { padding-bottom: 16px; }

/* Laptops: the picture sits level with the middle of the list beside it.
   Walk through: the picture and its arrows are a little shorter than the five rows, so they move down.
   Heads of Science: the picture is taller than the two rows, so it starts a little higher, beside the hint line. */
@media (min-width: 900px) {
  .steps-wrap.acc { align-items: center; }
  .steps-wrap.plain.acc { align-items: start; }
  .steps-wrap.plain.acc > .steps-stage { margin-top: -40px; }
}

/* ---- Two overlapping pictures (.stack), like two photographs lying one on the other. site.js adds a see-through
        button over them; pressing it brings the other picture to the front. Without site.js they sit one under the other. ---- */
.stack { display: grid; gap: 16px; }
.js .stack { position: relative; gap: 0; padding: 0 24px 22px 0; }
.js .stack .shot { grid-area: 1 / 1; transition: transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .4s ease; }
.js .stack:not(.flipped) .shot:nth-child(1), .js .stack.flipped .shot:nth-child(2) { z-index: 2; box-shadow: 0 10px 26px rgba(17, 24, 39, .18); }
.js .stack:not(.flipped) .shot:nth-child(2), .js .stack.flipped .shot:nth-child(1) { z-index: 1; transform: translate(24px, 22px) rotate(1.8deg); box-shadow: 0 4px 14px rgba(17, 24, 39, .14); }
.stack-flip { position: absolute; inset: 0; z-index: 3; margin: 0; padding: 0; background: none; border: 0; border-radius: 10px; cursor: pointer; }
.stack-flip:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .js .stack .shot { transition: none; } }

/* ---- "Also in Swanflask", second design: taller cards, each ending in a phone that shows the real screen,
        cut off by the bottom of the card. The first card is dark. Title, tag, text and phone share rows across cards. ---- */
.cards.also .also-card { grid-row: span 4; padding: 28px 28px 0; border: 0; border-radius: 16px; background: var(--accent-soft); overflow: hidden; }
.cards.also .also-card > p:not(.tag) { padding-bottom: 4px; }
.also-phone { margin: 28px 0 0; align-self: end; display: flex; justify-content: center; height: 300px; }
.phone-crop { width: 78%; max-width: 250px; height: 340px; border: 8px solid var(--ink); border-bottom: 0; border-radius: 30px 30px 0 0; background: var(--ink); overflow: hidden; box-shadow: 0 18px 40px rgba(17, 24, 39, .22); }
.phone-crop img { display: block; width: 100%; height: auto; border-radius: 22px 22px 0 0; }
.phone-crop img.also-stock { margin-top: -35%; }     /* start at the list of items, below the search boxes */
.cards.also .also-dark { background: var(--accent); }
.cards.also .also-dark h4 { color: #fff; }
.cards.also .also-dark > p { color: #e3e8f2; }
.cards.also .also-dark > p.tag { color: #fff; border-color: rgba(255, 255, 255, .55); }
.also-dark .phone-crop { border-color: #0b1220; background: #0b1220; box-shadow: 0 18px 40px rgba(0, 0, 0, .4); }
@media (max-width: 639.98px) { .also-phone { height: 260px; } }

/* The stock card ends in a laptop that runs off the right edge of the card, with two highlights lying over it:
   real rows lifted from the stock alerts page (what is low, what expires soon). */
.also-laptop { position: relative; margin: 28px 0 0; align-self: end; height: 300px; }
.laptop-crop { position: absolute; left: 0; top: 20px; width: 165%; border: 8px solid #0b1220; border-bottom: 0; border-radius: 14px 14px 0 0; background: #0b1220; overflow: hidden; box-shadow: 0 18px 40px rgba(0, 0, 0, .4); }
.laptop-crop img { display: block; width: 100%; height: auto; border-radius: 7px 7px 0 0; }
.also-laptop .callout { position: absolute; width: 76%; max-width: 260px; height: auto; border-radius: 10px; background: #fff; box-shadow: 0 12px 30px rgba(0, 0, 0, .38); }
.also-laptop .callout-1 { right: -10px; top: 74px; }
.also-laptop .callout-2 { left: -10px; top: 188px; }
@media (max-width: 639.98px) { .also-laptop { height: 260px; } .also-laptop .callout-2 { top: 172px; } }
