/* MISAKA Options in GitHub's look (Primer dark), 2026-10-03.
   Loaded after style.css: it remaps the site's tokens to Primer's dark values and restyles the
   site's components as Primer's (Header, Button, Box, Label, UnderlineNav, SegmentedControl,
   Flash, Overlay, Toast). The models hub (#/models) uses Primer CSS itself (primer-hub.css). */
:root {
  --bg: #0d1117;
  --bg2: #010409;
  --panel: #0d1117;
  --panel2: #151b23;
  --panel3: #212830;
  --border: #3d444d;
  --border2: #3d444d;
  --text: #f0f6fc;
  --body-text: #f0f6fc;
  --muted: #9198a1;
  --dim: #9198a1;
  --accent: #1f6feb;          /* focus, selection, emphasis */
  --accent2: #4493f8;         /* links */
  --accent-ink: #ffffff;
  --accent-hover: #2a7aef;
  --accent-soft: #388bfd1a;
  --accent-line: #388bfd66;
  --ok: #3fb950;
  --ok-soft: #2ea04326;
  --ok-line: #238636;
  --buy: #3fb950;
  --sell: #f85149;
  --sell-ink: #ffffff;
  --bad-soft: #f851491a;
  --bad-line: #da3633;
  --warn: #d29922;
  --warn-ink: #ffffff;
  --warn-soft: #bb800926;
  --warn-line: #9e6a03;
  --up: #3fb950;
  --down: #f85149;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --radius: 6px;
  --gh-green: #238636;
  --gh-green-hover: #29903b;
  --gh-btn: #212830;
  --gh-btn-hover: #262c36;
  --gh-btn-border: #3d444d;
  --gh-coral: #f78166;
}
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); }
a { color: var(--accent2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
h1, h2, h3 { font-weight: 600; }

/* ---- Header (Primer Header) ---- */
.nav { background: var(--bg2); border-bottom: 1px solid var(--border); box-shadow: none; backdrop-filter: none; }
.brand, .brand span { color: var(--text); font-weight: 600; }
.brand b { color: var(--text); font-weight: 600; }
.brand svg rect { fill: transparent; }
.brand svg path { stroke: var(--text); }
.brand-tag { color: var(--muted); border-color: var(--border); }
.nav-links a, .more-btn { color: var(--text); border-radius: 6px; font-weight: 500; font-size: 14px; }
.nav-links a:hover, .more-btn:hover { background: #656c7633; color: var(--text); }
.nav-links a.active, .more-btn.active { color: var(--text); background: none; box-shadow: inset 0 -2px 0 var(--gh-coral); border-radius: 0; font-weight: 600; }
.more-menu, .acct-menu { background: var(--panel2); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 0 0 1px var(--border), 0 24px 48px #010409; padding: 8px; }
.more-menu a, .acct-menu button { border-radius: 6px; color: var(--text); }
.more-menu a:hover, .acct-menu button:hover { background: #656c7633; color: var(--text); text-decoration: none; }
.pill { border-radius: 2em; border: 1px solid var(--border); color: var(--muted); background: transparent; font-weight: 500; }
.pill .dot.ok { box-shadow: none; }
.nav-toggle { border-radius: 6px; border-color: var(--gh-btn-border); background: var(--gh-btn); color: var(--text); }

/* ---- Buttons (Primer Button) ---- */
.btn { background: var(--gh-btn); color: var(--text); border: 1px solid var(--gh-btn-border); border-radius: 6px; font-size: 14px; font-weight: 500; line-height: 20px; padding: 5px 16px; min-height: 32px; box-shadow: none; transition: background-color .2s; }
.btn:hover { background: var(--gh-btn-hover); border-color: var(--gh-btn-border); text-decoration: none; }
.btn:active { background: #2a313c; }
.btn:disabled, .btn[disabled] { color: #656c76; background: #212830; border-color: #3d444d; opacity: 1; }
.btn-accent, .btn-primary { background: var(--gh-green); color: #fff; border-color: #f0f6fc1a; font-weight: 500; }
.btn-accent:hover, .btn-primary:hover { background: var(--gh-green-hover); border-color: #f0f6fc1a; }
.btn-accent:disabled { background: #105823; color: #ffffff80; border-color: #f0f6fc1a; }
.btn-sell { background: var(--gh-btn); color: #fa5e55; border-color: var(--gh-btn-border); font-weight: 500; }
.btn-sell:hover { background: #b62324; color: #fff; border-color: #f0f6fc1a; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: #656c7633; color: var(--text); }
.btn-sm { padding: 3px 12px; font-size: 12px; min-height: 28px; line-height: 20px; }
.btn-lg, .btn-xl { min-height: 40px; padding: 9px 20px; font-size: 14px; }

/* ---- Boxes (Primer Box) ---- */
.panel, .tile, .offer, .entry, .tier-ed, .none-box, .dev-card, .stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; box-shadow: none; }
.panel-h { background: var(--panel2); color: var(--text); text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--border); border-radius: 6px 6px 0 0; }
.panel-b { padding: 16px; }
.tile { padding: 12px 16px; }
.tile .k, .stat .k { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--muted); }
.tile .v { font-size: 20px; font-weight: 600; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.eyebrow { color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; }
.page-h h1 { font-size: 24px; font-weight: 600; }
.page-h .sub, .muted { color: var(--muted); }
.sec-h h2 { font-size: 20px; font-weight: 600; }
.foot { background: var(--bg); color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); padding: 16px 24px; }

/* ---- Tables ---- */
.tbl { border-collapse: separate; border-spacing: 0; }
.tbl th { background: var(--panel2); color: var(--muted); text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.row-link:hover td { background: var(--panel2); }
.tbl th.sorted { color: var(--text); }
.tbl-wrap { border-radius: 6px; }
.panel .tbl-wrap, .tbl-wrap:has(> .tbl) { border: 1px solid var(--border); border-radius: 6px; }
.panel .tbl-wrap { border: 0; }

/* ---- Labels (Primer Label) ---- */
.tag { border-radius: 2em; font-size: 12px; font-weight: 500; line-height: 18px; padding: 0 7px; border: 1px solid var(--border); color: var(--muted); background: transparent; }
.tag.ok { color: #3fb950; border-color: #238636; }
.tag.warn { color: #d29922; border-color: #9e6a03; }
.tag.bad { color: #f85149; border-color: #da3633; }
.tag.declared { color: #4493f8; border-color: #1f6feb; }
.gchip { border-radius: 2em; background: #388bfd1a; color: #4493f8; border: 0; font-size: 12px; font-weight: 500; }

/* ---- Tabs (UnderlineNav) and segmented controls (SegmentedControl) ---- */
.tabs { border-bottom: 1px solid var(--border); padding: 0 8px; gap: 8px; }
.tabs button { color: var(--text); font-size: 14px; padding: 12px 8px; border-bottom: 2px solid transparent; border-radius: 0; }
.tabs button:hover { color: var(--text); box-shadow: inset 0 -2px 0 #3d444d; }
.tabs button.on { color: var(--text); font-weight: 600; border-bottom-color: var(--gh-coral); }
.seg { background: var(--panel2); border: 1px solid var(--border); border-radius: 6px; padding: 0; }
.seg button { color: var(--text); border-radius: 6px; font-weight: 400; margin: -1px; border: 1px solid transparent; }
.seg button.on { background: #2a313c; border-color: #656c76; font-weight: 600; color: var(--text); }
.seg button.on.buy { color: #3fb950; }
.seg button.on.sell { color: #f85149; }

/* ---- Form controls ---- */
input[type=text], input[type=search], input[type=number], input[type=url], input:not([type]), select, textarea, .toolbar input[type=search] {
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; font-family: var(--sans); font-size: 14px; line-height: 20px; padding: 5px 12px; box-shadow: none; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
input::placeholder { color: #656c76; }

/* ---- Flash (banners), toasts, command boxes ---- */
.banner { background: #bb800926; color: var(--text); border-bottom: 1px solid #9e6a0366; }
.banner.info { background: #388bfd1a; color: var(--text); border-color: #388bfd66; }
.banner.bad { background: #f851491a; color: var(--text); border-color: #f8514966; }
.toast { background: var(--panel2); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 6px; box-shadow: 0 0 0 1px var(--border), 0 8px 24px #010409; font-size: 14px; }
.toast.bad { border-left-color: #da3633; }
.toast.warn { border-left-color: #9e6a03; }
.toast.ok { border-left-color: #238636; }
.cmdbox { background: var(--panel2); border-color: var(--border); border-radius: 6px; }
.cmdbox pre.cmd { background: var(--bg); }
code { background: #656c7633; border-radius: 6px; padding: .2em .4em; font-size: 85%; }
pre code, .cmd code { background: none; padding: 0; }
.copy:hover { color: var(--accent2); }
.crumbs a { color: var(--accent2); }
.kv dt, .note, .s, .sub { color: var(--muted); }

/* ---- one radius, flat surfaces ---- */
.hero-card { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; }
.hc-row { background: var(--panel2); border-radius: 6px; }
.offer, .pay-flow, .none-box, .p-entry, .pay3, .later, .cmd, .wc, .entry, .seedp, .flow, .checks, .tier-picks { border-radius: 6px; }
.avatar, .avatar.lg, .avatar.sm, .dev-avatar, .dev-preview img { border-radius: 6px; }
.depth .bar i { background: #2ea04326; }
.depth .bar.sell i { background: #f851491a; }
.wc-back { background: #010409cc; }
.wc { box-shadow: 0 0 0 1px var(--border), 0 24px 48px #010409; border-radius: 12px; }

/* every remaining 8–20px corner is Primer's 6px */
.after-note,
.avatar,
.avatar.lg,
.avatar.sm,
.dev-avatar,
.dev-card-h img,
.dev-preview img,
.hc-row,
.hero-card,
.later,
.none-box,
.offer,
.p-entry,
.pay-flow,
.pay3,
.wallet-prompt,
.wc-icon { border-radius: 6px; }
