:root {
  --ground: #F6F7F8;
  --card: #FFFFFF;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --line: #E6E8EC;
  --input: #CBD5E1;
  --teal: #0F766E;
  --teal-hover: #0B625B;
  --teal-wash: #E8F3F1;
  --gold: #B45309;
  --brit: #C8102E;
  --chart-1: #0F766E;
  --chart-2: #D97706;
  --chart-3: #C45C26;
  --chart-4: #0E7490;
  --chart-5: #A16207;
  --chart-6: #9F1239;
  --display: 'Newsreader', 'Iowan Old Style', Georgia, serif;

  --hover: rgb(28 28 30 / 0.04);
  --disabled-bg: #EDEDEA;
  --disabled-ink: #8E8E93;
  --lift: 0 1px 2px rgb(15 23 42 / 0.05), 0 0 0 1px rgb(15 23 42 / 0.05);
  --lift-hi: 0 8px 24px -12px rgb(15 23 42 / 0.14), 0 0 0 1px rgb(15 23 42 / 0.06);
  --ring: 0 0 0 2px var(--card), 0 0 0 4px rgb(15 23 42 / 0.28);

  --r: 8px;
  --r-card: 12px;
  --ease: 160ms ease-out;
  --rail-w: 216px;
  --pad: 32px;

  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow: hidden; background: var(--ground); color: var(--ink); font: 400 14.5px/1.5 var(--sans); letter-spacing: -0.014em; -webkit-font-smoothing: antialiased; }
#app { height: 100%; height: 100dvh; display: grid; grid-template-rows: 28px minmax(0, 1fr); overflow: hidden; }
h1, h2, h3, p, dl, dd, ol, ul, figure, fieldset { margin: 0; }
ol, ul { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.mono { font-family: var(--mono); font-size: 0.92em; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.strong { font-weight: 560; }
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--ring); }
input.vh:focus-visible + label { box-shadow: var(--ring); }
.ico { flex: none; width: 16px; height: 16px; }

/* ---------- band ---------- */
.band { display: flex; align-items: center; justify-content: center; height: 28px; font-size: 11px; font-weight: 560; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--line); background: var(--ground); position: relative; z-index: 45; }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { height: 28px; width: auto; flex: none; display: block; }
.brand-sub { font-size: 11px; font-weight: 560; color: var(--ink-2); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--r); border: 0; background: none;
  font-size: 14px; font-weight: 560; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--ease), box-shadow var(--ease), color var(--ease);
}
.btn-primary { background: var(--brit); color: #fff; box-shadow: 0 1px 1px rgb(15 23 42 / 0.08), inset 0 1px 0 rgb(255 255 255 / 0.18); }
.btn-primary:hover { background: #9F0D24; }
.btn-primary:focus-visible { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--brit); }
.btn-secondary { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgb(15 23 42 / 0.04), inset 0 0 0 1px #CBD5E1; }
.btn-secondary:hover { background: #F8FAFC; }
.btn-secondary:focus-visible { box-shadow: inset 0 0 0 1px var(--input), var(--ring); }
.btn-quiet { color: var(--ink-2); padding: 0 10px; }
.btn-quiet:hover { background: var(--hover); color: var(--ink); }
.btn[disabled], .btn[disabled]:hover { background: var(--disabled-bg); color: var(--disabled-ink); box-shadow: none; cursor: not-allowed; }
.btn-lg { height: 40px; padding: 0 16px; }
.btn-xl { height: 48px; padding: 0 18px; font-size: 15px; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 14px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--r); background: none; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--input); text-decoration-thickness: 1px; text-underline-offset: 3px; border-radius: 3px; }
.link:hover { text-decoration-color: var(--ink); }

.input { width: 100%; height: 36px; padding: 0 12px; border: 0; border-radius: 6px; background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgb(15 23 42 / 0.05), inset 0 0 0 1px #CBD5E1; font-size: 15px; transition: box-shadow var(--ease); }
textarea.input { height: auto; padding: 9px 12px; resize: vertical; line-height: 1.5; }
.input:hover { box-shadow: 0 1px 2px rgb(15 23 42 / 0.05), inset 0 0 0 1px #94A3B8; }
.input:focus, .input:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }
.input[readonly] { background: var(--ground); box-shadow: none; }
.input-xl { height: 48px; font-size: 16px; padding: 0 14px; }
textarea.input-xl { height: auto; padding: 12px 14px; }
select.input {
  appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%2363636A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.fld { display: grid; gap: 6px; margin-bottom: 18px; }
.fld > label, .fld > span:first-child { font-size: 14px; font-weight: 500; line-height: 24px; color: var(--ink); }
.fld-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.prefixed { display: flex; }
.prefixed > span { display: flex; align-items: center; padding: 0 12px; border-radius: var(--r) 0 0 var(--r); box-shadow: inset 0 0 0 1px var(--input); background: var(--ground); color: var(--muted); }
.prefixed .input { border-radius: 0 var(--r) var(--r) 0; margin-left: -1px; }
.err { display: flex; gap: 6px; align-items: flex-start; font-size: 14px; font-weight: 560; color: var(--ink); margin-top: 8px; }
.err .ico { margin-top: 3px; width: 14px; height: 14px; }

/* status words */
.mark { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); white-space: nowrap; }
.mark .ico { width: 14px; height: 14px; color: var(--muted); }
.mark-ok .ico { color: var(--ink); }
.mark-fail { font-weight: 600; }
.mark-fail .ico { color: var(--ink); }
.mark-quiet { color: var(--muted); }
.mark-gold, .mark-gold .ico { color: var(--gold); font-weight: 560; }
.conf { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.conf .ico { width: 12px; height: 12px; }
.conf .mono { font-family: var(--sans); font-size: 13px; }
.conf-high { color: var(--ink-2); }
.conf-low { color: var(--ink); font-weight: 600; }
.edited { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 560; color: var(--ink); }
.edited .ico { width: 8px; height: 8px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--ground); font-size: 12px; font-weight: 560; color: var(--ink-2); }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
.badge-ok { background: #ECFDF5; color: #047857; box-shadow: inset 0 0 0 1px rgb(5 150 105 / 0.22); }
.badge-wait { background: #FFFBEB; color: #B45309; box-shadow: inset 0 0 0 1px rgb(217 119 6 / 0.28); }
.badge-fix { background: #FFF1F2; color: #BE123C; box-shadow: inset 0 0 0 1px rgb(225 29 72 / 0.22); }
.badge-fail { background: #FFF1F2; color: #BE123C; box-shadow: inset 0 0 0 1px rgb(225 29 72 / 0.22); }
.badge-gold { background: #FFFBEB; color: #A16207; box-shadow: inset 0 0 0 1px rgb(161 98 7 / 0.22); }
.badge-info { background: #F0FDFA; color: #0F766E; box-shadow: inset 0 0 0 1px rgb(15 118 110 / 0.22); }
.badge-mute { background: #F8FAFC; color: #64748B; box-shadow: inset 0 0 0 1px rgb(15 23 42 / 0.08); }
.tag-ink { background: var(--ink); color: #fff; }
.warn { display: inline-flex; gap: 6px; align-items: center; font-weight: 560; }
.warn .ico { width: 14px; height: 14px; }
.blocked { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--ground); font-size: 14px; color: var(--ink-2); }
.blocked .ico { margin-top: 3px; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 0; }
.rail { display: flex; flex-direction: column; min-height: 0; padding: 16px 10px 14px; background: #F8FAFC; border-right: 1px solid var(--line); }
.rail-brand { flex: none; display: block; padding: 6px 10px 22px; text-decoration: none; border-radius: var(--r); }
.rail-brand .brand { flex-direction: column; align-items: flex-start; gap: 6px; }
.rail-brand .brand-mark { height: 32px; }
.rail-nav { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: 22px; padding: 2px; scrollbar-width: thin; }
.rail-group { display: grid; gap: 2px; }
.rail-label { margin: 0; padding: 0 12px 6px; font-size: 11px; font-weight: 560; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.rail-nav ul { display: grid; gap: 2px; }
.rail-nav a {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px 0 12px; border-radius: var(--r);
  text-decoration: none; font-size: 14px; color: var(--ink-2);
  transition: background-color var(--ease), color var(--ease), box-shadow var(--ease);
}
.rail-nav a:hover { background: var(--hover); color: var(--ink); }
.nav-ico { width: 18px; height: 18px; color: var(--muted); }
.nav-label { flex: 1; }
.nav-count { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); min-width: 18px; text-align: right; }
.rail-nav a[aria-current='page'] { background: var(--card); color: var(--ink); font-weight: 560; box-shadow: var(--lift); }
.rail-nav a[aria-current='page'] .nav-ico { color: var(--ink); }
.rail-nav a[aria-current='page']:focus-visible { box-shadow: var(--ring); }
.rail-foot { flex: none; padding: 16px 12px 0; font-size: 12px; color: var(--muted); }
.scrim-rail { display: none; }

.work { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { flex: none; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 var(--pad); position: relative; z-index: 20; min-width: 0; }
.top-portal { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto; }
.portal-name { font-size: 12px; font-weight: 560; color: var(--ink-2); letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account, .notices, .live-pill { flex: none; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; height: 18px; padding: 0 8px 0 7px; border-radius: 99px; background: #fff; color: var(--ink-2); font-size: 10px; font-weight: 560; letter-spacing: 0.08em; box-shadow: inset 0 0 0 1px var(--line); }
.live-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #059669; }
.rail-toggle { display: none; margin-left: -8px; }
.top-context { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-context a { color: var(--muted); text-decoration: none; border-radius: 3px; }
.top-context a:hover { color: var(--ink); }
.top-context .sep { margin: 0 8px; color: var(--input); }
.viewing { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--ink-2); padding-left: 12px; }
.account { position: relative; }
.account-btn { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 4px; border: 0; border-radius: var(--r); background: none; cursor: pointer; text-align: left; }
.account-btn:hover { background: var(--hover); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--card); box-shadow: var(--lift); font-size: 13px; font-weight: 600; color: var(--ink); }
.account-text { display: grid; line-height: 1.2; }
.account-name { font-size: 14px; font-weight: 560; }
.account-role { font-size: 12px; color: var(--muted); }
.menu { position: absolute; right: 0; top: calc(100% + 6px); width: 260px; padding: 6px; background: var(--card); border-radius: var(--r-card); box-shadow: var(--lift-hi); z-index: 30; }
.menu[hidden] { display: none; }
.menu-head { display: grid; gap: 1px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.menu-head strong { font-size: 14px; color: var(--ink); font-weight: 560; }
.menu a { display: flex; align-items: center; width: 100%; min-height: 36px; padding: 8px 10px; border-radius: var(--r); text-decoration: none; font-size: 14px; }
.menu a:hover { background: var(--hover); }
.notices { margin-left: 4px; }
.icon-btn { position: relative; }
.n-dot { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 10px; font-weight: 600; line-height: 16px; text-align: center; }
.notice-menu { width: 280px; }
.top-claim { flex: none; }
@media (max-width: 1280px) {
  .top-claim-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}

.scroller { position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scroll-padding-top: 56px; }
.scroller:focus-visible { box-shadow: none; }
.page { max-width: none; padding: 8px var(--pad) 48px; display: grid; gap: 16px; align-content: start; }
.page.narrow { max-width: 760px; }
.pinned { flex: none; background: var(--card); box-shadow: 0 -1px 0 var(--line); padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom)); }
.pinned-in { display: flex; align-items: center; gap: 12px; max-width: 1240px; }
.pinned-in.narrow { max-width: 696px; }
.bar-note { flex: 1; text-align: center; font-size: 14px; color: var(--muted); }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; padding-top: 4px; }
.page-head-text { min-width: 0; }
.title { font-family: var(--display); font-size: 26px; font-weight: 560; letter-spacing: -0.028em; line-height: 1.2; }
.sub { margin-top: 2px; color: var(--muted); font-size: 15px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar .filter .input { width: auto; min-width: 160px; }
.back { display: inline-flex; align-items: center; gap: 4px; justify-self: start; height: 32px; padding: 0 8px 0 4px; margin: 0 0 -12px -4px; border-radius: var(--r); font-size: 14px; color: var(--ink-2); text-decoration: none; }
.back:hover { background: var(--hover); color: var(--ink); }

.card { position: relative; background: var(--card); border-radius: var(--r-card); box-shadow: var(--lift); padding: 24px; min-width: 0; }
.card.flush { padding: 0; overflow: clip; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 4px 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card.flush > .card-head { padding: 18px 24px 0; margin-bottom: 8px; }
.card-head h2, .card-title { font-family: var(--display); font-size: 18px; font-weight: 560; letter-spacing: -0.02em; }
.card-title { margin-bottom: 4px; }
.card-note { margin-top: 12px; }
.card.flush .card-note { padding: 0 24px 16px; }
.card-foot { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.eyebrow { font-size: 13px; font-weight: 560; color: var(--muted); margin-bottom: 8px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }

.empty-card { display: grid; gap: 12px; justify-items: start; max-width: 620px; padding: 32px; margin-top: 24px; }
.lock-ring { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ground); color: var(--ink-2); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter .input { width: auto; min-width: 170px; }
.search { position: relative; flex: 0 1 340px; min-width: 240px; }
.search .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 36px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 10px; background: rgb(28 28 30 / 0.05); }
.seg a { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r); text-decoration: none; font-size: 14px; color: var(--ink-2); transition: background-color var(--ease), color var(--ease); }
.seg a:hover { color: var(--ink); }
.seg a[aria-selected='true'] { background: var(--card); color: var(--ink); font-weight: 560; box-shadow: var(--lift); }
.seg-n { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -8px; }
.chip-on { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 12px; border-radius: var(--r); background: var(--card); box-shadow: var(--lift); font-size: 14px; text-decoration: none; }
.chip-on .ico { width: 12px; height: 12px; color: var(--muted); }
.chip-on:hover .ico { color: var(--ink); }
.notice { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 16px 20px; }
.notice-title { font-weight: 560; }
.notice ul { margin-top: 6px; display: grid; gap: 2px; font-size: 14px; color: var(--ink-2); }

/* ---------- home ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px 48px; padding: 28px; }
.hero-main { align-self: start; }
.hero-num { font-family: var(--display); font-size: 48px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.05; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.today { display: grid; gap: 2px; margin: 0 -12px; }
.line { display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 8px 12px; border-radius: var(--r); text-decoration: none; transition: background-color var(--ease); }
a.line:hover { background: var(--hover); }
.line-n { min-width: 40px; font-size: 22px; font-weight: 500; text-align: right; }
.line-text { flex: 1; display: grid; line-height: 1.35; }
.line-label { font-weight: 560; }
.line-sub { font-size: 14px; color: var(--muted); }
.line-go { color: var(--muted); }
a.line:hover .line-go { color: var(--ink); }
.line-who { font-size: 13px; color: var(--muted); }
.path { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 0; padding-top: 20px; border-top: 1px solid var(--line); }
.path li { display: flex; align-items: baseline; gap: 6px; font-size: 14px; color: var(--ink-2); }
.path li + li::before { content: ''; width: 18px; height: 1px; margin: 0 10px; background: var(--input); align-self: center; }
.path-n { font-size: 15px; font-weight: 500; color: var(--ink); }
.rule-line { grid-column: 1 / -1; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); margin-top: -8px; }
.rule-line .ico { width: 14px; height: 14px; margin-top: 4px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 8px; gap: 0; }
.kpi { display: grid; align-content: center; gap: 2px; min-height: 76px; padding: 12px 16px; border-radius: 10px; text-decoration: none; }
a.kpi:hover { background: var(--hover); }
.kpi-l { font-size: 12px; color: var(--muted); }
.kpi-v { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.12; font-variant-numeric: tabular-nums; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi-block { display: grid; gap: 8px; }
.kpi-block > .eyebrow { margin: 4px 2px 0; }
.kpi-card { display: grid; gap: 4px; align-content: start; padding: 16px 18px; text-decoration: none; min-height: 112px; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgb(15 23 42 / 0.05), 0 0 0 1px rgb(15 23 42 / 0.05); }
a.kpi-card:hover { box-shadow: var(--lift-hi); }
.kpi-n { font-size: 12px; color: var(--muted); }
.kpi-trend { display: inline-flex; align-items: center; width: fit-content; height: 22px; margin-top: 6px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 560; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kpi-trend.up { background: #ECFDF5; color: #047857; }
.kpi-trend.dn { background: #FFF1F2; color: #BE123C; }
.board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.cols { display: flex; align-items: flex-end; gap: 10px; height: 148px; padding: 8px 4px 0; }
.cols > div { flex: 1; display: grid; justify-items: center; align-content: end; gap: 8px; }
.col { display: block; width: 100%; max-width: 36px; border-radius: 7px 7px 3px 3px; background: var(--chart-1); }
.col.c0 { background: linear-gradient(180deg, #5EEAD4, var(--chart-1)); }
.col.c1 { background: linear-gradient(180deg, #99F6E4, #0E7490); }
.col.c2 { background: linear-gradient(180deg, #FDE68A, var(--chart-2)); }
.col.c3 { background: linear-gradient(180deg, #FDBA74, var(--chart-3)); }
.col.c4 { background: linear-gradient(180deg, #BAE6FD, var(--chart-4)); }
.col.c5 { background: linear-gradient(180deg, #FDE68A, var(--gold)); }
.col-l { font-size: 11px; color: var(--muted); }
.hbar, .funnel, .mix { display: grid; gap: 10px; }
.hbar li, .funnel li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) 6.5em; gap: 10px; align-items: center; font-size: 13px; }
.mix li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; }
.mix .track { grid-column: 1 / -1; }
.track { display: block; height: 11px; background: var(--ground); border-radius: 99px; overflow: hidden; }
.fill { display: block; height: 100%; border-radius: 99px; background: var(--chart-1); }
.fill-s0 { background: var(--chart-1); }
.fill-s1 { background: var(--chart-2); }
.fill-s2 { background: var(--chart-3); }
.fill-s3 { background: var(--chart-4); }
.fill-s4 { background: var(--chart-5); }
.fill-s5 { background: var(--chart-6); }
.fill-s6 { background: var(--chart-4); }
.fill-s7 { background: var(--gold); }
.fill-p0 { background: var(--chart-4); }
.fill-p1 { background: var(--chart-1); }
.fill-p2 { background: var(--chart-2); }
.fill-p3 { background: var(--chart-3); }
.fill-p4 { background: var(--gold); }
.fill-p5 { background: var(--chart-5); }
.fill-p6 { background: var(--chart-5); }
.fill-failed { background: #BE123C; opacity: 1; }
.fill-claim { background: var(--chart-2); }
.fill-initiated { background: var(--chart-4); }
.fill-transferred { background: var(--chart-1); }
.directory .card-head { margin-bottom: 0; }
.member { display: grid; grid-template-columns: 40px minmax(220px, 1.4fr) minmax(160px, 1fr) 108px; gap: 16px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); }
.member.is-you { background: var(--ground); }
.member-name { font-weight: 560; letter-spacing: -0.01em; }
.member-mail, .member-region { margin-top: 1px; font-size: 13px; color: var(--muted); }
.member-role { font-weight: 560; }
.member-act { justify-self: end; }
.avatar.lg { width: 40px; height: 40px; font-size: 13px; }
.conns { display: grid; gap: 12px; }
.conn { display: grid; gap: 10px; }
.conn-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.conn-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.facts.tight > div { grid-template-columns: 7em minmax(0, 1fr); }
.drop { padding: 28px; }
.xgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.xcard { display: grid; gap: 4px; padding: 16px 18px; text-decoration: none; }
a.xcard:hover { box-shadow: var(--lift-hi); }
.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; }
.figures > div { padding: 18px 20px 20px; box-shadow: inset 1px 0 0 var(--line); }
.figures > div:first-child { box-shadow: none; }
.fig-n { font-family: var(--display); font-size: 28px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.split-2 { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 16px; align-items: start; }
.settings .acts { display: flex; justify-content: flex-end; margin-top: 8px; }
.rules { display: grid; gap: 0; }
.rules li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 8px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.rules li:first-child { border-top: 0; padding-top: 0; }
.rule-n { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 3px; }
.rules strong { font-weight: 560; }
.desk { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr); gap: 16px; align-items: start; }
.feed { display: grid; margin: 0; padding: 0; list-style: none; }
.feed li { display: grid; grid-template-columns: 6.6em minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.feed li:first-child { border-top: 0; padding-top: 0; }
.feed .when { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.feed .who { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; }
.feed .strong { font-weight: 500; }
.integ { display: grid; }
.integ > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.integ > div:first-child { border-top: 0; padding-top: 0; }
.integ h3 { font-size: 15px; font-weight: 560; }
.integ p { grid-column: 1; color: var(--ink-2); font-size: 14px; }
.integ .tag { grid-column: 2; grid-row: 1 / span 2; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; overscroll-behavior-x: contain; overscroll-behavior-y: auto; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl th { position: sticky; top: 0; z-index: 2; background: var(--card); text-align: left; font-size: 11px; font-weight: 560; color: var(--muted); padding: 0 12px; height: 34px; box-shadow: inset 0 -1px 0 var(--line); white-space: nowrap; letter-spacing: 0.02em; text-transform: uppercase; }
.tbl th.num, .tbl td.num { text-align: right; }
.tbl th.center, .tbl td.center { text-align: center; }
.tbl td { padding: 8px 12px; height: 40px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl th:first-child, .tbl td:first-child { padding-left: 20px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 20px; }
.tbl td.num { white-space: nowrap; }
.tbl .cell-sub, .cell-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.tbl tfoot td { border-top: 1px solid var(--line); border-bottom: 0; font-weight: 600; background: var(--card); }
.tbl-rows tbody tr[data-href] { cursor: pointer; transition: background-color var(--ease); }
.tbl-rows tbody tr[data-href]:hover { background: var(--hover); }
.tbl-rows tbody tr[data-href]:focus-visible { box-shadow: inset 0 0 0 2px var(--teal); }
.tbl tr.empty td { height: auto; padding: 40px 24px; text-align: center; color: var(--ink-2); }
.tbl tr.empty p { margin-bottom: 14px; }
.tbl th.wide { width: 40%; }
.th-sort { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0; border: 0; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.th-sort:hover { color: var(--ink); }
.tbl th.sorted .th-sort { color: var(--ink); }
.row-acts { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.tbl-rows .row-acts { opacity: 0.55; }
.tbl-rows tbody tr:hover .row-acts, .tbl-rows tbody tr:focus-within .row-acts { opacity: 1; }
.row-acts .btn-sm { height: 28px; padding: 0 8px; font-size: 12px; }
.matrix th[scope='row'] { position: static; height: auto; padding: 12px 20px; background: none; box-shadow: none; font-size: 14px; color: var(--ink); white-space: normal; letter-spacing: 0; text-transform: none; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.matrix th[scope='row'] .strong { font-weight: 560; letter-spacing: -0.011em; }
.matrix tr.grp th { height: auto; padding: 14px 20px 6px; background: var(--ground); border-bottom: 0; font-size: 11px; font-weight: 560; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.matrix td.col-you, .matrix th.col-you { background: rgb(15 23 42 / 0.025); }
.matrix thead th.col-you { box-shadow: inset 0 -2px 0 var(--ink); color: var(--ink); }
.matrix tbody tr:last-child th { border-bottom: 0; }
.legend { display: inline-flex; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend .cap { margin: 0; }
.cap { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; vertical-align: middle; }
.cap .ico { width: 14px; height: 14px; }
.cap-act { background: var(--ink); color: #fff; }
.cap-see { background: var(--ground); color: var(--ink-2); }
.cap-see .ico { width: 8px; height: 8px; }
.cap-none { color: var(--input); }

/* ---------- partner ---------- */
.facts { display: grid; }
.facts > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts dt { color: var(--muted); }
.facts dd { min-width: 0; overflow-wrap: anywhere; }
.shop { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 28px; align-items: start; }
.shop-photo { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r); overflow: hidden; background: var(--ground); cursor: zoom-in; }
.shop-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.shop-photo.empty { aspect-ratio: 4 / 3; display: grid; place-items: center; color: var(--muted); cursor: default; }
.steps { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.steps li { display: grid; gap: 2px; position: relative; padding-top: 30px; font-size: 13px; }
.steps li::before { content: ''; position: absolute; top: 11px; left: 26px; right: -4px; height: 1px; background: var(--line); }
.steps li:last-child::before { display: none; }
.step-dot { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ground); color: var(--muted); }
.step-dot .ico { width: 12px; height: 12px; }
.steps li:not(.done):not(.fail) .step-dot .ico { width: 6px; height: 6px; }
.steps li.done .step-dot { background: var(--ink); color: #fff; }
.steps li.fail .step-dot { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.step-l { font-weight: 560; color: var(--ink); line-height: 1.3; }
.steps li:not(.done) .step-l { color: var(--ink-2); font-weight: 400; }
.step-d { color: var(--muted); font-variant-numeric: tabular-nums; }
.steps li.fail .step-d { color: var(--ink); font-weight: 600; }

.doc-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.doc-row:first-of-type { border-top: 0; padding-top: 4px; }
.ocr-head { align-items: center; margin: 0; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.ocr-docs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.ocr-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; min-height: 640px; }
.ocr-view { display: grid; grid-template-rows: auto minmax(480px, 1fr) auto; background: #F8FAFC; min-height: 640px; }
.ocr-view-bar, .ocr-view-foot { display: flex; align-items: center; gap: 8px; padding: 10px 16px; }
.ocr-view-bar { justify-content: space-between; border-bottom: 1px solid var(--line); background: #fff; }
.ocr-doc-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.ocr-stage { overflow: auto; display: grid; place-items: center; padding: 28px 32px; min-height: 480px; }
.ocr-stage img { max-width: 100%; max-height: 640px; width: auto; object-fit: contain; transform: scale(var(--z, 1)); transform-origin: center; transition: transform 160ms ease-out; background: #fff; border-radius: 8px; box-shadow: var(--lift); }
.ocr-fields { padding: 22px 24px 28px; display: grid; gap: 14px; align-content: start; border-left: 1px solid var(--line); background: #fff; }
.ocr-fields .input { max-width: none; }
.cmp { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 13px; }
.cmp:first-of-type { border-top: 0; padding-top: 0; }
.cmp-k { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; font-weight: 560; color: var(--muted); }
.cmp-l { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; display: block; margin-bottom: 2px; }
.cmp-v { min-width: 0; overflow-wrap: anywhere; }
.cmp-v.ocr { color: var(--ink-2); }
.ocr-fields .cmp { grid-template-columns: none; }
.doc-thumb { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r); overflow: hidden; background: var(--ground); cursor: zoom-in; }
.doc-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; }
.doc-thumb.empty { aspect-ratio: 16 / 10; display: grid; place-items: center; font-size: 14px; color: var(--muted); cursor: default; }
.doc-read { display: grid; gap: 10px; align-content: start; min-width: 0; }
.doc-read .btn { justify-self: start; }
.doc-title { display: flex; align-items: center; gap: 10px; }
.doc-title h3 { font-size: 15px; font-weight: 600; }
.read { display: grid; }
.read > div { display: grid; grid-template-columns: 10em minmax(0, 1fr); gap: 4px 16px; padding: 6px 0; align-items: center; }
.read dt { color: var(--muted); font-size: 14px; }
.read dd { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-width: 0; }
.read dd .input { flex: 1 1 220px; max-width: 320px; }
.read-v { min-width: 0; overflow-wrap: anywhere; }
.read-meta { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.zoom { width: 100%; border-radius: var(--r); background: var(--ground); }
.checks { display: grid; gap: 6px; font-size: 14px; margin-bottom: 16px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); }
.checks .ico { margin-top: 3px; width: 14px; height: 14px; }
.checks li.warn { color: var(--ink); font-weight: 600; }
.acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.reason { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); background: var(--ground); font-size: 15px; margin-bottom: 14px; }
.reason .ico { margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 32px; padding: 6px 10px; border: 0; border-radius: var(--r); background: var(--ground); font-size: 13px; text-align: left; cursor: pointer; transition: background-color var(--ease); }
.chip[aria-current='true'] { background: var(--card); box-shadow: var(--lift); font-weight: 560; color: var(--ink); }
.chip:hover { background: #EAEAE6; }

/* ---------- register ---------- */
.reg { display: grid; gap: 20px; }
.stepper { display: flex; gap: 8px; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: var(--r); font-size: 14px; color: var(--muted); }
.stepper li.now { background: var(--card); color: var(--ink); font-weight: 560; box-shadow: var(--lift); }
.stepper li.done { color: var(--ink-2); }
.stepper-n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 600; box-shadow: inset 0 0 0 1px var(--input); }
.stepper-n .ico { width: 12px; height: 12px; }
.stepper li.now .stepper-n { background: var(--ink); color: #fff; box-shadow: none; }
.stepper li.done .stepper-n { background: #ECFDF5; color: #047857; box-shadow: inset 0 0 0 1px rgb(5 150 105 / 0.25); }
.form-card { padding: 28px; }
.form-card > .muted { margin-bottom: 12px; }
.reg { max-width: 1080px; margin-inline: auto; width: 100%; }
.reg-split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.sample { padding: 0; overflow: hidden; }
.sample img, .done-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--ground); }
.sample-body { display: grid; gap: 8px; padding: 16px 16px 18px; }
.sample-body .btn { justify-self: start; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choices legend { font-size: 14px; font-weight: 560; margin-bottom: 8px; padding: 0; }
.choice { position: relative; display: grid; gap: 2px; align-content: start; min-height: 80px; padding: 14px 14px 14px 44px; border-radius: 6px; background: #fff; box-shadow: 0 1px 2px rgb(15 23 42 / 0.04), inset 0 0 0 1px #CBD5E1; cursor: pointer; transition: box-shadow var(--ease); }
.choice:hover { box-shadow: 0 1px 2px rgb(15 23 42 / 0.04), inset 0 0 0 1px #94A3B8; }
.choice.on { box-shadow: inset 0 0 0 2px var(--ink); background: #fff; }
.choice input { position: absolute; left: 14px; top: 16px; width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.choice:has(input:focus-visible) { box-shadow: inset 0 0 0 2px var(--ink); }
.choice-t { font-weight: 600; }
.choice-s { font-size: 14px; color: var(--muted); }
.upload { display: grid; gap: 10px; margin-top: 12px; padding: 16px; border-radius: 12px; background: var(--ground); }
.upload-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.upload-head h3 { font-family: var(--display); font-size: 18px; font-weight: 560; }
.upload > label.btn { justify-self: start; }
.upload-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.upload-img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: var(--r); background: var(--ground); box-shadow: var(--lift); }
.upload-img.is-shop { object-fit: cover; }
.drop-zone { display: grid; gap: 4px; place-items: start; padding: 22px; border-radius: var(--r); background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.film { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.film img { width: 112px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--ground); flex: none; box-shadow: var(--lift); }
.done-photo { border-radius: 12px 12px 0 0; display: block; }
.done-card { padding: 0; overflow: hidden; }
.done-card .done-body { padding: 22px 24px 24px; display: grid; gap: 12px; }
.rb { display: grid; }
.rb-row { display: grid; gap: 4px; padding: 6px 0; }
.rb-row dt label { font-size: 13px; color: var(--muted); }
.rb-row dd { display: grid; gap: 4px; }
.edit-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 560; cursor: pointer; }
.edit-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.edit-toggle[hidden] { display: none; }
.consent { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 8px; padding: 16px; border-radius: var(--r); background: var(--ground); cursor: pointer; font-size: 16px; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); }
.consent:has(input:focus-visible) { box-shadow: var(--ring); }
.ref { font-size: 22px; font-weight: 500; margin-bottom: 8px; }
.form-card .facts { margin: 12px 0 16px; }

/* ---------- payouts ---------- */
.amount-block { display: grid; justify-items: end; gap: 4px; }
.amount { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.chain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-bottom: 20px; }
.stage { display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: auto auto; gap: 2px 12px; position: relative; padding-right: 16px; }
.stage::after { content: ''; position: absolute; top: 14px; left: 40px; right: 12px; height: 1px; background: var(--line); }
.stage:last-child::after { display: none; }
.stage-mark { grid-row: 1 / 3; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ground); color: var(--muted); position: relative; z-index: 1; }
.stage-mark .ico { width: 14px; height: 14px; }
.stage-name { display: inline-flex; align-items: center; gap: 8px; padding-top: 3px; font-weight: 600; background: var(--card); position: relative; z-index: 1; justify-self: start; padding-right: 10px; }
.stage-n { font-size: 13px; font-weight: 500; color: var(--muted); }
.stage-text { font-size: 14px; color: var(--muted); }
.stage.dark .stage-name { color: var(--muted); font-weight: 500; }
.stage.lit .stage-mark { background: var(--ink); color: #fff; box-shadow: 0 0 0 3px rgb(15 23 42 / 0.06); }
.stage.lit::after { background: var(--ink); }
.stage.wait .stage-mark { background: var(--ink); color: #fff; box-shadow: 0 0 0 4px rgb(15 23 42 / 0.08); animation: node-pulse 1.8s ease-out infinite; }
@keyframes node-pulse { 50% { box-shadow: 0 0 0 7px rgb(15 23 42 / 0.04); } }
.stage.fail .stage-mark { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.stage.fail .stage-text { color: var(--ink); font-weight: 600; }
.record { display: grid; }
.record > div { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.record > div:first-child { border-top: 0; padding-top: 0; }
.record dt { display: inline-flex; gap: 8px; align-items: center; align-self: start; color: var(--ink-2); }
.record dt .ico { color: var(--muted); }
.record dd { min-width: 0; overflow-wrap: anywhere; }
.record .is-off, .record .is-off dt { color: var(--muted); }
.sms { display: block; margin: 6px 0; padding: 8px 10px; border-radius: var(--r); background: var(--ground); font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.sig-img { max-width: 200px; max-height: 64px; object-fit: contain; object-position: left; margin-bottom: 2px; }
.reveal { animation: rise 160ms ease-out both; animation-delay: var(--d, 0ms); }
@keyframes rise { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.settings { max-width: 640px; }
.settings .fld > span.muted { font-weight: 400; }

/* ---------- sign in ---------- */
.bare { display: flex; flex-direction: column; min-height: 0; }
.bare-page { padding: 48px 16px 40px; display: grid; place-items: center; min-height: 100%; }
.signin { display: grid; justify-items: center; gap: 16px; width: min(420px, 100%); }
.signin-card { width: 100%; display: grid; gap: 20px; padding: 36px 32px 28px; }
.signin-brand { display: grid; gap: 8px; justify-items: start; }
.signin-logo { height: 40px; width: auto; display: block; }
.signin-product { font-size: 12px; font-weight: 560; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.signin-copy .title { font-size: 28px; }
.signin-copy .sub { margin-top: 4px; }
.signin-card form { display: grid; gap: 0; }
.signin-card form .btn { margin-top: 8px; }
.signin-card .err { margin: 0 0 12px; }
.signin-card .err[hidden] { display: none; }
.signin-roles { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.role-list { display: grid; gap: 2px; margin: 0 -10px; }
.role-in { display: grid; gap: 0; min-height: 48px; padding: 6px 10px; border: 0; border-radius: var(--r); background: none; text-align: left; cursor: pointer; transition: background-color var(--ease); }
.role-in:hover { background: var(--hover); }
.role-name { font-weight: 560; }
.role-in .muted { font-size: 13px; }
.signin-foot { font-size: 12px; color: var(--muted); }

/* ---------- sheets + toast ---------- */
.layer { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.scrim { position: absolute; inset: 0; background: rgb(28 28 30 / 0.28); animation: fade 160ms ease-out; }
.panel { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--card); border-radius: var(--r-card); box-shadow: var(--lift-hi); animation: rise 160ms ease-out; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 16px 0 24px; }
.panel-head h2 { font-size: 17px; font-weight: 600; }
.panel-body { display: grid; gap: 14px; padding: 12px 24px 8px; }
.panel-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px 22px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
#toast { position: fixed; left: 50%; bottom: 24px; z-index: 70; transform: translate(-50%, 8px); max-width: calc(100% - 32px); padding: 10px 16px; border-radius: var(--r); background: var(--ink); color: #fff; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity var(--ease), transform var(--ease); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.skel-cover { position: absolute; inset: 0; z-index: 4; background: var(--ground); padding: 8px var(--pad) 32px; display: grid; gap: 16px; align-content: start; }
.skel-cover.out { opacity: 0; transition: opacity 160ms ease-out; }
.skel { display: block; border-radius: 8px; background: linear-gradient(90deg, #ECEEF1 25%, #F8F9FB 37%, #ECEEF1 63%); background-size: 400% 100%; animation: shimmer 1.15s ease infinite; }
.skel-title { width: 180px; height: 28px; }
.skel-row { height: 88px; border-radius: 12px; }
.skel-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
html[data-shell='console'] #toast { bottom: 88px; }

/* ---------- claim + invoice ---------- */
.doc { max-width: 680px; margin: 0 auto; display: grid; gap: 20px; padding: clamp(24px, 5vw, 48px); background: var(--card); border-radius: var(--r-card); box-shadow: var(--lift); }
.doc.narrow { max-width: 560px; }
.bare-pinned .pinned-in { max-width: 680px; margin: 0 auto; }
.bare-pinned .bar-note { text-align: left; color: var(--ink-2); }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.doc-head-r { display: grid; justify-items: end; gap: 1px; font-size: 14px; text-align: right; }
.doc-h { font-size: 22px; font-weight: 560; letter-spacing: -0.011em; }
.salute { font-size: 17px; font-weight: 560; }
.doc-amount { display: grid; gap: 2px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.doc-amount .amount { font-size: clamp(32px, 8vw, 40px); }
.doc-state { display: grid; gap: 6px; padding: 16px; border-radius: var(--r); background: var(--ground); }
.doc-sec { display: grid; gap: 10px; }
.doc-sec .facts > div:first-child { border-top: 1px solid var(--line); padding-top: 9px; }
.doc .eyebrow { margin-bottom: 0; }
.lines { width: 100%; border-collapse: collapse; font-size: 14px; }
.lines th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--ink); }
.lines td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines td:nth-child(2), .lines th:nth-child(2) { width: 5.5em; padding-left: 12px; }
.lines .num, .lines th.num { text-align: right; padding-left: 12px; }
.lines tr.tax td { color: var(--ink-2); }
.lines tfoot td { border-top: 1px solid var(--ink); border-bottom: 0; font-weight: 600; font-size: 16px; padding-top: 12px; }
.sig { position: relative; height: 180px; border-radius: var(--r); background: var(--ground); box-shadow: inset 0 0 0 1px var(--input); }
.sig canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; z-index: 1; border-radius: var(--r); }
.sig canvas:focus-visible { box-shadow: var(--ring); }
.sig-line { position: absolute; left: 20px; right: 20px; bottom: 44px; height: 1px; background: var(--input); }
.sig-hint { position: absolute; left: 20px; bottom: 16px; font-size: 14px; color: var(--muted); pointer-events: none; }
.sig-hint[hidden] { display: none; }
.sig-acts { display: flex; justify-content: flex-end; }
.sig-acts .btn { height: 40px; }
.consent-line { padding: 12px 14px; border-radius: var(--r); background: var(--ground); font-size: 14px; color: var(--ink-2); }
.doc-tools { max-width: 680px; margin: 0 auto 16px; display: flex; justify-content: flex-end; }
.lock { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ground); }
.rule { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 14px; color: var(--ink-2); }
.rule li + li::before { content: '→'; margin-right: 10px; color: var(--muted); }
.invoice { gap: 22px; }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.inv-title { display: grid; justify-items: end; gap: 4px; }
.inv-title h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.015em; }
.is-bos .inv-title h1 { font-weight: 500; }
.bos-flag { padding: 10px 14px; border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--input); font-size: 14px; font-weight: 560; }
.inv-meta { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.inv-meta dt { font-size: 12px; color: var(--muted); }
.parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; font-size: 14px; }
.parties section { display: grid; gap: 2px; align-content: start; }
.party { font-weight: 600; font-size: 15px; }
.words { font-size: 14px; color: var(--ink-2); }
.declare { padding: 12px 14px; border-radius: var(--r); background: var(--ground); font-size: 14px; }
.inv-foot { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.inv-foot section { display: grid; gap: 2px; }
.inv-sign { justify-items: end; text-align: right; }
.inv-sign .sig-img { object-position: right; }
.inv-ledger { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .two, .desk, .kpis, .board, .kpi-grid, .xgrid, .ocr-split, .split-2 { grid-template-columns: minmax(0, 1fr); }
  .kpis, .kpi-grid, .xgrid, .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figures > div:nth-child(odd) { box-shadow: none; }
  .figures > div:nth-child(even) { box-shadow: inset 1px 0 0 var(--line); }
  .figures > div:nth-child(n+3) { box-shadow: inset 0 1px 0 var(--line); }
  .figures > div:nth-child(even):nth-child(n+3) { box-shadow: inset 1px 0 0 var(--line), inset 0 1px 0 var(--line); }
  .ocr-split { min-height: 0; }
  .ocr-view, .ocr-stage { min-height: 420px; }
  .ocr-stage img { max-height: 480px; }
  .shop { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 16px; }
  .steps li:nth-child(4)::before { display: none; }
}

@media (max-width: 960px) {
  :root { --pad: 20px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; top: 28px; left: 0; bottom: 0; width: min(288px, 86vw); z-index: 50; box-shadow: var(--lift-hi); transform: translateX(-104%); transition: transform var(--ease); }
  .rail-open .rail { transform: none; }
  .rail-open .scrim-rail { display: block; position: fixed; inset: 28px 0 0; z-index: 49; background: rgb(28 28 30 / 0.28); }
  .rail-toggle { display: inline-grid; }
  .shop, .upload-body, .reg-split { grid-template-columns: minmax(0, 1fr); }
  .shop-photo { max-width: 420px; }
}

@media (max-width: 720px) {
  :root { --pad: 16px; }
  .account-text, .viewing span, .portal-name { display: none; }
  .top { gap: 6px; }
  .page { gap: 16px; padding-bottom: 32px; }
  .card { padding: 18px; }
  .card.flush > .card-head { padding: 16px 18px 0; }
  .form-card { padding: 18px; }
  .title { font-size: 20px; }
  .page-head .toolbar { width: 100%; }
  .filters > *, .toolbar > * { flex: 1 1 100%; }
  .path { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
  .path li + li::before { display: none; }
  .toolbar .filter .input, .filter .input { width: 100%; min-width: 0; }
  .search { min-width: 0; }
  .seg { width: 100%; }
  .hero { padding: 20px; }
  .hero-num { font-size: 34px; }
  .kpi-grid, .xgrid, .board { grid-template-columns: minmax(0, 1fr); }
  .facts > div, .record > div, .read > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .doc-row, .upload-body { grid-template-columns: minmax(0, 1fr); }
  .doc-thumb, .upload-img { max-width: 320px; }
  .fld-2, .choices { grid-template-columns: minmax(0, 1fr); }
  .stepper li { padding: 0 8px; gap: 6px; }
  .stepper li:not(.now) span:last-child { display: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps li::before { display: none; }
  .chain { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .stage::after { display: none; }
  .amount-block { justify-items: start; }
  .bar-note:empty, .pinned-in .bar-note { display: none; }
  .pinned-in .btn { flex: 1; }
  .bare-pinned .bar-note { display: block; flex: 1 1 auto; }
  .bare-pinned .btn { flex: 0 0 auto; }
  .bare-page { padding: 16px 12px 24px; }
  .doc { padding: 20px; }
  .doc-head { flex-direction: column; }
  .doc-head-r { justify-items: start; text-align: left; }
  .parties, .inv-foot { grid-template-columns: minmax(0, 1fr); }
  .inv-meta { grid-template-columns: 1fr 1fr; }
  .inv-sign { justify-items: start; text-align: left; }
  .panel-foot .btn { flex: 1; }

  .tbl thead th { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; }
  .tbl, .tbl tbody, .tbl tfoot, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 12px 18px; border-bottom: 1px solid var(--line); }
  .tbl tbody tr:last-child { border-bottom: 0; }
  .tbl td, .tbl th:first-child, .tbl td:first-child, .tbl td:last-child { height: auto; padding: 3px 0; border: 0; text-align: left; }
  .tbl td.num { text-align: left; }
  .tbl td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); }
  .tbl td[data-label='']::before { display: none; }
  .tbl tfoot tr { border-top: 1px solid var(--line); }
  .tbl tfoot td { border: 0; }
  .tbl tr.empty td { padding: 24px 0; text-align: center; }
  .member { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .member-post { grid-column: 2; }
  .member-act { grid-column: 3; grid-row: 1 / span 2; }
  .matrix th[scope='row'] { display: block; padding: 0 0 6px; border: 0; }
  .matrix tr { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .matrix tr th[scope='row'] { grid-column: 1 / -1; }
  .matrix tr.grp { display: block; padding: 12px 0 0; border: 0; }
  .matrix tr.grp th { display: block; padding: 8px 0 2px; }
  .matrix td.center { text-align: center; font-size: 11px; }
  .matrix td[data-label]::before { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
}

@media print {
  @page { margin: 14mm; }
  html, body, #app, .bare, .scroller { height: auto !important; overflow: visible !important; display: block !important; }
  body { background: #fff; }
  body * { visibility: hidden; }
  .invoice, .invoice * { visibility: visible; }
  .invoice { position: absolute; left: 0; top: 0; width: 100%; max-width: none; margin: 0; padding: 0; box-shadow: none; border-radius: 0; }
  #toast, .layer { display: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
