:root {
  --black: #252525;
  --brand-green: #00884f;
  --dark-green: #006b42;
  --light-green: #8bbf9f;
  --grey-page: #f4f4f4;
  --slip-grey: #e7e7e7;
  --tab-grey: #d9d9d9;
  --line: #d3d3d3;
  --white: #ffffff;
  --text: #0e1411;
  --muted: #6f7773;
  --red: #e30613;
  --yellow: #ffe500;
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--grey-page);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.35;
}

a {
  color: #005eb8;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.site-top {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  align-items: stretch;
  max-width: 1250px;
  min-height: 104px;
  margin: 0 auto;
  background: var(--white);
}

.lotto-mark {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 104px;
  color: var(--red);
  background: var(--yellow);
}

.lotto-mark strong {
  font-size: 29px;
  line-height: 1;
}

.lotto-mark span {
  width: 100%;
  margin-top: 8px;
  padding: 4px 0;
  color: var(--white);
  background: var(--brand-green);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
}

.main-nav {
  display: flex;
  align-self: end;
}

.main-nav a,
.login-link {
  display: inline-flex;
  align-items: center;
  min-width: 140px;
  min-height: 50px;
  padding: 0 28px;
  color: var(--text);
  border-left: 1px solid var(--line);
  font-weight: 700;
}

.login-link {
  align-self: end;
  justify-content: center;
  border-right: 1px solid var(--line);
}

.toto-hero {
  max-width: 1250px;
  margin: 0 auto;
  color: var(--white);
  background: linear-gradient(90deg, #006539, #00965b);
}

.toto-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100px;
  padding: 18px 76px 18px 490px;
}

.toto-logo {
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

.toto-logo span {
  display: inline-block;
  margin-left: 8px;
  font-size: 26px;
  line-height: 1;
}

.jackpot {
  display: grid;
  justify-items: end;
}

.jackpot span {
  font-size: 15px;
}

.jackpot strong {
  font-size: 46px;
  line-height: 1;
}

.jackpot small {
  font-size: 13px;
}

.toto-shell {
  max-width: 1250px;
  margin: 0 auto;
  padding-bottom: 58px;
  background: var(--grey-page);
}

.breadcrumb {
  margin: 0;
  padding: 12px 30px 28px;
  color: #1a2630;
  font-size: 12px;
  text-transform: uppercase;
}

.toto-layout {
  display: grid;
  grid-template-columns: 70px minmax(0, 1010px);
  justify-content: center;
  align-items: start;
}

.product-rail {
  display: grid;
  width: 70px;
  margin-top: 50px;
}

.product-rail span {
  display: grid;
  place-items: center;
  min-height: 70px;
  padding: 6px;
  color: var(--white);
  background: #a8a8a8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.product-rail span:nth-child(1) {
  color: #e30613;
  background: #fff26a;
}

.product-rail span:nth-child(2) {
  background: #bdbdbd;
}

.product-rail span:nth-child(3) {
  background: #c27eb3;
}

.product-rail span:nth-child(4) {
  background: #a8dc8e;
}

.product-rail .product-rail__active {
  background: var(--brand-green);
}

.toto-module {
  width: 100%;
}

.toto-tabs {
  display: grid;
  grid-template-columns: repeat(3, 168px) 1fr;
  min-height: 51px;
  background: var(--tab-grey);
}

.toto-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 51px;
  color: var(--text);
  background: var(--tab-grey);
  border-right: 1px solid var(--white);
  font-size: 16px;
  text-transform: uppercase;
}

.toto-tab--active {
  color: var(--brand-green);
  background: var(--white);
  font-weight: 700;
}

.toto-slip {
  background: var(--slip-grey);
  padding: 20px 46px 40px;
}

.toto-slip__head {
  display: grid;
  grid-template-columns: 52px 1fr 52px 42px;
  align-items: center;
  gap: 10px;
  padding: 0 0 22px;
  text-align: center;
}

.toto-kicker {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.toto-slip h1 {
  margin: 0;
  font-size: 25px;
  letter-spacing: 0;
}

.round-nav {
  border: 0;
  color: #6ab185;
  background: transparent;
  font-size: 54px;
  line-height: 1;
  cursor: pointer;
}

.toto-info {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  justify-self: end;
  color: #777;
  border: 2px solid #888;
  border-radius: 50%;
  font-weight: 700;
}

.round-strip {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.round-tabs {
  display: flex;
  gap: 0;
  background: var(--white);
}

.round-tab {
  min-width: 132px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-left: 0;
  background: var(--white);
  cursor: pointer;
}

.round-tab:first-child {
  border-left: 1px solid var(--line);
}

.round-tab[aria-selected="true"] {
  position: relative;
  color: var(--red);
  border: 2px solid var(--red);
  font-weight: 700;
}

.round-tab[aria-disabled="true"] {
  color: var(--muted);
  background: #f3f3f3;
}

.toto-form {
  margin: 0;
}

.selected-round {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  max-width: 920px;
  margin: 0 auto 10px;
}

.selected-round span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.selected-round strong {
  font-size: 17px;
}

.toto-legend {
  max-width: 920px;
  margin: 0 auto 10px;
  color: #40504a;
  text-align: right;
  font-size: 14px;
  font-weight: 800;
}

.round-status {
  display: grid;
  gap: 6px;
  max-width: 920px;
  margin: 0 auto 14px;
  padding: 14px 16px;
  color: #171717;
  background: var(--yellow);
  border: 2px solid var(--red);
  border-left-width: 8px;
  border-radius: 5px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.08);
}

.round-status[hidden] {
  display: none;
}

.round-status strong {
  font-size: 17px;
  line-height: 1.2;
}

.round-status span {
  font-size: 13px;
}

.matches {
  display: grid;
  gap: 10px;
  max-width: 920px;
  margin: 0 auto;
}

.toto-row {
  display: grid;
  grid-template-columns: 36px minmax(150px, 1fr) 22px minmax(150px, 1fr) 112px 128px 70px;
  align-items: center;
  min-height: 50px;
  overflow: hidden;
  background: var(--white);
  border-radius: 5px;
}

.toto-row > * {
  min-width: 0;
}

.match-number {
  display: grid;
  place-items: center;
  align-self: stretch;
  color: var(--white);
  background: var(--brand-green);
  font-weight: 700;
}

.team {
  min-width: 0;
  padding: 0 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.team--away {
  text-align: right;
}

.match-separator {
  text-align: center;
  font-weight: 700;
}

.trend {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 8px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  font-size: 12px;
}

.tip-buttons {
  display: flex;
  gap: 5px;
  justify-content: center;
}

.tip-choice {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 35px;
  height: 35px;
  color: #000;
  background: var(--white);
  border: 1px solid #888;
  border-radius: 3px;
  cursor: pointer;
}

.tip-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tip-choice span {
  font-size: 16px;
}

.tip-choice:has(input:checked) {
  color: var(--white);
  background: var(--brand-green);
  border-color: var(--brand-green);
}

.tip-choice:has(input:disabled) {
  cursor: not-allowed;
  color: #777;
  background: #f3f3f3;
  border-color: #c8c8c8;
}

.tip-choice:has(input:checked:disabled) {
  color: var(--white);
  background: var(--brand-green);
  border-color: var(--brand-green);
}

.expert-tip {
  align-self: stretch;
  display: grid;
  place-items: center;
  gap: 2px;
  min-width: 0;
  padding: 6px 8px;
  border-left: 1px solid var(--line);
}

.expert-tip span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.expert-tip strong {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--white);
  background: #06345d;
  border-radius: 5px;
  font-size: 15px;
}

.expert-tip--empty strong {
  color: var(--muted);
  background: #eef2f4;
}

.selection-count {
  max-width: 920px;
  margin: 24px auto 20px;
  font-size: 16px;
}

.selection-count strong {
  color: var(--red);
  font-weight: 400;
}

.participant-panel {
  max-width: 920px;
  margin: 0 auto 24px;
  padding-top: 16px;
  border-top: 2px solid var(--white);
}

.participant-panel h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

.field {
  display: grid;
  gap: 5px;
}

.field label,
.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  color: var(--text);
  background: var(--white);
  border: 1px solid #bcbcbc;
  border-radius: 3px;
}

.field textarea {
  min-height: 82px;
  resize: vertical;
}

.field--wide {
  grid-column: 1 / -1;
}

.checks {
  display: grid;
  gap: 9px;
  margin: 16px 0 0;
}

.participant-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: start;
  font-size: 13px;
}

.check input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.toto-summary {
  display: flex;
  justify-content: flex-end;
  align-items: end;
  max-width: 920px;
  margin: 0 auto;
}

.captcha-panel {
  max-width: 920px;
  margin: 0 auto 18px;
  overflow: hidden;
}

.captcha-panel .cf-turnstile,
.captcha-panel .frc-captcha {
  width: min(100%, 320px);
}

.toto-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.toto-summary strong {
  font-size: 17px;
}

.primary-action {
  width: min(336px, 100%);
  min-height: 50px;
  color: var(--white);
  background: var(--brand-green);
  border: 0;
  border-radius: 4px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.14);
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}

.primary-action:hover {
  background: var(--dark-green);
}

.primary-action:focus-visible {
  outline: 3px solid rgba(0, 136, 79, 0.28);
  outline-offset: 2px;
}

.primary-action:disabled {
  cursor: not-allowed;
  background: #82b595;
  box-shadow: none;
  opacity: 0.75;
}

.message {
  max-width: 920px;
  margin: 16px auto 0;
  padding: 14px 16px;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 15px;
  font-weight: 700;
}

.message:empty,
.message[hidden] {
  display: none;
}

.message--success {
  border-color: var(--brand-green);
  border-left: 8px solid var(--brand-green);
  background: #d4f0df;
  color: #00462d;
}

.message--error {
  border-color: #efbdc5;
  background: #fff0f2;
  color: #7a1725;
}

.message--info {
  border-color: #c9dde4;
  background: #edf7fa;
  color: #174f5f;
}

.embed-page {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: transparent;
}

.embed-page .toto-module {
  min-width: 0;
  max-width: 1010px;
  margin: 0 auto;
}

.embed-page .toto-slip {
  min-width: 0;
  padding-top: 24px;
}

.admin-page {
  background: #f4f6f3;
}

.admin-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 80px;
}

.admin-login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.admin-login-card h1 {
  margin: 0;
  font-size: 30px;
}

.admin-stats,
.stat-card,
.matchday-editor {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.section-head,
.editor-title,
.matchday-editor__head,
.sticky-actions,
.admin-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-head h1,
.section-head h2,
.editor-title h2 {
  margin: 0;
  letter-spacing: 0;
}

.section-head h2,
.section-head h1 {
  font-size: 34px;
}

.eyebrow,
.meta-label {
  display: block;
  margin: 0 0 6px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-link,
.secondary-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 4px;
  padding: 9px 14px;
  color: #063f34;
  background: #eef7f2;
  border: 1px solid #c8ded4;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.inline-form {
  display: inline;
  margin: 0;
}

.danger-action {
  color: #8f1018;
  border-color: #efbdc5;
  background: #fff0f2;
}

.admin-stats {
  margin: 22px 0;
  padding: 18px;
}

.admin-stats strong,
.stat-card strong {
  display: block;
  font-size: 22px;
}

.export-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.stat-card {
  padding: 14px;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.ranking-section {
  margin: 22px 0;
}

.participants-section {
  margin: 22px 0;
}

.ranking-table {
  display: grid;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
}

.ranking-row {
  display: grid;
  grid-template-columns: 70px minmax(130px, 0.9fr) minmax(170px, 1.1fr) minmax(220px, 1.3fr) 90px 90px;
  gap: 10px;
  align-items: center;
  min-width: 940px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.ranking-row:first-child {
  border-top: 0;
}

.ranking-row--head {
  color: var(--muted);
  background: #fbfcfa;
  font-size: 13px;
  font-weight: 900;
}

.participants-table {
  display: grid;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--white);
}

.participants-row {
  display: grid;
  grid-template-columns: 150px minmax(130px, 0.8fr) minmax(170px, 1fr) minmax(220px, 1.2fr) 130px 70px 100px;
  gap: 10px;
  align-items: center;
  min-width: 1040px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.participants-row:first-child {
  border-top: 0;
}

.participants-row--head {
  color: var(--muted);
  background: #fbfcfa;
  font-size: 13px;
  font-weight: 900;
}

.editor-section {
  margin: 18px 0;
}

.editor-title {
  margin-bottom: 16px;
}

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

.matchday-editor {
  padding: 18px;
  margin: 14px 0;
}

.matchday-editor__head {
  margin-bottom: 14px;
}

.pairings {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.pairing-row,
.pairing-row--result {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr 1.1fr 0.9fr 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  background: #fbfcfa;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  padding: 14px 0;
  background: linear-gradient(rgba(244, 246, 243, 0.86), #f4f6f3 38%);
}

@media (max-width: 950px) {
  .site-top {
    grid-template-columns: 100px 1fr;
  }

  .login-link {
    display: none;
  }

  .toto-hero__inner {
    padding: 18px 24px;
  }

  .toto-layout {
    grid-template-columns: 1fr;
  }

  .product-rail {
    display: none;
  }

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

  .toto-slip {
    padding: 18px 14px 30px;
  }

  .toto-row {
    grid-template-columns: 36px minmax(90px, 1fr) 22px minmax(90px, 1fr) 142px 70px;
    row-gap: 8px;
    padding-right: 8px;
  }

  .trend {
    grid-column: 2 / 5;
    border-left: 0;
    padding: 0 16px 10px;
  }

  .tip-buttons {
    grid-column: 5;
    grid-row: 1 / span 2;
  }

  .expert-tip {
    grid-column: 6;
    grid-row: 1 / span 2;
    padding: 6px 4px;
    border-left: 1px solid var(--line);
  }

  .participant,
  .editor-grid,
  .stats-grid,
  .pairing-row,
  .pairing-row--result {
    grid-template-columns: 1fr;
  }

  .main-nav a {
    min-width: auto;
    padding: 0 16px;
  }

  .section-head,
  .editor-title,
  .matchday-editor__head,
  .sticky-actions,
  .admin-stats {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .embed-page {
    background: transparent;
  }

  .embed-page .toto-module {
    max-width: none;
  }

  .embed-page .toto-slip,
  .toto-slip {
    padding: 14px 10px 24px;
  }

  .toto-slip__head {
    grid-template-columns: 40px 1fr 40px;
    gap: 4px;
    padding-bottom: 14px;
  }

  .toto-slip__head .toto-info {
    display: none;
  }

  .round-nav {
    font-size: 40px;
  }

  .toto-slip h1 {
    font-size: 21px;
  }

  .round-strip {
    justify-content: stretch;
    overflow-x: auto;
    margin: 0 -4px 14px;
    padding-bottom: 2px;
  }

  .round-tabs {
    min-width: 100%;
  }

  .round-tab {
    flex: 1 0 auto;
    min-width: 108px;
    min-height: 42px;
    white-space: nowrap;
  }

  .selected-round {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
  }

  .toto-legend {
    text-align: left;
    font-size: 13px;
  }

  .round-status {
    margin-bottom: 12px;
    padding: 12px;
    border-left-width: 6px;
  }

  .round-status strong {
    font-size: 16px;
  }

  .matches {
    gap: 12px;
  }

  .toto-row {
    grid-template-columns: 34px 1fr;
    align-items: start;
    min-height: 0;
    padding: 0;
    border-radius: 6px;
  }

  .match-number {
    grid-row: 1 / span 5;
    min-height: 100%;
  }

  .team {
    padding: 10px 12px 0;
    text-align: left;
  }

  .team--away {
    padding-top: 2px;
    text-align: left;
  }

  .match-separator {
    display: none;
  }

  .trend {
    grid-column: 2;
    padding: 2px 12px 8px;
    border-left: 0;
    font-size: 11px;
  }

  .tip-buttons {
    grid-column: 2;
    grid-row: auto;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 12px 8px;
  }

  .tip-choice {
    width: 44px;
    height: 40px;
  }

  .expert-tip {
    grid-column: 2;
    display: inline-flex;
    justify-content: flex-start;
    justify-self: start;
    align-self: start;
    gap: 8px;
    padding: 0 12px 12px;
    border-left: 0;
  }

  .expert-tip span {
    align-self: center;
  }

  .expert-tip strong {
    width: 44px;
    height: 40px;
  }

  .selection-count {
    margin: 18px auto 16px;
  }

  .participant-panel {
    padding-top: 14px;
  }

  .participant-panel h2 {
    font-size: 17px;
  }

  .checks {
    gap: 12px;
  }

  .check {
    grid-template-columns: 24px 1fr;
    font-size: 13px;
  }

  .toto-summary {
    justify-content: stretch;
  }

  .primary-action {
    width: 100%;
  }

  .admin-shell {
    width: min(100% - 20px, 1100px);
    padding-top: 22px;
  }

  .section-head h1,
  .section-head h2 {
    font-size: 28px;
  }
}
