/* Summit visual layer. All rules here follow SUMMIT-BRAND.md:
   monochrome ink-on-paper before the reveal, green or clay at the reveal,
   and nowhere else. The palette is defined once below — no raw hex past it. */

:root {
  --ink: #16181c;
  --graphite: #5f5e5a;
  --slate: #d3d1c7;
  --paper: #f1efe8;
  --correct: #1d9e75;
  --missed: #d85a30;
}

/* Self-hosted fonts — no CDN fetch at runtime (see SUMMIT-BRAND.md). */
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  /* stack the app and the footer, both centered at the same column width */
  flex-direction: column;
  align-items: center;
  font-family: "Inter", system-ui, sans-serif;
  /* tabular numerals everywhere so counters and countdowns don't jitter */
  font-variant-numeric: tabular-nums;
  background: var(--paper);
  color: var(--ink);
  padding: 48px 24px 24px;
}

#app {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* a quiet support link at the foot of every view — same column width as #app */
.page-footer {
  width: 100%;
  max-width: 420px;
  margin-top: 40px;
  text-align: center;
}

.page-footer a {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--graphite);
  text-decoration: none;
}

.page-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ---- header: wordmark left, altitude right, one quiet ridge line below ---- */

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wordmark {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 48px;
  letter-spacing: -0.02em;
  margin: 0;
}

/* the period is the one permanent spot of color in the interface */
.wordmark-dot {
  color: var(--correct);
}

/* the single allowed contour-line accent — a thin ridge under the header */
.ridge {
  display: block;
  width: 100%;
  height: 12px;
  margin-top: 10px;
  color: var(--slate);
}

/* ---- the streak, as altitude: number + slim vertical gauge ---- */

.altitude {
  display: flex;
  align-items: center;
  gap: 10px;
}

.altitude-readout {
  text-align: right;
}

.altitude-num {
  display: block;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
}

.altitude-label {
  display: block;
  font-size: 11px;
  color: var(--graphite);
  letter-spacing: 0.02em;
}

.gauge {
  position: relative;
  width: 3px;
  height: 40px;
  background: var(--slate);
  border-radius: 2px;
}

.gauge-fill {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
}

/* base camp: a short horizontal tick at the foot of the gauge */
.gauge-base {
  position: absolute;
  bottom: -1px;
  left: -3px;
  width: 9px;
  height: 2px;
  background: var(--graphite);
}

/* a pick is in but not yet revealed — a graphite marker holds the next step */
.gauge-pending {
  position: absolute;
  left: -1px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--graphite);
  animation: pending-pulse 1.6s ease-in-out infinite;
}

@keyframes pending-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* reveal morning only: the gauge is allowed its verdict color */
.altitude.correct .gauge-fill {
  background: var(--correct);
}

.altitude.missed .gauge-base {
  background: var(--missed);
}

/* ---- the one-off notice: a short announcement over the game ----
   Strictly monochrome. The game underneath is in its open state, and color
   is only ever the reveal (SUMMIT-BRAND.md). No animation — it appears, it
   says its piece, it goes away. */

.notice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  /* the page dimmed behind the card, mixed from the palette so no raw
     hex creeps in past :root */
  background: color-mix(in srgb, var(--ink) 42%, transparent);
}

.notice {
  width: 100%;
  max-width: 380px;
  background: var(--paper);
  border: 1px solid var(--slate);
  border-radius: 6px;
  padding: 24px;
}

/* focused programmatically when it opens — no ring for that, the card
   arriving is cue enough */
.notice:focus {
  outline: none;
}

.notice-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 10px;
}

.notice-body {
  font-size: 15px;
  line-height: 1.5;
  color: var(--graphite);
  margin: 0 0 20px;
}

.notice-ok {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  padding: 11px 16px;
  border-radius: 4px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.notice-ok:hover {
  background: var(--graphite);
  border-color: var(--graphite);
}

.notice-ok:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ---- cards ---- */

/* The prior day's reveal card fades out at noon ET, then is removed. */
#prior-slot {
  transition: opacity 1s ease;
}

#prior-slot.fading {
  opacity: 0;
}

.card {
  border: 1px solid var(--slate);
  border-radius: 6px;
  padding: 24px;
}

.event {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--graphite);
  margin: 0 0 10px;
}

/* question + optional note; the group owns the gap before the options */
.question-group {
  margin: 0 0 20px;
}

.question {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
}

/* a clarification under the question, matching the eyebrow's type (Inter,
   uppercase, letter-spaced) and set off by a thin rule (the contour-line motif) */
.question-note {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.4;
  color: var(--graphite);
  margin: 8px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--slate);
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  font-weight: 500;
  padding: 14px 16px;
  border-radius: 4px;
  border: 1px solid var(--slate);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.option:not(.locked):hover {
  border-color: var(--graphite);
}

/* the chosen option is strong but strictly monochrome before the reveal */
.option.selected {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.option.locked {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--graphite);
  cursor: default;
}

.option.locked.picked {
  color: var(--ink);
  border-color: var(--ink);
}

/* the locked-state badge at the top of the card — monochrome, like
   everything before the reveal. A quiet pill, not a warning. */
.locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--graphite);
  border: 1px solid var(--slate);
  border-radius: 999px;
  padding: 4px 10px;
  margin: 0 0 14px;
}

.lock-check {
  font-weight: 600;
}

.lock-icon {
  color: var(--graphite);
  flex-shrink: 0;
}

/* reveal state — the only place green and clay exist */
.option.locked.right {
  color: var(--correct);
  border-color: var(--correct);
}

.option.locked.wrong {
  color: var(--missed);
  border-color: var(--missed);
}

.reveal-mark {
  font-weight: 700; /* color comes from the parent option's green or clay */
}

.save-note {
  font-size: 14px;
  color: var(--graphite);
  margin: 12px 0 0;
  min-height: 17px; /* reserve the line so the card doesn't jump on first pick */
}

.deadline {
  font-size: 14px;
  color: var(--graphite);
  margin: 6px 0 0;
}

.locked-note {
  font-size: 14px;
  color: var(--graphite);
  margin: 12px 0 0;
}

/* crowd split on the locked screen — monochrome, like everything before
   the reveal. A quiet "where the crowd leans" readout, never a color cue. */
.crowd {
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--slate);
}

.crowd-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--graphite);
  margin: 0 0 10px;
}

.crowd-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 0;
}

.crowd-label {
  flex: 0 0 40%;
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crowd-track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--slate);
  overflow: hidden;
}

.crowd-fill {
  display: block;
  height: 100%;
  background: var(--graphite);
}

.crowd-pct {
  flex: 0 0 auto;
  min-width: 34px;
  text-align: right;
  font-size: 13px;
  color: var(--graphite);
  font-variant-numeric: tabular-nums;
}

/* the hero of the reveal: the answer, above and larger than any verdict.
   Sized for sentence-length results as well as bare numbers, so it stays
   the biggest thing on the card without shouting. */
/* small label above the outcome — the reveal's one masthead touch */
.result-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--graphite);
  margin: 0 0 2px;
}

/* the outcome is the hero: Instrument Serif, large, colored at the reveal
   (green right / clay miss / ink when there was no pick) */
.actual {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 48px;
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0 0 16px;
}

.actual.right {
  color: var(--correct);
}

.actual.wrong {
  color: var(--missed);
}

/* the personal crowd-split line + bar, tinted by outcome. Empty (no line,
   no space) until fillRevealSplit decides there's a real split to show. */
.reveal-split:empty {
  display: none;
}

.reveal-split-line {
  font-size: 14px;
  color: var(--graphite);
  margin: 0 0 8px;
}

.reveal-split-line strong {
  color: var(--ink);
  font-weight: 600;
}

.reveal-split-track {
  display: block;
  height: 8px;
  border-radius: 99px;
  background: var(--slate);
  overflow: hidden;
  margin: 0 0 18px;
}

.reveal-split-fill {
  display: block;
  height: 100%;
}

.reveal-split-fill.right {
  background: var(--correct);
}

.reveal-split-fill.wrong {
  background: var(--missed);
}

.verdict {
  font-size: 16px;
  margin: 12px 0 0;
}

.streak-line {
  font-size: 14px;
  color: var(--graphite);
  margin: 8px 0 0;
}

#status {
  text-align: center;
  color: var(--graphite);
  font-size: 15px;
}

/* ---- view nav + leaderboard: monochrome, like everything pre-reveal ---- */

.viewnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* signed-in identity in the nav: avatar + handle, with a tucked-away
   sign-out. Monochrome, like everything before a reveal. */
.nav-identity {
  position: relative; /* anchors the dropdown menu */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0; /* let a long handle truncate instead of shoving the link */
}

.nav-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-family: inherit;
  color: var(--graphite);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.nav-account:hover {
  color: var(--ink);
}

.peak-avatar {
  flex-shrink: 0;
  color: var(--graphite);
}

.nav-handle {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* a small chevron by the handle; rotates when the menu is open */
.nav-caret {
  flex-shrink: 0;
  color: var(--graphite);
  transition: transform 0.15s ease;
}

.nav-account[aria-expanded="true"] .nav-caret {
  transform: rotate(180deg);
}

/* the account dropdown — holds the name + icon editor and the actions */
.nav-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 244px;
  max-width: 78vw;
  background: var(--paper);
  border: 1px solid var(--slate);
  border-radius: 6px;
  padding: 4px;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--ink) 12%, transparent);
  z-index: 50;
}

.nav-menu[hidden] {
  display: none;
}

.nav-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 8px 10px;
  cursor: pointer;
}

.nav-menu-item:hover {
  background: var(--slate);
}

/* ---- the name + icon editor (its own page, reached from the account
   menu). The .nav-* class names are kept because these controls started
   life in the dropdown; the styles are unscoped, so they render the same
   on the page. ---- */

.account-editor {
  margin-top: 4px;
}

.nav-menu-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--graphite);
  margin: 0 0 6px;
}

.nav-id-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.nav-id-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--slate);
  border-radius: 6px;
  background: transparent;
  color: var(--graphite);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.nav-id-icon:hover {
  border-color: var(--graphite);
  color: var(--ink);
}

.nav-id-icon.on {
  border-color: var(--ink);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.nav-id-icon:focus-visible {
  outline: 1px solid var(--graphite);
  outline-offset: 2px;
}

.nav-name-row {
  display: flex;
  gap: 6px;
}

.nav-name-input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--slate);
  border-radius: 4px;
  padding: 7px 9px;
}

.nav-name-input:focus {
  outline: none;
  border-color: var(--graphite);
}

.nav-name-save {
  flex: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 0 12px;
  border-radius: 4px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}

.nav-name-save:hover {
  background: var(--graphite);
  border-color: var(--graphite);
}

.nav-name-msg {
  font-size: 12px;
  color: var(--graphite);
  margin: 6px 0 0;
  min-height: 1.1em;
}

/* the leaderboard link — a true outlined button, the prominent action in
   the nav. Fills with ink on hover (like the "Send link" button), which
   reads as a button without the text shifting the border. Monochrome. */
.nav-link {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--slate);
  border-radius: 6px;
  padding: 7px 16px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.board-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 26px;
  margin: 4px 0 16px;
}

/* Current / All-time switch: a small monochrome segmented control */
.board-toggle {
  display: inline-flex;
  gap: 2px;
  margin: 0 0 18px;
  padding: 2px;
  border: 1px solid var(--slate);
  border-radius: 999px;
}

.board-tab {
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--graphite);
  background: transparent;
  border: none;
  padding: 5px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.board-tab:hover {
  color: var(--ink);
}

/* the selected board — ink fill, the page background as the text color */
.board-tab.on {
  color: var(--paper);
  background: var(--ink);
}

.board {
  list-style: none;
  margin: 0;
  padding: 0;
}

.board-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--slate);
}

.board-row:last-child {
  border-bottom: none;
}

.board-rank {
  width: 22px;
  text-align: right;
  font-size: 14px;
  color: var(--graphite);
}

/* each player's chosen icon, between the rank and the handle. Monochrome
   like the rest of the board — it inherits the row's ink. */
.board-icon {
  display: inline-flex;
  align-items: center;
  flex: none;
  color: var(--graphite);
}

.board-row.me .board-icon {
  color: var(--ink);
}

.board-handle {
  flex: 1;
  font-size: 16px;
  color: var(--ink);
}

.board-you {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--graphite);
  margin-left: 6px;
}

.board-alt {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
}

.board-alt-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--graphite);
}

/* the player's own row — monochrome emphasis, never a color fill */
.board-row.me {
  border-left: 2px solid var(--ink);
  padding-left: 8px;
}

.board-row.me .board-handle {
  font-weight: 600;
}

.board-note {
  font-size: 15px;
  color: var(--graphite);
  line-height: 1.5;
  margin: 0;
}

/* offered when the board fails to load, so that isn't a dead end */
.board-retry {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  margin-top: 14px;
  padding: 9px 16px;
  border-radius: 4px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.board-retry:hover {
  background: var(--ink);
  color: var(--paper);
}

.board-retry:focus-visible {
  outline: 1px solid var(--graphite);
  outline-offset: 2px;
}

.board-foot {
  font-size: 12px;
  color: var(--graphite);
  margin: 16px 0 0;
}

/* ---- "Today's read": a quiet linked-article card below the question ---- */

.read-card {
  border: 1px solid var(--slate);
  border-radius: 6px;
  padding: 18px 20px;
  color: var(--ink);
  transition: border-color 0.15s ease;
}

.read-card:hover {
  border-color: var(--graphite);
}

.read-body {
  display: block;
  text-decoration: none;
  color: inherit;
}

.read-eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--graphite);
  margin: 0 0 8px;
}

.read-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 12px;
}

.read-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.read-meta {
  position: relative; /* anchors the disclaimer tooltip within the card */
  font-size: 13px;
  color: var(--graphite);
}

.read-cta {
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  text-decoration: none;
}

.read-cta:hover {
  text-decoration: underline;
}

/* the disclaimer asterisk: a quiet superscript that reveals its note on
   hover or focus. A real button so it's keyboard- and touch-reachable. */
.read-note {
  border: none;
  background: none;
  padding: 0 0 0 3px;
  margin: 0;
  font: inherit;
  color: var(--graphite);
  cursor: help;
  vertical-align: super;
  font-size: 11px;
}

.read-note:focus-visible {
  outline: 1px solid var(--graphite);
  outline-offset: 2px;
  border-radius: 2px;
}

.read-tip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 5;
  width: max-content;
  max-width: 240px;
  padding: 9px 11px;
  border: 1px solid var(--slate);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--ink) 14%, transparent);
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink);
  text-align: left;
  vertical-align: baseline;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease;
  pointer-events: none;
}

.read-note:hover .read-tip,
.read-note:focus .read-tip,
.read-note:focus-visible .read-tip {
  opacity: 1;
  visibility: visible;
}

/* ---- the share button on the reveal card: outlined, monochrome ---- */

.share-slot {
  margin-top: 14px;
}

.share-button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 4px;
  border: 1px solid var(--slate);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.share-button:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.share-button:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ---- profile: core stat tiles + per-sport rows, strictly monochrome ---- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0 0 24px;
}

.stat-tile {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--slate);
  border-radius: 6px;
  padding: 16px;
}

.stat-value {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 34px;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--graphite);
  margin: 8px 0 2px;
}

.stat-sub {
  font-size: 12px;
  color: var(--graphite);
}

/* small section heading above the per-sport list */
.stat-section {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--graphite);
  margin: 0 0 6px;
}

/* a section heading that follows another section's closing note needs air
   above it, or the two run together */
.board-foot + .stat-section {
  margin-top: 26px;
}

/* the win–loss record inside a per-sport row (reuses .board-row layout) */
.sport-rec {
  font-size: 14px;
  color: var(--graphite);
  font-variant-numeric: tabular-nums;
}

/* ---- the pencil beside the profile name, and the editor it opens ---- */

.profile-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.edit-identity {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--graphite);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.edit-identity:hover {
  color: var(--ink);
  border-color: var(--slate);
}

.edit-identity:focus-visible {
  outline: 1px solid var(--graphite);
  outline-offset: 2px;
}

/* the editor itself — same monochrome card language as the notice */
.id-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: color-mix(in srgb, var(--ink) 42%, transparent);
}

.id-modal {
  width: 100%;
  max-width: 380px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--slate);
  border-radius: 6px;
  padding: 22px;
}

.id-modal:focus {
  outline: none;
}

.id-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 16px;
}

/* the "Marks" / "Letters" headings inside the picker */
.id-group {
  margin-top: 18px;
}

.id-done {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  margin-top: 20px;
  padding: 11px 16px;
  border-radius: 4px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.id-done:hover {
  background: var(--graphite);
  border-color: var(--graphite);
}

.id-done:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ---- form medals: a live standing, not a collection ----
   Monochrome — the profile and Progress pages are pre-reveal surfaces, so a
   medal reads as heavier ink and a firmer border, never as a hue. Every
   number is on screen: no tooltips, which a phone cannot show. */

.form-list {
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
}

.form-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--slate);
}

.form-row:last-child {
  border-bottom: none;
}

.form-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.form-sport {
  font-size: 16px;
  color: var(--ink);
}

.form-standing {
  font-size: 15px;
  font-weight: 600;
  color: var(--graphite);
  font-variant-numeric: tabular-nums;
}

/* a medalled sport — the only emphasis available without colour */
.form-row.medalled {
  border-left: 2px solid var(--ink);
  padding-left: 10px;
}

.form-row.medalled .form-standing {
  color: var(--ink);
}

.form-detail {
  font-size: 12px;
  line-height: 1.45;
  color: var(--graphite);
  margin: 3px 0 0;
}

/* ---- achievements: the permanent collection ----
   Locked tiles are greyed but fully readable, so a player can see what there
   is to chase. Earned tiles carry colour — the one place on the profile that
   does. This is the reveal rule applied to achievement: colour marks the
   moment something was achieved, and never appears before it. Tiers are NOT
   differentiated by hue; every earned tile reads the same green, and the tier
   is carried by its name alone. */

.ach-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0 0 6px;
  padding: 0;
}

.ach {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid var(--slate);
  border-radius: 6px;
  padding: 12px 13px;
}

.ach-tier {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--graphite);
}

.ach-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--graphite); /* locked: readable, but clearly not yours yet */
}

/* how it is earned — always on screen, never behind a hover or a tap */
.ach-how {
  font-size: 11px;
  line-height: 1.4;
  color: var(--graphite);
}

/* where you stand, or when you earned it */
.ach-state {
  font-size: 11px;
  color: var(--graphite);
  font-variant-numeric: tabular-nums;
  margin-top: 3px;
  padding-top: 6px;
  border-top: 1px solid var(--slate);
}

/* earned — the achievement moment, in colour */
.ach.earned {
  border-color: var(--correct);
}

.ach.earned .ach-name {
  color: var(--ink);
}

.ach.earned .ach-tier,
.ach.earned .ach-state {
  color: var(--correct);
}

.ach.earned .ach-state {
  border-top-color: color-mix(in srgb, var(--correct) 35%, transparent);
}

/* ---- account area: strictly monochrome, like everything pre-reveal ---- */

.account {
  border: 1px solid var(--slate);
  border-radius: 6px;
  padding: 18px 20px;
}

.account.offer {
  position: relative;
}

.account-dismiss {
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: inherit;
  font-size: 20px;
  line-height: 1;
  color: var(--graphite);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
}

.account-title {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 22px;
  margin: 0 0 6px;
}

.account-note {
  font-size: 14px;
  color: var(--graphite);
  margin: 0 0 14px;
}

.account-form {
  display: flex;
  gap: 8px;
}

.account-email {
  flex: 1;
  font-family: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--slate);
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
}

.account-email:focus {
  outline: none;
  border-color: var(--ink);
}

.account-send {
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}

.account-status {
  font-size: 14px;
  color: var(--graphite);
  margin: 10px 0 0;
  min-height: 17px;
}
