/* The pages ov-web renders itself — sign-in, and the calm pages around it (starting, signed out,
 * refusals) — in the f|tfo analytics design (D, operator-approved 2026-10-02), light and dark by
 * the computer's choice (these pages come before anyone is signed in, so before any account).
 * The page's CSP allows no inline style: everything is here. Fonts and backgrounds come from the
 * service itself (no outside request): the fonts are the case manager's own files
 * (castviz-core hosted-portal/brand/fonts, OFL-1.1, kept by name under portal-assets/), the
 * backgrounds ov-web's brand.rs. */

@font-face { font-family: "Outfit"; font-style: normal; font-weight: 300; font-display: swap; src: url(/__ov/portal-assets/outfit-latin-300-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: "Outfit"; font-style: normal; font-weight: 300; font-display: swap; src: url(/__ov/portal-assets/outfit-latin-ext-300-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 400; font-display: swap; src: url(/__ov/portal-assets/outfit-latin-400-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: "Outfit"; font-style: normal; font-weight: 400; font-display: swap; src: url(/__ov/portal-assets/outfit-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 500; font-display: swap; src: url(/__ov/portal-assets/outfit-latin-500-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: "Outfit"; font-style: normal; font-weight: 500; font-display: swap; src: url(/__ov/portal-assets/outfit-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 300; font-display: swap; src: url(/__ov/portal-assets/montserrat-latin-300-normal.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url(/__ov/portal-assets/montserrat-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/__ov/portal-assets/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }

/* Paper (light) and Night (dark): the design's two token sets. */
:root {
  color-scheme: light dark;
  --bg: #f5f7fb;
  --surface: #fff;
  --text: #0a1222;
  --muted: #4f5d75;
  --line: #dce3ee;
  --blue: #2457f5;
  --cyan: #0fa6c7;
  --good: #12895a;
  --warn: #8a6100;
  --danger: #b4232f;
  --descriptor: #0a1222;
  --signin-bg: url(/__ov/brand/signin-light.svg?v=20261010marcy);
  --calm-bg: url(/__ov/brand/contours-light.svg?v=20261010marcy);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Montserrat", "Outfit", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  /* The page margin grows with the window, so a wide screen does not leave the lockup pinned to its edge. */
  --gutter: clamp(56px, 7vw, 168px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070b16;
    --surface: #0e1729;
    --text: #eaf0fa;
    --muted: #9aa8bf;
    --line: #1f2d47;
    --blue: #2f6bff;
    --cyan: #22d3ee;
    --good: #3dd68c;
    --warn: #e3b341;
    --danger: #ff7a7a;
    --descriptor: #e3e8f0;
    --signin-bg: url(/__ov/brand/signin-dark.svg?v=20261010marcy);
    --calm-bg: url(/__ov/brand/contours-dark.svg?v=20261010marcy);
  }
}

* { box-sizing: border-box; }
/* A phone turned sideways keeps the text the size it was (iOS would enlarge it). */
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); }
a:focus-visible, .ft-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* The wordmark: letters in the text colour, the bar blue → cyan (the only gradient). */
.ft-wordmark { display: block; color: var(--text); overflow: visible; }
.ft-stop-blue { stop-color: var(--blue); }
.ft-stop-cyan { stop-color: var(--cyan); }

/* ── the frame: agency and state above, who may use it below ─────────────────────────────── */
body.ft-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
body.ft-signin { background-image: var(--signin-bg); }
body.ft-calm { background-image: var(--calm-bg); }

.ft-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px var(--gutter);
}
.ft-agency { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.ft-seal {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}
.ft-agency-name { font-size: 15px; font-weight: 500; }
.ft-top-brand { display: flex; align-items: center; color: var(--text); text-decoration: none; }
.ft-top-brand .ft-wordmark { width: auto; height: 30px; }
.ft-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
}
.ft-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.ft-dot.is-good { background: var(--good); }
.ft-dot.is-warn { background: var(--warn); }

.ft-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--gutter) 26px;
  color: var(--muted);
  font-size: 13px;
}
.ft-mono { font-family: var(--mono); font-size: 12px; }

/* ── sign-in ─────────────────────────────────────────────────────────────────────────────── */
.ft-signin-main { display: flex; flex: 1; align-items: center; padding: 24px var(--gutter); }
/* Wide windows: the lockup and form sit centred in the left half, opposite the sector and the
 * marker on the right (owner, 2026-10-12). Pinned to the margin, they left the page heavy on the
 * left with an empty band down the middle. */
@media (min-width: 1100px) {
  .ft-signin-main { display: grid; grid-template-columns: 1fr 1fr; }
  .ft-signin-col { justify-self: center; }
}
.ft-signin-col { display: flex; flex-direction: column; gap: 44px; width: 100%; max-width: 480px; }
.ft-lockup { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 440px; container-type: inline-size; }
.ft-lockup .ft-wordmark { width: 100%; height: auto; }
.ft-descriptor {
  display: flex;
  justify-content: space-between;
  width: 93%;
  margin: 4px 0 0 4.3%;
  color: var(--descriptor);
  font-family: var(--display);
  font-size: 34px;
  font-size: min(34px, 7.7cqi);
  font-weight: 400;
  line-height: 1.2;
}
.ft-rule { height: 1px; margin-top: 16px; background: var(--line); }
.ft-tagline {
  margin: 0;
  text-align: center;
  text-wrap: balance;
  color: var(--muted);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.06em;
}
.ft-signin-actions { display: flex; flex-direction: column; gap: 14px; max-width: 440px; }
.ft-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 56px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.ft-btn:hover { filter: brightness(1.1); }
.ft-btn:active { transform: translateY(1px); }
.ft-note { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* One sign-in page for everyone (operator 2026-10-07): the work address first, then Continue. */
.ft-form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.ft-label { color: var(--text); font-size: 14px; font-weight: 500; letter-spacing: 0.02em; }
.ft-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.ft-input::placeholder { color: var(--muted); opacity: 0.8; }
.ft-input:focus { border-color: var(--blue); outline: 2px solid var(--cyan); outline-offset: 2px; }
.ft-input[aria-invalid="true"] { border-color: var(--danger); }
.ft-field-msg { margin: 0; color: var(--danger); font-size: 14px; font-weight: 400; line-height: 1.45; }
button.ft-btn { width: 100%; margin-top: 6px; border: 0; font-family: var(--font); letter-spacing: inherit; cursor: pointer; }
.ft-btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.ft-btn.is-quiet { height: 48px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 15px; }
.ft-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.ft-or::before, .ft-or::after { flex: 1; height: 1px; background: var(--line); content: ""; }

/* ── the calm pages ──────────────────────────────────────────────────────────────────────── */
.ft-calm-main { display: flex; flex: 1; align-items: center; justify-content: center; padding: 24px var(--gutter); }
.ft-card {
  width: 100%;
  max-width: 540px;
  padding: 28px 32px 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.ft-card h1 { margin: 0 0 10px; font-size: 28px; font-weight: 300; letter-spacing: -0.01em; }
.ft-card p { margin: 10px 0 0; color: var(--muted); }
.ft-card p:first-of-type { color: var(--text); }
.ft-card code { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.ft-card a.button {
  display: inline-flex;
  align-items: center;
  height: 46px;
  margin-top: 8px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
}
.ft-card a.button:hover { filter: brightness(1.1); }
/* A refusal at sign-in: the address the person signed in with, and what they can do next. */
.ft-card .ft-addr { color: var(--text); font-family: var(--mono); font-size: 14px; font-weight: 400; overflow-wrap: anywhere; }
.ft-card .ft-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 20px; }
.ft-card .ft-actions a.button { margin-top: 0; }
.ft-card a.ft-link { color: var(--text); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.ft-card a.ft-link:hover { text-decoration-color: currentColor; }
.ft-card a.button:focus-visible, .ft-card a.ft-link:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
/* The agency picker: one plain form per agency (its seal, its name, a note). */
.ft-card .ft-agencies { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.ft-card .ft-agencies form { margin: 0; }
.ft-agency-choice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  letter-spacing: 0.02em;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.ft-agency-choice:hover:not(:disabled) { border-color: var(--blue); }
.ft-agency-choice:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.ft-agency-choice:disabled { cursor: not-allowed; opacity: 0.55; }
.ft-agency-choice .ft-seal { flex: none; }
.ft-agency-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ft-agency-label { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.ft-agency-note { color: var(--muted); font-size: 13px; font-weight: 400; }

/* A phone, upright or turned sideways (a short touch screen: about 844 × 390, where the wide
 * layout's lockup fills the screen and the address field is below it). A desktop window that is
 * short but has a mouse keeps the wide layout. */
@media (max-width: 720px), (max-height: 500px) and (pointer: coarse) {
  /* A phone has no room beside the lockup for the sector and the marker: contours only. */
  body.ft-signin { background-image: var(--calm-bg); }
  /* The browser's own bars come and go on a phone: fill the screen that is showing, not 100vh. */
  body.ft-page { min-height: 100svh; }
  .ft-top { padding: 14px 20px; }
  .ft-seal { width: 34px; height: 34px; }
  .ft-agency-name { font-size: 14px; }
  .ft-chip { gap: 6px; padding: 5px 10px; font-size: 12px; }
  .ft-signin-main, .ft-calm-main { padding: 16px 20px; }
  .ft-foot { gap: 4px 16px; padding: 14px 20px 18px; font-size: 12px; }
  .ft-card { padding: 22px 20px 24px; }
  /* Phones (owner, 2026-10-12): a smaller, centred lockup and the form from the top, so the address
   * field and Continue sit high enough to stay above the keyboard once it opens. */
  .ft-signin-main { align-items: flex-start; padding: 12px 20px 8px; }
  .ft-signin-col { gap: 28px; }
  .ft-lockup { max-width: 232px; align-self: center; }
  .ft-tagline { font-size: 13px; }
  .ft-signin-actions { gap: 12px; }
  .ft-note { font-size: 14px; }
}
@media (max-width: 720px) and (max-height: 700px), (max-height: 500px) and (pointer: coarse) {
  /* A short phone (iPhone SE): a little less lockup, so Continue still clears the keyboard. */
  .ft-lockup { max-width: 196px; }
  .ft-signin-col { gap: 22px; }
}
