/* StatCheck: the look of the stat sites players already use (slate panels, one blue accent,
   compact rows). Palette shared with pros.gg (~/dev/rift-ledger). Dark only. */
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #17191f; --panel: #1f222a; --panel2: #282c36; --line: #333845; --text: #dcdfe5; --dim: #a1a7b3; --faint: #767d8a;
  --blue: #5d8ee8; --bluebg: #232d42; --good: #4cbf91; --bad: #e0626f; --r: 10px;
  --c1: #5d8ee8; --c2: #c9ae78; --c3: #4cbf91;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: #fff; font-weight: 700; line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 3.6vw, 2.1rem); }
h2 { font-size: 1.15rem; }
h3 { font-size: .98rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
::selection { background: var(--blue); color: #fff; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(23, 25, 31, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 4px; }
.logo { font-weight: 800; font-size: 1.2rem; letter-spacing: -.03em; color: #fff; }
.logo b { display: none; }
.logo::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); margin-left: 3px; }
.tagline { font-size: .8rem; color: var(--faint); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 12px; font-size: .88rem; font-weight: 500; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 10px 10px 11px; color: var(--dim); white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a:hover { color: #fff; }
.tabs a[aria-current=page] { color: #fff; border-bottom-color: var(--blue); }

/* page head */
.head { padding: 30px 0 22px; max-width: 760px; }
.kicker { display: inline-block; font-size: .72rem; font-weight: 600; color: var(--blue); background: var(--bluebg); border-radius: 5px; padding: 3px 8px; margin: 0 0 12px; }
.lede { color: var(--dim); margin: 0; max-width: 44em; }

/* calculator */
#app { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 16px; align-items: start; min-height: 420px; }
.inputs, .answer, .facts, .figure, .tableblock, .index { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.inputs { padding: 0 16px 14px; }
.group { border: 0; padding: 0; margin: 0; min-width: 0; }
.group legend { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding: 16px 0 8px; width: 100%; }
.group + .group { border-top: 1px solid var(--line); margin-top: 8px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr) 128px; column-gap: 14px; align-items: center; padding: 7px 0; }
.field.stack { grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
.f-text label { display: block; font-size: .9rem; font-weight: 500; line-height: 1.3; }
.hint { font-size: .76rem; line-height: 1.35; color: var(--faint); margin: 2px 0 0; }
.inp { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
.inp:hover { border-color: #454b5a; }
.inp:focus-within { border-color: var(--blue); }
.inp input, .inp select { flex: 1; min-width: 0; width: 100%; font: 600 .93rem/1.2 var(--sans); font-variant-numeric: tabular-nums; color: #fff; background: transparent; border: 0; padding: 9px 10px; outline: none; text-align: right; }
.inp select { text-align: left; font-weight: 500; }
.inp select option { background: var(--panel); color: var(--text); }
.ad { color: var(--faint); font-size: .82rem; padding: 0 10px 0 0; flex: none; }
.err { grid-column: 1 / -1; font-size: .78rem; color: var(--bad); margin: 4px 0 0; }
.err:empty { display: none; }
.field.bad .inp { border-color: var(--bad); }
.form-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--line); }
.btn-link { font: 500 .8rem var(--sans); color: var(--dim); background: none; border: 0; padding: 4px 0; cursor: pointer; }
.btn-link:hover { color: var(--blue); }

/* result */
.results { min-width: 0; }
.answer { padding: 20px 20px 18px; border-radius: var(--r) var(--r) 0 0; border-bottom: 0; }
.hl-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin: 0 0 6px; }
.hl-value { font-weight: 800; font-size: clamp(2.2rem, 6vw, 3.1rem); line-height: 1.05; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: 0 0 8px; color: #fff; }
.answer.good .hl-value { color: var(--good); }
.answer.warn .hl-value { color: var(--bad); }
.hl-sub { font-size: .9rem; margin: 0; max-width: 40em; color: var(--dim); }
.facts { margin: 0 0 16px; border-radius: 0 0 var(--r) var(--r); }
.fact { display: flex; align-items: center; gap: 16px; padding: 11px 20px; }
.fact + .fact { border-top: 1px solid var(--line); }
.fact dt { font-size: .88rem; flex: 1; min-width: 0; color: var(--text); }
.fact dt small { display: block; font-size: .76rem; color: var(--faint); }
.fact dd { margin: 0; font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums; color: #fff; white-space: nowrap; }
.fact.good dd { color: var(--good); }
.fact.warn dd { color: var(--bad); }

/* chart */
.figure { margin: 0 0 16px; padding: 14px 14px 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .76rem; color: var(--dim); margin-bottom: 4px; }
.legend i { display: inline-block; width: 14px; height: 0; border-top: 2px solid; margin-right: 6px; vertical-align: middle; }
.chart-body { position: relative; }
.chart-svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart-svg .grid { stroke: var(--line); stroke-width: 1; }
.chart-svg .tick { fill: var(--faint); font-size: 12px; font-family: var(--sans); }
.chart-svg .line { fill: none; stroke-width: 2.2; stroke-linejoin: round; }
.chart-svg .area { fill: var(--blue); opacity: .1; }
.chart-svg .cursor { stroke: var(--dim); stroke-width: 1; }
.axis-note { text-align: center; font-size: .74rem; color: var(--faint); margin: 0; }
.tip { position: absolute; top: 4px; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; color: #fff; padding: 6px 9px; font-size: .76rem; pointer-events: none; white-space: nowrap; display: grid; gap: 1px; }
.tip[hidden] { display: none; }

/* tables and fine print */
.tableblock { margin: 0 0 16px; overflow: hidden; }
.tableblock h2 { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin: 0; padding: 12px 20px; border-bottom: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 9px 20px 9px 0; }
th:first-child, td:first-child { text-align: left; padding-left: 20px; }
td { border-top: 1px solid var(--line); color: #fff; font-weight: 600; }
td:first-child { color: var(--text); font-weight: 400; }
thead th { color: var(--faint); font-weight: 500; font-size: .76rem; background: var(--panel2); }
tbody tr:hover td { background: var(--panel2); }
.assume { font-size: .8rem; color: var(--faint); padding: 4px 4px 0; }
.assume h2 { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-bottom: 6px; }
.assume ul { margin: 0; padding-left: 1.1em; }
.assume li { margin-bottom: 4px; }

/* words below */
.prose { max-width: 700px; padding: 48px 0 0; }
.prose h2 { margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; margin-bottom: .3em; }
.prose p { color: var(--dim); }
.more { padding: 44px 0 60px; }
.more > h2 { margin-bottom: 12px; }

/* list of calculators */
.index { list-style: none; padding: 0; margin: 0; overflow: hidden; }
.index li + li { border-top: 1px solid var(--line); }
.index a { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; column-gap: 16px; align-items: center; padding: 15px 20px; }
.index .g { justify-self: start; font-size: .72rem; font-weight: 600; color: var(--blue); background: var(--bluebg); border-radius: 5px; padding: 3px 8px; }
.index .q { font-size: 1rem; font-weight: 600; color: #fff; line-height: 1.3; }
.index .t { font-size: .82rem; color: var(--dim); white-space: nowrap; }
.index .t::after { content: " \203A"; color: var(--faint); }
.index a:hover { background: var(--panel2); }
.index a:hover .t { color: var(--blue); }
.hero { padding: 56px 0 4px; max-width: 760px; }
.hero h1 { font-size: clamp(2rem, 5.4vw, 3rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; margin-bottom: .35em; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero .lede { font-size: 1.05rem; }
.hero + .more { padding-top: 30px; }
footer { border-top: 1px solid var(--line); padding: 20px 0 44px; font-size: .78rem; color: var(--faint); }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; font-size: .82rem; color: var(--dim); }
footer nav a:hover { color: #fff; }
noscript p { border: 1px solid var(--bad); border-radius: var(--r); color: var(--bad); padding: 12px 16px; }

.mini { display: none; }
@media (max-width: 900px) {
  #app { grid-template-columns: minmax(0, 1fr); }
  .head { padding: 22px 0 18px; }
  .tagline { display: none; }
  .index a { grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
  .mini { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    background: var(--blue); color: #fff; padding: 11px 20px; font-size: .8rem; font-weight: 500; }
  .mini strong { font-size: 1.05rem; white-space: nowrap; }
  .mini[hidden] { display: none; }
}
