/* NAQS Registry. Colours, type and layout follow the approved React preview (src/index.css). */

:root {
  --ink: #14261d;
  --green-deep: #0f3d2e;
  --green: #1e5a3c;
  --leaf: #3c8d5a;
  --gold: #b8862b;
  --gold-soft: #f3e7c9;
  --paper: #f2f4ef;
  --card: #ffffff;
  --head: #f8faf6;
  --line: #d3dad0;
  --line-soft: #e6ebe3;
  --field: #ffffff;
  --field-line: #aebaa9;
  --muted: #55655b;
  --danger: #a33a2b;
  --danger-tint: #f8e5e1;
  --in-tint: #e4f0e8;
  --in-ink: #0f3d2e;
  --out-tint: #f6ecd4;
  --out-ink: #6b4a0c;
  --seg-hover: #f1f5ef;
  --row-hover: #fafbf8;
  --avatar-bg: #1e5a3c;
  --tag: #1e5a3c;
  --serif: "Bitter", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #e8efe9;
  --paper: #101a15;
  --card: #17241d;
  --head: #1b2a22;
  --line: #2b3d33;
  --line-soft: #24342b;
  --field: #101a15;
  --field-line: #4a6154;
  --muted: #9db0a3;
  --in-tint: #1d3a2a;
  --in-ink: #a9dcbc;
  --out-tint: #3b3217;
  --out-ink: #ecd391;
  --seg-hover: #1c2c23;
  --row-hover: #1b2a22;
  --gold-soft: #4a3d17;
  --danger: #e58a7b;
  --danger-tint: #3a1f1a;
  --avatar-bg: #3c8d5a;
  --tag: #8fd0a7;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
h1, h2, h3 { font-family: var(--serif); margin: 0; line-height: 1.2; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--tag); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--card); color: var(--ink); padding: 8px 12px; border-radius: 4px; }
.skip:focus { top: 12px; }

/* theme toggle label follows data-theme, so it is right before any script runs */
:root[data-theme="dark"] .when-light, :root:not([data-theme="dark"]) .when-dark { display: none; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.top { position: relative; z-index: 20; background: var(--green-deep); color: #fff; border-bottom: 4px solid var(--gold); }
.top-inner, .tabs-inner, .main { width: 100%; max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.top-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 14px; color: inherit; text-decoration: none; }
.brand h1 { font-size: 34px; font-weight: 700; letter-spacing: 0.01em; }
.brand p { margin: 4px 0 0; color: #cfe0d5; font-size: 14px; }
.who { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.who-name { display: flex; flex-direction: column; text-align: right; line-height: 1.3; }
.who-name span { color: #cfe0d5; font-size: 13px; }
.who form { margin: 0; }
.tabs { background: var(--green); }
.tabs-inner { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; background: none; border: 0; color: #dbe9e0; padding: 12px 16px; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab:hover { color: #fff; }
.tab.on { color: #fff; font-weight: 600; border-bottom-color: var(--gold); }
.tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #e3c46b; color: #14261d; font-size: 12px; font-weight: 700; line-height: 1; }
.main { flex: 1; padding-top: 28px; padding-bottom: 40px; }
.foot { text-align: center; padding: 16px 24px 24px; color: var(--muted); font-size: 13px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 4px; padding: 9px 16px; cursor: pointer; font-weight: 600; text-decoration: none; line-height: 1.4; }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-deep); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover:not(:disabled) { border-color: var(--tag); }
.btn.ghost-light { background: transparent; border-color: #5f8a73; color: #fff; }
.btn.ghost-light:hover { border-color: #fff; }
.btn.danger { background: var(--danger); color: var(--card); }
.btn.block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--tag); text-decoration: underline; cursor: pointer; font-weight: 500; }
.link.danger-text, .btn.danger-text { color: var(--danger); }
.btn.danger-text:hover { border-color: var(--danger); }
.theme-floating { position: absolute; top: 20px; right: 20px; display: inline-flex; align-items: center; gap: 6px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.theme-floating:hover { border-color: var(--tag); }
.theme-btn span { display: inline-flex; align-items: center; gap: 6px; }
.theme-btn svg { flex: none; }

/* ---------- page bits ---------- */
.head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title { font-size: 26px; }
.hint { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.hint.wide { max-width: 78ch; }
.flash { background: var(--in-tint); border: 1px solid var(--leaf); border-left-width: 5px; padding: 10px 14px; margin-bottom: 18px; border-radius: 3px; }
.flash.error { background: var(--danger-tint); border-color: var(--danger); }
.flash.warning { background: var(--out-tint); border-color: var(--gold); }
.flash.secret { background: var(--out-tint); border-color: var(--gold); }
.flash .pw { font-family: Consolas, "Courier New", monospace; font-size: 17px; font-weight: 700; letter-spacing: 0.04em; background: var(--card); padding: 1px 6px; border-radius: 3px; border: 1px solid var(--line); user-select: all; }
.flashes { margin-bottom: 4px; }

.strip { display: flex; flex-wrap: wrap; margin: 0 0 22px; border: 1px solid var(--line); background: var(--card); border-radius: 4px; }
.strip > div { flex: 1 1 140px; padding: 12px 18px; border-right: 1px solid var(--line); }
.strip > div:last-child { border-right: 0; }
.strip dt { color: var(--muted); font-size: 13px; }
.strip dd { margin: 2px 0 0; font-family: var(--serif); font-weight: 600; font-size: 26px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 20px 22px; margin-bottom: 22px; }
.card.gold { border-top: 5px solid var(--gold); }
.card.green { border-top: 5px solid var(--leaf); }
.card h3 { font-size: 18px; margin-bottom: 6px; }
.card-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; margin-top: 12px; }
.card-row input { flex: 1 1 320px; width: auto; font-family: Consolas, "Courier New", monospace; font-size: 14px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 14px 0 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

/* ---------- forms ---------- */
input, select { background: var(--field); border: 1px solid var(--field-line); border-radius: 4px; padding: 9px 10px; width: 100%; min-height: 42px; }
input:hover, select:hover { border-color: var(--tag); }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field label { font-weight: 600; }
.field .hint { margin: 0 0 2px; }
.field.bad input, .field.bad select { border-color: var(--danger); border-width: 2px; }
.err { color: var(--danger); margin: 2px 0 0; font-size: 14px; font-weight: 500; }
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pw-wrap { display: flex; gap: 6px; }
.pw-wrap input { flex: 1; min-width: 0; }
.pw-toggle { flex: none; min-width: 64px; background: var(--card); border: 1px solid var(--field-line); border-radius: 4px; padding: 0 12px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--tag); }
.pw-toggle:hover { border-color: var(--tag); }
.alert { border: 1px solid var(--danger); border-left-width: 5px; background: var(--danger-tint); padding: 10px 14px; border-radius: 3px; }
.alert.info { border-color: var(--leaf); background: var(--in-tint); }
.alert:empty { display: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.auto { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; background: var(--paper); border-radius: 4px; padding: 12px 14px; }
.auto dt { font-size: 13px; color: var(--muted); }
.auto dd { margin: 0; font-weight: 500; }

/* segmented control (links or buttons) */
.seg-row { display: inline-flex; border: 1px solid var(--field-line); border-radius: 4px; overflow: hidden; flex-wrap: wrap; margin-bottom: 16px; }
.seg-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--field); border: 0; padding: 9px 18px; cursor: pointer; border-right: 1px solid var(--field-line); color: var(--ink); text-decoration: none; }
.seg-btn:last-child { border-right: 0; }
.seg-btn:hover { background: var(--seg-hover); }
.seg-btn.on { background: var(--green); color: #fff; font-weight: 600; }
.seg-btn .n { font-size: 13px; opacity: .85; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
.ledger { width: 100%; border-collapse: collapse; min-width: 820px; }
.ledger th { text-align: left; font-weight: 600; font-size: 13px; color: var(--muted); background: var(--head); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.ledger td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.ledger tbody tr:last-child td { border-bottom: 0; }
.ledger tbody tr:hover { background: var(--row-hover); }
.ledger td:first-child, .ledger th:first-child { padding-left: 18px; }
.num { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.person strong { display: block; }
.person span { display: block; color: var(--muted); font-size: 13px; }
.act { text-align: right; }
.act-row { display: inline-flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.act-row form { margin: 0; display: inline-flex; gap: 6px; align-items: center; }
.act-row select { width: auto; min-height: 34px; padding: 5px 8px; font-size: 14px; }
.note { color: var(--muted); font-size: 13.5px; font-style: italic; }
.empty { text-align: center; color: var(--muted); padding: 36px 12px !important; }

/* role and state tags */
.tag { display: inline-block; padding: 2px 9px; border-radius: 3px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.tag.cgs { background: var(--in-tint); color: var(--in-ink); }
.tag.secret { background: var(--out-tint); color: var(--out-ink); }
.tag.ict { background: var(--head); color: var(--ink); border: 1px solid var(--line); }
.tag.cg { background: var(--green); color: #fff; }
:root[data-theme="dark"] .tag.cg { background: var(--leaf); }

.events { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
.events li { display: flex; gap: 6px 18px; flex-wrap: wrap; padding: 9px 14px; border-bottom: 1px solid var(--line-soft); }
.events li:last-child { border-bottom: 0; }
.events time { color: var(--muted); min-width: 150px; font-variant-numeric: tabular-nums; font-size: 14px; }
.section-title { font-size: 19px; margin: 30px 0 10px; }

.js .create-card[data-closed] { display: none; }

/* ---------- registry (ported from the React preview) ---------- */
.head-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.reg-switch { margin-bottom: 18px; }
.btn.incoming { background: var(--green); color: #fff; }
.btn.incoming:hover { background: var(--green-deep); }
.btn.outgoing { background: var(--out-tint); color: var(--out-ink); border-color: var(--gold); }
.btn.outgoing:hover { border-color: var(--out-ink); }
.btn[aria-disabled="true"] { opacity: .5; cursor: default; }

.search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.search-input { flex: 1 1 260px; width: auto; min-height: 46px; font-size: 16px; }
.search-row .btn { min-height: 46px; }
.pf-select { flex: 0 1 250px; width: auto; min-height: 46px; }
.filter-btn { display: inline-flex; align-items: center; gap: 8px; }
.filter-btn.open { background: var(--in-tint); border-color: var(--tag); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--green); color: #fff; font-size: 12px; line-height: 1; }
.filter-panel { display: grid; grid-template-columns: 1fr 1fr 1.5fr 1fr 1fr auto; gap: 12px; align-items: end; margin-top: 12px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
.filter-panel.no-type { grid-template-columns: 1fr 1.5fr 1fr 1fr auto; }
.js .filter-panel[data-closed] { display: none; }
.filter-panel input, .filter-panel select { height: 42px; }
.f { display: flex; flex-direction: column; gap: 4px; }
.f > span { font-size: 13px; color: var(--muted); }
.table-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 8px; }
.table-bar p { margin: 0; color: var(--muted); font-size: 14px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; color: var(--muted); }
.btn.more { margin-top: 14px; }

.ledger.entries, .ledger.files { min-width: 980px; }
.ledger.entries td, .ledger.files td { vertical-align: top; }
.ledger.entries tbody tr, .ledger.files tbody tr { box-shadow: inset 4px 0 0 var(--leaf); }
.ledger.entries tbody tr.outgoing { box-shadow: inset 4px 0 0 var(--gold); }
.ledger.files tbody tr.transit { box-shadow: inset 4px 0 0 var(--gold); }
.ledger.files tbody tr.dept { box-shadow: inset 4px 0 0 var(--field-line); }
.ledger.files tbody tr.hist { box-shadow: none; }
.ledger tr.fresh { animation: settle 6s ease-out; }
@keyframes settle { from { background: var(--gold-soft); } to { background: transparent; } }
.subj { min-width: 260px; max-width: 420px; }
.party { display: block; }
.ledger.entries td.by { min-width: 140px; }
.party-kind { display: block; color: var(--muted); font-size: 13px; }
.file-link { color: inherit; text-decoration-color: var(--line); }
.dir { display: inline-block; padding: 2px 9px; border-radius: 3px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.dir.incoming { background: var(--in-tint); color: var(--in-ink); }
.dir.outgoing { background: var(--out-tint); color: var(--out-ink); }
.dir.created { background: var(--head); color: var(--ink); border: 1px solid var(--line); }
.where { display: inline-block; padding: 2px 9px; border-radius: 3px; font-size: 13px; font-weight: 600; }
.where.office { background: var(--in-tint); color: var(--in-ink); }
.where.transit { background: var(--out-tint); color: var(--out-ink); }
.where.dept { background: var(--head); color: var(--ink); border: 1px solid var(--line); }
.nosubj { color: var(--muted); font-style: italic; }
.ledger tr.hist td { background: var(--head); padding: 14px 18px 12px 40px; }
.hist-empty { margin: 0; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 3px 0 9px 16px; display: flex; gap: 6px 16px; flex-wrap: wrap; }
.timeline li::before { content: ""; position: absolute; left: -21px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--field-line); }
.timeline li:first-child::before { background: var(--leaf); }
.tl-time { color: var(--muted); min-width: 150px; font-variant-numeric: tabular-nums; font-size: 14px; }
.tl-by { display: block; color: var(--muted); font-size: 13px; }

/* record and create forms */
.form-page { max-width: 640px; }
.sub { color: var(--muted); margin: 6px 0 0; max-width: 62ch; }
.sub b { color: var(--ink); }
.entry { margin-top: 18px; display: flex; flex-direction: column; gap: 20px; background: var(--card); border: 1px solid var(--line); border-top-width: 5px; border-radius: 4px; padding: 24px; }
.entry.incoming { border-top-color: var(--leaf); }
.entry.outgoing { border-top-color: var(--gold); }
.entry [hidden] { display: none; }
.seg { border: 0; padding: 0; margin: 0; min-width: 0; }
.seg legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.seg .seg-row { margin-bottom: 0; }
.radio-seg .seg-btn { position: relative; }
.radio-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.radio-seg .seg-btn:focus-within { outline: 3px solid var(--gold); outline-offset: -3px; }
.switch-note { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.hint.current { margin: 4px 0 0; }
.hint.current strong { color: var(--ink); }
input[readonly] { background: var(--head); }
input[readonly]:hover { border-color: var(--field-line); }
.js .no-js-only { display: none; }

.suggest { list-style: none; margin: 4px 0 0; padding: 0; background: var(--card); border: 1px solid var(--field-line); border-radius: 4px; max-height: 300px; overflow: auto; box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.suggest button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line-soft); padding: 10px 12px; cursor: pointer; }
.suggest li:last-child button { border-bottom: 0; }
.suggest button:hover, .suggest button:focus-visible { background: var(--row-hover); }
.suggest button:focus-visible { outline-offset: -3px; }
.suggest .s-no { font-weight: 600; }
.suggest .s-sub { display: block; color: var(--muted); font-size: 13.5px; }

/* notifications */
.bell-wrap { position: relative; }
.bell-btn { position: relative; padding-left: 12px; padding-right: 12px; }
.bell-count { position: absolute; top: -8px; right: -8px; background: #e3c46b; color: #14261d; border-radius: 10px; min-width: 20px; padding: 0 5px; font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; }
.notif-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 360px; max-width: calc(100vw - 32px); max-height: 70vh; overflow: auto; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.3); z-index: 30; text-align: left; }
.notif-panel[hidden] { display: none; }
.notif-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.notif-head h2 { font-size: 17px; }
.notif-head form { margin: 0; }
.notif-head .link { font-size: 14px; }
.notif-head .link:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li + li { border-top: 1px solid var(--line-soft); }
.notif-list form { margin: 0; }
.notif { position: relative; display: block; width: 100%; text-align: left; background: none; border: 0; padding: 12px 14px 12px 32px; font-weight: 400; font-size: 14px; line-height: 1.4; cursor: pointer; color: var(--ink); }
.notif:hover { background: var(--row-hover); }
.notif:focus-visible { outline-offset: -3px; }
.notif-time { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; font-weight: 400; }
.notif.unread { font-weight: 600; }
.notif.unread::before { content: ""; position: absolute; left: 13px; top: 19px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.notif-empty { margin: 0; padding: 18px 14px; color: var(--muted); }

@media (max-width: 900px) {
  .filter-panel, .filter-panel.no-type { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .bell-wrap { position: static; }
  .notif-panel { top: auto; left: 16px; right: 16px; width: auto; max-width: none; margin-top: 8px; }
  .pf-select { flex: 1 1 100%; }
  .ledger tr.hist td { padding-left: 24px; }
  .entry { padding: 18px; }
}
@media (max-width: 480px) {
  .filter-panel, .filter-panel.no-type { grid-template-columns: 1fr; }
}

/* ---------- logo badge ---------- */
.logo-badge { display: inline-flex; flex: none; background: #fff; padding: 14px; border-radius: 18px; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.logo-badge img { display: block; height: 120px; width: auto; object-fit: contain; }
.logo-badge.sm { padding: 5px; border-radius: 8px; }
.logo-badge.sm img { height: 44px; }

/* ---------- sign-in screen (two columns) ---------- */
.signin { display: grid; grid-template-columns: 1.15fr 0.85fr; min-height: 100vh; }
.signin-brand {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 44px 48px 44px 104px;
  background-color: #0c3527; color: #fff;
  background-image:
    linear-gradient(to right, transparent 71px, rgba(227,196,107,.55) 71px, rgba(227,196,107,.55) 73px, transparent 73px),
    repeating-linear-gradient(to bottom, transparent 0, transparent 35px, rgba(255,255,255,.06) 35px, rgba(255,255,255,.06) 36px);
}
.signin-logo { display: flex; align-items: center; gap: 16px; font-size: 14px; color: #bcd3c5; }
.signin-brand h1 { font-weight: 700; font-size: clamp(40px, 5vw, 60px); line-height: 1.05; }
.signin-brand p { margin: 14px 0 0; font-size: 18px; color: #d6e5db; max-width: 34ch; }

.bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-right: 8px; }
.pen-wrap { flex: 1 1 0; min-width: 0; max-width: 360px; padding-bottom: 64px; }
.pen { display: block; width: 100%; height: auto; transform: rotate(10deg); transform-origin: 10% 50%; filter: drop-shadow(0 10px 8px rgba(0,0,0,.35)); animation: lay .7s cubic-bezier(.2,.8,.3,1) .6s both; }
@keyframes lay { from { opacity: 0; transform: translateX(-40px) rotate(2deg); } to { opacity: 1; transform: rotate(10deg); } }
.bottom .stamp { flex: none; width: clamp(200px, 22vw, 300px); height: auto; }
.stamp { transform: rotate(-8deg); animation: thud .6s cubic-bezier(.2,.9,.3,1.2) .25s both; color: #e3c46b; }
.stamp text { fill: currentColor; font-family: var(--sans); font-weight: 700; }
.stamp .stroke { fill: none; stroke: currentColor; }
@keyframes thud { from { opacity: 0; transform: rotate(-14deg) scale(1.45); } 55% { opacity: .95; } to { opacity: .94; transform: rotate(-8deg) scale(1); } }

.signin-panel { position: relative; background: var(--paper); display: flex; justify-content: center; align-items: flex-start; padding: 84px 32px 48px; }
.signin-inner { width: 100%; max-width: 440px; }
.signin-inner h2 { font-weight: 600; font-size: 30px; }
.signin-lede { margin: 8px 0 22px; color: var(--muted); }
.signin-note { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.signin-inner .alert { margin-bottom: 18px; }
.pending-icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--in-tint); color: var(--in-ink); margin-bottom: 16px; }
.summary { margin: 20px 0 24px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 4px 16px; }
.summary div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.summary div:last-child { border-bottom: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- error pages ---------- */
.error-page { max-width: 560px; margin: 60px auto; padding: 0 16px; }
.error-page .code { font-family: var(--serif); font-size: 64px; font-weight: 700; color: var(--gold); line-height: 1; }
.error-page h2 { font-size: 28px; margin: 10px 0 8px; }
.error-page p { color: var(--muted); margin: 0 0 22px; }

@media (max-width: 860px) {
  .signin { grid-template-columns: 1fr; }
  .signin-brand {
    position: relative; height: auto;
    padding: 32px 24px 36px 56px;
    background-image:
      linear-gradient(to right, transparent 31px, rgba(227,196,107,.55) 31px, rgba(227,196,107,.55) 33px, transparent 33px),
      repeating-linear-gradient(to bottom, transparent 0, transparent 35px, rgba(255,255,255,.06) 35px, rgba(255,255,255,.06) 36px);
  }
  .signin-logo .logo-badge img { height: 84px; }
  .bottom { flex-wrap: wrap; justify-content: flex-start; }
  .pen-wrap { flex: none; width: 230px; padding-bottom: 36px; }
  .bottom .stamp { width: 190px; }
  .signin-panel { padding: 72px 16px 40px; }
}
@media (max-width: 720px) {
  .top-inner, .tabs-inner, .main { padding-left: 16px; padding-right: 16px; }
  .brand h1 { font-size: 28px; }
  .who-name { text-align: left; }
  .auto { grid-template-columns: 1fr; }
  .card { padding: 18px; }
}
@media (max-width: 480px) {
  .row-2 { grid-template-columns: 1fr; }
  .summary div { grid-template-columns: 1fr; gap: 2px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .ledger tr.fresh { animation: none; background: var(--gold-soft); }
  .stamp { animation: none; opacity: .94; }
  .pen { animation: none; }
}
