/* Sign-in page for the OM Energy Media Benchmark.
 *
 * Same tokens, same paper, same type as the dashboard behind it, so signing in does not
 * feel like a different product. Three constraints run through the whole file:
 *
 *   1. The live CSP is `style-src 'self'` with no 'unsafe-inline'. There is no <style>
 *      block and no style="" attribute anywhere, including inside the SVG. All colour
 *      comes from classes here; only geometry is a presentation attribute.
 *   2. Nothing loads from another origin. No webfont, no @font-face, no data: URI.
 *      The photograph is served from /brand-assets on this same origin, which is why
 *      `img-src 'self'` needs no widening for it.
 *   3. Spacing uses one scale - 4 8 12 16 20 24 32 40 56 72 96 - and radii are 4, 6, 8.
 *      If a new number appears in a margin or a padding, it is a mistake, not a nudge.
 *
 * The page stands on a photograph of transmission pylons at dusk - lattice towers in
 * silhouette, the lines running off both edges, a mauve sky going peach at the horizon.
 * It carries no faces and no company's property: Pexels, Cristina Tarantino, Pexels
 * Licence, free for commercial use. That matters here. The picture it replaced was the
 * client's own corporate photograph of a compressor station, and a photograph taken
 * from one company's website does not belong on another company's front door, however
 * anonymous the steel in it looks. The silhouette reads as a drawing rather than as
 * stock, and its cool half already agrees with the navy, so the scrim does no violence
 * to it. Everything above it is light type on a graded scrim, or the sign-in card.
 */

:root {
  --ink: #0f1729;
  --muted: #4b5768;
  --subtle: #7a8798;
  --line: #e3e8ef;
  --line-strong: #cbd3df;
  --panel: #ffffff;
  --panel-soft: #f8fafc;

  /* EP Group, the same tokens the decks are built on. */
  --brand: #122140;
  --brand-dark: #0a1328;
  --brand-mid: #3d4f75;
  --brand-wash: #f2f5f9;
  --accent: #d1ac45;
  /* The accent lifted a step, for type and marks that sit on the photograph itself. */
  --accent-lift: #e3c06a;

  --elec: #2a78d6;
  --gas-ink: #b8471a;
  --red: #c0362c;

  --measure: 1200px;
  --pad: clamp(20px, 4vw, 56px);

  /* Type and rules that sit on the photograph rather than on paper. Alpha rather than
     flat greys, so the image still shows through and the page keeps its depth. */
  --on-photo: #f2f5fb;
  --on-photo-muted: rgba(230, 236, 246, 0.92);
  --on-photo-subtle: rgba(222, 230, 243, 0.80);
  --on-photo-line: rgba(255, 255, 255, 0.16);
  --on-photo-line-strong: rgba(255, 255, 255, 0.30);

  /* The commodity marks, lifted for a dark ground. The paper values stay for the card. */
  --elec-bright: #74b0f2;
  --gas-bright: #f09062;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Inter, "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  color: var(--on-photo);
  color-scheme: light;
  /* Painted first so the page is never white while the photograph decodes, and so it
     stays right in the strip a phone shows past the end of the image. */
  background-color: #0a1328;
  background-image: url("/brand-assets/login-backdrop.jpg");
  background-image: -webkit-image-set(
      url("/brand-assets/login-backdrop.webp") type("image/webp"),
      url("/brand-assets/login-backdrop.jpg") type("image/jpeg"));
  background-image: image-set(
      url("/brand-assets/login-backdrop.webp") type("image/webp"),
      url("/brand-assets/login-backdrop.jpg") type("image/jpeg"));
  background-size: cover;
  /* Below centre: it keeps the pipework and the turbines in frame and lets the sky fall
     behind the masthead, where the type is smallest. */
  background-position: 50% 62%;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* The scrim. Three layers, each with a job, and none of them decoration:
   most of the work is already in the file. The photograph ships duotoned into the EP
   navy and scrimmed from the left by prezentace/tools/designer/prep_images.py's own
   recipe, which is how the decks treat every photograph they use; baking it in means
   the bytes the browser decodes are already the right colour and the type never waits
   on a gradient to become legible. What is left here is light: the first layer deepens
   the right so the sign-in card has a ground, the second seats the masthead and the
   coverage panel at top and bottom. What used to be a third layer - a violet glow in
   the corner - is the deck's gold diamond, cut by the edge of the page the way the
   decks cut it by the edge of a slide. */
.wash {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(103deg,
      rgba(8, 16, 34, 0.30) 0%,
      rgba(10, 19, 40, 0.22) 34%,
      rgba(13, 24, 50, 0.30) 70%,
      rgba(10, 19, 40, 0.52) 100%),
    linear-gradient(180deg,
      rgba(6, 12, 26, 0.52) 0%, rgba(6, 12, 26, 0.00) 18%,
      rgba(6, 12, 26, 0.00) 58%, rgba(6, 12, 26, 0.70) 100%);
}

/* The gold diamond, half off the page. Same device, same corner, same gold as the bar
   at the top of the app behind this door. */
.wash::after {
  content: "";
  position: absolute;
  top: -150px;
  right: -150px;
  width: 440px;
  height: 440px;
  transform: rotate(45deg);
  background: var(--accent);
  opacity: 0.13;
}

/* Bands span the viewport so their rules bleed to both edges; content sits in a measure.
   At 1920 the empty margin is ruled, which is what makes the page read as a faceplate
   rather than as a centred box. */
.band { position: relative; z-index: 1; }
.measure { max-width: var(--measure); margin-inline: auto; padding-inline: var(--pad); }

p { margin: 0; }

/* --- masthead ---------------------------------------------------------------------- */

.band--head { border-bottom: 1px solid var(--on-photo-line); }
.band--head .measure {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 20px;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }

/* Client mark, hairline, agency mark, product name - the same lockup the app header
   carries, so the door and the room behind it are plainly one thing. Both marks are
   white-on-transparent SVG, so neither needs a tile to sit in. */
.client-mark {
  height: 20px; width: auto;
  flex: 0 0 auto;
  /* The mark ships as dark navy on transparent, which on this ground is dark navy on
     dark navy. Knocked to pure white, as the app header does with the same file. */
  filter: brightness(0) invert(1);
  opacity: 0.96;
}
.agency-mark {
  height: 13px; width: auto;
  flex: 0 0 auto;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  opacity: 0.84;
}

.wordmark { font-size: 14px; font-weight: 700; letter-spacing: -0.004em; }

.lang {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid var(--on-photo-line-strong);
  border-radius: 3px;
  flex: 0 0 auto;
}
.lang a {
  position: relative;
  min-width: 44px; min-height: 32px;
  display: grid; place-items: center;
  border-radius: 3px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.03em;
  color: var(--on-photo-muted);
  text-decoration: none;
}
/* Drawn at 44x32, but the tap target is a full 44x44. */
.lang a::after { content: ""; position: absolute; inset: -6px -2px; }
.lang a:hover { color: var(--on-photo); background: rgba(255, 255, 255, 0.10); }
.lang a.is-active { background: #ffffff; color: var(--brand-dark); }

/* --- main band --------------------------------------------------------------------- */

.band--main .measure { padding-block: 48px 56px; }

.eyebrow {
  font-size: 12px; font-weight: 800; line-height: 1.2;
  letter-spacing: 0.14em; text-transform: uppercase;
  /* Gold on dark, which is the rule the whole EP system turns on. */
  color: var(--accent-lift);
}

h1 {
  margin: 16px 0 0;
  font-size: clamp(28px, 2.4vw, 38px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.018em;
  text-wrap: balance;
  /* Two lines are reserved in both languages so switching EN/CZ shifts nothing below. */
  min-height: calc(2 * 1.12em);
}

.standfirst {
  margin-top: 20px;
  max-width: 46ch;
  font-size: 16px; line-height: 1.55;
  color: var(--on-photo-muted);
}

.signals {
  border-top: 1px solid var(--on-photo-line);
  padding-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, auto));
  column-gap: 56px;
  row-gap: 20px;
  justify-content: start;
}
.sfigure {
  font-size: 26px; font-weight: 800; line-height: 1.05;
  letter-spacing: -0.012em;
  font-variant-numeric: tabular-nums lining-nums;
}
.slabel {
  margin-top: 8px;
  max-width: 22ch;
  font-size: 12px; font-weight: 600; line-height: 1.35;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--on-photo-subtle);
}

/* --- the recess -------------------------------------------------------------------- */

/* Glass, not paper. On a flat sheet a shadow would have made this a generic web card,
   which is why the earlier version banned one outright. Over a photograph the opposite is
   true: without elevation the panel reads as pasted on. So it lifts, and it borrows the
   picture through a blur instead of covering it.
   The inputs inside stay opaque white - the lightest thing on the page is still the place
   you type, and nobody should be reading a password through frosted glass. */
.access {
  color: var(--ink);
  /* Solid. It used to be 74% white behind a 24px backdrop blur, and the blur never
     arrived: `background-attachment: fixed` paints the photograph outside the backdrop
     root, so there was nothing there to sample. Against the old dark picture nobody
     noticed; against this one you could read pylons through the password field. */
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-top: 2px solid var(--brand);
  border-radius: 3px;
  padding: 28px;
  box-shadow: 0 28px 64px -30px rgba(4, 3, 18, 0.85);
}

.access.is-error { border-top-color: var(--red); }

.access h2 {
  margin: 0;
  font-size: 20px; font-weight: 700; line-height: 1.3;
  letter-spacing: -0.012em;
}
.access .intro {
  margin-top: 8px;
  font-size: 13px; line-height: 1.5;
  color: var(--muted);
}
.access form { margin-top: 24px; }

.field + .field { margin-top: 20px; }
.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px; font-weight: 700; line-height: 1.2;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--muted);
}
.field input {
  width: 100%;
  /* min-height, never height: text-spacing overrides must not clip the value. */
  min-height: 48px;
  padding: 0 14px;
  font: 400 16px/1.2 inherit;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.field input:hover { border-color: #b9c3d2; }
.field input:focus-visible {
  border-color: var(--brand);
  outline: 2px solid var(--brand-dark);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(74, 58, 167, 0.18);
}
/* Fields never turn red. Marking both implies both were wrong; marking one is an oracle.
   The recess's top edge carries the error state instead. */
.field--pw { position: relative; }
.field--pw input { padding-right: 52px; }
.field input::-ms-reveal { display: none; }

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: inset 0 0 0 100px var(--panel);
  transition: background-color 9999s ease-in-out 0s;
}

/* Progressive enhancement: without scripting there is nothing to toggle, so the control
   is not shown at all. */
.reveal { display: none; }
.js .reveal {
  position: absolute;
  right: 2px; bottom: 2px;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 3px;
  color: var(--muted);
  cursor: pointer;
}
.js .reveal:hover { color: var(--ink); background: var(--panel-soft); }
.js .reveal:focus-visible {
  outline: 2px solid var(--brand-dark);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(74, 58, 167, 0.18);
}
.reveal-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.reveal-slash { display: none; }
.reveal[aria-pressed="true"] .reveal-slash { display: inline; }

.submit {
  width: 100%;
  min-height: 48px;
  margin-top: 24px;
  border: 0;
  border-radius: 3px;
  background: var(--brand);
  color: #ffffff;
  font: 700 15px/1 inherit;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 140ms ease, transform 90ms ease;
}
.submit:hover { background: var(--brand-dark); }
.submit:active { transform: translateY(1px); }
.submit:focus-visible {
  outline: 2px solid var(--brand-dark);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 7px rgba(74, 58, 167, 0.18);
}
/* Busy is the label swap, aria-busy and a darker fill. No spinner, so nothing has to be
   hidden under reduced motion. The button is never disabled before submit: an empty form
   must reach the server, or the denial stops being uniform. */
.submit[aria-busy="true"] { background: var(--brand-dark); cursor: progress; }

.access-rule {
  margin: 20px -28px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.note {
  margin-top: 16px;
  font-size: 12px; line-height: 1.5;
  color: var(--muted);
}
.note + .note { margin-top: 8px; }

/* --- the single denial -------------------------------------------------------------- */

.denial {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 24px;
  padding: 12px 16px;
  background: #fdf3f2;
  border: 1px solid #f0cdc8;
  border-left: 3px solid var(--red);
  border-radius: 3px;
  font-size: 13px; line-height: 1.45;
  color: var(--ink);
}
.denial:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; }
.denial-glyph {
  width: 16px; height: 16px;
  flex: 0 0 auto;
  margin-top: 4px;
  color: var(--red);
  stroke: currentColor; stroke-width: 1.5; fill: none;
}

/* --- coverage panel ----------------------------------------------------------------- */

/* A shelf, not a sheet. It carries a chart, and a chart needs a ground of its own or
   every hairline in it competes with the photograph behind. */
.band--panel {
  border-top: 1px solid var(--on-photo-line);
  border-bottom: 0;
  background: rgba(6, 12, 26, 0.62);
}

/* Same story as the card: the blur never reached the photograph, so this band was only
   ever a flat tint. It stays a flat tint, and now says so. */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .band--panel {
    background: rgba(6, 12, 26, 0.56);
}
.band--panel .measure { padding-block: 32px; }

.pn-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 12px;
}
.pn-label {
  font-size: 12px; font-weight: 800; line-height: 1.2;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-lift);
}
.pn-span {
  margin-left: 12px;
  font-weight: 600; letter-spacing: 0.04em;
  color: var(--on-photo-subtle);
}
.pn-legend {
  display: flex;
  gap: 20px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--on-photo-muted);
}
/* The legend key is a specimen of the mark itself, at its exact drawn height. */
.key {
  display: inline-block;
  width: 14px; height: 3px;
  margin-right: 8px;
  vertical-align: middle;
}
.key--e { background: var(--elec-bright); }
.key--g { background: var(--gas-bright); }

/* Rendered height equals the viewBox height, so y maps 1:1 to CSS pixels and only x
   stretches. That is what stops two rows merging on a narrow screen. */
.pn { display: block; width: 100%; height: 150px; }

.pn-grid line {
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1;
  stroke-dasharray: 1 4;
  vector-effect: non-scaling-stroke;
}
.pn-tracks rect { fill: rgba(255, 255, 255, 0.09); }
.pn-bar--e { fill: var(--elec-bright); }
.pn-bar--g { fill: var(--gas-bright); }
.pn-base { fill: rgba(255, 255, 255, 0.22); }
.pn-axis line {
  stroke: rgba(255, 255, 255, 0.34);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  shape-rendering: crispEdges;
}
.pn-axis line.pn-end { stroke: var(--accent-lift); stroke-width: 2; }

.pn-labels {
  position: relative;
  height: 14px;
  margin-top: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--on-photo-subtle);
}
.pn-labels span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.pn-labels .start { left: 0; transform: none; }
.pn-labels .end { left: 100%; transform: translateX(-100%); }
.y21 { left: 15.789%; }
.y22 { left: 31.579%; }
.y23 { left: 47.368%; }
.y24 { left: 63.158%; }
.y25 { left: 78.947%; }

/* These two sit in the coverage band, which is navy, not paper. They were taking
   --muted, the ink meant for dark type on the white card: #4b5768 on this ground
   measures 2.78:1. On the old, lighter photograph it was merely marginal; a duotone
   and a deeper band turned marginal into unreadable. They belong to the on-photo
   family like everything else down here. */
.pn-caption, .honesty {
  font-size: 13px; line-height: 1.55;
  color: var(--on-photo-subtle);
  max-width: 76ch;
}
.pn-caption { margin-top: 16px; }
.honesty { margin-top: 8px; }

/* --- footer ------------------------------------------------------------------------- */

.band--foot { margin-top: auto; }
.band--foot .measure { padding-block: 16px 20px; }
.band--foot p { font-size: 12px; line-height: 1.5; color: var(--on-photo-subtle); }

/* --- desktop composition ------------------------------------------------------------ */

@media (min-width: 1024px) {
  .band--main .measure {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 384px;
    grid-template-areas:
      "identity access"
      "signals  access";
    column-gap: 96px;
    row-gap: 40px;
    align-items: start;
  }
  .identity { grid-area: identity; }
  .access { grid-area: access; align-self: start; }
  .signals { grid-area: signals; }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .band--main .measure { column-gap: 56px; grid-template-columns: minmax(0, 1fr) 360px; padding-block: 40px 48px; }
}

@media (max-width: 1023px) {
  /* iOS Safari repaints a fixed background on every keyboard event. */
  body { background-attachment: scroll; }
  .band--main .measure { padding-block: 40px 48px; }
  .access { margin-top: 32px; }
  .signals { margin-top: 32px; }
}

@media (max-width: 767px) {
  .band--main .measure { padding-block: 32px 40px; }
  .tile { width: 36px; height: 36px; }
  .access { padding: 20px; }
  .access-rule { margin-inline: -20px; }
  .sfigure { font-size: 20px; }
  .signals { column-gap: 32px; }
  .pn-head { flex-wrap: wrap; row-gap: 8px; }
}

@media (max-width: 640px) {
  /* The measure is now narrow enough that "Jan 2020" runs into the 2021 label. Drop the
     odd years: the axis still reads left to right in even steps, and the two endpoints -
     the ones the caption names - stay. */
  .y21, .y23, .y25 { display: none; }
  /* Let the coverage span sit on its own line instead of wrapping mid-phrase. */
  .pn-span { display: block; margin-left: 0; margin-top: 4px; }
}

@media (max-width: 560px) {
  .signals { grid-template-columns: minmax(0, 1fr); }
}

/* --- motion ------------------------------------------------------------------------- */

/* Entrances live only inside the no-preference query, so the base stylesheet already
   describes the final state and nothing can ever be stuck invisible. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
  @keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

  .band--head { animation: drop 280ms cubic-bezier(.22,.61,.36,1) both; }
  .identity { animation: rise 320ms 60ms cubic-bezier(.22,.61,.36,1) both; }
  .access { animation: rise 320ms 110ms cubic-bezier(.22,.61,.36,1) both; }
  .signals { animation: fade 300ms 200ms ease-out both; }
  /* Only the bars wipe. The grid, tracks, baseline and axis are painted at frame one, so
     the panel is a frame that gains evidence rather than an empty box that fills. */
  .pn-bars { animation: wipe 800ms 260ms cubic-bezier(.16,1,.3,1) both; }
  .pn-head, .pn-labels, .pn-caption, .honesty { animation: fade 300ms 400ms ease-out both; }
  .denial { animation: drop 180ms ease-out both; }

  /* A refused sign-in re-renders the page. Without this the whole entrance replays and
     the form the reader is trying to correct is invisible for the first 400ms. Only the
     denial itself animates. */
  .is-denied .band--head,
  .is-denied .identity,
  .is-denied .access,
  .is-denied .signals,
  .is-denied .pn-bars,
  .is-denied .pn-head,
  .is-denied .pn-labels,
  .is-denied .pn-caption,
  .is-denied .honesty { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 1ms !important;
  }
  .pn-bars { clip-path: none; }
  .submit:active { transform: none; }
}

/* --- forced colors ------------------------------------------------------------------ */

@media (forced-colors: active) {
  .wash { display: none; }
  .access, .field input, .lang, .denial { border: 1px solid CanvasText; }
  .submit { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .pn-bar--e, .pn-bar--g { fill: CanvasText; }
  .pn-tracks rect { fill: GrayText; }
  .pn-grid line, .pn-axis line { stroke: GrayText; }
  .key--e, .key--g { forced-color-adjust: none; background: CanvasText; }
  :focus-visible { outline: 3px solid Highlight; outline-offset: 2px; }
}

/* --- email sign-in ------------------------------------------------------------------ */

/* Both states are server-rendered and one carries the `hidden` attribute, so the page
   works with scripting off and nothing flashes on load. */
.state-form[hidden], .state-sent[hidden] { display: none; }

.state-sent .intro { max-width: 42ch; }
.state-sent .note a { color: var(--brand); }

/* The shared password stays reachable while the email route is being proven, but it is
   not the thing being offered. A <details> keeps it available and quiet, and it opens
   without JavaScript. */
.fallback {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.fallback[hidden] { display: none; }
.fallback summary {
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}
.fallback summary::-webkit-details-marker { display: none; }
.fallback summary::before {
  content: "+";
  display: inline-block;
  width: 16px;
  font-weight: 700;
  color: var(--brand);
}
.fallback[open] summary::before { content: "\2212"; }
.fallback summary:hover { color: var(--ink); }
.fallback summary:focus-visible {
  outline: 2px solid var(--brand-dark);
  outline-offset: 2px;
  border-radius: 3px;
}
.fallback .intro { margin-top: 12px; }
.fallback form { margin-top: 16px; }

/* Quieter than the primary action: this is the way in that is on its way out. */
.submit--quiet {
  background: var(--panel);
  color: var(--brand-dark);
  border: 1px solid var(--line-strong);
}
.submit--quiet:hover { background: var(--panel-soft); color: var(--brand-dark); }

/* --- the code step -------------------------------------------------------------------
   Six digits are a number you read off a phone and copy, not a word you type, so the
   field is set like the figure in the mail: monospace, widely tracked, large enough to
   check a digit at arm's length. Centred, because there is nothing else on the line. */
.code-input {
  font-family: Consolas, Menlo, "SF Mono", monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.3em;
  /* The tracking is applied after each glyph, including the last, which pushes the whole
     string off-centre by one space. Half of it back on the left evens it up. */
  text-indent: 0.15em;
  text-align: center;
}

/* The resend sits under the code form as a quiet second action, and must look disabled
   when it is: a control that ignores clicks and looks live reads as a broken page. */
.resend { margin-top: 12px; }
.resend-button[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}
.resend-note { margin-top: 8px; }

/* A link in a note, for "I already have a code" and "start again". */
.note a { color: var(--brand); }
.note a:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 2px; }

/* On a phone the code step put the sign-in button seven pixels below the fold, measured
   at 375x667: the headline and standfirst take 258px above the card, and the reader who
   has just been handed a code in a notification has to scroll to use it.
   `$om-lettermint-pin-gate` is explicit that neither step may scroll at that size.

   The headline is the sell, so it keeps its place on the first step. On the second the
   reader has already read it, and what they need is the field, so the card goes first.
   :has() is what lets the stylesheet see which step the server rendered; where it is not
   supported the order simply stays as it was, which is the behaviour this replaces. */
@media (max-width: 720px) {
  .band--main .measure:has(.state-sent:not([hidden])) {
    display: flex;
    flex-direction: column;
  }
  .band--main .measure:has(.state-sent:not([hidden])) .access { order: -1; }
}

/* The masthead now carries three things on the left - the client mark, a hairline, the
   agency mark - and then the product name, where it used to carry two. At 375px that is
   enough to push the name into the language switcher and overlap it.

   The two marks are the part that has to survive: they say whose tool this is and who
   built it. The product name is repeated in the headline directly below, so on a phone
   it is the one that goes. */
@media (max-width: 560px) {
  .wordmark { display: none; }
  .brand { gap: 10px; }
  .agency-mark { padding-left: 10px; }
}

/* Between those sizes the name stays but may not push the switcher off the line. */
@media (max-width: 860px) {
  .wordmark {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
