:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.10);
  --wash: rgba(11, 11, 11, 0.04);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --s5: #e87ba4; --s6: #008300; --s7: #4a3aa7; --s8: #e34948;
  --other: #b5b3ab;
  --unattributed: #d6d4cc;
  --seq-0: #f0efec; --seq-1: #cde2fb; --seq-2: #86b6ef; --seq-3: #3987e5; --seq-4: #1c5cab; --seq-5: #0d366b;
  --good: #0ca30c; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b;
  --good-text: #006300; --critical-text: #b42323;
  --radius: 10px;
  --tip-bg: #1f1f1e; --tip-ink: #f4f3ef; --tip-muted: #b5b3ab; --tip-line: rgba(255, 255, 255, 0.10); --tip-code: rgba(255, 255, 255, 0.10);
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --ink: #ffffff; --ink-2: #c3c2b7; --muted: #898781;
    --grid: #2c2c2a; --axis: #383835; --border: rgba(255, 255, 255, 0.10); --wash: rgba(255, 255, 255, 0.05);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
    --other: #5c5b57; --unattributed: #383835;
    --seq-0: #232322; --seq-1: #104281; --seq-2: #1c5cab; --seq-3: #2a78d6; --seq-4: #6da7ec; --seq-5: #cde2fb;
    --good-text: #0ca30c; --critical-text: #e66767;
    --tip-bg: #2c2c2a; --tip-ink: #ffffff; --tip-muted: #b5b3ab; --tip-line: rgba(255, 255, 255, 0.14); --tip-code: rgba(255, 255, 255, 0.10);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d; --surface: #1a1a19; --ink: #ffffff; --ink-2: #c3c2b7; --muted: #898781;
  --grid: #2c2c2a; --axis: #383835; --border: rgba(255, 255, 255, 0.10); --wash: rgba(255, 255, 255, 0.05);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --other: #5c5b57; --unattributed: #383835;
  --seq-0: #232322; --seq-1: #104281; --seq-2: #1c5cab; --seq-3: #2a78d6; --seq-4: #6da7ec; --seq-5: #cde2fb;
  --good-text: #0ca30c; --critical-text: #e66767;
  --tip-bg: #2c2c2a; --tip-ink: #ffffff; --tip-muted: #b5b3ab; --tip-line: rgba(255, 255, 255, 0.14); --tip-code: rgba(255, 255, 255, 0.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page); color: var(--ink);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}
html:lang(fa) body { font-family: Vazirmatn, system-ui, -apple-system, "Segoe UI", sans-serif; }
bdi, [dir=ltr] { unicode-bidi: isolate; }
.linklike { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--s1); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }

header.top {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 24px; background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 5;
}
header.top h1 { font-size: 16px; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
header.top .spacer { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
        border: 1px solid var(--border); font-size: 12px; color: var(--ink-2); background: var(--surface); }
button.pill { font: inherit; font-size: 12px; cursor: pointer; }
button.pill:hover { border-color: var(--ink-2); color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

nav.tabs { display: flex; gap: 2px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--border);
           overflow-x: auto; scrollbar-width: none; }
nav.tabs button { border: 0; background: none; padding: 10px 12px; cursor: pointer; color: var(--ink-2);
                  border-bottom: 2px solid transparent; white-space: nowrap; }
nav.tabs button:hover { color: var(--ink); }
nav.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }

main { max-width: 1280px; margin: 0 auto; padding: 20px 24px 64px; }
section.view > h2 { font-size: 18px; margin: 4px 0 4px; font-weight: 650; }
section.view > p.lede { margin: 0 0 16px; color: var(--ink-2); max-width: 780px; }

.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 16px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; min-width: 0; }
.card > h3 { margin: 0 0 2px; font-size: 14px; font-weight: 650; }
.card > .sub { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.tile .label { color: var(--ink-2); font-size: 12px; }
.tile .value { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; margin-top: 2px; }
.tile .foot { color: var(--muted); font-size: 12px; margin-top: 2px; }

.controls { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 12px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 5px 10px; cursor: pointer; color: var(--ink-2); font-size: 13px; }
.seg button + button { border-inline-start: 1px solid var(--border); }
.seg button[aria-pressed="true"] { background: var(--wash); color: var(--ink); font-weight: 600; }
.controls label { font-size: 12px; color: var(--muted); margin-inline-end: 4px; }

.chart { width: 100%; height: 320px; direction: ltr; }   /* ECharts lays out its SVG text left to right; RTL inherited would overlap it */
.chart.short { height: 220px; }
.chart.tall { height: 380px; }

table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: start; font-weight: 600; color: var(--ink-2); font-size: 12px; padding: 8px 10px;
                border-bottom: 1px solid var(--axis); white-space: nowrap; }
table.data td { padding: 8px 10px; border-bottom: 1px solid var(--grid); vertical-align: top; }
table.data td.r, table.data th.r { text-align: end; font-variant-numeric: tabular-nums; }
.sess-title { max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sess-id { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
table.data tr:hover td { background: var(--wash); }
table.data tr.clickable { cursor: pointer; }
.user-link { color: inherit; text-decoration: none; }
.user-link:hover { text-decoration: underline; }
table.data td.nowrap, bdi.nowrap { white-space: nowrap; }
.heat-wrap { overflow-x: auto; }
.heat-wrap > .chart { min-width: 560px; }
.crumb { margin: 0 0 8px; font-size: 13px; }
.controls .spacer { flex: 1; }
.table-wrap { overflow-x: auto; }
details.tableview { margin-top: 8px; }
details.tableview summary { cursor: pointer; color: var(--ink-2); font-size: 12px; }

.meter { height: 6px; border-radius: 3px; background: var(--grid); overflow: hidden; margin-top: 4px; min-width: 90px; }
.meter > span { display: block; height: 100%; border-radius: 3px; background: var(--s1); }
.meter.warn > span { background: var(--warning); }
.meter.over > span { background: var(--critical); }
.limit-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 12px; margin-bottom: 6px; }

.stack { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--grid); gap: 2px; }
.stack > span { height: 100%; min-width: 2px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.btn { border: 1px solid var(--border); background: var(--surface); padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.btn:hover { background: var(--wash); }
a.btn { color: inherit; text-decoration: none; }
.btn.primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn.danger { color: var(--critical-text); }
.btn.small { padding: 3px 8px; font-size: 12px; }
/* :where() keeps this at zero specificity, so it doesn't restyle the inputs inside Clerk's sign-in. */
:where(input[type=text], input[type=password], input[type=number], select) {
  border: 1px solid var(--border); background: var(--surface); padding: 6px 8px; border-radius: 8px; min-width: 0; }
/* tipSelect: a <select> drawn as a button and a listbox, so each option can carry a tip. */
.tsel { border: 1px solid var(--border); background: var(--surface); padding-block: 6px; padding-inline: 8px 26px; border-radius: 8px; min-width: 0;
        text-align: start; cursor: pointer; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsel::after { content: ""; position: absolute; inset-inline-end: 10px; top: 50%; width: 6px; height: 6px; border: solid var(--ink-2);
               border-width: 0 1.5px 1.5px 0; transform: translateY(-70%) rotate(45deg); }
.tsel-list { position: fixed; inset: auto; margin: 0; padding: 4px; list-style: none; overflow-y: auto; box-sizing: border-box;
             background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 10px; font-size: 13px;
             box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.12); }
.tsel-list li { padding-block: 5px; padding-inline: 26px 12px; border-radius: 6px; cursor: default; white-space: nowrap; position: relative; }
.tsel-list li.active { background: var(--wash); }
.tsel-list li[aria-selected="true"]::before { content: "\2713"; position: absolute; inset-inline-start: 9px; }
input:disabled, select:disabled { color: var(--muted); background: var(--wash); opacity: 1; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--s1); outline-offset: 1px; }

.banner { border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start;
          border: 1px solid var(--border); background: var(--surface); }
.banner .icon { font-weight: 700; }
.banner.critical { border-color: var(--critical); }
.banner.critical .icon { color: var(--critical-text); }
.banner.warning { border-color: var(--warning); }

.login { max-width: 460px; margin: 10vh auto; padding: 0 16px; }
.authorize { max-width: 560px; margin: 6vh auto 0; padding: 24px; }
.authorize h2 { margin: 0 0 8px; }
.user-code { font: 650 30px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.08em; margin: 8px 0 16px; }
.copy-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.copy-row code.key { flex: 1; min-width: 0; }
.install-os { margin: 4px 0; font-size: 12px; }
.login .card { padding: 24px; }
.login h2 { margin: 0 0 4px; }

/* Sign-in page: what the gateway is and how a computer joins on the left, the sign-in on a panel to the right. */
.signin {
  min-height: 100vh; min-height: 100dvh; display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 38%);
  grid-template-rows: auto 1fr auto auto 1fr auto;
  grid-template-areas: "brand panel" ". panel" "intro panel" "steps panel" ". panel" "foot panel";
  column-gap: clamp(32px, 6vw, 96px); padding-inline-start: clamp(24px, 7vw, 112px);
}
.signin-brand { grid-area: brand; margin: 28px 0 0; font-weight: 650; font-size: 15px; letter-spacing: -0.01em; }
.signin-intro { grid-area: intro; max-width: 34rem; }
.signin-intro h1 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -0.028em; font-weight: 680;
                   margin: 0 0 14px; text-wrap: balance; }
.signin-lede { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); max-width: 30rem; }
.signin-code { font: 650 clamp(34px, 4.4vw, 52px)/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.06em;
               margin: 28px 0 0; font-variant-numeric: tabular-nums; }
.signin-steps { grid-area: steps; list-style: none; margin: 40px 0 0; padding: 0; max-width: 40rem; display: grid; gap: 20px;
                font-size: 14.5px; line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.signin-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: baseline; }
.signin-steps b { color: var(--ink); font-weight: 600; }
.signin-steps code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }
.step-n { color: var(--muted); font-variant-numeric: tabular-nums; }
.os-tabs { display: flex; gap: 2px; margin: 10px 0 0; border-bottom: 1px solid var(--border); }
.os-tabs button { border: 0; background: none; padding: 6px 10px; margin-bottom: -1px; cursor: pointer; color: var(--ink-2); font-size: 13px;
                  border-bottom: 2px solid transparent; }
.os-tabs button:hover { color: var(--ink); }
.os-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.os-tabs + .signin-cmd { margin-top: 10px; }
.signin-cmd { margin: 10px 0 0; display: flex; align-items: flex-start; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 8px;
              background: var(--wash); border: 1px solid var(--border); }
.signin-cmd pre { flex: 1; min-width: 0; margin: 0; padding: 5px 0; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
                  white-space: pre-wrap; overflow-wrap: anywhere; }
.signin-cmd .prompt { color: var(--muted); margin-inline-end: 1ch; user-select: none; }
.signin-cmd code { color: var(--ink); }
.cmd-copy { flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px;
            background: none; color: var(--muted); cursor: pointer; }
.cmd-copy:hover { color: var(--ink); background: var(--border); }
.cmd-copy svg { grid-area: 1 / 1; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4;
                stroke-linecap: round; stroke-linejoin: round; }
.cmd-copy .i-done { visibility: hidden; }
.cmd-copy.copied { color: var(--good-text); }
.cmd-copy.copied .i-copy { visibility: hidden; }
.cmd-copy.copied .i-done { visibility: visible; }
.signin-foot { grid-area: foot; margin: 32px 0 28px; font-size: 13px; }
.signin-foot a { color: var(--muted); }
.signin-foot a:hover { color: var(--ink); }
.signin-panel { grid-area: panel; background: var(--surface); border-inline-start: 1px solid var(--border);
                display: flex; align-items: center; justify-content: center; padding: 48px clamp(24px, 4vw, 56px); }
.signin-box { width: 100%; max-width: 360px; }
.signin-box h2 { font-size: 22px; letter-spacing: -0.015em; font-weight: 650; margin: 0 0 4px; }
.signin-sub { margin: 0 0 4px; color: var(--ink-2); font-size: 13.5px; }
#clerk-signin { margin-top: 20px; }
#clerk-signin :is(.cl-socialButtonsBlockButton, .cl-formFieldInput, .cl-formButtonPrimary):focus-visible { outline: none; }   /* ring below instead */
/* Clerk's own title repeats ours on the first step; its later steps (the emailed code) keep theirs. */
#clerk-signin .cl-signIn-start .cl-header { display: none; }
/* Clerk's fields and buttons drawn like the dashboard's own: one plain border, no shading. Its card sits a pixel outside a box that clips it, which cut the fields' top corners. */
#clerk-signin .cl-cardBox { overflow: visible; }
#clerk-signin .cl-card { margin: 0; }
#clerk-signin .cl-socialButtonsBlockButton, #clerk-signin .cl-formFieldInput, #clerk-signin .cl-formButtonPrimary { height: 40px; max-height: none; box-shadow: none; }
#clerk-signin .cl-socialButtonsBlockButton, #clerk-signin .cl-formFieldInput { border: 1px solid var(--axis); background: var(--surface); }
#clerk-signin .cl-socialButtonsBlockButton:hover { background: var(--wash); }
#clerk-signin .cl-formFieldInput:focus { border-color: var(--ink-2); }
#clerk-signin .cl-socialButtonsBlockButton:focus-visible, #clerk-signin .cl-formFieldInput:focus,
#clerk-signin .cl-formButtonPrimary:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--s1) 60%, transparent); }
#clerk-signin .cl-formButtonPrimary { background: var(--ink); color: var(--surface); }
#clerk-signin .cl-formButtonPrimary::after { display: none; }
#clerk-signin .cl-formButtonPrimary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--surface)); }
#clerk-signin .cl-dividerLine { background: var(--border); }
.signin-more { margin-top: 20px; padding: 0; border: 0; background: none; cursor: pointer; font-size: 13px; color: var(--ink-2);
               text-decoration: underline; text-decoration-color: var(--axis); text-underline-offset: 3px; }
.signin-more:hover { color: var(--ink); text-decoration-color: currentColor; }
#classic { margin-top: 16px; }
#clerk-area:not(.hidden) + #classic { padding-top: 16px; border-top: 1px solid var(--border); }
#classic form { display: grid; gap: 10px; margin-top: 12px; }
#classic form input { padding: 9px 10px; border-color: var(--axis); }
#classic form .btn { padding: 9px 12px; font-weight: 600; }
.for-authorize .signin-steps { display: none; }
.signin .error { margin-top: 12px; }

@media (max-width: 880px) {
  .signin { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; padding-inline-start: 0;
            grid-template-areas: "brand" "intro" "panel" "steps" "foot"; }
  .signin-brand, .signin-intro, .signin-steps, .signin-foot { padding: 0 20px; }
  .signin-brand { margin-top: 20px; }
  .signin-intro { margin-top: 28px; }
  .signin-intro h1 { font-size: 28px; }
  .signin-lede { font-size: 15px; }
  .signin-code { font-size: 32px; margin-top: 20px; }
  .signin-panel { border-inline-start: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
                  margin-top: 28px; padding: 28px 20px; }
  .signin-box { max-width: 420px; }
}
.error { color: var(--critical-text); font-size: 13px; min-height: 1.2em; }

dialog { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink);
         padding: 20px; max-width: 640px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(0, 0, 0, 0.35); }
dialog h3 { margin: 0 0 8px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; align-items: end; }
.form-grid label { display: grid; gap: 3px; font-size: 12px; color: var(--ink-2); }
code.key { display: block; padding: 10px; background: var(--wash); border-radius: 8px; word-break: break-all; font-size: 13px; }
.row-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.badge { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--ink-2); }

/* Tooltips: an info dot (.tip-i) or a dotted term (.tip-t) carries data-tip / data-tip-html; one shared #tip shows it. */
.tip-i { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-inline-start: 5px;
         border-radius: 50%; border: 1px solid var(--axis); color: var(--muted); font-size: 10px; font-weight: 700;
         line-height: 1; vertical-align: 1px; cursor: help; user-select: none; flex: none; }
.tip-i:hover, .tip-i.tip-on { color: var(--ink); border-color: var(--ink-2); background: var(--wash); }
.tip-t { text-decoration: underline dotted var(--muted); text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: help; }
#tip { position: fixed; inset: auto; margin: 0; z-index: 100; max-width: min(320px, calc(100vw - 32px)); width: max-content;
       padding: 9px 12px; border: 1px solid var(--tip-line); border-radius: 10px; overflow: visible;
       background: var(--tip-bg); color: var(--tip-ink); font-size: 12.5px; line-height: 1.5; font-weight: 400; text-align: start;
       box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.12); pointer-events: none;
       animation: tip-in 120ms ease-out; }
#tip:not(.open) { display: none; }
#tip::after { content: ""; position: absolute; left: var(--ax, 50%); width: 9px; height: 9px; background: var(--tip-bg);
              border: 1px solid var(--tip-line); transform: translateX(-50%) rotate(45deg); }
#tip[data-side="top"]::after { bottom: -5px; border-top: 0; border-left: 0; }
#tip[data-side="bottom"]::after { top: -5px; border-bottom: 0; border-right: 0; }
#tip[data-side="right"]::after, #tip[data-side="left"]::after { top: var(--ay, 50%); transform: translate(-50%, -50%) rotate(45deg); }
#tip[data-side="right"]::after { border-top: 0; border-right: 0; }
#tip[data-side="left"]::after { border-bottom: 0; border-left: 0; }
#tip p { margin: 0; }
#tip p + p, #tip p + ul, #tip ul + p { margin-top: 6px; }
#tip ul { margin: 4px 0 0; padding-inline-start: 16px; }
#tip li + li { margin-top: 2px; }
#tip b { font-weight: 650; }
#tip .th { font-weight: 650; display: block; margin-bottom: 2px; }
#tip .tm { color: var(--tip-muted); }
#tip code { font: 11.5px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--tip-code); padding: 1px 5px; border-radius: 4px; white-space: nowrap; }
@keyframes tip-in { from { opacity: 0; transform: translateY(var(--dy, 3px)); } }
@media (prefers-reduced-motion: reduce) { #tip { animation: none; } }
.hint { font-size: 12px; color: var(--ink-2); background: var(--wash); border-radius: 8px; padding: 8px 10px; margin-top: 10px; }
.hint code { font-size: 11.5px; }

@media (max-width: 640px) {
  header.top, nav.tabs { padding-inline: 16px; }
  main { padding: 16px 16px 48px; }
  .cols-2 { grid-template-columns: 1fr; }
  .chart { height: 260px; }
}
@media (forced-colors: active) {
  .meter > span, .stack > span { forced-color-adjust: none; }
}
.pill[hidden] { display: none; }
.pricing s { text-decoration-thickness: 1px; }
.pricing .data td { vertical-align: top; }

.badge.state-active { border-color: var(--good); color: var(--good-text); }
.badge.state-queued, .badge.state-upcoming { border-color: var(--s1); color: var(--s1); }
.badge.state-cancelled { border-color: var(--critical); color: var(--critical-text); }
.good { color: var(--good-text); } .critical { color: var(--critical-text); }
label.check { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.form-grid .hint { grid-column: 1 / -1; }
.ticket { padding: 10px 0 6px; border-bottom: 1px solid var(--border); margin-bottom: 8px; } .badge.bonus { display: inline-block; margin: 4px 4px 0 0; border-color: var(--s4); }

/* Order requests: the buyer's order line, the Order buttons, the admin's Orders tab and the order dialogs. */
.order-note { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin: 16px 0; }
.order-btn { margin-top: 4px; }
.order-btn:disabled { cursor: not-allowed; opacity: 0.55; }
.order-msg { max-width: 32ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.badge.tab-count { margin-inline-start: 4px; border-color: var(--s1); color: var(--s1); font-weight: 600; }
.badge.mail { display: inline-block; margin: 0 4px 4px 0; white-space: nowrap; }
.badge.state-new { border-color: var(--s1); color: var(--s1); }
.badge.state-contacted { border-color: var(--s4); }
.badge.state-done { border-color: var(--good); color: var(--good-text); }
.badge.state-declined { border-color: var(--critical); color: var(--critical-text); }
.form-grid label.wide { grid-column: 1 / -1; }
.form-grid > p.hint { grid-column: 1 / -1; margin: 0; }
.order-price { margin: 0 0 12px; font-size: 18px; font-variant-numeric: tabular-nums; }
dialog :where(input[type=email], textarea) { border: 1px solid var(--border); background: var(--surface); padding: 6px 8px; border-radius: 8px;
                                             min-width: 0; width: 100%; font: inherit; color: inherit; }
dialog textarea { resize: vertical; }
code { unicode-bidi: isolate; direction: ltr; }
