/* RSA Press — signed-in app + auth surfaces.
 *
 * Same theme as the public site (site/styles.css): monochrome chrome, mono
 * micro-labels, hairline rules instead of boxes, one accent that comes from
 * state and money rather than decoration. The tokens are repeated here (eight
 * lines) so these pages stand on their own if the marketing stylesheet is not
 * mounted; keep the values identical to site/styles.css.
 */

:root {
  --bg: #0a0a0a;
  --ink: rgba(255, 255, 255, 0.94);
  --body: rgba(255, 255, 255, 0.78);
  --dim: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.14);
  --line-row: rgba(255, 255, 255, 0.19);
  --line-strong: rgba(255, 255, 255, 0.26);
  --fill: rgba(255, 255, 255, 0.03);
  --ok: #7fd18b;
  --warn: #e0b054;
  --bad: #f08a8a;
  --pad: clamp(20px, 5vw, 80px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --band: clamp(56px, 7vw, 104px);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.6); outline-offset: 2px; }

.skip {
  position: absolute; left: -9999px;
}
.skip:focus {
  left: var(--pad); top: 12px; z-index: 50;
  background: #fff; color: #0a0a0a; padding: 10px 14px;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
}

/* ---------- chrome ---------- */

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; align-items: center; gap: 22px;
  padding: 16px var(--pad);
  background: transparent; border-bottom: 1px solid transparent;
  transition: background 300ms var(--ease), border-color 300ms var(--ease),
              backdrop-filter 300ms var(--ease);
}
.topbar.is-solid {
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ink); font-weight: 500; text-decoration: none;
}
.brand svg { width: 18px; height: 18px; }
.topbar__links { display: flex; gap: 20px; margin-left: auto; }
.topbar__links a, .topbar__action {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--dim); text-decoration: none; transition: color 200ms var(--ease);
}
.topbar__links a:hover, .topbar__action:hover { color: var(--ink); }
.topbar__action { color: var(--ink); }
.spacer { flex: 1 1 auto; }

/* ---------- page furniture ---------- */

.shell {
  padding: calc(var(--band) + 40px) var(--pad) var(--band);
  max-width: 1240px; margin: 0 auto;
}
.page-head { border-bottom: 1px solid var(--line); padding-bottom: 26px; margin-bottom: 34px; }
.eyebrow {
  font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--dim); font-weight: 300; margin: 0 0 14px;
}
h1, .display {
  font-size: clamp(2.1rem, 5.4vw, 3.9rem); line-height: 0.95;
  letter-spacing: -0.045em; text-transform: uppercase;
  color: var(--ink); font-weight: 700; margin: 0 0 18px;
}
h2, .section-title {
  font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.05;
  letter-spacing: -0.02em; text-transform: uppercase;
  color: var(--ink); font-weight: 600; margin: 0 0 16px;
}
.section { margin-top: var(--band); }
.lead { max-width: 58ch; color: var(--body); margin: 0 0 20px; font-size: 15px; line-height: 1.75; }
.muted { color: var(--dim); }
.micro {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--dim); font-weight: 300;
}
.num { font-variant-numeric: tabular-nums; }

/* ---------- rows: hairlines, not cards ---------- */

.rows { border-top: 1px solid var(--line-row); }
.row {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  padding: 14px 0; border-bottom: 1px solid var(--line-row);
}
.row > .grow { flex: 1 1 260px; min-width: 0; max-width: 74ch; }
.row b { color: var(--ink); font-weight: 600; }
.row--head { color: var(--dim); }
.row--head span { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; }
.panel { border-top: 1px solid var(--line-row); border-bottom: 1px solid var(--line-row); padding: 18px 0; }
.panel + .panel { margin-top: -1px; }
.empty { color: var(--dim); padding: 16px 0; font-size: 14px; }

/* ---------- stamps (state, not decoration) ---------- */

.stamp {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  padding: 4px 10px; border: 1px solid var(--line-strong); color: var(--dim);
  white-space: nowrap;
}
.stamp.ok { color: var(--ok); border-color: var(--ok); }
.stamp.warn { color: var(--warn); border-color: var(--warn); }
.stamp.danger { color: var(--bad); border-color: var(--bad); }
.stamp.pending { color: var(--dim); border-color: var(--line-strong); }

/* ---------- controls ---------- */

.btn {
  appearance: none; background: transparent; cursor: pointer;
  font: inherit; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink); border: 1px solid var(--line-strong);
  padding: 12px 18px; border-radius: 0; text-decoration: none; display: inline-block;
  transition: background 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease);
}
.btn:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.45); }
.btn:active { background: rgba(255, 255, 255, 0.12); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.btn--solid { background: var(--ink); color: #0a0a0a; border-color: var(--ink); }
.btn--solid:hover { background: #fff; border-color: #fff; color: #000; }
.btn--wide { display: block; width: 100%; text-align: center; }
.btn--busy { color: var(--dim); }

.actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; max-width: 320px; }
.actions--inline { flex-direction: row; flex-wrap: wrap; align-items: center; max-width: none; }

.field { display: block; margin: 0 0 16px; }
.field > label {
  display: block; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 8px;
}
.field input, .field select {
  width: 100%; background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 0;
  padding: 12px 14px; font: inherit; font-size: 14px;
  transition: border-color 200ms var(--ease);
}
.field input::placeholder { color: rgba(255, 255, 255, 0.34); }
.field input:focus, .field select:focus { border-color: rgba(255, 255, 255, 0.45); outline: none; }
.field--inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.field--inline .field { margin: 0; }
.field--inline input, .field--inline select { width: auto; min-width: 110px; }
.hint { font-size: 13px; color: var(--dim); margin: 8px 0 0; }

/* ---------- messages ---------- */

.msg { font-size: 14px; margin: 12px 0 0; min-height: 20px; }
.msg.err { color: var(--bad); }
.msg.ok { color: var(--ok); }
.banner {
  border-left: 2px solid var(--line-strong); background: var(--fill);
  padding: 14px 18px; margin: 0 0 18px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.banner b { color: var(--ink); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; }
.banner--ok { border-left-color: var(--ok); }
.banner--warn { border-left-color: var(--warn); }
.banner--danger { border-left-color: var(--bad); }

/* ---------- hero (landing only) ---------- */

.hero {
  position: relative; display: flex; align-items: flex-end;
  min-height: min(80vh, 720px);
  padding: var(--band) var(--pad) clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 88px 88px;
  opacity: 0.5;
  mask-image: radial-gradient(120% 90% at 78% 8%, transparent 30%, #000 92%);
  -webkit-mask-image: radial-gradient(120% 90% at 78% 8%, transparent 30%, #000 92%);
}
.hero__inner { position: relative; width: 100%; max-width: 1240px; margin: 0 auto; }
.hero__cols {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px); align-items: end; margin-top: 22px;
}
.hero__stats { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 14px; display: flex; gap: 28px; flex-wrap: wrap; }
.hero__stats .micro { font-size: 13px; letter-spacing: 0.16em; }

/* ---------- reveal cascade ---------- */

html.anim .rv { opacity: 0; animation: rv 1.1s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes rv { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html.anim .rv { animation: none; opacity: 1; transform: none; }
  .topbar, .btn, .field input { transition: none; }
}
@media print {
  html.anim .rv { animation: none; opacity: 1; transform: none; }
  .topbar { position: static; }
}

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

.foot {
  border-top: 1px solid var(--line);
  padding: 26px var(--pad) 40px;
  display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
  color: var(--dim); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
}
.foot a { color: var(--dim); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { align-items: flex-start; }
  .hero__cols { grid-template-columns: 1fr; align-items: start; }
  .topbar__links { display: none; }
  .topbar { gap: 14px; }
}
@media (max-width: 620px) {
  body { font-size: 14px; }
  .row { gap: 10px; }
  .actions { max-width: none; }
}

/* ---------- portal tabs ---------- */

.tabs { display: flex; flex-wrap: wrap; gap: 4px 22px; border-bottom: 1px solid var(--line-row); margin: 8px 0 28px; }
.tabs a {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none;
  color: var(--dim); padding: 10px 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.view[hidden], .banner[hidden] { display: none; }

[hidden] { display: none !important; }
