/* ============================================================
   FETS candidate support desk
   Sits above the existing app and borrows its tokens (--bg, --panel,
   --panel-2, --line, --signal, --pass, --ink, --mute, --faint,
   --rail-w, --ease-reveal) and helper classes (.grid-bg, .brackets,
   .dot-pulse) — no new colours, no new typefaces.

   One job per look, so nothing is mistaken for something else:
     menu bar          raised grey bar, white links, orange marker on the
                       section you are in
     exam tabs         grey tab strip; the chosen exam is solid orange
     questions         blue-edged rows with a "?" — things you can ask
     official links    orange outlined buttons — things that leave the site
     open days         orange-headed data card
     your message      grey block; the desk's answer is plain text
     question box      a dark field with an orange edge when in use
     direct lines      blue-topped strip under the console
     section starts    a full-width line with an orange numbered tab
   ============================================================ */

:root {
  --fd-bar-h: 56px;
  --fd-mono: "JetBrains Mono", ui-monospace, monospace;
  --fd-measure: 62rem;   /* reading width of the conversation */
  --fd-gut: 0.9rem;      /* console inner gutter */
  --fd-ask: rgba(95, 168, 199, 0.08);     /* --pass, as a surface */
  --fd-ask-hi: rgba(95, 168, 199, 0.18);
  --fd-tab-hi: #23262d;                   /* one step above --panel-2 */
}

.fd-micro {
  font-family: var(--fd-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0;
}
.fd-sig { color: var(--signal); }
.fd-rule { display: flex; align-items: center; gap: 0.75rem; }
.fd-rule::before { content: ""; width: 2rem; height: 1px; background: var(--signal); flex: none; }
.fd-wide { display: none; }
.fd-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); flex: none; }
.fd-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- menu bar: always on screen ---------- */
.fd-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--fd-bar-h);
  display: flex; align-items: stretch; justify-content: space-between; gap: 1rem;
  padding: 0 1.25rem;
  background: rgba(23, 24, 28, 0.96);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.85);
}
/* orange hairline that starts at the logo and fades out */
.fd-bar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, var(--signal), rgba(255, 158, 64, 0) 38%);
}

.fd-brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--ink); min-width: 0; }
.fd-logo {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 46px; padding: 4px 6px; border-radius: 3px;
  background: #f5f1e4; border: 1px solid var(--line);
}
.fd-logo img { width: 100%; height: auto; display: block; }
.fd-brand-t {
  font-family: var(--fd-mono); font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; white-space: nowrap;
}
.fd-brand-t i { font-style: normal; font-weight: 400; color: var(--faint); margin-left: 0.75rem; letter-spacing: 0.16em; }

.fd-nav { display: none; align-items: stretch; }
.fd-nav a {
  position: relative; display: flex; align-items: center; padding: 0 0.8rem;
  font-family: var(--fd-mono); font-size: 0.69rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; white-space: nowrap;
  transition: color 0.25s, background 0.25s;
}
.fd-nav a + a::before { content: ""; position: absolute; left: 0; top: 50%; width: 1px; height: 12px; margin-top: -6px; background: var(--line); }
.fd-nav a::after {
  content: ""; position: absolute; left: 0.8rem; right: 0.8rem; bottom: -1px; height: 2px;
  background: var(--signal); box-shadow: 0 0 12px rgba(255, 158, 64, 0.7);
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease-reveal);
}
.fd-nav a:hover { color: var(--signal); }
.fd-nav a:hover::after, .fd-nav a.is-on::after { transform: scaleX(1); }
.fd-nav a.is-on { color: var(--signal); background: linear-gradient(180deg, rgba(255, 158, 64, 0), var(--signal-dim)); }

.fd-bar-r { display: flex; align-items: center; gap: 0.5rem; flex: none; }
.fd-bar-ask, .fd-bar-menu {
  height: 34px; padding: 0 0.9rem; cursor: pointer;
  font-family: var(--fd-mono); font-size: 0.65rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  border: 1px solid var(--line); background: transparent;
}
.fd-bar-ask { display: none; border-color: var(--signal); background: var(--signal); color: #0a0b0d; transition: opacity 0.3s; }
.fd-bar-ask:hover { opacity: 0.85; }
.fd-bar.is-off-desk .fd-bar-ask { display: inline-block; }
.fd-bar-menu {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--ink); background: var(--bg); border-color: var(--faint);
  transition: color 0.25s, border-color 0.25s;
}
.fd-burger { display: grid; gap: 3px; width: 14px; }
.fd-burger i { display: block; height: 1.5px; background: var(--signal); transition: transform 0.3s var(--ease-reveal), opacity 0.2s; }
.fd-bar-menu:hover, .fd-bar-menu[aria-expanded="true"] { border-color: var(--signal); color: var(--signal); }
.fd-bar-menu[aria-expanded="true"] .fd-burger i:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.fd-bar-menu[aria-expanded="true"] .fd-burger i:nth-child(2) { opacity: 0; }
.fd-bar-menu[aria-expanded="true"] .fd-burger i:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }

/* ---------- index overlay ---------- */
.fd-index {
  position: fixed; inset: 0; z-index: 55;
  padding: calc(var(--fd-bar-h) + 2.5rem) 1.25rem 5.5rem;
  background: var(--bg);
  overflow-y: auto; overscroll-behavior: contain;
  animation: fdFade 0.3s var(--ease-reveal) both;
}
.fd-index-in { max-width: 62rem; margin: 0 auto; }
.fd-index-list { list-style: none; margin: 2rem 0 0; padding: 0; border-bottom: 1px solid var(--line); }
.fd-index-list a {
  display: grid; grid-template-columns: 2.75rem 1fr; align-items: baseline; column-gap: 0.5rem;
  padding: 1.05rem 0.5rem; border-top: 1px solid var(--line);
  text-decoration: none; color: var(--ink); transition: background 0.3s, padding-left 0.4s var(--ease-reveal);
}
.fd-index-list a:hover { background: var(--panel); padding-left: 1rem; }
.fd-index-list span { font-family: var(--fd-mono); font-size: 0.625rem; color: var(--faint); letter-spacing: 0.1em; }
.fd-index-list b { font-family: "Space Grotesk", sans-serif; font-size: clamp(1.25rem, 3vw, 1.9rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; transition: color 0.3s; }
.fd-index-list a:hover b { color: var(--signal); }
.fd-index-list i {
  grid-column: 2; font-style: normal; margin-top: 0.3rem;
  font-family: var(--fd-mono); font-size: 0.625rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute);
}
@keyframes fdFade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- desk section ---------- */
.fd { position: relative; overflow: hidden; background: var(--bg); }
.fd-grid { position: absolute; inset: 0; opacity: 0.6; }
.fd-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 520px at 80% 22%, rgba(255, 158, 64, 0.075), transparent 65%),
    radial-gradient(700px 500px at 8% 92%, rgba(95, 168, 199, 0.05), transparent 60%);
}
.fd-in { position: relative; z-index: 1; padding: calc(var(--fd-bar-h) + 0.6rem) 0.6rem 2rem; }

/* ---------- console: fills the first screen ---------- */
.fd-console {
  display: flex; flex-direction: column; min-width: 0;
  /* viewport minus the menu bar, the gap above, and the app's fixed bottom bar on phones */
  height: calc(100vh - var(--fd-bar-h) - 0.6rem - 68px);
  height: calc(100svh - var(--fd-bar-h) - 0.6rem - 68px - env(safe-area-inset-bottom, 0px));
  min-height: 440px;
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 40px 80px -50px rgba(0, 0, 0, 0.95);
  scroll-margin-top: calc(var(--fd-bar-h) + 0.6rem);
}

/* title strip — orange wash */
.fd-console-h {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.6rem var(--fd-gut); border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--signal-dim), rgba(255, 158, 64, 0) 60%), var(--panel-2);
  font-family: var(--fd-mono); font-size: 0.625rem; letter-spacing: 0.18em; text-transform: uppercase;
}
.fd-console-sub { color: var(--faint); margin-left: 1rem; }
.fd-console-live { display: flex; align-items: center; gap: 0.5rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.fd-clock:not(:empty)::before { content: "·"; margin: 0 0.5rem; }

/* step label above the tabs */
.fd-zone {
  flex: none; margin: 0; padding: 0.4rem var(--fd-gut) 0.35rem;
  background: var(--panel-2);
  font-family: var(--fd-mono); font-size: 0.575rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute);
}
.fd-zone b { margin-right: 0.6rem; font-weight: 500; color: var(--signal); }
.fd-zone span { color: var(--faint); }

/* exam tabs: one swipeable row on phones, seven equal tabs on desktop */
.fd-exams {
  position: relative; flex: none; display: flex; gap: 1px; overflow-x: auto;
  padding: 0 0 0 var(--fd-gut);
  border-bottom: 2px solid var(--signal); background: var(--panel-2);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent);
}
.fd-exams::-webkit-scrollbar { display: none; }
.fd-exam {
  position: relative; flex: 0 0 auto;
  display: grid; grid-template-columns: auto auto; align-items: baseline; align-content: center;
  column-gap: 0.5rem; row-gap: 0.15rem;
  min-height: 46px; padding: 0.5rem 1rem; text-align: left; white-space: nowrap; cursor: pointer;
  background: var(--fd-tab-hi); border: 0; border-top: 2px solid #343842; color: var(--ink);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.fd-exam:last-child { margin-right: 2.5rem; }
.fd-exam:hover { border-top-color: var(--signal); background: #2c2f37; }
.fd-exam-n { font-family: var(--fd-mono); font-size: 0.6rem; color: var(--faint); font-variant-numeric: tabular-nums; transition: color 0.25s; }
.fd-exam-t { font-size: 0.95rem; font-weight: 600; letter-spacing: -0.01em; }
.fd-exam-b { display: none; grid-column: 2; font-family: var(--fd-mono); font-size: 0.575rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); transition: color 0.25s; }
/* the chosen exam: solid orange, joined to the orange line beneath */
.fd-exam.is-on, .fd-exam.is-on:hover { background: var(--signal); border-top-color: var(--signal); color: #0a0b0d; }
.fd-exam.is-on .fd-exam-n, .fd-exam.is-on .fd-exam-b { color: rgba(10, 11, 13, 0.72); }

/* conversation — the darkest surface */
.fd-log {
  position: relative; flex: 1 1 0; min-height: 0;
  overflow-y: auto; /* no overscroll-behavior here: the wheel must carry on to the page */
  padding: 0.25rem var(--fd-gut); background: var(--bg);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.fd-log:focus-visible { outline: 1px solid var(--signal); outline-offset: -1px; }

.fd-msg {
  display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); column-gap: 0.75rem;
  max-width: var(--fd-measure); margin: 0 auto; padding: 1rem 0;
  animation: fdIn 0.55s var(--ease-reveal) both;
}
/* a new question starts a new exchange: rule it off from the answer before */
.fd-msg.is-you { margin-top: 0.5rem; padding-top: 1.5rem; padding-bottom: 0.35rem; border-top: 1px solid var(--line); }
.fd-msg.is-you:first-child { border-top: 0; margin-top: 0; }
@keyframes fdIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.fd-who { font-family: var(--fd-mono); font-size: 0.6rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); padding-top: 0.3rem; }
.fd-msg.is-desk .fd-who { color: var(--signal); }
.fd-msg.is-you .fd-who { padding-top: 0.85rem; }

.fd-body { font-size: 0.9375rem; line-height: 1.62; color: var(--mute); overflow-wrap: anywhere; }
.fd-body > :first-child { margin-top: 0; }
.fd-body > :last-child { margin-bottom: 0; }
.fd-body p { margin: 0 0 0.7rem; }
.fd-body ul, .fd-body ol { margin: 0 0 0.7rem; padding: 0; list-style: none; }
.fd-body li { position: relative; padding-left: 1.15rem; margin: 0.4rem 0; }
.fd-body ul > li::before { content: "▸"; position: absolute; left: 0; top: 0.28em; font-family: var(--fd-mono); font-size: 0.625rem; color: var(--signal); }
.fd-body ol { counter-reset: fd; }
.fd-body ol > li { counter-increment: fd; padding-left: 1.6rem; }
.fd-body ol > li::before { content: counter(fd, decimal-leading-zero); position: absolute; left: 0; top: 0.3em; font-family: var(--fd-mono); font-size: 0.625rem; color: var(--signal); }
.fd-body strong { color: var(--ink); font-weight: 600; }
.fd-body a { color: var(--signal); text-underline-offset: 3px; }
/* your own message: a grey block, so it never reads as part of an answer */
.fd-msg.is-you .fd-body {
  justify-self: start; max-width: 100%; padding: 0.6rem 0.95rem;
  background: var(--panel-2); border: 1px solid var(--line); border-left: 2px solid var(--ink);
  color: var(--ink); font-weight: 500;
}
.fd-msg.is-err .fd-body { color: #e9a08f; }

.fd-body p.fd-hello { margin: 0.1rem 0 0.6rem; font-size: clamp(1.35rem, 5.6vw, 2.1rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; color: var(--ink); }

.fd-card-h { font-size: 1.05rem; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.fd-card-h span { display: block; margin-top: 0.15rem; font-family: var(--fd-mono); font-size: 0.6rem; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }

/* questions you can ask — blue, sentence case, "?" badge. Nothing else on the page looks like this. */
.fd-topics { display: grid; grid-template-columns: 1fr; gap: 0.4rem; margin: 0.8rem 0 0; }
.fd-topic {
  display: flex; align-items: center; gap: 0.65rem;
  min-height: 44px; padding: 0.5rem 0.8rem 0.5rem 0.7rem; text-align: left; cursor: pointer;
  font-family: "Space Grotesk", system-ui, sans-serif; font-size: 0.9rem; font-weight: 500; line-height: 1.3; letter-spacing: 0;
  color: var(--ink); background: var(--fd-ask); border: 0; border-left: 2px solid var(--pass);
  transition: background 0.25s, color 0.25s;
}
.fd-topic::before {
  content: "?"; flex: none; display: grid; place-items: center; width: 1.2rem; height: 1.2rem; border-radius: 50%;
  font-family: var(--fd-mono); font-size: 0.65rem; font-weight: 500; line-height: 1;
  color: var(--pass); border: 1px solid var(--pass); transition: background 0.25s, color 0.25s;
}
.fd-topic::after { content: "→"; margin-left: auto; padding-left: 0.5rem; font-family: var(--fd-mono); font-size: 0.75rem; color: var(--faint); transition: transform 0.35s var(--ease-reveal), color 0.25s; }
.fd-topic:hover { background: var(--fd-ask-hi); }
.fd-topic:hover::before { background: var(--pass); color: #0a0b0d; }
.fd-topic:hover::after { color: var(--pass); transform: translateX(4px); }

/* official links — orange outline, leave the site */
.fd-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0; }
.fd-link {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 40px; padding: 0.5rem 0.9rem;
  font-family: var(--fd-mono); font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--signal) !important; text-decoration: none; border: 1px solid var(--signal);
  transition: background 0.3s, color 0.3s;
}
.fd-link:hover { background: var(--signal); color: #0a0b0d !important; }

/* open days — a data card with a solid orange header */
.fd-cal { margin: 1rem 0 0; background: var(--panel); border: 1px solid rgba(255, 158, 64, 0.5); animation: fdIn 0.55s var(--ease-reveal) both; }
.fd-body .fd-cal p { margin: 0; }
.fd-body .fd-cal p.fd-cal-h {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.9rem;
  background: var(--signal); color: #0a0b0d;
  font-family: var(--fd-mono); font-size: 0.65rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
}
.fd-cal-h .fd-dot { background: #0a0b0d; box-shadow: none; }
.fd-cal-cs { display: grid; grid-template-columns: 1fr; }
.fd-cal-c { padding: 0.8rem 0.9rem 0.85rem; border-top: 1px solid var(--line); }
.fd-cal-c:first-child { border-top: 0; }
.fd-cal-c strong { display: block; font-size: 1rem; }
.fd-body .fd-cal p.fd-cal-m { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr); column-gap: 0.75rem; margin-top: 0.3rem; font-family: var(--fd-mono); font-size: 0.75rem; line-height: 1.7; color: var(--ink); font-variant-numeric: tabular-nums; }
.fd-cal-m span { color: var(--signal); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.65rem; line-height: 1.95; }
.fd-body .fd-cal p.fd-cal-k { margin-top: 0.45rem; font-family: var(--fd-mono); font-size: 0.575rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.fd-body .fd-cal p.fd-cal-n { padding: 0.6rem 0.9rem; border-top: 1px solid var(--line); background: var(--panel-2); font-family: var(--fd-mono); font-size: 0.575rem; letter-spacing: 0.12em; line-height: 1.7; text-transform: uppercase; color: var(--mute); }

.fd-src { margin: 0.9rem 0 0; font-family: var(--fd-mono); font-size: 0.575rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); }
.fd-more { margin: 1rem 0 0; padding-top: 0.85rem; border-top: 1px dashed var(--line); }
.fd-more .fd-src { margin: 0; color: var(--pass); }
.fd-more .fd-topics { margin-top: 0.55rem; }

.fd-wait { font-family: var(--fd-mono); font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint); }
.fd-wait::after { content: "█"; margin-left: 0.4rem; color: var(--signal); animation: caret-blink 1.1s steps(1) infinite; }

/* question box — a dark field in a raised band, aligned to the reading width */
.fd-form {
  flex: none; display: flex; align-items: stretch;
  padding: 0.7rem max(var(--fd-gut), calc((100% - var(--fd-measure)) / 2));
  border-top: 1px solid var(--line); background: var(--panel-2);
  box-shadow: 0 -18px 24px -18px rgba(0, 0, 0, 0.8);
}
.fd-field {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: flex-end; gap: 0.6rem; padding: 0 0.85rem;
  background: var(--bg); border: 1px solid var(--faint); border-right: 0;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.fd-form:focus-within .fd-field { border-color: var(--signal); box-shadow: inset 2px 0 0 var(--signal); }
.fd-prompt { font-family: var(--fd-mono); font-size: 1.05rem; line-height: 2.75rem; color: var(--signal); }
.fd-q {
  flex: 1 1 auto; min-width: 0; min-height: 2.75rem; max-height: 7.5rem; resize: none;
  padding: 0.62rem 0; border: 0; outline: 0; background: transparent;
  font-family: "Space Grotesk", system-ui, sans-serif; font-size: 1.05rem; line-height: 1.45; color: var(--ink);
}
.fd-q::placeholder { color: var(--mute); opacity: 1; }
.fd-send {
  flex: none; align-self: stretch; min-height: 2.75rem; padding: 0 1.2rem; cursor: pointer; border: 1px solid var(--signal);
  font-family: var(--fd-mono); font-size: 0.65rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  background: var(--signal); color: #0a0b0d; transition: opacity 0.3s;
}
.fd-send:disabled { opacity: 0.35; cursor: not-allowed; }
.fd-legal {
  flex: none; display: flex; justify-content: space-between; gap: 0.4rem 1.5rem; flex-wrap: wrap;
  margin: 0; padding: 0 max(var(--fd-gut), calc((100% - var(--fd-measure)) / 2)) 0.6rem;
  background: var(--panel-2);
  font-family: var(--fd-mono); font-size: 0.56rem; letter-spacing: 0.12em; line-height: 1.7; text-transform: uppercase; color: var(--faint);
}
.fd-legal span { display: none; }
.fd-legal a { color: var(--signal); text-decoration: none; white-space: nowrap; }
.fd-legal a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- direct lines (below the console) — blue-topped strip ---------- */
.fd-lines-h {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.3rem 1rem; margin: 1.5rem 0 0.6rem;
  font-family: var(--fd-mono); font-size: 0.625rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint);
}
.fd-lines-h b { font-family: "Space Grotesk", system-ui, sans-serif; font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; text-transform: none; color: var(--ink); }
.fd-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-top: 2px solid var(--pass); }
a.fd-line { display: block; padding: 0.9rem 1rem; background: var(--panel); text-decoration: none; transition: background 0.3s; min-width: 0; }
.fd-line:hover { background: var(--panel-2); }
.fd-line span { display: block; font-family: var(--fd-mono); }
.fd-line-k { font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--pass); }
.fd-line-v { margin-top: 0.45rem; font-size: 0.9rem; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; transition: color 0.3s; overflow-wrap: anywhere; }
.fd-line:hover .fd-line-v { color: var(--pass); }
.fd-line-n { display: none !important; margin-top: 0.6rem; font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); }

/* ---------- end of the desk: a band that closes it and lists what follows ---------- */
.fd-next {
  position: relative; z-index: 1; display: grid; gap: 0.75rem;
  padding: 1.1rem 1.25rem 1.2rem;
  background: var(--panel-2); border-top: 1px solid var(--line);
}
.fd-next-h { margin: 0; display: flex; align-items: center; gap: 0.6rem; font-family: var(--fd-mono); font-size: 0.625rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--signal); white-space: nowrap; }
.fd-next-h span { display: inline-block; animation: fdNudge 1.8s var(--ease-reveal) infinite; }
@keyframes fdNudge { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
.fd-next-l { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.fd-next-l a {
  display: inline-flex; align-items: baseline; gap: 0.5rem; padding: 0.45rem 0.75rem;
  font-size: 0.9rem; font-weight: 500; color: var(--ink); text-decoration: none;
  background: var(--bg); border: 1px solid var(--line); transition: border-color 0.25s, color 0.25s;
}
.fd-next-l a span { font-family: var(--fd-mono); font-size: 0.6rem; color: var(--faint); letter-spacing: 0.1em; }
.fd-next-l a:hover { border-color: var(--signal); color: var(--signal); }

/* ---------- floating launcher (shown once the desk scrolls away) ---------- */
.fd-launch {
  position: fixed; z-index: 58; right: 1rem; bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  height: 44px; padding: 0 1.1rem; cursor: pointer; border: 0;
  font-family: var(--fd-mono); font-size: 0.65rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  background: var(--signal); color: #0a0b0d;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  animation: fdIn 0.5s var(--ease-reveal) both;
}

/* ---------- keyboard focus ---------- */
.fd-bar a:focus-visible, .fd-bar button:focus-visible, .fd-index a:focus-visible,
.fd-exam:focus-visible, .fd-topic:focus-visible, .fd-link:focus-visible, .fd-legal a:focus-visible,
.fd-send:focus-visible, .fd-line:focus-visible, .fd-next a:focus-visible, .fd-launch:focus-visible {
  outline: 2px solid var(--signal); outline-offset: 2px;
}
.fd-exam:focus-visible, .fd-nav a:focus-visible { outline-offset: -2px; }

/* ============================================================
   Where one section ends and the next begins.
   Every section of the site below the desk opens with a full-width
   line and an orange numbered tab — the same numbers the menu uses.
   ============================================================ */
#airlock, #protocol, #floor, #registry, #simulation, #clearance, #sites, #briefing, #contact {
  border-top: 1px solid var(--line);
  scroll-margin-top: var(--fd-bar-h);
}
#airlock::before, #protocol::before, #floor::before, #registry::before, #simulation::before,
#clearance::before, #sites::before, #briefing::before, #contact::before {
  position: absolute; top: 0; left: 1.25rem; z-index: 6; pointer-events: none;
  padding: 0.42rem 0.8rem 0.4rem;
  font-family: var(--fd-mono); font-size: 0.6rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap;
  background: var(--signal); color: #0a0b0d;
  box-shadow: 0 8px 22px -6px rgba(255, 158, 64, 0.45);
}
#airlock::after, #protocol::after, #floor::after, #registry::after, #simulation::after,
#clearance::after, #sites::after, #briefing::after, #contact::after {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 2px; z-index: 6; pointer-events: none;
  background: linear-gradient(90deg, var(--signal) 0, var(--signal) 1.25rem, rgba(255, 158, 64, 0.55) 22%, rgba(255, 158, 64, 0) 60%);
}
/* these two open with the app's own pinned label in the top-left corner: hang the tab above the line instead */
#protocol::before, #floor::before { transform: translateY(-100%); box-shadow: 0 -8px 22px -6px rgba(255, 158, 64, 0.45); }
#airlock::before    { content: "00 · The facility"; }
#protocol::before   { content: "01 · Exam-day journey"; }
#floor::before      { content: "02 · Inside the facility"; }
#registry::before   { content: "03 · Exam catalogue"; }
#simulation::before { content: "04 · Exam Test Drive"; }
#clearance::before  { content: "05 · Authorizations"; }
#sites::before      { content: "06 · Two centres"; }
#briefing::before   { content: "07 · Candidate FAQ"; }
#contact::before    { content: "08 · Contact"; }

/* the app's own hero now follows the desk: give it room under the bar */
#airlock > header { padding-top: calc(var(--fd-bar-h) + 0.5rem); }

/* ---------- tablet ---------- */
@media (min-width: 640px) {
  :root { --fd-gut: 1.25rem; }
  .fd-wide { display: inline; }
  .fd-in { padding-left: 1.25rem; padding-right: 1.25rem; }
  .fd-topics { grid-template-columns: 1fr 1fr; }
  .fd-legal span { display: inline; }
  .fd-lines { grid-template-columns: repeat(4, 1fr); }
  .fd-line-n { display: block !important; }
  .fd-cal-cs { grid-template-columns: 1fr 1fr; }
  .fd-cal-c { border-top: 0; }
  .fd-cal-c + .fd-cal-c { border-left: 1px solid var(--line); }
  .fd-cal-c:only-child { grid-column: 1 / -1; }
}

/* ---------- desktop (the app's fixed rail is on the right from 768px; no bottom bar) ---------- */
@media (min-width: 768px) {
  .fd-bar { right: var(--rail-w); padding: 0 2.5rem; }
  .fd-index { right: var(--rail-w); padding-left: 2.5rem; padding-right: 2.5rem; }
  .fd-in { padding: calc(var(--fd-bar-h) + 1.25rem) calc(var(--rail-w) + 2.5rem) 1.75rem 2.5rem; }
  .fd-console {
    height: calc(100vh - var(--fd-bar-h) - 2.5rem);
    height: calc(100svh - var(--fd-bar-h) - 2.5rem);
    min-height: 500px;
    scroll-margin-top: calc(var(--fd-bar-h) + 1.25rem);
  }
  .fd-launch { right: calc(var(--rail-w) + 1.5rem); bottom: 1.5rem; }
  a.fd-line { padding: 1.1rem 1.25rem; }
  .fd-line-v { font-size: 1.05rem; }
  .fd-msg { grid-template-columns: 3.4rem minmax(0, 1fr); padding: 1.15rem 0; }
  .fd-body { font-size: 1rem; }
  .fd-next { grid-template-columns: auto 1fr; align-items: center; gap: 1.5rem; padding: 1.1rem calc(var(--rail-w) + 2.5rem) 1.2rem 2.5rem; }
  #airlock::before, #protocol::before, #floor::before, #registry::before, #simulation::before,
  #clearance::before, #sites::before, #briefing::before, #contact::before { left: 2.5rem; font-size: 0.65rem; }
  #airlock::after, #protocol::after, #floor::after, #registry::after, #simulation::after,
  #clearance::after, #sites::after, #briefing::after, #contact::after {
    background: linear-gradient(90deg, var(--signal) 0, var(--signal) 2.5rem, rgba(255, 158, 64, 0.55) 22%, rgba(255, 158, 64, 0) 60%);
  }
}
@media (min-width: 900px) {
  .fd-topics { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .fd-nav { display: flex; }
  .fd-brand-t i { display: none; }
  /* the menu already has "Support desk" and the launcher floats bottom-right */
  .fd-bar.is-off-desk .fd-bar-ask { display: none; }
  .fd-exams { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); overflow: visible; padding: 0 var(--fd-gut); -webkit-mask-image: none; mask-image: none; }
  .fd-exam { grid-template-columns: auto minmax(0, 1fr); min-height: 58px; padding: 0.6rem 0.9rem; white-space: normal; }
  .fd-exam:last-child { margin-right: 0; }
  .fd-exam-t { font-size: 1rem; }
}
@media (min-width: 1200px) {
  .fd-exam-b { display: block; }
}
@media (min-width: 1360px) {
  .fd-brand-t i { display: inline; }
  .fd-nav a { padding: 0 1rem; letter-spacing: 0.16em; }
  .fd-nav a::after { left: 1rem; right: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .fd-bar, .fd-index, .fd-msg, .fd-launch, .fd-nav a::after { animation: none !important; transition: none !important; }
  .fd-next-h span, .fd-wait::after { animation: none !important; }
}
