:root {
  color-scheme: dark;
  --bg: #07090c;
  --panel: #0e1217;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --ink: #eef1f4;
  --soft: #a3abb5;
  --muted: #6e7681;
  --red: #e5213c;
  --paper: #f7f4ed;
  --card: #fffefb;
  --pen: #2b2823;
  --pen-soft: #6e685d;
  --pen-muted: #9a9488;
  --pline: #ede9df;
  --jade: #4f8a43;
  --jade-bg: #e3eddd;
  --brass: #9a7535;
  --brass-bg: #f3ead6;
  --clay: #b5313f;
  --clay-bg: #f8e1e3;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --serif: "Prata", Georgia, serif;
  --r: 16px;
  --ease: cubic-bezier(.22, .8, .24, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 400 15px/1.55 var(--sans); letter-spacing: .01em;
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
a { color: inherit; }
button { font: inherit; }
.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 28px; padding-bottom: 48px; }
.loading, .empty { color: var(--muted); padding: 48px 0; text-align: center; }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px max(16px, calc((100vw - 1180px) / 2 + 16px)); border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 12, .86); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 5; }
.top-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; min-width: 0; }
.top-brand img { height: 22px; width: auto; display: block; }
.top-word { font-weight: 300; font-size: 14px; letter-spacing: .22em; text-transform: uppercase; color: var(--soft);
  padding-left: 14px; border-left: 1px solid var(--line-2); }
.top-nav { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.top-nav a, .top-nav span { color: var(--soft); text-decoration: none; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.top-nav a:hover { color: var(--ink); background: rgba(255,255,255,.06); }
.top-nav a.on { color: var(--ink); background: rgba(255,255,255,.08); }
.top-nav .who { color: var(--muted); }

/* headings */
.eyebrow { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
h1.title { font: 400 30px/1.2 var(--serif); margin: 0; letter-spacing: 0; }
.lede { color: var(--soft); margin: 8px 0 0; max-width: 60ch; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink); text-decoration: none; font-size: 14px;
  transition: background .2s var(--ease), border-color .2s var(--ease); white-space: nowrap; }
.btn:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.28); }
.btn-chrome { background: linear-gradient(180deg, #f4f6f8, #c9ced4); color: #0b0d11; border: 0; font-weight: 500; }
.btn-chrome:hover { filter: brightness(1.05); background: linear-gradient(180deg, #f4f6f8, #c9ced4); }
.btn-paper { border-color: var(--pline); color: var(--pen); background: var(--card); }
.btn-paper:hover { background: #f3f0e8; border-color: #d9d3c6; }
.btn-go { background: var(--jade); border-color: var(--jade); color: #fff; font-weight: 500; }
.btn-go:hover { background: #457b3a; border-color: #457b3a; }
.btn svg { width: 16px; height: 16px; }

/* client switcher */
.switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.switch button { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 6px; border-radius: 999px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); color: var(--soft); transition: all .2s var(--ease); }
.switch button:hover { color: var(--ink); border-color: var(--line-2); }
.switch button.on { color: var(--ink); border-color: rgba(255,255,255,.4); background: #151a21; }
.chip-logo { min-width: 32px; height: 32px; padding: 0 7px; border-radius: 16px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.chip-logo img { max-width: 58px; max-height: 20px; display: block; }

/* paper surfaces, same family as the report sheets */
.paper { background: var(--card); color: var(--pen); border-radius: var(--r); padding: 20px 22px; margin-bottom: 14px; }
.paper h2 { font: 400 17px/1.3 var(--serif); margin: 0 0 12px; }
.paper .sub { color: var(--pen-muted); font-size: 13px; }
.sheetbg { background: var(--paper); border-radius: 22px; padding: 14px; }

/* checklist grid */
.grid-scroll { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table.check { width: 100%; border-collapse: collapse; min-width: 520px; font-size: 14px; }
.check th, .check td { padding: 10px 8px; border-bottom: 1px solid var(--pline); text-align: center; }
.check th:first-child, .check td:first-child { text-align: left; padding-left: 0; }
.check thead th { vertical-align: bottom; font-weight: 500; }
.check thead a { text-decoration: none; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.check thead a:hover .mlabel { text-decoration: underline; }
.mlabel { font: 400 15px var(--serif); }
.check tr.group td { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--pen-muted); padding-top: 18px; border-bottom: 0; }
.check td.item { color: var(--pen); }
.check td.item small { color: var(--pen-muted); display: block; font-size: 12px; }
.mark { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 14px; line-height: 1; cursor: default; }
.mark.ok { background: var(--jade-bg); color: var(--jade); }
.mark.missing { background: var(--clay-bg); color: var(--clay); }
.mark.warn { background: var(--brass-bg); color: var(--brass); }
.mark.na { color: var(--pen-muted); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--pen-soft); margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .mark { width: 20px; height: 20px; font-size: 11px; }

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 10px; border-radius: 999px; font-family: var(--sans); white-space: nowrap; }
.pill.approved { background: var(--jade-bg); color: var(--jade); }
.pill.review { background: var(--brass-bg); color: var(--brass); }
.pill.dark.approved { background: rgba(79,138,67,.18); color: #8fd07f; }
.pill.dark.review { background: rgba(176,141,74,.18); color: #e2c27f; }

/* notes */
.notes { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.notes li { padding-left: 14px; position: relative; }
.notes li::before { content: ""; position: absolute; left: 0; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--pen-muted); }
.log { font-size: 12.5px; color: var(--pen-muted); margin-top: 14px; display: grid; gap: 2px; }

/* report header */
.rhead { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.rhead .id { display: flex; align-items: center; gap: 18px; min-width: 0; }
.rlogo { height: 46px; width: auto; max-width: 160px; object-fit: contain; display: block; }
.rhead h1 { font: 400 24px/1.2 var(--serif); margin: 0; }
.rhead .by { color: var(--pen-muted); font-size: 13px; margin-top: 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* figures */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: var(--card); color: var(--pen); border-radius: var(--r); padding: 16px 18px; }
.tile .n { font: 400 28px/1.1 var(--serif); }
.tile .l { font-size: 13px; font-weight: 500; margin-top: 8px; }
.tile .d { font-size: 12.5px; color: var(--pen-muted); margin-top: 2px; }
.tile .mom { font-size: 12.5px; font-weight: 500; margin-top: 4px; color: var(--jade); }
.tile .mom.neg { color: var(--clay); }

table.chan { width: 100%; border-collapse: collapse; font-size: 14px; }
.chan th { font-weight: 500; font-size: 12px; color: var(--pen-muted); text-align: right; padding: 0 8px 8px; }
.chan td { text-align: right; padding: 10px 8px; border-top: 1px solid var(--pline); font-variant-numeric: tabular-nums; }
.chan th:first-child, .chan td:first-child { text-align: left; padding-left: 0; }
.chan td:last-child, .chan th:last-child { padding-right: 0; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 0; }
.net { color: var(--jade); font-size: 12.5px; margin-left: 4px; }
.net.neg { color: var(--clay); }

.tops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.top3 { border: 1px solid var(--pline); border-radius: 12px; padding: 14px; }
.top3 .rank { font: 400 13px var(--serif); color: var(--pen-muted); }
.top3 .t { font-weight: 500; margin: 4px 0 6px; line-height: 1.35; }
.top3 .m { font-size: 13px; color: var(--pen-soft); }
.caveats { font-size: 12.5px; color: var(--pen-muted); line-height: 1.6; margin-top: 4px; }

.two { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; }
.two > .paper { margin-bottom: 0; }
.stack { display: grid; gap: 14px; margin-bottom: 14px; }

/* the sheet itself, scaled to fit */
.frame-wrap { position: relative; width: 100%; overflow: hidden; border-radius: 12px; background: var(--paper); }
.frame-wrap iframe { position: absolute; top: 0; left: 0; width: 1600px; border: 0; transform-origin: 0 0; background: var(--paper); }

/* portal */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 26px 28px; }
.hero .id { display: flex; align-items: center; gap: 22px; }
.hero .rlogo { height: 64px; max-width: 220px; }
.preview-bar { background: rgba(229, 33, 60, .1); border: 1px solid rgba(229, 33, 60, .35); color: #ffb3bd; padding: 10px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; }
.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 82px minmax(0, 1fr) 96px; align-items: center; gap: 12px; font-size: 14px; }
.bar .track { height: 10px; border-radius: 5px; background: var(--pline); overflow: hidden; }
.bar .track i { display: block; height: 100%; border-radius: 5px; background: var(--pen); }
.bar .v { text-align: right; font-variant-numeric: tabular-nums; }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.mcard { display: block; text-decoration: none; background: var(--card); color: var(--pen); border-radius: var(--r); padding: 16px 18px; transition: transform .25s var(--ease); }
.mcard:hover { transform: translateY(-2px); }
.mcard .mlabel { font-size: 18px; }
.mcard .k { display: flex; justify-content: space-between; font-size: 13px; color: var(--pen-soft); margin-top: 10px; }
.mcard .k b { color: var(--pen); font-weight: 500; }

.back { display: inline-flex; align-items: center; gap: 6px; color: var(--soft); text-decoration: none; font-size: 14px; margin-bottom: 16px; }
.back:hover { color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #eef1f4; color: #0b0d11; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 20; }

.foot { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12.5px; padding-top: 18px; padding-bottom: 24px; border-top: 1px solid var(--line); }

/* login */
body.login { display: grid; place-items: center; min-height: 100vh; padding: 24px;
  background: radial-gradient(80% 70% at 50% 42%, #141920, #06080b 70%); }
.login-card { display: grid; gap: 14px; justify-items: center; width: min(360px, 100%); }
.login-mark { width: 240px; max-width: 72vw; }
.login-sub { color: var(--muted); font-size: 13px; letter-spacing: .3em; text-transform: uppercase; margin: -4px 0 8px; }
.login-card input { width: 100%; height: 48px; padding: 0 16px; border-radius: 12px; text-align: center;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); color: var(--ink); font: inherit; }
.login-card input:focus { outline: none; border-color: rgba(255,255,255,.32); background: rgba(255,255,255,.08); }
.login-card .btn { width: 100%; height: 48px; justify-content: center; font-size: 15px; }
.login-err { color: #ff6b7d; font-size: 13px; min-height: 18px; }

a:focus-visible, button:focus-visible { outline: 2px solid #8ab4ff; outline-offset: 2px; }

@media (max-width: 820px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two, .tops { grid-template-columns: 1fr; }
  h1.title { font-size: 25px; }
  .hero { padding: 20px; }
}
@media (max-width: 520px) {
  .top-word { display: none; }
  .top-nav .who { display: none; }
  .tile .n { font-size: 23px; }
  .paper { padding: 16px; }
  .grid-scroll { margin: 0 -16px; padding: 0 16px; }
  .bar { grid-template-columns: 64px minmax(0, 1fr) 80px; }
  .foot { flex-direction: column; }
}
