/* Reviewed identity, adapted to readable interface sizes rather than postcard sizes. */
@font-face { font-family: Archivo; src: url('/fonts/Archivo-Variable.ttf') format('truetype'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/IBMPlexMono-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
:root { --text-body: 1rem; --text-small: .875rem; --shadow: 0 10px 34px #0121690d; }
body { font-family: Archivo, system-ui, sans-serif; }
button, input { font-family: inherit; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible, .target-outline:focus-visible, .guess-row input:focus-visible { outline: 3px solid #00549f; outline-offset: 3px; }
.site-header { background: var(--navy); color: white; border: 0; }
.site-header::after { height: 3px; background: linear-gradient(90deg, white 0 78%, #c8102e 78%); }
.topbar { max-width: 1020px; min-height: 76px; padding: 10px 20px; }
.brand { gap: 12px; }
.brand strong { font-size: 1.625rem; font-weight: 850; letter-spacing: -.05em; }
.brand small { font-size: .875rem; color: #b9cae6; font-weight: 400; }
.brand-mark { width: 42px; height: 46px; background: transparent; border: 1px solid #7892bc; box-shadow: none; border-radius: 4px; }
.brand-mark svg { width: 30px; height: 38px; }
.top-links { display: flex; gap: 4px; }
.top-link-button { color: white; padding: 8px 12px; font-size: .875rem; background: transparent; border: 1px solid transparent; }
.site-header .top-links a { color: white; }
.site-header .top-links a:hover { color: white; background: #ffffff18; }
.top-link-button:hover { color: white; background: #ffffff18; border-color: #b9cae6; }
.top-link-button:disabled { opacity: .6; }
.hero-band { background: var(--paper); padding: 28px 20px 36px; color: var(--ink); }
.hero-band::before, .hero-band::after, .game-panel::before { display: none; }
.game-shell { max-width: 960px; }
.game-panel { border-radius: 12px; padding: 24px; display: grid; gap: 22px; grid-template-columns: minmax(0,1fr); }
.game-panel > * { min-width: 0; margin: 0; }
.panel-topline { gap: 8px; flex-wrap: wrap; }
.panel-topline span { padding: 0; background: none; font-family: 'IBM Plex Mono', monospace; font-size: .8125rem; font-weight: 400; }
.panel-tools { gap: 6px; width: auto; }
.panel-tools .button { background: none; border: 0; padding: 6px 9px; font-size: .875rem; color: var(--muted); }
.puzzle-meta { width: auto; }
.target-card { padding: 18px 20px 12px; background: #fbf7ee; border-color: #e4dbc8; border-radius: 6px; gap: 0; }
.outline-caption { display: block; }
.outline-caption .small-label { color: var(--muted); font-family: 'IBM Plex Mono', monospace; font-size: .75rem; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; }
.target-card h2 { margin: 5px 0 0; font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }
.target-outline { height: 208px; background: none; border: 0; box-shadow: none; }
.target-outline svg { width: 90%; height: 90%; }
.target-outline::after { width: 30px; height: 30px; box-shadow: none; background: transparent; border: 1px solid #cdd8e6; font-size: 1.3rem; }
.outline-shape { fill: var(--navy); stroke: var(--navy); stroke-width: 5; }
.outline-source { font-size: .75rem; line-height: 1.45; max-width: 36em; }
.guess-form { gap: 10px; align-content: start; }
.guess-form-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.guess-form-heading label { color: var(--ink); font-weight: 750; font-size: 1.125rem; }
.guess-progress { font-family: 'IBM Plex Mono', monospace; font-size: .8125rem; font-weight: 400; color: var(--muted); letter-spacing: 0; text-transform: none; }
.guess-row { grid-template-columns: minmax(0,1fr); gap: 8px; }
.guess-row input { min-height: 52px; font-size: 1rem; border-color: #a5b4c8; }
.button { min-height: 46px; font-size: 1rem; font-weight: 650; border-radius: 6px; box-shadow: none; padding: 10px 14px; }
.button.primary { background: var(--navy); border-color: var(--navy); color: white; }
.button.primary:hover { background: #083c90; }
.text-button { min-height: 44px; font-size: .875rem; padding: 8px 3px; text-underline-offset: 4px; }
.input-help { font-size: .875rem; font-weight: 400; }
.turn-feedback { padding: 14px 16px 6px; background: #edf4fa; border: 1px solid #cdd8e6; border-left: 3px solid var(--navy); border-radius: 6px; }
.turn-feedback-kicker { font-weight: 500; font-size: .875rem; letter-spacing: 0; text-transform: none; }
.turn-feedback-result { font-size: 1.35rem; line-height: 1.5; }
.turn-feedback-result span { margin-right: 5px; }
.distance-basis { font-size: .8125rem; font-weight: 400; }
.turn-feedback-clue { flex-direction: column; gap: 2px; font-size: .9375rem; padding-top: 9px; margin-top: 9px; }
.turn-feedback-clue span { font-size: .8125rem; color: var(--muted); }
.turn-feedback .text-button { margin-top: 4px; }
.suggestion-list { position: static; padding: 0; margin: 0; border: 0; box-shadow: none; max-height: none; }
.suggestion-button { min-height: 56px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.suggestion-title { font-size: 1rem; }
.suggestion-meta { font-size: .8125rem; }
.clue-section { border-top: 1px solid var(--line); padding-top: 4px; }
.clue-section summary { min-height: 44px; cursor: pointer; padding: 10px 0; font-size: .9375rem; font-weight: 650; }
.clue-heading { display: none; }
.clue-grid { gap: 8px; padding-top: 6px; }
.clue { font-size: .875rem; padding: 10px; }
.clue strong, .clue span { font-size: .875rem; }
.game-panel > .game-map { display: none; }
.game-panel[data-journey="true"] > :not(.game-map) { display: none !important; }
.game-panel[data-journey="true"] > .game-map { display: block; }
.game-map { padding: 0; background: white; border: 0; }
.map-return { margin: 0 0 16px; }
.map-return .button { background: var(--navy); color: white; border-color: var(--navy); }
.game-map .eyebrow { color: var(--muted); font-size: .8125rem; }
.game-map .section-heading h2 { color: var(--ink); font-size: 1.7rem; }
.map-key { color: var(--muted); }
.game-map .section-heading { margin: 16px 0; }
.game-map .map-layout { gap: 20px; }
.game-map .fact-panel { display: none; }
.journey-intro { font-size: .875rem; }
.game-panel > .actions, .share-status:empty { display: none !important; }
.share-status { font-size: .9375rem; color: var(--navy); }
.result-panel { background: white; border: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.game-panel[data-result-stage="bonus"] .result-panel { min-height: 0; }
.result-panel > * { margin: 0; }
.result-panel #resultKicker { font-family: 'IBM Plex Mono', monospace; font-size: .8125rem; letter-spacing: .03em; font-weight: 400; color: var(--navy); margin-bottom: 8px; }
.result-panel h2 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.05; font-weight: 850; font-stretch: 87%; letter-spacing: -.035em; color: var(--navy); margin-bottom: 0; overflow-wrap: anywhere; }
.result-panel #resultSummary { font-size: 1rem; color: var(--muted); margin: 0; }
.result-facts { order: 1; grid-template-columns: 90px minmax(0,1fr); padding: 14px; background: #fbf7ee; border: 1px solid #e4dbc8; border-radius: 6px; gap: 16px; align-items: center; }
.result-facts div { padding: 0; border: 0; background: none; }
.result-facts .reveal-outline svg { width: 88px; height: 100px; display: block; }
.result-facts dt { font-family: 'IBM Plex Mono', monospace; font-size: .75rem; font-weight: 400; }
.result-facts dd { font-size: .9375rem; line-height: 1.5; }
.bonus-progress { order: 2; }
.bonus-progress-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px; font-size: .9375rem; margin-bottom: 10px; }
.bonus-progress-heading span { color: var(--muted); }
.bonus-markers { list-style: none; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); padding: 0; margin: 0; gap: 6px; }
.bonus-marker { display: grid; gap: 4px; justify-items: center; min-height: 58px; width: 100%; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 5px; padding: 8px 2px; cursor: pointer; }
.bonus-marker span { font-family: 'IBM Plex Mono', monospace; font-size: 1rem; }
.bonus-marker small { font-size: .75rem; }
.bonus-marker.done { background: #edf4fa; color: var(--navy); border-color: #9cb1ce; }
.bonus-marker.skipped { border-style: dashed; }
.bonus-marker[aria-current] { box-shadow: 0 0 0 2px var(--navy); }
.result-nav { order: 3; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 0; }
.result-nav .primary { grid-column: 1 / -1; }
.result-depth { order: 3; }
.bonus-nav { order: 4; }
.bonus-nav .text-button { grid-column: 1 / -1; justify-self: center; }
.next-game { order: 5; font-family: 'IBM Plex Mono', monospace; font-size: .8125rem; text-align: center; margin: 6px 0 0 !important; }
.depth-section { padding: 0; background: none; border: 0; margin: 0; }
.depth-heading { display: none; }
.bonus-basis { font-size: .9375rem; margin: 0 0 14px; }
.bonus-options { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; }
.bonus-option { min-height: 52px; padding: 12px 14px; border-radius: 6px; }
.bonus-option strong { font-size: 1rem; }
.bonus-option span { font-size: .875rem; }
.bonus-resolution { margin-top: 14px; }
.bonus-resolution dd { font-size: 1rem; }
.bonus-feedback { font-size: 1rem; background: #fbf7ee; border-left: 3px solid #c78b24; padding: 14px; margin-top: 14px; }
.bonus-stage-actions .button { width: 100%; }
.bonus-intro { margin-top: 14px; font-size: .875rem; }
.compact-footer { padding: 12px 16px 24px; }
.app-status p { font-size: .75rem; }
.preview-notice { background: #e8eef7; color: var(--navy); padding: 6px 12px; text-align: center; font-size: .75rem; }
@media (min-width: 800px) {
  .game-panel[data-result-stage="play"][data-journey="false"] { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: start; }
  .panel-topline { grid-column: 1 / -1; }
  .target-card { grid-column: 1; grid-row: 2 / span 3; }
  .target-outline { height: 330px; }
  .turn-feedback, .guess-form, .clue-section { grid-column: 2; }
  .game-panel:not([data-result-stage="play"])[data-journey="false"] { max-width: 640px; margin: 0 auto; padding: 30px; }
}
@media (max-width: 620px) {
  .topbar { padding: 8px 16px; min-height: 66px; gap: 8px; }
  .brand strong { font-size: 1.5rem; }
  .brand small { font-size: .75rem; }
  .brand-mark { width: 32px; height: 38px; }
  .brand-mark svg { width: 26px; height: 32px; }
  .brand { gap: 8px; }
  .top-link-button { padding: 8px; font-size: .8125rem; }
  #referenceTopButton { display: none; }
  .hero-band { padding: 14px 12px 22px; }
  .game-panel { padding: 16px; gap: 16px; border-radius: 8px; }
  .panel-topline { align-items: center; gap: 4px; }
  .panel-tools .button { padding: 5px 6px; }
  .target-card { padding: 12px 14px 10px; }
  .target-outline { height: 170px; }
  .target-card h2 { font-size: 1.4rem; }
  .target-card .outline-source { display: block; }
  .result-panel { gap: 16px; }
  .result-panel h2 { font-size: 2.5rem; }
  .result-facts { grid-template-columns: 70px minmax(0,1fr); padding: 12px; gap: 12px; }
  .result-facts .reveal-outline svg { width: 68px; height: 88px; }
}
@media (max-width: 359px) {
  .topbar { flex-wrap: wrap; }
  .top-links { margin-left: auto; }
  .hero-band { padding-inline: 6px; }
  .game-panel { padding: 12px; }
  .result-nav, .result-facts { grid-template-columns: minmax(0,1fr); }
  .bonus-markers { gap: 3px; }
  .bonus-marker small { font-size: .75rem; overflow-wrap: anywhere; }
  .panel-topline, .guess-form-heading { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 799px) {
  .game-panel[data-result-stage="play"][data-has-guesses="true"] .target-card { display: grid; grid-template-columns: minmax(0,1fr) 90px; align-items: center; }
  .game-panel[data-result-stage="play"][data-has-guesses="true"] .target-outline { height: 88px; }
  .game-panel[data-result-stage="play"][data-has-guesses="true"] .outline-source { display: none; }
  .game-panel[data-result-stage="play"][data-has-guesses="true"] .target-card h2 { font-size: 1.25rem; }
}
.clear-guess { justify-self: start; }
.clear-guess[hidden] { display: none; }

[hidden] { display: none !important; }
.result-facts dd { font-weight: 500; }
/* Let enlarged navigation move as whole words onto a new row. */
.topbar { flex-wrap: wrap; }
.brand strong { white-space: nowrap; }
.top-links { flex: 0 0 auto; flex-wrap: wrap; max-width: 100%; margin-left: auto; }
.top-link-button { overflow-wrap: normal; word-break: normal; }
.map-return:last-child .button { color: var(--navy); background: white; border-color: var(--line); }

/* Permanent UK mark: explicit fill avoids inherited outline strokes at icon sizes. */
#brandMark .brand-map-shape { fill: currentColor; stroke: none; stroke-width: 0; }
