/* The Course — the same family as the Reset Tracker:
   one ring in the middle, few words, bold Unbounded type, near-black silk.
   Glass lives only on what floats (the bottom bar, pills, menus, sheets). Content is never glass. */

:root {
  color-scheme: dark;
  --bg-rgb: 11 11 12;
  --fg-rgb: 237 237 234;
  --bg: rgb(var(--bg-rgb));
  --fg: rgb(var(--fg-rgb));
  --muted: rgb(var(--fg-rgb) / 0.62);
  --faint: rgb(var(--fg-rgb) / 0.36);
  --line: rgb(var(--fg-rgb) / 0.12);
  --accent: #2d5bff;
  --accent-rgb: 45 91 255;
  --accent-text: #8ea6ff;
  --on-accent: #fff;

  --f-sans: "Unbounded", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-read: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Playfair Display", "Times New Roman", Times, serif;

  --pad: 20px;
  --col: 1120px;
  --edge: max(var(--pad), calc((100vw - var(--col)) / 2 + var(--pad)));   /* the content column's edge */
  --r-m: 18px; --r-l: 26px; --r-pill: 999px;
  --bar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --bottom-space: calc(var(--bar-h) + 14px + var(--safe-b) + 56px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --glass-tint: rgb(255 255 255 / 0.045);
  --glass-tint-strong: rgb(26 27 31 / 0.9);
  --glass-rim-a: 0.55;
  --glass-shadow: 0 18px 40px -12px rgb(0 0 0 / 0.65), 0 4px 12px -2px rgb(0 0 0 / 0.4);
  --glass-shadow-s: 0 8px 20px -6px rgb(0 0 0 / 0.55), 0 2px 6px -1px rgb(0 0 0 / 0.35);
  --glass-blur: blur(18px) saturate(170%) brightness(1.05);
}

/* light theme (Settings › Theme): the tracker's light ground and glass */
:root[data-theme="light"] {
  color-scheme: light;
  --bg-rgb: 240 241 244;
  --fg-rgb: 13 13 14;
  --muted: rgb(var(--fg-rgb) / 0.6);
  --faint: rgb(var(--fg-rgb) / 0.34);
  --line: rgb(var(--fg-rgb) / 0.1);
  --glass-tint: rgb(255 255 255 / 0.5);
  --glass-tint-strong: rgb(250 250 252 / 0.94);
  --glass-rim-a: 0.95;
  --glass-shadow: 0 1px 2px rgb(28 34 52 / 0.08), 0 14px 30px -16px rgb(28 34 52 / 0.22);
  --glass-shadow-s: 0 1px 2px rgb(28 34 52 / 0.08), 0 6px 14px -8px rgb(28 34 52 / 0.16);
}
/* the silk is a dark cloth: a light page has none, a tinted page lets its colour through */
:root[data-theme="light"] .silk, :root[data-theme="light"] .silk-veil { display: none; }
:root[data-tint="on"] .silk { opacity: 0.3; }
:root[data-theme="light"] .c-bar { background: rgb(255 255 255 / 0.6); }
:root[data-theme="light"] .c-sheet__scrim { background: rgb(20 22 28 / 0.22); }
:root[data-theme="light"] .ring__shadow { fill: rgb(28 34 52 / 0.1); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  font: 400 15px/1.45 var(--f-sans);
  color: var(--fg);
  background: var(--bg);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
body.has-sheet { overflow: hidden; }
/* a soft fade under the floating bar, so text never collides with it */
body::after {
  content: ""; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: calc(118px + var(--safe-b)); pointer-events: none;
  background: linear-gradient(to top, var(--bg) 0, rgb(var(--bg-rgb) / 0.86) 38%, transparent);
}
/* the same under the floating pills at the top (desktop: the header stays, the text fades under it) */
body::before {
  content: ""; position: fixed; left: 0; right: 0; top: 0; z-index: 20; height: calc(96px + var(--safe-t)); pointer-events: none;
  background: linear-gradient(to bottom, var(--bg) 0, rgb(var(--bg-rgb) / 0.92) 56px, transparent);
}
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 8px; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input { font: inherit; color: inherit; }
ul, ol { list-style: none; }
svg { display: block; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; font-variant-numeric: lining-nums; }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.silk { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.4; }
.silk-veil { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(120% 80% at 50% 0%, transparent 40%, rgb(var(--bg-rgb) / 0.55)); }

/* ---------- glass (floating layer only) ---------- */
.glass {
  position: relative;
  isolation: isolate;
  background: var(--glass-tint);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow-s);
}
.glass::before { /* the rim: bright where light hits (top-left, bottom-right) */
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1.2px;
  background: linear-gradient(140deg,
    rgb(255 255 255 / var(--glass-rim-a)) 0%,
    rgb(255 255 255 / calc(var(--glass-rim-a) * 0.35)) 18%,
    rgb(255 255 255 / 0.06) 42%,
    rgb(255 255 255 / 0.06) 58%,
    rgb(255 255 255 / calc(var(--glass-rim-a) * 0.4)) 82%,
    rgb(255 255 255 / calc(var(--glass-rim-a) * 0.85)) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  z-index: 2;
}
.glass > * { position: relative; z-index: 3; }
.glass--strong { background: var(--glass-tint-strong); -webkit-backdrop-filter: blur(40px) saturate(160%); backdrop-filter: blur(40px) saturate(160%); }
.glass--lg { box-shadow: var(--glass-shadow); }

.btn { /* solid primary pill */
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: var(--r-pill);
  background: var(--fg); color: var(--bg);
  font: 600 15px/1.15 var(--f-sans); letter-spacing: 0.005em; white-space: nowrap;
  transition: transform 160ms var(--ease-out), opacity 160ms, background-color 300ms, color 300ms;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.96); }
.btn--accent, .btn.is-on { background: var(--accent); color: var(--on-accent); }
.btn.is-on { cursor: default; }
.btn.is-on:hover { opacity: 1; }
.btn.is-on:active { transform: none; }
.gbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--r-pill);
  font: 600 14px/1 var(--f-sans); white-space: nowrap;
  transition: transform 160ms var(--ease-out);
}
.gbtn:active { transform: scale(0.96); }
.gbtn.is-on { cursor: default; }
.gbtn.is-on:active { transform: none; }
.gbtn--icon { width: 44px; padding: 0; }
.gbtn svg, .pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: var(--r-pill);
  font: 600 14px/1 var(--f-sans); white-space: nowrap;
  transition: transform 160ms var(--ease-out);
}
.pill:active { transform: scale(0.96); }
.check { width: 18px; height: 18px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1.6px currentColor; position: relative; transition: background-color 300ms, box-shadow 300ms; }
.is-on > .check { background: var(--on-accent); box-shadow: none; }
.gbtn.is-on > .check { background: var(--fg); }
/* the tick is drawn, not built from borders, so it sits exactly in the middle of the circle */
.is-on > .check::after {
  content: ""; position: absolute; inset: 0; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.3 9.3l2.6 2.6 4.9-5.3'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.3 9.3l2.6 2.6 4.9-5.3'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.gbtn.is-on > .check::after { background: var(--bg); }
.c-textbtn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 4px;
  font: 500 14px/1.3 var(--f-read); color: var(--muted); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; text-align: left;
  transition: color 160ms;
}
.c-textbtn:hover { color: var(--fg); }
.c-input {
  width: 100%; min-height: 48px; padding: 0 16px; border: 0; border-radius: var(--r-m);
  background: rgb(var(--fg-rgb) / 0.06); box-shadow: inset 0 0 0 1px var(--line);
  font: 500 16px/1 var(--f-read); color: var(--fg); outline: none; color-scheme: dark;
}
.c-input:focus { box-shadow: inset 0 0 0 1.5px var(--accent-text); }

/* ---------- top: brand left, floating pills right, on the content column ---------- */
.c-top {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: calc(var(--safe-t) + 14px) var(--edge) 0;
  pointer-events: none;
}
.c-top > * { pointer-events: auto; }
.c-brand { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 600; letter-spacing: -0.01em; color: var(--muted); }
.c-top__actions { display: flex; gap: 8px; }
.c-pop { position: relative; }
.c-menu {
  position: absolute; right: 0; top: 52px; min-width: 264px; padding: 8px; border-radius: var(--r-m);
  display: grid; gap: 2px; box-shadow: var(--glass-shadow);
  animation: pop 240ms var(--ease-out) both; transform-origin: top right;
}
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(-4px); } }
.c-menu__label { padding: 8px 12px 4px; font: 500 12px/1.3 var(--f-read); color: var(--muted); }
.c-menu a, .c-switch, .c-menu__item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  min-height: 44px; padding: 0 12px; border-radius: 12px;
  font-size: 13px; font-weight: 600; text-align: left; cursor: pointer;
  transition: background-color 160ms;
}
.c-menu a:hover, .c-switch:hover, .c-menu__item:hover { background: rgb(var(--fg-rgb) / 0.07); }
.c-menu a span { font: 400 12px/1 var(--f-read); color: var(--muted); }
.c-menu__danger { color: #ff6b61; }
.c-switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 26px; border-radius: 26px; background: rgb(var(--fg-rgb) / 0.16); position: relative; cursor: pointer; transition: background-color 240ms; flex: none; }
.c-switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.4); transition: transform 320ms var(--spring); }
.c-switch input:checked { background: var(--accent); }
.c-switch input:checked::after { transform: translateX(16px); }

/* ---------- the ring ---------- */
.ring { width: 100%; height: 100%; overflow: visible; }
.ring__track { fill: rgb(var(--fg-rgb) / 0.07); }
.ring__track--locked { fill: rgb(var(--fg-rgb) / 0.035); }
.ring__miss { fill: none; stroke: rgb(var(--fg-rgb) / 0.3); stroke-width: 1.2; stroke-dasharray: 4 5; }
.ring__base { fill: rgb(var(--bg-rgb)); }
.ring__shadow { fill: rgb(0 0 0 / 0.16); pointer-events: none; }
.ring__today { fill: none; stroke: rgb(var(--fg-rgb) / 0.85); stroke-width: 1.6; }
.ring__marker { fill: var(--accent); }
.ring__part { transition: opacity 160ms var(--ease-out); outline: none; }
.ring__part[data-part] { cursor: pointer; }
.ring__part:focus-visible path:first-child { stroke: #fff; stroke-width: 2.5; stroke-dasharray: none; }
.c-ring.has-hover .ring__part:not(.is-hover) { opacity: 0.28; }

/* ---------- start ---------- */
.c-start {
  position: relative; z-index: 1; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(24px, 5vw, 72px);
  max-width: var(--col); margin: 0 auto; padding: 96px var(--pad) 72px;
}
#c-access { grid-template-columns: minmax(0, 34rem); justify-content: center; }
.c-start__ring { width: min(100%, 300px); aspect-ratio: 1; justify-self: center; filter: drop-shadow(0 18px 30px rgb(0 0 0 / 0.35)); }
.c-start__title { margin-top: 10px; font-size: clamp(26px, 3.3vw, 42px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.06; text-wrap: balance; }
.c-start__title em { font-size: 1.08em; }
.c-start__note { margin: 16px 0 6px; font: 400 18px/1.4 var(--f-read); color: var(--muted); max-width: 30em; }
.c-rows { margin: 14px 0 24px; border-top: 1px solid var(--line); max-width: 34em; }
.c-rows li { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 10px 0; border-bottom: 1px solid var(--line); font: 400 15px/1.4 var(--f-read); color: rgb(var(--fg-rgb) / 0.82); }
.c-rows a { flex: none; display: inline-flex; align-items: center; min-height: 44px; font: 600 13px/1 var(--f-sans); color: var(--fg); }
.c-start__small { margin-top: 12px; font: 400 14px/1.4 var(--f-read); color: var(--muted); }
.c-pickdate { margin-top: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 500 14px/1 var(--f-read); color: var(--muted); }
.c-pickdate input { min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-m); background: rgb(var(--fg-rgb) / 0.06); box-shadow: inset 0 0 0 1px var(--line); color: var(--fg); color-scheme: dark; }
.c-start > * { animation: rise 700ms var(--ease-out) both; }
.c-start__text { animation-delay: 80ms; }

/* ---------- app: ring left, the day on the right ---------- */
.c-app {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(24px, 5vw, 80px);
  max-width: var(--col); margin: 0 auto; padding: 0 var(--pad);
}
.c-ringcol {
  position: sticky; top: 0; height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding-bottom: 40px;
}
.c-ring { position: relative; width: min(100%, 300px); aspect-ratio: 1; filter: drop-shadow(0 18px 30px rgb(0 0 0 / 0.35)); }
.c-ring.is-pop { animation: ring-pop 620ms var(--spring) both; }
@keyframes ring-pop { 0% { transform: scale(1); } 35% { transform: scale(1.06); } 100% { transform: scale(1); } }
.c-ring__svg { position: absolute; inset: 0; }
.c-ring__in { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; pointer-events: none; }
.c-ring__in b { font-size: clamp(44px, 5.2vw, 60px); font-weight: 700; letter-spacing: -0.05em; line-height: 0.95; }
.c-ring__in span { margin-top: 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.c-ring__cap { min-height: 22px; font-size: 13px; font-weight: 500; color: var(--muted); text-align: center; text-wrap: balance; }
.c-ring__cap.is-done { font-size: 15px; font-weight: 650; color: var(--fg); }

.c-lesson { padding: 108px 0 var(--bottom-space); min-height: 100dvh; outline: none; display: flex; flex-direction: column; justify-content: flex-start; }
.c-lesson > * { animation: rise 520ms var(--ease-out) both; }
.c-lesson > :nth-child(2) { animation-delay: 40ms; }
.c-lesson > :nth-child(3) { animation-delay: 80ms; }
.c-lesson > :nth-child(n+4) { animation-delay: 120ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.c-flag { margin-bottom: 18px; padding: 0 0 10px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; }
@media (min-width: 820px) { .c-lesson:has(.c-flag) { padding-top: 64px; } }
.c-flag p { font: 500 16px/1.45 var(--f-read); color: var(--fg); max-width: 34em; }
.c-eyebrow { font-size: 12px; font-weight: 500; color: var(--muted); }
.c-title { margin-top: 10px; font-size: clamp(28px, 3.4vw, 44px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.04; text-wrap: balance; }
/* today's one action comes first, on every screen; the reading follows */
.c-today { order: 1; margin-top: 18px; }
.c-why { order: 2; margin-top: 28px !important; padding-top: 20px; border-top: 1px solid var(--line); }
.c-bad { order: 3; }
.c-more { order: 3; }
.c-extra { order: 4; }
.c-why { margin-top: 22px; display: grid; gap: 14px; font: 400 clamp(17px, 1.35vw, 19px)/1.55 var(--f-read); color: rgb(var(--fg-rgb) / 0.78); }
.c-why > p { max-width: 34em; }   /* the lines between sections run the full width; the reading lines stay short */

/* content rows, separated by hairlines (never glass) */
.c-sec { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.c-sec__head { display: flex; align-items: center; gap: 12px; }
.c-sec__head svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.c-sec__head h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.c-sec__meta { margin-left: auto; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 10px; }
.c-do { margin: 14px 0 20px; font: 600 clamp(19px, 1.7vw, 23px)/1.32 var(--f-read); letter-spacing: -0.015em; max-width: 30em; }
.c-actrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
/* long translations wrap instead of running off a narrow phone */
.c-actrow .gbtn { max-width: 100%; padding-block: 10px; line-height: 1.25; white-space: normal; text-align: center; }
.c-sec .btn[data-mark] { min-width: 204px; }
.c-done-note { margin-top: 12px; min-height: 21px; font: 400 15px/1.4 var(--f-read); color: var(--muted); }
.c-links { margin-top: 6px; display: grid; }
.c-link-row { display: flex; align-items: center; gap: 8px; min-height: 44px; font: 500 15px/1.35 var(--f-read); color: var(--muted); transition: color 160ms; }
.c-link-row b { font-weight: 600; color: var(--fg); }
.c-link-row:hover { color: var(--fg); }
.c-finish { margin: 6px 0 14px; padding: 18px 0 4px; border-top: 1px solid var(--line); }
.c-finish h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; }
.c-finish p { margin-top: 8px; font: 400 16px/1.45 var(--f-read); color: rgb(var(--fg-rgb) / 0.78); }
.c-bad { margin-top: 22px; padding-bottom: 4px; }
:is(.c-bad, .c-more) summary { list-style: none; cursor: pointer; min-height: 44px; }
:is(.c-bad, .c-more) summary::-webkit-details-marker { display: none; }
:is(.c-bad, .c-more) .chev { width: 16px; height: 16px; transition: transform 320ms var(--ease-out); }
:is(.c-bad, .c-more)[open] .chev { transform: rotate(180deg); }
.c-bad > p:not(.c-done-note) { margin: 12px 0 16px; font: 400 17px/1.5 var(--f-read); color: rgb(var(--fg-rgb) / 0.78); max-width: 32em; }
.c-bad .gbtn, .c-bad .c-done-note { scroll-margin-bottom: 128px; }
.c-locked .c-title { color: rgb(var(--fg-rgb) / 0.5); }
.c-rules { margin: 14px 0 18px; display: grid; gap: 8px; max-width: 34em; }
.c-rules li { display: flex; align-items: center; gap: 12px; }
.c-rules li > span { width: 18px; flex: none; font-size: 13px; font-weight: 600; color: var(--muted); text-align: right; }
.c-rules input { flex: 1; min-width: 0; min-height: 44px; padding: 0 2px; border: 0; border-bottom: 1px solid var(--line); background: none; font: 500 17px/1.2 var(--f-read); outline: none; border-radius: 0; }
.c-rules input:focus { border-bottom-color: var(--fg); }
.c-rules input::placeholder { color: var(--faint); }

/* ---------- the lesson's extra lines ---------- */
.c-tip { margin: -8px 0 18px; font: 400 15px/1.45 var(--f-read); color: var(--muted); max-width: 34em; }
.c-fields { margin-top: 0; gap: 2px; }
.c-fields input { min-height: 40px; font-size: 16px; }
.c-fields__note { margin: -8px 0 18px; font: 400 13px/1.4 var(--f-read); color: var(--faint); }
.c-recall { margin: 0 0 18px; padding: 12px 16px; border-radius: var(--r-m); background: rgb(var(--fg-rgb) / 0.05); max-width: 34em; }
.c-recall > p { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); }
.c-recall__list { margin-top: 6px; padding-left: 18px; display: grid; gap: 4px; font: 500 16px/1.4 var(--f-read); }
/* what tomorrow brings, right under the button once the day is ticked */
.c-next { display: block; width: 100%; margin: 16px 0; padding: 14px 18px; border-radius: var(--r-m); font: 400 16px/1.45 var(--f-read); color: rgb(var(--fg-rgb) / 0.86); animation: rise 420ms var(--ease-out) both; }
.c-next b { font-weight: 600; margin-right: 4px; color: var(--fg); }
/* re-drawing after a tick or an undo: the page stays where it is */
.c-lesson.is-quiet > * { animation: none; }
.c-lesson.is-still * { animation: none !important; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
/* day 1 and day 14: how did today feel, 1 to 5 */
.c-feel { margin-top: 18px; max-width: 34em; animation: rise 420ms var(--ease-out) both; }
.c-feel > p { font: 500 16px/1.4 var(--f-read); }
.c-feel > p span { color: var(--muted); font-weight: 400; }
.c-feel__row { margin-top: 10px; display: flex; gap: 8px; }
.c-feel__row button { position: relative; isolation: isolate; width: 48px; height: 48px; border-radius: 50%; font: 600 16px var(--f-sans); color: var(--fg); transition: transform 160ms var(--ease-out), box-shadow 240ms var(--ease-out), background-color 240ms; }
.c-feel__row button:hover { background-color: rgb(var(--fg-rgb) / 0.06); }
.c-feel__row button:active { transform: scale(0.92); }
/* chosen: the glass takes a tint of the app colour and a ring of it, instead of a solid fill */
.c-feel__row button.is-lit, .c-feel__row button[aria-pressed="true"] { background-color: rgb(var(--accent-rgb) / 0.22); box-shadow: var(--glass-shadow-s), inset 0 0 0 1.5px rgb(var(--accent-rgb) / 0.9); }
/* "Read more": the long version for people who like to read */
.c-more { margin-top: 22px; padding-bottom: 4px; }
.c-more__body { margin: 6px 0 12px; max-width: 34em; }
.c-more__body h3 { margin-top: 18px; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.c-more__body p { margin-top: 6px; font: 400 17px/1.55 var(--f-read); color: rgb(var(--fg-rgb) / 0.78); }
/* the finale */
.c-finish__feel { display: flex; align-items: baseline; gap: 10px; }
.c-finish__feel span { color: var(--muted); }
.c-finish__feel b { font: 700 22px/1 var(--f-sans); color: var(--fg); }
.c-finish__feel i { font-style: normal; color: var(--muted); }
.c-finish__rules { margin-top: 12px; padding-left: 22px; display: grid; gap: 4px; font: 500 16px/1.45 var(--f-read); }
/* the tracker offer after the program */
.c-offer { margin: 18px 0 8px; padding: 20px; border-radius: var(--r-l); background: rgb(var(--accent-rgb) / 0.1); box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 0.3); max-width: 36em; }
.c-offer__eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--accent-text); }
.c-offer h3 { margin-top: 6px; font-size: clamp(20px, 2vw, 26px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.08; }
.c-offer > p { margin-top: 8px; font: 400 16px/1.45 var(--f-read); color: rgb(var(--fg-rgb) / 0.8); }
.c-offer .c-offer__deal { color: var(--fg); font-weight: 500; }
.c-offer .c-actrow { margin-top: 16px; }
.c-link-row--strong { color: var(--fg); font-weight: 600; }

/* ---------- the floating bar ---------- */
.c-bar {
  position: fixed; z-index: 30; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; height: var(--bar-h); padding: 0 8px; border-radius: var(--r-pill);
  background: rgb(22 23 26 / 0.6);
}
.c-bar__btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; transition: background-color 160ms, transform 160ms var(--ease-out), opacity 200ms; }
.c-bar__btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.c-bar__btn:hover { background: rgb(var(--fg-rgb) / 0.08); }
.c-bar__btn:active { transform: scale(0.92); }
.c-bar__btn:disabled { opacity: 0.25; pointer-events: none; }
.c-bar__now { min-width: 176px; height: 48px; padding: 0 14px; border-radius: var(--r-pill); display: grid; justify-items: center; align-content: center; gap: 3px; transition: background-color 160ms; }
.c-bar__now:hover { background: rgb(var(--fg-rgb) / 0.08); }
.c-bar__now b { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; line-height: 1; }
.c-bar__now span { font-size: 10.5px; font-weight: 500; color: var(--muted); line-height: 1; }

/* ---------- sheet + toast ---------- */
.c-sheet { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.c-sheet__scrim { position: absolute; inset: 0; background: rgb(0 0 0 / 0.5); animation: fade 240ms var(--ease-out) both; }
@keyframes fade { from { opacity: 0; } }
.c-sheet__card { width: min(100%, 400px); padding: 24px; border-radius: var(--r-l); animation: pop 300ms var(--ease-out) both; }
/* a long sheet (the click sounds) scrolls inside itself; its title and buttons stay in view */
.c-sheet__card { max-height: calc(100dvh - 40px); display: flex; flex-direction: column; }
.c-sheet__body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.c-sheet__actions { flex: none; }
.c-sheet__card h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.c-sheet__card > p { margin-top: 10px; font: 400 16px/1.45 var(--f-read); color: var(--muted); }
.c-sheet__body:not(:empty) { margin-top: 16px; }
.c-field { display: grid; gap: 6px; font: 500 13px/1 var(--f-read); color: var(--muted); }
.c-sheet__actions { margin-top: 22px; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.c-sheet__actions .btn { min-height: 44px; font-size: 14px; }
.c-toast {
  position: fixed; left: 50%; bottom: calc(var(--bar-h) + 30px + var(--safe-b)); z-index: 70; transform: translate(-50%, 12px);
  max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: var(--r-pill); background: var(--fg); color: var(--bg);
  font: 600 13px/1.3 var(--f-read); text-align: center; opacity: 0; pointer-events: none;
  transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
}
.c-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- phone ---------- */
@media (max-width: 819px) {
  .c-top { position: absolute; }   /* scrolls away with the page: nothing sits on top of the lesson */
  body::before { display: none; }
  .c-start { grid-template-columns: 1fr; align-content: center; gap: 22px; padding-top: 84px; padding-bottom: 48px; }
  .c-start__ring { width: min(46vw, 170px); }
  .c-start .btn { width: 100%; }
  .c-app { display: block; }
  .c-ringcol { position: static; height: auto; padding: calc(var(--safe-t) + 64px) 0 0; gap: 8px; }
  .c-ring { width: min(44vw, 156px); }
  .c-ring__in b { font-size: 34px; }
  .c-ring__in span { font-size: 10px; margin-top: 2px; }
  /* today's one action comes first; the reading follows */
  .c-lesson { padding-top: 18px; min-height: 0; }
  /* coming back: today's button first, the welcome line right under it */
  .c-flag--back { order: 1; margin: 22px 0 0; padding: 14px 0 0; border-bottom: 0; border-top: 1px solid var(--line); }
  .c-flag--back ~ .c-today { order: 0; }
  .c-brand { font-size: 12px; }
  .c-menu { min-width: min(264px, calc(100vw - 2 * var(--pad))); }
  .c-sec .btn, .c-bad .gbtn { width: 100%; }
  .btn { white-space: normal; text-align: center; padding-block: 8px; } /* long translations wrap on phones */
  .c-bar{ left: 14px; right: 14px; transform: none; justify-content: space-between; }
  .c-bar__now { flex: 1; min-width: 0; }
}
@media (max-width: 380px) { .pill span { display: none; } .pill { width: 44px; padding: 0; justify-content: center; } }
:root[dir="rtl"] :is(#c-prev, #c-next) svg { transform: scaleX(-1); }
:root[dir="rtl"] :is(.c-textbtn, .c-switch, .c-menu__item, .c-menu a) { text-align: start; }
:root[dir="rtl"] .c-menu { right: auto; left: 0; transform-origin: top left; }
:root[dir="rtl"] .c-sec__meta { margin-left: 0; margin-inline-start: auto; }
:root[dir="rtl"] :is(.c-recall__list, .c-finish__rules) { padding-left: 0; padding-inline-start: 22px; }
:root[dir="rtl"] .c-next b { margin-right: 0; margin-inline-end: 4px; }
:root[dir="rtl"] .c-rules li > span { text-align: end; }
:root[dir="rtl"] :is(.c-start__text, .c-lesson, .c-sheet__card, .c-toast) { overflow-wrap: anywhere; }
:root[dir="rtl"] .c-bar__btn { flex: none; }
:root[dir="rtl"] .c-bar__now { overflow-wrap: anywhere; }
:root[dir="rtl"] .c-countdown { unicode-bidi: isolate; }
@media (max-width: 380px) {
  :root[dir="rtl"] :is(.c-rows li, .c-sec__head, .c-link-row, .c-offer__timer) { flex-wrap: wrap; }
  :root[dir="rtl"] :is(.btn, .gbtn:not(.gbtn--icon)) {
    max-width: 100%; padding-block: 8px; white-space: normal; text-align: center;
  }
  :root[dir="rtl"] .c-feel__row > button { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .c-lesson > *, .c-start > *, .c-menu, .c-ring.is-pop, .c-sheet__card, .c-sheet__scrim { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- the fire next to the gear: days filled, never goes out ---------- */
.c-fire { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px 0 12px; border-radius: var(--r-pill); font: 700 16px var(--f-sans); letter-spacing: -0.02em; color: var(--muted); font-variant-numeric: tabular-nums; transition: transform 160ms var(--ease-out); }
.c-fire[hidden] { display: none; }
.c-fire:active { transform: scale(0.94); }
.c-fire__flame { display: inline-flex; color: var(--faint); transition: color 240ms var(--ease-out), filter 240ms var(--ease-out); }
.c-fire__flame svg { width: 18px; height: 18px; fill: transparent; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; transition: fill 240ms var(--ease-out); }
.c-fire.is-lit .c-fire__flame { color: #ff9f0a; filter: drop-shadow(0 0 6px rgb(255 159 10 / 0.45)); }
.c-fire.is-lit .c-fire__flame svg { fill: currentColor; }
.c-fire.is-lit b { color: var(--fg); }
.c-fire.is-pop .c-fire__flame { animation: fire-pop 520ms var(--ease-out); }
@keyframes fire-pop { 0% { transform: scale(0.7); } 55% { transform: scale(1.22); } 100% { transform: none; } }

/* ---------- day 14 filled: the parts light up one by one, a wave of light, the finale rises ---------- */
.c-ring.is-finale .ring__part { animation: part-glow 900ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes part-glow { 0% { filter: none; } 45% { filter: brightness(1.9) drop-shadow(0 0 10px var(--accent)); } 100% { filter: none; } }
.c-wave { position: absolute; left: 50%; top: 50%; width: 100%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 2px rgb(var(--accent-rgb) / 0.8), 0 0 40px 6px rgb(var(--accent-rgb) / 0.45);
  transform: translate(-50%, -50%) scale(0.7); opacity: 0; animation: ring-wave 1500ms var(--ease-out) both; }
@keyframes ring-wave { 0% { opacity: 0.9; transform: translate(-50%, -50%) scale(0.7); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.1); } }
.c-finish.is-arriving, .c-offer.is-arriving { animation: rise 800ms var(--ease-out) 1300ms both; }
@media (prefers-reduced-motion: reduce) { .c-finish.is-arriving, .c-offer.is-arriving, .c-wave, .c-ring.is-finale .ring__part { animation: none; } }
/* the tracker offer: the old price struck through, the new one, and a live countdown */
.c-offer__price { margin-top: 12px; display: flex; align-items: baseline; gap: 12px; }
.c-offer__price s { font: 600 20px var(--f-sans); color: var(--muted); text-decoration-thickness: 2px; }
.c-offer__price b { font: 700 34px/1 var(--f-sans); letter-spacing: -0.04em; color: var(--fg); }
.c-offer__timer { margin-top: 12px; display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: var(--r-pill); background: rgb(var(--fg-rgb) / 0.06); font: 500 14px var(--f-read); color: var(--muted); }
.c-offer__timer b { font: 700 15px var(--f-sans); color: var(--fg); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
/* sign in: the provider buttons, then the email */
.c-auth { display: grid; gap: 10px; }
.c-auth .gbtn { width: 100%; justify-content: center; }
.c-auth__or { display: flex; align-items: center; gap: 12px; margin: 6px 0 0; font: 500 13px var(--f-read); color: var(--muted); }
.c-auth__or::before, .c-auth__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.c-auth__google { gap: 10px; min-height: 50px; }
.c-auth__mark { display: inline-grid; place-items: center; width: 20px; height: 20px; }
.c-auth__mark svg { width: 20px; height: 20px; fill: initial; stroke: none; }
