/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/font/schibsted-grotesk-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/font/schibsted-grotesk-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/font/schibsted-grotesk-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 800; font-display: swap; src: url(/static/font/schibsted-grotesk-latin-800-normal.woff2) format('woff2'); }

/* ---------- Tokens ---------- */
:root {
  --chalk: #F3F5F2;      /* page */
  --paper: #FFFFFF;      /* raised surfaces */
  --ink: #1D2B36;        /* text, meter cells */
  --ink-2: #4E5D68;      /* secondary text */
  --ink-3: #7C8A93;      /* muted */
  --line: #D9DFDA;
  --line-2: #E8ECE8;
  --green: #0F7B5F;      /* ledger green: primary actions, credits */
  --green-ink: #0A5C47;
  --green-wash: #E3F1EC;
  --marigold: #F2A900;   /* rewards, paise wheels */
  --marigold-wash: #FFF4D6;
  --brick: #C2412D;      /* errors, debits */
  --brick-wash: #FBE9E5;

  --r-lg: 14px;
  --r-md: 8px;
  --r-sm: 5px;

  --font: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: 2.125rem;
  --step-4: clamp(2.375rem, 6vw, 3.75rem);

  --gutter: 16px;
  --max: 1080px;
  --tabbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.5;
  color: var(--ink);
  background: var(--chalk);
}
/* Tabular figures only where numbers line up; on body text they'd make punctuation fixed-width too. */
.count { font-variant-numeric: tabular-nums; }
img { max-width: 100%; display: block; }
a { color: var(--green-ink); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: var(--step-3); font-weight: 800; }
h2 { font-size: var(--step-1); font-weight: 600; }
h3 { font-size: var(--step-0); font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; border-radius: 3px; }
.muted { color: var(--ink-3); }
.h2 { font-size: var(--step-1); font-weight: 600; }
.small { font-size: var(--step--1); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.credit { color: var(--green); }
.debit { color: var(--brick); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.stack > * + * { margin-top: 24px; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  font: inherit; font-weight: 600; font-size: var(--step-0);
  border-radius: var(--r-md); border: 1px solid transparent;
  background: var(--green); color: #fff; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--green-ink); color: #fff; }
.btn-quiet { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { background: var(--line-2); color: var(--ink); }
.btn-danger { background: var(--paper); color: var(--brick); border-color: #E7B9B0; }
.btn-danger:hover { background: var(--brick-wash); color: var(--brick); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: var(--step--1); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--green-ink); text-decoration: underline; cursor: pointer; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 600; font-size: var(--step--1); margin-bottom: 6px; }
.field small { display: block; color: var(--ink-3); font-size: var(--step--1); margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-wash); }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--green); flex: none; }
.grid-2 { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
fieldset { border: 0; padding: 0; margin: 0; }

/* ---------- Notices ---------- */
.notice { padding: 12px 14px; border-radius: var(--r-md); border-left: 4px solid; margin-bottom: 20px; background: var(--paper); }
.notice-success { border-color: var(--green); background: var(--green-wash); }
.notice-error { border-color: var(--brick); background: var(--brick-wash); }
.notice-info { border-color: var(--marigold); background: var(--marigold-wash); }

/* ---------- The meter (signature element) ---------- */
.meter { display: inline-flex; align-items: center; gap: 3px; line-height: 1; }
.meter .sym { font-weight: 600; font-size: 1.6em; margin-right: 6px; color: var(--ink); }
.meter .cell {
  display: inline-block; width: 1.05em; height: 1.45em; overflow: hidden;
  background: var(--ink); color: #fff; border-radius: 4px;
  font-weight: 600; font-size: 2.1em; text-align: center; position: relative;
  box-shadow: inset 0 -.32em .4em -.3em rgba(0,0,0,.55), inset 0 .32em .4em -.3em rgba(0,0,0,.55);
}
.meter .cell.lead { color: #55656F; }
.meter .cell.frac { background: var(--marigold); color: var(--ink); }
.meter .reel { display: block; transition: transform 1.1s cubic-bezier(.2,.75,.25,1); }
.meter .reel span { display: block; height: 1.45em; line-height: 1.45em; }
.meter .dot { font-size: 2.1em; font-weight: 800; color: var(--ink); width: .3em; text-align: center; }
.meter-sm { font-size: .55rem; }
.meter-md { font-size: .8rem; }
@media (min-width: 640px) { .meter-md { font-size: 1rem; } }
@media (prefers-reduced-motion: reduce) { .meter .reel { transition: none; } }

/* ---------- Public header / landing ---------- */
.site-head { border-bottom: 1px solid var(--line); background: var(--chalk); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: var(--step-1); color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; background: var(--ink); display: grid; place-items: center; }
.brand-mark i { width: 10px; height: 10px; border-radius: 2px; background: var(--marigold); }
.site-head nav { display: flex; gap: 8px; align-items: center; }

.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; gap: 40px; align-items: center; }
@media (min-width: 880px) { .hero .wrap { grid-template-columns: 1.15fr 1fr; } .hero { padding: 88px 0 72px; } }
.hero h1 { font-size: var(--step-4); max-width: 13ch; letter-spacing: -0.03em; margin-bottom: 18px; }
.hero p.lede { font-size: var(--step-1); color: var(--ink-2); max-width: 46ch; margin-bottom: 28px; }
.hero-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 24px; }
.hero-panel .label { color: var(--ink-2); font-weight: 600; margin-bottom: 16px; }
.hero-panel dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line-2); }
.hero-panel dt { color: var(--ink-3); font-size: var(--step--1); }
.hero-panel dd { margin: 0; font-weight: 600; font-size: var(--step-1); }

.steps { padding: 48px 0 64px; border-top: 1px solid var(--line); }
.steps ol { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 28px; counter-reset: s; }
@media (min-width: 760px) { .steps ol { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; padding-top: 16px; border-top: 3px solid var(--ink); }
.steps li::before { content: counter(s); display: block; font-weight: 800; font-size: var(--step-2); margin-bottom: 6px; }
.steps li p { color: var(--ink-2); margin: 0; }
.site-foot { border-top: 1px solid var(--line); padding: 24px 0 32px; color: var(--ink-3); font-size: var(--step--1); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-foot a { color: var(--ink-2); }

/* ---------- Auth ---------- */
.auth { max-width: 420px; margin: 40px auto 64px; }
.auth-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 22px; }
.auth h1 { font-size: var(--step-2); }
.auth.wide { max-width: 680px; }
.auth ol { padding-left: 1.2em; }
.auth ol li { padding-left: .3em; }
.auth .below { margin-top: 18px; text-align: center; color: var(--ink-2); }

/* ---------- Member app shell ---------- */
.app-head { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.app-head .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.app-nav { display: none; gap: 4px; }
.app-nav a { padding: 8px 12px; border-radius: var(--r-md); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.app-nav a:hover { background: var(--line-2); color: var(--ink); }
.app-nav a[aria-current=page] { color: var(--ink); background: var(--chalk); font-weight: 600; }
.head-balance { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.head-balance .pill { padding: 6px 12px; border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none; }
.head-balance .pill:hover { color: #fff; background: #2B3D4A; }
.app-main { padding: 28px 0 calc(var(--tabbar-h) + 32px); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: var(--tabbar-h);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--paper); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; color: var(--ink-3); text-decoration: none; font-weight: 500; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a[aria-current=page] { color: var(--ink); font-weight: 600; }
.tabbar a[aria-current=page] svg { color: var(--green); }
@media (min-width: 820px) {
  .app-nav { display: flex; }
  .tabbar { display: none; }
  .app-main { padding-bottom: 64px; }
}
.page-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 20px; }
.page-title h1 { font-size: var(--step-2); margin: 0; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 20px; }
.panel-flat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); }
.panel h2 { margin-bottom: 14px; }

.balance-panel { display: grid; gap: 22px; }
@media (min-width: 820px) { .balance-panel { grid-template-columns: auto 1fr; align-items: end; column-gap: 40px; } }
.balance-panel .label { color: var(--ink-2); font-weight: 600; margin-bottom: 12px; }
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.figures dt { color: var(--ink-3); font-size: var(--step--1); }
.figures dd { margin: 2px 0 0; font-weight: 600; font-size: var(--step-0); }
@media (min-width: 640px) { .figures dd { font-size: var(--step-1); } }
.balance-actions { grid-column: 1 / -1; }

.today { display: grid; gap: 8px; }
.today-line { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.track { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.track > i { display: block; height: 100%; background: var(--green); border-radius: 99px; }

/* ---------- Ad list ---------- */
.ad-list { list-style: none; margin: 0; padding: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.ad-list li + li { border-top: 1px solid var(--line-2); }
.ad-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 16px 18px; color: inherit; text-decoration: none; }
a.ad-row:hover { background: #FAFBF9; color: inherit; }
a.ad-row:hover .go { background: var(--green-ink); }
.ad-row .t { font-weight: 600; }
.ad-row .d { grid-column: 1; color: var(--ink-3); font-size: var(--step--1); }
.ad-row .side { grid-row: 1 / span 2; grid-column: 2; display: flex; align-items: center; gap: 12px; }
.reward { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--marigold-wash); color: #6B4A00; font-weight: 600; white-space: nowrap; border: 1px solid #F4D27A; }
.go { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--r-md); background: var(--green); color: #fff; font-weight: 600; font-size: var(--step--1); }
.ad-list.waiting .ad-row { color: var(--ink-3); }
.ad-list.waiting .t { font-weight: 500; }
.when { font-size: var(--step--1); white-space: nowrap; }
@media (max-width: 520px) { .go { display: none; } }

.empty { text-align: left; padding: 28px 22px; background: var(--paper); border: 1px dashed var(--line); border-radius: var(--r-lg); }
.empty p:last-child { margin-bottom: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-weight: 600; font-size: var(--step--1); color: var(--ink-2); background: #FAFBF9; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.tag-green { background: var(--green-wash); color: var(--green-ink); }
.tag-amber { background: var(--marigold-wash); color: #6B4A00; }
.tag-red { background: var(--brick-wash); color: var(--brick); }

.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 14px; }

/* stacked "cards" for tables on small screens */
@media (max-width: 640px) {
  table.stack-sm thead { display: none; }
  table.stack-sm tr { display: block; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
  table.stack-sm tr:last-child { border-bottom: 0; }
  table.stack-sm td { display: grid; grid-template-columns: minmax(84px, 34%) 1fr; column-gap: 14px; padding: 4px 0; border: 0; text-align: right; justify-items: end; }
  table.stack-sm td::before { content: attr(data-l); grid-row: 1 / span 12; justify-self: start; color: var(--ink-3); font-size: var(--step--1); text-align: left; padding-top: 2px; }
  table.stack-sm td > * { grid-column: 2; max-width: 100%; }
  table.stack-sm td .actions { justify-content: flex-end; }
}

/* ---------- Withdraw ---------- */
.methods { display: grid; gap: 10px; margin-bottom: 18px; }
.method { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); cursor: pointer; }
.method input { grid-row: span 2; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--green); }
.method b { font-weight: 600; }
.method span { color: var(--ink-3); font-size: var(--step--1); }
.method:has(input:checked) { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-wash); }
.receive { padding: 12px 14px; background: var(--chalk); border-radius: var(--r-md); margin-bottom: 16px; display: flex; justify-content: space-between; gap: 12px; }
.two-col { display: grid; gap: 24px; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; } }

.copy-row { display: flex; gap: 8px; }
.copy-row input { font-size: var(--step--1); }

/* ---------- Ad viewer ---------- */
body.viewer { background: var(--ink); height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.v-bar { background: var(--paper); border-bottom: 1px solid var(--line); flex: none; position: relative; z-index: 5; }
.v-bar .row { display: flex; align-items: center; gap: 12px; padding: 10px var(--gutter); min-height: 56px; }
.v-bar .leave { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: var(--step--1); white-space: nowrap; }
.v-bar .title { flex: 1; min-width: 0; }
.v-bar .title b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-bar .title span { display: block; font-size: var(--step--1); color: var(--ink-3); }
.v-bar .title span.paused { color: var(--brick); font-weight: 600; }
.v-bar .count { font-weight: 800; font-size: var(--step-2); min-width: 3ch; text-align: right; }
.v-track { height: 4px; background: var(--line-2); }
.v-track i { display: block; height: 100%; width: 0; background: var(--marigold); }
.v-stage { flex: 1; position: relative; background: #fff; min-height: 0; }
.v-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.v-stage.center { display: grid; place-items: center; background: var(--chalk); padding: 24px var(--gutter); overflow: auto; }
.v-stage .yt { width: min(100%, 960px); aspect-ratio: 16/9; position: relative; }
.v-stage .yt iframe { position: absolute; inset: 0; }
.v-stage .banner { max-width: min(100%, 900px); }
.v-stage .banner img { border-radius: var(--r-md); border: 1px solid var(--line); }
.v-window { max-width: 420px; }
.gad { display: grid; justify-items: center; gap: 10px; text-align: center; max-width: 100%; }
.gad-slot { background: var(--paper); border: 1px dashed var(--line); max-width: 100%; }
.gad-adsense { width: min(100%, 728px); }
.gad-slot-fluid { width: 100%; min-height: 250px; }
.gad-note { max-width: 420px; margin: 0; }
.gad-note.warn { color: var(--brick); }
.v-fallback { position: absolute; right: 12px; bottom: 12px; z-index: 3; }

.claim { position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px -12px rgba(29,43,54,.35); padding: 18px var(--gutter) 20px; }
.claim[hidden] { display: none; }
.claim .inner { max-width: 560px; margin: 0 auto; }
.claim form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.claim .q { font-size: var(--step-1); font-weight: 600; margin-bottom: 10px; }
.claim input { max-width: 120px; font-size: var(--step-1); text-align: center; }
.claim .msg { margin: 10px 0 0; font-size: var(--step--1); }
.claim .msg.err { color: var(--brick); }
.claim.done .q { color: var(--green-ink); }
@media (prefers-reduced-motion: no-preference) {
  .claim:not([hidden]) { animation: drop .28s ease-out; }
  @keyframes drop { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---------- Admin ---------- */
body.admin { background: #EEF1EE; }
.admin-shell { display: grid; min-height: 100dvh; grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
.admin-side { background: var(--ink); color: #C9D3D9; padding: 14px var(--gutter); }
.admin-side .brand { color: #fff; font-size: var(--step-0); }
.admin-side .brand-mark { background: #2C3E4C; }
.admin-side nav { display: none; margin-top: 14px; }
.admin-side nav.open { display: block; }
.admin-side nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: var(--r-md); color: #C9D3D9; text-decoration: none; font-weight: 500; }
.admin-side nav a:hover { background: #2A3B48; color: #fff; }
.admin-side nav a[aria-current=page] { background: #2F4352; color: #fff; }
.admin-side nav .count { background: var(--marigold); color: var(--ink); border-radius: 99px; padding: 0 7px; font-size: 12px; font-weight: 700; }
.admin-side nav hr { border: 0; border-top: 1px solid #33475A; margin: 10px 0; }
.admin-side nav .link-btn { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: var(--r-md); color: #C9D3D9; text-decoration: none; font-weight: 500; }
.admin-side nav .link-btn:hover { background: #2A3B48; color: #fff; }
.admin-side .top { display: flex; justify-content: space-between; align-items: center; }
.menu-btn { background: #2A3B48; color: #fff; border: 0; border-radius: var(--r-md); padding: 8px 12px; font: inherit; font-weight: 600; }
.admin-main { padding: 24px var(--gutter) 64px; min-width: 0; }
.admin-main .inner { max-width: 1120px; }
@media (min-width: 960px) {
  .admin-shell { grid-template-columns: 236px 1fr; grid-template-rows: 1fr; background: linear-gradient(to right, var(--ink) 236px, transparent 236px); }
  .admin-side { padding: 20px 14px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
  .admin-side nav { display: block; margin-top: 24px; }
  .menu-btn { display: none; }
  .admin-main { padding: 32px 36px 64px; }
}
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 24px; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpis div { background: var(--paper); padding: 16px 18px; }
.kpis dt { color: var(--ink-3); font-size: var(--step--1); }
.kpis dd { margin: 4px 0 0; font-size: var(--step-2); font-weight: 700; }
.kpis dd small { display: block; font-size: var(--step--1); font-weight: 500; color: var(--ink-3); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.filters input[type=search] { max-width: 320px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--paper); }
.seg a { padding: 7px 14px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: var(--step--1); }
.seg a + a { border-left: 1px solid var(--line); }
.seg a[aria-current=page] { background: var(--ink); color: #fff; }
.inline-form { display: inline; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.details-list { margin: 0; padding: 0; list-style: none; font-size: var(--step--1); }
.details-list b { font-weight: 600; }
.form-panel { max-width: 760px; }
.section-gap { margin-top: 28px; }
details.inline summary { cursor: pointer; color: var(--green-ink); font-weight: 600; font-size: var(--step--1); }
details.inline[open] summary { margin-bottom: 8px; }
details.inline form { display: grid; gap: 8px; min-width: 220px; }

/* chart */
.chart-box { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .bar { fill: var(--green); }
.chart .col .hit { fill: transparent; }
.chart .col:hover .bar, .chart .col.on .bar { fill: var(--green-ink); }
.chart .col:hover .hit, .chart .col.on .hit { fill: rgba(29,43,54,.04); }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .axis.base { stroke: var(--line); }
.chart .tip { position: absolute; pointer-events: none; transform: translate(-50%, -100%); margin-top: -8px; background: var(--ink); color: #fff; font-size: var(--step--1); font-weight: 600; padding: 5px 9px; border-radius: var(--r-sm); white-space: nowrap; }
.chart .lbl { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.chart .val { fill: var(--ink-2); font-size: 11px; font-family: var(--font); font-weight: 600; }
