:root {
  --plate: #0d3b20;
  --forest: #0b1710;
  --moss: #172a1e;
  --gold: #c6a15b;
  --bone: #e9dfc8;
  --sand: #b8916a;
  --bone-soft: rgb(233 223 200 / .72);
  --rule: rgb(233 223 200 / .16);
  --serif: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 48px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--forest); color: var(--bone); font: 400 1.0625rem/1.55 var(--sans); }

.hc-head { display: flex; justify-content: space-between; align-items: baseline; padding: 20px var(--gutter); border-bottom: 1px solid var(--rule); }
.hc-brand { font-family: var(--serif); font-size: 1.4rem; color: var(--bone); text-decoration: none; }
.hc-tag { font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; color: var(--sand); }

.hc { max-width: 1100px; margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--gutter) 96px; }
.hc-intro { max-width: 640px; margin-bottom: 32px; }
.hc-kicker { margin: 0 0 6px; font-size: .75rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.hc-intro h1 { margin: 0 0 12px; font: 400 clamp(2.4rem, 1.6rem + 3.6vw, 4.2rem)/1 var(--serif); }
.hc-intro p { margin: 0 0 10px; color: var(--bone-soft); }
.hc-holds { font-family: var(--serif); font-style: italic; color: var(--sand) !important; }

.hc-stage { position: relative; display: grid; place-items: center; min-height: 320px; background: var(--moss); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.hc-stage canvas { display: block; max-width: 100%; max-height: 72svh; width: auto; height: auto; }
.hc-stage canvas:not(.on) { display: none; }
/* the video sits under the canvas at full size: some browsers stop decoding videos that are hidden or tiny */
.hc-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 0; pointer-events: none; }
.hc-stage canvas { position: relative; z-index: 1; }
.hc-btn:disabled { opacity: .6; cursor: progress; }
.hc-empty { display: grid; justify-items: center; gap: 10px; padding: 48px 0; color: var(--sand); font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; }
.hc-empty svg { width: 96px; fill: none; stroke: var(--gold); stroke-width: 1; opacity: .8; }
.hc-empty circle:nth-child(2) { fill: var(--gold); }

.hc-status { position: absolute; top: 12px; right: 12px; padding: 6px 14px 6px 28px; border-radius: 999px; background: rgb(11 23 16 / .78); border: 1px solid var(--rule); font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--bone-soft); }
.hc-status::before { content: ""; position: absolute; left: 12px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--sand); opacity: .5; }
.hc-status[data-state="watch"]::before { background: var(--gold); opacity: 1; animation: hc-pulse 1.6s ease-in-out infinite; }
.hc-status[data-state="lock"]::before { background: var(--gold); opacity: 1; }
.hc-status[data-state="hold"] { color: var(--forest); background: var(--gold); border-color: var(--gold); }
.hc-status[data-state="hold"]::before { background: var(--forest); opacity: 1; }
@keyframes hc-pulse { 50% { opacity: .25; } }

.hc-goal { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 16px; padding: 12px 16px; border: 1px solid var(--rule); border-radius: 4px; }
.hc-goal__lab { font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.hc-goal select, .hc-goal input { min-height: 40px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--forest); color: var(--bone); font: 500 .95rem var(--sans); }
.hc-goal select:focus-visible, .hc-goal input:focus-visible, .hc-goal button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hc-goal__secs { display: inline-flex; align-items: center; gap: 6px; color: var(--bone-soft); font-size: .9rem; }
.hc-goal input { width: 4.5em; text-align: center; font-family: var(--serif); font-size: 1.15rem; -moz-appearance: textfield; }
.hc-goal input::-webkit-inner-spin-button, .hc-goal input::-webkit-outer-spin-button { -webkit-appearance: none; }
.hc-goal button { touch-action: manipulation; user-select: none; width: 40px; height: 40px; border: 1px solid var(--rule); border-radius: 50%; background: transparent; color: var(--bone); font-size: 1.1rem; cursor: pointer; }
.hc-goal button:hover { border-color: var(--gold); }
.hc-log li.hit .time::after { content: " ✓"; }
.hc-log li.hit .sub { color: var(--gold); }

.hc-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.hc-btn { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--rule); border-radius: 999px; background: transparent; color: var(--bone); font: 500 .95rem var(--sans); cursor: pointer; }
.hc-btn:hover { border-color: var(--gold); }
.hc-btn--gold { background: var(--gold); border-color: var(--gold); color: var(--forest); }
.hc-btn--gold:hover { background: #d4b273; }
.hc-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.hc-btn:focus-visible, .hc-btn:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }

.hc-options { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font-size: .9rem; color: var(--bone-soft); }
.hc-options input { accent-color: var(--gold); margin-right: 6px; }

.hc-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; margin: 18px 0 0; background: var(--rule); border: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.hc-nums div { padding: 8px 12px; background: var(--forest); }
.hc-nums dt { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sand); }
.hc-nums dd { margin: 2px 0 0; font-size: .95rem; }

.hc-log { margin-top: 48px; }
.hc-log h2 { margin: 0 0 12px; font: 400 1.6rem var(--serif); }
.hc-log ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.hc-log li { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.hc-log__empty { display: block !important; color: var(--sand); font-size: .9rem; }
.hc-log .name { font-family: var(--serif); font-size: 1.25rem; }
.hc-log .time { font-family: var(--serif); font-size: 1.6rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.hc-log .sub { grid-column: 1 / -1; font-size: .85rem; color: var(--bone-soft); }
.hc-log .clip { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.hc-log .clip video { width: min(280px, 100%); border-radius: 3px; background: #000; }
.hc-log .clip a { color: var(--gold); font-size: .9rem; }

[hidden] { display: none !important; }
.hc-safe { font-size: .85rem; color: var(--sand); }
.hc-safe a { color: var(--bone-soft); }
