:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-weight: 450;
  line-height: 1.5;
  color: #142c24;
  background: #f3f5ef;
  --ink: #142c24;
  --muted: #53685d;
  --pine: #123e34;
  --pine-dark: #102f27;
  --green: #22684e;
  --lime: #d7f881;
  --surface: #fff;
  --soft: #edf3eb;
  --line: #d7e2d8;
  --field-line: #b5c9bb;
  --danger: #912b30;
  --danger-bg: #fff1ef;
  --shadow: 0 1px 2px #19382b09, 0 9px 28px #19382b07;
  --radius: .95rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; }
body { min-height: 100vh; margin: 0; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-underline-offset: .18em; }
svg { inline-size: 1.2em; block-size: 1.2em; flex: none; vertical-align: middle; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }
:focus-visible { outline: .17rem solid #2b7958; outline-offset: .18rem; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 730; letter-spacing: -.025em; }
h1, h2, h3, h4, p { margin: 0; }
h2 { font-size: 1.225rem; }
h3 { font-size: 1.04rem; }
small { font-size: .825rem; }
strong, b { font-weight: 700; }

.sr-only, .visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  z-index: 10;
  inset: .6rem auto auto .6rem;
  padding: .75rem 1rem;
  border-radius: .5rem;
  color: var(--pine-dark);
  background: var(--lime);
  transform: translateY(-200%);
}

.skip-link:focus { transform: translateY(0); }
.startup { margin: 2rem; color: var(--pine); }
.entry-page {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(1rem, 5vw, 3rem);
  place-items: center;
  background: radial-gradient(ellipse at 100% 0, #e2eedc, #f3f5ef 65%);
}
.entry-card {
  display: grid;
  width: min(100%, 31rem);
  gap: 1.15rem;
  padding: clamp(1.1rem, 5vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.entry-header, .entry-brand { display: flex; align-items: center; gap: .65rem; }
.entry-header { justify-content: space-between; }
.entry-brand { color: var(--pine); font-weight: 760; }
.entry-card h1 { color: var(--pine); font-size: clamp(1.7rem, 5vw, 2.25rem); }
.entry-card h1:focus { outline: none; }
.entry-copy { display: grid; gap: .65rem; color: var(--muted); }
.entry-actions { display: grid; gap: .6rem; }
.entry-actions .button { min-height: 2.85rem; }
.app-shell { display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: 100vh; }
.app-body { display: flex; min-width: 0; min-height: 100vh; flex-direction: column; }
.sidebar {
  display: flex;
  min-width: 0;
  position: sticky;
  z-index: 4;
  top: 0;
  flex-direction: column;
  align-self: start;
  height: 100vh;
  height: 100dvh;
  padding: 1.45rem .95rem 1.1rem;
  color: #e3eee5;
  background: var(--pine-dark);
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 0 .25rem 2rem;
  padding: .2rem;
  color: #fff;
  font-size: 1.2rem;
  line-height: 1.12;
  letter-spacing: -.04em;
  font-weight: 760;
  text-decoration: none;
}

.brand-mark, .brand-icon {
  display: inline-grid;
  flex: 0 0 2.5rem;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  place-items: center;
  border-radius: .65rem;
  color: var(--pine-dark);
  background: var(--lime);
}

.brand-mark:empty::before, .brand-icon:empty::before {
  content: "";
  inline-size: 1.4rem;
  block-size: .95rem;
  border: 1.5px solid currentColor;
  border-radius: .19rem;
  background:
    radial-gradient(circle at center, transparent 2px, currentColor 2.2px 3.15px, transparent 3.35px),
    linear-gradient(90deg, transparent calc(50% - .6px), currentColor calc(50% - .6px) calc(50% + .6px), transparent calc(50% + .6px));
}

.brand-label { display: grid; gap: .18rem; }
.brand small { color: #a5bcad; font-size: .75rem; font-weight: 550; letter-spacing: .01em; }
.side-nav { display: flex; flex-direction: column; gap: .3rem; }
.side-nav :focus-visible, .brand:focus-visible { outline-color: var(--lime); }
.nav-link {
  display: flex;
  min-width: 0;
  min-height: 2.85rem;
  align-items: center;
  gap: .68rem;
  padding: .66rem .72rem;
  border: 1px solid transparent;
  border-radius: .58rem;
  color: #d3e1d6;
  background: transparent;
  font-size: .9rem;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
}

.nav-link:hover { color: #fff; background: #ffffff13; }
.nav-link[aria-current="page"], .nav-link.active, .nav-link.is-active {
  color: #efffcb;
  background: #d7f88118;
  border-color: #d7f88122;
}

.nav-link svg { color: #acd2b6; }
.nav-link[aria-current="page"] svg, .nav-link.active svg, .nav-link.is-active svg { color: var(--lime); }
.nav-icon { position: relative; display: inline-block; inline-size: 1.05rem; block-size: 1.05rem; flex: none; color: #a9ccb6; }
.nav-link.active .nav-icon { color: var(--lime); }
.nav-icon::before, .nav-icon::after { content: ""; position: absolute; }
.nav-search::before { inset: 1px 3px 3px 1px; border: 1.5px solid currentColor; border-radius: 50%; }
.nav-search::after { inline-size: 5px; block-size: 1.5px; inset: auto 0 2px auto; background: currentColor; transform: rotate(45deg); }
.nav-history::before { inset: 1px; border: 1.5px solid currentColor; border-radius: 50%; }
.nav-history::after { inline-size: 4px; block-size: 5px; inset: 4px auto auto 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; }
.nav-credits::before { inset: 3px 1px; border: 1.5px solid currentColor; border-radius: 3px; }
.nav-credits::after { inset: 8px 2px auto auto; inline-size: 5px; block-size: 1.5px; background: currentColor; }
.nav-admin::before { inset: 3px 2px; border: 1.5px solid currentColor; border-radius: 2px; }
.nav-admin::after { inset: 6px 5px; border-block: 1.5px solid currentColor; }
.sidebar-note {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin-top: auto;
  padding: .95rem .72rem .2rem;
  border-top: 1px solid #ffffff20;
  color: #bdd0c2;
  font-size: .825rem;
}

.sidebar-note strong { color: #f2faf3; }
.status-dot { inline-size: .44rem; block-size: .44rem; border-radius: 50%; background: var(--lime); flex: none; }
.credit-icon {
  display: inline-block;
  inline-size: .85rem;
  block-size: .85rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: radial-gradient(circle, currentColor 1.5px, transparent 1.65px);
  flex: none;
}
.topbar {
  display: flex;
  min-height: 4.45rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .68rem clamp(1.15rem, 3vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: #fbfcf8;
}

.breadcrumbs { color: var(--muted); font-size: .9rem; font-weight: 650; }
.breadcrumbs strong { color: var(--ink); }
.top-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .58rem; }
.credit-chip, .header-badge, .status-chip, .match-count, .range-badge {
  display: inline-flex;
  min-height: 1.85rem;
  align-items: center;
  justify-content: center;
  gap: .37rem;
  padding: .35rem .65rem;
  border: 1px solid #cbddce;
  border-radius: 999px;
  color: #234a36;
  background: #eef5ed;
  font-size: .825rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.credit-chip:hover { background: #dfefda; }
.account-link {
  display: inline-flex;
  min-block-size: 2.2rem;
  align-items: center;
  padding: .37rem .55rem;
  border-radius: .48rem;
  color: var(--green);
  font-size: .875rem;
  font-weight: 700;
  text-decoration: none;
}
.account-link:hover { background: var(--soft); }
.breadcrumb-separator { margin-inline: .25rem; color: #798e82; }
.locale-control {
  display: inline-flex;
  align-items: center;
  gap: .36rem;
  color: var(--muted);
  font-size: .875rem;
}

.locale-control select, select.locale-control {
  inline-size: auto;
  min-block-size: 2.2rem;
  padding: .3rem 1.7rem .3rem .55rem;
  font-size: .85rem;
}

.page-wrap {
  width: min(100%, 83rem);
  min-width: 0;
  margin-inline: auto;
  padding: clamp(1rem, 2.65vw, 2.6rem);
}

.page-header {
  position: relative;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  overflow: hidden;
  margin-bottom: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2.3rem);
  border-radius: var(--radius);
  color: #f4fbf4;
  background: var(--pine);
  isolation: isolate;
}

.page-header::after {
  content: "";
  position: absolute;
  z-index: -1;
  inline-size: clamp(10rem, 28vw, 24rem);
  block-size: clamp(7rem, 15vw, 10.5rem);
  inset: auto -1.8rem -2.5rem auto;
  border: 1px solid #d7f88127;
  outline: 1px solid #d7f88113;
  outline-offset: .4rem;
  border-radius: .45rem;
  background:
    radial-gradient(circle at 50% 50%, transparent 15%, #d7f88128 15.2% 15.7%, transparent 16%),
    linear-gradient(90deg, transparent calc(50% - .5px), #d7f88128 calc(50% - .5px) calc(50% + .5px), transparent calc(50% + .5px));
  transform: rotate(-12deg);
}

.page-header h1 { font-size: clamp(1.72rem, 3.12vw, 2.7rem); letter-spacing: -.045em; }
.page-sub { max-width: 42rem; margin-block-start: .48rem; color: #d7e8dc; }
.eyebrow { margin-block-end: .42rem; color: var(--lime); font-size: .875rem; font-weight: 740; }
.header-badge { flex: none; color: #e6f6dc; background: #ffffff14; border-color: #ffffff3a; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, .46fr); align-items: start; gap: 1.2rem; }
.search-column, .analysis-sidebar { display: flex; min-width: 0; flex-direction: column; gap: 1.15rem; }
.analysis-sidebar { position: sticky; top: 1rem; }
.panel, .result-card, .auth-panel, .package-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-head, .result-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: .75rem;
  padding: 1.15rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.panel-head p, .result-head p, .field small, .helper-panel p { margin-top: .28rem; color: var(--muted); }
.panel-body { padding: 1.2rem; }
.helper-panel { color: var(--ink); background: #fafcf7; }
.helper-panel ul { margin: .8rem 0 0; padding-inline-start: 1.2rem; color: var(--muted); }
.helper-panel li + li { margin-top: .46rem; }
.helper-panel strong { color: var(--pine); }
.odds-form { display: grid; gap: 1rem; }
.search-panel .odds-form { padding: 1.2rem; }
.draft-list { display: grid; gap: .85rem; }
.field-label { display: inline-block; margin-block-end: .25rem; color: var(--ink); font-size: .875rem; font-weight: 700; }
.optional-label { color: var(--muted); }
.odds-field label { display: flex; flex-wrap: wrap; align-items: center; gap: .32rem; letter-spacing: -.01em; }
.odds-field label strong { min-inline-size: 1.3rem; padding: .05rem .22rem; border-radius: .27rem; color: var(--green); text-align: center; background: #e6f0e3; }
.odds-field label span { color: var(--muted); font-size: .875rem; }
.form-credit-note { color: var(--muted); font-size: .875rem; text-align: end; }
.helper-panel .button { margin-top: .55rem; }
.game-card {
  display: grid;
  min-width: 0;
  gap: .9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: .76rem;
  background: #f9fbf7;
}

.game-heading, .form-actions, .result-meta, .pagination, .detail-actions, .form-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
}

.game-heading h3, .game-heading strong { color: var(--pine); }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.field { display: grid; min-width: 0; align-content: start; gap: .28rem; }
.field > label, .field > span:first-child, label.field > span, legend { font-size: .875rem; font-weight: 690; }
.field label { color: var(--ink); }
fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
legend { margin-block-end: .42rem; padding: 0; }
.odds-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.odds-grid input { font-size: 1.12rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.odds-grid input::placeholder { color: #64786b; font-weight: 500; }
.field-error, .error-text {
  color: var(--danger);
  font-size: .85rem;
  line-height: 1.35;
}

input, select, textarea {
  display: block;
  min-width: 0;
  width: 100%;
  min-height: 2.65rem;
  padding: .53rem .68rem;
  border: 1px solid var(--field-line);
  border-radius: .52rem;
  color: var(--ink);
  background: var(--surface);
  font-size: 1rem;
}

input::placeholder, textarea::placeholder { color: #63786b; }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: auto; accent-color: var(--green); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); background: #fff8f7; }
input:hover, select:hover, textarea:hover { border-color: #87a693; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: .04rem; }
select {
  appearance: none;
  padding-right: 1.7rem;
  background-image:
    linear-gradient(45deg, transparent 48%, #456557 51%),
    linear-gradient(135deg, #456557 48%, transparent 51%);
  background-position: calc(100% - .91rem) 52%, calc(100% - .65rem) 52%;
  background-repeat: no-repeat;
  background-size: .26rem .26rem;
}

.league-combobox { position: relative; min-width: 0; border-color: var(--field-line); }
.league-summary {
  display: flex;
  min-block-size: 2.6rem;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  padding: .5rem .7rem;
  color: var(--ink);
  font-weight: 580;
}
.league-summary[aria-invalid="true"] { color: var(--danger); background: var(--danger-bg); }
.league-summary::marker, .settings-panel > summary::marker, .league-summary::-webkit-details-marker,
.settings-panel > summary::-webkit-details-marker { display: none; content: ""; }
.chevron { display: inline-block; inline-size: .45rem; block-size: .45rem; margin: -.18rem .15rem 0 0; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); flex: none; }
details[open] > summary .chevron { margin-block-start: .25rem; transform: rotate(225deg); }
.league-combobox [role="listbox"], .league-popover {
  position: absolute;
  z-index: 5;
  inset: calc(100% + .25rem) 0 auto;
  margin: 0;
  padding: .48rem;
  border: 1px solid var(--field-line);
  border-radius: .56rem;
  background: var(--surface);
  box-shadow: 0 .5rem 1.5rem #102f2724;
}

.league-options { max-block-size: 13rem; margin-top: .35rem; overflow-y: auto; }
.league-empty { padding: .55rem; color: var(--muted); }
.league-combobox [role="option"], .league-option {
  display: block;
  inline-size: 100%;
  padding: .55rem;
  border: 0;
  border-radius: .28rem;
  color: var(--ink);
  background: transparent;
  text-align: start;
}

.league-combobox [role="option"]:hover, .league-combobox [aria-selected="true"], .league-option:hover { background: var(--soft); }
.league-option[aria-pressed="true"] { background: #e7f2e2; font-weight: 700; }
.all-leagues { color: var(--green); font-weight: 700; }
.model-segments, .segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .22rem;
  padding: .22rem;
  border: 1px solid #d4e1d4;
  border-radius: .63rem;
  background: var(--soft);
}

.model-segment {
  position: relative;
  display: flex;
  min-block-size: 2.55rem;
  align-items: center;
  justify-content: center;
  gap: .33rem;
  padding: .45rem .48rem;
  border: 1px solid transparent;
  border-radius: .44rem;
  color: #3b5d4e;
  background: transparent;
  font-size: .87rem;
  font-weight: 680;
  cursor: pointer;
}

.model-segment > input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.model-segment:has(input:focus-visible) { outline: .17rem solid var(--green); outline-offset: .1rem; }
.model-segment[aria-pressed="true"], .model-segment[aria-checked="true"],
.model-segment.active, .model-segment.is-active, .model-segment:has(input:checked) {
  border-color: #c3d5c7;
  color: var(--pine);
  background: #fff;
  box-shadow: 0 1px 2px #19382b10;
}

.settings-panel { border: 1px solid var(--line); border-radius: .6rem; background: #f7faf5; }
.settings-panel input { min-height: 2.4rem; padding: .38rem .53rem; }
.model-help { margin-block: .7rem; color: var(--muted); font-size: .925rem; }
.settings-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.settings-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.settings-fields > .button { grid-column: 1 / -1; justify-self: start; }
.button, .icon-button {
  display: inline-flex;
  min-block-size: 2.56rem;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .52rem .84rem;
  border: 1px solid transparent;
  border-radius: .54rem;
  color: var(--ink);
  background: var(--soft);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.button:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: #e0ebdf; }
.button.primary { border-color: var(--pine); color: #fff; background: var(--pine); }
.button.primary:hover:not(:disabled) { background: #235744; }
.button.secondary { border-color: #c9d8ca; background: #f8fbf6; }
.button.ghost, .icon-button { border-color: transparent; color: var(--green); background: transparent; }
.button.danger { border-color: #e2bfc0; color: var(--danger); background: var(--danger-bg); }
.button.danger:hover:not(:disabled) { background: #f8dfdc; }
.icon-button { min-inline-size: 2.5rem; padding-inline: .45rem; }
.notice {
  padding: .72rem .85rem;
  border: 1px solid #ccdeca;
  border-radius: .6rem;
  color: #2f553d;
  background: #edf6e9;
  font-size: .9rem;
}

.notice.warning, .notice.warn { border-color: #e7d19d; color: #665014; background: #fff7dd; }
.notice.error, .error.notice { border-color: #e6c0bf; color: var(--danger); background: var(--danger-bg); }
.notice a, .notice .button { margin-inline-start: .55rem; }
.page-wrap > .notice { margin-block: .7rem; }
.empty-state, .loading-state {
  display: grid;
  justify-items: start;
  gap: .55rem;
  padding: 1.1rem;
  border: 1px dashed #bdcebf;
  border-radius: .65rem;
  color: var(--muted);
  background: #f8fbf6;
}

.empty-state strong, .empty-state h2, .empty-state h3 { color: var(--ink); }
.empty-state svg, .loading-state svg { color: var(--green); }
.preview-ladder { display: grid; gap: .45rem; }
.preview-ladder > * { padding: .68rem .75rem; border-radius: .55rem; color: var(--pine); background: #edf3eb; }
.result-card { overflow: hidden; }
.result-card + .result-card { margin-block-start: 1rem; }
.result-head { background: #f7faf5; }
.result-meta { gap: .45rem; justify-content: flex-start; }
.result-meta > span { font-variant-numeric: tabular-nums; }
.range-badge.tight, .range-badge.level-high { border-color: #206047; color: #f5ffe9; background: #206047; }
.range-badge.mid { border-color: #bad8bd; color: #285c39; background: #e3f1df; }
.range-badge.wide { border-color: #e2cd8d; color: #695410; background: #faf1d3; }
.result-overview { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .42rem; }
.result-count { font-weight: 700; color: var(--pine); white-space: nowrap; }
.result-card > .panel-body { display: grid; gap: 1.15rem; }
.result-card h3 { margin-block-end: .5rem; }
.outcome-grid, .contrast-grid, .package-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.contrast-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.outcome-tile {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: .14rem;
  padding: .72rem;
  border: 1px solid #d9e6d9;
  border-radius: .6rem;
  color: var(--pine);
  background: #eff5ec;
}

.outcome-tile strong { font-size: clamp(.98rem, 2vw, 1.38rem); font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.outcome-tile small { color: #496454; }
.outcome-tile.prob-mid { background: #e3f0df; }
.outcome-tile.prob-high { color: #fff; background: #285d46; }
.outcome-tile.prob-high small { color: #d9f1dc; }
.outcome-code { font-size: .875rem; font-weight: 760; }
.outcome-label { font-size: .9rem; }
.metric-value { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: .15rem .42rem; font-variant-numeric: tabular-nums; }
.metric-value small { color: var(--muted); }
.metric-value.prob-mid strong { color: #2d653b; }
.metric-value.prob-high strong { color: #1b633e; }
.outcome-tile.prob-high .metric-value strong, .outcome-tile.prob-high .metric-value small { color: inherit; }
.totals-section { min-width: 0; }
.featured-line { background: #edf5e6; }
.contrast-grid > section { min-width: 0; padding: .7rem .75rem; border: 1px solid var(--line); border-radius: .6rem; background: #f9fbf7; }
.contrast-metrics, .detail-row dl { display: grid; gap: .28rem; margin: 0; }
.contrast-metrics > div, .detail-row dl > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem .6rem; }
.contrast-metrics dd, .detail-row dd { margin: 0; }
.detail-row dl { margin-top: .38rem; }
.detail-row h4 { font-size: .95rem; }
.details > summary { display: flex; align-items: center; justify-content: space-between; gap: .35rem; }
.details-content { display: grid; gap: .85rem; }
.detail-section + .detail-section { padding-top: .78rem; border-top: 1px solid var(--line); }
.detail-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .45rem; }
.detail-heading > h3 { margin: 0; }
.detail-heading > span { color: var(--muted); font-size: .875rem; white-space: nowrap; }
.detail-row { padding: .6rem; border-radius: .45rem; background: #f6faf5; }
.match-list > .button { justify-self: start; }
.match-grid { display: grid; gap: .3rem; }
.match-grid > .match-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(6rem, .36fr); align-items: start; }
.match-grid > .match-heading { font-size: .875rem; font-weight: 700; color: var(--muted); background: #edf4eb; }
.match-main small, .match-scores small { display: block; overflow-wrap: anywhere; }
.match-main strong { overflow-wrap: anywhere; }
.match-scores { color: var(--green); font-variant-numeric: tabular-nums; }
.totals-table, table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.totals-table tr + tr, tbody tr { border-bottom: 1px solid var(--line); }
th, td { padding: .48rem; vertical-align: top; }
th { color: var(--ink); font-weight: 680; }
.table-scroll { max-width: 100%; overflow: auto; }
.details, details {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: #fff;
}

summary {
  padding: .65rem .8rem;
  border-radius: .55rem;
  color: var(--pine);
  cursor: pointer;
  font-weight: 680;
}

details[open] > summary { border-bottom: 1px solid var(--line); }
details > :not(summary) { margin: .7rem .8rem; }
.detail-section { display: grid; gap: .45rem; }
.detail-section > p { color: var(--muted); font-size: .88rem; }
.match-list, .history-list, .order-list { display: grid; min-width: 0; gap: .55rem; }
.match-row, .history-row, .order-row {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .55rem;
  padding: .73rem .85rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  color: var(--ink);
  background: #fafcf9;
}

.match-row p, .history-row p, .order-row p { color: var(--muted); font-size: .88rem; }
.match-row small, .history-row small, .order-row small { color: var(--muted); }
.history-list { padding: .8rem; }
.history-row h2 { font-size: 1.1rem; }
.history-count { color: var(--muted); font-size: .875rem; }
.archived-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .85rem; }
.history-meta { overflow-wrap: anywhere; }
.order-row > div { min-width: 0; }
.order-status { padding: .23rem .47rem; border-radius: .35rem; background: #e7f2e4; color: #345c3d; font-size: .875rem; font-weight: 700; }
.order-status.pending { background: #fff5d9; color: #685219; }
.order-follow-up { flex: 1 0 100%; display: grid; gap: .5rem; padding-top: .65rem; border-top: 1px solid var(--line); }
.order-contact-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.order-copy-status { align-self: center; color: var(--muted); font-size: .88rem; }
.order-draft { resize: vertical; }
.movement { color: #70493b; font-weight: 730; font-variant-numeric: tabular-nums; }
.movement.positive { color: var(--green); }
.match-score { color: var(--pine); font-weight: 750; font-variant-numeric: tabular-nums; }
.pagination { justify-content: center; margin-block-start: .7rem; }
.package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1rem; }
.package-card > .panel-body { display: grid; align-content: start; justify-items: start; gap: .65rem; }
.package-card .credit-icon { color: var(--green); background-color: #e8f3df; inline-size: 1.65rem; block-size: 1.65rem; }
.package-card p { color: var(--muted); }
.package-card strong { color: var(--pine); font-size: 1.4rem; }
.auth-panel { width: min(100%, 34rem); margin-inline: auto; overflow: hidden; }
.auth-panel form { display: grid; gap: .85rem; }
.auth-panel .notice { margin-bottom: .85rem; }
.auth-tabs, .auth-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.auth-panel .panel-body { display: grid; gap: .72rem; }
.account-email { margin: 0; overflow-wrap: anywhere; font-weight: 600; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: .8rem; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; margin-top: auto; padding: .85rem clamp(1rem, 3vw, 3rem); border-top: 1px solid var(--line); color: var(--muted); font-size: .825rem; }
.site-info-links { display: flex; flex-wrap: wrap; gap: .85rem; }
.entry-card .site-info-links { padding-top: .55rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }

@media (max-width: 70rem) {
  .app-shell { grid-template-columns: 12.6rem minmax(0, 1fr); }
  .workspace-grid { grid-template-columns: minmax(0, 1fr) minmax(13.9rem, .43fr); gap: .8rem; }
  .page-wrap { padding: 1.1rem; }
  .sidebar { padding-inline: .65rem; }
}

@media (max-width: 54rem) {
  .app-shell { position: relative; display: flex; flex-direction: column; }
  .sidebar {
    position: relative;
    inset: auto;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    height: auto;
    justify-content: space-between;
    align-items: center;
    gap: .4rem;
    padding: .65rem 1rem;
  }
  .brand { margin: 0; }
  .side-nav { flex-direction: row; flex: 1; justify-content: flex-end; flex-wrap: wrap; }
  .sidebar-note { display: none; }
  .topbar { min-height: 3.3rem; padding: .5rem 1rem; }
  .app-body { min-height: calc(100vh - 3.5rem); }
  .analysis-sidebar { position: static; }
}

@media (max-width: 43rem) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .search-column, .analysis-sidebar { gap: .8rem; }
  .page-wrap { padding-inline: .85rem; }
}

@media (max-width: 35rem) {
  .sidebar { display: block; padding: .55rem .83rem .55rem; }
  .brand { width: fit-content; margin-bottom: .3rem; font-size: 1.08rem; }
  .brand-mark, .brand-icon { flex-basis: 1.95rem; inline-size: 1.95rem; block-size: 1.95rem; border-radius: .45rem; }
  .side-nav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .2rem; padding-block: .15rem; }
  .nav-link { justify-content: center; min-height: 2.65rem; padding: .4rem .2rem; font-size: .875rem; text-align: center; overflow-wrap: anywhere; }
  .nav-link svg, .nav-link .nav-icon { display: none; }
  .topbar { gap: .35rem; padding-inline: .85rem; }
  .top-actions { gap: .35rem; }
  .breadcrumbs { font-size: .875rem; }
  .topbar-brand, .breadcrumb-separator { display: none; }
  .credit-chip { padding-inline: .5rem; }
  .page-header { margin-bottom: .9rem; padding: 1rem; }
  .page-header h1 { font-size: 1.72rem; }
  .page-header::after { opacity: .6; }
  .page-header .header-badge { align-self: start; }
  .panel-head, .panel-body, .result-head { padding: .85rem; }
  .search-panel .odds-form { padding: .85rem; }
  .game-card { padding: .75rem; gap: .68rem; }
  .field-grid, .odds-grid { gap: .5rem; }
  .outcome-grid, .contrast-grid, .package-grid { gap: .4rem; }
  .outcome-tile { padding: .53rem; }
}

@media (max-width: 24rem) {
  .sidebar { padding-inline: .55rem; }
  .page-wrap { padding-inline: .6rem; }
  .header-badge { font-size: .75rem; }
  .form-actions .button.primary { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; }
}
