/* Front Nine beta. Theme: every colour and font is a variable here, taken from frontninefitness.com (Dec 2026).
   To restyle the app, change this block only. */
:root {
  --bg: #040B16;            /* page */
  --surface: #0B1626;       /* cards */
  --surface-2: #122036;     /* inputs, chips */
  --line: rgba(255, 255, 255, .10);
  --text: #FFFFFF;
  --text-2: rgba(255, 255, 255, .72);
  --text-3: rgba(255, 255, 255, .50);
  --accent: #C9A84C;        /* gold */
  --on-accent: #040B16;
  --good: #6FBF8E;
  --warn: #E0A458;
  --bad: #E07A6B;
  --radius: 6px;
  --radius-btn: 4px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Playfair Display", Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--font); min-height: 100dvh; }
h1, h2 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; margin: 0; }
h1 { font-size: 32px; }
h2 { font-size: 22px; }
h3 { font: 700 17px/1.3 var(--font); margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.bar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: rgba(4, 11, 22, .95); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.brand { font: 700 13px var(--font); letter-spacing: .14em; text-transform: uppercase; }
.brand em { font-style: normal; color: var(--accent); }
main { max-width: 560px; margin: 0 auto; padding: 20px 16px calc(96px + env(safe-area-inset-bottom, 0px)); }
.stack > * + * { margin-top: 16px; }
.eyebrow { font: 700 12px var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.btn { display: block; width: 100%; min-height: 48px; padding: 12px 20px; border: 1px solid var(--accent); border-radius: var(--radius-btn);
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.quiet { background: transparent; border-color: var(--line); color: var(--text-2); }
.btn:disabled { opacity: .5; }
.btn.inline { display: inline-block; width: auto; min-height: 40px; padding: 8px 14px; font-size: 13px; }
.link { background: none; border: 0; padding: 8px 0; color: var(--text-2); text-decoration: underline; cursor: pointer; font-size: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.fill > * { flex: 1; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.chip { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius-btn); background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
input[type=text], input[type=number], input[type=password], select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius-btn); color: var(--text); font-size: 16px; }
input:focus-visible, button:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 4px; }
.err { color: var(--bad); font-size: 14px; }
.notice { border: 1px solid var(--warn); border-radius: var(--radius); padding: 12px 14px; color: var(--text); font-size: 14px; }
.notice strong { color: var(--warn); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { padding: 0; font: 700 12px var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.ticks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tick { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-btn); background: var(--surface-2); font-size: 14px; color: var(--text); margin: 0; cursor: pointer; }
.tick input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }

/* session */
.progress { height: 4px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); }
.sec { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.sec > button.head { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; background: none; border: 0; text-align: left; cursor: pointer; }
.sec .head .count { color: var(--text-3); font-size: 14px; white-space: nowrap; }
.sec.done .head h2 { color: var(--text-2); }
.sec .body { padding: 0 16px 16px; }
.group { font: 700 12px var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin: 18px 0 8px; }
.ex { padding: 16px 0; border-top: 1px solid var(--line); }
.ex:first-child { border-top: 0; padding-top: 4px; }
.ex .media { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.ex .media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ex .media.none { display: flex; align-items: center; justify-content: center; aspect-ratio: auto; min-height: 44px; background: var(--surface-2); color: var(--text-3); font-size: 13px; }
.dose { margin-top: 4px; font-size: 17px; }
.dose b { color: var(--accent); font-weight: 700; }
.ex .note { margin-top: 8px; font-size: 14px; color: var(--text-2); }
.ex .why { margin-top: 8px; font-size: 14px; color: var(--text-2); }
.ex .why span { color: var(--accent); font-weight: 700; }
.logbox { margin-top: 12px; }
.logbox .fields { display: grid; grid-template-columns: 110px 1fr; gap: 12px; margin-bottom: 12px; }
.reps { display: flex; gap: 6px; }
.reps input { text-align: center; padding: 10px 4px; }
.feel { margin-bottom: 12px; }
.feel .chip { font-size: 14px; }
.logged { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-btn); background: var(--surface-2); font-size: 14px; }
.logged .ok { color: var(--good); font-weight: 700; }
.logged .skip { color: var(--warn); font-weight: 700; }
.sticky { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: rgba(4, 11, 22, .96); border-top: 1px solid var(--line); }
.sticky .btn { max-width: 528px; margin: 0 auto; }
.scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.scale .chip { padding: 0; min-height: 44px; font-size: 14px; }
dialog { width: min(96vw, 560px); padding: 12px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); }
dialog::backdrop { background: rgba(0, 0, 0, .8); }
dialog video { width: 100%; max-height: 70dvh; border-radius: var(--radius-btn); background: #000; margin-bottom: 12px; }

/* coach */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--text-3); font-weight: 500; }
details > summary { cursor: pointer; padding: 6px 0; }
.tag { display: inline-block; padding: 1px 8px; border: 1px solid var(--line); border-radius: 99px; font-size: 12px; color: var(--text-2); }
@media (prefers-reduced-motion: no-preference) { .progress i { transition: width .3s; } }
