:root {
  --bg: #f4f3ef;
  --surface: #ffffff;
  --ink: #11161a;
  --muted: #646d72;
  --line: #d9ddd8;
  --emerald: #17836d;
  --emerald-strong: #0d6a58;
  --gold: #d8ad58;
  --gold-soft: #f0cb7b;
  --hero: #0b1115;
  --hero-surface: #0d2823;
  --coral: #d9534f;
  --blue: #2f6fdb;
  --violet: #7767d8;
  --shadow: 0 18px 46px rgba(6, 12, 15, 0.08);
  font-family: "Segoe UI", "Noto Sans KR", AppleSDGothicNeo, Arial, sans-serif;
}

/* Member play ledger */
.ledger-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: min(1180px, 100%);
  gap: 28px;
  align-items: end;
  margin: 0 auto 24px;
  border-radius: 8px;
  background: #1c2428;
  color: #fff;
  padding: 34px 36px;
  box-shadow: var(--shadow);
}

.ledger-hero > div:first-child > span,
.dashboard-ledger-callout span {
  color: #80d8bd;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ledger-hero h1 {
  max-width: 760px;
  margin: 7px 0 10px;
  font-size: 38px;
  line-height: 1.16;
}

.ledger-hero h1 em {
  color: #ffd36b;
  font-style: normal;
}

.ledger-hero p {
  max-width: 760px;
  margin: 0;
  color: #c8d2cf;
}

.ledger-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ledger-hero-actions form {
  margin: 0;
}

.ledger-hero-actions .secondary-button {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.ledger-page-error {
  width: min(1180px, 100%);
  margin: -10px auto 20px;
}

.ledger-kpis,
.ledger-round-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(1180px, 100%);
  margin: 0 auto 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f7f9f6;
}

.ledger-kpis > div,
.ledger-round-summary > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 17px 18px;
  border-right: 1px solid var(--line);
}

.ledger-kpis > div:last-child,
.ledger-round-summary > div:last-child {
  border-right: 0;
}

.ledger-kpis span,
.ledger-kpis small,
.ledger-round-summary span,
.ledger-round-summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ledger-kpis strong,
.ledger-round-summary strong {
  overflow-wrap: anywhere;
  color: #202a26;
  font-size: 22px;
}

.ledger-kpis .positive strong {
  color: #18704f;
}

.ledger-kpis .negative strong {
  color: #b83c36;
}

.ledger-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  width: min(1180px, 100%);
  gap: 18px;
  align-items: start;
  margin: 0 auto 28px;
}

.ledger-entry,
.budget-guard {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 25px;
  box-shadow: var(--shadow);
}

.ledger-entry {
  display: grid;
  gap: 17px;
}

.ledger-entry label,
.budget-form label {
  display: grid;
  min-width: 0;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.ledger-entry input,
.ledger-entry select,
.ledger-entry textarea,
.budget-form input,
.ledger-money input {
  width: 100%;
}

.ledger-lines textarea {
  min-height: 172px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  line-height: 1.75;
}

.ledger-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.ledger-entry-footer {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.ledger-entry-footer span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.ledger-import-note {
  margin: 0;
  border-left: 3px solid #d69d2f;
  background: #fff8e8;
  color: #6b5426;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 750;
}

.budget-guard {
  border-top: 4px solid #2c8370;
}

.budget-guard.caution {
  border-top-color: #d69d2f;
}

.budget-guard.over {
  border-top-color: #c94b43;
}

.budget-dial {
  display: grid;
  gap: 10px;
  margin: 24px 0 16px;
}

.budget-dial > div {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
}

.budget-dial span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.budget-dial strong {
  color: #202a26;
  font-size: 20px;
}

.budget-dial i {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: #e9eeeb;
}

.budget-dial i b {
  display: block;
  width: var(--budget-rate);
  height: 100%;
  border-radius: inherit;
  background: #2c8370;
}

.budget-guard.caution .budget-dial i b {
  background: #d69d2f;
}

.budget-guard.over .budget-dial i b {
  background: #c94b43;
}

.budget-status {
  display: block;
  color: #1f5f50;
  font-size: 15px;
}

.budget-guard.caution .budget-status {
  color: #8a5b06;
}

.budget-guard.over .budget-status {
  color: #a73731;
}

.budget-guard > p,
.budget-guard > small {
  color: var(--muted);
}

.budget-guard > p {
  margin: 6px 0 18px;
}

.budget-guard > small {
  display: block;
  margin-top: 15px;
  line-height: 1.55;
}

.budget-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.ledger-round-section,
.ledger-history-band {
  width: min(1180px, 100%);
  margin: 0 auto 28px;
}

.ledger-round-header {
  display: flex;
  gap: 20px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ledger-round-header > div > span {
  color: var(--emerald-strong);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ledger-round-header h2 {
  margin: 4px 0;
  font-size: 28px;
}

.ledger-round-header p {
  margin: 0;
  color: var(--muted);
}

.ledger-round-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.ledger-round-tabs a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  padding: 0 11px;
  font-size: 12px;
  font-weight: 850;
}

.ledger-round-tabs a.active {
  border-color: #1f6e5c;
  background: #1f6e5c;
  color: #fff;
}

.ledger-round-summary {
  width: 100%;
  margin-bottom: 14px;
}

.ledger-table {
  min-width: 1080px;
}

.ledger-table td:first-child {
  min-width: 185px;
}

.ledger-table td > small,
.ledger-result small,
.ledger-money small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.ledger-table td > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.ledger-table code {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.ledger-result strong,
.ledger-money > strong {
  display: block;
  margin-top: 8px;
  color: #202a26;
  font-size: 17px;
}

.ledger-money > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.ledger-money form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 6px;
  min-width: 260px;
  margin-top: 10px;
}

.ledger-money .save-number-link {
  min-height: 42px;
}

.ledger-history-band {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.ledger-history-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.ledger-history-list a {
  display: grid;
  min-width: 0;
  gap: 5px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: #202a26;
  padding: 16px;
}

.ledger-history-list span,
.ledger-history-list small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ledger-history-list b {
  color: #1f6e5c;
  font-size: 13px;
}

.ledger-notice {
  width: min(1180px, 100%);
  margin: 0 auto 32px;
}

.dashboard-ledger-callout {
  display: flex;
  width: min(1180px, 100%);
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto 24px;
  border-radius: 8px;
  background: #252d31;
  color: #fff;
  padding: 20px 24px;
}

.dashboard-ledger-callout strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.dashboard-ledger-callout p {
  margin: 4px 0 0;
  color: #c8d2cf;
  font-size: 13px;
}

.dashboard-ledger-callout .primary-button {
  flex: 0 0 auto;
}

.ledger-record-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border: 1px solid #b9d8ce;
  border-radius: 6px;
  background: #eef8f4;
  color: #17644f;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
}

@media (max-width: 960px) {
  .ledger-hero,
  .ledger-workbench {
    grid-template-columns: 1fr;
  }

  .ledger-hero-actions {
    justify-content: flex-start;
  }

  .ledger-form-grid,
  .ledger-history-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ledger-round-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .ledger-round-tabs {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .ledger-hero {
    gap: 20px;
    padding: 25px 20px;
  }

  .ledger-hero h1 {
    font-size: 29px;
  }

  .ledger-hero-actions,
  .ledger-hero-actions form,
  .ledger-hero-actions .secondary-button {
    width: 100%;
  }

  .ledger-kpis,
  .ledger-round-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ledger-kpis > div:nth-child(2),
  .ledger-round-summary > div:nth-child(2) {
    border-right: 0;
  }

  .ledger-kpis > div:nth-child(-n + 2),
  .ledger-round-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .ledger-entry,
  .budget-guard {
    padding: 20px 16px;
  }

  .ledger-form-grid,
  .ledger-history-list {
    grid-template-columns: 1fr;
  }

  .ledger-entry-footer,
  .dashboard-ledger-callout {
    align-items: stretch;
    flex-direction: column;
  }

  .ledger-entry-footer .primary-button,
  .dashboard-ledger-callout .primary-button {
    width: 100%;
  }

  .budget-form,
  .ledger-money form {
    grid-template-columns: 1fr;
  }

  .ledger-round-tabs {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .ledger-round-tabs a {
    flex: 0 0 auto;
  }
}

/* Portfolio optimization desk */
.portfolio-lab-workspace,
.portfolio-result-section,
.portfolio-context-grid,
.portfolio-lab-notice {
  width: min(1200px, calc(100% - 36px));
  margin-right: auto;
  margin-left: auto;
}

.portfolio-lab-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.65fr);
  gap: 18px;
  align-items: stretch;
  margin-top: 34px;
}

.portfolio-home-band {
  display: grid;
  width: min(1200px, calc(100% - 36px));
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 30px;
  align-items: center;
  margin: 42px auto;
  border-radius: 8px;
  padding: 28px 32px;
  background: var(--ink);
  color: #fff;
}

.portfolio-home-band > div > span {
  color: #70d5bd;
  font-size: 10px;
  font-weight: 850;
}

.portfolio-home-band h2 {
  margin: 6px 0;
  font-size: 25px;
}

.portfolio-home-band p {
  max-width: 680px;
  margin: 0;
  color: #aebdb8;
  font-size: 13px;
}

.portfolio-home-band dl {
  display: grid;
  grid-template-columns: repeat(3, auto);
  margin: 0;
}

.portfolio-home-band dl > div {
  min-width: 82px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  padding: 4px 16px;
}

.portfolio-home-band dt {
  color: #9eada8;
  font-size: 9px;
}

.portfolio-home-band dd {
  margin: 3px 0 0;
  font-size: 14px;
  font-weight: 800;
}

.portfolio-home-band .primary-button {
  white-space: nowrap;
}

.portfolio-lab-entry,
.portfolio-method-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
}

.portfolio-lab-entry {
  background: #fff;
  box-shadow: 0 16px 44px rgba(18, 24, 31, 0.07);
}

.portfolio-method-panel {
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: #fff;
}

.portfolio-lab-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.portfolio-lab-panel-head span,
.portfolio-report-head > div > span,
.portfolio-lab-report section > header span {
  color: var(--emerald);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.portfolio-lab-panel-head h2,
.portfolio-lab-report h2,
.portfolio-lab-report h3 {
  margin: 5px 0 0;
  letter-spacing: 0;
}

.portfolio-lab-panel-head h2 {
  font-size: 24px;
}

.portfolio-lab-panel-head > b {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
}

.portfolio-lab-panel-head.inverse span {
  color: #70d5bd;
}

.portfolio-lab-panel-head.inverse > b {
  border-color: rgba(255, 255, 255, 0.18);
  color: #dce5e1;
}

.portfolio-textarea-field > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 800;
}

.portfolio-textarea-field small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.portfolio-textarea-field textarea {
  width: 100%;
  min-height: 210px;
  resize: vertical;
  border: 1px solid #cfd6d1;
  border-radius: 7px;
  padding: 16px;
  background: #fbfcfa;
  color: var(--ink);
  font: 650 15px/1.72 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.portfolio-textarea-field textarea:focus {
  border-color: var(--emerald);
  outline: 3px solid rgba(23, 120, 102, 0.13);
}

.portfolio-input-ledger {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.portfolio-input-ledger span[data-tone="ready"] {
  color: var(--emerald);
}

.portfolio-input-ledger span[data-tone="warning"] {
  color: #9b6b00;
}

.portfolio-input-ledger span[data-tone="error"] {
  color: #b64444;
}

.portfolio-control-group {
  margin: 20px 0 0;
  border: 0;
  padding: 0;
}

.portfolio-control-group legend {
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 850;
}

.portfolio-segments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.portfolio-segments label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.portfolio-segments input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.portfolio-segments label > span {
  display: flex;
  min-height: 66px;
  flex-direction: column;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: #fbfcfa;
}

.portfolio-segments strong,
.portfolio-segments small {
  display: block;
}

.portfolio-segments strong {
  color: var(--ink);
  font-size: 13px;
}

.portfolio-segments small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.portfolio-segments input:checked + span {
  border-color: #78bbaa;
  background: #eaf5f1;
  box-shadow: inset 0 -3px 0 var(--emerald);
}

.portfolio-segments input:focus-visible + span {
  outline: 3px solid rgba(23, 120, 102, 0.18);
}

.portfolio-entry-actions {
  display: grid;
  grid-template-columns: auto auto minmax(190px, 1fr);
  gap: 8px;
  margin-top: 22px;
}

.portfolio-local-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.portfolio-method-score {
  margin: 12px 0 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding: 24px 0;
}

.portfolio-method-score span,
.portfolio-method-score small {
  display: block;
  color: #aebdb8;
  font-size: 12px;
}

.portfolio-method-score strong {
  display: block;
  margin: 5px 0;
  color: #70d5bd;
  font-size: 38px;
}

.portfolio-method-ledger {
  margin: 0;
}

.portfolio-method-ledger > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 13px 0;
}

.portfolio-method-ledger dt {
  color: #9eada8;
  font-size: 12px;
}

.portfolio-method-ledger dd {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  text-align: right;
}

.portfolio-method-panel > p {
  margin: auto 0 0;
  padding-top: 22px;
  color: #aebdb8;
  font-size: 12px;
  line-height: 1.7;
}

.portfolio-result-section {
  margin-top: 26px;
}

.portfolio-result-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  scroll-margin-top: 88px;
}

.portfolio-result-toolbar > div:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.portfolio-result-toolbar span {
  color: var(--emerald);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.portfolio-result-toolbar h2 {
  margin: 4px 0;
  font-size: 27px;
}

.portfolio-result-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.portfolio-lab-result {
  margin-top: 18px;
}

.portfolio-lab-empty,
.portfolio-lab-loading,
.portfolio-lab-error {
  border: 1px dashed #c7d0ca;
  border-radius: 8px;
  padding: 36px;
  background: #fff;
  text-align: center;
}

.portfolio-lab-empty strong,
.portfolio-lab-loading strong {
  font-size: 20px;
}

.portfolio-lab-empty p,
.portfolio-lab-loading p {
  color: var(--muted);
}

.portfolio-lab-empty > div {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.portfolio-lab-empty > div span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  color: var(--muted);
  font-size: 11px;
}

.portfolio-lab-error {
  border-style: solid;
  border-color: #e3b2b2;
  background: #fff5f5;
  color: #9f3030;
  font-weight: 750;
}

.portfolio-lab-report {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(18, 24, 31, 0.08);
}

.portfolio-report-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px;
  background: var(--ink);
  color: #fff;
}

.portfolio-report-head h2 {
  font-size: 30px;
}

.portfolio-report-head p {
  margin: 7px 0 0;
  color: #aebdb8;
  font-size: 11px;
}

.portfolio-report-seal {
  min-width: 150px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  padding: 14px 18px;
  text-align: center;
}

.portfolio-report-seal span,
.portfolio-report-seal small {
  display: block;
  color: #aebdb8;
  font-size: 9px;
}

.portfolio-report-seal strong {
  display: block;
  margin: 5px 0;
  color: #70d5bd;
  font-size: 22px;
}

.portfolio-score-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  background: #f8faf8;
}

.portfolio-score-comparison > div {
  padding: 20px 24px;
}

.portfolio-score-comparison > i {
  align-self: center;
  color: var(--muted);
  font-style: normal;
}

.portfolio-score-comparison span,
.portfolio-score-comparison small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.portfolio-score-comparison strong {
  display: block;
  margin: 3px 0;
  font-size: 30px;
}

.portfolio-score-comparison .after strong,
.portfolio-score-comparison .delta strong {
  color: var(--emerald);
}

.portfolio-score-comparison .delta {
  border-left: 1px solid var(--line);
}

.portfolio-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.portfolio-comparison-panel,
.portfolio-diversity-panel,
.portfolio-findings-panel,
.portfolio-change-panel,
.portfolio-combinations-panel {
  padding: 26px;
}

.portfolio-comparison-panel {
  border-right: 1px solid var(--line);
}

.portfolio-lab-report h3 {
  font-size: 20px;
}

.portfolio-metric-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 74px 18px 74px;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: 12px;
}

.portfolio-metric-row > span {
  color: var(--muted);
}

.portfolio-metric-row b,
.portfolio-metric-row strong {
  text-align: right;
}

.portfolio-metric-row i {
  color: #aeb8b2;
  font-style: normal;
  text-align: center;
}

.portfolio-metric-row.improved strong {
  color: var(--emerald);
}

.portfolio-metric-row.declined strong {
  color: #a35b24;
}

.portfolio-lab-number-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 5px;
  margin-top: 16px;
}

.portfolio-lab-number {
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f4f6f4;
  text-align: center;
}

.portfolio-lab-number b {
  font-size: 12px;
}

.portfolio-lab-number small {
  color: var(--muted);
  font-size: 8px;
}

.portfolio-lab-number.single {
  border-color: #b8d9cf;
  background: #eef8f4;
}

.portfolio-lab-number.repeat {
  border-color: #e4c276;
  background: #fff7df;
}

.portfolio-lab-number.high {
  border-color: #d89a9a;
  background: #fff0f0;
}

.portfolio-diversity-ledger {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
}

.portfolio-findings-panel,
.portfolio-change-panel,
.portfolio-combinations-panel {
  border-bottom: 1px solid var(--line);
}

.portfolio-lab-findings {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.portfolio-lab-finding {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
  background: #fafbf9;
}

.portfolio-lab-finding span,
.portfolio-lab-finding strong {
  display: block;
}

.portfolio-lab-finding span {
  color: var(--muted);
  font-size: 10px;
}

.portfolio-lab-finding strong {
  margin: 4px 0;
  font-size: 17px;
}

.portfolio-lab-finding p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.portfolio-lab-finding.good {
  border-color: #b8d9cf;
}

.portfolio-lab-finding.caution {
  border-color: #e3c3a7;
  background: #fffaf4;
}

.portfolio-change-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.portfolio-change-row {
  display: grid;
  grid-template-columns: 42px 1fr 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 11px;
}

.portfolio-change-row .removed {
  color: #a44a4a;
}

.portfolio-change-row .added {
  color: var(--emerald);
}

.portfolio-no-change {
  margin: 0;
  color: var(--muted);
}

.portfolio-combinations-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.portfolio-combinations-table {
  width: 100%;
  border-collapse: collapse;
}

.portfolio-combinations-table th,
.portfolio-combinations-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
}

.portfolio-combinations-table th {
  background: #f2f5f2;
  color: var(--muted);
  font-size: 10px;
}

.portfolio-combinations-table tbody tr:last-child td {
  border-bottom: 0;
}

.portfolio-combinations-table .number-balls {
  gap: 6px;
}

.portfolio-combinations-table .ball {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.portfolio-change-badge,
.portfolio-keep-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 800;
}

.portfolio-change-badge {
  background: #eaf5f1;
  color: var(--emerald);
}

.portfolio-keep-badge {
  background: #f0f2f0;
  color: var(--muted);
}

.portfolio-report-notice {
  padding: 22px 26px;
  background: #f7f8f6;
}

.portfolio-report-notice strong,
.portfolio-report-notice p {
  display: block;
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
}

.portfolio-report-notice p {
  margin-top: 4px;
  color: var(--muted);
}

.portfolio-context-grid {
  margin-top: 34px;
}

@media (max-width: 1080px) {
  .portfolio-home-band {
    grid-template-columns: 1fr auto;
  }

  .portfolio-home-band dl {
    grid-row: 2;
  }

  .portfolio-home-band .primary-button {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .portfolio-lab-workspace {
    grid-template-columns: 1fr;
  }

  .portfolio-method-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr);
    gap: 0 28px;
  }

  .portfolio-method-panel .portfolio-lab-panel-head,
  .portfolio-method-panel > p {
    grid-column: 1 / -1;
  }

  .portfolio-method-score {
    margin-bottom: 0;
  }
}

@media (max-width: 760px) {
  .portfolio-lab-head h1 em {
    display: block;
  }

  .portfolio-home-band {
    width: min(100% - 28px, 1200px);
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 18px;
  }

  .portfolio-home-band dl {
    grid-row: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .portfolio-home-band dl > div {
    min-width: 0;
    padding: 4px 10px;
  }

  .portfolio-home-band .primary-button {
    grid-column: auto;
    grid-row: auto;
  }

  .portfolio-lab-workspace,
  .portfolio-result-section,
  .portfolio-context-grid,
  .portfolio-lab-notice {
    width: min(100% - 28px, 1200px);
  }

  .portfolio-lab-entry,
  .portfolio-method-panel {
    padding: 18px 14px;
  }

  .portfolio-lab-panel-head {
    display: grid;
  }

  .portfolio-lab-panel-head > b {
    justify-self: start;
  }

  .portfolio-segments {
    grid-template-columns: 1fr;
  }

  .portfolio-segments label > span {
    min-height: 56px;
  }

  .portfolio-entry-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-entry-actions .primary-button {
    grid-column: 1 / -1;
  }

  .portfolio-method-panel {
    display: block;
  }

  .portfolio-result-toolbar {
    display: grid;
    align-items: stretch;
  }

  .portfolio-result-toolbar > div:last-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-result-toolbar > div:last-child .primary-button {
    grid-column: 1 / -1;
  }

  .portfolio-report-head {
    grid-template-columns: 1fr;
    padding: 22px 16px;
  }

  .portfolio-report-seal {
    min-width: 0;
  }

  .portfolio-score-comparison {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-score-comparison > i {
    display: none;
  }

  .portfolio-score-comparison .delta {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .portfolio-report-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-comparison-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .portfolio-comparison-panel,
  .portfolio-diversity-panel,
  .portfolio-findings-panel,
  .portfolio-change-panel,
  .portfolio-combinations-panel {
    padding: 20px 14px;
  }

  .portfolio-metric-row {
    grid-template-columns: minmax(92px, 1fr) 62px 16px 62px;
  }

  .portfolio-lab-number-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .portfolio-lab-findings,
  .portfolio-change-list {
    grid-template-columns: 1fr;
  }

  .portfolio-change-row {
    grid-template-columns: 36px 1fr;
  }

  .portfolio-change-row .added {
    grid-column: 2;
  }

  .portfolio-combinations-table,
  .portfolio-combinations-table tbody,
  .portfolio-combinations-table tr,
  .portfolio-combinations-table td {
    display: block;
    width: 100%;
  }

  .portfolio-combinations-table thead {
    display: none;
  }

  .portfolio-combinations-table tbody {
    display: grid;
    gap: 10px;
    padding: 10px;
  }

  .portfolio-combinations-table tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
  }

  .portfolio-combinations-table td {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: 10px;
  }

  .portfolio-combinations-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 9px;
    font-weight: 850;
  }

  .portfolio-combinations-table td:last-child {
    border-bottom: 0;
  }

  .portfolio-combinations-table .number-balls {
    flex-wrap: wrap;
  }
}

/* Batch winning checker */
.checker-workspace,
.checker-result-section {
  width: min(1180px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.checker-page-head h1 em {
  font-style: normal;
  white-space: nowrap;
}

.checker-page-head h1 {
  overflow-wrap: normal;
  word-break: keep-all;
}

.checker-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(310px, 0.72fr);
  gap: 16px;
  align-items: stretch;
}

.checker-entry,
.checker-evidence-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.checker-entry {
  padding: 26px;
}

.checker-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.checker-panel-head > div {
  min-width: 0;
}

.checker-panel-head span {
  color: var(--emerald-strong);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.checker-panel-head h2 {
  margin: 4px 0 0;
  font-size: 25px;
}

.checker-panel-head > strong {
  flex: 0 0 auto;
  border: 1px solid #cfe0d9;
  border-radius: 6px;
  background: #edf8f4;
  color: var(--emerald-strong);
  padding: 8px 10px;
  font-size: 12px;
}

.checker-round-control {
  display: grid;
  grid-template-columns: minmax(150px, 0.38fr) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
}

.checker-round-control > label,
.checker-textarea-field {
  display: grid;
  gap: 8px;
}

.checker-round-control label > span,
.checker-textarea-field > span {
  font-size: 13px;
  font-weight: 850;
}

.checker-textarea-field small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.checker-round-control input,
.checker-textarea-field textarea {
  width: 100%;
  border: 1px solid #cbd4cf;
  border-radius: 7px;
  background: #fbfcfb;
  color: var(--ink);
  font: inherit;
}

.checker-round-control input {
  height: 48px;
  padding: 0 14px;
  font-size: 17px;
  font-weight: 850;
}

.checker-textarea-field textarea {
  min-height: 246px;
  resize: vertical;
  padding: 15px 16px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 15px;
  line-height: 1.75;
}

.checker-round-control input:focus,
.checker-textarea-field textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(47, 111, 219, 0.17);
}

.checker-recent-rounds {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.checker-recent-rounds button {
  min-width: 0;
  height: 46px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #f7f9f7;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
}

.checker-recent-rounds button:last-child {
  border-right: 0;
}

.checker-recent-rounds button.active {
  background: #182226;
  color: #fff;
}

.checker-input-ledger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 46px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8faf8;
  padding: 10px 13px;
}

.checker-input-ledger span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
}

.checker-input-ledger span[data-tone="ready"] {
  color: var(--emerald-strong);
  font-weight: 800;
}

.checker-input-ledger span[data-tone="warning"] {
  color: #9a6814;
  font-weight: 800;
}

.checker-input-ledger span[data-tone="error"] {
  color: var(--coral);
  font-weight: 800;
}

.checker-input-ledger b {
  flex: 0 0 auto;
  font-size: 12px;
}

.checker-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.checker-entry-actions .primary-button {
  margin-left: auto;
}

.checker-evidence-panel {
  display: flex;
  flex-direction: column;
}

.checker-evidence-panel > .checker-panel-head {
  margin: 0;
  background: #182226;
  color: #fff;
  padding: 24px 22px;
}

.checker-evidence-panel .checker-panel-head span {
  color: #85dbc8;
}

.checker-evidence-panel .checker-panel-head > strong {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.checker-latest-draw {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.checker-latest-draw > span {
  color: var(--muted);
  font-size: 12px;
}

.checker-latest-draw .number-balls {
  gap: 6px;
}

.checker-latest-draw .ball {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.checker-latest-draw .bonus-label {
  width: 100%;
  margin: 2px 0 0;
}

.checker-source-ledger {
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.checker-source-ledger > div {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 22px;
}

.checker-source-ledger > div + div {
  border-top: 1px solid var(--line);
}

.checker-source-ledger dt,
.checker-source-ledger dd {
  margin: 0;
  font-size: 12px;
}

.checker-source-ledger dt {
  color: var(--muted);
}

.checker-source-ledger dd {
  overflow-wrap: anywhere;
  font-weight: 800;
}

.checker-official-link {
  margin: 18px 22px 0;
  color: var(--emerald-strong);
  font-size: 12px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.checker-evidence-note,
.checker-no-data {
  margin: auto 22px 22px;
  border-left: 3px solid var(--gold);
  background: #fff8e9;
  padding: 12px 13px;
  color: #6f5523;
  font-size: 11px;
  line-height: 1.65;
}

.checker-result-section {
  margin-top: 28px;
}

.checker-result-toolbar {
  display: flex;
  scroll-margin-top: 92px;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 16px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}

.checker-result-toolbar[hidden] {
  display: none;
}

.checker-result-toolbar > div:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.checker-result-toolbar span {
  color: var(--emerald-strong);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.checker-result-toolbar h2 {
  margin: 3px 0 0;
  font-size: 30px;
}

.checker-result-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.checker-result {
  min-height: 180px;
}

.checker-empty,
.checker-loading,
.checker-error {
  display: grid;
  min-height: 190px;
  place-content: center;
  justify-items: center;
  border: 1px dashed #c7d1cb;
  border-radius: 8px;
  background: #fafbfa;
  padding: 28px;
  text-align: center;
}

.checker-empty p,
.checker-loading p {
  max-width: 620px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.checker-empty > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 14px;
}

.checker-empty > div span {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  padding: 6px 8px;
  color: var(--muted);
  font-size: 11px;
}

.checker-error {
  min-height: 120px;
  border-color: #e4b9b7;
  background: #fff4f3;
  color: #9f302c;
  font-weight: 800;
}

.checker-report {
  overflow: hidden;
  border: 1px solid #cad5cf;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.checker-report-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 28px;
  align-items: center;
  background: #182226;
  color: #fff;
  padding: 26px 30px;
}

.checker-report-head > div:first-child > span {
  color: #85dbc8;
  font-size: 11px;
  font-weight: 900;
}

.checker-report-head h2 {
  margin: 5px 0 0;
  font-size: 32px;
}

.checker-report-head p {
  margin: 5px 0 0;
  color: #d2dcda;
  font-size: 13px;
}

.checker-first-prize-reference {
  margin-top: 12px;
  font-size: 12px;
}

.checker-first-prize-reference strong {
  margin-left: 4px;
  color: #f1c66c;
}

.checker-verification-seal {
  display: grid;
  min-height: 120px;
  place-content: center;
  justify-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.checker-verification-seal span,
.checker-verification-seal small {
  color: #d2dcda;
  font-size: 10px;
}

.checker-verification-seal strong {
  color: #75d5bd;
  font-size: 34px;
  line-height: 1.1;
}

.checker-draw-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #f8faf8;
  padding: 17px 22px;
}

.checker-draw-strip > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checker-draw-strip > div > span:first-child {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.checker-draw-strip .ball {
  width: 33px;
  height: 33px;
  font-size: 12px;
}

.checker-draw-strip a {
  color: var(--emerald-strong);
  font-size: 12px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.checker-summary-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.checker-summary-metrics > div {
  display: grid;
  min-height: 104px;
  align-content: center;
  gap: 3px;
  padding: 15px 18px;
}

.checker-summary-metrics > div + div {
  border-left: 1px solid var(--line);
}

.checker-summary-metrics span,
.checker-summary-metrics small {
  color: var(--muted);
  font-size: 10px;
}

.checker-summary-metrics strong {
  overflow-wrap: anywhere;
  font-size: 20px;
}

.checker-duplicate-notice {
  margin: 0;
  border-bottom: 1px solid #ead5aa;
  background: #fff8e9;
  padding: 12px 20px;
  color: #76561b;
  font-size: 12px;
}

.checker-rank-distribution {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.checker-rank-distribution > div {
  display: grid;
  min-height: 74px;
  place-content: center;
  grid-template-columns: auto auto;
  gap: 2px 5px;
  text-align: center;
}

.checker-rank-distribution > div + div {
  border-left: 1px solid var(--line);
}

.checker-rank-distribution span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
}

.checker-rank-distribution strong {
  font-size: 18px;
}

.checker-rank-distribution small {
  align-self: end;
  color: var(--muted);
  font-size: 9px;
}

.checker-result-table-wrap {
  margin: 0 22px 22px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.checker-result-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.checker-result-table th,
.checker-result-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
  text-align: left;
  vertical-align: middle;
}

.checker-result-table th {
  background: #f4f6f4;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.checker-result-table td {
  font-size: 12px;
}

.checker-result-table tbody tr:last-child td {
  border-bottom: 0;
}

.checker-result-table tr.rank-1,
.checker-result-table tr.rank-2,
.checker-result-table tr.rank-3 {
  background: #fff9ec;
}

.checker-result-table tr.rank-4,
.checker-result-table tr.rank-5 {
  background: #f0faf6;
}

.checker-row-index {
  display: grid;
  width: 29px;
  height: 29px;
  place-content: center;
  border-radius: 50%;
  background: #e9eeeb;
  font-size: 11px;
}

.checker-balls {
  flex-wrap: nowrap;
  gap: 5px;
}

.checker-balls .ball {
  width: 31px;
  height: 31px;
  font-size: 11px;
}

.checker-balls .ball.is-main-match {
  outline: 3px solid #171a1f;
  outline-offset: 2px;
  transform: translateY(-1px);
}

.checker-balls .ball.is-bonus-match {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.checker-rank-badge {
  display: inline-grid;
  min-width: 54px;
  min-height: 28px;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font-size: 11px;
  font-weight: 900;
}

.checker-report-notice {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  background: #f8faf8;
  padding: 16px 22px;
}

.checker-report-notice p,
.checker-report-notice strong {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
}

.checker-report-notice p {
  color: var(--muted);
}

@media (max-width: 980px) {
  .checker-workspace {
    grid-template-columns: 1fr;
  }

  .checker-evidence-panel {
    display: grid;
    grid-template-columns: minmax(230px, 0.7fr) minmax(0, 1fr);
  }

  .checker-evidence-panel > .checker-panel-head {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .checker-latest-draw {
    grid-column: 2;
    grid-row: 1;
  }

  .checker-source-ledger {
    grid-column: 2;
    grid-row: 2;
  }

  .checker-official-link,
  .checker-evidence-note {
    grid-column: 1 / -1;
  }

  .checker-evidence-note {
    margin-top: 14px;
  }

  .checker-summary-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .checker-summary-metrics > div:nth-child(4) {
    border-left: 0;
  }

  .checker-summary-metrics > div:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .checker-page-head h1 {
    font-size: 36px;
  }

  .checker-workspace,
  .checker-result-section {
    width: 100%;
  }

  .checker-entry {
    padding: 20px 16px;
  }

  .checker-panel-head h2 {
    font-size: 22px;
  }

  .checker-round-control {
    grid-template-columns: 1fr;
  }

  .checker-recent-rounds {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .checker-recent-rounds button:nth-child(3) {
    border-right: 0;
  }

  .checker-recent-rounds button:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .checker-entry-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checker-entry-actions .primary-button {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
  }

  .checker-evidence-panel {
    display: flex;
  }

  .checker-result-toolbar {
    display: grid;
    align-items: stretch;
    padding-right: 2px;
    padding-left: 2px;
  }

  .checker-result-toolbar > div:last-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checker-result-toolbar > div:last-child .primary-button {
    grid-column: 1 / -1;
  }

  .checker-report-head {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 18px;
  }

  .checker-report-head h2 {
    font-size: 28px;
  }

  .checker-verification-seal {
    min-height: 90px;
  }

  .checker-draw-strip {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 16px;
  }

  .checker-draw-strip > div {
    flex-wrap: wrap;
  }

  .checker-summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checker-summary-metrics > div:nth-child(3),
  .checker-summary-metrics > div:nth-child(5) {
    border-left: 0;
  }

  .checker-summary-metrics > div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .checker-summary-metrics > div:last-child {
    grid-column: 1 / -1;
  }

  .checker-rank-distribution {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 16px;
  }

  .checker-rank-distribution > div:nth-child(4) {
    border-left: 0;
  }

  .checker-rank-distribution > div:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .checker-result-table-wrap {
    overflow: visible;
    margin: 0 16px 16px;
    border: 0;
  }

  .checker-result-table,
  .checker-result-table tbody,
  .checker-result-table tr,
  .checker-result-table td {
    display: block;
    width: 100%;
  }

  .checker-result-table {
    min-width: 0;
  }

  .checker-result-table thead {
    display: none;
  }

  .checker-result-table tbody {
    display: grid;
    gap: 12px;
  }

  .checker-result-table tbody tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
  }

  .checker-result-table td {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    padding: 12px 13px;
  }

  .checker-result-table td:last-child {
    border-bottom: 0;
  }

  .checker-result-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 850;
  }

  .checker-balls {
    flex-wrap: wrap;
  }

  .checker-report-notice {
    padding: 15px 16px;
  }
}

/* Verified covering studio */
.studio-switcher,
.covering-shell {
  width: min(1180px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.covering-page-head h1 em {
  font-style: normal;
}

.studio-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.studio-switcher a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0 12px;
  align-items: center;
  min-height: 78px;
  padding: 14px 18px;
}

.studio-switcher a + a {
  border-left: 1px solid var(--line);
}

.studio-switcher a > span {
  grid-row: 1 / 3;
  color: var(--emerald-strong);
  font-size: 12px;
  font-weight: 900;
}

.studio-switcher a strong,
.studio-switcher a small {
  min-width: 0;
}

.studio-switcher a strong {
  font-size: 16px;
}

.studio-switcher a small {
  color: var(--muted);
  font-size: 12px;
}

.studio-switcher a.active {
  background: #182226;
  color: #fff;
}

.studio-switcher a.active > span,
.studio-switcher a.active small {
  color: #85dbc8;
}

.covering-shell,
.covering-form {
  display: grid;
  gap: 18px;
}

.covering-input-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.65fr);
  gap: 16px;
  align-items: stretch;
}

.covering-number-actions {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.covering-number-actions > div:first-child {
  display: grid;
  gap: 2px;
}

.covering-number-actions small {
  color: var(--muted);
  font-size: 12px;
}

.covering-number-actions > div:last-child {
  display: flex;
  gap: 7px;
}

.number-picker button[data-state="selected"] {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 10px rgba(47, 111, 219, 0.22);
}

.covering-selection-ledger {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbf9;
  padding: 13px 15px;
}

.covering-selection-ledger span,
.covering-selection-ledger b {
  color: var(--muted);
  font-size: 12px;
}

.covering-selection-ledger strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.covering-match-fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.covering-match-fieldset label {
  cursor: pointer;
}

.covering-match-fieldset input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.covering-match-fieldset label > span {
  display: grid;
  min-height: 78px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.covering-match-fieldset label > span b,
.covering-match-fieldset label > span small {
  display: block;
}

.covering-match-fieldset label > span small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.covering-match-fieldset input:checked + span {
  border-color: var(--emerald);
  background: #edf8f4;
  box-shadow: inset 0 0 0 1px var(--emerald);
}

.covering-match-fieldset input:focus-visible + span {
  outline: 3px solid rgba(47, 111, 219, 0.3);
  outline-offset: 2px;
}

.covering-condition-preview {
  margin: 8px 0 18px;
  border-radius: 8px;
  background: #182226;
  color: #fff;
  padding: 17px;
}

.covering-condition-preview > span {
  color: #85dbc8;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.covering-condition-preview strong {
  display: block;
  margin-top: 7px;
  font-size: 15px;
}

.covering-condition-preview p {
  margin: 5px 0 0;
  color: #d2dcda;
  font-size: 12px;
}

.covering-live-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.covering-live-metrics > div {
  display: grid;
  min-height: 76px;
  align-content: center;
  gap: 4px;
  padding: 12px 14px;
}

.covering-live-metrics > div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.covering-live-metrics > div:nth-child(-n + 2) {
  border-bottom: 1px solid var(--line);
}

.covering-live-metrics span {
  color: var(--muted);
  font-size: 11px;
}

.covering-live-metrics strong {
  font-size: 17px;
}

.covering-submit-bar > button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.covering-result-toolbar {
  display: flex;
  scroll-margin-top: 94px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.covering-result-toolbar[hidden] {
  display: none;
}

.covering-result-toolbar span {
  color: var(--emerald-strong);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.covering-result-toolbar h2 {
  margin: 4px 0 0;
  font-size: 32px;
}

.covering-result-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.covering-result {
  display: grid;
  gap: 18px;
}

.cover-result-summary {
  overflow: hidden;
  border: 1px solid #cad5cf;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.cover-result-summary > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 24px;
  align-items: center;
  background: #182226;
  color: #fff;
  padding: 24px 28px;
}

.cover-result-summary > header > div:first-child > span {
  color: #85dbc8;
  font-size: 11px;
  font-weight: 900;
}

.cover-result-summary h2 {
  margin: 5px 0 0;
  font-size: 30px;
}

.cover-result-summary header p {
  max-width: 760px;
  margin: 7px 0 0;
  color: #d2dcda;
  font-size: 13px;
}

.cover-verification-seal {
  display: grid;
  min-height: 126px;
  place-content: center;
  justify-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.cover-verification-seal span,
.cover-verification-seal small {
  color: #d2dcda;
  font-size: 11px;
}

.cover-verification-seal strong {
  color: #75d5bd;
  font-size: 38px;
  line-height: 1.05;
}

.cover-summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.cover-summary-metrics > div {
  display: grid;
  min-height: 112px;
  align-content: center;
  gap: 4px;
  padding: 16px 20px;
}

.cover-summary-metrics > div + div {
  border-left: 1px solid var(--line);
}

.cover-summary-metrics span,
.cover-summary-metrics small,
.cover-source-line span,
.cover-source-line small {
  color: var(--muted);
  font-size: 11px;
}

.cover-summary-metrics strong {
  font-size: 22px;
}

.cover-source-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 17px 20px;
}

.cover-source-line > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cover-source-line strong,
.cover-source-line small {
  overflow-wrap: anywhere;
}

.cover-source-line a {
  color: var(--emerald-strong);
  font-size: 12px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cover-usage-panel,
.cover-ticket-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px 28px;
}

.cover-usage-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.cover-usage-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
}

.cover-usage-item .ball {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.cover-usage-item > div {
  height: 5px;
  overflow: hidden;
  border-radius: 5px;
  background: #e8ece9;
}

.cover-usage-item i {
  display: block;
  width: var(--usage);
  height: 100%;
  background: var(--blue);
}

.cover-usage-item strong {
  font-size: 11px;
  white-space: nowrap;
}

.cover-ticket-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.cover-ticket-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fcfdfb;
  padding: 15px;
}

.cover-ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.cover-ticket-head span {
  color: var(--emerald-strong);
  font-size: 11px;
  font-weight: 900;
}

.cover-ticket-head strong {
  color: var(--muted);
  font-size: 11px;
}

.cover-ticket-card .number-balls {
  gap: 6px;
}

.cover-ticket-card .ball {
  width: 39px;
  height: 39px;
  font-size: 13px;
}

.cover-ticket-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  margin-top: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.cover-ticket-metrics span {
  display: grid;
  min-width: 0;
  justify-items: center;
  padding: 7px 3px;
  color: var(--muted);
  font-size: 9px;
}

.cover-ticket-metrics span + span {
  border-left: 1px solid var(--line);
}

.cover-ticket-metrics b {
  color: var(--ink);
  font-size: 12px;
}

.cover-ticket-card .save-number-link {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}

.cover-result-notices {
  display: grid;
  gap: 6px;
  border-left: 3px solid var(--gold);
  background: #fff8e8;
  padding: 14px 16px;
}

.cover-result-notices p {
  margin: 0;
  color: #665123;
  font-size: 12px;
}

.covering-explain-grid {
  margin-top: 28px;
}

.guide-callout {
  margin: 24px 0;
  border-left: 4px solid var(--emerald);
  background: #eef8f4;
  padding: 18px 20px;
}

.guide-callout p {
  margin: 6px 0 0;
}

.article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

@media (max-width: 1080px) {
  .covering-input-grid {
    grid-template-columns: 1fr;
  }

  .covering-rule-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
  }

  .covering-rule-panel .generator-panel-head,
  .covering-rule-panel .studio-message {
    grid-column: 1 / -1;
  }

  .cover-ticket-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cover-usage-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .covering-page-head h1 em {
    display: block;
  }

  .studio-switcher {
    grid-template-columns: 1fr;
  }

  .studio-switcher a + a {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .covering-number-actions,
  .covering-result-toolbar {
    display: grid;
    align-items: stretch;
  }

  .covering-number-actions > div:last-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .covering-selection-ledger {
    grid-template-columns: 1fr auto;
  }

  .covering-selection-ledger span {
    grid-column: 1 / -1;
  }

  .covering-rule-panel {
    display: block;
  }

  .covering-submit-bar > button,
  .covering-result-toolbar .secondary-button {
    width: 100%;
  }

  .cover-result-summary > header {
    grid-template-columns: 1fr;
    padding: 22px 18px;
  }

  .cover-result-summary h2 {
    font-size: 26px;
  }

  .cover-verification-seal {
    min-height: 105px;
  }

  .cover-summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cover-summary-metrics > div + div {
    border-left: 0;
  }

  .cover-summary-metrics > div:nth-child(odd) {
    border-right: 1px solid var(--line);
  }

  .cover-summary-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .cover-source-line {
    grid-template-columns: 1fr;
  }

  .cover-usage-panel,
  .cover-ticket-section {
    padding: 20px 14px;
  }

  .cover-usage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cover-ticket-grid {
    grid-template-columns: 1fr;
  }

  .cover-ticket-card .number-balls {
    justify-content: center;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 17, 21, 0.96);
  color: #f7f6f1;
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  min-width: 190px;
}

.brand-mark {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  color: #f7f6f1;
}

.brand small {
  color: #9fa9a6;
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a,
.nav-more summary,
.nav-form button,
.join-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  color: #c4cdca;
  font-size: 15px;
  font-weight: 650;
}

.site-nav a.active,
.site-nav a:hover,
.nav-more summary.active,
.nav-more summary:hover,
.nav-form button:hover,
.join-link:hover {
  background: #18231f;
  color: #ffffff;
}

.join-link {
  border: 1px solid #e4bd68;
  background: #e4bd68;
  color: #17130b !important;
}

.nav-more {
  position: relative;
}

.nav-more summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.nav-more summary::-webkit-details-marker {
  display: none;
}

.nav-more summary::after {
  margin-left: 6px;
  content: "▾";
  font-size: 10px;
}

.nav-more[open] summary {
  background: #18231f;
  color: #ffffff;
}

.nav-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 174px;
  gap: 2px;
  border: 1px solid #2a3539;
  border-radius: 8px;
  padding: 7px;
  background: #111a1f;
  box-shadow: var(--shadow);
}

.nav-more-menu a {
  width: 100%;
  white-space: nowrap;
}

.nav-form {
  margin: 0;
}

.nav-form button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.nav-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid #394348;
  border-radius: 8px;
  background: #111a1f;
  color: #ffffff;
  padding: 9px 12px;
  font-weight: 700;
  cursor: pointer;
}

main {
  padding: 0 clamp(18px, 4vw, 56px) 56px;
}

.flash-message {
  width: min(1180px, 100%);
  margin: 18px auto 0;
  border: 1px solid #cce4dc;
  border-radius: 8px;
  background: #eef9f5;
  color: var(--emerald-strong);
  padding: 12px 16px;
  font-weight: 750;
}

.tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: clamp(22px, 4vw, 42px);
  align-items: stretch;
  min-height: calc(100vh - 86px);
  padding: clamp(42px, 7vw, 82px) 0 32px;
}

.jackpot-hero {
  position: relative;
  width: min(1328px, 100%);
  margin: 0 auto;
  overflow: visible;
  background: var(--hero);
  color: #f8f7f2;
  box-shadow: 0 0 0 100vmax var(--hero);
  clip-path: inset(0 -100vmax);
}

.jackpot-hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  min-height: 410px;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  padding: clamp(58px, 7vw, 86px) 0 42px;
}

.jackpot-copy {
  min-width: 0;
}

.jackpot-eyebrow {
  margin-bottom: 22px;
  color: #4dc3a4;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.jackpot-copy h1 {
  max-width: 690px;
  margin-bottom: 22px;
  color: #ffffff;
  font-size: 68px;
  line-height: 1.04;
}

.jackpot-copy h1 span {
  display: block;
}

.jackpot-copy > p:not(.jackpot-eyebrow) {
  max-width: 660px;
  margin-bottom: 22px;
  color: #c5cecb;
  font-size: 18px;
  line-height: 1.8;
}

.jackpot-prize {
  min-width: 0;
  border-left: 1px solid #65706f;
  padding: 8px 0 8px clamp(32px, 4vw, 58px);
}

.jackpot-prize-label {
  margin-bottom: 16px;
  color: #f4f3ed;
  font-size: 26px;
  font-weight: 850;
}

.jackpot-prize-label a:hover,
.jackpot-prize-label a:focus-visible {
  color: var(--gold-soft);
}

.jackpot-prize > strong {
  display: block;
  margin-bottom: 14px;
  color: var(--gold-soft);
  font-size: 60px;
  font-variant-numeric: tabular-nums;
  line-height: 1.08;
  white-space: nowrap;
}

.jackpot-prize-meta {
  margin-bottom: 22px;
  color: #d5d9d7;
  font-size: 18px;
  font-weight: 700;
}

.jackpot-prize-status {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0;
}

.jackpot-prize-status div {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border: 1px solid #34413f;
  border-radius: 6px;
  padding: 8px 12px;
  background: #0f181c;
}

.jackpot-prize-status dt {
  color: #7e918b;
  font-size: 11px;
  font-weight: 850;
}

.jackpot-prize-status dd {
  margin: 0;
  color: #dce2df;
  font-size: 13px;
  font-weight: 750;
}

.jackpot-signal {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(420px, 1.28fr) minmax(230px, 0.72fr);
  gap: clamp(20px, 3vw, 42px);
  align-items: center;
  border: 1px solid #215447;
  border-radius: 8px;
  background: var(--hero-surface);
  padding: 32px 30px;
}

.jackpot-signal-title span {
  color: #50c4a5;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.jackpot-signal-title h2 {
  margin: 5px 0 4px;
  color: #ffffff;
  font-size: 25px;
}

.jackpot-signal-title small {
  color: #aebdb8;
  font-size: 12px;
  font-weight: 700;
}

.jackpot-signal-numbers {
  min-width: 0;
}

.jackpot-signal-numbers .number-balls {
  flex-wrap: nowrap;
  gap: clamp(7px, 1vw, 12px);
}

.jackpot-signal-numbers .ball {
  width: 70px;
  height: 70px;
  flex: 0 0 auto;
  font-size: 24px;
  box-shadow: inset 0 -8px 13px rgba(0, 0, 0, 0.2), 0 8px 18px rgba(0, 0, 0, 0.2);
}

.jackpot-signal-numbers > p {
  margin: 0;
  color: #b9c7c2;
}

.jackpot-cta {
  display: inline-flex;
  min-height: 70px;
  align-items: center;
  justify-content: center;
  border: 1px solid #edc774;
  border-radius: 6px;
  background: #e4bd68;
  color: #17130b;
  padding: 0 24px;
  font-size: 17px;
  font-weight: 900;
}

.jackpot-cta:hover,
.jackpot-cta:focus-visible {
  background: #f0cb7b;
  transform: translateY(-1px);
}

.jackpot-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
  border-top: 1px solid #243034;
}

.jackpot-trust-grid > div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border-right: 1px solid #243034;
  padding: 24px 28px;
}

.jackpot-trust-grid > div:last-child {
  border-right: 0;
}

.jackpot-trust-grid span {
  color: #55bd9f;
  font-size: 12px;
  font-weight: 900;
}

.jackpot-trust-grid p {
  margin: 0;
  color: #aeb8b5;
  font-size: 13px;
}

.jackpot-trust-grid strong {
  display: block;
  margin-bottom: 5px;
  color: #f6f5f0;
  font-size: 16px;
}

.home-metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(1328px, 100%);
  margin: 0 auto 26px;
  background: #f6f3eb;
  box-shadow: 0 0 0 100vmax #f6f3eb;
  clip-path: inset(0 -100vmax);
}

.home-metric-strip > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  border-right: 1px solid #cfd3cc;
  padding: 28px clamp(18px, 3vw, 40px);
}

.home-metric-strip > div:last-child {
  border-right: 0;
}

.home-metric-strip span,
.home-metric-strip small {
  color: #68716f;
  font-size: 12px;
  font-weight: 750;
}

.home-metric-strip strong {
  overflow-wrap: anywhere;
  color: #11161a;
  font-size: 24px;
}

.home-metric-strip .home-metric-notice strong {
  color: var(--emerald-strong);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 880px;
}

.eyebrow,
.page-head span,
.section-title span,
.article-page span {
  color: var(--emerald-strong);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 820px;
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.03;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  color: #434b55;
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions,
.generator-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  background: var(--emerald);
  color: #fff;
}

.secondary-button {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.hero-panel {
  display: grid;
  align-content: center;
  gap: 12px;
}

.stat-tile,
.analysis-panel,
.recommendation-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stat-tile {
  padding: 18px;
}

.stat-tile span,
.stat-tile small {
  display: block;
  color: var(--muted);
}

.stat-tile strong {
  display: block;
  margin: 8px 0 2px;
  font-size: 28px;
}

.section-band,
.content-grid,
.notice-band,
.page-head,
.generator-shell,
.analyzer-shell,
.validation-section,
.validation-meta,
.validation-summary,
.validation-empty,
.article-page,
.history-table-wrap {
  width: min(1180px, 100%);
  margin: 0 auto 28px;
}

.section-band {
  padding: 28px 0;
}

.page-head-action {
  margin: 18px 0 0;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-title h2 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 44px);
}

.section-title p {
  max-width: 420px;
  color: var(--muted);
}

.section-title.compact {
  display: block;
}

.section-title.compact h2 {
  font-size: 24px;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 14px;
}

.recommendation-grid.wide {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.recommendation-card {
  display: flex;
  min-height: 324px;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rank-chip {
  border-radius: 999px;
  background: #edf5ef;
  color: var(--emerald-strong);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 850;
}

.number-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.ball {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.12);
}

.ball-one {
  background: var(--gold);
}

.ball-two {
  background: var(--blue);
}

.ball-three {
  background: var(--coral);
}

.ball-four {
  background: #676f78;
}

.ball-five {
  background: var(--emerald);
}

.ball.bonus {
  background: var(--violet);
}

.bonus-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.explain {
  flex: 1;
  color: #4a535d;
  font-size: 14px;
}

.score-grid {
  display: grid;
  gap: 8px;
}

.score-pill {
  display: grid;
  grid-template-columns: 42px 1fr 44px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.score-pill i {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald) var(--score), #e5e9e5 var(--score));
}

.score-pill em {
  color: var(--muted);
  font-style: normal;
  text-align: right;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.content-grid.triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analysis-panel,
.empty-state {
  padding: 20px;
}

.draw-round {
  display: block;
  margin-bottom: 14px;
}

.draw-list {
  display: grid;
  gap: 12px;
}

.draw-list a {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
}

.notice-band {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  border-left: 6px solid var(--gold);
  border-radius: 8px;
  background: #fff8e8;
  padding: 18px 20px;
}

.ad-slot {
  display: grid;
  width: min(1180px, 100%);
  min-height: 92px;
  place-items: center;
  margin: 0 auto 28px;
  border: 1px dashed #cbd5cf;
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--muted);
  padding: 16px;
  text-align: center;
}

.ad-slot span {
  color: var(--emerald-strong);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ad-slot strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
}

.ad-slot p {
  margin: 4px 0 0;
  font-size: 13px;
}

.live-ad {
  display: block;
}

.page-head {
  padding: 48px 0 18px;
}

.page-head h1 {
  margin: 4px 0 12px;
  font-size: clamp(36px, 5vw, 58px);
}

.generator-shell {
  display: grid;
  gap: 18px;
}

.generator-controls {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
}

.generator-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

select,
input,
textarea {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

textarea {
  min-height: 118px;
  padding: 12px;
  resize: vertical;
}

.generator-result {
  min-height: 220px;
}

.generator-studio {
  gap: 24px;
}

.generator-studio-form {
  display: grid;
  gap: 0;
}

.generator-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.65fr);
  gap: 16px;
  align-items: stretch;
}

.generator-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: clamp(18px, 3vw, 28px);
}

.generator-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.generator-panel-head span,
.generator-result-toolbar > div > span {
  color: var(--emerald-strong);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.generator-panel-head h2,
.generator-result-toolbar h2 {
  margin: 4px 0 0;
  font-size: 25px;
}

.generator-panel-head p {
  max-width: 250px;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.control-fieldset {
  min-width: 0;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

.control-fieldset legend,
.studio-control > span,
.number-tool-row strong {
  margin-bottom: 9px;
  color: #333b44;
  font-size: 13px;
  font-weight: 850;
}

.strategy-segments {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.strategy-segments label,
.compact-segments label,
.count-segments label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.strategy-segments label + label,
.compact-segments label + label,
.count-segments label + label {
  border-left: 1px solid var(--line);
}

.strategy-segments input,
.compact-segments input,
.count-segments input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.strategy-segments label > span {
  display: grid;
  min-height: 66px;
  place-content: center;
  gap: 2px;
  background: #fff;
  padding: 8px 6px;
  text-align: center;
}

.strategy-segments b {
  font-size: 13px;
}

.strategy-segments small {
  color: var(--muted);
  font-size: 10px;
}

.strategy-segments input:checked + span,
.compact-segments input:checked + span,
.count-segments input:checked + span {
  background: #e5f2ed;
  color: var(--emerald-strong);
  box-shadow: inset 0 -3px 0 var(--emerald);
}

.strategy-segments input:focus-visible + span,
.compact-segments input:focus-visible + span,
.count-segments input:focus-visible + span,
.number-picker button:focus-visible,
.number-tool button:focus-visible {
  outline: 3px solid rgba(47, 111, 219, 0.32);
  outline-offset: -3px;
}

.number-tool-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.number-tool-row strong,
.number-tool-row small {
  display: block;
}

.number-tool-row small {
  color: var(--muted);
  font-size: 12px;
}

.number-tool,
.compact-segments,
.count-segments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.number-tool button {
  min-height: 38px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 0 13px;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.number-tool button:last-child {
  border-right: 0;
}

.number-tool button.active[data-selection-tool="fixed"] {
  background: var(--emerald);
  color: #fff;
}

.number-tool button.active[data-selection-tool="excluded"] {
  background: var(--coral);
  color: #fff;
}

.number-tool button.active[data-selection-tool="clear"] {
  background: #e9edf0;
  color: var(--ink);
}

.number-picker {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: clamp(5px, 1vw, 9px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f7f9f6;
  padding: clamp(14px, 2vw, 20px);
}

.number-picker button {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #d8dfda;
  border-radius: 50%;
  background: #fff;
  color: #3d4650;
  padding: 0;
  font: inherit;
  font-size: clamp(11px, 1.2vw, 14px);
  font-weight: 850;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease;
}

.number-picker button:hover {
  transform: translateY(-2px);
  border-color: #96aaa1;
}

.number-picker button[data-state="fixed"] {
  border-color: var(--emerald-strong);
  background: var(--emerald);
  color: #fff;
  box-shadow: 0 4px 10px rgba(23, 120, 102, 0.24);
}

.number-picker button[data-state="excluded"] {
  border-color: #e7a7a4;
  background: #fff0ef;
  color: #a3312e;
  text-decoration: line-through;
}

.selection-ledger {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.selection-ledger > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
}

.selection-ledger strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.selection-key {
  display: inline-flex;
  min-width: 38px;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 900;
}

.selection-key.fixed {
  background: #e2f2ec;
  color: var(--emerald-strong);
}

.selection-key.excluded {
  background: #fff0ef;
  color: #a3312e;
}

.constraint-designer {
  background: #fbfcfa;
}

.constraint-designer .generator-panel-head {
  display: block;
}

.constraint-designer .generator-panel-head p {
  max-width: none;
  margin-top: 7px;
  text-align: left;
}

.studio-control {
  display: grid;
  gap: 0;
  margin-bottom: 22px;
}

.studio-control select {
  width: 100%;
}

.compact-segments {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-segments label:nth-child(3) {
  border-left: 0;
  border-top: 1px solid var(--line);
}

.compact-segments label:nth-child(4) {
  border-top: 1px solid var(--line);
}

.compact-segments label > span,
.count-segments label > span {
  display: grid;
  min-height: 42px;
  place-items: center;
  background: #fff;
  padding: 6px;
  font-size: 12px;
  font-weight: 850;
}

.sum-custom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: end;
  margin-top: 10px;
}

.sum-custom[hidden],
.generator-result-toolbar[hidden] {
  display: none;
}

.sum-custom label {
  display: grid;
  gap: 4px;
}

.sum-custom label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.sum-custom > span {
  min-height: 42px;
  line-height: 42px;
}

.count-segments label > span {
  min-height: 46px;
  font-size: 16px;
}

.design-health {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.design-health > div {
  display: grid;
  gap: 2px;
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.design-health > div:nth-child(even) {
  border-right: 0;
}

.design-health > div:nth-child(n + 3) {
  border-bottom: 0;
}

.design-health span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.design-health strong {
  font-size: 18px;
}

.studio-message {
  min-height: 42px;
  margin: 12px 0 0;
  border-left: 3px solid #a8b5ae;
  background: #f1f4f2;
  color: #505a64;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 750;
}

.studio-message[data-tone="good"] {
  border-color: var(--emerald);
  background: #eaf5f1;
  color: var(--emerald-strong);
}

.studio-message[data-tone="caution"] {
  border-color: var(--coral);
  background: #fff0ef;
  color: #a3312e;
}

.generator-submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin: 12px auto 0;
  border: 1px solid #cfd8d2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(18, 24, 31, 0.13);
  padding: 14px 16px;
}

.generator-submit-bar > div:first-child {
  display: grid;
  gap: 2px;
}

.generator-submit-bar > div:first-child span {
  color: var(--muted);
  font-size: 12px;
}

.generator-submit-bar > div:last-child {
  display: flex;
  gap: 8px;
}

.generator-submit-bar button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.generator-result-toolbar {
  display: flex;
  scroll-margin-top: 94px;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.generator-result-toolbar h2 {
  font-size: 32px;
}

.generator-result-toolbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.generator-empty,
.generator-loading {
  display: grid;
  min-height: 220px;
  place-content: center;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 28px;
  text-align: center;
}

.generator-empty strong,
.generator-loading strong {
  font-size: 20px;
}

.generator-empty p,
.generator-loading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.generator-empty > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 18px;
}

.generator-empty > div span {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9f6;
  padding: 5px 8px;
  color: #465149;
  font-size: 11px;
  font-weight: 800;
}

.generator-empty.caution {
  border-color: #edc3c1;
  background: #fff8f7;
}

.generator-loading > span {
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  border: 4px solid #dce6e1;
  border-top-color: var(--emerald);
  border-radius: 50%;
  animation: generator-spin 750ms linear infinite;
}

@keyframes generator-spin {
  to { transform: rotate(360deg); }
}

.studio-result-card {
  min-height: 440px;
}

.combo-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9f6;
}

.combo-metrics span {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 7px 4px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.combo-metrics span:last-child {
  border-right: 0;
}

.combo-metrics b {
  color: var(--ink);
  font-size: 12px;
}

.generator-notice {
  margin-top: 36px;
}

.replay-trust-strip,
.replay-shell,
.replay-method-grid {
  width: min(1180px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.replay-trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f0f4f1;
}

.replay-trust-strip > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1px 10px;
  align-items: center;
  padding: 15px 18px;
  border-right: 1px solid var(--line);
}

.replay-trust-strip > div:last-child {
  border-right: 0;
}

.replay-trust-strip span {
  grid-row: 1 / 3;
  color: var(--emerald-strong);
  font-size: 12px;
  font-weight: 900;
}

.replay-trust-strip strong {
  font-size: 14px;
}

.replay-trust-strip small {
  color: var(--muted);
  font-size: 11px;
}

.replay-shell {
  display: grid;
  gap: 22px;
  margin-bottom: 28px;
}

.replay-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(190px, 0.85fr) minmax(150px, 0.55fr) auto;
  gap: 12px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 18px;
}

.replay-controls > label,
.replay-controls fieldset {
  display: grid;
  min-width: 0;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
}

.replay-controls > label > span,
.replay-controls legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.replay-controls select,
.replay-controls .primary-button {
  width: 100%;
  min-height: 46px;
}

.replay-controls .primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.replay-count-segments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.replay-count-segments label {
  position: relative;
  cursor: pointer;
}

.replay-count-segments label + label {
  border-left: 1px solid var(--line);
}

.replay-count-segments input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.replay-count-segments span {
  display: grid;
  min-height: 44px;
  place-items: center;
  background: #fff;
  font-size: 13px;
  font-weight: 850;
}

.replay-count-segments input:checked + span {
  background: #e5f2ed;
  color: var(--emerald-strong);
  box-shadow: inset 0 -3px 0 var(--emerald);
}

.replay-count-segments input:focus-visible + span {
  outline: 3px solid rgba(47, 111, 219, 0.32);
  outline-offset: -3px;
}

.replay-result {
  min-height: 260px;
  scroll-margin-top: 88px;
}

.replay-empty {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 20px;
  min-height: 260px;
  align-content: center;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 52px);
}

.replay-empty.caution {
  border-color: #edc3c1;
  background: #fff8f7;
}

.replay-empty-index {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border: 1px solid #b9cbc3;
  border-radius: 8px;
  background: #e5f2ed;
  color: var(--emerald-strong);
  font-size: 24px;
  font-weight: 900;
}

.replay-empty strong {
  font-size: 22px;
}

.replay-empty p {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
}

.replay-loading {
  min-height: 260px;
}

.replay-report {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.replay-report-head {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 30px;
  align-items: center;
  background: #1c2428;
  color: #fff;
  padding: clamp(24px, 4vw, 42px);
}

.replay-report-head > div > span,
.replay-result-heading span {
  color: #79d0b7;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.replay-report-head h2 {
  margin: 5px 0 8px;
  font-size: clamp(29px, 4vw, 42px);
}

.replay-report-head p {
  margin-bottom: 18px;
  color: #c4cdca;
}

.replay-actual-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.replay-bonus-label {
  margin-left: 5px;
  color: #aeb9b5;
  font-size: 11px;
  font-weight: 850;
}

.replay-integrity-card {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 20px;
}

.replay-integrity-card span {
  color: #79d0b7;
  font-size: 11px;
  font-weight: 900;
}

.replay-integrity-card strong {
  font-size: 24px;
}

.replay-integrity-card p,
.replay-integrity-card small {
  margin: 0;
  color: #c4cdca;
}

.replay-integrity-card small {
  margin-top: 8px;
  font-size: 10px;
}

.replay-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #f5f8f6;
}

.replay-summary > div {
  display: grid;
  gap: 3px;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.replay-summary > div:last-child {
  border-right: 0;
}

.replay-summary span,
.replay-summary small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.replay-summary strong {
  overflow-wrap: anywhere;
  font-size: 24px;
}

.replay-result-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 28px 18px;
}

.replay-result-heading h3 {
  margin: 4px 0 0;
  font-size: 27px;
}

.replay-result-heading p {
  max-width: 340px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.replay-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0 28px 28px;
}

.replay-card {
  display: grid;
  min-width: 0;
  gap: 15px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.replay-number-balls {
  min-height: 44px;
}

.replay-ball-match {
  outline: 4px solid #bce9da;
  outline-offset: 2px;
  box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.12), 0 0 0 1px var(--emerald-strong);
}

.replay-match-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
}

.replay-match-badge.hit {
  background: #dff3eb;
  color: #0d684f;
}

.replay-match-badge.partial {
  background: #fff1d8;
  color: #81500a;
}

.replay-match-badge.none {
  background: #edf0f2;
  color: #59636d;
}

.replay-comparison-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-left: 3px solid var(--emerald);
  background: #f2f7f4;
  padding: 10px 12px;
}

.replay-comparison-line strong {
  white-space: nowrap;
}

.replay-comparison-line span {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.replay-score-grid {
  grid-template-columns: 1fr;
}

.replay-card-explain {
  margin: 0;
  color: #505963;
  font-size: 12px;
}

.replay-report-notice {
  margin: 0;
  border-top: 1px solid var(--line);
  background: #fff8e8;
  color: #68552d;
  padding: 16px 28px;
  font-size: 12px;
}

.replay-method-grid {
  margin-top: 36px;
}

.replay-notice {
  margin-top: 28px;
}

.analyzer-shell {
  display: grid;
  gap: 28px;
}

.analyzer-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(520px, 1.45fr) auto;
  gap: 18px;
  align-items: end;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f6f8f5;
  padding: 22px;
}

.analyzer-form .section-title {
  margin: 0;
}

.analyzer-input-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(64px, 1fr));
  gap: 9px;
}

.analyzer-number-field {
  display: grid;
  gap: 6px;
}

.analyzer-number-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.analyzer-number-field input {
  width: 100%;
  min-width: 0;
  height: 58px;
  padding: 0 6px;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.analyzer-actions {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 8px;
}

.analyzer-actions button {
  white-space: nowrap;
}

.analyzer-form .form-note {
  grid-column: 2;
  margin: -8px 0 0;
  font-size: 12px;
}

.analyzer-result {
  min-height: 150px;
}

.analyzer-empty,
.analyzer-error {
  display: grid;
  min-height: 150px;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
  text-align: center;
}

.analyzer-empty p {
  margin: 7px 0 0;
  color: var(--muted);
}

.analyzer-error {
  border-color: #efc9c6;
  background: #fff5f4;
  color: #a3312e;
  font-weight: 800;
}

.analyzer-report {
  display: grid;
  gap: 0;
}

.analyzer-report-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 28px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f6f8f5;
  padding: 24px;
}

.analyzer-report-head > div:first-child > span {
  color: var(--emerald-strong);
  font-size: 12px;
  font-weight: 850;
}

.analyzer-report-head h2 {
  margin: 6px 0 9px;
  font-size: 34px;
}

.analyzer-report-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.analyzer-overall {
  display: grid;
  min-height: 116px;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.analyzer-overall span,
.analyzer-overall small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.analyzer-overall strong {
  margin: 4px 0 0;
  color: var(--emerald-strong);
  font-size: 32px;
}

.analyzer-overall.neutral strong {
  color: #3f5e7b;
}

.analyzer-overall.caution strong {
  color: #a65d11;
}

.analyzer-picked {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 20px 24px;
}

.analyzer-report-section {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}

.analyzer-report-section .section-title {
  margin-bottom: 14px;
}

.analyzer-report-section h3 {
  margin: 4px 0 0;
  font-size: 23px;
}

.analyzer-score-grid {
  max-width: 760px;
}

.score-notice,
.history-summary {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.analyzer-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.analyzer-metric {
  display: grid;
  min-width: 0;
  gap: 3px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.analyzer-metric span,
.analyzer-metric small {
  color: var(--muted);
  font-size: 12px;
}

.analyzer-metric strong {
  font-size: 21px;
}

.diagnostic-list {
  border-top: 1px solid var(--line);
}

.diagnostic-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 100px;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.diagnostic-state {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
}

.diagnostic-row.good .diagnostic-state {
  background: #e5f3eb;
  color: #17613e;
}

.diagnostic-row.neutral .diagnostic-state {
  background: #e9eef4;
  color: #43556c;
}

.diagnostic-row.caution .diagnostic-state {
  background: #fff1d8;
  color: #81500a;
}

.diagnostic-row strong,
.diagnostic-row small {
  display: block;
}

.diagnostic-row small {
  margin-top: 3px;
  color: var(--muted);
}

.diagnostic-row b {
  text-align: right;
}

.number-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.number-detail-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.number-detail-item dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.number-detail-item dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.number-detail-item dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 800;
}

.history-comparison-list {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.history-comparison-row {
  display: grid;
  grid-template-columns: 130px 100px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.history-comparison-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.history-comparison-row code {
  color: var(--muted);
}

.analyzer-explanation {
  margin: 24px 0 0;
  border-left: 4px solid var(--emerald);
  background: #f4f7f5;
  color: #424b55;
  padding: 16px 18px;
  line-height: 1.65;
}

.analyzer-context {
  margin-top: 32px;
}

.validation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f6f8f5;
  color: var(--muted);
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 750;
}

.validation-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.validation-summary > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.validation-summary span,
.validation-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.validation-summary strong {
  overflow-wrap: anywhere;
  font-size: 23px;
}

.validation-section {
  padding: 18px 0 26px;
}

.validation-section .section-title {
  margin-bottom: 14px;
}

.validation-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.validation-legend span::before {
  display: inline-block;
  width: 18px;
  height: 8px;
  margin-right: 6px;
  content: '';
  vertical-align: 1px;
}

.validation-legend .observed::before {
  background: var(--emerald);
}

.validation-legend .expected::before {
  width: 3px;
  background: #c04b48;
}

.validation-chart {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.validation-chart-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 116px;
  gap: 14px;
  align-items: center;
}

.validation-track {
  position: relative;
  height: 18px;
  background: #e9ede8;
}

.validation-track i {
  display: block;
  width: var(--observed);
  height: 100%;
  background: var(--emerald);
}

.validation-track b {
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: var(--expected);
  width: 3px;
  background: #c04b48;
  transform: translateX(-1px);
}

.validation-chart-row > span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.validation-caveat {
  margin: 14px 0 0;
  border-left: 4px solid var(--gold);
  background: #fff8e8;
  color: #5a5140;
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.6;
}

.validation-table {
  min-width: 930px;
}

.validation-table .number-balls {
  flex-wrap: nowrap;
}

.validation-best {
  display: inline-flex;
  min-width: 46px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #e9eef4;
  color: #43556c;
  font-size: 13px;
  font-weight: 850;
}

.validation-best.hit {
  background: #e5f3eb;
  color: #17613e;
}

.validation-method {
  margin-top: 8px;
}

.validation-empty {
  display: grid;
  min-height: 220px;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: center;
}

.validation-empty p {
  margin: 8px 0 0;
  color: var(--muted);
}

.number-rank {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.number-rank > span,
.number-rank > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  padding-bottom: 10px;
  text-decoration: none;
}

.wide-rank > span,
.wide-rank > a {
  justify-content: flex-start;
}

.wide-rank small {
  color: var(--muted);
  font-size: 12px;
}

.stat-bars {
  display: grid;
  gap: 14px;
}

.stat-bar-row {
  display: grid;
  grid-template-columns: 88px 1fr 112px;
  gap: 10px;
  align-items: center;
}

.stat-bar-row span,
.stat-bar-row b {
  font-size: 13px;
}

.stat-bar-row b {
  color: var(--muted);
  text-align: right;
}

.stat-bar-row i {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald) var(--bar), #e5e9e5 var(--bar));
}

.metric-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.metric-list li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}

.history-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.history-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.history-table th {
  background: #f0f3ee;
  color: #3d454e;
  font-size: 13px;
}

.article-page {
  max-width: 820px;
  padding: 52px 0;
}

.article-page h1 {
  font-size: clamp(36px, 5vw, 56px);
}

.article-page h2 {
  margin-top: 30px;
}

.article-page p {
  color: #424b55;
  font-size: 18px;
}

.article-page ul {
  margin: 12px 0 24px;
  padding-left: 24px;
  color: #424b55;
  font-size: 17px;
  line-height: 1.75;
}

.article-page li + li {
  margin-top: 7px;
}

.article-page a:not(.primary-button) {
  color: var(--emerald-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.policy-effective,
.contact-address {
  color: var(--muted) !important;
  font-size: 14px !important;
  font-weight: 800;
}

.policy-summary {
  margin: 26px 0 34px;
  padding: 20px 22px;
  border: 1px solid #cfd8d3;
  border-left: 4px solid var(--emerald);
  border-radius: 6px;
  background: #f4f7f5;
}

.policy-summary strong {
  font-size: 18px;
}

.policy-summary ul {
  margin-bottom: 0;
}

.policy-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.policy-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  color: #424b55;
  font-size: 15px;
  line-height: 1.55;
}

.policy-table th,
.policy-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.policy-table th {
  background: #eef3f0;
  color: #24312d;
}

.policy-table tbody tr:last-child td {
  border-bottom: 0;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 28px;
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 58px 0;
  align-items: center;
}

.auth-copy span {
  color: var(--emerald-strong);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.auth-copy h1 {
  margin: 6px 0 14px;
  font-size: clamp(38px, 6vw, 64px);
}

.auth-copy p,
.muted-text,
.form-note {
  color: var(--muted);
}

.auth-card,
.number-form {
  display: grid;
  gap: 14px;
}

.auth-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 24px;
}

.auth-card label,
.number-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.form-error {
  border-radius: 8px;
  background: #fff0ef;
  color: #b43632;
  padding: 11px 12px;
  font-weight: 750;
}

.mini-recommendations {
  display: grid;
  gap: 14px;
}

.mini-recommendations > div {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.mini-recommendations code {
  color: var(--muted);
}

.mini-recommendations .save-number-link {
  width: fit-content;
}

.number-form label small {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.45;
}

.portfolio-section {
  width: min(1180px, 100%);
  overflow: hidden;
  margin: 0 auto 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.portfolio-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 150px;
  gap: 22px;
  align-items: end;
  padding: 26px 28px;
  border-bottom: 1px solid var(--line);
  background: #1c2428;
  color: #fff;
}

.portfolio-header > div:first-child > span {
  color: #79d0b7;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.portfolio-header h2 {
  margin: 4px 0 7px;
  font-size: 30px;
}

.portfolio-header p {
  max-width: 650px;
  margin: 0;
  color: #c4cdca;
  font-size: 13px;
}

.portfolio-round-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.portfolio-round-form label {
  display: grid;
  gap: 5px;
  color: #c4cdca;
  font-size: 11px;
  font-weight: 800;
}

.portfolio-round-form select {
  min-width: 130px;
}

.portfolio-round-form .secondary-button {
  min-height: 42px;
}

.portfolio-score {
  display: grid;
  min-height: 112px;
  align-content: center;
  justify-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
}

.portfolio-score span,
.portfolio-score small {
  color: #c4cdca;
  font-size: 10px;
  font-weight: 800;
}

.portfolio-score strong {
  color: #fff;
  font-size: 34px;
  line-height: 1.1;
}

.portfolio-score.good strong,
.portfolio-score.good small {
  color: #79d0b7;
}

.portfolio-score.caution strong,
.portfolio-score.caution small {
  color: #ffaaa6;
}

.portfolio-empty {
  display: grid;
  min-height: 230px;
  place-content: center;
  justify-items: center;
  padding: 30px;
  text-align: center;
}

.portfolio-empty strong {
  font-size: 21px;
}

.portfolio-empty p {
  margin: 7px 0 18px;
  color: var(--muted);
}

.portfolio-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #f4f7f5;
}

.portfolio-metrics > div {
  display: grid;
  gap: 3px;
  padding: 17px 20px;
  border-right: 1px solid var(--line);
}

.portfolio-metrics > div:last-child {
  border-right: 0;
}

.portfolio-metrics span,
.portfolio-metrics small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.portfolio-metrics strong {
  font-size: 24px;
}

.portfolio-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(330px, 0.7fr);
  border-bottom: 1px solid var(--line);
}

.portfolio-heatmap-panel,
.portfolio-findings-panel {
  min-width: 0;
  padding: 26px 28px;
}

.portfolio-findings-panel {
  border-left: 1px solid var(--line);
  background: #fbfcfa;
}

.portfolio-heatmap-panel .section-title h3,
.portfolio-findings-panel .section-title h3,
.portfolio-detail-grid .section-title h3 {
  margin: 4px 0 0;
  font-size: 21px;
}

.portfolio-heatmap-panel .section-title p {
  margin-top: 5px;
  font-size: 12px;
}

.portfolio-number-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 7px;
}

.portfolio-number-cell {
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-content: center;
  justify-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #53605a;
}

.portfolio-number-cell b {
  font-size: 13px;
  line-height: 1.1;
}

.portfolio-number-cell small {
  color: inherit;
  font-size: 9px;
  font-weight: 850;
}

.portfolio-number-cell.single {
  border-color: #b7d5e8;
  background: #eaf5fb;
  color: #225b7e;
}

.portfolio-number-cell.repeat {
  border-color: #e5c47c;
  background: #fff2cf;
  color: #7a5200;
}

.portfolio-number-cell.high {
  border-color: #e59a96;
  background: #fbe1df;
  color: #9b2e2a;
}

.portfolio-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.portfolio-legend span::before {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
  content: "";
  vertical-align: -1px;
}

.portfolio-legend .single::before {
  background: #eaf5fb;
}

.portfolio-legend .repeat::before {
  background: #fff2cf;
}

.portfolio-legend .high::before {
  background: #fbe1df;
}

.portfolio-findings {
  display: grid;
  gap: 8px;
}

.portfolio-finding {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-left: 4px solid #a8b5ae;
  border-radius: 6px;
  background: #fff;
  padding: 10px;
}

.portfolio-finding > span {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: #edf0f2;
  color: #59636d;
  font-size: 10px;
  font-weight: 900;
}

.portfolio-finding.good {
  border-left-color: var(--emerald);
}

.portfolio-finding.good > span {
  background: #dff3eb;
  color: #0d684f;
}

.portfolio-finding.caution {
  border-left-color: var(--coral);
}

.portfolio-finding.caution > span {
  background: #fff0ef;
  color: #a3312e;
}

.portfolio-finding div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.portfolio-finding div strong {
  font-size: 12px;
}

.portfolio-finding div small {
  color: var(--muted);
  font-size: 10px;
}

.portfolio-finding > b {
  color: #343d46;
  font-size: 12px;
  text-align: right;
}

.portfolio-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portfolio-detail-grid > section {
  min-width: 0;
  padding: 24px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.portfolio-detail-grid > section:nth-child(even) {
  border-right: 0;
}

.portfolio-detail-grid > section:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.portfolio-zone-list {
  display: grid;
  gap: 9px;
}

.portfolio-zone-list > div {
  display: grid;
  grid-template-columns: 55px minmax(0, 1fr) 48px;
  gap: 9px;
  align-items: center;
  font-size: 11px;
}

.portfolio-zone-list i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--blue) var(--zone-rate), #e5e9e5 var(--zone-rate));
}

.portfolio-zone-list b {
  text-align: right;
}

.portfolio-inline-metrics,
.portfolio-score-notice {
  color: var(--muted);
  font-size: 11px;
}

.portfolio-inline-metrics {
  margin: 14px 0 0;
}

.portfolio-top-numbers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.portfolio-top-numbers > div {
  display: grid;
  justify-items: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 5px;
}

.portfolio-top-numbers .ball {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.portfolio-top-numbers strong {
  font-size: 11px;
}

.portfolio-top-numbers small {
  color: var(--muted);
  font-size: 9px;
}

.portfolio-overlap-list {
  display: grid;
  gap: 8px;
}

.portfolio-overlap-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.portfolio-overlap-list > div:last-child {
  border-bottom: 0;
}

.portfolio-overlap-list span {
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 750;
}

.portfolio-overlap-list strong {
  color: var(--coral);
  font-size: 12px;
}

.portfolio-overlap-list small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
}

.portfolio-history-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9f6;
}

.portfolio-history-summary > div {
  display: grid;
  gap: 2px;
  padding: 11px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.portfolio-history-summary > div:nth-child(even) {
  border-right: 0;
}

.portfolio-history-summary > div:nth-child(n + 3) {
  border-bottom: 0;
}

.portfolio-history-summary span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.portfolio-history-summary strong {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.portfolio-score-notice {
  margin: 0;
  border-top: 1px solid var(--line);
  background: #fff8e8;
  color: #68552d;
  padding: 13px 28px;
}

.tracking-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(1180px, 100%);
  margin: 0 auto 28px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f7f9f6;
}

.tracking-summary > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
}

.tracking-summary > div:last-child {
  border-right: 0;
}

.tracking-summary span,
.tracking-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.tracking-summary strong {
  overflow-wrap: anywhere;
  color: #202a26;
  font-size: 22px;
}

.my-number-table code {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.my-number-table p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.my-number-table {
  min-width: 980px;
}

.tracking-result {
  min-width: 210px;
}

.tracking-result small,
.tracking-result strong {
  display: block;
  margin-top: 7px;
}

.tracking-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 850;
}

.tracking-status.pending {
  background: #fff1d8;
  color: #81500a;
}

.tracking-status.checked {
  background: #e5f3eb;
  color: #17613e;
}

.tracking-status.legacy {
  background: #e9eef4;
  color: #43556c;
}

.tracking-status.unavailable {
  background: #fff0ef;
  color: #a3312e;
}

.tracking-rank {
  color: #202a26;
  font-size: 16px;
}

.inline-edit-form {
  display: grid;
  min-width: 240px;
  gap: 8px;
}

.inline-edit-form input,
.inline-edit-form textarea {
  width: 100%;
}

.save-number-link,
.text-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf7;
  color: var(--emerald-strong);
  padding: 0 12px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.text-button {
  color: #b43632;
}

.dashboard-grid {
  align-items: start;
}

.account-danger-zone {
  width: min(1180px, 100%);
  margin: 28px auto;
}

.account-danger-zone form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.account-danger-zone label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 4vw, 56px);
  border-top: 1px solid #263036;
  background: var(--hero);
  color: #aeb8b5;
}

.site-footer strong {
  color: #f7f6f1;
}

.site-footer p {
  max-width: 640px;
  margin: 6px 0 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
}

.site-footer nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

@media (max-width: 1080px) {
  .tool-hero,
  .content-grid,
  .content-grid.triple {
    grid-template-columns: 1fr;
  }

  .generator-studio-grid {
    grid-template-columns: 1fr;
  }

  .constraint-designer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 18px;
  }

  .constraint-designer .generator-panel-head,
  .constraint-designer .design-health,
  .constraint-designer .studio-message {
    grid-column: 1 / -1;
  }

  .replay-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-header {
    grid-template-columns: minmax(0, 1fr) 150px;
  }

  .portfolio-round-form {
    grid-column: 1;
  }

  .portfolio-score {
    grid-column: 2;
    grid-row: 1 / 3;
  }

  .portfolio-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .portfolio-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .portfolio-main-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-findings-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .tool-hero {
    min-height: auto;
  }

  .recommendation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tracking-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tracking-summary > div:nth-child(2) {
    border-right: 0;
  }

  .tracking-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .analyzer-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .analyzer-form .form-note {
    grid-column: 1;
    margin-top: -4px;
  }

  .analyzer-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .number-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .validation-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .site-header {
    align-items: flex-start;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 70px;
    right: 18px;
    left: 18px;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 8px;
    box-shadow: var(--shadow);
  }

  .nav-form button,
  .join-link {
    width: 100%;
    text-align: left;
  }

  .nav-more,
  .nav-more summary,
  .nav-more-menu {
    width: 100%;
  }

  .nav-more summary {
    justify-content: space-between;
  }

  .nav-more-menu {
    position: static;
    margin-top: 4px;
    border: 0;
    border-left: 3px solid #d7e4df;
    border-radius: 0;
    padding: 2px 0 2px 8px;
    box-shadow: none;
  }

  .site-nav.open {
    display: flex;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 70px;
    right: 18px;
    left: 18px;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 8px;
    box-shadow: var(--shadow);
  }

  .nav-form button,
  .join-link {
    width: 100%;
    text-align: left;
  }

  .site-nav.open {
    display: flex;
  }

  h1 {
    font-size: 40px;
    line-height: 1.08;
  }

  .generator-panel {
    padding: 18px 14px;
  }

  .generator-panel-head,
  .number-tool-row,
  .generator-result-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .generator-panel-head p {
    max-width: none;
    text-align: left;
  }

  .strategy-segments {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 0;
  }

  .strategy-segments label {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .strategy-segments label + label {
    border-left: 0;
  }

  .strategy-segments label:nth-child(even) {
    border-right: 0;
  }

  .strategy-segments label:last-child {
    grid-column: 1 / -1;
    border-right: 0;
  }

  .number-tool {
    width: 100%;
  }

  .number-picker {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
    padding: 13px 8px;
  }

  .number-picker button {
    font-size: 11px;
  }

  .selection-ledger {
    grid-template-columns: 1fr;
  }

  .constraint-designer {
    display: block;
  }

  .generator-submit-bar {
    position: static;
    display: grid;
    width: 100%;
    margin-top: 12px;
  }

  .generator-submit-bar > div:last-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .generator-submit-bar .primary-button,
  .generator-submit-bar .secondary-button,
  .generator-result-toolbar .secondary-button {
    width: 100%;
  }

  .generator-result-toolbar {
    align-items: stretch;
  }

  .generator-result-toolbar h2 {
    font-size: 28px;
  }

  .replay-trust-strip,
  .replay-controls,
  .replay-report-head,
  .replay-card-grid {
    grid-template-columns: 1fr;
  }

  .replay-trust-strip > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 13px 15px;
  }

  .replay-trust-strip > div:last-child {
    border-bottom: 0;
  }

  .replay-controls {
    padding: 15px;
  }

  .replay-empty {
    grid-template-columns: 1fr;
    gap: 14px;
    min-height: 240px;
    padding: 24px 20px;
  }

  .replay-empty-index {
    width: 52px;
    height: 52px;
  }

  .replay-report-head {
    gap: 22px;
    padding: 24px 18px;
  }

  .replay-report-head h2 {
    font-size: 29px;
  }

  .replay-integrity-card strong {
    font-size: 21px;
  }

  .replay-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .replay-summary > div:nth-child(2) {
    border-right: 0;
  }

  .replay-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .replay-summary strong {
    font-size: 20px;
  }

  .replay-result-heading {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 24px 18px 16px;
  }

  .replay-result-heading h3 {
    font-size: 24px;
  }

  .replay-result-heading p {
    max-width: none;
    text-align: left;
  }

  .replay-card-grid {
    padding: 0 18px 20px;
  }

  .replay-card {
    padding: 16px;
  }

  .replay-comparison-line {
    align-items: start;
  }

  .replay-report-notice {
    padding: 15px 18px;
  }

  .portfolio-header {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 18px;
  }

  .portfolio-header h2 {
    font-size: 27px;
  }

  .portfolio-round-form,
  .portfolio-score {
    grid-column: 1;
    grid-row: auto;
  }

  .portfolio-round-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .portfolio-score {
    min-height: 92px;
  }

  .portfolio-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-metrics > div {
    padding: 14px;
  }

  .portfolio-metrics strong {
    font-size: 20px;
  }

  .portfolio-heatmap-panel,
  .portfolio-findings-panel,
  .portfolio-detail-grid > section {
    padding: 21px 14px;
  }

  .portfolio-number-grid {
    gap: 4px;
  }

  .portfolio-number-cell b {
    font-size: 11px;
  }

  .portfolio-number-cell small {
    font-size: 8px;
  }

  .portfolio-finding {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .portfolio-finding > b {
    grid-column: 2;
    text-align: left;
  }

  .portfolio-detail-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-detail-grid > section,
  .portfolio-detail-grid > section:nth-child(even),
  .portfolio-detail-grid > section:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .portfolio-detail-grid > section:last-child {
    border-bottom: 0;
  }

  .portfolio-score-notice {
    padding: 13px 16px;
  }

  .recommendation-grid,
  .recommendation-grid.wide {
    grid-template-columns: 1fr;
  }

  .notice-band,
  .site-footer {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .draw-list a {
    grid-template-columns: 1fr;
  }

  .ball {
    width: 34px;
    height: 34px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    padding-top: 34px;
  }

  .analyzer-form {
    padding: 18px;
  }

  .analyzer-input-grid {
    grid-template-columns: repeat(3, minmax(64px, 1fr));
  }

  .analyzer-report-head {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 18px;
  }

  .analyzer-report-head h2 {
    font-size: 28px;
  }

  .analyzer-overall {
    min-height: 92px;
  }

  .analyzer-picked {
    align-items: flex-start;
    padding: 18px;
  }

  .analyzer-report-section {
    padding: 22px 0;
  }

  .analyzer-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diagnostic-row {
    grid-template-columns: 56px minmax(0, 1fr) 72px;
    gap: 10px;
  }

  .number-detail-grid {
    grid-template-columns: 1fr;
  }

  .history-comparison-row {
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
  }

  .history-comparison-row code {
    grid-column: 1 / -1;
  }

  .validation-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .validation-summary > div:last-child {
    grid-column: 1 / -1;
  }

  .validation-chart-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 8px 10px;
  }

  .validation-chart-row > span {
    grid-column: 2;
    text-align: left;
  }

  .validation-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .validation-table,
  .validation-table tbody,
  .validation-table tr,
  .validation-table td {
    display: block;
    width: 100%;
  }

  .validation-table {
    min-width: 0;
  }

  .validation-table thead {
    display: none;
  }

  .validation-table tbody {
    display: grid;
    gap: 14px;
  }

  .validation-table tbody tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .validation-table td {
    border-bottom: 1px solid var(--line);
    padding: 13px 16px;
  }

  .validation-table td:last-child {
    border-bottom: 0;
  }

  .validation-table td[data-label]::before {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    content: attr(data-label);
    font-size: 11px;
    font-weight: 850;
  }

  .my-number-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .my-number-table,
  .my-number-table tbody,
  .my-number-table tr,
  .my-number-table td {
    display: block;
    width: 100%;
  }

  .my-number-table {
    min-width: 0;
  }

  .my-number-table thead {
    display: none;
  }

  .my-number-table tbody {
    display: grid;
    gap: 14px;
  }

  .my-number-table tbody tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .my-number-table td {
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
  }

  .my-number-table td:last-child {
    border-bottom: 0;
  }

  .my-number-table td[data-label]::before {
    display: block;
    margin-bottom: 9px;
    color: var(--muted);
    content: attr(data-label);
    font-size: 12px;
    font-weight: 850;
  }

  .my-number-table .inline-edit-form {
    min-width: 0;
  }

  .my-number-table .empty-number-row td {
    border-bottom: 0;
  }
}

/* Multi-strategy walk-forward research desk */
.strategy-integrity,
.strategy-window-tabs,
.strategy-comparison-section,
.strategy-mode-detail {
  width: min(1180px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.strategy-page-head h1 {
  overflow-wrap: normal;
  word-break: keep-all;
}

.strategy-page-head h1 em {
  font-style: normal;
  white-space: nowrap;
}

.strategy-integrity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr) 132px;
  gap: 24px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #26383d;
  border-radius: 8px;
  background: #182226;
  color: #fff;
  padding: 24px 26px;
  box-shadow: var(--shadow);
}

.strategy-integrity > div:first-child > span,
.strategy-mode-detail > header > div > span {
  color: #85dbc8;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.strategy-integrity h2 {
  margin: 5px 0 0;
  font-size: 27px;
}

.strategy-integrity p {
  margin: 6px 0 0;
  color: #c8d2d0;
  font-size: 11px;
}

.strategy-integrity dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
}

.strategy-integrity dl > div {
  display: grid;
  min-height: 72px;
  align-content: center;
  gap: 4px;
  padding: 10px 12px;
}

.strategy-integrity dl > div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.strategy-integrity dt,
.strategy-integrity dd {
  margin: 0;
}

.strategy-integrity dt {
  color: #9fb0ad;
  font-size: 9px;
}

.strategy-integrity dd {
  font-size: 14px;
  font-weight: 850;
}

.strategy-integrity-seal {
  display: grid;
  min-height: 104px;
  place-content: center;
  justify-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
}

.strategy-integrity-seal span,
.strategy-integrity-seal small {
  color: #c8d2d0;
  font-size: 9px;
}

.strategy-integrity-seal strong {
  color: #75d5bd;
  font-size: 27px;
}

.strategy-window-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.strategy-window-tabs a {
  display: grid;
  min-height: 70px;
  place-content: center;
  justify-items: center;
  gap: 3px;
}

.strategy-window-tabs a + a {
  border-left: 1px solid var(--line);
}

.strategy-window-tabs strong {
  font-size: 14px;
}

.strategy-window-tabs small {
  color: var(--muted);
  font-size: 10px;
}

.strategy-window-tabs a.active {
  background: #edf8f4;
  box-shadow: inset 0 -3px 0 var(--emerald);
  color: var(--emerald-strong);
}

.strategy-comparison-section,
.strategy-mode-detail {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow);
}

.strategy-table-wrap,
.strategy-audit-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.strategy-table,
.strategy-audit-table {
  width: 100%;
  border-collapse: collapse;
}

.strategy-table {
  min-width: 1080px;
}

.strategy-audit-table {
  min-width: 1050px;
}

.strategy-table th,
.strategy-table td,
.strategy-audit-table th,
.strategy-audit-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 12px;
  text-align: left;
  vertical-align: middle;
}

.strategy-table th,
.strategy-audit-table th {
  background: #f4f6f4;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.strategy-table td,
.strategy-audit-table td {
  font-size: 11px;
}

.strategy-table tbody tr:last-child td,
.strategy-audit-table tbody tr:last-child td {
  border-bottom: 0;
}

.strategy-table tbody tr.selected {
  background: #eef9f5;
  box-shadow: inset 4px 0 0 var(--emerald);
}

.strategy-table td:first-child {
  width: 220px;
}

.strategy-table td a,
.strategy-table td > strong,
.strategy-table td > small,
.strategy-audit-table td > strong,
.strategy-audit-table td > small {
  display: block;
}

.strategy-table td a strong {
  color: var(--ink);
  font-size: 13px;
}

.strategy-table td a small,
.strategy-table td > small,
.strategy-audit-table td > small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.strategy-chart-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.52fr) minmax(0, 1fr);
  gap: 24px 34px;
  align-items: start;
}

.strategy-chart-section .section-title,
.strategy-chart-legend,
.strategy-multiple-testing-note {
  grid-column: 1;
}

.strategy-mode-chart {
  grid-column: 2;
  grid-row: 1 / 4;
  display: grid;
  gap: 13px;
}

.strategy-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
}

.strategy-chart-legend span::before {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border-radius: 2px;
  background: var(--emerald);
  content: "";
}

.strategy-chart-legend span + span::before {
  width: 2px;
  border-radius: 0;
  background: var(--gold);
}

.strategy-mode-chart-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 76px;
  gap: 12px;
  align-items: center;
}

.strategy-mode-chart-row > strong {
  font-size: 11px;
}

.strategy-mode-chart-row > span {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.strategy-mode-track {
  position: relative;
  overflow: hidden;
  height: 28px;
  border-radius: 5px;
  background: #edf1ee;
}

.strategy-mode-track i {
  display: block;
  width: var(--observed);
  height: 100%;
  background: var(--emerald);
}

.strategy-mode-track b {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--expected);
  width: 2px;
  background: var(--gold);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.strategy-multiple-testing-note {
  margin: 0;
  border-left: 3px solid var(--gold);
  background: #fff8e9;
  padding: 12px 13px;
  color: #72551e;
  font-size: 10px;
  line-height: 1.6;
}

.strategy-mode-detail > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.strategy-mode-detail h2 {
  margin: 4px 0 0;
  font-size: 26px;
}

.strategy-mode-detail header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.strategy-mode-detail header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.strategy-mode-detail header nav a {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8faf8;
  padding: 8px 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.strategy-mode-detail header nav a.active {
  border-color: #182226;
  background: #182226;
  color: #fff;
}

.strategy-audit-table td:first-child strong,
.strategy-audit-table td:first-child small {
  display: block;
}

.strategy-audit-table .number-balls {
  flex-wrap: nowrap;
  gap: 4px;
}

.strategy-audit-table .ball {
  width: 25px;
  height: 25px;
  font-size: 9px;
}

.strategy-audit-table .bonus-label {
  font-size: 8px;
}

.strategy-audit-table code {
  white-space: nowrap;
  font-size: 10px;
}

.strategy-method-grid {
  margin-top: 24px;
}

.strategy-notice {
  margin-top: 24px;
}

@media (max-width: 980px) {
  .strategy-integrity {
    grid-template-columns: minmax(0, 1fr) 120px;
  }

  .strategy-integrity dl {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .strategy-integrity-seal {
    grid-column: 2;
    grid-row: 1;
  }

  .strategy-chart-section {
    grid-template-columns: 1fr;
  }

  .strategy-chart-section .section-title,
  .strategy-chart-legend,
  .strategy-multiple-testing-note,
  .strategy-mode-chart {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .strategy-page-head h1 {
    font-size: 34px;
  }

  .strategy-integrity {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 21px 17px;
  }

  .strategy-integrity h2 {
    font-size: 23px;
  }

  .strategy-integrity dl,
  .strategy-integrity-seal {
    grid-column: 1;
    grid-row: auto;
  }

  .strategy-integrity-seal {
    min-height: 86px;
  }

  .strategy-window-tabs a {
    min-height: 62px;
  }

  .strategy-comparison-section,
  .strategy-mode-detail {
    padding: 19px 14px;
  }

  .strategy-table-wrap,
  .strategy-audit-table-wrap {
    overflow: visible;
    border: 0;
  }

  .strategy-table,
  .strategy-table tbody,
  .strategy-table tr,
  .strategy-table td,
  .strategy-audit-table,
  .strategy-audit-table tbody,
  .strategy-audit-table tr,
  .strategy-audit-table td {
    display: block;
    width: 100%;
  }

  .strategy-table,
  .strategy-audit-table {
    min-width: 0;
  }

  .strategy-table thead,
  .strategy-audit-table thead {
    display: none;
  }

  .strategy-table tbody,
  .strategy-audit-table tbody {
    display: grid;
    gap: 12px;
  }

  .strategy-table tbody tr,
  .strategy-audit-table tbody tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(18, 24, 31, 0.06);
  }

  .strategy-table tbody tr.selected {
    border-color: #92c9bb;
    box-shadow: inset 4px 0 0 var(--emerald), 0 8px 24px rgba(18, 24, 31, 0.06);
  }

  .strategy-table td,
  .strategy-audit-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid var(--line);
    padding: 12px 13px;
  }

  .strategy-table td:first-child {
    width: 100%;
  }

  .strategy-table td:last-child,
  .strategy-audit-table td:last-child {
    border-bottom: 0;
  }

  .strategy-table td::before,
  .strategy-audit-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 9px;
    font-weight: 850;
  }

  .strategy-table td:first-child a {
    min-width: 0;
  }

  .strategy-mode-chart-row {
    grid-template-columns: 74px minmax(0, 1fr) 58px;
    gap: 8px;
  }

  .strategy-mode-detail > header {
    display: grid;
    align-items: stretch;
  }

  .strategy-mode-detail header nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .strategy-mode-detail header nav a {
    text-align: center;
  }

  .strategy-audit-table .number-balls {
    flex-wrap: wrap;
  }
}

@media (max-width: 700px) {
  .ledger-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .ledger-table,
  .ledger-table tbody,
  .ledger-table tr,
  .ledger-table td {
    display: block;
    width: 100%;
  }

  .ledger-table {
    min-width: 0;
  }

  .ledger-table thead {
    display: none;
  }

  .ledger-table tbody {
    display: grid;
    gap: 14px;
  }

  .ledger-table tbody tr {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(18, 24, 31, 0.06);
  }

  .ledger-table td {
    min-width: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
  }

  .ledger-table td:last-child {
    border-bottom: 0;
  }

  .ledger-table td[data-label]::before {
    display: block;
    margin-bottom: 9px;
    color: var(--muted);
    content: attr(data-label);
    font-size: 11px;
    font-weight: 850;
  }

  .ledger-table .number-balls {
    flex-wrap: wrap;
  }

  .ledger-table .ledger-money form {
    min-width: 0;
  }

  .ledger-table .empty-number-row td {
    border-bottom: 0;
  }

  .ledger-table .empty-number-row td::before {
    display: none;
  }
}

/* Number statistics research desk */
.stats-page-head {
  display: grid;
  gap: 10px;
}

.stats-page-head > p {
  max-width: 780px;
  color: #46505a;
  font-size: 17px;
  line-height: 1.7;
}

.stats-head-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, max-content));
  gap: 0;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.stats-head-ledger span {
  color: var(--muted);
  padding: 11px 15px;
  border-right: 1px solid var(--line);
  font-size: 12px;
  text-transform: none;
}

.stats-head-ledger span:last-child {
  border-right: 0;
}

.stats-head-ledger b {
  color: var(--ink);
  font-size: 15px;
}

.stats-research-shell {
  display: grid;
  width: min(1180px, 100%);
  gap: 18px;
  margin: 0 auto 34px;
}

.stats-research-toolbar {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-radius: 8px;
  background: #20292c;
  color: #fff;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.stats-research-toolbar > div:first-child > span {
  color: #7dd1b7;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stats-research-toolbar h2 {
  margin: 4px 0 0;
  font-size: 25px;
}

.stats-metric-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(88px, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
}

.stats-metric-switch button {
  min-height: 42px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #d5ddda;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.stats-metric-switch button:last-child {
  border-right: 0;
}

.stats-metric-switch button.active {
  background: #f0c45d;
  color: #242018;
}

.stats-research-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.82fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: stretch;
}

.number-heatmap-panel,
.number-profile-panel,
.research-detail-panel,
.research-timeline-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(18, 24, 31, 0.06);
}

.number-heatmap-panel {
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 20px;
}

.number-heatmap {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 7px;
}

.heat-number {
  --group-color: #177866;
  position: relative;
  isolation: isolate;
  display: grid;
  overflow: hidden;
  aspect-ratio: 1 / 1.05;
  min-width: 0;
  place-content: center;
  gap: 2px;
  border: 1px solid #d9dfdc;
  border-top: 3px solid var(--group-color);
  border-radius: 6px;
  background: #f7f9f7;
  color: #20282b;
  cursor: pointer;
}

.heat-number::before {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--heat);
  background: linear-gradient(180deg, rgba(23, 120, 102, 0.06), rgba(23, 120, 102, 0.25));
  content: "";
}

.heat-number b {
  font-size: 18px;
  line-height: 1;
}

.heat-number small {
  color: #5f696d;
  font-size: 9px;
  font-weight: 800;
}

.heat-number-one {
  --group-color: #d29a2e;
}

.heat-number-two {
  --group-color: #2f6fdb;
}

.heat-number-three {
  --group-color: #d9534f;
}

.heat-number-four {
  --group-color: #676f78;
}

.heat-number-five {
  --group-color: #177866;
}

.heat-number:hover,
.heat-number:focus-visible {
  border-color: #7f9b91;
  box-shadow: 0 6px 14px rgba(18, 24, 31, 0.1);
}

.heat-number.active {
  outline: 3px solid #1d2926;
  outline-offset: 1px;
  background: #fff;
}

.heatmap-scale {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.heatmap-scale i {
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #edf2ef, #8cc4b4, #177866);
}

.stats-method-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.number-profile-panel {
  display: grid;
  align-content: start;
  padding: 24px;
  scroll-margin-top: 84px;
}

.number-profile-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
}

.profile-number-ball {
  width: 64px;
  height: 64px;
  font-size: 22px;
}

.number-profile-head > div > span {
  color: var(--emerald-strong);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.number-profile-head h2 {
  margin: 3px 0 5px;
  font-size: 26px;
}

.number-profile-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.profile-link-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 13px;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.profile-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.profile-status-row > strong {
  border-radius: 6px;
  background: #e8f3ef;
  color: #17634f;
  padding: 6px 9px;
  font-size: 12px;
}

.profile-status-row > strong[data-tone="high"] {
  background: #e7f0fb;
  color: #275d9f;
}

.profile-status-row > strong[data-tone="low"] {
  background: #f4eee5;
  color: #765f3b;
}

.profile-status-row > span {
  color: var(--muted);
  font-size: 12px;
}

.profile-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.profile-metric-grid > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8f9f6;
  padding: 13px;
}

.profile-metric-grid dt,
.profile-metric-grid small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.profile-metric-grid dd {
  margin: 1px 0 0;
  color: #202a27;
  font-size: 13px;
  font-weight: 800;
}

.profile-metric-grid dd b {
  overflow-wrap: anywhere;
  font-size: 22px;
}

.stats-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.research-detail-panel,
.research-timeline-panel {
  padding: 21px;
}

.window-frequency-bars {
  display: grid;
  gap: 14px;
}

.window-frequency-row {
  display: grid;
  grid-template-columns: 82px minmax(70px, 1fr) 112px;
  gap: 10px;
  align-items: center;
}

.window-frequency-row > span,
.window-frequency-row > b {
  font-size: 11px;
}

.window-frequency-row > b {
  color: var(--muted);
  text-align: right;
}

.window-frequency-row i {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, #247d69 var(--bar), #e7ebe8 var(--bar));
}

.partner-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.partner-list button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafbf9;
  padding: 9px 10px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.partner-list button:hover,
.partner-list button:focus-visible {
  border-color: #8abcae;
  background: #f0f7f4;
}

.partner-ball {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.partner-list button > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.partner-list strong,
.partner-list small {
  overflow-wrap: anywhere;
}

.partner-list strong {
  font-size: 12px;
}

.partner-list small {
  color: var(--muted);
  font-size: 9px;
}

.research-timeline {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 7px;
}

.research-timeline > span {
  display: grid;
  min-width: 0;
  min-height: 54px;
  place-content: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f4f6f4;
  text-align: center;
}

.research-timeline > span.hit {
  border-color: #7cb6a5;
  background: #e4f3ed;
  color: #12604d;
  box-shadow: inset 0 3px 0 #23816b;
}

.research-timeline b {
  overflow-wrap: anywhere;
  font-size: 11px;
}

.research-timeline small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.recent-hit-ledger {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.recent-hit-ledger > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.recent-hit-ledger > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recent-hit-ledger b {
  border-radius: 5px;
  background: #eef3f0;
  color: #3b4b45;
  padding: 4px 7px;
  font-size: 10px;
}

.stats-summary-grid {
  margin-top: 8px;
}

.stats-interpretation-panel > strong {
  display: block;
  margin-bottom: 8px;
  color: #27312d;
  font-size: 16px;
}

@media (max-width: 980px) {
  .stats-research-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-research-layout {
    grid-template-columns: 1fr;
  }

  .number-heatmap {
    grid-template-columns: repeat(9, minmax(46px, 1fr));
  }
}

@media (max-width: 720px) {
  .stats-page-head h1 {
    font-size: 34px;
  }

  .stats-page-head > p {
    font-size: 15px;
  }

  .stats-head-ledger {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .stats-head-ledger span {
    border-bottom: 1px solid var(--line);
  }

  .stats-head-ledger span:nth-child(2) {
    border-right: 0;
  }

  .stats-head-ledger span:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .stats-research-toolbar {
    padding: 18px 15px;
  }

  .stats-research-toolbar h2 {
    font-size: 22px;
  }

  .stats-metric-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-metric-switch button {
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .stats-metric-switch button:nth-child(2) {
    border-right: 0;
  }

  .stats-metric-switch button:nth-child(n + 3) {
    border-bottom: 0;
  }

  .number-heatmap-panel,
  .number-profile-panel,
  .research-detail-panel,
  .research-timeline-panel {
    padding: 16px;
  }

  .number-heatmap {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .heat-number {
    min-height: 55px;
    aspect-ratio: auto;
  }

  .number-profile-head {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .profile-number-ball {
    width: 54px;
    height: 54px;
    font-size: 19px;
  }

  .number-profile-head h2 {
    font-size: 22px;
  }

  .profile-link-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .profile-status-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-metric-grid dd b {
    font-size: 19px;
  }

  .stats-detail-grid {
    grid-template-columns: 1fr;
  }

  .partner-list {
    grid-template-columns: 1fr;
  }

  .research-timeline {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .recent-hit-ledger {
    grid-template-columns: 1fr;
  }

  .window-frequency-row {
    grid-template-columns: 72px minmax(55px, 1fr) 96px;
    gap: 7px;
  }
}

@media (max-width: 390px) {
  .stats-head-ledger span {
    padding: 10px;
  }

  .heat-number b {
    font-size: 16px;
  }

  .profile-metric-grid > div {
    padding: 11px 9px;
  }
}

/* Ticket QR desk and immutable recommendation performance */
.home-trust-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(1180px, 100%);
  margin: 0 auto 30px;
  border: 1px solid #202b30;
  border-radius: 8px;
  overflow: hidden;
  background: #202b30;
  box-shadow: var(--shadow);
}

.home-trust-actions > a {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 6px;
  background: #fff;
  color: #172126;
  padding: 25px 28px;
  text-decoration: none;
}

.home-trust-actions > a:first-child {
  border-right: 1px solid var(--line);
}

.home-trust-actions > a:last-child {
  background: #172126;
  color: #fff;
}

.home-trust-actions span {
  color: #0d6a58;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.home-trust-actions > a:last-child span {
  color: #80d8bd;
}

.home-trust-actions strong {
  font-size: 20px;
  line-height: 1.3;
}

.home-trust-actions p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.home-trust-actions > a:last-child p {
  color: #acbbb7;
}

.home-trust-actions b {
  color: #0d6a58;
  font-size: 12px;
}

.home-trust-actions > a:last-child b {
  color: #ffd36b;
}

@media (max-width: 720px) {
  .home-trust-actions {
    grid-template-columns: 1fr;
  }

  .home-trust-actions > a {
    padding: 21px 19px;
  }

  .home-trust-actions > a:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

.ticket-page-head,
.performance-hero {
  width: min(1180px, 100%);
  margin: 0 auto 24px;
  border-radius: 8px;
  background: #10171b;
  color: #fff;
  box-shadow: 0 22px 58px rgba(7, 14, 17, 0.16);
}

.ticket-page-head {
  padding: 40px 42px 0;
}

.ticket-page-head > span,
.performance-hero > div > span,
.ticket-section-head span,
.ticket-result-toolbar > div > span,
.performance-section-head span,
.performance-proof-grid article > span,
.performance-pending-banner > span {
  color: #80d8bd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.ticket-page-head h1,
.performance-hero h1 {
  margin: 8px 0 12px;
  font-size: 42px;
  line-height: 1.14;
  letter-spacing: 0;
}

.ticket-page-head h1 em,
.performance-hero h1 em {
  color: #ffd36b;
  font-style: normal;
}

.ticket-page-head > p,
.performance-hero > div > p {
  max-width: 800px;
  margin: 0;
  color: #c8d2cf;
  line-height: 1.75;
}

.ticket-head-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 30px -42px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: #182125;
}

.ticket-head-ledger > div {
  display: grid;
  gap: 5px;
  padding: 17px 42px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.ticket-head-ledger > div:last-child {
  border-right: 0;
}

.ticket-head-ledger span,
.ticket-head-ledger small {
  color: #9caeaa;
  font-size: 11px;
  font-weight: 800;
}

.ticket-head-ledger strong {
  font-size: 20px;
}

.ticket-scanner-shell,
.ticket-final-notice,
.performance-notice {
  width: min(1180px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.ticket-privacy-ribbon {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 18px;
  border: 1px solid #d4b461;
  border-radius: 6px;
  background: #fff8df;
  padding: 15px 18px;
}

.ticket-privacy-ribbon > div {
  display: grid;
  gap: 2px;
}

.ticket-privacy-ribbon span {
  color: #8d6710;
  font-size: 10px;
  font-weight: 900;
}

.ticket-privacy-ribbon strong {
  color: #33270f;
  font-size: 14px;
}

.ticket-privacy-ribbon p {
  margin: 0;
  color: #655733;
  font-size: 13px;
  line-height: 1.55;
}

.ticket-scan-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  min-height: 390px;
  margin-bottom: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.ticket-scan-entry {
  min-width: 0;
  padding: 28px 30px;
}

.ticket-section-head,
.ticket-result-toolbar,
.performance-section-head {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.ticket-section-head > div,
.ticket-result-toolbar > div:first-child,
.performance-section-head > div {
  min-width: 0;
}

.ticket-section-head h2,
.ticket-result-toolbar h2,
.performance-section-head h2 {
  margin: 3px 0 0;
  color: #172126;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: 0;
}

.ticket-section-head > strong {
  flex: 0 0 auto;
  border: 1px solid #bed5cd;
  border-radius: 4px;
  background: #ecf7f3;
  color: #0d6a58;
  padding: 7px 10px;
  font-size: 12px;
}

.ticket-source-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 18px;
}

.ticket-source-actions .primary-button,
.ticket-source-actions .secondary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-align: center;
}

.ticket-camera-panel {
  position: relative;
  margin: 0 0 18px;
  border-radius: 6px;
  overflow: hidden;
  background: #060a0c;
}

.ticket-camera-panel video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.ticket-camera-panel .scan-region-highlight,
.ticket-camera-panel .code-outline-highlight {
  stroke: #ffd36b !important;
}

.ticket-camera-caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 10, 12, 0.84);
  color: #fff;
  padding: 11px 13px;
  font-size: 12px;
}

.ticket-camera-caption button {
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 4px;
  background: transparent;
  color: #fff;
  padding: 6px 9px;
  cursor: pointer;
}

.ticket-url-fallback {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ticket-url-fallback summary {
  padding: 13px 2px;
  color: #334047;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.ticket-url-fallback form {
  padding: 2px 0 15px;
}

.ticket-url-fallback form > label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ticket-url-fallback form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.ticket-url-fallback input,
.ticket-tax-tool input {
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd2cf;
  border-radius: 4px;
  background: #fff;
  padding: 11px 12px;
  font: inherit;
}

.ticket-url-fallback small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.ticket-status {
  min-height: 44px;
  margin-top: 16px;
  border-left: 4px solid #819099;
  background: #f2f4f4;
  padding: 12px 14px;
  color: #354149;
  font-size: 13px;
  font-weight: 700;
}

.ticket-status[data-tone="working"] {
  border-color: #2f6fdb;
  background: #edf4ff;
  color: #24549f;
}

.ticket-status[data-tone="success"] {
  border-color: #17836d;
  background: #edf8f4;
  color: #0d6a58;
}

.ticket-status[data-tone="error"] {
  border-color: #d9534f;
  background: #fff0ef;
  color: #9e302d;
}

.ticket-security-ledger {
  background: #162126;
  color: #fff;
  padding: 28px 26px;
}

.ticket-section-head.inverse h2 {
  color: #fff;
}

.ticket-security-ledger dl {
  margin: 26px 0 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.ticket-security-ledger dl > div {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.ticket-security-ledger dt {
  color: #93a6a1;
  font-size: 11px;
  font-weight: 800;
}

.ticket-security-ledger dd {
  margin: 0;
  color: #f2f6f4;
  font-size: 13px;
  font-weight: 800;
}

.ticket-security-ledger > p {
  margin: 0;
  color: #aebcb8;
  font-size: 12px;
  line-height: 1.65;
}

.ticket-result-section,
.ticket-wallet-section,
.performance-ledger-section {
  margin: 0 0 30px;
}

.ticket-result-toolbar,
.performance-section-head {
  margin-bottom: 15px;
}

.ticket-result-toolbar > div:last-child {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.ticket-result-toolbar p,
.performance-section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.ticket-result {
  min-height: 190px;
  border-top: 2px solid #172126;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.ticket-result-empty,
.ticket-wallet-empty,
.performance-empty {
  display: grid;
  min-height: 150px;
  place-content: center;
  text-align: center;
  padding: 28px;
}

.ticket-result-empty strong,
.ticket-wallet-empty strong,
.performance-empty strong {
  color: #253036;
  font-size: 16px;
}

.ticket-result-empty p,
.ticket-wallet-empty p,
.performance-empty p {
  max-width: 520px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.ticket-result-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 22px 24px;
  background: #1d292e;
  color: #fff;
}

.ticket-result-summary.pending {
  background: #24394a;
}

.ticket-result-summary.winner {
  background: #0d6858;
}

.ticket-result-summary span {
  color: #8dd9c1;
  font-size: 10px;
  font-weight: 900;
}

.ticket-result-summary h2 {
  margin: 3px 0 5px;
  font-size: 24px;
  letter-spacing: 0;
}

.ticket-result-summary p {
  margin: 0;
  color: #c2d0cc;
  font-size: 12px;
}

.ticket-result-summary > strong {
  color: #ffd36b;
  font-size: 18px;
}

.ticket-winning-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 17px 22px;
  border-bottom: 1px solid var(--line);
  background: #f7f9f8;
}

.ticket-winning-evidence > span,
.ticket-winning-evidence > b {
  color: #4a565c;
  font-size: 12px;
}

.ticket-game-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ticket-game-results article {
  min-width: 0;
  padding: 19px 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ticket-game-results article:nth-child(2n) {
  border-right: 0;
}

.ticket-game-results article.is-winning {
  background: #fff9e7;
}

.ticket-game-results header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ticket-game-results header span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
}

.ticket-game-results header strong {
  color: #202b31;
  font-size: 14px;
}

.ticket-game-results article.is-winning header strong {
  color: #9b6500;
}

.ticket-game-results article > p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.ticket-number-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ticket-number-row .number-ball {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e1b23f;
  color: #161616;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}

.ticket-number-row .ball-2 { background: #4d84d6; color: #fff; }
.ticket-number-row .ball-3 { background: #d65d56; color: #fff; }
.ticket-number-row .ball-4 { background: #727b80; color: #fff; }
.ticket-number-row .ball-5 { background: #49a56e; color: #fff; }
.ticket-number-row .number-ball.matched { outline: 3px solid #ffcc4f; outline-offset: 2px; }

.ticket-claim-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.ticket-claim-ledger > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 16px 20px;
  border-right: 1px solid var(--line);
}

.ticket-claim-ledger > div:last-child { border-right: 0; }
.ticket-claim-ledger span,
.ticket-claim-ledger small { color: var(--muted); font-size: 10px; font-weight: 800; }
.ticket-claim-ledger strong { overflow-wrap: anywhere; color: #1c282d; font-size: 15px; }

.ticket-result-notice {
  margin: 0;
  background: #f2f4f3;
  color: #4d595e;
  padding: 13px 20px;
  font-size: 11px;
  line-height: 1.6;
}

.ticket-result-notice a { color: #0d6a58; font-weight: 800; }

.ticket-wallet {
  border-top: 2px solid #172126;
}

.ticket-wallet-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 15px 18px;
}

.ticket-wallet-row > div:first-child {
  display: grid;
  grid-template-columns: minmax(120px, 0.5fr) minmax(120px, 0.5fr) minmax(100px, 1fr);
  gap: 12px;
  align-items: center;
}

.ticket-wallet-row span,
.ticket-wallet-row small { color: var(--muted); font-size: 11px; }
.ticket-wallet-row strong { color: #172126; font-size: 14px; }
.ticket-wallet-actions { display: flex; gap: 7px; align-items: center; }

.ticket-wallet-actions .icon-button {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8c2c0;
  border-radius: 4px;
  background: #fff;
  color: #a53a35;
  font-size: 20px;
  cursor: pointer;
}

.ticket-support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.ticket-support-grid > article {
  border-top: 3px solid #172126;
  background: #fff;
  padding: 24px;
  box-shadow: 0 8px 28px rgba(6, 12, 15, 0.06);
}

.ticket-tax-tool form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 18px;
}

.ticket-tax-tool label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ticket-tax-result {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  border-left: 4px solid #d8ad58;
  background: #fff8df;
  padding: 13px 15px;
}

.ticket-tax-result span,
.ticket-tax-result small { color: #75653d; font-size: 10px; }
.ticket-tax-result strong { color: #31270d; font-size: 18px; }

.ticket-claim-guide ol {
  display: grid;
  gap: 0;
  margin: 16px 0;
  padding: 0;
  list-style: none;
  counter-reset: claim;
}

.ticket-claim-guide li {
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 52px;
  padding: 10px 0 10px 43px;
  border-bottom: 1px solid var(--line);
  counter-increment: claim;
}

.ticket-claim-guide li::before {
  position: absolute;
  top: 10px;
  left: 0;
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #172126;
  color: #fff;
  content: counter(claim);
  font-size: 11px;
  font-weight: 900;
}

.ticket-claim-guide li strong { color: #202a2f; font-size: 13px; }
.ticket-claim-guide li span { color: var(--muted); font-size: 11px; }

.performance-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 34px;
  align-items: center;
  padding: 42px;
}

.performance-hero aside {
  display: grid;
  gap: 5px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  padding: 8px 0 8px 30px;
}

.performance-hero aside span,
.performance-hero aside small { color: #9caeaa; font-size: 11px; font-weight: 800; }
.performance-hero aside strong { color: #ffd36b; font-size: 36px; line-height: 1.1; }

.performance-metrics,
.performance-ledger-section,
.performance-pending-banner,
.performance-proof-grid {
  width: min(1180px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.performance-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.performance-metrics > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.performance-metrics > div:last-child { border-right: 0; }
.performance-metrics span,
.performance-metrics small { color: var(--muted); font-size: 10px; font-weight: 800; }
.performance-metrics strong { overflow-wrap: anywhere; color: #172126; font-size: 23px; }

.performance-pending-banner {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
  border-left: 5px solid #2f6fdb;
  background: #edf4ff;
  padding: 18px 22px;
}

.performance-pending-banner > span { color: #24549f; }
.performance-pending-banner strong { color: #1e375d; font-size: 16px; }
.performance-pending-banner p { margin: 4px 0 0; color: #546781; font-size: 12px; line-height: 1.6; }

.performance-table-wrap {
  overflow-x: auto;
  border-top: 2px solid #172126;
  background: #fff;
}

.performance-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.performance-table th,
.performance-table td {
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
  text-align: left;
  vertical-align: middle;
}

.performance-table th {
  background: #f2f4f3;
  color: #576269;
  font-size: 10px;
  font-weight: 900;
}

.performance-table td { color: #263238; font-size: 12px; }
.performance-table td strong { color: #172126; }
.performance-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }

.performance-badge {
  display: inline-flex;
  border-radius: 4px;
  padding: 5px 7px;
  font-size: 10px;
  font-weight: 900;
}

.performance-badge.verified { background: #e8f5f0; color: #0d6a58; }
.performance-badge.mismatch { background: #fff0ef; color: #a43732; }
.performance-badge.pending { background: #eaf2ff; color: #285ca8; }

.performance-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 30px;
  background: var(--line);
  border: 1px solid var(--line);
}

.performance-proof-grid article {
  min-width: 0;
  background: #fff;
  padding: 23px;
}

.performance-proof-grid article > span { color: #0d6a58; }
.performance-proof-grid h2 { margin: 5px 0 9px; color: #172126; font-size: 18px; line-height: 1.35; letter-spacing: 0; }
.performance-proof-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.performance-proof-grid a { display: inline-block; margin-top: 12px; color: #0d6a58; font-size: 12px; font-weight: 800; }

@media (max-width: 980px) {
  .ticket-scan-workspace,
  .performance-hero {
    grid-template-columns: 1fr;
  }

  .ticket-security-ledger dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
  }

  .performance-hero aside {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    border-left: 0;
    padding: 20px 0 0;
  }

  .performance-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .performance-metrics > div:nth-child(2) { border-right: 0; }
  .performance-metrics > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .ticket-page-head,
  .performance-hero {
    padding: 27px 20px 0;
  }

  .performance-hero {
    padding-bottom: 27px;
  }

  .ticket-page-head h1,
  .performance-hero h1 {
    font-size: 31px;
  }

  .ticket-head-ledger {
    grid-template-columns: 1fr;
    margin: 24px -20px 0;
  }

  .ticket-head-ledger > div {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 12px 20px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .ticket-head-ledger > div:last-child { border-bottom: 0; }

  .ticket-privacy-ribbon,
  .ticket-support-grid,
  .ticket-game-results,
  .ticket-claim-ledger,
  .performance-proof-grid,
  .performance-pending-banner {
    grid-template-columns: 1fr;
  }

  .ticket-scan-entry,
  .ticket-security-ledger {
    padding: 22px 18px;
  }

  .ticket-source-actions,
  .ticket-tax-tool form {
    grid-template-columns: 1fr;
  }

  .ticket-security-ledger dl { grid-template-columns: 1fr; }

  .ticket-result-toolbar,
  .performance-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ticket-result-toolbar > div:last-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .ticket-result-summary {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 19px 17px;
  }

  .ticket-game-results article,
  .ticket-game-results article:nth-child(2n) {
    border-right: 0;
    padding: 17px;
  }

  .ticket-claim-ledger > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .ticket-claim-ledger > div:last-child { border-bottom: 0; }

  .ticket-wallet-row {
    grid-template-columns: 1fr;
  }

  .ticket-wallet-row > div:first-child {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ticket-wallet-row small { grid-column: 1 / -1; }
  .ticket-wallet-actions { justify-content: flex-end; }

  .performance-pending-banner { gap: 8px; }
  .performance-proof-grid { gap: 0; }
  .performance-proof-grid article { border-bottom: 1px solid var(--line); }
  .performance-proof-grid article:last-child { border-bottom: 0; }
}

@media (max-width: 390px) {
  .ticket-page-head h1,
  .performance-hero h1 { font-size: 27px; }

  .ticket-section-head { align-items: flex-start; }
  .ticket-section-head h2,
  .ticket-result-toolbar h2,
  .performance-section-head h2 { font-size: 20px; }

  .ticket-url-fallback form > div,
  .ticket-result-toolbar > div:last-child,
  .performance-metrics {
    grid-template-columns: 1fr;
  }

  .performance-metrics > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .performance-metrics > div:last-child { border-bottom: 0; }

  .ticket-number-row .number-ball {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
    font-size: 11px;
  }
}

/* Publication audit and compact mobile actions */
.candidate-benchmark {
  margin: -2px 0 0;
  color: #17634f;
  font-size: 11px;
  font-weight: 850;
}

.audit-principles,
.audit-history-band {
  width: min(1180px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.audit-history-band .section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: end;
}

.audit-history-band .section-title > span,
.audit-history-band .section-title > h2 {
  grid-column: 1;
}

.audit-history-band .section-title > span {
  grid-row: 1;
}

.audit-history-band .section-title > h2 {
  grid-row: 2;
}

.audit-history-band .section-title > p {
  grid-column: 2;
  grid-row: 1 / 3;
  margin: 0;
}

.audit-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.audit-principles > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3px 12px;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.audit-principles > div:last-child {
  border-right: 0;
}

.audit-principles span {
  grid-row: 1 / 3;
  color: var(--emerald-strong);
  font-size: 12px;
  font-weight: 950;
}

.audit-principles strong {
  font-size: 15px;
}

.audit-principles p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.audit-run-list {
  display: grid;
  gap: 20px;
}

.audit-run {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(18, 24, 31, 0.08);
}

.audit-run-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 24px;
  align-items: center;
  padding: 22px;
  border-bottom: 1px solid var(--line);
  background: #f7f9f6;
}

.audit-run-head > div:first-child > span {
  color: var(--emerald-strong);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.audit-run-head h3 {
  margin: 4px 0 6px;
  font-size: 25px;
}

.audit-run-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.audit-status {
  display: grid;
  gap: 3px;
  min-height: 92px;
  align-content: center;
  border-left: 4px solid #a8b5ae;
  background: #fff;
  padding: 12px 14px;
}

.audit-status.checked {
  border-left-color: var(--emerald);
}

.audit-status span,
.audit-status small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.audit-status strong {
  font-size: 18px;
}

.audit-metadata {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.audit-metadata > div {
  min-width: 0;
  padding: 13px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.audit-metadata > div:nth-child(even) {
  border-right: 0;
}

.audit-metadata > div:last-child {
  grid-column: 1 / -1;
  border-bottom: 0;
}

.audit-metadata dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.audit-metadata dd {
  min-width: 0;
  margin: 0;
  font-size: 12px;
}

.audit-metadata code {
  display: block;
  overflow-wrap: anywhere;
  color: #263f36;
  font-size: 10px;
}

.audit-combinations {
  display: grid;
}

.audit-combination-row {
  display: grid;
  grid-template-columns: 30px minmax(250px, 1fr) 170px 140px;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.audit-combination-row:last-child {
  border-bottom: 0;
}

.audit-position {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.audit-structure-score,
.audit-match {
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.audit-structure-score strong {
  color: var(--emerald-strong);
  font-size: 15px;
}

.audit-match {
  color: var(--muted);
}

.audit-match.winning {
  color: #a3312e;
}

.mobile-action-bar,
.mobile-generator-action {
  display: none;
}

@media (max-width: 760px) {
  body.with-mobile-action {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-action-bar,
  .mobile-generator-action {
    position: fixed;
    z-index: 120;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    gap: 8px;
    border-top: 1px solid #cbd7d0;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -10px 24px rgba(18, 24, 31, 0.12);
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-action-bar {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }

  .mobile-action-bar a {
    min-height: 48px;
    justify-content: center;
    margin: 0;
    text-align: center;
  }

  .mobile-generator-action {
    grid-template-columns: minmax(0, 1fr) minmax(124px, 0.72fr);
    align-items: center;
  }

  .mobile-generator-action .primary-button {
    width: 100%;
    min-height: 48px;
  }

  .mobile-generator-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .mobile-generator-summary span {
    display: grid;
    gap: 1px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    text-align: center;
  }

  .mobile-generator-summary strong {
    color: var(--ink);
    font-size: 15px;
  }

  .audit-principles {
    grid-template-columns: 1fr;
  }

  .audit-history-band .section-title {
    display: block;
  }

  .audit-history-band .section-title > h2 {
    margin-top: 5px;
    font-size: 32px;
  }

  .audit-history-band .section-title > p {
    max-width: none;
    margin-top: 12px;
  }

  .audit-principles > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .audit-principles > div:last-child {
    border-bottom: 0;
  }

  .audit-run-head {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .audit-metadata {
    grid-template-columns: 1fr;
  }

  .audit-metadata > div,
  .audit-metadata > div:nth-child(even),
  .audit-metadata > div:last-child {
    grid-column: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .audit-metadata > div:last-child {
    border-bottom: 0;
  }

  .audit-combination-row {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px 10px;
    padding: 13px 14px;
  }

  .audit-combination-row .number-balls {
    min-width: 0;
  }

  .audit-structure-score {
    grid-column: 2;
    text-align: left;
  }

  .audit-match {
    grid-column: 2;
    text-align: left;
  }
}

@media (max-width: 390px) {
  .mobile-generator-action {
    grid-template-columns: minmax(0, 1fr) 116px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .mobile-action-bar {
    padding-right: 10px;
    padding-left: 10px;
  }
}

@media (max-width: 1080px) {
  .jackpot-hero-top {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 36px;
  }

  .jackpot-copy h1 {
    font-size: 56px;
  }

  .jackpot-prize {
    border-top: 1px solid #65706f;
    border-left: 0;
    padding: 34px 0 0;
  }

  .jackpot-signal {
    grid-template-columns: 1fr;
  }

  .jackpot-signal-numbers .number-balls {
    justify-content: flex-start;
  }

  .jackpot-signal-numbers .ball {
    width: 58px;
    height: 58px;
    font-size: 20px;
  }

  .jackpot-cta {
    width: 100%;
  }

  .home-metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-metric-strip > div:nth-child(2) {
    border-right: 0;
  }

  .home-metric-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid #cfd3cc;
  }
}

@media (max-width: 1100px) {
  .site-nav {
    border-color: #2a3539;
    background: #111a1f;
  }

  .nav-more-menu {
    border-left-color: #33433e;
    background: #111a1f;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .site-nav {
    top: 68px;
    border-color: #2a3539;
    background: #111a1f;
  }

  .jackpot-hero-top {
    gap: 28px;
    padding: 38px 0 28px;
  }

  .jackpot-eyebrow {
    margin-bottom: 14px;
    font-size: 11px;
  }

  .jackpot-copy h1 {
    margin-bottom: 18px;
    font-size: 40px;
    line-height: 1.08;
  }

  .jackpot-copy > p:not(.jackpot-eyebrow) {
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 1.7;
  }

  .jackpot-prize {
    padding-top: 28px;
  }

  .jackpot-prize-label {
    margin-bottom: 10px;
    font-size: 19px;
  }

  .jackpot-prize > strong {
    font-size: 40px;
    white-space: normal;
  }

  .jackpot-prize-meta {
    margin-bottom: 16px;
    font-size: 15px;
  }

  .jackpot-prize-status {
    display: grid;
    grid-template-columns: 1fr;
  }

  .jackpot-prize-status div {
    justify-content: space-between;
  }

  .jackpot-signal {
    gap: 20px;
    padding: 22px 16px;
  }

  .jackpot-signal-title h2 {
    font-size: 22px;
  }

  .jackpot-signal-numbers .number-balls {
    justify-content: space-between;
    gap: 6px;
  }

  .jackpot-signal-numbers .ball {
    width: 42px;
    height: 42px;
    font-size: 15px;
  }

  .jackpot-cta {
    min-height: 54px;
  }

  .jackpot-trust-grid {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .jackpot-trust-grid > div,
  .jackpot-trust-grid > div:last-child {
    border-right: 0;
    border-bottom: 1px solid #243034;
    padding: 18px 4px;
  }

  .jackpot-trust-grid > div:last-child {
    border-bottom: 0;
  }

  .home-metric-strip {
    margin-bottom: 22px;
  }

  .home-metric-strip > div {
    padding: 20px 14px;
  }

  .home-metric-strip strong {
    font-size: 20px;
  }
}

@media (max-width: 390px) {
  .jackpot-copy h1 {
    font-size: 37px;
  }

  .jackpot-prize > strong {
    font-size: 36px;
  }

  .jackpot-signal-numbers .ball {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  .home-metric-strip {
    grid-template-columns: 1fr;
  }

  .home-metric-strip > div,
  .home-metric-strip > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid #cfd3cc;
  }

  .home-metric-strip > div:last-child {
    border-bottom: 0;
  }
}

/* Member weekly research desk */
.dashboard-research-callout {
  display: flex;
  width: min(1180px, 100%);
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto 12px;
  padding: 20px 24px;
  border-left: 4px solid #2f6fdb;
  background: #eef4ff;
}

.dashboard-research-callout > div {
  display: grid;
  gap: 3px;
}

.dashboard-research-callout span {
  color: #2f6fdb;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-research-callout p {
  max-width: 820px;
  margin: 2px 0 0;
  color: #58636f;
  font-size: 12px;
}

.research-hero,
.research-preset-tabs,
.research-workbench,
.research-pack,
.research-empty-pack,
.research-history,
.research-notice,
.research-page-error {
  width: min(1180px, 100%);
  margin-right: auto;
  margin-left: auto;
  scroll-margin-top: 92px;
}

.research-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  align-items: end;
  margin-bottom: 18px;
  padding: 36px;
  border-radius: 8px;
  background: #172126;
  box-shadow: var(--shadow);
  color: #fff;
}

.research-hero > div:first-child > span,
.research-section-head span,
.research-pack-head > div:first-child > span,
.research-evidence-grid header span,
.research-evidence-grid aside > span,
.research-empty-pack > span,
.research-constraint-title > span {
  color: #49b99a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.research-hero h1 {
  max-width: 720px;
  margin: 8px 0 12px;
  font-size: 39px;
  line-height: 1.16;
  letter-spacing: 0;
}

.research-hero h1 em {
  color: #ffd36b;
  font-style: normal;
}

.research-hero p {
  max-width: 730px;
  margin: 0;
  color: #c9d4d2;
}

.research-hero-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.research-hero-ledger > div {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 15px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
}

.research-hero-ledger > div:nth-child(3) {
  border-right: 0;
}

.research-hero-ledger span,
.research-hero-ledger small {
  color: #aabbb7;
  font-size: 10px;
  font-weight: 800;
}

.research-hero-ledger strong {
  overflow-wrap: anywhere;
  font-size: 18px;
}

.research-hero-ledger > small {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
}

.research-page-error {
  margin-top: 0;
  margin-bottom: 18px;
}

.research-preset-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}

.research-preset-tabs a {
  display: grid;
  min-width: 0;
  min-height: 88px;
  align-content: center;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.research-preset-tabs a:hover,
.research-preset-tabs a.active {
  border-color: #177866;
  box-shadow: inset 0 3px 0 #177866;
}

.research-preset-tabs span,
.research-preset-tabs small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.research-preset-tabs strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.research-preset-tabs .research-new-preset {
  border-style: dashed;
  background: #f5f9f7;
}

.research-workbench,
.research-pack {
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(18, 24, 31, 0.06);
}

.research-profile-form {
  margin: 0;
}

.research-section-head,
.research-pack-head {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
}

.research-section-head h2,
.research-pack-head h2,
.research-empty-pack h2 {
  margin: 4px 0 0;
  font-size: 25px;
  line-height: 1.22;
  letter-spacing: 0;
}

.research-section-head p,
.research-pack-head p {
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.research-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.research-number-column,
.research-constraint-column {
  min-width: 0;
  padding: 26px 28px 28px;
}

.research-constraint-column {
  border-left: 1px solid var(--line);
  background: #f7f9f7;
}

.research-name-field,
.research-sum-range label {
  display: grid;
  gap: 7px;
}

.research-name-field {
  margin-bottom: 20px;
}

.research-name-field span,
.research-sum-range label span {
  color: #4f5b57;
  font-size: 11px;
  font-weight: 900;
}

.research-name-field input,
.research-sum-range input {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  border: 1px solid #cfd8d3;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 9px 11px;
}

.research-strategies {
  margin-bottom: 20px;
}

.research-strategies .strategy-segments {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.research-number-picker {
  grid-template-columns: repeat(9, minmax(0, 1fr));
}

.research-number-picker button {
  aspect-ratio: 1;
  min-width: 0;
  min-height: 42px;
}

.research-number-picker button[data-state="fixed"] {
  border-color: #177866;
  background: #177866;
  box-shadow: 0 4px 12px rgba(23, 120, 102, 0.2);
  color: #fff;
}

.research-number-picker button[data-state="excluded"] {
  border-color: #cbd0d3;
  background: #e8ebed;
  color: #747d82;
  text-decoration: line-through;
}

.research-selection-ledger {
  margin-top: 15px;
}

.research-selection-ledger strong {
  overflow-wrap: anywhere;
}

.research-constraint-title {
  margin-bottom: 18px;
}

.research-constraint-title h2 {
  margin: 4px 0 6px;
  font-size: 21px;
  letter-spacing: 0;
}

.research-constraint-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.research-constraint-column .studio-control {
  margin-bottom: 15px;
}

.research-sum-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: end;
  margin: -4px 0 16px;
}

.research-sum-range[hidden] {
  display: none;
}

.research-sum-range i {
  padding-bottom: 11px;
  color: var(--muted);
  font-style: normal;
}

.research-sum-range input[readonly] {
  background: #edf2ef;
  color: #4e5c57;
}

.research-count-fieldset {
  margin: 4px 0 16px;
}

.research-condition-health {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.research-condition-health > div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.research-condition-health > div:nth-child(2n) {
  border-right: 0;
}

.research-condition-health > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.research-condition-health span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.research-condition-health strong {
  font-size: 16px;
}

.research-constraint-column .studio-message[data-tone="good"] {
  border-color: #a8d7c9;
  background: #eaf7f2;
  color: #0f5f51;
}

.research-constraint-column .studio-message[data-tone="caution"] {
  border-color: #e8c5a6;
  background: #fff5e9;
  color: #8a4b13;
}

.research-action-bar {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  background: #1f292d;
  color: #fff;
}

.research-action-bar > div:first-child {
  display: grid;
  gap: 3px;
}

.research-action-bar > div:first-child span {
  color: #afbfbc;
  font-size: 11px;
}

.research-action-bar > div:last-child {
  display: flex;
  gap: 8px;
}

.research-action-bar .secondary-button {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.research-action-bar button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.research-delete-form {
  display: flex;
  justify-content: flex-end;
  margin: 0;
  padding: 10px 28px;
  border-top: 1px solid var(--line);
  background: #fafbfa;
}

.research-delete-form button {
  border: 0;
  background: transparent;
  color: #9d403d;
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.research-pack-head {
  background: #f7f9f8;
}

.research-pack-identity {
  display: grid;
  min-width: 250px;
  gap: 4px;
  padding-left: 22px;
  border-left: 3px solid #d29a2e;
}

.research-pack-identity span,
.research-pack-identity small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.research-pack-identity strong {
  overflow-wrap: anywhere;
  font-family: Consolas, "Segoe UI", monospace;
  font-size: 17px;
}

.research-pack-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.research-pack-kpis > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}

.research-pack-kpis > div:last-child {
  border-right: 0;
}

.research-pack-kpis span,
.research-pack-kpis small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.research-pack-kpis strong {
  overflow-wrap: anywhere;
  color: #1d2925;
  font-size: 20px;
}

.research-pack-toolbar {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
}

.research-pack-toolbar > div:first-child {
  display: grid;
  gap: 3px;
}

.research-pack-toolbar > div:first-child span {
  color: var(--muted);
  font-size: 11px;
}

.research-pack-toolbar > div:last-child,
.research-pack-toolbar form {
  display: flex;
  gap: 8px;
  margin: 0;
}

.research-lines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 28px 28px;
}

.research-line {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
}

.research-line > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
}

.research-line > header span {
  color: #177866;
  font-size: 11px;
  font-weight: 900;
}

.research-line > header strong {
  font-size: 13px;
}

.research-line .number-balls {
  flex-wrap: nowrap;
  gap: 6px;
}

.research-line .ball {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  font-size: 13px;
}

.research-line-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.research-line-metrics span {
  display: grid;
  gap: 2px;
  padding: 8px 5px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.research-line-metrics span:last-child {
  border-right: 0;
}

.research-line-metrics b {
  color: var(--ink);
  font-size: 12px;
}

.research-line > p {
  margin: 12px 0 0;
  color: #59645f;
  font-size: 11px;
  line-height: 1.65;
}

.research-evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  border-top: 1px solid var(--line);
}

.research-evidence-grid > section,
.research-evidence-grid > aside {
  min-width: 0;
  padding: 26px 28px;
}

.research-evidence-grid > aside {
  border-left: 1px solid var(--line);
  background: #f4f7f6;
}

.research-evidence-grid h3 {
  margin: 4px 0 16px;
  font-size: 20px;
  letter-spacing: 0;
}

.research-findings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.research-findings > div {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  padding: 12px;
  border-left: 3px solid #8d9995;
  background: #f7f9f8;
}

.research-findings > div[data-status="good"] {
  border-left-color: #177866;
}

.research-findings > div[data-status="caution"] {
  border-left-color: #d9534f;
}

.research-findings span {
  color: #4f5c57;
  font-size: 11px;
  font-weight: 800;
}

.research-findings strong {
  font-size: 12px;
}

.research-findings small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.research-evidence-grid dl {
  margin: 0;
  border-top: 1px solid #d8dfdc;
}

.research-evidence-grid dl > div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #d8dfdc;
}

.research-evidence-grid dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.research-evidence-grid dd {
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 11px;
  font-weight: 900;
  text-align: right;
}

.research-evidence-grid aside > p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.research-empty-pack {
  margin-bottom: 24px;
  padding: 34px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f1f5f3;
}

.research-empty-pack p {
  max-width: 760px;
  margin: 9px 0 0;
  color: var(--muted);
}

.research-history {
  margin-bottom: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.research-history-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.research-history-list a {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 15px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.research-history-list a:hover,
.research-history-list a.active {
  box-shadow: inset 0 3px 0 #2f6fdb;
  background: #f6f9ff;
}

.research-history-list span,
.research-history-list small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.research-history-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.research-notice {
  margin-bottom: 28px;
}

@media (max-width: 980px) {
  .research-hero {
    grid-template-columns: 1fr;
  }

  .research-profile-grid,
  .research-evidence-grid {
    grid-template-columns: 1fr;
  }

  .research-constraint-column,
  .research-evidence-grid > aside {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .research-preset-tabs,
  .research-history-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .dashboard-research-callout {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .research-hero {
    gap: 24px;
    padding: 26px 20px;
  }

  .research-hero h1 {
    font-size: 31px;
  }

  .research-section-head,
  .research-pack-head,
  .research-pack-toolbar,
  .research-action-bar {
    align-items: flex-start;
    flex-direction: column;
    padding: 19px 17px;
  }

  .research-section-head p,
  .research-pack-head p {
    max-width: none;
    text-align: left;
  }

  .research-number-column,
  .research-constraint-column,
  .research-evidence-grid > section,
  .research-evidence-grid > aside {
    padding: 20px 16px;
  }

  .research-strategies .strategy-segments {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .research-number-picker {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }

  .research-number-picker button {
    min-height: 48px;
    aspect-ratio: auto;
  }

  .research-action-bar > div:last-child,
  .research-pack-toolbar > div:last-child {
    width: 100%;
    flex-wrap: wrap;
  }

  .research-action-bar button,
  .research-pack-toolbar button,
  .research-pack-toolbar form {
    flex: 1 1 180px;
  }

  .research-pack-toolbar form button {
    width: 100%;
  }

  .research-pack-identity {
    min-width: 0;
    width: 100%;
  }

  .research-pack-kpis,
  .research-lines,
  .research-findings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .research-pack-kpis > div:nth-child(2) {
    border-right: 0;
  }

  .research-pack-kpis > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .research-lines {
    gap: 9px;
    padding: 0 16px 20px;
  }
}

@media (max-width: 560px) {
  .research-preset-tabs,
  .research-history-list,
  .research-lines,
  .research-findings {
    grid-template-columns: 1fr;
  }

  .research-preset-tabs a {
    min-height: 74px;
  }

  .research-hero-ledger {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .research-hero-ledger strong {
    font-size: 15px;
  }

  .research-pack-kpis {
    grid-template-columns: 1fr;
  }

  .research-pack-kpis > div,
  .research-pack-kpis > div:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .research-pack-kpis > div:last-child {
    border-bottom: 0;
  }

  .research-line .number-balls {
    justify-content: space-between;
  }

  .research-line .ball {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }
}

@media (max-width: 390px) {
  .research-hero h1 {
    font-size: 27px;
  }

  .research-hero-ledger > div {
    padding: 12px 5px;
  }

  .research-number-picker button {
    min-height: 44px;
  }

  .research-line {
    padding: 14px 11px;
  }

  .research-line .ball {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    font-size: 12px;
  }
}

/* Search landing pages: number profiles and draw archive */
.profile-link-actions {
  display: grid;
  gap: 7px;
}

.profile-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  text-decoration: none;
}

.number-seo-profile,
.number-seo-details,
.number-seo-timeline,
.number-directory-band,
.draw-result-stage,
.draw-structure-panel,
.draw-detail-grid,
.draw-number-profile-band,
.draw-navigation,
.nearby-draws-band {
  width: min(1180px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.number-seo-profile,
.draw-structure-panel {
  margin-bottom: 18px;
}

.number-seo-details,
.draw-detail-grid {
  margin-bottom: 18px;
}

.number-seo-timeline,
.number-directory-band,
.draw-number-profile-band,
.nearby-draws-band {
  margin-bottom: 22px;
}

.number-partner-links > a {
  min-width: 0;
}

.number-partner-links .number-balls {
  flex: 0 0 auto;
}

.number-partner-links > a > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
  margin-left: auto;
  text-align: right;
}

.number-partner-links small {
  color: var(--muted);
  font-size: 10px;
}

.number-seo-timeline {
  padding: 21px;
}

.recent-hit-ledger a {
  border-bottom: 1px solid #aacfc3;
  color: #17634f;
  font-size: 11px;
  font-weight: 850;
  text-decoration: none;
}

.number-directory {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
}

.number-directory a {
  display: grid;
  min-width: 0;
  min-height: 58px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9f7;
  text-decoration: none;
}

.number-directory a:hover,
.number-directory a:focus-visible {
  border-color: #79aa9d;
  background: #edf6f2;
}

.number-directory a.active {
  outline: 3px solid #1d2926;
  outline-offset: 1px;
  background: #fff;
}

.number-directory .ball {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  font-size: 13px;
}

.number-seo-note,
.draw-seo-note {
  margin-bottom: 28px;
}

.history-round-link {
  display: inline-grid;
  gap: 2px;
  color: var(--ink);
  text-decoration: none;
}

.history-round-link span {
  color: var(--emerald-strong);
  font-size: 10px;
  font-weight: 800;
}

.history-round-link:hover strong,
.history-round-link:focus-visible strong {
  text-decoration: underline;
}

.draw-result-stage {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  border-left: 5px solid #f0c45d;
  background: #1f2927;
  padding: 24px;
  color: #fff;
}

.draw-result-label {
  display: block;
  margin-bottom: 12px;
  color: #a8c9bf;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.draw-winning-numbers,
.draw-winning-numbers > .number-balls,
.draw-bonus-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.draw-winning-numbers {
  flex-wrap: wrap;
}

.draw-winning-numbers > .number-balls {
  flex-wrap: wrap;
}

.draw-bonus-group {
  flex: 0 0 auto;
}

.draw-result-stage .ball {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  font-size: 15px;
}

.draw-result-stage .bonus-label {
  color: #c7d7d2;
}

.draw-result-actions {
  display: grid;
  flex: 0 0 190px;
  gap: 8px;
}

.draw-result-actions a {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  padding: 9px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}

.draw-result-actions .primary-link {
  border-color: #f0c45d;
  background: #f0c45d;
  color: #242018;
}

.draw-result-actions a:hover,
.draw-result-actions a:focus-visible {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.draw-result-actions .primary-link:hover,
.draw-result-actions .primary-link:focus-visible {
  border-color: #ffda80;
  background: #ffda80;
}

.draw-structure-panel {
  padding: 24px;
}

.draw-prize-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.draw-prize-list > div {
  display: flex;
  gap: 18px;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.draw-prize-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.draw-prize-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  font-weight: 900;
  text-align: right;
}

.draw-number-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.draw-number-links > a {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  color: var(--ink);
  text-decoration: none;
}

.draw-number-links .ball {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  font-size: 13px;
}

.draw-number-links > a > span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.draw-number-links b,
.draw-number-links small {
  overflow-wrap: anywhere;
}

.draw-number-links b {
  font-size: 12px;
}

.draw-number-links small {
  color: var(--muted);
  font-size: 9px;
}

.draw-navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  margin-bottom: 18px;
}

.draw-navigation > a {
  display: flex;
  min-width: 0;
  min-height: 54px;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 14px;
  color: var(--ink);
  text-decoration: none;
}

.draw-navigation > a:last-child {
  text-align: right;
}

.draw-navigation span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.draw-navigation .draw-history-link {
  justify-content: center;
  background: #edf5f2;
  color: #17634f;
  font-size: 12px;
  font-weight: 900;
}

.nearby-draw-links {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.nearby-draw-links a {
  display: grid;
  min-width: 0;
  gap: 3px;
  border-bottom: 2px solid #7aa99c;
  padding: 10px 4px;
  color: var(--ink);
  text-align: center;
  text-decoration: none;
}

.nearby-draw-links span {
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 760px) {
  .profile-link-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-link-actions .profile-link-button {
    grid-column: auto;
    width: 100%;
  }

  .number-directory {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .draw-result-stage {
    align-items: stretch;
    flex-direction: column;
    padding: 20px 16px;
  }

  .draw-result-actions {
    grid-template-columns: 1fr;
    flex-basis: auto;
  }

  .draw-number-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .draw-navigation {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .draw-navigation .draw-history-link {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .nearby-draw-links {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 390px) {
  .profile-link-actions {
    grid-template-columns: 1fr;
  }

  .number-directory {
    gap: 6px;
  }

  .number-directory a {
    min-height: 52px;
  }

  .number-directory .ball {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 12px;
  }

  .draw-result-stage .ball {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    font-size: 12px;
  }

  .draw-number-links {
    grid-template-columns: 1fr;
  }
}

/* Home art-direction themes */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

body.home-page {
  --home-accent: #4da58f;
  --home-accent-strong: #0d6a58;
  --home-hero-desktop: url("../img/themes/data-sculpture-desktop.webp");
  --home-hero-mobile: url("../img/themes/data-sculpture-mobile.webp");
  --home-hero-base: #222a2b;
  --home-hero-ink: #f7f7f4;
  --home-hero-muted: #d2d8d6;
  --home-hero-scrim: linear-gradient(90deg, rgba(9, 14, 15, 0.9) 0%, rgba(9, 14, 15, 0.72) 27%, rgba(9, 14, 15, 0.18) 52%, rgba(9, 14, 15, 0) 68%);
  --home-control-bg: #11181a;
  --home-control-border: rgba(255, 255, 255, 0.24);
  --home-control-ink: #f5f6f3;
  --home-header-bg: rgba(13, 18, 19, 0.96);
  --home-header-ink: #f7f6f1;
  --home-header-muted: #aeb7b4;
  --home-header-line: rgba(255, 255, 255, 0.12);
  --home-nav-active: #1b2926;
  --home-cta-bg: #0d7664;
  --home-cta-ink: #ffffff;
  --home-cta-border: #0f8872;
  --home-trust-bg: #111719;
  --home-trust-ink: #f6f5f1;
  --home-trust-muted: #aeb8b5;
  --home-trust-line: #2b3436;
  --home-signal-left: 36.5%;
  --home-signal-right: 18.5%;
  --home-signal-bottom: 13.2%;
  --home-signal-height: 64px;
  --emerald: #17836d;
  --emerald-strong: #0d6a58;
}

html[data-home-theme="precision-engine"] body.home-page {
  --home-accent: #d5a83a;
  --home-accent-strong: #8a6213;
  --home-hero-desktop: url("../img/themes/precision-engine-desktop.webp");
  --home-hero-mobile: url("../img/themes/precision-engine-mobile.webp");
  --home-hero-base: #05080a;
  --home-hero-ink: #f5f5f2;
  --home-hero-muted: #c3c8ca;
  --home-hero-scrim: linear-gradient(90deg, rgba(3, 7, 9, 0.98) 0%, rgba(3, 7, 9, 0.9) 29%, rgba(3, 7, 9, 0.2) 54%, rgba(3, 7, 9, 0) 70%);
  --home-control-bg: #101519;
  --home-control-border: #3d464b;
  --home-control-ink: #f4f3ef;
  --home-header-bg: rgba(5, 9, 12, 0.97);
  --home-header-ink: #f6f5f1;
  --home-header-muted: #aeb4b8;
  --home-header-line: #252d32;
  --home-nav-active: #20272c;
  --home-cta-bg: #d6a938;
  --home-cta-ink: #11120f;
  --home-cta-border: #e2ba55;
  --home-trust-bg: #0b1013;
  --home-trust-ink: #f4f3ef;
  --home-trust-muted: #aeb5b8;
  --home-trust-line: #283138;
  --home-signal-left: 34.6%;
  --home-signal-right: 14.8%;
  --home-signal-bottom: 29.7%;
  --home-signal-height: 68px;
  --emerald: #b88722;
  --emerald-strong: #7d5912;
  --gold: #d5a83a;
  --gold-soft: #e3bd58;
}

html[data-home-theme="platinum-gallery"] body.home-page {
  --home-accent: #0b478c;
  --home-accent-strong: #07366f;
  --home-hero-desktop: url("../img/themes/platinum-gallery-desktop.webp");
  --home-hero-mobile: url("../img/themes/platinum-gallery-mobile.webp");
  --home-hero-base: #f7f7f4;
  --home-hero-ink: #0d1114;
  --home-hero-muted: #3f4a50;
  --home-hero-scrim: linear-gradient(90deg, rgba(249, 249, 247, 0.72) 0%, rgba(249, 249, 247, 0.38) 23%, rgba(249, 249, 247, 0) 45%);
  --home-control-bg: #ffffff;
  --home-control-border: #b9c1c5;
  --home-control-ink: #11171b;
  --home-header-bg: rgba(250, 250, 248, 0.96);
  --home-header-ink: #11171b;
  --home-header-muted: #536067;
  --home-header-line: #d7dcdf;
  --home-nav-active: #e9eef2;
  --home-cta-bg: #0b407d;
  --home-cta-ink: #ffffff;
  --home-cta-border: #0e4f99;
  --home-trust-bg: #f4f4f1;
  --home-trust-ink: #11171b;
  --home-trust-muted: #5a666b;
  --home-trust-line: #d1d5d5;
  --home-signal-left: 26%;
  --home-signal-right: 10%;
  --home-signal-bottom: 43.3%;
  --home-signal-height: 78px;
  --emerald: #175ca3;
  --emerald-strong: #0b407d;
}

html[data-home-theme="vermilion-flow"] body.home-page {
  --home-accent: #df3025;
  --home-accent-strong: #a92118;
  --home-hero-desktop: url("../img/themes/vermilion-flow-desktop.webp");
  --home-hero-mobile: url("../img/themes/vermilion-flow-mobile.webp");
  --home-hero-base: #f2efea;
  --home-hero-ink: #101314;
  --home-hero-muted: #465055;
  --home-hero-scrim: linear-gradient(90deg, rgba(247, 245, 241, 0.72) 0%, rgba(247, 245, 241, 0.38) 23%, rgba(247, 245, 241, 0) 45%);
  --home-control-bg: #ffffff;
  --home-control-border: #c4c6c4;
  --home-control-ink: #121617;
  --home-header-bg: rgba(248, 247, 244, 0.97);
  --home-header-ink: #111516;
  --home-header-muted: #596164;
  --home-header-line: #d9d9d5;
  --home-nav-active: #f0e7e4;
  --home-cta-bg: #df3025;
  --home-cta-ink: #ffffff;
  --home-cta-border: #ec493e;
  --home-trust-bg: #f5f2ed;
  --home-trust-ink: #121617;
  --home-trust-muted: #606769;
  --home-trust-line: #d6d4cf;
  --home-signal-left: 20.2%;
  --home-signal-right: 11.8%;
  --home-signal-bottom: 18.7%;
  --home-signal-height: 80px;
  --emerald: #df3025;
  --emerald-strong: #a92118;
}

.home-page .site-header {
  border-bottom-color: var(--home-header-line);
  background: var(--home-header-bg);
  color: var(--home-header-ink);
}

.home-page .brand strong {
  color: var(--home-header-ink);
}

.home-page .brand small,
.home-page .site-nav a,
.home-page .nav-more summary,
.home-page .nav-form button {
  color: var(--home-header-muted);
}

.home-page .site-nav a.active,
.home-page .site-nav a:hover,
.home-page .site-nav a:focus-visible,
.home-page .nav-more summary.active,
.home-page .nav-more summary:hover,
.home-page .nav-more summary:focus-visible,
.home-page .nav-form button:hover,
.home-page .nav-form button:focus-visible {
  background: var(--home-nav-active);
  color: var(--home-header-ink);
}

.home-page .join-link {
  border-color: var(--home-accent);
  background: var(--home-accent);
  color: var(--home-cta-ink) !important;
}

.home-page .nav-toggle {
  border-color: var(--home-control-border);
  background: var(--home-control-bg);
  color: var(--home-control-ink);
}

.home-page main {
  overflow: clip;
}

.home-page .jackpot-hero {
  position: relative;
  left: 50%;
  width: 100vw;
  max-width: none;
  margin: 0 0 0 -50vw;
  overflow: visible;
  clip-path: none;
  background: var(--home-trust-bg);
  color: var(--home-trust-ink);
  box-shadow: none;
}

.jackpot-hero-stage {
  position: relative;
  isolation: isolate;
  height: min(900px, calc(100dvh - 73px));
  min-height: 680px;
  overflow: hidden;
  background-color: var(--home-hero-base);
  background-image: var(--home-hero-desktop);
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: cover;
}

.jackpot-hero-stage::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: var(--home-hero-scrim);
  content: "";
  pointer-events: none;
}

.jackpot-theme-picker {
  position: absolute;
  z-index: 4;
  top: 24px;
  right: max(24px, calc((100vw - 1328px) / 2));
  display: grid;
  grid-template-columns: auto minmax(210px, auto);
  gap: 5px 10px;
  align-items: center;
  color: var(--home-control-ink);
}

.jackpot-theme-picker > label {
  font-size: 12px;
  font-weight: 750;
}

.jackpot-theme-select {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  min-height: 46px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--home-control-border);
  border-radius: 5px;
  background: var(--home-control-bg);
  padding: 0 12px;
  box-shadow: 0 12px 28px rgba(5, 9, 11, 0.14);
}

.jackpot-theme-select > span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--home-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--home-accent) 18%, transparent);
}

.jackpot-theme-select select {
  min-width: 0;
  min-height: 44px;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.jackpot-theme-select option {
  background: var(--home-control-bg);
  color: var(--home-control-ink);
}

html[data-home-theme="data-sculpture"] .jackpot-theme-select select,
html[data-home-theme="precision-engine"] .jackpot-theme-select select {
  color-scheme: dark;
}

html[data-home-theme="platinum-gallery"] .jackpot-theme-select select,
html[data-home-theme="vermilion-flow"] .jackpot-theme-select select {
  color-scheme: light;
}

.jackpot-theme-select:focus-within {
  outline: 3px solid color-mix(in srgb, var(--home-accent) 42%, transparent);
  outline-offset: 2px;
}

.jackpot-theme-picker > small {
  grid-column: 1 / -1;
  max-width: none;
  color: var(--home-hero-muted);
  font-size: 10px;
  text-align: right;
}

.home-page .jackpot-hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(1328px, calc(100% - 48px));
  min-height: 100%;
  align-items: center;
  margin: 0 auto;
  padding: 84px 0 170px;
}

.home-page .jackpot-copy {
  width: min(680px, 46vw);
}

.home-page .jackpot-eyebrow {
  margin: 0 0 22px;
  color: var(--home-accent);
  font-size: 15px;
  font-weight: 750;
  text-transform: none;
}

.home-page .jackpot-copy h1 {
  max-width: 12ch;
  margin: 0 0 24px;
  color: var(--home-hero-ink);
  font-size: clamp(3.5rem, 4.85vw, 4.5rem);
  font-weight: 700;
  line-height: 1.24;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.home-page .jackpot-copy h1 > span {
  display: block;
  white-space: nowrap;
}

.home-page .jackpot-copy > p:not(.jackpot-eyebrow) {
  max-width: 44ch;
  margin: 0 0 30px;
  color: var(--home-hero-muted);
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  line-height: 1.72;
  text-wrap: balance;
}

.home-page .jackpot-cta {
  display: inline-flex;
  min-width: 260px;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid var(--home-cta-border);
  border-radius: 5px;
  background: var(--home-cta-bg);
  color: var(--home-cta-ink);
  padding: 0 24px;
  box-shadow: 0 16px 32px rgba(5, 11, 13, 0.18);
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
}

.home-page .jackpot-cta:hover,
.home-page .jackpot-cta:focus-visible {
  background: var(--home-cta-bg);
  color: var(--home-cta-ink);
  filter: brightness(1.08);
  transform: translateY(-2px);
}

.home-page .jackpot-cta:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--home-accent) 48%, white);
  outline-offset: 3px;
}

.home-page .jackpot-cta:active {
  filter: brightness(0.96);
  transform: translateY(1px);
}

.home-page .jackpot-signal {
  position: absolute;
  z-index: 3;
  right: var(--home-signal-right);
  bottom: var(--home-signal-bottom);
  left: var(--home-signal-left);
  display: block;
  height: var(--home-signal-height);
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  pointer-events: none;
}

.home-page .jackpot-signal-numbers,
.home-page .jackpot-signal-numbers .number-balls {
  width: 100%;
  height: 100%;
}

.home-page .jackpot-signal-numbers .number-balls {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  align-items: center;
  justify-items: center;
}

.home-page .jackpot-signal-numbers .ball {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: #f7f7f4;
  box-shadow: none !important;
  font-size: clamp(1.35rem, 2vw, 2.15rem);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.72);
}

.home-page .jackpot-signal-numbers .ball-one {
  color: #171512;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.28);
}

@media (min-width: 768px) {
  html[data-home-theme="platinum-gallery"] .home-page .jackpot-signal-numbers .ball:nth-child(1) {
    transform: translateX(0.7vw);
  }

  html[data-home-theme="platinum-gallery"] .home-page .jackpot-signal-numbers .ball:nth-child(2) {
    transform: translateX(-2.9vw);
  }

  html[data-home-theme="platinum-gallery"] .home-page .jackpot-signal-numbers .ball:nth-child(3) {
    transform: translateX(-6.1vw);
  }

  html[data-home-theme="platinum-gallery"] .home-page .jackpot-signal-numbers .ball:nth-child(4) {
    transform: translateX(-7.9vw);
  }

  html[data-home-theme="platinum-gallery"] .home-page .jackpot-signal-numbers .ball:nth-child(5) {
    transform: translateX(-6.4vw);
  }
}

.home-page .jackpot-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(1328px, calc(100% - 48px));
  margin: 0 auto;
  border-top: 0;
  background: var(--home-trust-bg);
}

.home-page .jackpot-trust-grid > div {
  min-height: 112px;
  border-color: var(--home-trust-line);
  padding: 26px 30px;
}

.home-page .jackpot-trust-grid span {
  color: var(--home-accent);
}

.home-page .jackpot-trust-grid p {
  color: var(--home-trust-muted);
  line-height: 1.55;
}

.home-page .jackpot-trust-grid strong {
  color: var(--home-trust-ink);
}

.home-page .home-metric-strip {
  width: min(1328px, 100%);
  border-bottom: 1px solid #cfd3cc;
  background: #f6f3eb;
  box-shadow: 0 0 0 100vmax #f6f3eb;
}

.home-page .home-metric-strip > div:first-child strong {
  color: var(--home-accent-strong);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-variant-numeric: tabular-nums;
}

.home-page .home-metric-strip .home-metric-notice strong {
  color: var(--home-accent-strong);
}

html[data-home-theme-transitioning] body.home-page .jackpot-hero-stage {
  animation: home-theme-settle 220ms ease-out;
}

@keyframes home-theme-settle {
  from { opacity: 0.84; }
  to { opacity: 1; }
}

@media (max-width: 1100px) {
  .home-page .site-nav,
  .home-page .nav-more-menu {
    border-color: var(--home-header-line);
    background: var(--home-control-bg);
    color: var(--home-control-ink);
  }
}

@media (max-width: 1023px) {
  .home-page .jackpot-hero-top {
    width: min(calc(100% - 40px), 840px);
  }

  .home-page .jackpot-copy {
    width: min(570px, 61vw);
  }

  .home-page .jackpot-copy h1 {
    font-size: clamp(2.85rem, 6.3vw, 3.8rem);
  }
}

@media (min-width: 768px) and (max-width: 1080px) {
  .home-page .jackpot-hero-top {
    align-items: flex-start;
    padding-top: 120px;
  }

  .home-page .jackpot-copy > p:not(.jackpot-eyebrow) {
    display: none;
  }

  .home-page .jackpot-cta {
    width: min(100%, 320px);
  }
}

@media (max-width: 767px) {
  .home-page main {
    padding-right: 16px;
    padding-left: 16px;
  }

  .home-page .jackpot-hero {
    margin-left: -50vw;
  }

  .jackpot-hero-stage {
    height: 720px;
    min-height: 720px;
    background-image: var(--home-hero-mobile);
    background-position: center bottom;
    background-size: 100% auto;
  }

  .jackpot-hero-stage::before {
    background: linear-gradient(180deg, var(--home-hero-base) 0%, color-mix(in srgb, var(--home-hero-base) 94%, transparent) 39%, transparent 61%);
  }

  .jackpot-theme-picker {
    top: 16px;
    right: 16px;
    left: 16px;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .jackpot-theme-picker > small {
    font-size: 9px;
  }

  .home-page .jackpot-hero-top {
    width: calc(100% - 32px);
    min-height: 0;
    align-items: flex-start;
    padding: 108px 0 0;
  }

  .home-page .jackpot-copy {
    width: 100%;
  }

  .home-page .jackpot-eyebrow {
    margin-bottom: 12px;
    font-size: 12px;
  }

  .home-page .jackpot-copy h1 {
    max-width: none;
    margin-bottom: 14px;
    font-size: clamp(1.72rem, 8.1vw, 2rem);
    line-height: 1.28;
    letter-spacing: 0;
  }

  .home-page .jackpot-copy > p:not(.jackpot-eyebrow) {
    max-width: 38ch;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
  }

  .home-page .jackpot-cta {
    width: min(100%, 330px);
    min-width: 0;
    min-height: 56px;
    padding: 0 20px;
    font-size: 15px;
  }

  .home-page .jackpot-signal {
    height: 40px;
  }

  .home-page .jackpot-signal-numbers .ball {
    font-size: clamp(0.95rem, 4.6vw, 1.2rem);
  }

  body.home-page {
    --home-signal-left: 15%;
    --home-signal-right: 0.5%;
    --home-signal-bottom: 12.4%;
  }

  html[data-home-theme="precision-engine"] body.home-page {
    --home-signal-left: 29.4%;
    --home-signal-right: 7.5%;
    --home-signal-bottom: 15.2%;
  }

  html[data-home-theme="platinum-gallery"] body.home-page {
    --home-signal-left: 15%;
    --home-signal-right: 8%;
    --home-signal-bottom: 24.4%;
  }

  html[data-home-theme="vermilion-flow"] body.home-page {
    --home-signal-left: 15.4%;
    --home-signal-right: 3.8%;
    --home-signal-bottom: 15.1%;
  }

  html[data-home-theme="platinum-gallery"] .home-page .jackpot-signal-numbers .ball:nth-child(2) {
    transform: translateX(-3.1vw);
  }

  html[data-home-theme="platinum-gallery"] .home-page .jackpot-signal-numbers .ball:nth-child(3) {
    transform: translateX(-6.7vw);
  }

  html[data-home-theme="platinum-gallery"] .home-page .jackpot-signal-numbers .ball:nth-child(4) {
    transform: translateX(-8.2vw);
  }

  html[data-home-theme="platinum-gallery"] .home-page .jackpot-signal-numbers .ball:nth-child(5) {
    transform: translateX(-9.5vw);
  }

  .home-page .jackpot-trust-grid {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .home-page .jackpot-trust-grid > div,
  .home-page .jackpot-trust-grid > div:last-child {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--home-trust-line);
    padding: 17px 20px;
  }

  .home-page .jackpot-trust-grid > div:last-child {
    border-bottom: 0;
  }

  .home-page .home-metric-strip {
    margin-bottom: 24px;
  }
}

@media (max-width: 390px) {
  .jackpot-hero-stage {
    height: 700px;
    min-height: 700px;
  }

  .jackpot-theme-picker {
    right: 12px;
    left: 12px;
  }

  .jackpot-theme-picker > label {
    font-size: 11px;
  }

  .jackpot-theme-select {
    min-height: 44px;
  }

  .jackpot-theme-select select {
    font-size: 12px;
  }

  .home-page .jackpot-copy h1 {
    font-size: clamp(1.65rem, 8vw, 1.92rem);
  }
}

@media (max-width: 340px) {
  body.home-page.with-mobile-action {
    padding-bottom: 0;
  }

  body.home-page .mobile-action-bar {
    position: static;
  }

  .jackpot-hero-stage {
    height: 620px;
    min-height: 620px;
  }

  .jackpot-theme-picker {
    grid-template-columns: 1fr;
  }

  .jackpot-theme-picker > label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .jackpot-theme-picker > small {
    grid-column: 1;
    text-align: left;
  }

  .home-page .jackpot-hero-top {
    padding-top: 116px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-home-theme-transitioning] body.home-page .jackpot-hero-stage {
    animation: none;
  }
}

@media (forced-colors: active) {
  .jackpot-theme-select,
  .home-page .jackpot-cta {
    border: 1px solid ButtonText;
  }

  .jackpot-theme-select > span {
    box-shadow: none;
  }
}
