/* The door (HF-081, redesigned in HF-488, Decision #848): the pages one
   sees before signing in, a split screen: the brand's side (its deep
   colour, one glow of its gradient, its mark drawn large; or the picture
   Branding sets) and the form's side, light or dark as the system is or
   as chosen. */
:root {
  --background: #f6f7fb; --foreground: #171a23; --card: #ffffff; --muted: #eef0f6;
  --muted-foreground: #5d6475; --faint: #686f80; --border: #e3e6ef; --input: #d5d9e4;
  --primary: #5b5bf6; --primary-foreground: #ffffff; --ring: #5b5bf6;
  --danger: #dc2626; --danger-soft: #fdecec; --brand-soft: #ecebff; --ok: #16a34a; --warn: #d97706;
  --coral: #f97362; --violet: #8b5cf6;
  --brand-gradient: linear-gradient(135deg, #5b5bf6 0%, #8b5cf6 55%, #f97362 100%);
  --radius: 0.625rem;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --background: #0c0e14; --foreground: #e8eaf1; --card: #141720; --muted: #1b1f2b;
  --muted-foreground: #a2a8b8; --faint: #7d8496; --border: #252a38; --input: #333a4d;
  --primary: #7b7bff; --primary-foreground: #0c0e14; --ring: #8b8bff;
  --danger: #f8706b; --danger-soft: #331617; --brand-soft: #23234a; --ok: #4ade80; --warn: #fbbf24;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #0c0e14; --foreground: #e8eaf1; --card: #141720; --muted: #1b1f2b;
    --muted-foreground: #a2a8b8; --faint: #7d8496; --border: #252a38; --input: #333a4d;
    --primary: #7b7bff; --primary-foreground: #0c0e14; --ring: #8b8bff;
    --danger: #f8706b; --danger-soft: #331617; --brand-soft: #23234a; --ok: #4ade80; --warn: #fbbf24;
    color-scheme: dark;
  }
}
@font-face {
  font-family: "Open Sans Variable"; font-style: normal; font-display: swap; font-weight: 300 800;
  src: url(/static/fonts/open-sans-latin-ext.woff2) format("woff2-variations");
  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: "Open Sans Variable"; font-style: normal; font-display: swap; font-weight: 300 800;
  src: url(/static/fonts/open-sans-latin.woff2) format("woff2-variations");
  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;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.door {
  margin: 0; min-height: 100dvh; color: var(--foreground); background: var(--background);
  font: 15px/1.55 "Open Sans Variable", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.door-grid { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 9fr); min-height: 100dvh; }

/* The brand's side. */
.brand {
  --deep: color-mix(in oklab, var(--primary) 34%, #08081a);
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; gap: 2.5rem;
  padding: 2.5rem clamp(2rem, 5vw, 4.5rem); color: #fff;
  background:
    radial-gradient(42rem 34rem at 108% 112%, color-mix(in oklab, var(--coral) 70%, transparent), transparent 62%),
    radial-gradient(46rem 36rem at 84% 92%, color-mix(in oklab, var(--violet) 75%, transparent), transparent 66%),
    var(--deep);
}
/* Branding's picture (ADR 0066), named by /branding/brand.css: no inline style under the panel's policy. */
.brand.picture { background: linear-gradient(180deg, rgb(8 8 26 / .25), rgb(8 8 26 / .72)), var(--door-picture, none) center / cover no-repeat, var(--deep); }
.brand .monogram {
  position: absolute; z-index: -1; right: clamp(-6rem, 6vw - 6rem, 3rem); bottom: -8.5rem; width: 30rem; height: 30rem;
  fill: none; stroke: rgb(255 255 255 / .16); stroke-width: .05; stroke-linejoin: round;
}
.brand .monogram .inner { stroke: rgb(255 255 255 / .08); }
.brand.picture .monogram, .brand.custom .monogram { display: none; }
.mark { display: inline-flex; align-items: center; gap: .65rem; color: inherit; font-weight: 600; font-size: 1.1rem; text-decoration: none; letter-spacing: -.01em; }
.mark .h { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .75rem; background: var(--brand-gradient); box-shadow: 0 8px 22px -8px rgb(0 0 0 / .5); }
.mark svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.mark img.logo { height: 2.4rem; max-width: 13rem; object-fit: contain; }
.pitch { margin-block: auto; max-width: 30rem; }
.lead { margin: 0 0 1.75rem; font-size: clamp(1.9rem, 3.1vw, 2.6rem); line-height: 1.12; font-weight: 650; letter-spacing: -.025em; text-wrap: balance; }
.offers { display: grid; gap: .8rem; margin: 0; padding: 0; list-style: none; color: rgb(255 255 255 / .86); font-size: 1rem; }
.offers li { display: flex; align-items: center; gap: .75rem; }
.offers svg { flex: none; width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
.door-status {
  align-self: flex-start; display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .85rem .45rem .7rem;
  color: #fff; font-size: .875rem; text-decoration: none; border-radius: 999px;
  background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .16); backdrop-filter: blur(6px);
}
.door-status:hover { background: rgb(255 255 255 / .16); }
.door-status .dot { width: .55rem; height: .55rem; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgb(74 222 128 / .25); }
.door-status.down .dot { background: #fbbf24; box-shadow: 0 0 0 3px rgb(251 191 36 / .25); }

/* The form's side. */
.side { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; padding: 1.5rem clamp(1.25rem, 4vw, 3.5rem); }
.prefs { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; }
.seg { display: inline-flex; padding: .2rem; border: 1px solid var(--border); border-radius: .6rem; background: var(--card); }
.seg a { padding: .2rem .6rem; color: var(--muted-foreground); font-size: .8125rem; font-weight: 600; text-decoration: none; border-radius: .4rem; }
.seg a[aria-current] { color: var(--foreground); background: var(--muted); }
.seg a:hover:not([aria-current]) { color: var(--foreground); }
.icon-link { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; color: var(--muted-foreground); border: 1px solid var(--border); border-radius: .6rem; background: var(--card); }
.icon-link:hover { color: var(--foreground); }
/* The theme switch offers the other theme than the one shown. */
.to-light { display: none; }
:root[data-theme="dark"] .to-dark { display: none; }
:root[data-theme="dark"] .to-light { display: grid; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .to-dark { display: none; }
  :root:not([data-theme="light"]) .to-light { display: grid; }
}
.icon-link svg, .reveal svg, .button svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.panel { align-self: center; justify-self: center; width: 100%; max-width: 23.5rem; padding-block: 2rem; }
h1 { margin: 0 0 .35rem; font-size: 1.75rem; line-height: 1.2; letter-spacing: -.02em; font-weight: 650; }
.sub { margin: 0 0 1.75rem; color: var(--muted-foreground); }
p { margin: 0 0 1rem; }
a { color: var(--primary); }
strong { font-weight: 600; }
.muted { color: var(--muted-foreground); font-size: .875rem; }
/* A package's forms come as cards: on the form's side, they are its content. */
.panel .card { margin: 0 0 1rem; padding: 0; border: 0; background: none; }
.panel .card:last-child { margin-bottom: 0; }
.panel > .card:first-child:not(form) { padding: .8rem 1rem; background: var(--brand-soft); border-radius: calc(var(--radius) - .125rem); font-size: .9rem; }
p:has(> .button) { margin: 0 0 .6rem; }
label { display: block; margin: 1.1rem 0 .4rem; font-size: .875rem; font-weight: 550; }
form > label:first-of-type, .card > label:first-child { margin-top: 0; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.1rem 0 .4rem; }
.label-row label { margin: 0; }
.label-row a { font-size: .8125rem; text-decoration: none; }
.label-row a:hover { text-decoration: underline; }
input[type=text], input[type=email], input[type=password], input[type=number], select {
  display: block; width: 100%; height: 2.75rem; padding: 0 .85rem; font: inherit; color: var(--foreground);
  background: var(--card); border: 1px solid var(--input); border-radius: calc(var(--radius) - .125rem);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
/* A longer text (the abuse form, HF-548), and a field's hint under it. */
textarea {
  display: block; width: 100%; min-height: 5.5rem; padding: .6rem .85rem; font: inherit; line-height: 1.45; color: var(--foreground);
  background: var(--card); border: 1px solid var(--input); border-radius: calc(var(--radius) - .125rem);
  outline: none; resize: vertical; transition: border-color .15s, box-shadow .15s;
}
.hint { margin: .35rem 0 0; color: var(--muted-foreground); font-size: .8125rem; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 28%, transparent); }
.pw { position: relative; }
.pw input { padding-right: 2.9rem; }
.reveal { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin: 0; padding: 0; color: var(--muted-foreground); background: none; border: 0; box-shadow: none; cursor: pointer; border-radius: calc(var(--radius) - .125rem); }
.reveal:hover { color: var(--foreground); background: none; }
.check { display: flex; align-items: center; gap: .6rem; margin: 1.1rem 0 0; font-weight: 400; color: var(--muted-foreground); cursor: pointer; }
.check input { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--primary); }
button, .button {
  display: flex; align-items: center; justify-content: center; gap: .55rem; width: 100%; height: 2.75rem; margin: 1.5rem 0 0; padding: 0 1rem;
  font: inherit; font-weight: 600; text-decoration: none; border-radius: calc(var(--radius) - .125rem); cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
button { color: var(--primary-foreground); background: var(--primary); border: 0; }
button:hover { background: color-mix(in oklab, var(--primary) 88%, black); }
.button { margin: 0; color: var(--foreground); background: var(--card); border: 1px solid var(--input); font-weight: 550; }
.button:hover { background: var(--muted); }
button:focus-visible, .button:focus-visible, a:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 35%, transparent); }
.or { display: flex; align-items: center; gap: .9rem; margin: 1.5rem 0; color: var(--faint); font-size: .8125rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.error {
  margin: 0 0 1.25rem; padding: .7rem .85rem; color: var(--danger); background: var(--danger-soft);
  border: 1px solid color-mix(in oklab, var(--danger) 25%, transparent); border-radius: calc(var(--radius) - .125rem); font-size: .875rem; font-weight: 500;
}
.note { margin: 0 0 1.25rem; padding: .8rem 1rem; background: var(--brand-soft); border-radius: calc(var(--radius) - .125rem); font-size: .9rem; }
.note > p { margin: 0 0 .4rem; }
.note > p:last-child { margin: 0; }
.back { margin: 1.25rem 0 0; }
/* The guides' signing-in parts (help.guides), and two-factor codes' setup. */
.panel h2 { margin: 1.75rem 0 .5rem; font-size: 1.05rem; line-height: 1.35; letter-spacing: -.01em; }
.panel h2:first-of-type { margin-top: .25rem; }
.panel ol, .panel ul { margin: 0 0 1rem; padding-left: 1.3rem; }
.panel li { margin: .3rem 0; }
.panel img.qr { display: block; margin: 0 auto 1rem; padding: .5rem; background: #fff; border-radius: calc(var(--radius) - .125rem); }
.panel ul.codes { columns: 2; padding-left: 1.1rem; }
.links { display: flex; justify-content: center; gap: 1.5rem; font-size: .875rem; }
.links a { color: var(--muted-foreground); text-decoration: none; }
.links a:hover { color: var(--foreground); text-decoration: underline; }
code, .mono { font-family: "JetBrains Mono Variable", "JetBrains Mono", ui-monospace, monospace; font-size: .9em; }
input[autocomplete=one-time-code] { text-align: center; letter-spacing: .4em; font-family: "JetBrains Mono Variable", ui-monospace, monospace; font-size: 1.15rem; }

/* A wide page (a status page, a guide's text): its brand a header at any
   width, its column wider. */
.door-grid.wide { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
.wide .brand { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding: 1.1rem clamp(1.25rem, 4vw, 3.5rem); }
.wide .brand .pitch, .wide .brand .monogram { display: none; }
.wide .panel { max-width: 50rem; }

/* A phone, or a narrow window: the brand's side is a header. */
@media (max-width: 860px) {
  .door-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .brand { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; padding: 1.25rem; }
  .brand .pitch, .brand .monogram { display: none; }
  .door-status { padding: .3rem .7rem .3rem .6rem; font-size: .8125rem; }
  .side { padding: 1rem 1.25rem 1.5rem; }
  .panel { padding-block: 1.25rem 2rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
