:root {
  --beta-sea: #246e8a;
  --beta-deep: #123b4d;
  --beta-ink: #17323a;
  --beta-muted: #526970;
  --beta-foam: #f7fbef;
  --beta-paper: #ffffff;
  --beta-gold: #ffc857;
  --beta-coral: #d85f4c;
  --beta-green: #26735e;
  --beta-line: rgba(23, 50, 58, .18);
  --beta-shadow: 0 18px 54px rgba(18, 59, 77, .18);
}

.beta-launch {
  color: var(--beta-ink);
  background: #edf7f0;
  border-bottom: 1px solid var(--beta-line);
}

.beta-launch .kicker,
.page-kicker {
  display: inline-flex;
  padding: 6px 9px;
  border: 1px solid rgba(18, 59, 77, .24);
  border-radius: 7px;
  color: #123b4d;
  background: rgba(255, 255, 255, .72);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.beta-intro {
  max-width: 900px;
  margin-bottom: 34px;
}

.beta-intro .text {
  max-width: 790px;
}

.beta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 22px;
  align-items: start;
}

.beta-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--beta-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--beta-shadow);
}

.beta-panel h3 {
  margin: 0 0 14px;
  color: var(--beta-deep);
  font-size: 24px;
}

.beta-panel-note {
  margin: 16px 0 0;
  color: var(--beta-muted);
  font-size: 14px;
}

.beta-table-wrap {
  overflow-x: auto;
}

.beta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.beta-table th,
.beta-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--beta-line);
  text-align: left;
  vertical-align: middle;
}

.beta-table th {
  color: var(--beta-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.beta-table tr:last-child td {
  border-bottom: 0;
}

.points-cell {
  width: 72px;
  color: var(--beta-deep);
  font-size: 18px;
  font-weight: 950;
  text-align: right !important;
  white-space: nowrap;
}

.rank-cell {
  width: 46px;
  color: var(--beta-muted);
  font-weight: 900;
}

.player-name {
  font-weight: 900;
}

.prize-badge,
.excluded-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.prize-badge {
  color: #40320b;
  background: #ffe7a0;
}

.excluded-badge {
  color: #5d6570;
  background: #edf0f1;
}

.status-badge {
  color: #175543;
  background: #dff4e9;
}

.status-badge[data-status="new"],
.status-badge[data-status="needs_info"] {
  color: #6a4c09;
  background: #fff0bf;
}

.status-badge[data-status="rejected"],
.status-badge[data-status="duplicate"] {
  color: #6a3b34;
  background: #f7e7e3;
}

.beta-empty,
.beta-loading {
  margin: 0;
  padding: 18px 8px;
  color: var(--beta-muted);
  text-align: center;
}

.site-page {
  min-height: 100vh;
  margin: 0;
  color: var(--beta-ink);
  background: var(--beta-foam);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.site-page *,
.site-page *::before,
.site-page *::after {
  box-sizing: border-box;
}

.page-wrap {
  width: min(1080px, calc(100vw - 36px));
  margin: 0 auto;
}

.page-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  color: white;
  background: rgba(18, 59, 77, .96);
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(12px);
}

.page-nav-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.page-brand {
  color: #fff3b6;
  font-weight: 950;
  text-decoration: none;
  white-space: nowrap;
}

.page-nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.page-nav-links > a {
  padding: 8px 10px;
  border-radius: 6px;
  color: white;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.page-nav-links > a:hover,
.page-nav-links > a:focus-visible {
  background: rgba(255, 255, 255, .12);
  outline: none;
}

.page-lang-switch {
  display: inline-flex;
  gap: 3px;
  margin-left: 4px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 8px;
}

.page-lang-button {
  min-width: 36px;
  min-height: 30px;
  border: 0;
  border-radius: 5px;
  color: white;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
}

.page-lang-button[aria-pressed="true"] {
  color: #17211d;
  background: var(--beta-gold);
}

.page-hero {
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  color: white;
  background:
    linear-gradient(90deg, rgba(12, 53, 72, .9), rgba(12, 53, 72, .4)),
    url("seven-seas/storm-ships.png") center 44% / cover no-repeat;
}

.page-hero-copy {
  max-width: 780px;
  padding: 58px 0 48px;
}

.page-hero h1 {
  margin: 10px 0 14px;
  color: #fff3b6;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
  letter-spacing: 0;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: #fffdf2;
  font-size: 19px;
}

.page-main {
  padding: 44px 0 72px;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  gap: 22px;
  align-items: start;
}

.tool-panel {
  padding: 24px;
  border: 1px solid var(--beta-line);
  border-radius: 8px;
  background: var(--beta-paper);
  box-shadow: var(--beta-shadow);
}

.tool-panel + .tool-panel,
.page-section + .page-section {
  margin-top: 22px;
}

.tool-panel h2,
.tool-panel h3 {
  margin: 0 0 10px;
  color: var(--beta-deep);
  letter-spacing: 0;
}

.tool-panel h2 { font-size: 28px; }
.tool-panel h3 { font-size: 20px; }
.tool-panel p { color: var(--beta-muted); }

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

.field {
  min-width: 0;
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

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

.field label,
.field legend {
  color: var(--beta-deep);
  font-size: 14px;
  font-weight: 900;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(23, 50, 58, .28);
  border-radius: 6px;
  color: var(--beta-ink);
  background: white;
  font: inherit;
}

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

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--beta-sea);
  outline: 3px solid rgba(36, 110, 138, .15);
}

.field-hint {
  margin: 0;
  color: var(--beta-muted);
  font-size: 13px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--beta-line);
  border-radius: 8px;
  background: #edf3f2;
}

.segmented label {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 5px;
  color: var(--beta-muted);
  text-align: center;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.segmented label:has(input:checked) {
  color: var(--beta-deep);
  background: white;
  box-shadow: 0 2px 8px rgba(18, 59, 77, .12);
}

.form-actions,
.session-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.primary-button,
.secondary-button,
.text-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  font: inherit;
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  color: #17211d;
  background: var(--beta-gold);
  box-shadow: 0 10px 24px rgba(18, 59, 77, .16);
}

.secondary-button {
  color: white;
  background: var(--beta-sea);
}

.text-button {
  min-height: 38px;
  padding: 0 10px;
  color: var(--beta-sea);
  background: transparent;
  border-color: var(--beta-line);
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: .58;
  cursor: wait;
}

.form-message {
  display: none;
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 4px solid var(--beta-sea);
  color: var(--beta-deep);
  background: #e9f5f4;
}

.form-message.is-visible { display: block; }
.form-message.is-error {
  border-left-color: var(--beta-coral);
  color: #6a3027;
  background: #faece8;
}

.session-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--beta-muted);
  font-size: 14px;
}

.session-summary strong { color: var(--beta-deep); }

.rules-list {
  margin: 0;
  padding-left: 20px;
  color: var(--beta-muted);
}

.rules-list li + li { margin-top: 8px; }

.tester-layout {
  display: grid;
  grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr);
  gap: 28px;
  align-items: start;
}

.tester-info {
  padding: 8px 4px;
}

.tester-info h2 {
  margin: 0 0 14px;
  color: var(--beta-deep);
  font-size: 30px;
  letter-spacing: 0;
}

.tester-info p {
  color: var(--beta-muted);
  line-height: 1.65;
}

.tester-notice {
  padding: 14px 16px;
  border-left: 4px solid var(--beta-gold);
  background: #fff8df;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin-top: 2px;
}

.honeypot-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.leaderboard-page-panel {
  padding: 0;
  overflow: hidden;
}

.leaderboard-page-panel .beta-table th,
.leaderboard-page-panel .beta-table td {
  padding: 15px 18px;
}

.leaderboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--beta-line);
}

.leaderboard-toolbar h2 { margin: 0; }

.page-footer {
  padding: 28px 0 36px;
  color: var(--beta-muted);
  background: #edf6ee;
  border-top: 1px solid var(--beta-line);
}

.page-footer .page-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

[hidden] { display: none !important; }

@media (max-width: 820px) {
  .beta-grid,
  .page-grid,
  .tester-layout {
    grid-template-columns: 1fr;
  }

  .page-nav-inner {
    align-items: flex-start;
    padding: 12px 0;
  }

  .page-nav-links { flex-wrap: wrap; }
}

@media (max-width: 580px) {
  .page-wrap { width: min(100% - 24px, 1080px); }
  .page-brand { white-space: normal; }
  .page-nav-links > a { display: none; }
  .field-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .tool-panel { padding: 18px; }
  .primary-button,
  .secondary-button { width: 100%; }
  .leaderboard-page-panel .beta-table th,
  .leaderboard-page-panel .beta-table td { padding: 12px 10px; }
  .hide-mobile { display: none; }

  #my-reports-body {
    display: grid;
    gap: 10px;
  }

  #my-reports-body tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 4px;
    border-bottom: 1px solid var(--beta-line);
  }

  #my-reports-body tr:last-child { border-bottom: 0; }

  #my-reports-body td {
    min-width: 0;
    padding: 3px 6px;
    border: 0;
    overflow-wrap: anywhere;
  }

  #my-reports-body td:nth-child(1),
  #my-reports-body td:nth-child(2) { grid-column: 1; }
  #my-reports-body td:nth-child(3) { grid-column: 2; grid-row: 1; }
  #my-reports-body td:nth-child(4) { grid-column: 2; grid-row: 2; }
  #my-reports-body td:nth-child(5) { grid-column: 1 / -1; }
}
