/* Gold Hub announcer v2 · "Gold Rush" light theme (default). Warm ivory, deep ink text, gold for what matters.
   Everything is scoped to body.theme-gold; ?theme=dark keeps the v1 look from announcer.css. */
body.theme-gold {
  --bg: #f5eedb; --panel: #fffbf1; --panel-2: #f7eed6; --line: #e7d8b3; --text: #18213d; --muted: #77705f;
  --ink: #141b33; --gold-dark: #8f6400; --gold: #c9971c; --gold-bright: #e8b923; --gold-light: #f7dc78;
  --navy: #1d2a4d; --bronze: #9c5418; --emerald: #2d6a4b; --teal: #25637d; --petrol: #1f6866;
  --warn: #b85c00; --bad: #b3261e; --ok: #2d7a4b;
  --gold-grad: linear-gradient(110deg, #a8780c 0%, #e2b22a 32%, #fff1b8 50%, #e2b22a 68%, #a8780c 100%);
  background: radial-gradient(ellipse at 0% 0%, rgba(232,185,35,.16), transparent 45%),
              radial-gradient(ellipse at 100% 100%, rgba(232,185,35,.14), transparent 45%), var(--bg);
  color: var(--text);
}
html:has(body.theme-gold) { background: #f5eedb; color: #18213d; }

/* top bar: deep navy band with a gold edge */
.theme-gold .topbar { background: var(--navy); border-bottom: .22rem solid transparent;
  border-image: var(--gold-grad) 1; color: #f3ead3; }
.theme-gold .brand-gold { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 1.4rem; }
.theme-gold .brand-sub, .theme-gold .run-facts, .theme-gold .status { color: #c9c1aa; }
.theme-gold .run-label { color: #fff8e6; }
.theme-gold .demo-flag { background: var(--gold-bright); color: var(--navy); }
.theme-gold .mode-badge { border-color: rgba(247,220,120,.45); color: #f3ead3; }
.theme-gold .mode-badge.course { background: var(--gold-bright); color: var(--navy); border-color: var(--gold-light); font-weight: 800; }
.theme-gold .clock-now { color: #fff8e6; }
.theme-gold .icon-button { color: #e9dfc4; border-color: rgba(247,220,120,.45); }
.theme-gold .icon-button:hover, .theme-gold .icon-button:focus-visible {
  color: #fff8e6; border-color: var(--gold-bright); background: rgba(247, 220, 120, .14); }

/* panels */
.theme-gold .panel { background: var(--panel); border: 1px solid var(--line); box-shadow: 0 .15rem .6rem rgba(90,70,20,.08); }
.theme-gold .panel-head { color: #fff8e6; border-bottom: .2rem solid var(--gold-bright); }
.theme-gold .panel-blue .panel-head { background: var(--navy); }
.theme-gold .panel-orange .panel-head { background: var(--bronze); color: #fff8e6; }
.theme-gold .panel-green .panel-head { background: var(--emerald); }
.theme-gold .panel-sky .panel-head { background: var(--teal); color: #fff8e6; }
.theme-gold .panel-cyan .panel-head { background: var(--petrol); color: #fff8e6; }
.theme-gold .source { color: #f3ead3; }
.theme-gold .source.warn { background: var(--gold-light); color: var(--navy); }

/* on course card: the hero */
.theme-gold .oncourse { border: .16rem solid var(--gold); box-shadow: 0 .3rem 1.4rem rgba(143,100,0,.16); }
.theme-gold .badge { background: rgba(255,248,230,.18); color: #fff8e6; }
.theme-gold .badge-course { background: #3f9a62; color: #fff; }
.theme-gold .badge-stopped, .theme-gold .badge-finished { background: var(--gold-grad); color: var(--navy); }
.theme-gold .badge-dis { background: var(--bad); color: #fff; }
.theme-gold .bib { background: var(--gold-grad); color: var(--navy); border: 0; box-shadow: inset 0 0 0 .12rem rgba(143,100,0,.4); }
.theme-gold .dog { color: var(--ink); letter-spacing: .01em; }
.theme-gold .names .dog { padding-bottom: .12em; background: linear-gradient(var(--gold-bright), var(--gold-bright)) left bottom / 4.5rem .28rem no-repeat; }
.theme-gold .handler { color: var(--text); }
.theme-gold .team-extra { color: var(--muted); }
.theme-gold .live-time { color: var(--ink); }
.theme-gold .live-time.stopped, .theme-gold .live-time.official { color: var(--gold-dark); }
.theme-gold .live-pen { color: var(--muted); }
.theme-gold .live-pen.has-faults { color: var(--warn); }
.theme-gold .live-pen.dis { color: var(--bad); }
.theme-gold .live-place { color: var(--gold-dark); }
.theme-gold .live-place.p1 { display: inline-block; color: var(--navy); background: var(--gold-grad); background-size: 250% 100%;
  padding: .05rem .8rem; border-radius: 2rem; animation: shimmer 3.2s linear infinite; }
.theme-gold .waiting { color: var(--muted); }

.theme-gold .info { border-top: .12rem solid var(--line); }
.theme-gold .info-head { color: var(--muted); }
.theme-gold .info-label { color: var(--bronze); }
.theme-gold .info-body { color: var(--ink); font-weight: 500; line-height: 1.38; }
.theme-gold .info-line .k { color: var(--muted); font-weight: 600; }
.theme-gold .info-line .v { font-weight: 600; }
.theme-gold .info-form { color: var(--muted); }
.theme-gold .match-tag.status-confirmed { color: var(--ok); border-color: rgba(45,122,75,.45); }
.theme-gold .match-tag.status-manual { color: var(--teal); border-color: rgba(37,99,125,.45); }
.theme-gold .match-tag.status-uncertain { background: #f2c14e; color: #3b2600; }
.theme-gold .match-hint { color: var(--muted); }
.theme-gold .match-hint.status-ambiguous { color: var(--warn); font-weight: 700; }
.theme-gold .note { border: .16rem solid #d98a2b; background: #fff0d4; }
.theme-gold .note strong { color: #9a4a00; }
.theme-gold .note p { color: #3b2a10; }

/* lists and tables */
.theme-gold .next-row, .theme-gold .table td { border-bottom-color: var(--line); }
.theme-gold .next-row.first { background: rgba(45,106,75,.1); }
.theme-gold .bib-s, .theme-gold .country-s, .theme-gold .table .c-bib, .theme-gold .table .c-pen { color: var(--muted); }
.theme-gold .dog-s, .theme-gold .table .c-dog { color: var(--ink); }
.theme-gold .handler-s, .theme-gold .table .c-handler { color: #4a4a55; }
.theme-gold .table .c-place { color: var(--gold-dark); }
.theme-gold .table .c-time { color: var(--ink); }
.theme-gold .table tr.hl td { background: rgba(232,185,35,.18); }
.theme-gold .table tr.p1row td { background: rgba(232,185,35,.12); }
.theme-gold .table tr.p1row .c-time { color: var(--gold-dark); font-weight: 900; }
.theme-gold .table .c-place.p1 span { display: inline-block; min-width: 2.1em; text-align: center; color: var(--navy);
  background: var(--gold-grad); background-size: 250% 100%; border-radius: 1em; animation: shimmer 3.2s linear infinite; }
.theme-gold .latest-place { color: var(--gold-dark); }
.theme-gold .latest-place.p1 { color: var(--navy); background: var(--gold-grad); background-size: 250% 100%; border-radius: 50%;
  aspect-ratio: 1; display: grid; place-items: center; animation: shimmer 3.2s linear infinite; }
.theme-gold .latest-place.dis { color: var(--bad); }
.theme-gold .latest-dog { color: var(--ink); }
.theme-gold .latest-handler, .theme-gold .latest-pen { color: var(--muted); }
.theme-gold .latest-time { color: var(--ink); }
.theme-gold .ttb-time { color: var(--bronze); }
.theme-gold .ttb-hint { color: var(--gold-dark); font-weight: 700; }
.theme-gold .empty, .theme-gold .table td.empty, .theme-gold .ttb-todo { color: var(--muted); }

@keyframes shimmer { from { background-position: 125% 0; } to { background-position: -125% 0; } }
@media (prefers-reduced-motion: reduce) {
  .theme-gold .live-place.p1, .theme-gold .table .c-place.p1 span, .theme-gold .latest-place.p1 { animation: none; background-position: 50% 0; }
}

/* footer, watermark, dialogs */
.theme-gold .foot { color: var(--muted); }
.theme-gold .wd-watermark { filter: brightness(0); opacity: .1; }
.theme-gold .dialog { background: var(--panel); color: var(--text); border-color: var(--gold); }
.theme-gold .dialog::backdrop { background: rgba(29,42,77,.45); }
.theme-gold .dialog-form label, .theme-gold .survey-status { color: var(--muted); }
.theme-gold .dialog-form input, .theme-gold .dialog-form select { background: #fff; color: var(--text); border-color: var(--line); }
.theme-gold .dialog-form a { color: var(--teal); }
.theme-gold .row-buttons button, .theme-gold .file-button { background: var(--panel-2); color: var(--text); border-color: var(--line); }

/* ---------- layout v2: in course mode the survey info dominates ---------- */
body.theme-gold.mode-course .stage { grid-template-columns: 2.75fr 1fr; }
body.theme-gold.info-hero .col-left .oncourse { flex: 1 1 auto; }
body.theme-gold.mode-course .team { padding: .7rem 1.2rem .5rem; }
body.theme-gold.mode-course .dog { font-size: 4.6rem; }
body.theme-gold.mode-course .handler { font-size: 2rem; }
body.theme-gold.mode-course .live-time { font-size: 3.6rem; }
body.theme-gold.mode-course .info-head { font-size: 1.15rem; }
body.theme-gold.mode-course .info-label { font-size: 1.3rem; }
body.theme-gold.mode-course .note p { font-size: 1.45rem; }
body.theme-gold.mode-course .note strong { font-size: 1.05rem; }
/* compact right column in course mode (Next 3 and Time to beat live there too) */
body.theme-gold.mode-course .col-right { gap: .7rem; }
body.theme-gold.mode-course .col-right .panel-head { font-size: .9rem; padding: .32rem .8rem; }
body.theme-gold.mode-course .table { font-size: 1.12rem; }
body.theme-gold.mode-course .table td { padding: .26rem .45rem; }
body.theme-gold.mode-course .table .c-pen { display: none; }
body.theme-gold.info-hero .col-right .next-row { grid-template-columns: 3rem 1fr; font-size: 1.15rem; padding: .3rem .8rem; }
body.theme-gold.info-hero .col-right .next-row .handler-s { grid-column: 2; font-size: .85em; margin-top: -.3rem; }
body.theme-gold.info-hero .col-right .next-row .country-s { display: none; }
body.theme-gold.ttb-right .col-right .ttb-body { padding: .45rem .8rem; }
body.theme-gold.ttb-right .col-right .ttb-time { font-size: 2rem; }
body.theme-gold.ttb-right .col-right .ttb-who, body.theme-gold.ttb-right .col-right .ttb-hint { font-size: 1rem; }
body.theme-gold.ttb-right .col-right .ttb-todo { display: none; }
body.theme-gold.info-hero .col-right .next { flex: 0 0 auto; }
body.theme-gold.info-hero .col-right .combined { flex: 0 1 auto; }

/* finished mode: results get the space, info still readable */
body.theme-gold.mode-finished .dog { font-size: 3.6rem; }

/* long answers: soft fade at the bottom while there is more text to scroll */
.theme-gold .info-body.more-below { -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent);
  mask-image: linear-gradient(to bottom, #000 82%, transparent); }

/* ---------- v3: adjustable info layout (layout-large | layout-medium | layout-two) and text size ---------- */
body.theme-gold { --info-scale: 1; }
body.theme-gold.text-s { --info-scale: .82; }
body.theme-gold.text-l { --info-scale: 1.15; }
body.theme-gold.text-xl { --info-scale: 1.3; }
body.theme-gold.mode-course .info-wrap { margin: 0 1.3rem .9rem; }
body.theme-gold .info-body { --fs: 2.4rem; }
body.theme-gold.mode-course .info-body { font-size: calc(var(--fs) * var(--info-scale)); }
body.theme-gold.mode-finished .info-body { font-size: calc(1.9rem * var(--info-scale)); }
body.theme-gold.mode-finished.layout-two .info-body { font-size: calc(1.6rem * var(--info-scale)); }
/* large (v2): the info fills the left column */
body.theme-gold.layout-large .info-body.len-s { --fs: 4.1rem; }
body.theme-gold.layout-large .info-body.len-m { --fs: 3.4rem; }
body.theme-gold.layout-large .info-body.len-l { --fs: 2.85rem; }
body.theme-gold.layout-large .info-body.len-xl { --fs: 2.4rem; }
/* medium (default): Next 3 stays under the card, results column a bit wider */
body.theme-gold.layout-medium.mode-course .stage, body.theme-gold.layout-two.mode-course .stage { grid-template-columns: 2.15fr 1fr; }
body.theme-gold.layout-medium .info-body.len-s { --fs: 3.1rem; }
body.theme-gold.layout-medium .info-body.len-m { --fs: 2.65rem; }
body.theme-gold.layout-medium .info-body.len-l { --fs: 2.25rem; }
body.theme-gold.layout-medium .info-body.len-xl { --fs: 1.95rem; }
body.theme-gold.layout-medium.mode-course .dog, body.theme-gold.layout-two.mode-course .dog { font-size: 4rem; }
body.theme-gold.layout-medium.mode-course .live-time, body.theme-gold.layout-two.mode-course .live-time { font-size: 3.1rem; }
body.theme-gold.layout-medium.mode-course .next-row, body.theme-gold.layout-two.mode-course .next-row { font-size: 1.4rem; padding: .42rem 1.1rem; }
body.theme-gold.layout-medium.mode-course .table, body.theme-gold.layout-two.mode-course .table { font-size: 1.3rem; }
body.theme-gold.layout-medium.mode-course .table td, body.theme-gold.layout-two.mode-course .table td { padding: .34rem .5rem; }
body.theme-gold.layout-medium.mode-course .latest-dog, body.theme-gold.layout-two.mode-course .latest-dog { font-size: 1.6rem; }
body.theme-gold.layout-medium.mode-course .latest-time, body.theme-gold.layout-two.mode-course .latest-time { font-size: 1.8rem; }
body.theme-gold.layout-medium.mode-course .latest-place, body.theme-gold.layout-two.mode-course .latest-place { font-size: 2.6rem; }
/* two: two smaller boxes side by side, each rotating on its own */
body.theme-gold.layout-two .info-body.len-s { --fs: 2.5rem; }
body.theme-gold.layout-two .info-body.len-m { --fs: 2.15rem; }
body.theme-gold.layout-two .info-body.len-l { --fs: 1.85rem; }
body.theme-gold.layout-two .info-body.len-xl { --fs: 1.65rem; }
body.theme-gold.layout-two .info-second { border-left: .12rem solid var(--line); padding-left: 1.2rem; }
body.theme-gold.layout-two .info-second .info-label { color: var(--teal); }
/* profile lines (label/value): smaller so all lines fit */
body.theme-gold.mode-course .info-body:has(.info-line) { row-gap: .35em; }
body.theme-gold.layout-large .info-body:has(.info-line) { --fs: 2.9rem; }
body.theme-gold.layout-medium .info-body:has(.info-line) { --fs: 2.3rem; }
body.theme-gold.layout-two .info-body:has(.info-line) { --fs: 1.75rem; display: block; }
body.theme-gold.layout-two .info-line { display: block; margin-bottom: .3em; }
body.theme-gold.layout-two .info-line .k { display: block; padding-top: 0; }
body.theme-gold.mode-course .info-line .k { font-size: .55em; padding-top: .55em; }
body.theme-gold.layout-two.mode-course .info-line .k { padding-top: 0; }
body.theme-gold.layout-large .info-body.len-l:has(.info-line), body.theme-gold.layout-large .info-body.len-xl:has(.info-line) { --fs: 2.4rem; }
/* settings: layout controls */
.layout-set input[type=range] { width: 100%; accent-color: #c9971c; }
.layout-set output { font-weight: 800; color: var(--text); }
/* medium/two: Next 3 a little tighter, results use the free room on the right */
body.theme-gold.layout-medium.mode-course .next-row, body.theme-gold.layout-two.mode-course .next-row { font-size: 1.35rem; padding: .34rem 1.1rem; }
body.theme-gold.layout-medium.mode-course .table, body.theme-gold.layout-two.mode-course .table { font-size: 1.42rem; }
body.theme-gold.layout-medium.mode-course .table td, body.theme-gold.layout-two.mode-course .table td { padding: .4rem .55rem; }
body.theme-gold.layout-medium.mode-course .col-right .panel-head, body.theme-gold.layout-two.mode-course .col-right .panel-head { font-size: 1rem; padding: .4rem .9rem; }
