:root {
  --ink: #17212b;
  --muted: #66717c;
  --paper: #f4f1e8;
  --surface: #fffdf7;
  --line: #d8d3c7;
  --nav: #14252b;
  --nav-soft: #20363d;
  --teal: #0d7068;
  --teal-dark: #08544f;
  --amber: #d59120;
  --red: #b54032;
  --green: #227a4b;
  --shadow: 0 12px 30px rgba(24, 31, 35, .09);
  --topbar: rgba(255,253,247,.88);
  --soft-surface: #e9eee9;
  --quiet-surface: #ebe8df;
  --field: #ffffff;
  --field-line: #c9c4b9;
  --item-line: #e8e4da;
  --dialog-footer: #edeae2;
}

:root[data-theme="dark"] {
  --ink: #e8eeee;
  --muted: #a7b4b8;
  --paper: #10191d;
  --surface: #18262b;
  --line: #34464b;
  --nav: #0d1c21;
  --nav-soft: #20383f;
  --teal: #43b8ad;
  --teal-dark: #075e58;
  --amber: #e2a635;
  --red: #e17669;
  --green: #6bc78f;
  --shadow: 0 12px 30px rgba(0, 0, 0, .3);
  --topbar: rgba(24,38,43,.92);
  --soft-surface: #1d302f;
  --quiet-surface: #213238;
  --field: #111d21;
  --field-line: #40545a;
  --item-line: #304147;
  --dialog-footer: #122126;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "IBM Plex Sans", sans-serif; }
button, input, select, textarea { font: inherit; }
button, select, input[type="checkbox"], input[type="file"] + label { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid rgba(13, 112, 104, .3); outline-offset: 2px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 18px; display: flex; flex-direction: column; overflow-y: auto; background: var(--nav); color: #f7f3e8; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 25px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid var(--amber); color: var(--amber); font: 700 20px/1 "Barlow Condensed", sans-serif; }
.brand strong, .brand small { display: block; }
.brand strong { font-family: "Barlow Condensed", sans-serif; font-size: 20px; text-transform: uppercase; }
.brand small { margin-top: 2px; color: #9fb0b5; font-size: 11px; }
.nav-list { display: grid; gap: 5px; margin-top: 24px; }
.nav-item { height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; color: #b9c6c9; background: transparent; border-left: 3px solid transparent; text-align: left; }
.nav-item svg { width: 19px; }
.nav-item:hover { color: white; background: rgba(255,255,255,.05); }
.nav-item.active { color: white; background: var(--nav-soft); border-left-color: var(--amber); }
.nav-item:disabled { opacity: .38; cursor: not-allowed; }
.nav-item:disabled:hover { color: #b9c6c9; background: transparent; }
.sidebar-actions { display: grid; gap: 6px; margin-top: auto; }
.fiction-notice { display: flex; gap: 10px; margin-top: 18px; padding: 14px 4px 0; border-top: 1px solid rgba(255,255,255,.12); color: #98aaaf; font-size: 11px; line-height: 1.45; }
.fiction-notice svg { width: 18px; flex: 0 0 auto; color: var(--amber); }
.fiction-notice strong { display: block; color: #e8eeee; }
.copyright-notice { margin: 12px 4px 0; color: #7f9499; font-size: 9px; line-height: 1.45; }
.copyright-notice strong { display: block; color: #b9c6c9; font-weight: 600; }
.main { min-width: 0; }
.topbar { min-height: 94px; padding: 20px clamp(22px, 4vw, 52px); display: flex; align-items: center; gap: 18px; justify-content: space-between; border-bottom: 1px solid var(--line); background: var(--topbar); backdrop-filter: blur(10px); }
.topbar h1 { margin: 1px 0 0; font: 700 clamp(27px, 3vw, 36px)/1 "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: 0; }
.eyebrow { margin: 0; color: var(--teal); font: 600 11px/1.3 "IBM Plex Sans", sans-serif; text-transform: uppercase; letter-spacing: .1em; }
.topbar-actions { display: flex; align-items: end; gap: 12px; }
.account-button { width: auto; min-width: 138px; max-width: 300px; align-items: center; justify-content: center; padding: 0 12px; gap: 7px; color: var(--teal); font-size: 11px; font-weight: 600; }
.account-button svg { flex: 0 0 auto; }
.account-button span { min-width: 0; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.account-button.signed-in { color: var(--green); border-color: rgba(34,122,75,.4); }
.theme-button { align-self: flex-end; color: var(--teal); }
.theme-button:hover { color: var(--amber); border-color: var(--amber); }
.telemetry-status { height: 39px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; color: var(--green); border: 1px solid rgba(34,122,75,.35); background: #e5f0e9; font-size: 11px; font-weight: 600; }
.telemetry-status.offline { color: var(--muted); border-color: var(--line); background: #ece9e1; }
.telemetry-status.waiting { color: #76580b; border-color: #d9c27f; background: #f6efd8; }
.telemetry-status svg { width: 15px; }
.game-date { display: grid; gap: 4px; color: var(--muted); font-size: 11px; }
.game-date input { height: 39px; }
.content { padding: 32px clamp(22px, 4vw, 52px) 52px; }
.view { display: none; }
.view.active { display: block; animation: reveal .24s ease-out both; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } }
.button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: 4px; font-weight: 600; text-decoration: none; }
.button svg { width: 17px; }
.button.primary { color: white; background: var(--teal); }
.button.primary:hover { background: var(--teal-dark); }
.button.secondary { color: var(--ink); background: var(--surface); border-color: var(--line); }
.button.ghost { color: #c7d3d5; background: transparent; border-color: rgba(255,255,255,.17); }
.button.danger { color: var(--red); border-color: rgba(181,64,50,.35); }
.button.full { width: 100%; }
.button:disabled, .icon-button:disabled { opacity: .48; cursor: not-allowed; }
.file-button input { display: none; }
.icon-button { width: 39px; height: 39px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--surface); }
.icon-button svg { width: 19px; }
.icon-button.account-button { display: inline-flex; width: auto; }
.menu-button { display: none; }
.status-band { min-height: 152px; display: grid; grid-template-columns: 70px minmax(250px, 1fr) minmax(330px, .9fr); align-items: center; gap: 20px; padding: 20px 28px; color: #f5f6f2; background: #163b39; border-left: 6px solid #55a69d; box-shadow: var(--shadow); }
.status-band.action { background: #3c3433; border-left-color: #cb9550; }
.status-band.action.strict { background: #63342f; border-left-color: #e78a78; }
.status-band.risk { background: #504334; border-left-color: #e3b46b; }
.status-band.watch { background: #294540; border-left-color: #c9af68; }
.status-seal { width: 62px; height: 62px; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.7); border-radius: 50%; }
.status-seal svg { width: 30px; height: 30px; }
.status-copy .status-label { display: block; color: rgba(255,255,255,.72); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.status-copy strong { display: block; margin-top: 5px; font: 700 clamp(29px, 3.2vw, 46px)/1 "Barlow Condensed", sans-serif; }
.status-copy p { margin: 9px 0 0; color: rgba(255,255,255,.84); font-size: 13px; line-height: 1.5; }
.standing-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.standing-row span { padding: 5px 9px; border: 1px solid rgba(255,255,255,.24); border-radius: 3px; color: rgba(255,255,255,.81); font-size: 11px; }
.standing-row b { color: #fff; font-weight: 600; }
.status-facts { display: grid; grid-template-columns: minmax(0, 1.55fr) repeat(2, minmax(0, 1fr)); margin: 0; border-left: 1px solid rgba(255,255,255,.22); }
.status-facts div { min-width: 0; padding: 8px 12px; }
.status-facts dt { color: rgba(255,255,255,.62); font-size: 10px; text-transform: uppercase; }
.status-facts dd { margin: 5px 0 0; font: 600 18px/1.2 "Barlow Condensed", sans-serif; overflow-wrap: anywhere; }
.community-strip { min-height: 82px; display: grid; grid-template-columns: minmax(220px, .8fr) minmax(520px, 2fr); align-items: stretch; margin-top: 22px; border: 1px solid var(--line); background: var(--soft-surface); }
.community-heading { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-right: 1px solid var(--line); }
.community-heading svg { width: 22px; color: var(--teal); }
.community-heading span, .community-heading strong { display: block; }
.community-heading span, .community-strip dt { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.community-heading strong { margin-top: 3px; font: 700 20px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.community-strip dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.community-strip dl div { min-width: 0; display: grid; align-content: center; padding: 14px 18px; border-right: 1px solid var(--line); }
.community-strip dl div:last-child { border-right: 0; }
.community-strip dd { margin: 4px 0 0; font: 700 26px/1 "Barlow Condensed", sans-serif; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 22px 0; border: 1px solid var(--line); background: var(--surface); }
.metric { min-height: 120px; padding: 22px 24px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric span, .metric small { display: block; color: var(--muted); }
.metric span { font-size: 11px; text-transform: uppercase; }
.metric strong { display: block; margin: 4px 0 3px; font: 700 37px/1 "Barlow Condensed", sans-serif; }
.metric small { font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(270px, .7fr); gap: 22px; }
.panel { background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(35,39,40,.04); }
.panel-heading, .section-toolbar, .rules-intro { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.panel-heading { min-height: 72px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
h2 { margin: 3px 0 0; font: 700 25px/1.1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.text-button { display: inline-flex; align-items: center; gap: 5px; border: 0; color: var(--teal); background: transparent; font-size: 12px; font-weight: 600; }
.text-button svg { width: 15px; }
.record-list { min-height: 260px; }
.record-item { min-height: 73px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 12px 20px; border-bottom: 1px solid var(--item-line); }
.record-item:last-child { border-bottom: 0; }
.record-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--teal); background: #e6f0ed; border-radius: 50%; }
.record-icon svg { width: 17px; }
.record-item strong, .record-item small { display: block; }
.record-item strong { font-size: 13px; }
.record-item small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.badge { display: inline-block; padding: 4px 7px; border-radius: 3px; font-size: 10px; font-weight: 600; text-transform: uppercase; }
.badge.pending { color: #805510; background: #f5e6c4; }
.badge.convicted { color: #8f2e26; background: #f3d8d3; }
.badge.dismissed { color: #256944; background: #d9ecdf; }
.watch-list { padding: 5px 20px; }
.watch-item { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--item-line); }
.watch-item:last-child { border: 0; }
.watch-item svg { width: 19px; color: var(--amber); }
.watch-item strong, .watch-item small { display: block; }
.watch-item strong { font-size: 12px; }
.watch-item small { margin-top: 4px; color: var(--muted); line-height: 1.45; }
.section-toolbar { margin-bottom: 18px; }
.fuel-source { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.fuel-source svg { width: 15px; color: var(--teal); }
.fuel-metrics { margin-top: 0; }
.fuel-table { min-width: 680px; }
.fuel-table input { width: 110px; min-height: 34px; }
.fuel-table .station-input { width: 180px; }
.cargo-table { min-width: 980px; }
.cargo-route { font: 700 18px "Barlow Condensed", sans-serif; }
.fuel-amount { font: 700 19px "Barlow Condensed", sans-serif; }
.filter-group { display: flex; border: 1px solid var(--line); }
.filter { height: 34px; padding: 0 13px; border: 0; border-right: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 11px; }
.filter:last-child { border-right: 0; }
.filter.active { color: white; background: var(--teal); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--item-line); text-align: left; }
th { color: var(--muted); background: var(--quiet-surface); font-size: 10px; text-transform: uppercase; }
td { font-size: 12px; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; }
.row-actions button { width: 31px; height: 31px; display: grid; place-items: center; border: 0; color: var(--muted); background: transparent; }
.row-actions button:hover { color: var(--red); background: #f4e1dd; }
.row-actions svg { width: 16px; }
.empty-state { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--muted); }
.empty-state svg { width: 32px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.setup-intro { margin-bottom: 24px; padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line); border-left: 5px solid var(--teal); background: var(--soft-surface); }
.setup-step { display: inline-flex; align-items: center; gap: 7px; color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.setup-step svg { width: 17px; height: 17px; }
.setup-intro h2 { margin: 12px 0 8px; font-size: clamp(27px, 3vw, 38px); }
.setup-intro p { max-width: 830px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.setup-checks { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 19px 0 15px; }
.setup-checks span { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 12px; font-weight: 600; }
.setup-checks svg { width: 17px; height: 17px; color: var(--teal); }
.setup-intro .setup-restore { font-size: 12px; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .7fr); gap: 22px; }
.profile-form { align-self: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; padding: 22px; }
.form-grid label { display: grid; align-content: start; gap: 7px; color: var(--muted); font-size: 11px; }
.form-grid label > span > b { color: var(--red); }
.field-help { color: var(--muted); font-size: 12px; line-height: 1.5; }
.form-grid .wide, .form-grid fieldset.wide { grid-column: 1 / -1; }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--field-line); border-radius: 3px; color: var(--ink); background: var(--field); }
textarea { resize: vertical; }
fieldset { margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-pill { display: flex !important; grid-template-columns: auto 1fr; align-items: center !important; gap: 6px !important; min-width: 70px; padding: 9px 10px; border: 1px solid var(--line); color: var(--ink) !important; background: white; }
.checkbox-pill input, .toggle-row input { width: 16px; min-height: 16px; }
.toggle-row { display: flex !important; grid-template-columns: auto 1fr; align-items: center !important; gap: 12px !important; padding: 14px; background: var(--soft-surface); border-left: 3px solid var(--teal); }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { color: var(--ink); }
.toggle-row small { margin-top: 2px; }
.photo-field > div { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-field > small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.form-actions { padding: 0 22px 22px; }
.save-indicator { color: var(--green); font-size: 11px; }
.profile-form .form-grid label, .profile-form legend, .profile-form .photo-field > small, .profile-form .save-indicator { font-size: 13px; }
.profile-form input, .profile-form select, .profile-form textarea, .profile-form button { font-size: 13px; }
.profile-form .toggle-row strong, .profile-form .toggle-row small { font-size: 13px; }
.license-preview { align-self: start; }
.license-preview > p, .license-preview > button { margin-left: 20px; margin-right: 20px; width: calc(100% - 40px); }
.license-card { margin: 22px 20px; padding: 18px; color: #11242b; background-color: #d8e5df; background-image: repeating-linear-gradient(125deg, transparent 0 12px, rgba(255,255,255,.24) 12px 13px); border: 1px solid #9fb6ad; border-radius: 7px; box-shadow: var(--shadow); }
.license-top { display: flex; justify-content: space-between; gap: 10px; font: 600 10px "IBM Plex Sans", sans-serif; }
.license-bottom { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font: 600 10px "IBM Plex Sans", sans-serif; }
.license-top strong { font-size: 18px; }
.license-body { display: grid; grid-template-columns: 76px 1fr; gap: 14px; align-items: center; margin: 18px 0; }
.portrait { height: 82px; display: grid; place-items: center; overflow: hidden; color: #60766f; background: rgba(255,255,255,.52); }
.portrait img { width: 100%; height: 100%; object-fit: contain; }
.portrait svg { width: 36px; }
.license-body small, .license-body strong { display: block; }
.license-body small { margin-top: 5px; font-size: 8px; }
.license-body strong { font: 700 19px/1 "Barlow Condensed", sans-serif; }
.credential-detail { display: block; margin-top: 4px; color: #354d46; font: 600 10px/1.4 "IBM Plex Sans", sans-serif; }
.license-bottom .credential-detail { grid-column: 1 / -1; display: grid; gap: 3px; margin-top: 3px; overflow-wrap: anywhere; font-size: 11px; }
.license-bottom .credential-detail span { display: block; }
.license-bottom .credential-detail strong { display: inline-block; min-width: 13px; color: #11242b; }
.state-note { color: var(--muted); font-size: 11px; line-height: 1.55; }
.profile-management { margin: 16px 20px 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.profile-management h3 { margin: 0 0 8px; font: 700 20px/1.1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.profile-management p { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.profile-management .cooldown-status { padding: 10px 12px; color: var(--ink); background: var(--soft-surface); border-left: 3px solid var(--amber); font-weight: 600; }
.profile-management .button { width: 100%; margin: 0 0 9px; }
.profile-management .management-notice { display: block; margin-top: 7px; color: var(--muted); line-height: 1.6; font-size: 11px; }
.profile-management .button.danger { background: transparent; border-color: var(--red); color: var(--red); }
.profile-management .button.danger:hover { background: rgba(181,64,50,.1); }
.rules-intro { align-items: end; margin-bottom: 22px; }
.rules-intro > p { max-width: 560px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rule-panel { padding: 22px; border-top: 4px solid var(--teal); background: var(--surface); box-shadow: var(--shadow); }
.rule-panel:nth-child(2) { border-color: var(--amber); }
.rule-panel:nth-child(3) { border-color: #557796; }
.rule-panel:nth-child(4) { border-color: var(--red); }
.rule-panel:nth-child(5) { border-color: #b66a1e; }
.rule-panel:nth-child(6) { border-color: #5c6e3d; }
.rule-panel h3 { margin: 0 0 13px; font: 700 21px "Barlow Condensed", sans-serif; text-transform: uppercase; }
.rule-panel dl { margin: 0; }
.rule-panel dl div { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); }
.rule-panel dt, .rule-panel dd { margin: 0; font-size: 11px; }
.rule-panel dt { color: var(--muted); }
.rule-panel dd { font-weight: 600; text-align: right; }
.source-strip { min-height: 58px; display: flex; align-items: center; gap: 11px; margin-top: 18px; padding: 12px 16px; color: var(--muted); background: var(--quiet-surface); font-size: 11px; }
.source-strip > svg { color: var(--teal); }
.source-strip a { display: inline-flex; gap: 5px; align-items: center; margin-left: auto; color: var(--teal); font-weight: 600; }
.source-strip a svg { width: 14px; }
.about-hero { min-height: 270px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 40px; padding: 38px 42px; color: white; background: var(--nav); border-left: 6px solid var(--amber); box-shadow: var(--shadow); }
.about-hero h2 { margin-top: 8px; font-size: clamp(36px, 5vw, 58px); }
.about-hero > div > p:last-of-type { max-width: 720px; margin: 18px 0 0; color: #c1cdd0; font-size: 14px; line-height: 1.7; }
.about-tags { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 24px; }
.about-tags span { display: inline-flex; align-items: center; gap: 7px; color: #e5ecec; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.about-tags svg { width: 16px; color: var(--amber); }
.about-download { color: var(--nav); background: var(--amber); white-space: nowrap; }
.about-download:hover { background: #e4a63d; }
.guide-section { margin-top: 30px; }
.guide-heading { margin-bottom: 16px; }
.setup-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); background: var(--surface); }
.setup-steps li { min-height: 180px; padding: 22px; border-right: 1px solid var(--line); }
.setup-steps li:last-child { border-right: 0; }
.setup-steps li > span { color: var(--amber); font: 700 30px/1 "Barlow Condensed", sans-serif; }
.setup-steps strong { display: block; margin-top: 22px; font: 700 19px/1.1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.setup-steps p, .feature-list p, .compact-help-panel > p, .creator-strip p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.setup-manual { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .65fr); border: 1px solid var(--line); background: var(--surface); }
.setup-checklist { margin: 0; padding: 8px 26px; list-style: none; }
.setup-checklist li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--item-line); }
.setup-checklist li:last-child { border-bottom: 0; }
.setup-checklist li > span { width: 30px; height: 30px; display: grid; place-items: center; color: var(--teal); border: 1px solid var(--teal); font: 700 16px/1 "Barlow Condensed", sans-serif; }
.setup-checklist strong, .profile-field-grid strong, .save-profile-note strong { display: block; font-size: 12px; }
.setup-checklist p, .profile-field-grid p, .save-profile-note p, .troubleshooting-grid p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.connection-key { padding: 26px; color: white; background: var(--nav); }
.connection-key h3 { margin: 5px 0 20px; font: 700 23px/1.1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.connection-key > div { display: grid; grid-template-columns: 12px 1fr; column-gap: 10px; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.13); }
.connection-key > div strong, .connection-key > div small { grid-column: 2; display: block; }
.connection-key > div strong { font-size: 11px; }
.connection-key > div small { margin-top: 3px; color: #9fb0b5; font-size: 10px; line-height: 1.45; }
.status-dot { grid-row: 1 / span 2; width: 9px; height: 9px; margin-top: 3px; border-radius: 50%; }
.offline-dot { background: #7f9499; }
.waiting-dot { background: var(--amber); }
.online-dot { background: #50bd7a; }
.connection-note { display: grid; grid-template-columns: 18px 1fr; gap: 9px; margin: 18px 0 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.13); color: #b9c6c9; font-size: 10px; line-height: 1.5; }
.connection-note svg { width: 16px; color: var(--amber); }
.profile-guide-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.profile-field-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); }
.profile-field-grid article { min-height: 155px; display: grid; grid-template-columns: 26px 1fr; align-content: start; gap: 10px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.profile-field-grid article:nth-child(4n) { border-right: 0; }
.profile-field-grid article:nth-last-child(-n+4) { border-bottom: 0; }
.profile-field-grid article > svg { width: 19px; color: var(--teal); }
.endorsement-key { display: block; margin-top: 8px; color: var(--ink); line-height: 1.65; }
.save-profile-note { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; padding: 16px 20px; color: var(--ink); background: var(--soft-surface); border: 1px solid var(--line); border-top: 0; }
.save-profile-note > svg { width: 19px; color: var(--teal); }
.troubleshooting-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); }
.troubleshooting-grid > div { min-height: 130px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.troubleshooting-grid > div:nth-child(3n) { border-right: 0; }
.troubleshooting-grid > div:nth-last-child(-n+3) { border-bottom: 0; }
.troubleshooting-grid span { color: var(--amber); font: 700 22px/1 "Barlow Condensed", sans-serif; }
.connection-flow { display: grid; grid-template-columns: minmax(130px, 1fr) 28px minmax(160px, 1fr) 28px minmax(130px, 1fr) 28px minmax(150px, 1fr); align-items: center; padding: 22px; color: white; background: var(--teal-dark); }
.connection-flow > div { min-height: 108px; display: grid; place-items: center; align-content: center; padding: 14px; text-align: center; border: 1px solid rgba(255,255,255,.2); }
.connection-flow > div svg { width: 25px; margin-bottom: 9px; color: var(--amber); }
.connection-flow > div strong, .connection-flow > div small { display: block; }
.connection-flow > div strong { font-size: 12px; }
.connection-flow > div small { margin-top: 4px; color: rgba(255,255,255,.68); font-size: 10px; }
.connection-flow > svg { width: 17px; justify-self: center; color: rgba(255,255,255,.55); }
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 30px; }
.help-panel { background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(35,39,40,.04); }
.help-panel-heading { min-height: 82px; display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.help-panel-heading > svg { width: 25px; color: var(--teal); }
.manual-panel .help-panel-heading > svg, .compact-help-panel:nth-child(2) .help-panel-heading > svg { color: var(--amber); }
.feature-list { margin: 0; padding: 4px 22px; list-style: none; }
.feature-list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 17px 0; border-bottom: 1px solid var(--item-line); }
.feature-list li:last-child { border-bottom: 0; }
.feature-list li > svg { width: 19px; color: var(--teal); }
.manual-panel .feature-list li > svg { color: #9b6814; }
.feature-list strong { font-size: 12px; }
.release-panel { margin-top: 30px; border: 1px solid var(--line); border-top: 4px solid var(--teal); background: var(--surface); box-shadow: 0 4px 16px rgba(35,39,40,.04); }
.release-heading { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.release-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.release-notes > div { min-width: 0; padding: 20px 22px; border-right: 1px solid var(--line); }
.release-notes > div:last-child { border-right: 0; }
.release-notes span, .release-notes strong { display: block; }
.release-notes span { color: var(--teal); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.release-notes strong { margin-top: 6px; font-size: 13px; }
.release-notes p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.lower-help-grid { align-items: stretch; }
.compact-help-panel { padding-bottom: 18px; }
.compact-help-panel > p { margin: 16px 22px 0; font-size: 12px; }
.creator-strip { min-height: 150px; display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 20px; margin-top: 30px; padding: 26px 30px; border-top: 4px solid var(--amber); background: var(--soft-surface); }
.creator-mark { width: 66px; height: 66px; display: grid; place-items: center; border: 2px solid var(--teal); color: var(--teal); font: 700 25px/1 "Barlow Condensed", sans-serif; }
.creator-strip p { max-width: 760px; font-size: 12px; }
.creator-strip > a { display: inline-flex; align-items: center; gap: 7px; color: var(--teal); font-size: 12px; font-weight: 600; }
.creator-strip > a svg { width: 15px; }
#aboutView .setup-steps p, #aboutView .setup-checklist p, #aboutView .profile-field-grid p, #aboutView .save-profile-note p, #aboutView .troubleshooting-grid p, #aboutView .feature-list p, #aboutView .compact-help-panel > p, #aboutView .creator-strip p { font-size: 13px; line-height: 1.6; }
#aboutView .setup-checklist strong, #aboutView .profile-field-grid strong, #aboutView .save-profile-note strong, #aboutView .feature-list strong, #aboutView .connection-key > div strong { font-size: 13px; }
#aboutView .connection-key > div small, #aboutView .connection-note, #aboutView .connection-flow > div small { font-size: 12px; line-height: 1.5; }
dialog { width: min(680px, calc(100% - 30px)); max-height: calc(100vh - 30px); padding: 0; border: 0; color: var(--ink); background: var(--surface); box-shadow: 0 28px 80px rgba(0,0,0,.27); }
dialog::backdrop { background: rgba(11,26,30,.65); backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.dialog-form .form-grid { padding-bottom: 8px; }
.impact-preview { margin: 8px 22px 20px; padding: 13px 15px; color: #67501f; background: #f5e8c9; border-left: 3px solid var(--amber); font-size: 11px; line-height: 1.5; }
.collision-confirmation { display: grid; grid-template-columns: 42px 1fr; gap: 14px; align-items: start; padding: 24px 22px 10px; }
.collision-confirmation > svg { width: 32px; color: var(--amber); }
.collision-confirmation strong { font: 700 22px "Barlow Condensed", sans-serif; text-transform: uppercase; }
.collision-confirmation p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 17px 22px; background: var(--dialog-footer); }
.account-dialog { min-height: 430px; }
.account-body { display: grid; gap: 18px; padding: 22px; }
.account-intro { display: grid; grid-template-columns: 38px 1fr; gap: 13px; align-items: start; }
.account-intro > svg { width: 30px; color: var(--teal); }
.account-intro strong, .account-intro p { display: block; }
.account-intro strong { font: 700 22px/1.1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.account-intro p, .sync-conflict p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.provider-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.provider-button { min-height: 72px; display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: var(--surface); text-align: left; }
.provider-button:hover { border-color: var(--teal); background: var(--soft-surface); }
.provider-button > svg { width: 24px; color: var(--teal); }
.steam-provider > svg { color: var(--ink); }
.provider-button strong, .provider-button small { display: block; }
.provider-button strong { font-size: 12px; }
.provider-button small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.identity-list { display: grid; border: 1px solid var(--line); }
.identity-row { min-height: 52px; display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--item-line); }
.identity-row:last-child { border-bottom: 0; }
.identity-row > svg { width: 18px; color: var(--teal); }
.identity-row strong, .identity-row small { display: block; }
.identity-row strong { font-size: 12px; }
.identity-row small { color: var(--muted); font-size: 12px; text-transform: capitalize; }
.identity-row > span:last-child { color: var(--green); font-size: 12px; font-weight: 600; text-transform: uppercase; }
.sync-conflict { padding: 15px; border-left: 4px solid var(--amber); background: var(--soft-surface); }
.sync-conflict > strong { font: 700 18px/1.1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.sync-conflict > div { display: flex; gap: 8px; margin-top: 13px; }
.sync-status { min-height: 18px; margin: 0; color: var(--muted); font-size: 13px; }
.sync-status.error { color: var(--red); }
.sync-status.synced { color: var(--green); }
.account-dialog-actions { justify-content: space-between; }
.theme-button svg { transition: transform .2s ease; }
.theme-button:hover svg { transform: rotate(12deg); }
:root[data-theme="dark"] .telemetry-status { color: #8dd8aa; border-color: #3f7455; background: #173326; }
:root[data-theme="dark"] .telemetry-status.offline { color: var(--muted); border-color: var(--line); background: #213036; }
:root[data-theme="dark"] .telemetry-status.waiting { color: #e6c66a; border-color: #76642d; background: #332d19; }
:root[data-theme="dark"] .record-icon { background: #173a38; }
:root[data-theme="dark"] .badge.pending { color: #f0ca75; background: #4b381a; }
:root[data-theme="dark"] .badge.convicted { color: #f0a197; background: #4b2724; }
:root[data-theme="dark"] .badge.dismissed { color: #8fd5a9; background: #1d3c2a; }
:root[data-theme="dark"] .row-actions button:hover { background: #482724; }
:root[data-theme="dark"] .checkbox-pill { color: var(--ink) !important; background: var(--field); }
:root[data-theme="dark"] .impact-preview { color: #f0d48d; background: #3b3018; }
:root[data-theme="dark"] .license-preview { color: var(--ink); }
:root[data-theme="dark"] .account-button.signed-in { color: #8dd8aa; border-color: #3f7455; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 10; max-width: 420px; padding: 13px 16px; color: #f5f7f4; background: #10262b; border: 1px solid #365158; border-left: 4px solid var(--amber); box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .2s ease; font-size: 13px; line-height: 1.45; }
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1050px) {
  .status-band { grid-template-columns: 70px 1fr; }
  .status-facts { grid-column: 1 / -1; border: 0; border-top: 1px solid rgba(255,255,255,.22); }
  .status-facts div { padding-top: 16px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .community-strip { grid-template-columns: 1fr; }
  .community-heading { border-right: 0; border-bottom: 1px solid var(--line); }
  .dashboard-grid, .profile-layout, .help-grid { grid-template-columns: 1fr; }
  .profile-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-field-grid article:nth-child(4n) { border-right: 1px solid var(--line); }
  .profile-field-grid article:nth-child(2n) { border-right: 0; }
  .profile-field-grid article:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
  .profile-field-grid article:nth-last-child(-n+2) { border-bottom: 0; }
  .setup-steps { grid-template-columns: repeat(2, 1fr); }
  .setup-steps li:nth-child(2) { border-right: 0; }
  .setup-steps li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .connection-flow { grid-template-columns: 1fr; gap: 10px; }
  .connection-flow > svg { transform: rotate(90deg); }
  .troubleshooting-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .troubleshooting-grid > div:nth-child(3n) { border-right: 1px solid var(--line); }
  .troubleshooting-grid > div:nth-child(2n) { border-right: 0; }
  .troubleshooting-grid > div:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .troubleshooting-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 20; width: 250px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 12px 0 30px rgba(0,0,0,.25); }
  .sidebar.open { transform: none; }
  .menu-button { display: inline-grid; }
  .topbar { align-items: flex-start; padding: 15px 17px; }
  .topbar > div:nth-child(2) { flex: 1; }
  .topbar-actions { align-items: stretch; flex-direction: column; }
  .theme-button { align-self: flex-end; }
  .game-date { display: none; }
  .telemetry-status { display: none; }
  .content { padding: 20px 16px 38px; }
  .status-band { grid-template-columns: 54px 1fr; padding: 22px 18px; gap: 15px; }
  .status-seal { width: 52px; height: 52px; }
  .status-seal svg { width: 26px; }
  .status-facts { grid-template-columns: 1fr; }
  .status-facts div { padding: 10px 0; }
  .community-strip dl { grid-template-columns: repeat(2, 1fr); }
  .community-strip dl div:nth-child(2) { border-right: 0; }
  .community-strip dl div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 105px; padding: 17px; }
  .section-toolbar, .rules-intro { align-items: flex-start; flex-direction: column; }
  .filter-group { width: 100%; overflow-x: auto; }
  .filter { flex: 1; }
  .rules-grid { grid-template-columns: 1fr; }
  .setup-manual { grid-template-columns: 1fr; }
  .profile-guide-heading { align-items: flex-start; flex-direction: column; }
  .about-hero { grid-template-columns: 1fr; align-items: start; padding: 28px 24px; }
  .about-download { justify-self: start; }
  .creator-strip { grid-template-columns: 58px 1fr; padding: 22px; }
  .creator-mark { width: 54px; height: 54px; }
  .creator-strip > a { grid-column: 2; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide, .form-grid fieldset.wide { grid-column: auto; }
  .dialog-actions .button { flex: 1; }
  .provider-actions { grid-template-columns: 1fr; }
  .release-heading { align-items: flex-start; flex-direction: column; }
  .release-notes { grid-template-columns: 1fr; }
  .release-notes > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .release-notes > div:last-child { border-bottom: 0; }
}

@media (max-width: 440px) {
  .topbar > div:nth-child(2) { max-width: calc(100% - 218px); }
  .topbar h1 { font-size: 24px; }
  .topbar-actions .button { width: 42px; padding: 0; }
  .topbar-actions .button svg { margin: 0; }
  .topbar-actions .button { font-size: 0; }
  .theme-button { position: absolute; top: 15px; right: 66px; }
  .account-button { position: absolute; top: 15px; right: 115px; min-width: 39px; width: 39px; padding: 0; }
  .account-button span { display: none; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:nth-child(3) { border-bottom: 1px solid var(--line); }
  .status-copy strong { font-size: 38px; }
  .record-item { grid-template-columns: 38px 1fr; }
  .record-item .badge { grid-column: 2; justify-self: start; }
  .source-strip { align-items: flex-start; flex-wrap: wrap; }
  .source-strip a { width: 100%; margin: 0 0 0 30px; }
  .setup-steps { grid-template-columns: 1fr; }
  .setup-steps li { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .setup-steps li:last-child { border-bottom: 0; }
  .about-hero h2 { font-size: 36px; }
  .about-download { width: 100%; white-space: normal; }
  .creator-strip { grid-template-columns: 1fr; }
  .creator-strip > a { grid-column: auto; }
  .profile-field-grid, .troubleshooting-grid { grid-template-columns: 1fr; }
  .profile-field-grid article, .profile-field-grid article:nth-child(2n), .profile-field-grid article:nth-child(4n), .troubleshooting-grid > div, .troubleshooting-grid > div:nth-child(2n), .troubleshooting-grid > div:nth-child(3n) { border-right: 0; }
  .profile-field-grid article:nth-last-child(-n+2), .profile-field-grid article:nth-last-child(-n+4), .troubleshooting-grid > div:nth-last-child(-n+2), .troubleshooting-grid > div:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  .profile-field-grid article:last-child, .troubleshooting-grid > div:last-child { border-bottom: 0; }
  .sync-conflict > div { flex-direction: column; }
}
.preview-alert { padding: 12px 22px; background: #f2e1b9; color: #372709; border-bottom: 2px solid #b9882f; font: 600 13px/1.5 sans-serif; }
