/* STAG ATLAS — no external requests, no webfonts, no third-party anything.
   Everything here is local, which is both faster and consistent with what the
   privacy policy claims. */

:root {
  --bg:        #0a0b0c;
  --bg-raise:  #101215;
  --fg:        #f2f3f4;
  --muted:     #71777c;
  --muted-dim: #4a4f54;
  --line:      #1c1f23;
  --line-lit:  #2b3036;
  --danger:    #c96a5e;
  --ok:        #6f9c7a;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* The console is a working tool, not the landing page: it is read for minutes at
   a time, in daylight, off a laptop screen. The landing page's very low-contrast
   greys are deliberate there and wrong here - at #4a4f54 on #0a0b0c the label
   text sat at 2.3:1, well under the 4.5:1 WCAG AA floor for body copy. These
   overrides are scoped to body.admin so the landing page keeps its restraint. */
body.admin {
  --muted:     #9aa0a6;   /* ~6.9:1 on --bg */
  --muted-dim: #7c8288;   /* ~4.7:1 on --bg */
  --line:      #24282d;
  --line-lit:  #363c43;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Only the landing page is locked to one viewport. Legal pages scroll. */
body.landing {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ----------------------------------------------------------- atmosphere --- */

/* Flat black reads as unfinished rather than restrained, so the page gets a
   field behind it rather than a background: two enormous, very soft blooms and
   a vignette, with a film grain over the top.
   The grain is not decoration - large near-black gradients band into visible
   rings on 8-bit panels, and a little noise is the standard, and only, fix.
   Everything here is CSS. No image request, no library, nothing that turns the
   one page on this site into a third-party fetch. The grain is an inline SVG
   data URI, which the CSP already permits under `img-src 'self' data:`.
   Calibration: the blooms peak around 3.5% alpha and the drift takes three
   minutes to cross a couple of percent of the viewport. You should not be able
   to catch it moving by looking at it. If it is ever noticeable, it is wrong. */
body.landing::before,
body.landing::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body.landing::before {
  /* oversized so the drift never walks a soft edge into view */
  inset: -20%;
  background:
    radial-gradient(62rem 44rem at 50% 22%, rgba(148, 172, 198, 0.036), transparent 66%),
    radial-gradient(50rem 38rem at 24% 80%, rgba(120, 150, 178, 0.020), transparent 68%);
  animation: drift 180s ease-in-out infinite alternate;
  will-change: transform;
}

body.landing::after {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.34'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  opacity: 0.07;
}

/* The vignette lives on the body itself rather than in the grain layer: the
   grain rides at 7% opacity, and an opacity on the layer would take the
   vignette down with it. */
body.landing {
  background-image: radial-gradient(128% 96% at 50% 44%, transparent 48%, rgba(0, 0, 0, 0.55) 100%);
}

/* Content above the field. */
body.landing > .brand,
body.landing > .stage,
body.landing > .foot { position: relative; z-index: 1; }

/* Three minutes end to end, over about two percent of the viewport. This is
   depth, not motion design; if you can see it happen, slow it down further. */
@keyframes drift {
  0%   { transform: translate3d(-0.9%,  0.7%, 0) scale(1.04); }
  100% { transform: translate3d( 0.8%, -0.9%, 0) scale(1.07); }
}

/* The `hidden` attribute is only display:none in the UA sheet, so ANY rule
   that sets display beats it. That already bit `.more`: both "Load more"
   buttons stayed on screen with nothing left to load, because `.more` sets
   display:flex and the per-element [hidden] guard for it was never written.
   One global rule instead of remembering it element by element. */
[hidden] { display: none !important; }

a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line-lit); }
a:hover { border-bottom-color: var(--muted); }

/* ---------------------------------------------------------------- stage --- */

/* The brand is a header in position only - no bar, no rule, no background.
   It is deliberately outside .stage so that the entry below centres in the
   space that is left, rather than being pushed down by the mark's height. */
.brand {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: clamp(1.5rem, 5vh, 3.25rem) 1.5rem 0;
  animation: rise 1s var(--ease) both;
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.5rem 0;
  min-height: 0;
}

.logo {
  width: clamp(64px, 11vh, 104px);
  height: auto;
  display: block;
  /* logo.png ships with a real alpha channel (white mark, transparent ground),
     so no blend mode is needed. mix-blend-mode was here for a white-on-black
     JPEG; against true alpha it only creates a stacking context for nothing. */
  user-select: none;
  -webkit-user-drag: none;
}

.mark-fallback {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line-lit);
  transform: rotate(45deg);
}

.wordmark {
  margin: 0;
  font-size: clamp(0.78rem, 1.55vw, 0.95rem);
  font-weight: 300;
  letter-spacing: 0.42em;
  text-indent: 0.42em;   /* balance the trailing tracking so it reads centred */
  text-transform: uppercase;
  color: var(--fg);
}

/* ---------------------------------------------------------------- entry --- */

.entry-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  animation: rise 1s 0.15s var(--ease) both;
}

.entry {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  width: min(280px, 70vw);
  cursor: text;
}

.entry input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  background: none;
  font: inherit;
  cursor: text;
}

.dots {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.55em;
  color: var(--fg);
  white-space: nowrap;
  /* the letter-spacing adds a trailing gap; pull the caret back against it */
  margin-right: -0.4em;
  transition: opacity 0.2s var(--ease);
}

.caret {
  display: inline-block;
  width: 8px;
  height: 1.15rem;
  margin-left: 0.5em;
  background: var(--fg);
  animation: pulse 2.6s ease-in-out infinite;
  transition: opacity 0.3s var(--ease);
}

/* Unfocused, the caret is present but resting — it invites without demanding.
   It needs its own keyframe rather than a static opacity: an opacity animation
   always beats a static declaration, so the old 0.34 never actually rendered
   and the resting caret flashed to full white like the focused one. */
.entry:not(.is-focused) .caret { animation: pulse-rest 3.6s ease-in-out infinite; }

.entry-rule {
  width: min(280px, 70vw);
  height: 1px;
  background: var(--line);
  transition: background 0.4s var(--ease);
}
.entry-wrap.is-focused .entry-rule { background: var(--line-lit); }

.entry-msg {
  margin: 0;
  min-height: 1.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-dim);
  transition: color 0.3s var(--ease);
}
.entry-msg.is-error { color: var(--danger); }
.entry-msg.is-ok    { color: var(--ok); }

.entry-wrap.shake { animation: shake 0.4s var(--ease); }

/* --------------------------------------------------------------- footer --- */

.foot {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  padding: 0 1.5rem calc(2rem + env(safe-area-inset-bottom));
  animation: rise 1s 0.3s var(--ease) both;
}

.contact-btn {
  appearance: none;
  background: none;
  border: 1px solid var(--line-lit);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-transform: uppercase;
  padding: 0.85rem 2.4rem;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.contact-btn:hover { border-color: var(--muted); background: rgba(255,255,255,0.025); }
.contact-btn:focus-visible { outline: 1px solid var(--muted); outline-offset: 3px; }

.legal {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--muted-dim);
}
.legal a { color: var(--muted-dim); border-bottom: none; }
.legal a:hover { color: var(--muted); }
.sep { color: var(--muted-dim); }

/* ---------------------------------------------------------------- modal --- */

.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }

.modal-scrim {
  position: absolute; inset: 0;
  background: rgba(4, 5, 6, 0.82);
  backdrop-filter: blur(3px);
  animation: fade 0.3s var(--ease) both;
}

.modal-card {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100dvh - 3rem);
  overflow-y: auto;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  padding: 2.4rem 2.2rem 2rem;
  animation: rise 0.35s var(--ease) both;
}

.modal-x {
  position: absolute; top: 0.6rem; right: 0.9rem;
  background: none; border: 0; color: var(--muted-dim);
  font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0.3rem;
}
.modal-x:hover { color: var(--fg); }

.modal-title {
  margin: 0 0 0.4rem;
  font-size: 0.78rem; font-weight: 400;
  letter-spacing: 0.3em; text-transform: uppercase;
}
.modal-sub { margin: 0 0 1.8rem; font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

.field-row { display: flex; gap: 0.7rem; }
@media (max-width: 460px) { .field-row { flex-direction: column; } }

.modal-card input[type="text"],
.modal-card input[type="email"],
.modal-card textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 0.88rem;
  padding: 0.75rem 0.1rem;
  margin-bottom: 0.7rem;
  transition: border-color 0.3s var(--ease);
}
.modal-card textarea { resize: vertical; line-height: 1.55; }
.modal-card input:focus, .modal-card textarea:focus {
  outline: none;
  border-bottom-color: var(--muted);
}
.modal-card ::placeholder { color: var(--muted-dim); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.modal-note { margin: 1.2rem 0 1.6rem; font-size: 0.7rem; line-height: 1.6; color: var(--muted-dim); }
.modal-note a { color: var(--muted); border-bottom-color: var(--line-lit); }

.modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.modal-msg { font-size: 0.72rem; letter-spacing: 0.1em; color: var(--muted); }
.modal-msg.is-error { color: var(--danger); }
.modal-msg.is-ok    { color: var(--ok); }

/* --------------------------------------------------------------- consent -- */

.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 1rem; }

.consent-inner {
  max-width: 880px; margin: 0 auto;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  padding: 1.2rem 1.4rem;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  animation: rise 0.4s var(--ease) both;
}
.consent-text { flex: 1 1 340px; margin: 0; font-size: 0.76rem; line-height: 1.65; color: var(--muted); }
.consent-text a { color: var(--fg); }
.consent-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }

/* --------------------------------------------------------------- buttons -- */

.btn-solid, .btn-ghost {
  appearance: none; cursor: pointer;
  font-family: var(--sans);
  font-size: 0.7rem; letter-spacing: 0.2em; text-indent: 0.2em; text-transform: uppercase;
  padding: 0.72rem 1.5rem;
  transition: opacity 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.btn-solid { background: var(--fg); color: var(--bg); border: 1px solid var(--fg); }
.btn-solid:hover { opacity: 0.86; }
.btn-solid:disabled { opacity: 0.4; cursor: default; }
.btn-ghost { background: none; color: var(--muted); border: 1px solid var(--line-lit); }
.btn-ghost:hover { color: var(--fg); border-color: var(--muted); }

/* ---------------------------------------------------------------- anims --- */

/* A slow breath rather than a blink: the caret never fully leaves, it recedes
   and returns. On a page this empty the hard on/off edge read as impatient. */
@keyframes pulse      { 0%, 100% { opacity: 1; }    50% { opacity: 0.08; } }
@keyframes pulse-rest { 0%, 100% { opacity: 0.34; } 50% { opacity: 0.05; } }
@keyframes rise  { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  /* The caret is the one exception: it is the page's only affordance telling
     you where to type, so it keeps moving even under reduced motion. A slow
     opacity fade is also the gentlest form that exception can take — no
     transform, no hard on/off edge. */
  .caret { animation: pulse 2.6s ease-in-out infinite !important; }
  body.landing::before { animation: none !important; }
}

/* Short viewports (landscape phones): tighten rather than allow a scrollbar. */
@media (max-height: 520px) {
  .brand { padding-top: 1rem; gap: 0.5rem; }
  .logo { width: clamp(48px, 12vh, 74px); }
  .foot { padding-bottom: 1.1rem; gap: 0.8rem; }
}

/* ============================================================== console === */
/* The back end scrolls. Only the landing page is held to one viewport.       */

body.admin { min-height: 100dvh; }

.admin-bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  padding: 0.9rem 1.6rem;
  background: rgba(10, 11, 12, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.admin-brand { display: flex; align-items: center; gap: 0.65rem; }
.admin-logo { height: 26px; width: auto; }
.admin-title { font-size: 0.72rem; letter-spacing: 0.32em; text-transform: uppercase; }
.admin-sub { font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted-dim); }

.admin-tabs { display: flex; gap: 0.15rem; margin-left: auto; }
.tab {
  appearance: none; background: none; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted-dim);
  padding: 0.6rem 0.95rem; border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
  display: inline-flex; align-items: center; gap: 0.45rem;
}
.tab:hover { color: var(--muted); }
.tab.is-active { color: var(--fg); border-bottom-color: var(--fg); }

.pill {
  background: var(--fg); color: var(--bg);
  font-size: 0.58rem; letter-spacing: 0; font-weight: 600;
  min-width: 1.15rem; text-align: center;
  padding: 0.1rem 0.3rem; border-radius: 999px;
}

.admin-right { display: flex; gap: 0.5rem; }
.btn-ghost.sm, .btn-solid.sm { padding: 0.5rem 1rem; font-size: 0.63rem; }

.admin-main { max-width: 1180px; margin: 0 auto; padding: 2.2rem 1.6rem 5rem; }

.panel { display: none; }
.panel.is-active { display: block; animation: fade 0.3s var(--ease) both; }

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1.2rem;
}
.panel-title { margin: 0; font-size: 0.74rem; font-weight: 400; letter-spacing: 0.28em; text-transform: uppercase; }
.panel-note { margin: 0 0 1.4rem; font-size: 0.74rem; line-height: 1.7; color: var(--muted-dim); max-width: 62ch; }

.filters { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.chip {
  appearance: none; cursor: pointer; background: none;
  border: 1px solid var(--line); color: var(--muted-dim);
  font-family: var(--sans); font-size: 0.63rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.42rem 0.85rem;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.chip:hover { color: var(--muted); border-color: var(--line-lit); }
.chip.is-active { color: var(--fg); border-color: var(--muted); }

/* ------------------------------------------------------------- overview -- */

.tiles {
  display: grid; gap: 1px; margin-bottom: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  background: var(--line); border: 1px solid var(--line);
}
.tile { background: var(--bg-raise); padding: 1.4rem 1.3rem; }
.tile-n { font-size: 1.75rem; font-weight: 200; letter-spacing: -0.01em; }
.tile-l { margin-top: 0.35rem; font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-dim); }

.two-col { display: grid; gap: 1.4rem; grid-template-columns: 1.5fr 1fr; margin-bottom: 1.4rem; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.card { background: var(--bg-raise); border: 1px solid var(--line); padding: 1.5rem 1.5rem 1.6rem; }
.card-title { margin: 0 0 1.3rem; font-size: 0.63rem; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }

.chart-cols { display: flex; align-items: flex-end; gap: 3px; height: 130px; }
.chart-col { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 3px; }
.chart-bar { width: 100%; background: var(--line-lit); transition: background 0.2s var(--ease); }
.chart-bar.is-zero { background: var(--line); }
.chart-col:hover .chart-bar { background: var(--muted); }
.chart-axis { display: flex; justify-content: space-between; margin-top: 0.6rem; font-size: 0.6rem; color: var(--muted-dim); font-family: var(--mono); }

.bar-row { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.65rem; }
.bar-label { width: 2.4rem; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.bar-track { flex: 1; height: 5px; background: var(--line); }
.bar-fill { height: 100%; background: var(--muted); }
.bar-n { width: 2rem; text-align: right; font-family: var(--mono); font-size: 0.72rem; color: var(--muted-dim); }

/* Column gap is load-bearing, not decoration: .kv-v is right-aligned and
   .kv-k is left-aligned, so with gap 0 a value in one column collides with
   the next column's label and the two read as one run-on string. */
.kv { display: grid; gap: 0 2.75rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.kv-row { display: flex; justify-content: space-between; gap: 1.5rem; padding: 0.62rem 0; border-bottom: 1px solid var(--line); }
.kv-k { font-size: 0.7rem; letter-spacing: 0.08em; color: var(--muted-dim); }
.kv-v { font-size: 0.76rem; color: var(--fg); text-align: right; font-family: var(--mono); }

/* A row whose value is a sentence rather than a figure. Right-aligning prose in
   a narrow numeric column wraps it to three ragged lines against the wrong edge;
   stacking it under its own label reads as the footnote it actually is. */
.kv-row.prose { display: block; }
.kv-row.prose .kv-v {
  display: block; margin-top: 0.35rem;
  text-align: left; font-family: var(--sans); color: var(--muted);
  line-height: 1.5;
}

/* ----------------------------------------------------------------- list -- */

.list { border: 1px solid var(--line); background: var(--bg-raise); }
.item { border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item.is-open { background: rgba(255, 255, 255, 0.015); }

.item-head {
  width: 100%; appearance: none; background: none; border: 0; cursor: pointer;
  text-align: left; font-family: var(--sans); color: var(--fg);
  display: grid; grid-template-columns: minmax(180px, 1.1fr) 2fr auto;
  gap: 1.2rem; align-items: center;
  padding: 1rem 1.3rem;
  transition: background 0.2s var(--ease);
}
.item-head:hover { background: rgba(255, 255, 255, 0.022); }
@media (max-width: 760px) {
  .item-head { grid-template-columns: 1fr; gap: 0.5rem; }
  .item-preview { display: none; }
}

.item-who { display: flex; flex-direction: column; gap: 0.22rem; min-width: 0; }
.item-name { font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-meta { font-size: 0.68rem; color: var(--muted-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-preview { font-size: 0.74rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-right { display: flex; align-items: center; gap: 0.9rem; justify-self: end; white-space: nowrap; }
.item-time { font-size: 0.68rem; color: var(--muted); font-family: var(--mono); }
.item-ago { font-size: 0.63rem; color: var(--muted-dim); min-width: 4.2rem; text-align: right; }

.status {
  font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.24rem 0.5rem; border: 1px solid var(--line-lit); color: var(--muted);
}
.status.s-new { color: var(--fg); border-color: var(--fg); }
.status.s-contacted { color: #8fa9c4; border-color: #3c4855; }
.status.s-qualified { color: var(--ok); border-color: #354a3c; }
.status.s-closed, .status.s-archived { color: var(--muted-dim); border-color: var(--line); }

.item-body { padding: 0.4rem 1.3rem 1.7rem; }

.note-block { margin-bottom: 1.5rem; }
.note-text {
  margin: 0; padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.022); border-left: 2px solid var(--line-lit);
  font-size: 0.85rem; line-height: 1.7; white-space: pre-wrap;
}

/* ---------------------------------------------------------- fingerprint -- */

.fp-wrap { margin-top: 1.6rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.fp-heading { font-size: 0.63rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.fp-sec { margin-bottom: 1.35rem; }
.fp-title { font-size: 0.59rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-dim); margin-bottom: 0.6rem; }
.fp-grid { display: grid; gap: 0.55rem 1.6rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.fp-cell { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 0.4rem; min-width: 0; }
.fp-k { font-size: 0.68rem; color: var(--muted-dim); white-space: nowrap; }
.fp-v { font-size: 0.72rem; font-family: var(--mono); text-align: right; word-break: break-word; min-width: 0; }
.fp-v.is-long { font-size: 0.65rem; line-height: 1.5; }
.fp-v.is-empty { color: var(--muted-dim); font-family: var(--sans); font-style: italic; }

.fp-id { display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.fp-visits { font-size: 0.66rem; color: var(--muted-dim); }
.mono { font-family: var(--mono); font-size: 0.68rem; color: var(--muted); word-break: break-all; }

/* -------------------------------------------------------------- pipeline - */

.pipe { margin-top: 1.5rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.pipe-controls { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.8rem; }
.pipe-saved { font-size: 0.63rem; color: var(--muted-dim); }
.pipe-actions { display: flex; justify-content: flex-end; margin-top: 0.7rem; }

.select {
  appearance: none; background: var(--bg); color: var(--fg);
  border: 1px solid var(--line-lit); font-family: var(--sans);
  font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.45rem 0.8rem; cursor: pointer;
}
.select:focus { outline: none; border-color: var(--muted); }

.notes {
  width: 100%; background: transparent; color: var(--fg);
  border: 1px solid var(--line); font-family: var(--sans);
  font-size: 0.82rem; line-height: 1.6; padding: 0.75rem 0.85rem; resize: vertical;
}
.notes:focus { outline: none; border-color: var(--line-lit); }
.notes::placeholder { color: var(--muted-dim); }

.warn {
  margin-top: 1.2rem; padding: 0.8rem 1rem;
  border: 1px solid #4a2f2b; background: rgba(201, 106, 94, 0.07);
  font-size: 0.74rem; line-height: 1.6; color: #d9a49c;
}
.warn.is-soft { border-color: var(--line-lit); background: none; color: var(--muted-dim); }

/* ----------------------------------------------------------- misc chrome - */

.retention { margin-top: 1.6rem; padding-top: 1.3rem; border-top: 1px solid var(--line); }
.retention .muted { display: block; margin: 0 0 1rem; line-height: 1.7; max-width: 62ch; }
.btn-ghost.is-armed { color: #d9a49c; border-color: #4a2f2b; }

.more { display: flex; justify-content: center; padding: 1.4rem 0; }
.muted { color: var(--muted-dim); font-size: 0.78rem; }
.muted.pad { padding: 2.2rem 1.3rem; margin: 0; }

.empty-card { max-width: 68ch; }
.empty-title { margin: 0 0 0.9rem; font-size: 0.92rem; }
.empty-body { margin: 0 0 0.9rem; font-size: 0.8rem; line-height: 1.75; color: var(--muted); }
.empty-body.dim { color: var(--muted-dim); }

.toast {
  position: fixed; left: 50%; bottom: 1.8rem; transform: translateX(-50%);
  z-index: 80; background: var(--bg-raise); border: 1px solid var(--line-lit);
  padding: 0.7rem 1.3rem; font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  animation: rise 0.25s var(--ease) both;
}
.toast.is-error { border-color: #4a2f2b; color: #d9a49c; }
.toast.is-ok { border-color: #354a3c; color: var(--ok); }

/* ================================================================ legal === */

body.doc { padding: 0; }
.doc-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.6rem;
  background: rgba(10, 11, 12, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.doc-home { font-size: 0.68rem; letter-spacing: 0.28em; text-transform: uppercase; border-bottom: 0; color: var(--muted); }
.doc-home:hover { color: var(--fg); }
.doc-links { display: flex; gap: 1.2rem; font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase; }
.doc-links a { color: var(--muted-dim); border-bottom: 0; }
.doc-links a:hover, .doc-links a[aria-current] { color: var(--fg); }

.doc-body { max-width: 74ch; margin: 0 auto; padding: 3.5rem 1.6rem 6rem; }
.doc-body h1 { margin: 0 0 0.5rem; font-size: 1.3rem; font-weight: 300; letter-spacing: 0.14em; text-transform: uppercase; }
.doc-updated { margin: 0 0 3rem; font-size: 0.68rem; letter-spacing: 0.12em; color: var(--muted-dim); }
.doc-body h2 {
  margin: 2.9rem 0 0.9rem; font-size: 0.72rem; font-weight: 400;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--fg);
  padding-top: 1.6rem; border-top: 1px solid var(--line);
}
.doc-body h3 { margin: 1.8rem 0 0.6rem; font-size: 0.8rem; font-weight: 500; color: var(--fg); }
.doc-body p, .doc-body li { font-size: 0.87rem; line-height: 1.8; color: #c7cbcf; }
.doc-body ul { padding-left: 1.1rem; margin: 0.8rem 0 1.2rem; }
.doc-body li { margin-bottom: 0.5rem; }
.doc-body a { color: var(--fg); }
.doc-body strong { color: var(--fg); font-weight: 500; }
.doc-lead { font-size: 0.95rem !important; color: var(--fg) !important; line-height: 1.75 !important; }

.doc-table { width: 100%; border-collapse: collapse; margin: 1.1rem 0 1.6rem; }
.doc-table th, .doc-table td {
  text-align: left; vertical-align: top; padding: 0.7rem 1rem 0.7rem 0;
  border-bottom: 1px solid var(--line); font-size: 0.8rem; line-height: 1.65;
}
.doc-table th { color: var(--muted-dim); font-weight: 400; font-size: 0.63rem; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.doc-table td { color: #c7cbcf; }

.callout {
  margin: 1.4rem 0; padding: 1.1rem 1.3rem;
  background: var(--bg-raise); border-left: 2px solid var(--line-lit);
}
.callout p { margin: 0; font-size: 0.84rem; }
.callout p + p { margin-top: 0.7rem; }

.doc-foot { margin-top: 3.5rem; padding-top: 1.6rem; border-top: 1px solid var(--line); font-size: 0.72rem; color: var(--muted-dim); }
