:root {
  --bg: #0a0e15; --panel: #111721; --panel2: #161d29; --line: #1f2733; --line2: #2a3442;
  --text: #e9edf3; --muted: #8590a0; --gold: #e8b13a; --gold2: #f6cf6d; --pos: #22c55e; --neg: #ef4444;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column;
  font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; text-decoration: none; }
h1 { font-size: clamp(24px, 3.2vw, 32px); margin: 0; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: 15px; margin: 0; font-weight: 600; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 14px; margin: 14px 0 2px; }
p { margin: 0; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .gold { color: var(--gold); } .muted { color: var(--muted); font-size: 13px; }
.ic { width: 16px; height: 16px; flex: none; }
.sub { color: var(--muted); font-size: 13px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* top */
.risk { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 16px; font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); background: #0d121b; border-bottom: 1px solid var(--line); }
.risk .ic { color: var(--gold); width: 14px; height: 14px; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 22px; padding: 10px clamp(16px, 3vw, 36px);
  background: rgba(10,14,21,.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { display: block; height: 36px; width: auto; }
.brand b { display: block; font-size: 14px; letter-spacing: .16em; color: #f4efe2; font-weight: 700; }
.brand small { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: -2px; }
nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
nav a { padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; transition: .12s; }
nav a:hover { color: var(--text); background: var(--panel2); }
nav a.active { color: var(--gold); background: rgba(232,177,58,.12); }
.chip { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(232,177,58,.35); color: var(--gold); font-size: 12px; background: rgba(232,177,58,.06); }

main { width: 100%; max-width: 1280px; margin: 0 auto; padding: 26px clamp(16px, 3vw, 36px) 64px; flex: 1; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 22px; border-top: 1px solid var(--line); }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--gold); color: #17110a; border: 0; border-radius: 9px;
  padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; transition: .12s; }
.btn:hover { background: var(--gold2); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line2); padding: 7px 13px; font-weight: 500; font-size: 13px; }
.btn.ghost:hover { border-color: var(--gold); }
.btn.sm { padding: 7px 14px; font-size: 13px; }
input, select { background: #0b1018; border: 1px solid var(--line2); color: var(--text); border-radius: 8px; padding: 9px 11px; font: 14px var(--mono); width: 100%; }
select { font-family: inherit; }
.controls input, .controls select { height: 40px; }
input:focus, select:focus { border-color: var(--gold); outline: none; }
input[type=range] { accent-color: var(--gold); padding: 0; width: 160px; }
label.inline { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; white-space: nowrap; }
label.inline input[type=number] { width: 84px; padding: 6px 9px; }

/* page header */
.ph { margin-bottom: 18px; }
.actions { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.ph-title { display: flex; align-items: center; gap: 14px; }
.ph-title p { color: var(--muted); }
.badge { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: rgba(232,177,58,.12); color: var(--gold); flex: none; }
.badge .ic { width: 20px; height: 20px; }
.badge.red { background: rgba(239,68,68,.12); color: var(--neg); }
.badge.big { width: 54px; height: 54px; border-radius: 50%; }

/* kpis */
.kpis { display: grid; gap: 14px; margin-bottom: 14px; }
.k4 { grid-template-columns: repeat(4, 1fr); } .k3 { grid-template-columns: repeat(3, 1fr); }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; min-width: 0; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; }
.kpi-top .ic { color: var(--text); }
.kpi-top .ic.pos { color: var(--pos); } .kpi-top .ic.neg { color: var(--neg); }
.kpi-val { font-size: 27px; font-weight: 700; margin: 6px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; margin-bottom: 18px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head .sub { margin-top: 3px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.panel-right { display: flex; align-items: center; gap: 8px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel.flush .panel-head { padding: 16px 20px; border-bottom: 1px solid var(--line); margin: 0; }
.panel.flush .chart { margin: 14px 10px 10px 4px; width: auto; }
.tag { font-family: var(--mono); font-size: 12px; padding: 2px 8px; border-radius: 6px; background: #0b1018; color: var(--muted); }
.tag b { color: var(--text); } .tag.pos { background: rgba(34,197,94,.12); color: var(--pos); } .tag.neg { background: rgba(239,68,68,.12); color: var(--neg); }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; padding: 2px; }
.seg button, .toggle { background: transparent; border: 0; color: var(--muted); font: inherit; font-size: 12px; padding: 5px 10px; border-radius: 6px; cursor: pointer; }
.toggle { border: 1px solid var(--line2); }
.seg button.on, .toggle.on { background: var(--gold); color: #17110a; font-weight: 600; }
.toggle:disabled { opacity: .35; cursor: default; }
.chart { position: relative; width: 100%; }
.caption { text-align: center; color: var(--muted); font-size: 12px; margin-top: 6px; }
.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.cols2.tight { gap: 24px; }
.cols2 > .panel, .cols3 > .panel { margin-bottom: 18px; }

/* metric rows */
.rows { margin: 0; }
.rows div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rows div:last-child { border-bottom: 0; }
.rows dt { color: #c3cad4; } .rows dd { margin: 0; text-align: right; font-weight: 600; }

/* mini stats */
.minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.minis.m3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .minis.m2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 12px 0 0; }
.minis.m6 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 10px 0 0; }
.mini { background: #0d131c; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.mini span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.mini b { display: block; font-size: 16px; margin-top: 2px; overflow-wrap: anywhere; }

/* symbols */
.symbols { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto; }
.sym { background: #0d131c; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.sym-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.sym small { color: var(--muted); }
.bar { height: 6px; background: #1a222e; border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; } .bar i.g { background: var(--pos); } .bar i.r { background: var(--neg); }
td.barcell { width: 120px; }

/* weekdays */
.small-title { font-size: 13px; color: var(--muted); font-weight: 500; margin: 16px 0 8px; }
.weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wd { border-radius: 9px; padding: 9px 4px; text-align: center; border: 1px solid var(--line); }
.wd span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; }
.wd b { display: block; font-size: 14px; margin: 2px 0; } .wd small { font-size: 11px; color: var(--muted); }
.wd.g { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.25); } .wd.g b, .wd.g span { color: var(--pos); }
.wd.r { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.25); } .wd.r b, .wd.r span { color: var(--neg); }

/* monthly */
.legend { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.lg { display: inline-block; width: 90px; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, rgba(239,68,68,.9), rgba(239,68,68,.2), rgba(34,197,94,.2), rgba(34,197,94,.9)); }
table.months { border-collapse: separate; border-spacing: 4px; min-width: 980px; table-layout: fixed; }
table.months th:first-child { width: 56px; }
table.months th { text-align: center; font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; border: 0; padding: 4px; }
table.months tbody th { color: var(--text); font-size: 13px; font-weight: 700; }
table.months td { padding: 0; border: 0; text-align: center; }
.mcell { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 7px 2px; border-radius: 8px; border: 1px solid transparent;
  background: var(--c, #0d131c); font: 11px var(--mono); color: #d5dbe3; }
button.mcell { cursor: pointer; }
.mcell b { font-size: 13px; color: #fff; } .mcell b.pos { color: #b9f5cf; } .mcell b.neg { color: #ffc9c9; }
.mcell.none { background: #0d131c; color: var(--muted); } .mcell.none b { color: var(--muted); }
button.mcell:hover, button.mcell.sel { border-color: var(--gold); }
tr.sum td { font-size: 11px; color: var(--muted); padding-top: 6px; } tr.sum td b { display: block; font-size: 12px; } tr.sum td span { display: block; font-family: var(--mono); }
.detail { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--line2); border-radius: 12px; background: #0d131c; }

/* tables */
.table-wrap { overflow-x: auto; }
#eps .table-wrap { max-height: 560px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { color: var(--muted); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; position: sticky; top: 0; background: var(--panel); z-index: 1; }
tbody tr:hover td { background: rgba(255,255,255,.015); }
tr.hl td { background: rgba(239,68,68,.08); }
table.metrics td:nth-child(2) { font-weight: 600; }
table.metrics td.explain { text-align: left; color: var(--muted); white-space: normal; min-width: 320px; }
table.metrics th:nth-child(3) { text-align: left; }
table.split td:first-child { font-weight: 500; }
.verdict { margin-top: 14px; font-weight: 600; }
.worst { margin-top: 16px; padding: 14px 16px; border: 1px solid rgba(239,68,68,.35); background: rgba(239,68,68,.07); border-radius: 12px; }
.worst > b { color: var(--neg); } .worst p { color: #c3cad4; margin-top: 4px; }
.note { display: flex; gap: 10px; padding: 18px; border: 1px dashed var(--line2); border-radius: 12px; color: #c3cad4; font-size: 13px; }
.note .ic { color: var(--gold); margin-top: 2px; }

/* controls */
.controls { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; align-items: end; gap: 14px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; margin-bottom: 18px; }
.controls label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; }

/* cta */
.cta { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 16px; margin-bottom: 14px;
  background: linear-gradient(90deg, rgba(232,177,58,.07), var(--panel) 60%); border: 1px solid rgba(232,177,58,.22); transition: .12s; }
.cta.red { background: linear-gradient(90deg, rgba(239,68,68,.08), var(--panel) 60%); border-color: rgba(239,68,68,.25); }
.cta:hover { transform: translateY(-1px); border-color: var(--gold); }
.cta > div { flex: 1; } .cta b { font-size: 15px; } .cta p { color: var(--muted); }

/* landing */
.hero { text-align: center; padding: 34px 0 26px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12px; color: var(--pos);
  border: 1px solid rgba(34,197,94,.3); background: rgba(34,197,94,.07); margin-bottom: 18px; }
.pill .ic { width: 13px; height: 13px; }
.hero-title { font-size: clamp(32px, 5.4vw, 54px); line-height: 1.08; letter-spacing: -.035em; }
.gold-text { background: linear-gradient(180deg, var(--gold2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: var(--muted); max-width: 640px; margin: 16px auto 0; font-size: 16px; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 46px 24px; border: 2px dashed var(--line2); border-radius: 18px;
  background: var(--panel); cursor: pointer; transition: .15s; text-align: center; }
.drop:hover, .drop.over { border-color: var(--gold); background: rgba(232,177,58,.05); }
.drop strong { font-size: 16px; } .drop span { color: var(--muted); font-size: 13px; }
.drop-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: rgba(232,177,58,.12); color: var(--gold); margin-bottom: 8px; }
.drop-icon .ic { width: 22px; height: 22px; }
.error { color: var(--neg); min-height: 1.4em; margin: 10px 0 0; text-align: center; }
.callout { display: flex; gap: 14px; padding: 18px 20px; border-radius: 16px; background: rgba(232,177,58,.06); border: 1px solid rgba(232,177,58,.22); margin: 10px 0 18px; }
.callout.plain { background: var(--panel); border-color: var(--line); margin-top: 26px; }
.callout > .ic { color: var(--gold); width: 20px; height: 20px; margin-top: 2px; }
.callout p { color: #c3cad4; margin-top: 4px; }
.callout code { display: inline-block; margin-top: 10px; font: 12px var(--mono); padding: 4px 8px; border-radius: 6px; background: #0b1018; border: 1px solid var(--line2); }
.section-title { font-size: 22px; margin: 34px 0 14px; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: .15s; }
.feature:hover { border-color: rgba(232,177,58,.5); transform: translateY(-2px); }
.illu { height: 120px; display: grid; place-items: center; background: #0d131c; border-bottom: 1px solid var(--line); }
.illu svg { width: 170px; height: 90px; }
.feature-body { padding: 16px 18px; } .feature h3 { margin: 0 0 6px; } .feature p { color: var(--muted); font-size: 13px; }

.narrow { max-width: 760px; margin: 0 auto; }
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 14px; } .crumbs a { color: var(--gold); }
.panel.empty { text-align: center; }
.panel.empty h1 { font-size: 24px; margin: 12px 0 4px; } .panel.empty .sub { margin-bottom: 18px; }

@media (max-width: 1000px) {
  .k4 { grid-template-columns: repeat(2, 1fr); } .cols3, .features { grid-template-columns: 1fr 1fr; }
  .controls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .k3, .cols2, .cols3, .features { grid-template-columns: 1fr; }
  .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .controls { grid-template-columns: 1fr 1fr; }
  .weekdays { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .chip { display: none; }
  .cta { flex-wrap: wrap; }
}

/* EA verdict */
.verdict { --vc: var(--gold); border-color: color-mix(in srgb, var(--vc) 40%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--vc) 9%, var(--panel)), var(--panel) 55%); }
.verdict.gA, .verdict.gB { --vc: var(--pos); } .verdict.gD, .verdict.gF { --vc: var(--neg); }
.vhead { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 18px; }
.grade { flex: none; display: grid; place-items: center; width: 78px; height: 78px; border-radius: 18px; font: 800 44px/1 var(--mono);
  color: var(--vc); background: color-mix(in srgb, var(--vc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--vc) 45%, transparent); }
.eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.vtitle { font-size: 22px; margin: 2px 0 6px; color: var(--vc); }
.vtext p { color: #c3cad4; margin-top: 4px; max-width: 860px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ck { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: #0d131c; border: 1px solid var(--line); }
.ck .dot { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.ck .dot .ic { width: 14px; height: 14px; }
.ck.pass .dot { color: var(--pos); background: rgba(34,197,94,.14); } .ck.warn .dot { color: var(--gold); background: rgba(232,177,58,.14); }
.ck.fail .dot { color: var(--neg); background: rgba(239,68,68,.14); } .ck.fail { border-color: rgba(239,68,68,.3); }
.ck > div { min-width: 0; flex: 1; }
.ck-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ck-top .num { color: var(--muted); font-size: 12.5px; }
.ck p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.fine { color: var(--muted); font-size: 12px; margin-top: 14px; }
@media (max-width: 720px) { .checks { grid-template-columns: 1fr; } .vhead { flex-direction: column; } }

/* EA rental */
.top > .btn.sm { padding: 8px 14px; }
.rent { display: flex; align-items: center; gap: 20px; margin: 26px 0 14px; padding: 20px 24px; border-radius: 16px;
  border: 1px solid rgba(232,177,58,.45); background: linear-gradient(110deg, rgba(232,177,58,.16), rgba(232,177,58,.03) 55%, var(--panel)); transition: .15s; }
.rent:hover { border-color: var(--gold); transform: translateY(-1px); }
.rent img { height: 48px; width: auto; flex: none; }
.rent > div { flex: 1; } .rent b { font-size: 17px; } .rent p { color: #c3cad4; margin-top: 2px; }
@media (max-width: 720px) { .rent { flex-wrap: wrap; } .top > .btn.sm { order: 2; } }

/* summary readings */
.reading p { color: #c3cad4; padding: 9px 0; border-bottom: 1px solid var(--line); }
.reading p:first-child { padding-top: 0; } .reading p:last-child { border-bottom: 0; padding-bottom: 0; }
