/* ============================================================
   Recto — a print-shop palette and an instrument's sense of grid.
   Warm paper, ink, one vermillion accent. Hairlines, not shadows.
   ============================================================ */

:root {
  --paper:     #FBF8F1;
  --paper-2:   #F4EFE4;
  --surface:   #FFFFFF;
  --ink:       #17140F;
  --ink-2:     #57503F;
  --ink-3:     #8B8272;
  --rule:      #DDD5C3;
  --rule-2:    #EBE5D8;
  --accent:    #C1442A;
  --accent-2:  #8C2F1C;
  --accent-wash:#FAEDE8;
  --ok:        #2F6F52;
  --warn:      #9A6B14;
  --shadow:    0 1px 0 rgba(23,20,15,.04);

  --font-display: ui-serif, "New York", "Iowan Old Style", "Palatino", Georgia, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, "Cascadia Mono", monospace;

  --gutter: clamp(20px, 4vw, 56px);
  --measure: 1240px;
  --tick: .18s cubic-bezier(.32,.72,0,1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:     #131210;
    --paper-2:   #1B1916;
    --surface:   #1E1B17;
    --ink:       #EFE9DC;
    --ink-2:     #A79E8C;
    --ink-3:     #6F6757;
    --rule:      #35302A;
    --rule-2:    #27241F;
    --accent:    #E4694C;
    --accent-2:  #F08A70;
    --accent-wash:#2B1D18;
    --ok:        #63A784;
    --warn:      #C79A3E;
    --shadow:    0 1px 0 rgba(0,0,0,.3);
  }
}

:root[data-theme="dark"] {
  --paper:     #131210;
  --paper-2:   #1B1916;
  --surface:   #1E1B17;
  --ink:       #EFE9DC;
  --ink-2:     #A79E8C;
  --ink-3:     #6F6757;
  --rule:      #35302A;
  --rule-2:    #27241F;
  --accent:    #E4694C;
  --accent-2:  #F08A70;
  --accent-wash:#2B1D18;
  --ok:        #63A784;
  --warn:      #C79A3E;
  --shadow:    0 1px 0 rgba(0,0,0,.3);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--paper); }

a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* ---------- typography ---------- */

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.012em; margin: 0; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.55rem); line-height: 1.06; letter-spacing: -.025em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.16; }
h3 { font-size: 1.16rem; line-height: 1.3; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.18rem);
  color: var(--ink-2);
  max-width: 46ch;
  line-height: 1.6;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--ink-3);
  font-weight: 500;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num  { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.accent { color: var(--accent); }

/* A rule with a label sitting on it — the recurring section marker. */
.rule-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 26px;
}
.rule-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ---------- layout ---------- */

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 860px; }

section { padding: clamp(52px, 8vw, 104px) 0; }

/* ---------- panels: crop marks instead of shadows ---------- */

.panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
}

/* Registration marks at the corners — the instrument tell. */
.marks { position: relative; }
.marks::before, .marks::after {
  content: "";
  position: absolute;
  width: 9px; height: 9px;
  border: 1px solid var(--accent);
  opacity: .5;
  pointer-events: none;
}
.marks::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.marks::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* ---------- header ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 58px;
}
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -.02em;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark sup {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--accent);
  text-transform: uppercase;
  top: -.7em;
}
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a {
  font-size: 13.5px;
  color: var(--ink-2);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color var(--tick), border-color var(--tick);
}
.nav a:hover, .nav a[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }

@media (max-width: 700px) {
  .nav a.hide-sm { display: none; }
  .nav { gap: 14px; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  padding: 10px 17px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--tick), color var(--tick), border-color var(--tick), transform var(--tick);
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }

.btn--sm { padding: 6px 11px; font-size: 12px; }
.btn--block { width: 100%; }

/* Segmented control — used for engines and result views. */
.seg {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
  background: var(--surface);
}
.seg button {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 0;
  border-right: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
  transition: color var(--tick), background var(--tick);
}
.seg button:last-child { border-right: 0; }
.seg button:hover:not(:disabled) { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.seg button:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- forms ---------- */

.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--ink-3);
  margin-bottom: 6px;
}
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 14.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 9px 11px;
  transition: border-color var(--tick), box-shadow var(--tick);
}
input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.note {
  font-size: 12.5px;
  color: var(--accent);
  margin-top: 10px;
  min-height: 1.2em;
}
.note--ok { color: var(--ok); }

/* ---------- tables: ledger, not cards ---------- */

.ledger { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ledger th {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--ink-3);
  font-weight: 500;
  text-align: left;
  padding: 0 12px 8px 0;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.ledger td {
  padding: 11px 12px 11px 0;
  border-bottom: 1px solid var(--rule-2);
  vertical-align: baseline;
}
.ledger tr:last-child td { border-bottom: 0; }
.ledger td.right, .ledger th.right { text-align: right; padding-right: 0; }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink-2);
}
.tag--precise { border-color: var(--accent); color: var(--accent); }
.tag--ok { border-color: var(--ok); color: var(--ok); }
.tag--err { border-color: var(--accent); color: var(--accent); }
.tag--revoked { opacity: .55; text-decoration: line-through; }

/* ============================================================
   Specimen viewer — image, word geometry, and text, kept in sync.
   ============================================================ */

.specimen { display: flex; flex-direction: column; min-height: 0; }

.specimen__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
}
/* page navigation for multi-page documents */
.pager {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--surface);
  overflow: hidden;
}
.pager button {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1;
  padding: 0 10px;
  cursor: pointer;
  transition: color var(--tick), background var(--tick);
}
.pager button:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.pager button:disabled { opacity: .3; cursor: not-allowed; }
.pager__read {
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  padding: 5px 4px;
  min-width: 46px;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}

.specimen__right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.specimen__stats {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}
.specimen__stats b { color: var(--ink); font-weight: 500; }

.specimen__body { position: relative; min-height: 260px; display: grid; }

/* dropzone */
.drop {
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 44px 24px;
  gap: 6px;
  cursor: pointer;
  background-image:
    linear-gradient(var(--rule-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule-2) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: -1px -1px;
  transition: background-color var(--tick);
}
.drop.is-over { background-color: var(--accent-wash); }
.drop__title { font-family: var(--font-display); font-size: 1.18rem; }
.drop__hint { font-size: 12.5px; color: var(--ink-3); max-width: 36ch; }

.samples { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.samples button {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 9px;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink-2);
  border-radius: 2px;
  cursor: pointer;
  transition: color var(--tick), border-color var(--tick);
}
.samples button:hover { border-color: var(--accent); color: var(--accent); }

/* two-pane result */
.specimen__split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  min-height: 0;
}
@media (max-width: 860px) { .specimen__split { grid-template-columns: 1fr; } }

.specimen__canvas {
  position: relative;
  background: var(--paper-2);
  border-right: 1px solid var(--rule);
  overflow: auto;
  max-height: 62vh;
  display: grid;
  place-items: start center;
  padding: 14px;
}
@media (max-width: 860px) { .specimen__canvas { border-right: 0; border-bottom: 1px solid var(--rule); max-height: 46vh; } }

.preview-missing {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  text-align: center;
  padding: 40px 24px;
  min-height: 200px;
}

.specimen__stage { position: relative; line-height: 0; }
.specimen__stage img { max-width: 100%; height: auto; display: block; }

.specimen__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.specimen__overlay rect {
  fill: transparent;
  stroke-width: 1.15;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill .12s linear;
}
.specimen__overlay rect.c-hi  { stroke: color-mix(in srgb, var(--ok) 70%, transparent); }
.specimen__overlay rect.c-mid { stroke: color-mix(in srgb, var(--warn) 78%, transparent); }
.specimen__overlay rect.c-low { stroke: var(--accent); }
.specimen__overlay rect.is-lit {
  fill: color-mix(in srgb, var(--accent) 26%, transparent);
  stroke: var(--accent);
  stroke-width: 2;
}
.specimen__overlay.is-off { display: none; }

/* text pane */
.specimen__pane {
  overflow: auto;
  max-height: 62vh;
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--surface);
}
@media (max-width: 860px) { .specimen__pane { max-height: 40vh; } }

.specimen__pane w {
  border-radius: 2px;
  padding: 0 1px;
  margin: 0 -1px;
  cursor: pointer;
  transition: background .12s linear, color .12s linear;
}
.specimen__pane w:hover { background: var(--rule-2); }
.specimen__pane w.is-lit { background: var(--accent); color: #fff; }
.specimen__pane w.low { text-decoration: underline wavy color-mix(in srgb, var(--accent) 55%, transparent); text-underline-offset: 3px; }

.specimen__pane--md { font-family: var(--font-ui); font-size: 14px; line-height: 1.65; white-space: normal; }
.specimen__pane--md h1, .specimen__pane--md h2, .specimen__pane--md h3 { margin: 1.1em 0 .4em; font-size: 1.1rem; }
.specimen__pane--md table { border-collapse: collapse; font-size: 12.5px; margin: .6em 0; width: 100%; }
.specimen__pane--md td, .specimen__pane--md th { border: 1px solid var(--rule); padding: 4px 8px; text-align: left; }
.specimen__pane--md ul { padding-left: 1.2em; margin: .5em 0; }
.specimen__pane--md code { font-family: var(--font-mono); font-size: .92em; }
.specimen__pane--md p { margin: 0 0 .7em; }

/* fields view */
.specimen__fields {
  grid-column: 1 / -1;
  overflow: auto;
  max-height: 62vh;
  padding: 14px 18px;
  background: var(--surface);
}
.specimen__fields tr:hover td { background: var(--paper-2); }
.specimen__fields td:first-child { max-width: 22ch; }

/* a field's boxes, drawn over the page while its row is hovered */
.specimen__overlay rect.is-field {
  fill: color-mix(in srgb, var(--accent) 18%, transparent);
  stroke: var(--accent);
  stroke-width: 2;
  pointer-events: none;
}

/* JSON view */
.specimen__json {
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px 18px;
  overflow: auto;
  max-height: 62vh;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.6;
  background: var(--surface);
  color: var(--ink-2);
  white-space: pre;
}
.specimen__json .k { color: var(--accent); }
.specimen__json .s { color: var(--ok); }
.specimen__json .n { color: var(--ink); }

/* confidence legend */
.legend { display: flex; gap: 12px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; color: var(--ink-3); text-transform: uppercase; }
.legend i { display: inline-block; width: 9px; height: 9px; border: 1.5px solid currentColor; margin-right: 4px; vertical-align: -1px; }
.legend .hi  { color: var(--ok); }
.legend .mid { color: var(--warn); }
.legend .low { color: var(--accent); }

/* ---------- the scan animation ---------- */

.scanning { display: grid; place-items: center; align-content: center; padding: 44px 20px; gap: 16px; }
.scanning__frame {
  position: relative;
  width: min(320px, 72%);
  aspect-ratio: 4 / 3;
  border: 1px solid var(--rule);
  background: var(--surface);
  overflow: hidden;
}
/* ghosted text lines standing in for the page being read */
.scanning__frame i { position: absolute; left: 12%; height: 6px; background: var(--rule); border-radius: 1px; }
.scanning__line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 14px 2px color-mix(in srgb, var(--accent) 45%, transparent);
  animation: sweep 1.5s cubic-bezier(.45,0,.55,1) infinite;
}
@keyframes sweep {
  0%   { top: 0; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
.scanning__label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  .scanning__line { animation: none; top: 50%; }
}

/* ---------- code blocks ---------- */

.code {
  background: #17140F;
  color: #E8E2D4;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid #17140F;
}
:root[data-theme="dark"] .code { border-color: var(--rule); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .code { border-color: var(--rule); } }

.code__bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.code__bar button {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 0;
  background: transparent;
  color: rgba(232,226,212,.5);
  border-radius: 2px;
  cursor: pointer;
  transition: color var(--tick), background var(--tick);
}
.code__bar button:hover { color: #E8E2D4; }
.code__bar button[aria-pressed="true"] { background: rgba(255,255,255,.1); color: #fff; }
.code__copy { margin-left: auto; }
.code pre {
  margin: 0;
  padding: 15px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
}
.code .t-cmd { color: #F0A58C; }
.code .t-str { color: #A8C99A; }
.code .t-flag { color: #C9B98A; }
.code .t-com { color: rgba(232,226,212,.42); }

/* ---------- meters & sparkline ---------- */

.meter { height: 5px; background: var(--rule-2); border-radius: 2px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ink); transition: width .5s cubic-bezier(.32,.72,0,1); }
.meter.is-warn i { background: var(--warn); }
.meter.is-full i { background: var(--accent); }

.spark { width: 100%; height: 70px; display: block; }
.spark rect { fill: var(--rule); transition: fill var(--tick); }
.spark rect.has-data { fill: var(--ink-3); }
.spark rect:hover { fill: var(--accent); }

/* ---------- stat row ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.stat {
  padding: 16px 18px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.stat__label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.stat__value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.stat__value small { font-family: var(--font-mono); font-size: .48em; color: var(--ink-3); letter-spacing: 0; margin-left: 3px; }
.stat__sub { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); margin-top: 7px; }

/* ---------- plan columns ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  border-left: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
}
.plan {
  position: relative;
  padding: 26px 22px 24px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.plan.is-current { background: var(--accent-wash); }
.plan.is-current::before {
  content: "Current";
  position: absolute;
  top: 0; right: 0;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  padding: 3px 8px;
}
.plan__price { font-family: var(--font-display); font-size: 2.3rem; line-height: 1; letter-spacing: -.03em; }
.plan__price small { font-family: var(--font-mono); font-size: .28em; letter-spacing: .1em; color: var(--ink-3); text-transform: uppercase; margin-left: 4px; }
.plan__list { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--ink-2); display: grid; gap: 7px; }
.plan__list li { display: flex; gap: 9px; }
.plan__list li::before { content: "—"; color: var(--accent); flex: none; }
.plan > .btn { margin-top: auto; }

/* ---------- modal ---------- */

dialog {
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  max-width: 540px;
  width: calc(100% - 32px);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.35);
}
dialog::backdrop { background: color-mix(in srgb, var(--ink) 45%, transparent); backdrop-filter: blur(2px); }
.dialog__body { padding: 24px; }
.dialog__foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 24px; border-top: 1px solid var(--rule); background: var(--paper-2); }

.secret {
  font-family: var(--font-mono);
  font-size: 12.5px;
  word-break: break-all;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  padding: 12px 14px;
  border-radius: 2px;
  user-select: all;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 14px);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  padding: 9px 15px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tick), transform var(--tick);
  z-index: 90;
}
.toast.is-up { opacity: 1; transform: translate(-50%, 0); }

/* ---------- theme toggle ---------- */

.theme-toggle {
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-3);
  width: 27px; height: 27px;
  border-radius: 2px;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  flex: none;
  transition: color var(--tick), border-color var(--tick);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 13px; height: 13px; }

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

.foot {
  border-top: 1px solid var(--rule);
  padding: 30px 0 44px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.foot__inner { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--accent); }

/* ---------- utilities ---------- */

.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.stack { display: grid; gap: 14px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.is-hidden { display: none !important; }

/* Divider between the password form and the identity providers. */
.rule-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.rule-or::before, .rule-or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--rule);
}
