/* txLearn by Superledger Media — styles. Brand tokens first. No external requests. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/inter-700.woff2") format("woff2"); }

:root {
  /* Superledger Media brand */
  --ink: #0F2744; --near-black: #0B1220; --white: #FFFFFF; --slate: #F4F6F8; --steel: #8B9BB0; --accent: #2F6FED;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 12px; --radius-sm: 8px; --container: 1240px; --gutter: clamp(16px, 3vw, 32px);
  /* light theme (default) */
  --bg: var(--slate); --surface: var(--white); --surface-2: #EEF1F5; --text: var(--near-black); --heading: var(--ink);
  --muted: #4A5A70; --faint: #6B7A8F; --rule: #E1E6EC; --rule-strong: #CBD3DD; --link: #2459C8;
  --pos: #137A4B; --neg: #B42335; --warn: #8A5A00; --hl: rgba(47, 111, 237, .08); --hl-rule: rgba(47, 111, 237, .45);
  --header: var(--white); --chip: #E8EEF9; --chip-text: #1F4FB0; --bar: var(--accent); --bar-bg: #E3E8EF;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: var(--near-black); --surface: #111B2E; --surface-2: #16223A; --text: #E7ECF3; --heading: var(--white);
  --muted: #B9C4D3; --faint: var(--steel); --rule: #1F2C44; --rule-strong: #2B3A57; --link: #7EA6F7;
  --pos: #4CC98A; --neg: #FF8A96; --warn: #F0C060; --hl: rgba(47, 111, 237, .14); --hl-rule: rgba(126, 166, 247, .55);
  --header: var(--ink); --chip: #1B2D52; --chip-text: #A9C3FA; --bar: #5B8CF2; --bar-bg: #22314F;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.55 var(--font); color: var(--text); background: var(--bg); font-feature-settings: "tnum" 1, "cv11" 1; }
h1, h2, h3, h4 { margin: 0; color: var(--heading); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
h1 { font-size: clamp(24px, 3vw, 32px); }
h2 { font-size: 19px; }
h3 { font-size: 15px; }
p { margin: 0 0 12px; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
code, .mono { font-family: var(--mono); font-size: .88em; }
.wrap { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .xs { font-size: 12px; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .warn { color: var(--warn); }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- header ---------- */
.site-header { background: var(--header); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; }
[data-theme="dark"] .site-header { border-bottom-color: #1A2E4D; }
.bar { display: flex; align-items: center; gap: 18px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--heading); flex: none; }
.wordmark { font-weight: 700; font-size: 22px; letter-spacing: -0.03em; line-height: 1; color: var(--heading); }
.wordmark .tx { color: var(--accent); font-weight: 600; }
[data-theme="dark"] .wordmark .tx { color: #7EA6F7; }
.by { display: flex; align-items: center; gap: 8px; padding-left: 12px; border-left: 1px solid var(--rule-strong); color: var(--faint); font-size: 12px; }
.by img { height: 15px; width: auto; display: block; }
.logo-dark { display: none !important; }
[data-theme="dark"] .logo-dark { display: block !important; }
[data-theme="dark"] .logo-light { display: none !important; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 11px; border-radius: 8px; font-weight: 500; font-size: 14px; }
.nav a:hover { color: var(--heading); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--heading); background: var(--chip); }
[data-theme="dark"] .nav a { color: #C9D3E1; }
[data-theme="dark"] .nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .1); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--rule-strong); background: transparent; color: var(--heading); border-radius: 9px; cursor: pointer; flex: none; }
.icon-btn svg { width: 18px; height: 18px; }
.i-sun { display: none; } [data-theme="dark"] .i-sun { display: block; } [data-theme="dark"] .i-moon { display: none; }
.menu-btn { display: none; }
@media (max-width: 1000px) {
  .menu-btn { display: inline-flex; margin-left: auto; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 60px; flex-direction: column; background: var(--header); border-bottom: 1px solid var(--rule); padding: 8px var(--gutter) 14px; }
  .nav.open { display: flex; }
  .nav a { padding: 11px 10px; }
}
@media (max-width: 520px) { .by span { display: none; } .by { padding-left: 10px; } .by img { height: 13px; } .wordmark { font-size: 20px; } .bar { gap: 10px; } }

/* ---------- page head / status ---------- */
.page-head { padding: 26px 0 14px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.page-head p { margin: 6px 0 0; color: var(--muted); max-width: 760px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--rule); padding: 6px 11px; border-radius: 999px; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--steel); }
.status.live::before { background: var(--pos); } .status.snap::before { background: var(--warn); } .status.err::before { background: var(--neg); }
.notice { border: 1px solid var(--rule); border-left: 3px solid var(--accent); background: var(--surface); padding: 12px 14px; border-radius: var(--radius-sm); color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.notice strong { color: var(--heading); }

/* ---------- cards & stats ---------- */
section { margin: 0 0 22px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; }
.card > h2, .sec-title { margin-bottom: 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sec-title .small { font-weight: 400; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--surface); padding: 14px 16px; min-height: 92px; box-shadow: 1px 0 0 var(--rule), 0 1px 0 var(--rule); }
.stat .k { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.stat .v { font-size: 22px; font-weight: 600; color: var(--heading); margin-top: 4px; letter-spacing: -0.02em; line-height: 1.25; }
.stat .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat .v { font-size: 18px; } .stat { padding: 12px; } }
.loading { color: var(--faint) !important; }
dl.kv { display: grid; grid-template-columns: minmax(150px, 40%) 1fr; margin: 0; }
dl.kv dt, dl.kv dd { padding: 8px 0; border-bottom: 1px solid var(--rule); margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); padding-right: 12px; }
dl.kv dd { color: var(--text); word-break: break-word; }
dl.kv > :nth-last-child(-n+2) { border-bottom: 0; }
.meter { height: 6px; border-radius: 4px; background: var(--bar-bg); overflow: hidden; margin-top: 8px; }
.meter > span { display: block; height: 100%; background: var(--bar); width: 0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--rule); white-space: nowrap; vertical-align: middle; }
th { position: sticky; top: 0; background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; z-index: 1; }
th.l, td.l { text-align: left; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
tr.hl td { background: var(--hl); }
tr.hl td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
td .sub { display: block; font-size: 11.5px; color: var(--faint); }
th button { all: unset; cursor: pointer; }
th button:focus-visible { outline: 2px solid var(--accent); }
th[aria-sort="descending"] button::after { content: " ↓"; } th[aria-sort="ascending"] button::after { content: " ↑"; }
th.grp { text-align: center; border-left: 1px solid var(--rule); }
td.bl, th.bl { border-left: 1px solid var(--rule); }
.val-name { display: flex; flex-direction: column; max-width: 260px; }
.val-name a { font-weight: 600; text-decoration: none; color: var(--heading); overflow: hidden; text-overflow: ellipsis; }
.val-name a:hover { text-decoration: underline; }
.chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--chip); color: var(--chip-text); white-space: nowrap; }
.chip.ok { background: rgba(19, 122, 75, .12); color: var(--pos); } .chip.bad { background: rgba(180, 35, 53, .12); color: var(--neg); } .chip.mid { background: rgba(138, 90, 0, .12); color: var(--warn); }
.hb { color: var(--faint); font-size: 11.5px; font-style: italic; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; }
.toolbar input[type=search], select, input[type=number] { font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.toolbar input[type=search] { width: 260px; max-width: 100%; }
.seg { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: 8px; overflow: hidden; }
.seg button { font: inherit; font-size: 13px; padding: 7px 12px; background: var(--surface); color: var(--muted); border: 0; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--rule-strong); }
.seg button[aria-pressed="true"] { background: var(--chip); color: var(--chip-text); font-weight: 600; }

/* ---------- governance ---------- */
.tally { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--bar-bg); min-width: 140px; }
.tally span { display: block; height: 100%; }
.t-yes { background: #2F9E6A; } .t-no { background: #D2475A; } .t-abs { background: var(--steel); } .t-veto { background: #8C2B9E; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.props td.title { white-space: normal; min-width: 260px; max-width: 520px; text-align: left; }

/* ---------- formula ---------- */
.formula { font-family: var(--mono); font-size: 13px; background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; white-space: pre; color: var(--text); }
.big-est { font-size: 34px; font-weight: 700; color: var(--heading); letter-spacing: -0.03em; }
.calc { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; align-items: end; }
.calc label { min-width: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.calc select, .calc input { width: 100%; }

/* ---------- ops highlight ---------- */
.op-card { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; border: 1px solid var(--hl-rule); background: var(--hl); border-radius: var(--radius); padding: 14px 16px; }
.op-card .op-logo img { height: 18px; width: auto; display: block; }
.op-card .grow { flex: 1 1 280px; }
.op-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--chip-text); background: var(--chip); border-radius: 999px; padding: 2px 8px; margin-top: 2px; width: max-content; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); background: var(--surface); margin-top: 40px; padding: 30px 0 26px; font-size: 14px; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; } .site-footer li { margin: 0 0 7px; }
.site-footer a { color: var(--text); text-decoration: none; } .site-footer a:hover { text-decoration: underline; }
.foot-logo { height: 22px; width: auto; margin: 10px 0 12px; }
.legal-line { border-top: 1px solid var(--rule); margin-top: 22px; padding-top: 14px; font-size: 12.5px; color: var(--faint); }
.prose { max-width: 780px; } .prose h2 { margin: 22px 0 8px; } .prose ul { padding-left: 20px; } .prose li { margin-bottom: 6px; }
.notfound { padding: 80px 0; text-align: center; } .notfound .wordmark { font-size: 64px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--heading); border: 1px solid var(--rule-strong); }

.stat .v.small { font-size: 15px; line-height: 1.35; }
main.wide { --container: 1520px; }
#vals th, #vals td { padding: 7px 6px; }
#vals { font-size: 12.5px; }
#vals .val-name { max-width: 180px; }
.props .tally { min-width: 220px; }
#props td:nth-child(5) { min-width: 290px; }
.card { min-width: 0; } .mono { overflow-wrap: anywhere; }

/* ---------- txLearn portal ---------- */
button.btn { border: 0; cursor: pointer; font-family: inherit; } button.btn.ghost { border: 1px solid var(--rule-strong); }
button.btn:disabled { opacity: .45; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.hero { display: flex; gap: 28px; align-items: stretch; padding: 28px 0 8px; flex-wrap: wrap; }
.hero .grow { flex: 1 1 460px; } .hero h1 { font-size: clamp(30px, 4.4vw, 48px); line-height: 1.08; margin: 6px 0 14px; }
.lead { font-size: 17px; color: var(--muted); max-width: 640px; }
.progress-card { flex: 0 1 320px; align-self: center; }
.track-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.track-card { display: flex; flex-direction: column; gap: 8px; } .track-card h3 { margin: 4px 0 0; font-size: 19px; } .track-card h3 a { color: var(--heading); text-decoration: none; }
.tc-top, .tc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .tc-foot { margin-top: auto; padding-top: 8px; }
.steps { padding-left: 20px; } .steps li { margin-bottom: 6px; } .how { margin-top: 24px; }
.lesson-list { list-style: none; padding: 6px 18px; margin: 0 0 18px; }
.lesson-row { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); } .lesson-row:last-child { border-bottom: 0; }
.lesson-row .num { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; background: var(--chip); color: var(--chip-text); flex: none; }
.lesson-row.done .num { background: rgba(19, 122, 75, .14); color: var(--pos); } .lesson-row a { font-weight: 600; }
.lesson-wrap { max-width: 780px; margin: 0 auto; padding-top: 18px; } .lesson-wrap h1 { margin: 4px 0 14px; }
.lesson-body { font-size: 16px; line-height: 1.65; } .lesson-body h3 { margin: 20px 0 6px; }
.callout { border-left: 3px solid var(--accent); background: var(--hl); padding: 10px 14px; border-radius: 6px; margin: 14px 0; font-size: 14.5px; }
.quiz-card { margin: 22px 0; } .q { border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; } .q legend { font-weight: 600; padding: 0 4px; }
.opt { display: flex; gap: 10px; align-items: center; padding: 5px 2px; cursor: pointer; } .q.right { border-color: var(--pos); } .q.wrong { border-color: var(--neg); }
.q .why { margin: 6px 0 0; color: var(--muted); } .quiz-foot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.cert-view svg { width: 100%; height: auto; display: block; border-radius: 10px; box-shadow: 0 6px 24px rgba(15, 39, 68, .12); }
.cert-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.field input { padding: 9px 11px; border: 1px solid var(--rule-strong); border-radius: 8px; font: inherit; background: var(--surface); color: inherit; }
tr.naka td { border-bottom: 2px dashed var(--warn); }
details.card summary { cursor: pointer; font-weight: 600; } details.card pre { white-space: pre-wrap; margin: 10px 0; }
@media print { .site-header, .site-footer, .noprint, .skip { display: none !important; } .cert-view svg { box-shadow: none; } @page { size: landscape; margin: 0; } }

/* ---------- dashboard summary ---------- */
.sum-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.sum-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; } .sum-head h3 { margin: 0; font-size: 18px; }
.sum-stats { margin-bottom: 12px; } .sum-stats .v.small { font-size: 20px; } .sum-stats .v.hb { font-size: 15px; }
.mv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 20px; }
.mv h4 { margin: 0 0 6px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mv-list { list-style: none; margin: 0; padding: 0; } .mv-list li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--rule); font-size: 13.5px; }
.mv-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mv-v { white-space: nowrap; font-variant-numeric: tabular-nums; }
.share { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); }
.src-opts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 16px; margin-bottom: 12px; } .form-grid .wide { grid-column: span 2; }
.field select, .field textarea { padding: 9px 11px; border: 1px solid var(--rule-strong); border-radius: 8px; font: inherit; background: var(--surface); color: inherit; }
.field textarea { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
#batches .btn { margin-left: 6px; } section.card { margin-bottom: 18px; }
@media (max-width: 640px) { .form-grid .wide { grid-column: auto; } }
pre.code { background: var(--near-black); color: #E2E8F0; padding: 14px 16px; border-radius: 10px; overflow-x: auto; font-size: 12.5px; line-height: 1.55; font-family: ui-monospace, Menlo, monospace; white-space: pre; }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 6px 0 26px; }
.pillar { text-decoration: none; color: inherit; } .pillar h3 { margin: 2px 0 6px; font-size: 20px; color: var(--heading); } .pillar:hover { border-color: var(--accent); }
.partner-strip { border: 1px dashed var(--rule-strong); border-radius: var(--radius); padding: 14px 18px; margin: 24px 0 0; } .partner-strip p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
