/* ==========================================================================
   Ledger - the interface for invoice.moonquake.app
   A precision instrument: hairline rules, one shadow level, figures set in a
   tabular display face, and colour reserved for money and status.
   ========================================================================== */

@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/font/space-grotesk.woff2') format('woff2-variations'),
       url('/assets/font/space-grotesk.woff2') format('woff2');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  /* ink */
  --ink:        #171b22;
  --ink-2:      #4a515d;
  --ink-3:      #757d8a;
  --ink-4:      #9aa2ad;

  /* surfaces */
  --paper:      #f3f3f1;
  --card:       #ffffff;
  --rail:       #161d2b;
  --rail-2:     #1f2939;
  --rail-ink:   #aab4c6;

  /* line */
  --line:       #e3e5e9;
  --line-2:     #eceef1;

  /* brand */
  --accent:     #d81f33;
  --accent-ink: #a8172a;
  --navy:       #1f2a3c;

  /* data */
  --in:         #2a78d6;
  --out:        #eb6834;
  --profit:     #1baf7a;
  --pending:    #c3c7cf;

  /* status */
  --ok:         #12794a;
  --ok-bg:      #e6f4ec;
  --warn:       #8a5a00;
  --warn-bg:    #fdf3df;
  --bad:        #a8172a;
  --bad-bg:     #fceaec;
  --neutral-bg: #eef0f3;

  --radius:     8px;
  --shadow:     0 1px 2px rgba(20,26,38,.05), 0 8px 24px -12px rgba(20,26,38,.18);
  --rail-w:     216px;

  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --disp: 'Space Grotesk', var(--sans);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font: 14px/1.55 var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- shell ---------- */

.shell { display: grid; grid-template-columns: var(--rail-w) 1fr; min-height: 100vh; }

.rail {
  background: var(--rail);
  color: var(--rail-ink);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.rail-top { padding: 20px 18px 14px; }
.rail-mark { display: flex; align-items: center; gap: 9px; text-decoration: none; color: #fff; }
.rail-mark svg { width: 22px; height: 22px; flex: none; }
.rail-mark b { font: 600 14.5px/1 var(--disp); letter-spacing: .07em; text-transform: uppercase; }

.rail nav { padding: 6px 10px; flex: 1; overflow-y: auto; }
.rail-group {
  font: 500 10px/1 var(--sans); letter-spacing: .13em; text-transform: uppercase;
  color: #5d6b82; padding: 16px 8px 7px;
}
.rail a.nav {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 8px; border-radius: 6px; text-decoration: none;
  color: var(--rail-ink); font-size: 13.5px; line-height: 1.2;
}
.rail a.nav svg { width: 16px; height: 16px; flex: none; opacity: .78; }
.rail a.nav:hover { background: var(--rail-2); color: #fff; }
.rail a.nav:hover svg { opacity: 1; }
.rail a.nav.on { background: var(--rail-2); color: #fff; box-shadow: inset 2px 0 0 var(--accent); }
.rail a.nav.on svg { opacity: 1; color: #fff; }
.rail a.nav .tag {
  margin-left: auto; font: 600 10.5px/1 var(--disp); padding: 3px 6px; border-radius: 20px;
  background: #33415a; color: #cfd8e6; letter-spacing: .02em;
}
.rail a.nav .tag.hot { background: var(--accent); color: #fff; }

.rail-foot { padding: 12px 18px 16px; border-top: 1px solid #232d3f; font-size: 11.5px; }
.rail-foot a { color: #6d7c93; text-decoration: none; }
.rail-foot a:hover { color: #fff; }
.rail-foot .v { font-family: var(--disp); letter-spacing: .06em; color: #4d5a70; }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px; height: 60px;
  background: rgba(255,255,255,.86); backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font: 600 17px/1.2 var(--disp); letter-spacing: -.005em; }
.topbar .sub { color: var(--ink-3); font-size: 12.5px; }
.topbar .sp { flex: 1; }

.page { padding: 24px 28px 64px; max-width: 1440px; width: 100%; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; align-items: center; overflow-x: auto; }
  .rail-top { padding: 12px 16px; }
  .rail nav { display: flex; gap: 4px; padding: 8px; overflow-x: auto; }
  .rail-group, .rail-foot { display: none; }
  .rail a.nav { white-space: nowrap; }
  .page, .topbar { padding-left: 16px; padding-right: 16px; }
}

/* ---------- cards ---------- */

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 18px;
}
.card > h2, .card-h {
  display: flex; align-items: center; gap: 12px;
  font: 600 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-2); padding: 15px 18px; border-bottom: 1px solid var(--line-2);
}
.card-h .sp { flex: 1; }
.card-h .note { font: 400 11.5px/1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.card-b { padding: 18px; }
.card-b.tight { padding: 10px 18px 14px; }
.card-b.flush { padding: 0; }

.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g-main { grid-template-columns: minmax(0,1fr) 340px; align-items: start; }
.g-half { grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); align-items: start; }
@media (max-width: 1180px) { .g-main, .g-half, .g-3 { grid-template-columns: 1fr; } }
@media (max-width: 760px)  { .g-2 { grid-template-columns: 1fr; } }

/* ---------- stat tiles ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px 12px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  display: flex; flex-direction: column; min-height: 116px; text-decoration: none; color: inherit;
}
.stat .k {
  font: 500 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); display: flex; align-items: center; gap: 6px;
}
.stat .v {
  font: 600 27px/1.05 var(--disp); letter-spacing: -.02em; margin-top: 9px;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.stat .v.sm { font-size: 22px; }
.stat .m { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.stat .m b { font-family: var(--disp); font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }
.stat .spark { margin-top: auto; margin-left: -16px; margin-right: -16px; margin-bottom: -12px; }
.stat .spark svg { display: block; width: 100%; height: 34px; }
.stat.lead { box-shadow: inset 3px 0 0 var(--in), var(--shadow); }
.stat.lead-out { box-shadow: inset 3px 0 0 var(--out), var(--shadow); }
.stat.lead-profit { box-shadow: inset 3px 0 0 var(--profit), var(--shadow); }
.stat.lead-bad { box-shadow: inset 3px 0 0 var(--accent), var(--shadow); }
a.stat:hover { border-color: var(--ink-4); }

.delta { font: 600 11.5px/1 var(--disp); font-variant-numeric: tabular-nums; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--bad); }
.delta.flat { color: var(--ink-3); }

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

label, .lab {
  display: block; font: 500 10.5px/1.3 var(--sans); letter-spacing: .09em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 5px;
}
input[type=text], input[type=password], input[type=date], input[type=number],
input[type=url], input[type=email], input:not([type]), select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #d2d6dd; border-radius: 6px;
  font: inherit; font-size: 13.5px; background: #fff; color: var(--ink);
}
select { appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23757d8a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 12px;
}
textarea { resize: vertical; min-height: 62px; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
input.num, td.num, th.num, .num { font-family: var(--disp); font-variant-numeric: tabular-nums; }
input.num { text-align: right; }
.fld { margin-bottom: 13px; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.f3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.f4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 700px) { .f2, .f3, .f4 { grid-template-columns: 1fr; } }
.hint { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 5px; text-wrap: pretty; }
.check {
  display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0;
  font-size: 13px; color: var(--ink); margin: 0; font-weight: 400;
}
.check input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); flex: none; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; border-radius: 6px; padding: 8px 14px;
  font: 600 13px/1.2 var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap;
  background: #fff; color: var(--ink); border-color: #d2d6dd;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { border-color: var(--ink-4); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-dark:hover { background: #0f1725; border-color: #0f1725; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 5px; }
.btn-danger { color: var(--bad); border-color: #e8c3c9; background: #fff; }
.btn-danger:hover { background: var(--bad-bg); border-color: var(--bad); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.actions {
  position: sticky; bottom: 0; background: rgba(255,255,255,.94);
  backdrop-filter: blur(6px); border-top: 1px solid var(--line);
  padding: 13px 18px; margin: 0; border-radius: 0 0 var(--radius) var(--radius);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; z-index: 5;
}

/* ---------- pills ---------- */

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font: 600 10.5px/1 var(--sans); letter-spacing: .07em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 20px; background: var(--neutral-bg); color: var(--ink-2);
  white-space: nowrap;
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.paid    { background: var(--ok-bg);   color: var(--ok); }
.pill.partial { background: var(--warn-bg); color: var(--warn); }
.pill.overdue { background: var(--bad-bg);  color: var(--bad); }
.pill.unpaid  { background: #e8f0fb;        color: #1c5cab; }
.pill.draft   { background: var(--neutral-bg); color: var(--ink-3); }
.pill.live    { background: var(--ok-bg);   color: var(--ok); }
.pill.test    { background: var(--warn-bg); color: var(--warn); }

/* ---------- tables ---------- */

.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  font: 500 10.5px/1.2 var(--sans); letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-3); text-align: left; padding: 10px 14px;
  border-bottom: 1px solid var(--line); background: #fbfbfa; white-space: nowrap;
}
.tbl th.r, .tbl td.r { text-align: right; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fafbfc; }
.tbl td.num, .tbl th.num { font-family: var(--disp); font-variant-numeric: tabular-nums; }
.tbl a.lnk { text-decoration: none; font-weight: 600; color: var(--ink); }
.tbl a.lnk:hover { color: var(--accent); }
.tbl .sub { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.tbl tfoot td { padding: 11px 14px; border-top: 1px solid var(--line); font-weight: 700;
  font-family: var(--disp); font-variant-numeric: tabular-nums; background: #fbfbfa; }
.tbl-rail td:first-child { box-shadow: inset 3px 0 0 var(--pending); }
.tbl-rail tr.s-paid    td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.tbl-rail tr.s-overdue td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.tbl-rail tr.s-partial td:first-child { box-shadow: inset 3px 0 0 #eda100; }
.tbl-rail tr.s-unpaid  td:first-child { box-shadow: inset 3px 0 0 var(--in); }
.tbl-rail tr.s-draft   td:first-child { box-shadow: inset 3px 0 0 #cdd2da; }

th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th.sortable::after { content: ''; display: inline-block; width: 8px; margin-left: 5px; opacity: .35; }
th.sortable[data-dir="asc"]::after  { content: '\2191'; opacity: 1; }
th.sortable[data-dir="desc"]::after { content: '\2193'; opacity: 1; }

.scroll { overflow-x: auto; }
.empty { padding: 34px 18px; text-align: center; color: var(--ink-3); font-size: 13.5px; text-wrap: pretty; }
.empty svg { width: 30px; height: 30px; opacity: .3; display: block; margin: 0 auto 10px; }
.empty b { display: block; color: var(--ink-2); font-size: 14px; margin-bottom: 4px; }

/* ---------- filter bar ---------- */

.filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end;
  padding: 13px 18px; border-bottom: 1px solid var(--line-2); background: #fbfbfa;
  border-radius: var(--radius) var(--radius) 0 0;
}
.filters .f { min-width: 132px; }
.filters .f.grow { flex: 1; min-width: 190px; }
.filters label { margin-bottom: 4px; }
.filters input, .filters select { padding: 7px 9px; font-size: 13px; }
.filters .btn { padding: 7px 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px;
  border: 1px solid var(--line); border-radius: 20px; background: #fff;
  font-size: 12.5px; text-decoration: none; color: var(--ink-2); white-space: nowrap;
}
.chip:hover { border-color: var(--ink-4); color: var(--ink); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip .n { font-family: var(--disp); font-variant-numeric: tabular-nums; opacity: .75; }

/* ---------- charts ---------- */

.ch-wrap { width: 100%; }
.ch-plot { position: relative; }
.ch { width: 100%; height: auto; display: block; overflow: visible; }
.ch-grid { stroke: var(--line-2); stroke-width: 1; }
.ch-zero { stroke: var(--ink-4); stroke-width: 1; }
.ch-ax { font: 400 10.5px var(--disp); fill: var(--ink-4); font-variant-numeric: tabular-nums; }
.ch-bar { transition: opacity .12s ease; }
.ch-plot:hover .ch-bar { opacity: .55; }
.ch-plot .ch-bar:hover { opacity: 1; }
.ch-track { fill: #f0f1f4; }
.ch-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-line-halo { fill: none; stroke: #fff; stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; }
.ch-dot { stroke: #fff; stroke-width: 2; }
.ch-rowlab { font: 500 12px var(--sans); fill: var(--ink-2); }
.ch-val { font: 600 12px var(--disp); fill: var(--ink); font-variant-numeric: tabular-nums; }
.ch-meta { font: 400 11px var(--sans); fill: var(--ink-4); }
.ch-empty { color: var(--ink-3); font-size: 13px; padding: 22px 0; text-align: center; }
.ch-tip {
  position: absolute; pointer-events: none; z-index: 4;
  background: var(--rail); color: #fff; border-radius: 6px; padding: 7px 10px;
  font-size: 11.5px; line-height: 1.45; box-shadow: 0 6px 20px rgba(0,0,0,.24); white-space: nowrap;
}
.ch-tip b { display: block; font: 600 11px/1.3 var(--disp); letter-spacing: .04em; color: #fff; }
.ch-tip span { display: block; font: 600 13px/1.3 var(--disp); font-variant-numeric: tabular-nums; }

.ch-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.ch-legend.inline { margin-bottom: 10px; }
.ch-legend li { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); }
.ch-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.ch-legend i.ln { height: 3px; border-radius: 2px; }
.ch-legend b { font-family: var(--disp); font-variant-numeric: tabular-nums; color: var(--ink); }
.ch-legend .k { color: var(--ink-2); }
.ch-legend .pc { font-style: normal; color: var(--ink-4); font-size: 11.5px; font-family: var(--disp); }

.ch-meter { display: flex; flex-direction: column; gap: 12px; }
.ch-meter-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #eef0f3; gap: 2px; }
.ch-meter-seg { display: block; height: 100%; }
.ch-meter-empty { flex: 1; background: #eef0f3; }
.ch-meter .ch-legend { flex-direction: column; gap: 7px; }
.ch-meter .ch-legend li { width: 100%; }
.ch-meter .ch-legend .k { flex: 1; }

.ch-table { margin-top: 12px; border-top: 1px solid var(--line-2); padding-top: 8px; }
.ch-table summary {
  font-size: 12px; color: var(--ink-3); cursor: pointer; list-style: none;
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 0;
}
.ch-table summary::-webkit-details-marker { display: none; }
.ch-table summary::before { content: '+'; font-family: var(--disp); font-weight: 600; }
.ch-table[open] summary::before { content: '\2212'; }
.ch-table summary:hover { color: var(--ink); }
.ch-scroll { overflow-x: auto; margin-top: 8px; max-height: 300px; }

/* ---------- misc ---------- */

.flash {
  display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-radius: 6px;
  font-size: 13.5px; margin-bottom: 16px; border: 1px solid transparent; text-wrap: pretty;
}
.flash.ok  { background: var(--ok-bg);  border-color: #bfe0cd; color: var(--ok); }
.flash.err { background: var(--bad-bg); border-color: #e8c3c9; color: var(--bad); }
.flash svg { width: 17px; height: 17px; flex: none; }

.crumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-3); margin-bottom: 4px; }
.crumb a { text-decoration: none; color: var(--ink-3); }
.crumb a:hover { color: var(--accent); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { text-align: right; font-family: var(--disp); font-variant-numeric: tabular-nums; font-weight: 600; }

.totbox { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.totbox .r { display: flex; justify-content: space-between; padding: 9px 14px; font-size: 13.5px; }
.totbox .r:nth-child(even) { background: #fafbfc; }
.totbox .r span:last-child { font-family: var(--disp); font-variant-numeric: tabular-nums; font-weight: 600; }
.totbox .due { display: flex; justify-content: space-between; align-items: center;
  background: var(--navy); color: #fff; padding: 12px 14px; }
.totbox .due b { font: 600 20px var(--disp); font-variant-numeric: tabular-nums; }
.totbox .bal { display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: var(--bad-bg); color: var(--bad); font-weight: 600; }
.totbox .bal.settled { background: var(--ok-bg); color: var(--ok); }
.totbox .bal b { font-family: var(--disp); font-variant-numeric: tabular-nums; }

.money-lg { font: 600 22px/1.1 var(--disp); font-variant-numeric: tabular-nums; letter-spacing: -.015em; }
.pos { color: var(--ok); }
.neg { color: var(--bad); }
.mute { color: var(--ink-3); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
h3.sec { font: 600 13px/1 var(--disp); letter-spacing: .04em; margin-bottom: 10px; color: var(--ink-2); }

/* ---------- gate ---------- */

.gate { display: grid; place-items: center; min-height: 100vh; background: var(--rail); padding: 20px; }
.gate form { background: #fff; padding: 30px 32px; border-radius: 10px; width: 330px;
  box-shadow: 0 24px 60px rgba(0,0,0,.34); }
.gate .mark { display: flex; align-items: center; gap: 9px; margin-bottom: 20px; }
.gate .mark svg { width: 24px; height: 24px; }
.gate .mark b { font: 600 15px/1 var(--disp); letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }
.gate .btn { width: 100%; margin-top: 12px; padding: 11px; }
.gate .e { color: var(--bad); font-size: 12.5px; margin-top: 10px; text-wrap: pretty; }

/* ---------- public invoice view ---------- */

.pubwrap { max-width: 900px; margin: 0 auto; padding: 26px 18px 70px; }
.pubbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 18px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.pubbar .amt { font: 600 24px/1 var(--disp); font-variant-numeric: tabular-nums; }
.pubbar .lab { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.pubframe { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: #fff; }
.pubframe iframe { display: block; width: 100%; height: 1120px; border: 0; }

@media print {
  .rail, .topbar, .actions, .filters, .btn, .ch-table { display: none !important; }
  .shell { grid-template-columns: 1fr; }
  .card { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}

.gate .ok { color: var(--ink, #1a2433); font-size: 12.5px; margin-top: 10px; text-wrap: pretty; }
.gate .gate-note { font-size: 13.5px; line-height: 1.5; margin: 0 0 4px; text-wrap: pretty; }
.gate .gate-link { display: block; margin-top: 14px; font-size: 12.5px; text-align: center; }
.gate .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.gate input + label { margin-top: 12px; display: block; }
