/* ZETAPHY hub: one screen, the apps side by side in tabs, explanations on hover.
   The look follows the SWD ecosystem page (near-black, hairline borders, one
   accent gradient) and the layout of the big chain apps (left rail + top bar). */
:root {
  --bg: #05070a;
  --rail: #070a0f;
  --surface: #0b0f16;
  --card: #10151f;
  --card-2: #141a26;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #e8ecf2;
  --dim: #8b93a3;
  --faint: #5c6576;
  --accent: #7c6cff;
  --accent-2: #3fc8ff;
  --grad: linear-gradient(135deg, #7c6cff 0%, #3fc8ff 100%);
  --ok: #19c37d;
  --warn: #f0b90b;
  --bad: #f6465d;
  --radius: 14px;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Thai", "Sarabun", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); overflow: hidden; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font: inherit; color: inherit; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.small { font-size: 12px; }
[hidden] { display: none !important; }

/* ---------- the frame: rail | top bar / stage, exactly one screen ---------- */
.shell {
  display: grid; height: 100dvh;
  grid-template-columns: 224px minmax(0, 1fr);
  grid-template-rows: 60px auto minmax(0, 1fr);
  grid-template-areas: "side top" "side how" "side stage";
}
.side { grid-area: side; background: var(--rail); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 14px 12px; gap: 14px; min-height: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 9px; }
.brand-name { font-weight: 800; letter-spacing: .06em; font-size: 17px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tabs { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.tab {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 11px; border: 0; border-radius: 10px;
  background: none; color: var(--dim); cursor: pointer; text-align: left; font-weight: 500; position: relative;
}
.tab svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab:hover { background: rgba(255, 255, 255, .04); color: var(--text); text-decoration: none; }
.tab[aria-current="page"] { background: rgba(124, 108, 255, .14); color: var(--text); }
.tab[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.tab .new { margin-left: auto; font-size: 10px; padding: 1px 6px; border-radius: 99px; background: rgba(63, 200, 255, .14); color: var(--accent-2); }
.side-foot { margin-top: auto; }
.about-link { display: block; margin-bottom: 10px; font-size: 13px; color: inherit; opacity: .8; }
.about-link:hover { opacity: 1; }
.net { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 99px; font: 12px var(--mono); color: var(--dim); cursor: default; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.net.up .dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(25, 195, 125, .6); animation: pulse 2s infinite; }
.net.down .dot { background: var(--bad); }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(25, 195, 125, 0); } 100% { box-shadow: 0 0 0 0 rgba(25, 195, 125, 0); } }

.top { grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--rail); min-width: 0; }
.title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.title h1 { margin: 0; font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 99px; border: 1px solid rgba(240, 185, 11, .35); color: var(--warn); background: rgba(240, 185, 11, .08); cursor: help; white-space: nowrap; }
.top-actions { display: flex; gap: 8px; align-items: center; flex: none; }
/* the language menu: a compact select dressed like the ghost buttons next to it */
.lang-select {
  appearance: none; -webkit-appearance: none; flex: none; max-width: 132px; padding: 8px 28px 8px 12px; border-radius: 10px;
  border: 1px solid var(--line-2); color: var(--text); font-weight: 500; cursor: pointer; text-overflow: ellipsis;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238b93a3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
}
.lang-select:hover { background-color: rgba(255, 255, 255, .05); }
.lang-select:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 108, 255, .18); }
.lang-select option { background: var(--card); color: var(--text); }

.stage { grid-area: stage; position: relative; min-height: 0; overflow: hidden; }
.panel { position: absolute; inset: 0; padding: 18px 20px; overflow: auto; }
.frames, .frames iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.frames { pointer-events: none; }
.frames iframe { pointer-events: auto; background: var(--bg); color-scheme: dark; }

/* ---------- pieces ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 10px; border: 1px solid transparent; background: var(--grad); color: #fff; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: default; filter: none; }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--text); font-weight: 500; }
.btn.ghost:hover { background: rgba(255, 255, 255, .05); }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
input { background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; min-width: 0; outline: none; }
select { background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; min-width: 0; color: inherit; font: inherit; outline: none; }
select:focus { border-color: var(--accent); }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 108, 255, .18); }
.info {
  display: inline-grid; place-items: center; width: 17px; height: 17px; flex: none; border-radius: 50%;
  border: 1px solid var(--line-2); color: var(--dim); font: 600 11px/1 Georgia, serif; font-style: italic; cursor: help; user-select: none;
}
.info:hover, .info:focus { color: var(--text); border-color: var(--accent); outline: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-height: 0; display: flex; flex-direction: column; }
.card h2 { margin: 0 0 10px; font-size: 14px; font-weight: 650; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.card-head .more { margin-left: auto; font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
.row input { flex: 1; }
.msg { min-height: 18px; margin: 6px 0 0; font-size: 12px; color: var(--dim); word-break: break-word; }
.msg.ok { color: var(--ok); }
.msg.bad { color: var(--bad); }
.scroll { overflow: auto; min-height: 0; flex: 1; margin: 0 -4px; padding: 0 4px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.stat { background: var(--card); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; cursor: help; outline: none; }
.stat:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.stat .k { font-size: 12px; color: var(--dim); }
.stat .v { font-size: 20px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.home-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: calc(100% - 92px); min-height: 380px; }
.home-grid .start { grid-row: 1 / span 2; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: flex; gap: 12px; }
.step-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: rgba(124, 108, 255, .16); color: #b9b0ff; }
.step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.step-head { display: flex; align-items: center; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; }
.chip:hover { border-color: var(--accent); text-decoration: none; }
.chip svg { width: 16px; height: 16px; stroke: var(--accent-2); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 500; color: var(--dim); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); }
.tbl td { padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr.link { cursor: pointer; }
.tbl tbody tr.link:hover td { background: rgba(124, 108, 255, .06); }
.tbl td.num { font-family: var(--mono); }
.blocks { overflow: hidden; }

.kv { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 10px; margin: 0; align-items: center; font-size: 13px; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.copy { border: 0; background: none; color: var(--dim); cursor: pointer; padding: 2px 6px; border-radius: 6px; font-size: 12px; }
.copy:hover { color: var(--text); background: rgba(255, 255, 255, .06); }

.stake-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); height: 100%; min-height: 420px; }
.stake-grid .vals { min-height: 0; }
.col { display: grid; gap: 14px; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
.mine .bal { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 10px; }
.mine .bal div { display: flex; flex-direction: column; }
.mine .bal span { font-size: 12px; color: var(--dim); }
.mine .bal b { font: 600 16px var(--mono); }
.mine .dl { list-style: none; margin: 0 0 10px; padding: 0; max-height: 120px; overflow: auto; }
.mine .dl li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.mine .dl li span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.plist .p-top { display: flex; gap: 8px; align-items: center; }
.plist .p-title { flex: 1; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { font-size: 11px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--dim); white-space: nowrap; }
.pill.voting { color: var(--accent-2); border-color: rgba(63, 200, 255, .4); }
.pill.passed { color: var(--ok); border-color: rgba(25, 195, 125, .4); }
.pill.rejected, .pill.failed { color: var(--bad); border-color: rgba(246, 70, 93, .4); }
.votes { display: flex; gap: 6px; flex-wrap: wrap; }
.plist .msg { min-height: 0; margin: 0; }
.plist .msg:empty { display: none; }

/* ---------- the hover tooltip (one element, placed by hub.js) ---------- */
.tip {
  position: fixed; z-index: 50; max-width: 320px; padding: 9px 12px; border-radius: 10px; pointer-events: none;
  background: #1a2130; border: 1px solid var(--line-2); color: var(--text); font-size: 12.5px; line-height: 1.55;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45); white-space: pre-line;
}
[data-tip], [data-tip-key] { cursor: help; }
.tab[data-tip-key], .btn[data-tip-key], .chip[data-tip-key] { cursor: pointer; }

dialog { background: var(--card); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 18px; width: min(420px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog h3 { margin: 0 0 4px; font-size: 16px; }
dialog .unit { color: var(--dim); font: 13px var(--mono); }
dialog form { display: flex; flex-direction: column; gap: 10px; }

/* ---------- narrow screens: the rail becomes a bottom bar ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: 54px auto minmax(0, 1fr) 62px; grid-template-areas: "top" "how" "stage" "side"; }
  .side { flex-direction: row; padding: 6px; border-right: 0; border-top: 1px solid var(--line); gap: 0; }
  .brand, .side-foot { display: none; }
  .tabs { flex-direction: row; width: 100%; overflow-x: auto; overflow-y: hidden; gap: 0; }
  .tab { flex: 1 0 auto; width: auto; flex-direction: column; gap: 3px; padding: 6px 8px; font-size: 11px; text-align: center; min-width: 60px; }
  .tab[aria-current="page"]::before { left: 20%; right: 20%; top: -6px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .tab .new { display: none; }
  .top { padding: 0 12px; }
  #add-net span { display: none; }
  #add-net::before { content: "+"; font-weight: 700; }
  .lang-select { max-width: 116px; padding: 7px 24px 7px 10px; background-position: right 8px center; font-size: 13px; }
  .panel { padding: 12px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid, .stake-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; height: auto; }
  .home-grid .start { grid-row: auto; }
  .col { grid-template-rows: none; }
  .vals .scroll, .props .scroll { max-height: 50vh; }
}
@media (prefers-reduced-motion: reduce) { .net.up .dot { animation: none; } }

/* ---------- rail groups ---------- */
.group { display: block; margin: 12px 11px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }

/* ---------- data pages (pages.js): each fills the stage, inner parts scroll ---------- */
.page { display: flex; flex-direction: column; gap: 14px; }
.page > .stats { margin-bottom: 0; flex: none; }
.stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid2 { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); flex: 1; min-height: 0; grid-auto-rows: minmax(0, 1fr); }
.grid2.tall { grid-auto-rows: minmax(0, 1fr); }
.sp-intro { margin: 0; }
.sp-grid { align-items: start; }
.sp-grid .card { overflow: auto; }
.sp-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sp-gw { flex: none; }
.sp-gw summary { cursor: pointer; list-style: none; }
.sp-gw summary::-webkit-details-marker { display: none; }
.sp-gw summary .card-head { margin-bottom: 4px; }
.sp-gw summary h2::before { content: '▸'; display: inline-block; width: 1em; color: var(--dim); transition: transform .15s; }
.sp-gw[open] summary h2::before { transform: rotate(90deg); }
.sp-gw[open] summary { margin-bottom: 8px; }
.sp-gw-how { margin: 0 0 8px; padding-left: 18px; }
.sp-gw-how li { margin: 2px 0; }
.sp-gw p { margin: 6px 0 0; }
.sp-form { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; align-items: center; font-size: 13px; }
.sp-form label { color: var(--dim); }
.sp-form .row, .sp-form .msg { grid-column: 1 / -1; }
.grid3 { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); flex: none; }
.card.grow { flex: 1; min-height: 0; }
.scroll-y { overflow: auto; }
.card h3 { margin: 12px 0 6px; font-size: 13px; font-weight: 600; color: var(--dim); }
.app-card { text-align: left; cursor: pointer; color: var(--text); gap: 2px; font: inherit; }
.app-card:hover { border-color: var(--accent); }

.code { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin: 6px 0 4px; }
.code pre { margin: 0; padding: 10px 64px 10px 12px; font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-all; color: #cfd6e4; }
.code .copy { position: absolute; top: 6px; right: 6px; }

/* Earn: a tab per way (role=tablist), the open way below at its own height (the page scrolls as one);
   short chips on top, steps beside the action on wide screens; the validator guide in a frame sized to it */
.earn-tabs { display: flex; flex-wrap: wrap; gap: 6px; flex: none; }
.earn-tab { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-weight: 600; white-space: nowrap; }
.earn-tab:hover { border-color: var(--line-2); }
.earn-tab[aria-selected="true"] { border-color: var(--accent); background: rgba(124, 108, 255, .14); }
.earn-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.earn-tab svg { width: 18px; height: 18px; flex: none; stroke: var(--accent-2); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.earn-detail { flex: none; gap: 14px; }
.earn-detail .stats { margin: 0; }
.earn-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.earn-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 11px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: 13px; line-height: 1.4; }
.earn-chip:not(:has(.info)) { padding-right: 11px; }
.earn-chip b { color: var(--dim); font-weight: 500; }
.earn-chip .info { width: 16px; height: 16px; font-size: 10px; }
.earn-ext { margin-left: auto; white-space: nowrap; }
.earn-cols { display: grid; gap: 14px 32px; grid-template-columns: minmax(0, 1fr); }
.earn-main, .earn-side { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.earn-side h3 { margin: 0; }
.earn-cta { display: flex; align-items: center; justify-content: center; padding: 18px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--surface); }
.earn-detail .btn.big { padding: 11px 26px; font-size: 15px; }
.earn-detail .row.wrap { flex-wrap: wrap; }
.earn-detail .ef { margin: 0; }
.earn-detail.framed { padding: 12px 12px 4px; }
.earn-guide-frame { display: block; width: 100%; height: 640px; border: 0; border-radius: 10px; background: var(--card); }
.howto.cols2 { display: block; column-gap: 32px; }
.howto.cols2 li { break-inside: avoid; margin-bottom: 8px; }
.earn-foot { flex: none; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; }
.earn-foot .note { margin: 0; }
@media (min-width: 1100px) {
  .earn-cols { grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); align-items: start; }
  .howto.cols2 { column-count: 2; }
}
@media (max-width: 860px) {
  .earn-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
  .earn-ext { margin-left: 0; }
}

.note { margin: auto 0 6px; color: var(--accent-2); font-size: 13px; cursor: help; }
.warnline { margin: 0; color: var(--warn); }
.kv3 { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0 0 8px; font-size: 13px; }
.kv3 dt { color: var(--dim); }
.kv3 dd { margin: 0; }
.howto { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.howto li::marker { color: var(--accent-2); font-weight: 700; }
.howto p { margin: 0; }

.chart-box { flex: 1; min-height: 0; display: flex; align-items: flex-end; }
.chart { width: 100%; height: 100%; max-height: 220px; }
.chart .bar { fill: var(--accent); }
.chart .hit { fill: transparent; }
.chart .hit:hover + .bar { fill: var(--accent-2); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--faint); font: 10px var(--mono); }
.hbars { display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.hbar { display: grid; grid-template-columns: minmax(90px, 38%) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.hb-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-track { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.hb-fill { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--accent); transition: width .4s; }
.hb-val { color: var(--dim); }
.tbl .pill { margin-right: 6px; }

@media (max-width: 860px) {
  .group { display: none; }
  .grid2, .grid3, .stats.three { grid-template-columns: minmax(0, 1fr); }
  .grid2 { grid-auto-rows: auto; }
  .chart-box { height: 180px; }
}

/* wallet bar (walletbar.js) */
#wb-btn { max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.wb-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.wb-list { display: grid; gap: 8px; margin: 8px 0; }
.wb-wallet { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--text); font: inherit; cursor: pointer; text-align: left; text-decoration: none; }
.wb-wallet:hover { border-color: var(--accent, #7c5cff); }
.wb-wallet img, .wb-ico { width: 24px; height: 24px; border-radius: 6px; flex: none; }
.wb-ico { background: var(--line-2); }
.wb-acc { font-size: 12px; word-break: break-all; margin-bottom: 8px; }
.wb-bal { list-style: none; margin: 4px 0 10px; padding: 0; display: grid; gap: 6px; }
.wb-bal li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line-2); padding-bottom: 6px; }
.wb-tok { position: relative; display: inline-block; width: 20px; height: 20px; margin-right: 8px; vertical-align: -5px; }
.wb-logo { width: 20px; height: 20px; border-radius: 50%; display: block; }
.wb-letter { background: var(--card-2); color: var(--text); font: 700 11px/20px var(--font); text-align: center; }
.wb-letter::before { content: attr(data-l); }
.wb-net { position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px var(--surface); }
.wb-add { margin-left: 8px; padding: 1px 7px; font-size: 11px; }
#wb-dialog h4 { margin: 8px 0 2px; font-size: 13px; color: var(--dim); }
.wb-msg:empty { display: none; }
@media (max-width: 640px) { #wb-btn { max-width: 40vw; padding: 8px 10px; } }

/* Mine page modes and "Do useful work" (work.js) */
.wk-mode { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); max-width: 100%; flex-wrap: wrap; }
.wk-mode-btn { border: 0; background: transparent; color: var(--dim); font: inherit; font-size: 13.5px; font-weight: 600; padding: 7px 14px; border-radius: 99px; cursor: pointer; }
.wk-mode-btn.on { background: var(--card-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.wk-mode-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.mn-grid.wk-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .mn-grid.wk-grid { grid-template-columns: minmax(0, 1fr); } }
.wk-card { display: flex; flex-direction: column; gap: 10px; }
.wk-card h2 { margin: 0; font-size: 17px; }
.wk-card h3 { margin: 4px 0 0; font-size: 14px; }
.wk-card .notice { margin: 0; color: var(--accent-2); }
.wk-finding { margin: 0; padding: 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; word-break: break-all; }
.wk-kinds { margin: 0; padding-left: 18px; }
.wk-kinds li { margin: 2px 0; overflow-wrap: anywhere; }
/* Mine testnet ZETAPHY (mine.js) and the Earn page's faucet form */
.mn-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); align-items: start; }
.mn-grid .howto { gap: 4px; }
.mn-card { gap: 14px; }
.mn-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mn-title h2 { margin: 0; font-size: 17px; }
.mn-title p { margin: 2px 0 0; }
.mn-pill { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 4px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line-2); color: var(--dim); }
.mn-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.mn-pill[data-s="mining"] { color: var(--ok); border-color: rgba(25, 195, 125, .45); background: rgba(25, 195, 125, .08); }
.mn-pill[data-s="mining"]::before { animation: pulse 1.6s infinite; }
.mn-pill[data-s="paused"] { color: var(--warn); border-color: rgba(240, 185, 11, .45); }
.mn-pill[data-s="claiming"] { color: var(--accent-2); border-color: rgba(63, 200, 255, .45); }
.mn-pill[data-s="done"] { color: var(--ok); border-color: rgba(25, 195, 125, .45); }
.mn-pill[data-s="error"] { color: var(--bad); border-color: rgba(246, 70, 93, .45); }

/* the miners: a cave, a ground line, one miner per worker; they swing only while .on (mining) */
.mn-art { position: relative; height: 210px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(transparent calc(100% - 18px), #1a2232 calc(100% - 18px), #141a26),
    radial-gradient(120% 90% at 50% 0%, rgba(124, 108, 255, .16), transparent 60%), linear-gradient(#0e1422, #090d15); }
.mn-crew { position: absolute; inset: 8px 36px 14px; display: flex; justify-content: center; align-items: flex-end; gap: 4px; }
.mn-crew svg { flex: 0 1 260px; min-width: 0; height: 100%; overflow: visible; }
.mn-crew[data-n="5"], .mn-crew[data-n="6"], .mn-crew[data-n="7"], .mn-crew[data-n="8"] { inset: 50px 12px 14px; }
.mn-pause { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(5, 7, 10, .55); color: var(--text); cursor: pointer; font-size: 11px; }
.mn-pause:disabled { opacity: .35; cursor: default; }
.mn-pause:not(:disabled):hover { border-color: var(--accent); }
.mg-rock { fill: #384157; stroke: #4a556e; stroke-width: 1.2; }
.mg-ore { fill: var(--accent); } .mg-ore.b { fill: var(--accent-2); }
.mg-leg { fill: #2a3550; } .mg-boot { fill: #11161f; }
.mg-body { fill: #2f6fd6; } .mg-strap { fill: #f0b90b; }
.mg-skin { fill: #f2c9a0; } .mg-eye { fill: #1a1f2b; }
.mg-helmet { fill: #f0b90b; } .mg-lamp { fill: #fff6c2; }
.mg-handle { stroke: #9b6a3c; stroke-width: 3.2; stroke-linecap: round; fill: none; }
.mg-head { stroke: #c9d1de; stroke-width: 3.6; stroke-linecap: round; fill: none; }
.mg-sleeve { stroke: #2f6fd6; stroke-width: 6; stroke-linecap: round; fill: none; }
.mg-arm { transform-box: view-box; transform-origin: 47px 59px; transform: rotate(-8deg); }
.mg-spark { fill: #ffd76a; opacity: 0; }
.mg-coin { opacity: 0; }
.mg-coin circle { fill: #f0b90b; stroke: #b88a00; stroke-width: 1.2; }
.mg-coin text { fill: #5a3d00; font: 700 8px var(--font); }
.mn-art.on .mg-arm { animation: mg-swing .9s ease-in infinite; animation-delay: var(--d, 0s); }
.mn-art.on .mg-spark { animation: .9s ease-out infinite; animation-delay: var(--d, 0s); }
.mn-art.on .s1 { animation-name: mg-s1; } .mn-art.on .s2 { animation-name: mg-s2; } .mn-art.on .s3 { animation-name: mg-s3; }
.mn-art.on .mg-coin { animation: mg-coin 2.7s ease-out infinite; animation-delay: var(--d, 0s); }
.mn-crew svg:nth-child(2) { --d: -.45s; } .mn-crew svg:nth-child(3) { --d: -.2s; } .mn-crew svg:nth-child(4) { --d: -.65s; }
.mn-crew svg:nth-child(5) { --d: -.1s; } .mn-crew svg:nth-child(6) { --d: -.55s; } .mn-crew svg:nth-child(7) { --d: -.3s; } .mn-crew svg:nth-child(8) { --d: -.75s; }
@keyframes mg-swing { 0% { transform: rotate(-70deg); } 50% { transform: rotate(-82deg); } 70% { transform: rotate(3deg); } 78% { transform: rotate(-4deg); } 100% { transform: rotate(-70deg); } }
@keyframes mg-s1 { 0%, 68% { opacity: 0; transform: translate(0, 0); } 72% { opacity: 1; } 100% { opacity: 0; transform: translate(-10px, -12px); } }
@keyframes mg-s2 { 0%, 68% { opacity: 0; transform: translate(0, 0); } 72% { opacity: 1; } 100% { opacity: 0; transform: translate(-3px, -16px); } }
@keyframes mg-s3 { 0%, 68% { opacity: 0; transform: translate(0, 0); } 72% { opacity: 1; } 100% { opacity: 0; transform: translate(-13px, -3px); } }
@keyframes mg-coin { 0%, 22% { opacity: 0; transform: translate(0, 6px); } 27% { opacity: 1; transform: translate(0, 0); } 58% { opacity: 0; transform: translate(-3px, -28px); } 100% { opacity: 0; transform: translate(-3px, -28px); } }
@media (prefers-reduced-motion: reduce) { .mn-art.on *, .mn-pill::before { animation: none !important; } }

.mn-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mn-tile { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); outline: none; }
.mn-tile:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.mn-tile .k { font-size: 12px; color: var(--dim); }
.mn-tile .v { font-size: 24px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-bar { height: 6px; margin-top: 4px; }
.mn-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mn-table th { text-align: left; font-weight: 500; color: var(--dim); padding: 7px 12px 7px 0; width: 200px; vertical-align: middle; border-bottom: 1px solid var(--line); }
.mn-table td { padding: 7px 0; border-bottom: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.mn-table tr:last-child th, .mn-table tr:last-child td { border-bottom: 0; }
.mn-table input { width: 100%; }
.mn-step { display: inline-flex; align-items: center; gap: 10px; }
.mn-step .btn { width: 30px; padding: 4px 0; font-size: 15px; }
.mn-step span { min-width: 1.5em; text-align: center; font-size: 15px; font-weight: 600; }
.mn-go { width: 100%; padding: 13px 20px; font-size: 16px; border-radius: 12px; background: var(--ok); }
.mn-go.stop { background: var(--bad); }
.mn-go.done { background: transparent; border-color: rgba(25, 195, 125, .5); color: var(--ok); }
.mn-card .msg { margin: 0; }
.mn-card .msg:empty { display: none; }
@media (max-width: 1000px) { .mn-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
  .mn-art { height: 170px; }
  .mn-crew { inset: 34px 8px 14px; }
  .mn-tile .v { font-size: 19px; }
  .mn-table th { width: 40%; }
  .mn-table td .row { flex-wrap: wrap; }
  .mn-table td .row input { flex: 1 1 100%; }
}
.ef { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; }

/* wallet-safety.js: the large-balance banner floats over the top of the stage (the hub fits one screen) */
.stage > .ws-banner { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 6; width: min(760px, calc(100% - 24px)); margin: 0; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }

/* ---------- Agents (agents.js): intent card beside labels / agents / wallet cards ---------- */
.ag-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; flex: none; }
.ag-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ag-card { gap: 8px; overflow-wrap: anywhere; }
.ag-card textarea { width: 100%; box-sizing: border-box; resize: vertical; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; color: inherit; font: inherit; outline: none; }
.ag-card textarea:focus { border-color: var(--accent); }
.ag-card .sp-form input, .ag-card .sp-form select { width: 100%; box-sizing: border-box; }
.ag-model summary { cursor: pointer; color: var(--dim); font-size: 13px; margin-bottom: 6px; }
.ag-wide { grid-column: 1 / -1; margin: 0; }
.ag-card .row { flex-wrap: wrap; }
.ag-review th { width: 170px; }
.ag-summary { font-weight: 600; margin: 4px 0 8px; }
@media (max-width: 1000px) { .ag-grid { grid-template-columns: minmax(0, 1fr); } }
/* assistant pages (assist.js): governance items, the Neuro-checked badge in the wallet bar */
.ga-item { padding: 10px 0; border-bottom: 1px solid var(--line, rgba(255,255,255,.08)); }
.ga-item h3 { margin: 0 0 4px; font-size: 14px; }
.ga-item p { margin: 2px 0; overflow-wrap: anywhere; }
.wb-neuro { color: var(--ok, #3fb950); font-size: 11px; white-space: nowrap; }

/* ---------- line icons (flow.js) ---------- */
.fl-ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fl-ic.sm { width: 15px; height: 15px; }
.fl-ic.big { width: 28px; height: 28px; }
.fl-ic.hero { width: 40px; height: 40px; }

/* ---------- "How it works": four steps lit one after another, then where to go next ---------- */
.how { grid-area: how; display: flex; align-items: center; gap: 16px; padding: 10px 20px; border-bottom: 1px solid var(--line); background: var(--rail); overflow-x: auto; min-width: 0; }
.how.closed { padding-top: 4px; padding-bottom: 4px; }
.how-toggle { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 99px; background: transparent; color: var(--dim); font-size: 12px; cursor: pointer; }
.how-toggle:hover { color: var(--text); border-color: var(--accent); }
.how-toggle .fl-ic { color: var(--accent-2); }
.how-steps { display: flex; list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; }
.how-step { position: relative; display: flex; align-items: center; gap: 10px; flex: 1; min-width: 150px; padding-right: 30px; }
.how-step:not(:last-child)::after { content: ""; position: absolute; right: 6px; top: 50%; width: 18px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--line-2) 0 35%, var(--accent-2) 50%, var(--line-2) 65%); background-size: 300% 100%; animation: how-flow 2.2s linear infinite; }
.how-pic { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(124, 108, 255, .12); color: var(--accent-2); border: 1px solid var(--line); animation: how-lit 8s infinite; }
.how-pic .fl-ic { width: 22px; height: 22px; }
.how-step:nth-child(2) .how-pic { animation-delay: 2s; }
.how-step:nth-child(3) .how-pic { animation-delay: 4s; }
.how-step:nth-child(4) .how-pic { animation-delay: 6s; }
.how-n { position: absolute; top: -6px; right: -6px; width: 17px; height: 17px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-2); font: 700 10px/15px var(--mono); text-align: center; color: var(--dim); }
.how-t { font-size: 12.5px; line-height: 1.35; color: var(--text); }
.how-next { flex: none; display: flex; align-items: center; gap: 6px; }
.how-k { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.how-next .chip { padding: 5px 9px; font-size: 12px; border-radius: 10px; gap: 6px; }
@keyframes how-lit {
  0%, 20% { background: var(--grad); color: #fff; border-color: transparent; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(124, 108, 255, .35); }
  27%, 100% { background: rgba(124, 108, 255, .12); color: var(--accent-2); border-color: var(--line); transform: none; box-shadow: none; }
}
@keyframes how-flow { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- jobs that keep running on other tabs ---------- */
.tab.busy::after, .chip.busy::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(25, 195, 125, .6); animation: pulse 2s infinite; flex: none; }
.tab.busy::after { margin-left: auto; }
.busy-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid rgba(25, 195, 125, .35); border-radius: 99px; background: rgba(25, 195, 125, .1); color: var(--ok); font-size: 12px; cursor: pointer; }
.busy-pill .dot { background: var(--ok); animation: pulse 2s infinite; }

/* ---------- AI map ---------- */
.am-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.am-head h2 { margin: 0 0 4px; }
.am-head p { margin: 0; max-width: 880px; color: var(--dim); }
.am-hero { flex: none; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 20px; background: var(--grad); color: #fff; }
.am-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.am-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); color: var(--dim); font-size: 12.5px; cursor: pointer; }
.am-chip b { font: 700 12px var(--mono); color: var(--text); }
.am-chip.on { color: var(--text); border-color: currentColor; background: var(--card-2); }
.am-group { margin-top: 20px; }
.am-gh { display: flex; align-items: center; gap: 10px; font-size: 16px; margin: 0 0 10px; }
.am-gh .fl-ic { color: var(--accent-2); width: 22px; height: 22px; }
.am-gh b { font-size: 12px; color: var(--faint); }
.am-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.am-card { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; transition: transform .15s, border-color .15s; }
.am-card:hover { transform: translateY(-2px); border-color: var(--line-2); }
.am-card h3 { margin: 0; font-size: 15px; }
.am-card p { margin: 0; }
.am-top { display: flex; align-items: flex-start; justify-content: space-between; }
.am-pic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: rgba(124, 108, 255, .12); color: var(--accent-2); }
.am-card:hover .am-pic { background: var(--grad); color: #fff; }
.am-num { font-size: 12px; color: var(--faint); }
.am-st { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; border: 1px solid currentColor; }
.am-where { display: flex; gap: 6px; align-items: center; }
.am-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.st-live { color: var(--ok); }
.st-practice { color: var(--accent-2); }
.st-notDeployed { color: var(--warn); }
.st-chain { color: #a78bfa; }
.st-cli { color: var(--dim); }
.am-card.st-live, .am-card.st-practice, .am-card.st-notDeployed, .am-card.st-chain, .am-card.st-cli { color: var(--text); }
.am-card.st-live { border-top: 3px solid var(--ok); }
.am-card.st-practice { border-top: 3px solid var(--accent-2); }
.am-card.st-notDeployed { border-top: 3px solid var(--warn); }
.am-card.st-chain { border-top: 3px solid #a78bfa; }
.am-card.st-cli { border-top: 3px solid var(--faint); }
@media (prefers-reduced-motion: reduce) {
  .how-pic, .how-step::after, .tab.busy::after, .chip.busy::after, .busy-pill .dot { animation: none; }
  .am-card { transition: none; }
}

/* narrow screens: the strip scrolls sideways (after the rules above, so these win) */
@media (max-width: 860px) {
  .how { padding: 8px 12px; gap: 10px; }
  .how-steps { flex: none; }
  .how-step { flex: none; min-width: 0; width: 150px; padding-right: 26px; }
  .how-t { font-size: 11.5px; }
  .how-pic { width: 34px; height: 34px; }
  .how-next .how-k { display: none; }
  .busy-pill span { display: none; }
  .am-head { align-items: flex-start; }
  .am-hero { width: 52px; height: 52px; border-radius: 16px; }
}

/* On-chain AI tab (aichain.js) */
.ac-form { display: grid; gap: 6px; }
.ac-form input { min-width: 0; }
.ac-card .kv3 dd { overflow-wrap: anywhere; }
.ac-card .tbl td { white-space: normal; }
.ac-list { margin: 0 0 8px; padding-left: 18px; max-height: 9em; overflow: auto; overflow-wrap: anywhere; }
.ac-level.lv-minimal, .ac-level.lv-low { color: var(--ok); }
.ac-level.lv-medium, .ac-level.lv-high { color: var(--warn); }

/* the network pill (hub.js): shown while the browser is offline */
.net-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid rgba(255, 176, 32, .4); border-radius: 99px; background: rgba(255, 176, 32, .1); color: var(--warn); font-size: 12px; }
.net-pill[hidden] { display: none; }
.net-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }

/* Offline tab (offline.js) */
.off-card .kv3 dd { overflow-wrap: anywhere; }
.off-card h3 { margin: 10px 0 6px; font-size: 13px; font-weight: 600; }
.off-form { display: grid; gap: 8px; }
.off-form input, .off-form select { width: 100%; box-sizing: border-box; }
.off-field { display: grid; gap: 4px; min-width: 0; }
.off-2 { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.off-text { width: 100%; box-sizing: border-box; resize: vertical; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 12px; color: inherit; font-size: 12px; outline: none; overflow-wrap: anywhere; }
.off-text:focus { border-color: var(--accent); }
.off-in { display: grid; gap: 6px; }
.off-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.off-pick { cursor: pointer; }
.row.wrap { flex-wrap: wrap; }
.off-share { display: grid; gap: 10px; grid-template-columns: 180px minmax(0, 1fr); align-items: start; margin-top: 8px; }
.off-share-side { display: grid; gap: 6px; }
.off-qr { width: 180px; height: 180px; border-radius: 8px; }
.off-qr-bg { fill: #fff; }
.off-qr-fg { fill: #000; }
.off-risks { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 6px; }
.off-problems { margin: 4px 0 8px; padding-left: 18px; }
.off-problems .bad { color: var(--bad); }
.off-net { margin: 0 0 10px; font-size: 12px; }
.off-net[data-online="0"] { color: var(--warn); }
.off-net[data-online="1"] { color: var(--ok); }
.off-ch td { white-space: normal; vertical-align: top; }
@media (max-width: 700px) { .off-share { grid-template-columns: minmax(0, 1fr); } .off-2 { grid-template-columns: minmax(0, 1fr); } }

/* Audit tab (audit.js) */
.au-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
#au-reqs { grid-column: 1 / -1; }
.au-card .kv3 dd { overflow-wrap: anywhere; }
.au-card .tbl td { white-space: normal; }
.au-card .msg.ok { color: var(--ok); }
.au-card .msg.bad { color: var(--bad); }
.au-card .msg.warn { color: var(--warn); }
@media (max-width: 900px) { .au-grid { grid-template-columns: minmax(0, 1fr); } }

/* Quantum safety tab (quantum.js) */
.qs-meter { width: 100%; height: 12px; margin: 4px 0 8px; }
.qs-score.qs-low b { color: var(--bad); }
.qs-score.qs-medium b { color: var(--warn); }
.qs-score.qs-high b { color: var(--ok); }
.pill.qs-pq, .pill.qs-hybrid { color: var(--ok); border-color: rgba(25, 195, 125, .4); }
.pill.qs-partial { color: var(--warn); border-color: rgba(240, 185, 11, .4); }
.pill.qs-classical { color: var(--bad); border-color: rgba(246, 70, 93, .4); }
.qs-score + .qs-meter + p .pill { margin-right: 6px; }
.qs-open { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 4px; }
.qs-kit { width: 100%; box-sizing: border-box; font-size: 12px; resize: vertical; }
#qs-ready { grid-column: 1 / -1; }
