:root {
  color-scheme: dark;
  --bg: #0d0d0d;
  --panel: #1a1a19;
  --line: #2c2c2a;
  --axis: #383835;
  --text: #ffffff;
  --text-2: #c3c2b7;
  --muted: #898781;
  --accent: #c98500;
  --review: #e66767;
  --ok: #0ca30c;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --seq-2: #86b6ef; --seq-4: #3987e5; --seq-6: #184f95;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: -apple-system, system-ui, "Segoe UI", Inter, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); }
a { color: inherit; }
h2 { margin: 0 0 10px; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
h2 .hint, .hint { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 8px; color: var(--muted); font: 11px var(--mono); }

header { padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.brand h1 { margin: 0; font: 600 22px/1 var(--mono); letter-spacing: -0.02em; }
.brand .tld { color: var(--accent); }
.brand .sub { color: var(--text-2); font-size: 13px; }
.brand .sub #model { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.brand .status { margin-left: auto; font: 11px var(--mono); color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); align-self: center; }
.dot.live { background: var(--ok); animation: pulse 1.6s infinite; }
.dot.paused { background: var(--accent); animation: pulse-amber 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(12,163,12,.6);} 100% { box-shadow: 0 0 0 10px rgba(12,163,12,0);} }
@keyframes pulse-amber { 0% { box-shadow: 0 0 0 0 rgba(201,133,0,.6);} 100% { box-shadow: 0 0 0 10px rgba(201,133,0,0);} }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.stat .v { font: 500 24px/1.1 var(--mono); }
.stat .v small { font-size: 12px; color: var(--muted); margin: 0 2px; }
.stat .k { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
.stat.big .v { color: var(--accent); font-size: 30px; }
.stat.dual .v { font-size: 18px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; padding: 16px; }
.panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-content: start; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; min-width: 0; }
.tile.wide { grid-column: span 3; }
.cloud-tile { grid-column: span 3; }
.graph-tile { grid-column: span 2; }
.savings-tile { grid-column: span 2; }

/* barometer */
.baro-tile canvas { width: 100%; height: auto; display: block; }
.baro-labels { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; margin-top: 6px; }
.baro-labels .k { font: 11px var(--mono); color: var(--muted); }
.baro-labels .v { font: 500 15px var(--mono); color: var(--text); }

/* horizontal bars */
.hbars { display: flex; flex-direction: column; gap: 3px; font: 11px var(--mono); }
.hbars .hrow { display: grid; grid-template-columns: 78px 1fr 44px 44px; gap: 8px; align-items: center; padding: 1px 2px; border-radius: 4px; }
.hbars .hrow:not(.head) { cursor: pointer; }
.hbars .hrow:not(.head):hover { background: #232322; }
.hbars .hrow.sel { outline: 1px solid var(--accent); }
.hbars .k { color: var(--text-2); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbars .track { position: relative; height: 12px; background: var(--bg); border-radius: 3px; }
.hbars .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--seq-4); border-radius: 0 3px 3px 0; transition: width .6s ease; }
.hbars .base { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--text-2); transition: left .6s ease; }
.hbars .pct { color: var(--text); text-align: right; }
.hbars .delta { text-align: right; color: var(--muted); }
.hbars .delta.up { color: #0ca30c; }
.hbars .delta.down { color: var(--review); }
.hbars .head { color: var(--muted); font-size: 10px; }

/* svg charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--axis); stroke-width: 1; }
.chart text { font: 10px var(--mono); fill: var(--muted); }
.chart .tip { position: absolute; pointer-events: none; background: #0d0d0d; border: 1px solid var(--axis); border-radius: 6px; padding: 6px 8px; font: 11px var(--mono); color: var(--text-2); white-space: nowrap; display: none; z-index: 2; }
.chart .tip b { color: var(--text); font-weight: 500; }
.chart .cross { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 2 3; display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font: 11px var(--mono); color: var(--text-2); }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* cloud */
.cloud { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; min-height: 120px; }
.cloud .term { white-space: nowrap; font-family: var(--mono); padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); color: var(--text-2); background: var(--bg); line-height: 1.3; cursor: pointer; transition: transform .2s; }
.cloud .term:hover { transform: scale(1.06); color: var(--text); }
.cloud .term small { color: var(--muted); margin-left: 5px; font-size: 10px; }
.cloud .s1 { font-size: 12px; } .cloud .s2 { font-size: 15px; } .cloud .s3 { font-size: 19px; font-weight: 500; }
.cloud .b1 { border-color: #5a3a12; } .cloud .b2 { border-color: #a05f10; background: #2a1a05; color: #f0c070; } .cloud .b3 { border-color: var(--accent); background: #3d2500; color: #ffd27a; }
.cloud .term.sel { outline: 1px solid var(--accent); outline-offset: 1px; }
.cloud .tag { color: var(--s7); }
.cloud .empty { color: var(--muted); font: 12px var(--mono); }

/* graph */
#graph { width: 100%; height: auto; display: block; max-height: 360px; }
#graph line { stroke: var(--seq-6); stroke-linecap: round; }
#graph circle { fill: var(--seq-4); stroke: var(--panel); stroke-width: 2; cursor: pointer; }
#graph circle.sel { stroke: var(--accent); }
#graph text { font: 10px var(--mono); fill: var(--text-2); paint-order: stroke; stroke: var(--panel); stroke-width: 3px; pointer-events: none; }

/* wire */
.wire { margin: 0; padding: 0 0 0 18px; display: flex; flex-direction: column; gap: 8px; }
.wire li { font-size: 12px; color: var(--text-2); }
.wire .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wire .m { font: 10px var(--mono); color: var(--muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.wire .m a { text-decoration: none; }
.wire .m .hot { color: var(--review); }

/* calibration */
.calib-foot { font: 11px var(--mono); color: var(--muted); margin-top: 6px; }

/* sidebar feed */
.sidebar { min-width: 0; display: flex; flex-direction: column; position: sticky; top: 12px; align-self: start; max-height: calc(100vh - 24px); }
.tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; flex: none; flex-wrap: wrap; }
.filters { display: flex; flex-wrap: wrap; gap: 4px; }
.fchip { display: inline-flex; align-items: center; gap: 3px; font: 11px var(--mono); padding: 2px 3px 2px 8px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); }
.fchip button { background: none; border: 0; color: inherit; font: 13px/1 var(--mono); cursor: pointer; padding: 0 4px; }
.fchip button:hover { color: var(--text); }
.tab { background: var(--panel); border: 1px solid var(--line); color: var(--text-2); font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.tab.active { color: var(--text); border-color: var(--text-2); }
.tab .count { color: var(--review); margin-left: 4px; }
.tabs .hint { margin-left: auto; }
.cards { display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-right: 2px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; animation: drop .35s ease-out; }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.card.review { border-color: rgba(230,103,103,.4); }
.card .text { margin: 0 0 6px; font-size: 13px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; word-break: break-word; }
.card .text a { color: inherit; text-decoration: none; }
.card .text a:hover { text-decoration: underline; }
.card .meta { display: flex; gap: 8px; flex-wrap: wrap; font: 10px var(--mono); color: var(--muted); margin-bottom: 6px; }
.card .meta a { text-decoration: none; }
.card .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font: 11px var(--mono); padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); }
.chip.hot { border-color: var(--review); color: var(--review); }
.chip.warm { border-color: var(--accent); color: var(--accent); }
.meter { display: grid; grid-template-columns: 48px minmax(36px, 1fr) minmax(0, 52%); gap: 8px; align-items: center; font: 10px var(--mono); color: var(--muted); margin-top: 5px; }
.meter .steps { display: flex; align-items: flex-end; gap: 2px; height: 16px; background: var(--bg); border-radius: 3px; padding: 2px 3px; }
.meter .steps i { flex: 1; background: var(--seq-6); border-radius: 1px; min-height: 1px; }
.meter .steps i.on { background: var(--seq-2); }
.meter .lv { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.ask { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font: 11px var(--mono); color: var(--text-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ask b { color: var(--review); font-weight: 500; }
.ask button { font: 11px var(--mono); background: var(--bg); border: 1px solid var(--axis); color: var(--text); padding: 2px 8px; border-radius: 5px; cursor: pointer; }
.ask button:hover { border-color: var(--text-2); }
.ask .done { color: var(--ok); }

footer { display: flex; gap: 16px; flex-wrap: wrap; padding: 12px 16px 24px; color: var(--muted); font: 11px var(--mono); border-top: 1px solid var(--line); }
footer a { margin-left: 0; }
footer > a:last-child { margin-left: auto; }

@media (max-width: 1200px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; }
  .cards { max-height: 70vh; }
}
@media (max-width: 820px) {
  .panel { grid-template-columns: 1fr 1fr; }
  .tile.wide, .cloud-tile, .baro-tile, .graph-tile, .savings-tile { grid-column: span 2; }
  .stat .v { font-size: 18px; } .stat.big .v { font-size: 24px; }
}
@media (max-width: 560px) {
  .panel { grid-template-columns: 1fr; }
  .tile.wide, .cloud-tile, .baro-tile, .graph-tile, .savings-tile { grid-column: span 1; }
}

/* performance */
.perf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.perf .h { min-width: 0; }
.perf .h .t { font: 11px var(--mono); color: var(--text-2); margin-bottom: 4px; display: flex; justify-content: space-between; gap: 6px; }
.perf .h .t b { color: var(--text); font-weight: 500; }
.perf .bars { display: flex; align-items: flex-end; gap: 2px; height: 56px; background: var(--bg); border-radius: 4px; padding: 4px 4px 0; }
.perf .bars i { flex: 1; background: var(--seq-4); border-radius: 2px 2px 0 0; min-height: 1px; }
.perf .bars i.hi { background: var(--seq-2); }
.perf .ax { display: flex; justify-content: space-between; font: 10px var(--mono); color: var(--muted); margin-top: 2px; }
@media (max-width: 820px) { .perf { grid-template-columns: repeat(2, minmax(0, 1fr)); } .perf-tile { grid-column: span 2; } }
@media (max-width: 560px) { .perf-tile { grid-column: span 1; } }

/* savings */
.savings { font: 12px var(--mono); color: var(--text-2); display: flex; flex-direction: column; gap: 8px; }
.savings .in { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.savings label { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.savings input { width: 56px; font: 12px var(--mono); background: var(--bg); color: var(--text); border: 1px solid var(--axis); border-radius: 5px; padding: 2px 5px; }
.savings .row { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line); padding: 3px 0; }
.savings .row b { color: var(--text); font-weight: 500; text-align: right; }
.savings .row.hero b { color: var(--accent); font-size: 18px; }
.savings .note { color: var(--muted); font-size: 11px; }
.ask.spot b { color: var(--accent); }

/* operating curve */
.chart .mark { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .pick-line { stroke: var(--accent); stroke-width: 1.5; }
.curve-ctl { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; font: 11px var(--mono); color: var(--muted); }
.curve-ctl input[type="range"] { flex: 0 1 260px; accent-color: var(--accent); background: transparent; cursor: pointer; }
.curve-ctl .pick { color: var(--text-2); }
.curve-ctl .pick b { color: var(--text); font-weight: 500; }

/* funding meters */
.fund .meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 6px 18px; font: 11px var(--mono); }
.fund .m { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.fund .m .k { color: var(--muted); }
.fund .m .track { position: relative; height: 12px; background: var(--bg); border-radius: 3px; }
.fund .m .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; transition: width .6s ease; }
.fund .m .tick { position: absolute; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--text-2); }
.fund .m .v { color: var(--text); white-space: nowrap; }
.fund .foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; font: 11px var(--mono); color: var(--muted); }
.fund .give { border: 1px solid var(--accent); color: var(--accent); background: var(--bg); padding: 4px 10px; border-radius: 6px; text-decoration: none; }
.fund .give:hover { background: #2a1a05; }

/* badge */
footer .badge { display: inline-flex; align-items: center; gap: 8px; }
footer .badge img { vertical-align: middle; }
footer .badge .snip { display: inline-flex; align-items: center; gap: 6px; }
footer .badge .snip[hidden] { display: none; }
footer .badge code { background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 2px 6px; color: var(--text-2); }
footer .badge button { font: 11px var(--mono); background: var(--bg); border: 1px solid var(--axis); color: var(--text); padding: 2px 8px; border-radius: 5px; cursor: pointer; }
footer .badge button:hover { border-color: var(--text-2); }

/* backers */
.backers-tile { grid-column: span 2; }
@media (max-width: 560px) { .backers-tile { grid-column: span 1; } }
.backers { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px 16px; font: 11px var(--mono); }
.backers .therm { display: flex; align-items: flex-end; gap: 10px; }
.backers .tube { position: relative; width: 22px; height: 140px; background: var(--bg); border: 1px solid var(--line); border-bottom: 0; border-radius: 11px 11px 0 0; overflow: hidden; }
.backers .tube .fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(to top, var(--seq-6), var(--seq-2)); transition: height .8s ease; }
.backers .tube .tick { position: absolute; left: 0; right: 0; height: 1px; background: var(--axis); }
.backers .bulb { position: absolute; left: 50%; bottom: 0; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: var(--seq-6); }
.backers .col { position: relative; padding-bottom: 16px; }
.backers .num { color: var(--text-2); line-height: 1.6; }
.backers .num b { color: var(--text); font-weight: 500; font-size: 15px; }
.backers .num small { color: var(--muted); }
.backers .right { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.backers .head { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); }
.backers .head a { color: var(--accent); text-decoration: none; }
.backers .head a:hover { text-decoration: underline; }
.backers .board { display: flex; flex-direction: column; gap: 3px; }
.backers .r { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.backers .r .i { color: var(--muted); text-align: right; }
.backers .r .who { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.backers .r .tier { font-size: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; color: var(--muted); }
.backers .r .amt { color: var(--text); }
.backers .ticker { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.backers .empty { color: var(--muted); }
.backers .pin-slot { grid-column: 1 / -1; }
.backers .pinned { border: 1px solid var(--accent); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.backers .pinned .who { color: var(--accent); }
.backers .pinned .msg { margin: 0; font: 13px/1.45 var(--sans); color: var(--text); white-space: pre-wrap; word-break: break-word; }
.backers .pinned .msg a { color: var(--text-2); }
.backers .pinned .note { color: var(--muted); }
.backers .pinned .chips { display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 560px) { .backers { grid-template-columns: 1fr; } }

/* ads */
.ads-tile #ads { min-height: 90px; }
