:root {
  color-scheme: dark;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background: #101111;
  color: #f1eee8;
  --surface: #171818;
  --surface-lift: #202020;
  --border: #323230;
  --text: #f1eee8;
  --muted: #b7b2a9;
  --warm: #fb9a64;
  --primary: #e54d0c;
  --primary-hover: #f65b1a;
  --primary-text: #201109;
  --chart-orange: #ef5515;
  --chart-earned: #ed8b57;
  --radius: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-size: 1rem; }
a { color: inherit; text-underline-offset: .24em; }
button, select, input, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--warm); outline-offset: 4px; }
h1,h2,h3,p { margin: 0; }
h1,h2,h3 { line-height: 1.13; }
p { line-height: 1.6; }
h1 { font-size: clamp(2.15rem,4.6vw,3.5rem); letter-spacing: -.052em; font-weight: 760; }
h2 { font-size: 1.23rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
.shell { width: min(1220px, calc(100% - 72px)); margin-inline: auto; }
.topbar { background: #141515; border-bottom: 1px solid var(--border); }
.topbar-inner { min-height: 72px; display: flex; align-items: center; gap: 34px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: none; text-decoration: none; font-size: 1rem; font-weight: 680; }
.brand img { width: 92px; height: auto; display: block; }
.brand span { border-left: 1px solid var(--border); padding-left: 12px; }
.topbar nav { display: flex; align-items: center; align-self: stretch; gap: 3px; }
.topbar nav a { display: inline-flex; align-items: center; padding: 0 11px; border-bottom: 2px solid transparent; text-decoration: none; color: var(--muted); white-space: nowrap; font-size: .9rem; font-weight: 600; }
.topbar nav a:hover { color: var(--text); background: #ffffff08; }
.topbar nav a[aria-current] { color: var(--text); border-bottom-color: var(--primary); }
.account { display: flex; align-items: center; gap: 9px; margin-left: auto; min-width: 0; }
.account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; font-size: .88rem; }
.avatar { display: grid; place-items: center; flex: 0 0 29px; height: 29px; border-radius: 50%; color: var(--warm); background: #37241a; font-size: .85rem; font-weight: 720; }
.account form { margin: 0; flex: none; }
main { flex: 1; }
.workspace { padding-block: 36px 56px; }
.public { padding-block: 44px 64px; }
.footer { border-top: 1px solid var(--border); display: flex; justify-content: space-between; padding-block: 21px; font-size: .88rem; color: var(--muted); }
.preview { width: fit-content; padding: 4px 10px; margin-bottom: 18px; border: 1px solid #5c402f; border-radius: 7px; color: var(--warm); font-size: .85rem; }
.button { border: 1px solid transparent; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 15px; white-space: nowrap; font-size: .96rem; font-weight: 720; text-decoration: none; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.button.primary { background: var(--primary); color: var(--primary-text); }
.button.primary:hover { background: var(--primary-hover); }
.button.secondary { background: #252525; color: var(--text); border-color: #3b3a37; }
.button.secondary:hover { background: #33302e; border-color: #6d5240; }
.button.quiet { background: transparent; color: var(--muted); padding: 6px 8px; min-height: 40px; font-size: .84rem; }
.button.quiet:hover, .text-link:hover { color: var(--warm); }
.signin { display: grid; place-content: center; justify-items: center; gap: 26px; padding: 22px; }
.signin-logo { display: block; width: 190px; max-width: 100%; height: auto; }
.button.discord-signin { gap: 11px; min-height: 52px; padding-inline: 20px; background: #b53605; color: #fff; }
.button.discord-signin:hover { background: #c43d08; }
.discord-signin img { display: block; flex: none; }
.text-link { color: var(--warm); font-size: .93rem; text-decoration: underline; text-decoration-color: #b46e48; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.page-heading p { color: var(--muted); margin-top: 10px; }
.dashboard-hero { position: relative; border: 1px solid #493527; padding: clamp(23px,4vw,38px); margin-bottom: 22px; border-radius: var(--radius); background: radial-gradient(ellipse at 94% 0%, #56301b, transparent 60%), linear-gradient(112deg,#211c18,#1b1817); }
.dashboard-hero .page-heading { margin-bottom: 11px; }
.dashboard-hero .page-heading p { color: #d0c3b9; }
.dashboard-hero .discord-jump { display: inline-block; margin-top: 6px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 30px; }
.stat { padding: 17px 19px; }
.stat h2 { font-size: .94rem; color: var(--muted); font-weight: 640; line-height: 1.3; }
.stat strong { display: block; margin-top: 9px; font-size: clamp(1.5rem,2.7vw,2.3rem); letter-spacing: -.045em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stat p { font-size: .83rem; color: var(--muted); margin-top: 3px; }
.section-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 12px; }
.activity-section { margin-bottom: 27px; }
.segmented { display: inline-flex; padding: 3px; gap: 3px; border: 1px solid var(--border); background: #141515; border-radius: 9px; }
.segmented a { padding: 7px 10px; text-decoration: none; font-size: .88rem; white-space: nowrap; border-radius: 6px; color: var(--muted); }
.segmented a:hover { color: var(--text); }
.segmented [aria-current] { background: #3c2c22; color: var(--warm); }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; scroll-margin-top: 16px; }
.chart { padding: 17px 19px 18px; overflow: hidden; }
.chart header { border-bottom: 1px solid #ffffff11; padding-bottom: 9px; }
.chart header h3 { font-weight: 650; color: #ddd8d0; }
.chart header strong { display: inline-block; font-size: 1.65rem; margin-top: 6px; font-variant-numeric: tabular-nums; }
.chart header p { margin: 2px 0 0; color: var(--muted); font-size: .84rem; }
.chart-body { display: grid; gap: 10px; padding-top: 12px; }
.chart-row { display: grid; grid-template-columns: 7.3rem minmax(32px,1fr) minmax(2.2rem,auto); align-items: center; gap: 9px; font-size: .87rem; }
.chart-row span { color: var(--muted); white-space: nowrap; }
.chart-row strong { text-align: right; font-variant-numeric: tabular-nums; }
progress { display: block; width: 100%; height: 8px; border: none; border-radius: 10px; appearance: none; -webkit-appearance: none; background-color: #2c2c2b; overflow: hidden; --bar: var(--chart-orange); }
.earned progress { --bar: var(--chart-earned); }
progress::-webkit-progress-bar { background-color: #2c2c2b; border-radius: 10px; }
progress::-webkit-progress-value { background-color: var(--bar); border-radius: 10px; }
progress::-moz-progress-bar { background-color: var(--bar); border-radius: 10px; }
.records .section-heading { padding: 17px 19px 0; }
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; min-width: 620px; text-align: left; font-size: .92rem; }
th,td { padding: 13px 13px; vertical-align: top; }
th:first-child { padding-left: 19px; }
th:last-child, td:last-child { padding-right: 19px; }
thead { background: #1f2020; color: #c3bfb7; font-size: .84rem; }
tbody th { font-weight: 660; overflow-wrap: anywhere; min-width: 160px; max-width: 320px; }
tbody tr + tr { border-top: 1px solid #2a2a29; }
tbody td { font-variant-numeric: tabular-nums; }
tbody a:not(.text-link) { text-decoration-color: #b67b56; }
td small, th small { display: block; font-size: .83rem; margin-top: 4px; color: var(--muted); font-weight: 450; }
.status { display: inline-block; border-radius: 5px; padding: 4px 7px; font-size: .82rem; color: #dbd7d0; background: #343331; white-space: nowrap; }
.status.review { color: #eac89d; background: #3a3024; }
.status.chat { color: #f0b794; background: #4a2d21; }
.status.acquired { color: #a5e1c4; background: #203a2d; }
.status.closed { color: #c3bab0; background: #302a29; }
.filter { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 3px; font-size: .89rem; }
.filter .button { min-height: 38px; padding: 6px 10px; }
.filter select { min-height: 38px; }
.pagination { display: flex; gap: 10px; align-items: center; padding: 15px; }
.empty { text-align: center; padding: 36px 14px 44px; }
.empty p { color: var(--muted); margin-block: 6px 14px; }
.notice { border-left: 3px solid #eb581c; background: #2e1e17; border-radius: 5px; margin-bottom: 15px; padding: 10px 12px; color: #ffdcbe; overflow-wrap: anywhere; }
.notice.error { border-left-color: #ff8e81; background: #392321; color: #ffd1ca; }
.welcome, .onboard-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(235px,1fr); align-items: start; gap: 20px; }
.welcome-main { border: 1px solid #55301d; border-radius: var(--radius); min-height: 400px; padding: clamp(24px,6vw,76px); background: radial-gradient(ellipse at 100% 0%, #60260f, transparent 63%), #201713; }
.welcome-main h1 { font-size: clamp(2.5rem,6vw,5.25rem); max-width: 16ch; }
.welcome-main > p, .lesson > p { color: #d4cbc1; margin-top: 13px; max-width: 52ch; }
.welcome-main .notice { margin-top: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-top: 22px; }
.welcome-main .help, .help { color: var(--muted); font-size: .9rem; }
.onboard-aside { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.steps { display: grid; gap: 14px; padding: 0; margin: 17px 0 0; list-style: none; }
.steps li { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 8px; border: 1px solid transparent; }
.steps li[aria-current] { background: #2b231d; border-color: #4a382b; }
.steps p { color: var(--muted); font-size: .88rem; margin-top: 3px; }
.step-mark { flex: 0 0 20px; height: 20px; display: grid; place-items: center; border: 1px solid #5b5650; border-radius: 50%; color: var(--warm); font-size: .82rem; }
.step-mark.complete, [aria-current="step"] .step-mark { border-color: #c68055; }
.lesson { padding: clamp(19px,4vw,40px); }
.lesson p { margin-bottom: 16px; }
.quiz-form { display: grid; gap: 16px; }
.quiz-form > button { justify-self: start; }
.quiz-form fieldset { margin: 0; padding: 9px 0 0; border: none; min-width: 0; }
.quiz-form legend { font-weight: 650; }
.choices { display: grid; gap: 6px; }
.choices label { display: flex; align-items: center; gap: 9px; padding: 9px; border-radius: 7px; background: #202020; border: 1px solid #363532; cursor: pointer; }
.choices label:has(input:checked) { background: #34271e; border-color: #a86b44; }
input[type=radio], input[type=checkbox] { accent-color: var(--primary); width: 17px; height: 17px; flex: 0 0 17px; }
.back { display: inline-block; margin-bottom: 13px; }
.form-panel { padding: clamp(18px,4vw,34px); max-width: 780px; }
.form-panel h1, .form-panel h2 { margin-bottom: 12px; }
.form-panel p { margin-bottom: 14px; color: #d1ccc3; }
.form-panel p.notice { color: #ffd1ca; }
.form-panel h3 { margin-bottom: 6px; }
.form-panel .preserve { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 19px; }
.fields { display: grid; gap: 7px; }
.fields label { font-weight: 650; margin-top: 9px; }
.fields label span { font-size: .86rem; color: var(--muted); font-weight: 450; margin-left: 4px; }
.fields input:not([type=checkbox]), select, textarea { appearance: none; background: #1f2020; color: var(--text); border: 1px solid #494742; border-radius: 8px; padding: 9px 11px; min-width: 0; min-height: 43px; }
select { padding-right: 28px; background: linear-gradient(45deg,transparent 50%,#beb7ad 50%) calc(100% - 15px) 50%/5px 5px no-repeat, linear-gradient(135deg,#beb7ad 50%,transparent 50%) calc(100% - 10px) 50%/5px 5px no-repeat, #1f2020; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #a9a49d; }
.fields .checkbox { display: flex; align-items: center; gap: 7px; }
.review-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 16px; align-items: start; }

.scout-frame {
  --surface: #1a1715;
  --surface-lift: #241c17;
  --border: #342a24;
  --muted: #bbafa7;
  display: grid;
  grid-template-columns: clamp(174px,18vw,220px) minmax(0,1fr);
  gap: 14px;
  width: min(100%,1536px);
  min-height: 100vh;
  margin-inline: auto;
  padding: 14px;
  background: radial-gradient(ellipse at 100% 0%,#312018 0%,transparent 48%),#110e0d;
}
.scout-rail {
  position: sticky;
  top: 14px;
  align-self: start;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: calc(100vh - 28px);
  gap: 17px;
  padding: 17px 12px;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: #161311;
}
.scout-rail .brand { align-self: start; margin: 0 2px 7px; gap: 9px; }
.scout-rail .brand span { padding-left: 9px; }
.scout-rail .brand img { width: 81px; }
.rail-profile {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  padding: 12px 10px;
  border: 1px solid #4d3427;
  border-radius: 12px;
  background: linear-gradient(140deg,#38251b,#211a17);
}
.rail-profile > div { min-width: 0; }
.rail-profile .avatar { flex-basis: 34px; height: 34px; background: #4c2c1c; }
.rail-profile strong,.rail-profile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-profile strong { font-size: .9rem; }
.rail-profile small { margin-top: 3px; color: var(--muted); font-size: .82rem; }
.rail-nav { display: grid; gap: 3px; }
.rail-nav a,.rail-links a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  white-space: nowrap;
}
.rail-nav a span { width: 16px; flex: none; text-align: center; color: #c5967d; }
.rail-nav a:hover,.rail-links a:hover { background: #241b16; color: var(--text); }
.rail-nav a[aria-current] { color: #ffd1b6; background: #432315; border-color: #783a20; }
.rail-nav a[aria-current] span { color: #ff7c42; }
.rail-links { margin-top: auto; border-top: 1px solid var(--border); padding-top: 9px; }
.rail-links .quiet { padding-inline: 8px; }
.scout-frame .workspace {
  min-width: 0;
  padding: clamp(15px,2.6vw,33px);
  border: 1px solid var(--border);
  border-radius: 19px;
  background: #151210;
}
.scout-frame .page-heading h1 { font-size: clamp(2rem,3.4vw,3.12rem); }
.scout-frame .page-heading p { margin-top: 7px; }
.scout-frame .panel { min-width: 0; background: var(--surface); border-radius: 16px; }
.scout-frame .panel thead { background: #241d19; }
.scout-frame .panel tbody tr + tr { border-color: #332820; }
.scout-frame .segmented { background: #1c1714; }
.overview-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.overview-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; align-items: stretch; }
.overview-grid .overview-feature {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 19px;
  min-height: 210px;
  padding: clamp(15px,2vw,23px);
  border-color: #7b3c20;
  background:
    linear-gradient(#ffd2a310 1px,transparent 1px) right top / 22px 22px,
    linear-gradient(90deg,#ffd2a310 1px,transparent 1px) right top / 22px 22px,
    radial-gradient(ellipse at 100% 80%,#8c300e 0%,#482315 47%,#211511 81%);
}
.overview-feature h2,.overview-trend h2,.payout-card h2 { font-size: 1rem; line-height: 1.35; }
.overview-feature strong { display: block; margin-top: 8px; font-size: clamp(2.6rem,5.5vw,4.25rem); line-height: 1; letter-spacing: -.065em; }
.overview-feature p { margin-top: 4px; color: #e7c9b8; font-size: .88rem; }
.overview-feature .button { align-self: start; min-height: 39px; background: #281811; border-color: #825338; }
.overview-feature .button:hover { background: #3a2418; }
.overview-trend { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(14px,1.7vw,20px); }
.overview-trend strong { display: block; margin-top: 6px; font-size: clamp(1.68rem,3.25vw,2.45rem); letter-spacing: -.04em; line-height: 1.1; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.overview-trend p { margin-top: 4px; color: var(--muted); font-size: .85rem; }
.overview-plot { width: 100%; display: block; margin: 8px 0 2px; }
.plot-grid { fill: none; stroke: #443127; stroke-width: 1; }
.plot-bar { fill: var(--chart-orange); }
.plot-zero { fill: #5a3c2d; }
.plot-area { fill: #df4e12; opacity: .25; }
.plot-line { stroke: #fa6427; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.plot-dates { display: flex; justify-content: space-between; padding-inline: 3px; color: var(--muted); font-size: .78rem; }
.overview-records { grid-column: span 2; overflow: hidden; }
.overview-records table { min-width: 489px; }
.overview-records th,.overview-records td { padding-inline: 9px; }
.overview-records th:first-child { padding-left: 17px; }
.payout-card { padding: clamp(14px,1.7vw,20px); }
.payout-gauge { position: relative; width: min(100%,196px); margin: 12px auto 13px; }
.payout-gauge svg { display: block; width: 100%; }
.payout-gauge path { fill: none; stroke-width: 11; stroke-linecap: round; }
.gauge-track { stroke: #49332a; }
.gauge-value { stroke: var(--chart-orange); }
.payout-gauge > div { position: absolute; inset: auto 0 10% 0; display: grid; justify-items: center; }
.payout-gauge strong { font-size: clamp(1.4rem,3.2vw,2rem); letter-spacing: -.045em; }
.payout-gauge span { color: var(--muted); font-size: .83rem; }
.payout-card dl { margin: 0; display: grid; gap: 7px; font-size: .88rem; }
.payout-card dl div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 3px 9px; border-top: 1px solid var(--border); padding-top: 7px; }
.payout-card dt { color: var(--muted); }
.payout-card dd { margin: 0; font-weight: 660; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .shell { width: calc(100% - 40px); }
  .topbar-inner { gap: 14px; }
  .topbar nav a { padding-inline: 8px; }
  .account-name { display: none; }
  .stat { padding-inline: 12px; }
  .chart-row { grid-template-columns: 6rem minmax(32px,1fr) minmax(1.5rem,auto); gap: 5px; }
}
@media (max-width: 870px) {
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .overview-feature { grid-column: span 2; }
  .overview-grid .overview-feature { min-height: 152px; gap: 12px; }
  .overview-records { grid-column: span 2; }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 28px); }
  .topbar-inner { min-height: 58px; flex-wrap: wrap; gap: 0 9px; }
  .topbar nav { order: 3; width: 100%; overflow: auto; min-height: 42px; }
  .brand, .account { padding-block: 8px; }
  .workspace, .public { padding-top: 20px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat strong { font-size: 1.56rem; }
  .chart-grid, .welcome, .onboard-grid, .review-grid { grid-template-columns: 1fr; }
  .chart { padding-inline: 13px; }
  .welcome-main { min-height: 0; padding-bottom: 36px; }
  .onboard-grid .onboard-aside { order: -1; }
  .section-heading { flex-wrap: wrap; }
  .scout-frame { display: block; padding: 8px; }
  .scout-rail {
    position: static;
    display: grid;
    grid-template-columns: 1fr auto;
    min-height: 0;
    gap: 7px 10px;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 13px;
  }
  .scout-rail .brand { align-self: center; margin: 0; }
  .rail-profile { padding: 5px 6px; max-width: 140px; }
  .rail-profile .avatar { flex-basis: 27px; height: 27px; }
  .rail-profile small { display: none; }
  .rail-nav { grid-column: 1/-1; display: flex; overflow-x: auto; }
  .rail-nav a { flex: none; }
  .rail-links { grid-column: 1/-1; display: flex; flex-wrap: wrap; align-items: center; padding-top: 2px; }
  .rail-links a { padding-block: 6px; font-size: .83rem; }
  .rail-links .quiet { min-height: 35px; }
  .scout-frame .workspace { border-radius: 13px; }
}
@media (max-width: 420px) {
  .overview-grid { grid-template-columns: minmax(0,1fr); }
  .overview-feature,.overview-records { grid-column: auto; }
  .overview-grid .overview-feature { min-height: 145px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
