@font-face {
  font-family: Newsreader;
  src: url("./assets/fonts/newsreader-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Newsreader;
  src: url("./assets/fonts/newsreader-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/inter-tight-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Tight";
  src: url("./assets/fonts/inter-tight-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #f6f3ec;
  --paper: #fffdf8;
  --ink: #232a26;
  --muted: #4d584f;
  --line: #d8d3c6;
  --accent: #a8512c;
  --accent-ink: #fffdf8;
  --stage: #2f3b33;
  --stage-bg: #dde3d2;
  --mat: #c3cfb2;
  --mat-line: #aebb9c;
  --danger: #a82424;
  --warn-bg: #fff2ba;
  --warn-ink: #442d05;
  --art: #172328;
  --art-ink: #e3e7e3;
  --tint: #dce6d5;
  --tint-2: #e5eddf;
  --on-dark: #fff;
  --shadow: #0002;
  --backdrop: #101510aa;
  --radius: 3px;
  color-scheme: light;
  --heading: Newsreader, Georgia, "Times New Roman", serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
/* Dark scheme. Every token above is redefined here and nowhere else, so a
   colour can never be defined only in the dark block. The stage and the
   posters are dark in both schemes; the mat keeps its sage in a lower key,
   and the clay accent is lifted so it still reads as the one warm thing. The
   three-state setting writes data-scheme on the root; with no setting the
   system preference decides. */
:root[data-scheme="dark"] {
  --bg: #161a17;
  --paper: #1f2521;
  --ink: #ece9df;
  --muted: #b5bbae;
  --line: #3b433d;
  --accent: #dd865c;
  --accent-ink: #161a17;
  --stage: #2f3b33;
  --stage-bg: #1a211c;
  --mat: #34443a;
  --mat-line: #4b5d4f;
  --danger: #f29a9a;
  --warn-bg: #4a3b10;
  --warn-ink: #ffe7a8;
  --art: #172328;
  --art-ink: #e3e7e3;
  --tint: #242d27;
  --tint-2: #212a24;
  --on-dark: #fff;
  --shadow: #0009;
  --backdrop: #000000b3;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme="light"]) {
    --bg: #161a17;
    --paper: #1f2521;
    --ink: #ece9df;
    --muted: #b5bbae;
    --line: #3b433d;
    --accent: #dd865c;
    --accent-ink: #161a17;
    --stage: #2f3b33;
    --stage-bg: #1a211c;
    --mat: #34443a;
    --mat-line: #4b5d4f;
    --danger: #f29a9a;
    --warn-bg: #4a3b10;
    --warn-ink: #ffe7a8;
    --art: #172328;
    --art-ink: #e3e7e3;
    --tint: #242d27;
    --tint-2: #212a24;
    --on-dark: #fff;
    --shadow: #0009;
    --backdrop: #000000b3;
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}
button {
  border: 0;
  background: none;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--heading);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.045em;
}
h1 {
  font-size: clamp(44px, 6vw, 84px);
}
h2 {
  font-size: clamp(30px, 3.4vw, 48px);
}
h3 {
  font-size: 28px;
}
p {
  color: var(--muted);
}
small,
.fine {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 700;
  line-height: 1.5;
  color: var(--muted);
}
.skip {
  position: fixed;
  z-index: 100;
  left: 20px;
  top: -100px;
  background: var(--accent);
  /* The clay accent is dark, so the skip link needs the light on-colour. Ink on
     clay measured 2.71:1, and the skip link is the first thing a keyboard
     reader lands on. */
  color: var(--accent-ink);
  padding: 12px;
  border-radius: 3px;
}
.skip:focus {
  top: 12px;
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 0 56px 80px;
  min-height: 70vh;
  outline: none;
}
main:fullscreen {
  background: var(--bg);
  padding: 30px;
  overflow: auto;
}
.site-header {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 56px;
  border-bottom: 1px solid var(--line);
  max-width: 1552px;
  margin: auto;
}
.brand {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.06em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 32px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  font-size: 27px;
  line-height: 1;
  border-radius: 3px;
}
.site-header nav {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
}
.site-header nav a {
  padding: 15px 0;
  position: relative;
}
.site-header nav a[aria-current="page"]:after {
  position: absolute;
  content: "";
  bottom: 5px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--ink);
}
.header-cta {
  border: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  gap: 25px;
  padding: 12px 16px;
  border-radius: var(--radius);
}
.header-cta span {
  font-size: 18px;
  line-height: 1;
}
.hero {
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  gap: 48px;
  padding: 62px 0 48px;
  align-items: center;
}
.hero-copy h1 {
  margin: 27px 0 25px;
  line-height: 0.97;
}
.hero-copy .intro {
  font-size: 17px;
  max-width: 390px;
  line-height: 1.7;
}
.status-dot {
  display: inline-block;
  background: currentColor;
  height: 7px;
  width: 7px;
  border-radius: 50%;
  margin-right: 8px;
}
.hero-photo {
  position: relative;
  height: 515px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--stage-bg);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-photo:after {
  content: "";
  position: absolute;
  inset: 50% 0 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}
.hero-photo figcaption {
  position: absolute;
  z-index: 1;
  bottom: 22px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  color: var(--on-dark);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.hero-actions {
  display: flex;
  gap: 25px;
  align-items: center;
  margin: 32px 0;
}
.button {
  min-height: 46px;
  padding: 13px 20px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  transition:
    transform 0.15s,
    background 0.15s;
}
.button:hover {
  transform: translateY(-2px);
}
.primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.secondary {
  background: transparent;
  border: 1px solid var(--ink);
}
.quiet {
  background: transparent;
  padding-left: 12px;
  padding-right: 12px;
}
.text-link {
  font-size: 12px;
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  font-size: 10px;
  color: var(--muted);
  margin-top: 40px;
}
.hero-proof span + span:before {
  content: "·";
  margin-right: 16px;
}
.start-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.start-strip div {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.start-strip b {
  color: var(--muted);
  font-size: 11px;
  border: 1px solid var(--line);
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 56px 0 24px;
}
.section-head h2 {
  font-size: 34px;
  margin-top: 10px;
}
.program-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.program-card {
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pill {
  display: inline-block;
  font-size: 10px;
  border: 1px solid var(--line);
  border-radius: 50px;
  padding: 5px 10px;
  white-space: nowrap;
  color: var(--ink);
}
.program-card h3 {
  margin: 28px 0 14px;
}
.program-card p {
  font-size: 13px;
  min-height: 42px;
  line-height: 1.7;
}
.program-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 11px;
  color: var(--muted);
  margin: 24px 0 14px;
}
.program-meta span + span:before {
  content: "·";
  margin-right: 15px;
}
.card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 50px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  margin-top: 20px;
  padding: 15px 0 0;
  text-align: left;
}
.card-link span {
  font-size: 23px;
}
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 70px 0 60px;
  gap: 72px;
  align-items: center;
}
.feature-split h2 {
  white-space: pre-line;
  margin: 18px 0 20px;
}
.feature-split p {
  max-width: 400px;
  font-size: 15px;
  line-height: 1.8;
}
.feature-split .button {
  margin-top: 28px;
}
.feature-art {
  background: var(--stage-bg);
  color: var(--stage);
  height: 330px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
}
.feature-art > span {
  font-size: 54px;
  letter-spacing: -0.06em;
  line-height: 1;
  font-weight: 700;
  z-index: 1;
  white-space: pre-line;
}
.orbit {
  position: absolute;
  border: 1px solid currentColor;
  opacity: 0.18;
  border-radius: 50%;
  width: 250px;
  height: 250px;
}
.o1 {
  left: -20px;
}
.o2 {
  right: -20px;
}
.o3 {
  width: 370px;
  height: 370px;
}
.faq {
  border-top: 1px solid var(--line);
}
details {
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
}
summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  min-height: 28px;
}
details p {
  max-width: 850px;
  margin-top: 16px;
  line-height: 1.8;
  font-size: 14px;
}
footer {
  max-width: 1552px;
  margin: auto;
  border-top: 1px solid var(--line);
  padding: 40px 56px;
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
footer p {
  font-size: 12px;
}
footer > div {
  margin-left: auto;
  display: flex;
  gap: 20px;
  font-size: 11px;
}
footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
footer small {
  flex-basis: 100%;
  font-size: 10px;
}
.page-title {
  padding: 56px 0 36px;
  max-width: 950px;
}
.page-title h1 {
  font-size: clamp(38px, 4.6vw, 62px);
  margin: 18px 0;
}
.page-title > p:last-child:not(:first-child) {
  font-size: 16px;
  max-width: 620px;
}
.filterbar {
  display: flex;
  gap: 22px;
  align-items: end;
  margin: 12px 0 24px;
}
.search-label {
  flex: 1;
}
label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
input,
select,
textarea {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  min-height: 46px;
  padding: 12px 14px;
  border-radius: var(--radius);
  width: 100%;
  min-width: 0;
  line-height: 1.4;
}
select {
  padding-right: 30px;
}
textarea {
  resize: vertical;
}
.check-label {
  flex-direction: row;
  align-items: center;
  min-height: 46px;
  padding: 0 10px;
  white-space: nowrap;
}
.check-label input,
input[type="checkbox"] {
  width: 19px;
  min-height: 19px;
  height: 19px;
  accent-color: var(--ink);
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 28px;
}
.chip {
  padding: 11px 18px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 50px;
  min-height: 44px;
  background: var(--paper);
}
.chip.active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.drill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.drill-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper);
}
.drill-art {
  background: var(--stage-bg);
  color: var(--stage);
  display: block;
  position: relative;
  width: 100%;
  height: 225px;
  overflow: hidden;
  padding: 0;
}
.drill-art svg {
  height: 100%;
  width: 100%;
}
.art-arrow {
  position: absolute;
  right: 15px;
  bottom: 15px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
}
.drill-body {
  padding: 20px 24px;
}
.favorite-toggle {
  width: 44px;
  height: 44px;
  font-size: 25px;
}
.drill-body h2 {
  font-size: 24px;
  margin: 4px 0 14px;
}
.drill-body h2 button {
  text-align: left;
  font: inherit;
  letter-spacing: inherit;
  padding: 0;
  min-height: 44px;
}
.drill-body p {
  font-size: 13px;
  line-height: 1.75;
  min-height: 65px;
}
.drill-body .program-meta {
  margin-bottom: 0;
}
.empty {
  padding: 60px 30px;
  border: 1px dashed var(--line);
  text-align: center;
  grid-column: 1/-1;
}
.empty h2 {
  font-size: 26px;
}
.empty p {
  max-width: 450px;
  margin: 20px auto;
}
.empty-mark {
  font-size: 50px;
  display: block;
  margin-bottom: 24px;
}
.study-layout,
.composer-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
}
.study-canvas,
.composer-canvas {
  padding: 24px;
  background: var(--stage-bg);
  border-radius: var(--radius);
  color: var(--stage);
}
.study-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.study-label .eyebrow {
  color: var(--stage);
}
.motion-stage {
  max-width: 650px;
  margin: auto;
  width: 100%;
  color: var(--stage);
}
.motion-stage svg {
  display: block;
  width: 100%;
  height: auto;
}
.study-progress {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.beat {
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 11px;
  min-height: 44px;
  background: var(--paper);
  color: var(--ink);
}
.beat.selected {
  background: var(--ink);
  color: var(--bg);
}
.beat span {
  margin-left: 5px;
}
.study-controls {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  margin: 25px 0 16px;
}
.study-controls label {
  font-size: 10px;
}
.study-controls select {
  min-height: 44px;
}
.study-notes {
  padding: 22px 0;
}
.study-notes h2 {
  margin: 20px 0;
  font-size: 42px;
}
.study-notes > p {
  line-height: 1.8;
}
.cue-list {
  list-style: none;
  counter-reset: cue;
  padding: 0;
  margin: 28px 0;
}
.cue-list li {
  counter-increment: cue;
  position: relative;
  padding: 18px 0 18px 40px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.8;
}
.cue-list li:before {
  content: "0" counter(cue);
  position: absolute;
  left: 0;
  font-size: 11px;
  color: var(--muted);
}
.full {
  width: 100%;
  margin-top: 12px;
}
.study-notes .fine {
  margin-top: 24px;
}
.builder-layout {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 35px;
  align-items: start;
}
.builder-toolbar {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 24px;
}
.builder-toolbar > label {
  flex: 1;
}
.builder-toolbar > div {
  display: flex;
  gap: 5px;
}
.block {
  display: flex;
  gap: 18px;
  padding: 22px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.block-num {
  font-size: 13px;
  font-weight: 700;
  margin-top: 25px;
}
.block-main {
  flex: 1;
  min-width: 0;
}
.block-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.block-actions {
  display: flex;
  flex-direction: column;
}
.block-actions button,
.icon-button {
  min-width: 44px;
  min-height: 44px;
  font-size: 21px;
}
.add-block {
  border: 1px dashed var(--muted);
  width: 100%;
  padding: 18px;
  min-height: 54px;
  font-size: 13px;
  border-radius: var(--radius);
}
.session-summary {
  padding: 30px;
  background: var(--stage-bg);
  color: var(--stage);
  border-radius: var(--radius);
  position: sticky;
  top: 24px;
}
.summary-time {
  font-size: clamp(50px, 5vw, 80px);
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 1.3;
  margin: 16px 0;
}
.summary-stats {
  display: flex;
  gap: 25px;
  font-size: 12px;
}
.summary-stats b {
  font-size: 18px;
  margin-right: 5px;
}
.timeline {
  display: flex;
  gap: 4px;
  margin: 25px 0;
}
.timeline > div {
  min-width: 14px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--stage);
  color: var(--stage-bg);
  font-size: 10px;
  border-radius: 2px;
}
.session-summary p {
  font-size: 13px;
}
.session-notice {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.8;
}
.custom-sequence {
  font-size: 11px;
  margin-top: 10px;
}
.sequence-track {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sequence-track button {
  background: var(--paper);
  color: var(--ink);
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  border-radius: var(--radius);
  min-height: 50px;
  font-size: 10px;
}
.sequence-track b {
  font-size: 12px;
}
.sequence-track span {
  font-size: 18px;
}
.action-palette {
  padding: 24px 0;
}
.action-palette h2 {
  margin: 18px 0 25px;
}
.action-palette > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.action-palette > div button {
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 48px;
  text-align: left;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.atlas-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: start;
}
.atlas-map {
  position: relative;
  aspect-ratio: 1;
  min-height: 370px;
  background: var(--stage-bg);
  border-radius: var(--radius);
  color: var(--stage);
}
.atlas-map > svg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.atlas-legend {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 20px;
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 0.1em;
}
.position-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 50px;
  padding: 14px 16px;
  white-space: nowrap;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
}
.position-node.selected {
  background: var(--stage);
  color: var(--stage-bg);
}
.atlas-map > .fine {
  position: absolute;
  bottom: 18px;
  left: 24px;
  right: 24px;
  font-size: 10px;
}
.position-detail {
  padding: 24px 0;
}
.position-detail h2 {
  margin: 22px 0;
}
.position-detail blockquote {
  font-family: Georgia, serif;
  font-size: 28px;
  line-height: 1.45;
  margin: 24px 0;
}
.position-detail > p {
  font-size: 14px;
  line-height: 1.8;
}
.linked-positions {
  margin-top: 30px;
}
.linked-positions .eyebrow {
  margin-bottom: 12px;
}
.linked-positions button {
  margin: 5px;
}
.journal-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding: 25px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}
.journal-stats > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.journal-stats b {
  font-size: 44px;
  line-height: 1.2;
  letter-spacing: -0.05em;
}
.journal-stats span {
  font-size: 12px;
  color: var(--muted);
}
.journal-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
}
.journal-layout .section-head {
  margin-top: 5px;
}
.journal-list article {
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.journal-list h3 {
  font-size: 25px;
  margin: 10px 0;
}
.entry-note {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.note-panel {
  padding: 30px;
  background: var(--stage-bg);
  border-radius: var(--radius);
  align-self: start;
}
.note-panel h2 {
  font-size: 30px;
  margin: 18px 0 24px;
}
.note-panel form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.panel {
  padding: 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel h2 {
  font-size: 29px;
  margin-bottom: 24px;
}
.panel p {
  font-size: 14px;
  line-height: 1.8;
  margin: 18px 0;
}
.toggle-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.toggle-row span {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toggle-row small {
  font-weight: 400;
  max-width: 320px;
}
.file-label {
  margin: 24px 0 10px;
}
.file-label input {
  font-size: 12px;
  padding: 10px;
}
.danger {
  color: var(--danger);
}
.player-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 0;
  gap: 20px;
}
.player {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 30px;
  align-items: center;
  min-height: 550px;
}
.player-left {
  padding: 24px 0;
}
.player-state {
  display: flex;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 700;
}
.player-state #round-label {
  margin-left: auto;
  color: var(--muted);
}
.player h1 {
  font-size: 36px;
  margin-top: 35px;
  min-height: 80px;
}
.player-clock {
  font-size: clamp(90px, 12vw, 165px);
  font-weight: 600;
  letter-spacing: -0.09em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.player progress {
  display: block;
  width: 100%;
  height: 5px;
  border: 0;
  background: var(--line);
  accent-color: var(--ink);
  margin: 25px 0;
}
.player progress::-webkit-progress-bar {
  background: var(--line);
}
.player progress::-webkit-progress-value {
  background: var(--ink);
}
#player-cue {
  min-height: 54px;
  font-size: 14px;
  max-width: 420px;
}
.player-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.player-visual {
  background: var(--stage-bg);
  padding: 24px;
  border-radius: var(--radius);
  color: var(--stage);
}
.action-label {
  text-align: center;
  font-size: 24px;
  color: var(--stage);
  font-weight: 600;
}
.player-visual .fine {
  text-align: center;
  margin: 20px 0 10px;
}
.player-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 25px 0;
  font-size: 10px;
  color: var(--muted);
}
.storage-warning {
  padding: 15px 30px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 13px;
  text-align: center;
}
.storage-warning[hidden] {
  display: none;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 25px);
  background: var(--ink);
  color: var(--bg);
  padding: 16px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  width: max-content;
  max-width: calc(100% - 32px);
  box-shadow: 0 12px 40px var(--shadow);
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 35px;
  max-width: 470px;
  width: calc(100% - 32px);
  color: var(--ink);
  background: var(--paper);
}
dialog::backdrop {
  background: var(--backdrop);
  backdrop-filter: blur(5px);
}
dialog h2 {
  font-size: 30px;
}
dialog p {
  margin: 22px 0;
  font-size: 14px;
  line-height: 1.8;
}
.dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: end;
}
.large-controls .button,
.large-controls input,
.large-controls select {
  min-height: 60px;
  font-size: 16px;
}
.policy {
  max-width: 800px;
  margin: auto;
  padding-top: 60px;
}
.policy h1 {
  font-size: 52px;
  margin-bottom: 30px;
}
.policy h2 {
  font-size: 28px;
  margin: 35px 0 18px;
}
.policy p,
.policy li {
  font-size: 15px;
  line-height: 1.9;
  margin-bottom: 18px;
}
.policy a {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.policy .button {
  text-decoration: none;
}
.reduced-motion * {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
body {
  background: var(--bg);
  color: var(--ink);
}

.hero-bjj {
  grid-template-columns: 1.15fr 1fr;
  gap: 55px;
}
.hero-bjj h1 {
  font-size: clamp(46px, 6vw, 80px);
  font-weight: 400;
  letter-spacing: -0.05em;
}
.hero-bjj .hero-photo {
  height: 450px;
  border-radius: 10px 100px 10px 10px;
}
.hero-bjj .hero-proof {
  max-width: 360px;
}
.hero-bjj .hero-actions {
  flex-wrap: wrap;
  gap: 15px;
}
body[data-theme="bjj"] .start-strip b {
  background: var(--tint);
  border: 0;
  width: 35px;
  height: 35px;
}
body[data-theme="bjj"] .program-card:nth-child(2) {
  background: var(--tint-2);
}
body[data-theme="bjj"] h2,
body[data-theme="bjj"] h3 {
  font-weight: 400;
}
body[data-theme="bjj"] .feature-split {
  grid-template-columns: 1.1fr 1fr;
}
body[data-theme="bjj"] .feature-art {
  border-radius: 100px 10px 100px 10px;
}
@media (min-width: 1600px) {
  .site-header {
    padding-left: 80px;
    padding-right: 80px;
  }
}
@media (max-width: 1100px) {
  main {
    padding: 0 32px 60px;
  }
  .site-header {
    padding: 0 32px;
    gap: 20px;
  }
  .site-header nav {
    gap: 15px;
  }
  .settings-link {
    display: none;
  }
  .brand {
    font-size: 17px;
  }
  .header-cta {
    gap: 10px;
  }
  .hero,
  .hero-bjj {
    gap: 30px;
  }
  .hero-photo {
    height: 440px;
  }
  .hero-actions {
    gap: 14px;
    flex-wrap: wrap;
  }
  .hero-proof {
    font-size: 9px;
  }
  .start-strip {
    gap: 12px;
  }
  .start-strip .eyebrow {
    max-width: 120px;
  }
  .start-strip div {
    font-size: 11px;
    gap: 7px;
  }
  .program-card {
    padding: 23px;
  }
  .program-card h3 {
    font-size: 25px;
  }
  .feature-split {
    gap: 40px;
  }
  .builder-layout {
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
  }
  .session-summary {
    padding: 23px;
  }
  .block {
    gap: 10px;
    padding: 18px 12px;
  }
  .block-inputs {
    gap: 7px;
  }
  .block-actions button {
    min-width: 38px;
  }
  .journal-layout,
  .study-layout,
  .composer-layout,
  .atlas-layout {
    gap: 28px;
  }
  .study-controls .button {
    padding: 12px;
  }
  .player-clock {
    font-size: 120px;
  }
  .player h1 {
    font-size: 32px;
  }
  footer {
    padding: 30px 32px;
  }
  .study-notes h2 {
    font-size: 35px;
  }
}
@media (max-width: 800px) {
  .site-header {
    height: auto;
    min-height: 90px;
    padding-top: 18px;
    padding-bottom: 14px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .site-header nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }
  .site-header nav a {
    font-size: 12px;
    padding: 10px 0;
  }
  .settings-link {
    display: inline-block;
  }
  .header-cta {
    margin-left: auto;
  }
  .hero,
  .hero-bjj {
    padding-top: 40px;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }
  .hero-copy h1 {
    font-size: 55px;
  }
  .hero-copy .intro {
    font-size: 14px;
  }
  .hero-photo,
  .hero-bjj .hero-photo {
    height: 400px;
  }
  .hero-proof {
    margin-top: 22px;
    gap: 7px;
  }
  .hero-proof span + span:before {
    margin-right: 8px;
  }
  .hero-photo figcaption {
    left: 15px;
    right: 15px;
    font-size: 7px;
  }
  .hero-photo figcaption span:last-child {
    display: none;
  }
  .start-strip {
    flex-wrap: wrap;
    padding: 22px 0;
  }
  .start-strip > .eyebrow {
    flex-basis: 100%;
    max-width: none;
  }
  .program-grid {
    gap: 14px;
  }
  .program-card {
    padding: 20px;
  }
  .program-card h3 {
    font-size: 23px;
  }
  .program-card .card-top {
    align-items: start;
    flex-direction: column;
  }
  .program-card p {
    font-size: 12px;
  }
  .card-link {
    font-size: 11px;
    gap: 10px;
  }
  .drill-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .study-layout,
  .composer-layout,
  .builder-layout,
  .atlas-layout {
    grid-template-columns: 1fr;
  }
  .session-summary {
    position: static;
  }
  .builder-toolbar {
    gap: 20px;
  }
  .block {
    padding: 20px;
    gap: 20px;
  }
  .block-actions button {
    min-width: 44px;
  }
  .summary-time {
    font-size: 70px;
  }
  .session-summary {
    display: block;
  }
  .study-notes {
    padding: 0;
  }
  .study-notes h2 {
    font-size: 35px;
  }
  .study-layout {
    gap: 10px;
  }
  .study-canvas .motion-stage {
    max-width: 430px;
  }
  .action-palette > div {
    grid-template-columns: repeat(3, 1fr);
  }
  .atlas-map {
    max-width: 560px;
    width: 100%;
    margin: auto;
  }
  .journal-layout {
    grid-template-columns: 1fr;
  }
  .note-panel {
    order: -1;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .player {
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
    gap: 20px;
  }
  .player-clock {
    font-size: 100px;
  }
  .player-visual {
    padding: 15px;
  }
  .player h1 {
    font-size: 28px;
  }
  .player-heading > .eyebrow {
    max-width: 230px;
  }
  .player-controls .button {
    padding: 12px;
  }
  .feature-split {
    gap: 30px;
  }
  .feature-art {
    height: 280px;
  }
  .feature-art > span {
    font-size: 40px;
  }
  .feature-split h2 {
    font-size: 32px;
  }
  .feature-split p {
    font-size: 13px;
  }
  .section-head h2 {
    font-size: 30px;
  }
  footer > div {
    margin-left: 0;
  }
  footer {
    gap: 15px 30px;
  }
}
@media (max-width: 600px) {
  main {
    padding: 0 20px 48px;
  }
  .site-header {
    padding: 18px 20px 12px;
  }
  .brand {
    font-size: 17px;
  }
  .brand-mark {
    width: 26px;
    height: 30px;
    font-size: 22px;
  }
  .header-cta {
    font-size: 10px;
    padding: 10px 12px;
    min-height: 44px;
  }
  .site-header nav {
    overflow-x: auto;
    white-space: nowrap;
    gap: 20px;
    justify-content: flex-start;
  }
  .hero,
  .hero-bjj {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 36px 0 34px;
  }
  .hero-copy h1 {
    font-size: 68px;
    margin: 23px 0 20px;
    line-height: 0.97;
  }
  .hero-copy .intro {
    font-size: 15px;
    max-width: 420px;
  }
  .hero-actions {
    margin: 25px 0 20px;
  }
  .hero-proof {
    margin-top: 25px;
    font-size: 10px;
    gap: 10px;
  }
  .hero-photo,
  .hero-bjj .hero-photo {
    height: 340px;
    transform: none;
  }
  .hero-bjj .hero-photo {
    border-radius: 10px 80px 10px 10px;
  }
  .hero-photo figcaption {
    font-size: 9px;
    left: 20px;
    right: 20px;
  }
  .hero-photo figcaption span:last-child {
    display: block;
  }
  .start-strip {
    gap: 18px 12px;
    display: grid;
    grid-template-columns: 1fr;
  }
  .start-strip div {
    font-size: 13px;
    gap: 14px;
  }
  .start-strip .eyebrow {
    margin-bottom: 5px;
  }
  .program-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .program-card {
    padding: 25px;
  }
  .program-card .card-top {
    flex-direction: row;
    align-items: center;
  }
  .program-card h3 {
    font-size: 30px;
    margin-top: 24px;
  }
  .program-card p {
    min-height: 0;
    font-size: 14px;
  }
  .program-meta {
    font-size: 12px;
  }
  .card-link {
    font-size: 13px;
  }
  .section-head {
    margin-top: 40px;
    align-items: center;
    gap: 15px;
  }
  .section-head h2 {
    font-size: 30px;
  }
  .section-head .text-link {
    font-size: 11px;
    white-space: nowrap;
  }
  .feature-split,
  body[data-theme="bjj"] .feature-split {
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 48px 0;
  }
  .feature-art {
    height: 280px;
  }
  .feature-split h2 {
    font-size: 38px;
  }
  .feature-split p {
    font-size: 15px;
  }
  .page-title {
    padding: 36px 0 25px;
  }
  .page-title h1 {
    font-size: 40px;
  }
  .page-title > p:last-child:not(:first-child) {
    font-size: 14px;
  }
  .filterbar {
    flex-wrap: wrap;
    gap: 16px;
  }
  .search-label {
    flex-basis: 100%;
  }
  .filterbar > label:not(.search-label) {
    flex: 1;
  }
  .check-label {
    padding: 0;
    white-space: normal;
  }
  .drill-grid {
    gap: 14px;
  }
  .drill-art {
    height: 160px;
  }
  .drill-body {
    padding: 12px 15px 18px;
  }
  .drill-body h2 {
    font-size: 22px;
    margin-top: 0;
  }
  .drill-body p {
    font-size: 12px;
    min-height: 0;
  }
  .drill-body .eyebrow {
    font-size: 9px;
    letter-spacing: 0.08em;
  }
  .drill-body .program-meta {
    font-size: 10px;
    gap: 5px;
    margin-top: 16px;
  }
  .program-meta span + span:before {
    margin-right: 8px;
  }
  .drill-body .program-meta span + span:before {
    content: "";
    margin: 0;
  }
  .drill-body .program-meta span {
    display: block;
    flex-basis: 100%;
  }
  .art-arrow {
    width: 30px;
    height: 30px;
    right: 8px;
    bottom: 8px;
  }
  .favorite-toggle {
    font-size: 22px;
    min-width: 36px;
  }
  .study-canvas,
  .composer-canvas {
    padding: 16px;
  }
  .study-controls {
    gap: 8px;
  }
  .study-controls .button {
    font-size: 12px;
  }
  .study-notes h2 {
    font-size: 32px;
  }
  .cue-list li {
    font-size: 13px;
  }
  .builder-toolbar {
    flex-wrap: wrap;
    gap: 15px;
  }
  .builder-toolbar > label {
    flex-basis: 100%;
  }
  .builder-toolbar > div {
    width: 100%;
    justify-content: end;
  }
  .block {
    padding: 16px 12px;
    gap: 10px;
    position: relative;
  }
  .block-num {
    font-size: 11px;
  }
  .block-actions {
    flex-direction: row;
    position: absolute;
    top: 10px;
    right: 10px;
    gap: 4px;
  }
  .block-actions button {
    min-width: 36px;
    min-height: 36px;
  }
  .block-main {
    padding-top: 44px;
  }
  .block-inputs {
    gap: 8px;
  }
  .block-inputs label {
    font-size: 9px;
  }
  .block-inputs input {
    padding: 10px;
  }
  .block-main > label {
    font-size: 11px;
  }
  .session-summary {
    padding: 25px;
  }
  .action-palette > div {
    grid-template-columns: repeat(2, 1fr);
  }
  .sequence-track button {
    gap: 8px;
    padding: 10px;
  }
  .atlas-map {
    min-height: 340px;
  }
  .position-node {
    font-size: 11px;
    padding: 11px;
    gap: 8px;
    min-height: 44px;
  }
  .atlas-legend {
    font-size: 8px;
  }
  .atlas-map > .fine {
    font-size: 9px;
    left: 16px;
    right: 16px;
    bottom: 10px;
  }
  .position-detail blockquote {
    font-size: 25px;
  }
  .journal-stats {
    gap: 10px;
  }
  .journal-stats b {
    font-size: 34px;
  }
  .journal-stats span {
    font-size: 10px;
  }
  .note-panel,
  .panel {
    padding: 23px;
  }
  .form-row {
    gap: 10px;
    grid-template-columns: 1.1fr 1fr;
  }
  .journal-list article {
    padding: 20px;
  }
  .journal-list h3 {
    font-size: 24px;
  }
  .player-heading {
    padding: 20px 0;
    gap: 10px;
    flex-wrap: wrap;
  }
  .player-heading > .eyebrow {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
  .player {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .player-left {
    padding: 0;
  }
  .player h1 {
    min-height: 0;
    font-size: 30px;
    margin-top: 20px;
  }
  .player-clock {
    font-size: 116px;
  }
  .player #player-cue {
    min-height: 44px;
  }
  .player-visual {
    max-width: 440px;
    width: 100%;
    margin: auto;
  }
  .player-visual .motion-stage {
    max-width: 280px;
  }
  .player-controls {
    gap: 6px;
  }
  .player-controls .button {
    font-size: 12px;
    padding: 12px 14px;
  }
  .player-bottom {
    font-size: 9px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .player-bottom > span:first-child {
    max-width: 140px;
  }
  .study-label .pill {
    font-size: 9px;
  }
  .study-label .eyebrow {
    font-size: 9px;
  }
  .policy {
    padding-top: 36px;
  }
  .policy h1 {
    font-size: 40px;
  }
  .policy h2 {
    font-size: 26px;
  }
  footer {
    padding: 25px 20px;
    display: block;
  }
  footer p {
    margin: 15px 0;
  }
  footer > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0 20px;
  }
  footer small {
    display: block;
    margin-top: 15px;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
  dialog {
    padding: 25px;
  }
  dialog h2 {
    font-size: 27px;
  }
}
@media (max-width: 360px) {
  main {
    padding-left: 16px;
    padding-right: 16px;
  }
  .site-header {
    padding-left: 16px;
    padding-right: 16px;
  }
  .header-cta {
    padding: 10px;
    font-size: 9px;
    gap: 8px;
  }
  .brand {
    font-size: 15px;
    gap: 7px;
  }
  .hero-copy h1 {
    font-size: 58px;
  }
  .hero-proof {
    font-size: 9px;
  }
  .hero-proof span + span:before {
    margin-right: 6px;
  }
  .hero-photo figcaption {
    font-size: 8px;
  }
  .drill-grid {
    grid-template-columns: 1fr;
  }
  .drill-art {
    height: 215px;
  }
  .drill-body {
    padding: 18px 20px;
  }
  .drill-body .program-meta span {
    flex-basis: auto;
  }
  .drill-body p {
    font-size: 13px;
  }
  .block {
    padding-left: 9px;
    padding-right: 9px;
    gap: 6px;
  }
  .block-inputs {
    gap: 5px;
  }
  .block-inputs label {
    font-size: 8px;
  }
  .atlas-map {
    min-height: 300px;
  }
  .position-node {
    font-size: 10px;
    padding: 10px 8px;
    gap: 4px;
  }
  .atlas-legend {
    left: 12px;
    right: 12px;
  }
  .atlas-map > .fine {
    font-size: 8px;
  }
  .section-head h2 {
    font-size: 26px;
  }
  .player-clock {
    font-size: 105px;
  }
  .note-panel,
  .panel {
    padding: 19px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    gap: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
@media (forced-colors: active) {
  .button,
  .position-node,
  .chip {
    border: 1px solid ButtonText;
  }
  .program-card,
  .drill-card,
  .panel {
    border: 1px solid CanvasText;
  }
  .motion-stage {
    color: CanvasText;
  }
  .brand-mark {
    border: 1px solid CanvasText;
  }
}
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
  }
  header,
  footer,
  .skip,
  #toast,
  dialog,
  .builder-toolbar > div,
  .block-actions,
  .add-block,
  .session-summary .button,
  .storage-warning {
    display: none !important;
  }
  main {
    padding: 0;
    max-width: none;
  }
  .page-title {
    padding: 0 0 20px;
  }
  .page-title h1 {
    font-size: 26pt;
  }
  .builder-layout {
    display: block;
  }
  .block {
    break-inside: avoid;
    border: 1px solid #777;
    background: #fff;
    padding: 12px;
  }
  .block-main {
    padding: 0;
  }
  .block-num {
    margin-top: 0;
  }
  .block-inputs {
    display: flex;
    gap: 25px;
  }
  .block-inputs label {
    font-size: 10pt;
  }
  .session-summary {
    position: static;
    background: white;
    color: black;
    padding: 15px 0;
  }
  .summary-time {
    font-size: 30pt;
  }
  input,
  select {
    border: 0 !important;
    background: white !important;
    color: black !important;
    padding: 0;
    min-height: 0;
    appearance: none;
  }
  .timeline {
    display: none;
  }
  .session-summary p,
  .session-summary .eyebrow {
    color: black !important;
  }
  .hero-photo {
    height: 220px !important;
  }
  .program-grid {
    display: block;
  }
  .program-card {
    break-inside: avoid;
  }
  .player-controls {
    display: none;
  }
}

body[data-theme="bjj"] .start-strip b {
  color: var(--ink);
}
/* Lock state and the Premium link, keyed builds only. The stylesheet rules
   live here so the app shell does not load a second sheet; premium.css is the
   billing pages' own. */
.lock-note { display: grid; gap: 10px; padding: 18px 20px; margin: 18px 0; border-left: 3px solid var(--accent); background: var(--paper); border-radius: 0 var(--radius) var(--radius) 0; }
.lock-note p { margin: 0; max-width: 60ch; }
.lock-note .lock-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.lock-note .button { min-height: 44px; }
.locked-study { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.locked-study .locked-poster { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--stage); }
.study-tag { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.locked-study .first-cue { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
@media (min-width: 768px) { .locked-study { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } }
.site-header nav .premium-link { font-weight: 650; color: var(--accent); }
[data-lock] .drill-art, [data-lock] .card-link { opacity: 0.78; }
/* Gym mode: a wall clock for the mat. Landscape first; the clock is sized
   from the viewport so it reads from three metres on a tablet or a screen. */
.gym { display: grid; gap: 12px; min-height: calc(100vh - 120px); }
.gym-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; font-size: 14px; }
.gym-session { font-family: var(--heading); font-size: 20px; font-weight: 600; }
.gym-state { display: flex; gap: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; }
.gym-top .button { margin-left: auto; min-height: 44px; }
.gym-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: center; }
.gym-clock-wrap { display: grid; gap: 10px; text-align: center; }
.gym-clock { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: clamp(88px, 26vw, 360px); line-height: 0.95; letter-spacing: -0.03em; color: var(--ink); transition: color 0.2s; }
.gym-clock.warning { color: var(--accent); }
.gym-progress { width: 100%; height: 8px; accent-color: var(--accent); }
.gym-drill { margin: 0; font-family: var(--heading); font-size: clamp(28px, 5vw, 64px); font-weight: 600; line-height: 1.05; }
.gym-cue { margin: 0; font-size: clamp(18px, 2.6vw, 34px); line-height: 1.35; color: var(--ink); text-wrap: balance; }
.gym-stage { display: grid; gap: 8px; }
.gym-stage .motion-stage { max-width: 100%; }
.gym-stage .action-label { margin: 0; font-size: clamp(18px, 2.2vw, 28px); font-weight: 650; }
.gym-next { margin: 0; font-size: clamp(16px, 2vw, 24px); color: var(--muted); }
.gym-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.gym-controls .button { min-height: 56px; font-size: 18px; padding: 12px 24px; }
.gym-elapsed { margin-left: auto; font-family: var(--mono); font-size: 18px; color: var(--muted); }
.gym-keys { margin: 0; }
@media (min-width: 900px) and (orientation: landscape) {
  .gym-main { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .gym-clock { font-size: clamp(120px, 20vw, 360px); }
}
:fullscreen .gym, body[data-page="gym"]:fullscreen .gym { min-height: 100vh; }
@media (prefers-reduced-motion: reduce) { .gym-clock { transition: none; } }
:fullscreen body[data-page="gym"] .site-header, :fullscreen body[data-page="gym"] footer, :fullscreen body[data-page="gym"] #storage-warning[hidden] { display: none; }
/* Training records: the form under a study and the section on the journal. */
.record-panel { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.record-form { display: grid; gap: 14px; max-width: 640px; }
.record-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rating-set { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.rating-set legend { font-weight: 650; margin-bottom: 6px; }
.rating-option { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); cursor: pointer; min-height: 44px; }
.rating-option input { margin-top: 4px; accent-color: var(--accent); }
.rating-option span { display: grid; }
.rating-option small { color: var(--muted); }
.rating-option:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.records-section { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.records-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.record-list { display: grid; gap: 6px; margin: 16px 0; }
.record-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 8px 14px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); font-size: 14px; }
.record-row .record-note { grid-column: 1 / -1; color: var(--muted); }
.record-row .record-note:empty { display: none; }
.record-date { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.record-rating { font-variant-caps: all-small-caps; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 2px; border: 1px solid var(--line); }
.record-rating.rating-clean { border-color: var(--accent); color: var(--accent); }
@media (max-width: 600px) { .record-row { grid-template-columns: auto minmax(0, 1fr) auto; } .record-row .record-rounds, .record-row .record-rating { grid-column: span 1; } .record-form .form-row { grid-template-columns: 1fr; } }
/* Sheet ticks: a box for the printed sheet, filled when the session was
   finished and written down. */
.week-days li.done .day-plan { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.day-tick.done { position: relative; border-color: var(--accent); background: var(--accent); }
.day-tick.done::after { content: ""; position: absolute; left: 30%; top: 12%; width: 30%; height: 55%; border: solid var(--accent-ink); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.record-row > * { grid-row: 1; }
.record-row .record-note { grid-row: 2; }
.record-form [hidden] { display: none !important; }
.rating-option input { width: 20px; height: 20px; min-width: 0; min-height: 0; flex: 0 0 auto; }
/* Calendar controls on the sheet and in the builder. */
.calendar-start { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }
.calendar-start input { min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); font: inherit; font-weight: 400; }
.session-summary .calendar-start { margin: 10px 0; }
.progression-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.sheet-note { margin: 8px 0 16px; }
.week-cues { margin: 10px 0 0; font-size: 14px; }
.week-cues summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 650; }
.week-cues dt { font-weight: 650; margin-top: 8px; }
.week-cues dd { margin: 2px 0 0; color: var(--muted); }
/* Compare with camera. Tablet landscape is the first layout: camera and
   model side by side at the same height; phones stack. */
.camera-panel { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.camera-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 14px 0; }
.camera-frame { position: relative; aspect-ratio: 4 / 3; background: var(--art); border-radius: var(--radius); overflow: hidden; isolation: isolate; }
.camera-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--art); }
.camera-frame video.mirrored { transform: scaleX(-1); }
.camera-ghost { position: absolute; inset: 0; opacity: 0.48; pointer-events: none; mix-blend-mode: normal; }
.camera-ghost .human-study { aspect-ratio: auto; height: 100%; background: transparent; }
.camera-ghost .human-toolbar, .camera-ghost .human-status, .camera-ghost .human-help, .camera-ghost .human-retry { display: none !important; }
.camera-layout[data-mode="ghost"] .camera-model { display: none; }
.camera-layout[data-mode="ghost"] { grid-template-columns: minmax(0, 1fr); }
.camera-badge { position: absolute; top: 10px; left: 10px; padding: 4px 8px; font: 600 12px/1 var(--mono); letter-spacing: 0.08em; color: var(--on-dark); background: var(--danger); border-radius: 2px; z-index: 2; }
.camera-model .motion-stage { max-width: 100%; }
.camera-model-label { margin: 6px 0 0; }
.camera-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 10px 0; }
.camera-controls .button { min-height: 44px; }
.camera-controls .check-label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.camera-scrub-label { display: grid; gap: 6px; font-size: 13px; font-weight: 650; margin: 8px 0; }
.camera-scrub-label input { width: 100%; min-height: 44px; accent-color: var(--accent); }
.camera-status { margin: 6px 0 0; }
.camera-why { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
@media (min-width: 900px) and (orientation: landscape) { .camera-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
@media (prefers-reduced-motion: reduce) { .camera-badge { animation: none; } }
.camera-panel [hidden] { display: none !important; }
/* A file input as a brand button. The input stays in the tab order and keeps
   its accessible name; only its native box is out of sight, and the label
   shows the focus ring for it. */
.file-button { position: relative; overflow: hidden; cursor: pointer; margin: 10px 0; }
.file-button input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.file-button:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.gym-choose { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; margin: 16px 0; }
.gym-choice { display: grid; gap: 4px; text-align: left; min-height: 64px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); cursor: pointer; font: inherit; }
.gym-choice b { font-family: var(--heading); font-size: 18px; font-weight: 600; }
.gym-choice span { color: var(--muted); font-size: 13px; }
.gym-choice:hover, .gym-choice:focus-visible { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 1px; }
