:root {
  color-scheme: light;
  --ink: #173632;
  --ink-soft: #50635f;
  --forest: #173f3a;
  --forest-2: #235a52;
  --sage: #77a89b;
  --sage-soft: #dfece6;
  --cream: #fbf8f2;
  --paper: #fffefa;
  --sand: #f3eadc;
  --apricot: #f2c38b;
  --coral: #d86f61;
  --coral-soft: #f9e1db;
  --lavender: #ddd8ee;
  --line: #d8e1dc;
  --danger: #9b3f35;
  --shadow-sm: 0 8px 24px rgb(29 66 58 / 8%);
  --shadow-lg: 0 24px 70px rgb(29 66 58 / 15%);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 30px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 112.5%;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% 2%, rgb(242 195 139 / 24%), transparent 30rem),
    var(--cream);
  color: var(--ink);
  font: 1rem/1.6 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: auto;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.display {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

h1 {
  margin-bottom: 0.8rem;
  font-size: clamp(2.25rem, 6vw, 4.6rem);
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

h3 {
  font-size: 1.25rem;
}

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 0.75rem;
  left: 0.75rem;
  translate: 0 -180%;
  border-radius: 999px;
  background: var(--forest);
  color: white;
  padding: 0.7rem 1rem;
}

.skip-link:focus {
  translate: 0;
}

.noscript {
  max-width: 46rem;
  margin: 5rem auto;
  padding: 2rem;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 2rem;
}

.site-header {
  position: sticky;
  z-index: 80;
  top: 0;
  border-bottom: 1px solid rgb(216 225 220 / 78%);
  background: rgb(251 248 242 / 90%);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  max-width: var(--content);
  min-height: 76px;
  align-items: center;
  gap: 1.25rem;
  margin: auto;
  padding: 0.75rem 1.25rem;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.7rem;
  color: var(--forest);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--forest);
  box-shadow: var(--shadow-sm);
}

.brand-mark svg {
  width: 25px;
}

.brand-copy {
  display: grid;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.brand-copy span:last-child {
  color: var(--coral);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.nav-link,
.icon-button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}

.nav-link {
  padding: 0.65rem 0.8rem;
  color: var(--ink-soft);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  background: var(--sage-soft);
  color: var(--forest);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.guide-pill {
  max-width: 10.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  padding: 0.48rem 0.75rem;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Language switcher: two small links, current language filled in. */
.lang-switch {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}

.lang-option {
  min-width: 42px;
  padding: 0.48rem 0.6rem;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
}

.lang-option[aria-current="true"] {
  background: var(--forest);
  color: white;
}

.lang-option:not([aria-current="true"]):hover {
  background: var(--sage-soft);
  color: var(--forest);
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
}

.icon-button svg {
  width: 20px;
}

.sources-button {
  border-color: var(--coral);
  background: var(--coral-soft);
  color: var(--coral);
}

.sources-button:hover {
  background: var(--coral);
  color: white;
}

.mobile-nav {
  display: none;
}

.page {
  width: min(var(--content), calc(100% - 2.5rem));
  margin: auto;
  padding: clamp(2rem, 5vw, 4.5rem) 0 4rem;
}

.page-narrow {
  max-width: 820px;
}

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  margin-bottom: 2rem;
}

.page-head p {
  max-width: 44rem;
  margin-bottom: 0;
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 26px;
  height: 2px;
  background: currentColor;
  content: "";
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: 0.83rem;
}

.tiny {
  font-size: 0.72rem;
}

.stack {
  display: grid;
  gap: 1rem;
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.spread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgb(255 254 250 / 90%);
  box-shadow: var(--shadow-sm);
}

.card-pad {
  padding: clamp(1.15rem, 3vw, 1.8rem);
}

.soft-card {
  border-color: transparent;
  background: var(--sage-soft);
  box-shadow: none;
}

.warm-card {
  border-color: transparent;
  background: var(--sand);
  box-shadow: none;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.68rem 1.15rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--forest);
  color: white;
  box-shadow: 0 8px 18px rgb(23 63 58 / 20%);
}

.button-primary:hover {
  background: var(--forest-2);
}

.button-secondary {
  border-color: var(--line);
  background: var(--paper);
  color: var(--forest);
}

.button-coral {
  background: var(--coral);
  color: white;
}

.button-ghost {
  background: transparent;
  color: var(--forest);
}

.button-danger {
  border-color: rgb(155 63 53 / 30%);
  background: #fff8f6;
  color: var(--danger);
}

.button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.text-link {
  border: 0;
  background: none;
  color: var(--forest-2);
  cursor: pointer;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--sage);
  text-underline-offset: 4px;
}

.chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.chip {
  background: var(--sage-soft);
  color: var(--forest);
}

.chip-coral {
  background: var(--coral-soft);
  color: var(--danger);
}

.chip-sand {
  background: var(--sand);
  color: #6d4d28;
}

.hero {
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--forest);
  color: white;
  box-shadow: var(--shadow-lg);
}

.hero-copy {
  padding: clamp(2rem, 6vw, 5rem);
}

.hero-copy h1 {
  max-width: 20ch;
}

.hero-copy > p {
  max-width: 40rem;
  color: rgb(255 255 255 / 78%);
}

.hero-copy .lede {
  font-size: 1.02rem;
  line-height: 1.65;
}

.hero-copy .lede strong {
  color: var(--apricot);
  font-weight: 600;
}

/* Headline safety notice. Loud on purpose: this must not be skimmed past. */
.disclaimer-banner {
  display: flex;
  gap: 1.15rem;
  margin-top: 1.25rem;
  border: 2px solid var(--danger);
  border-radius: var(--radius);
  background: var(--coral-soft);
  padding: clamp(1.25rem, 3vw, 1.9rem);
  color: #5d2a23;
  box-shadow: var(--shadow-sm);
}

.disclaimer-banner h2 {
  margin: 0 0 0.6rem;
  color: var(--danger);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  line-height: 1.25;
}

.disclaimer-banner p,
.disclaimer-banner li {
  margin: 0 0 0.6rem;
  font-size: 0.98rem;
  line-height: 1.6;
}

.disclaimer-banner ul {
  margin: 0 0 0.75rem;
  padding-left: 1.15rem;
}

.disclaimer-banner .text-link {
  color: var(--danger);
  font-weight: 600;
}

.disclaimer-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--danger);
  color: white;
}

.disclaimer-mark svg {
  width: 26px;
  height: 26px;
}

.home-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.detail-list.two-col {
  columns: 2;
  column-gap: 2rem;
}

@media (max-width: 640px) {
  .disclaimer-banner {
    flex-direction: column;
    gap: 0.85rem;
  }

  .detail-list.two-col {
    columns: 1;
  }
}

.hero .eyebrow {
  color: var(--apricot);
}

.hero-art {
  position: relative;
  display: grid;
  min-height: 320px;
  place-items: center;
  background: #f6efe3;
}

.hero-art img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.hero-note {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  left: 1.25rem;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 18px;
  background: rgb(23 63 58 / 82%);
  padding: 1rem;
  backdrop-filter: blur(8px);
}

.hero-note strong,
.hero-note span {
  display: block;
}

.hero-note span {
  margin-top: 0.15rem;
  color: rgb(255 255 255 / 72%);
  font-size: 0.78rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 1.25rem;
}

.today-summary {
  display: grid;
  grid-template-columns: 118px 1fr;
  align-items: center;
  gap: 1.5rem;
}

.progress-ring {
  --value: 0;
  display: grid;
  width: 108px;
  height: 108px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--coral) calc(var(--value) * 1%), var(--sage-soft) 0);
}

.progress-ring::before {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--paper);
  content: "";
}

.progress-ring span {
  position: absolute;
  font-size: 1.1rem;
  font-weight: 700;
}

.task-groups {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.task-group h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.6rem;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.task-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  padding: 0.75rem;
}

.task.is-done .task-label {
  color: var(--ink-soft);
  text-decoration: line-through;
}

.task-check {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid var(--sage);
  border-radius: 9px;
  background: white;
  cursor: pointer;
}

.task-check[aria-checked="true"] {
  border-color: var(--forest);
  background: var(--forest);
  color: white;
}

.task-check svg {
  width: 17px;
}

.task-label {
  font-size: 0.9rem;
  font-weight: 700;
}

.task-action {
  min-height: 36px;
  padding: 0.45rem 0.75rem;
  font-size: 0.74rem;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.quick-card {
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  padding: 1rem;
  text-decoration: none;
  transition: transform 160ms ease;
}

.quick-card:hover {
  transform: translateY(-2px);
}

.quick-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--sage-soft);
  color: var(--forest);
}

.quick-card h3 {
  margin: 0.75rem 0 0.2rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
}

.quick-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.week-tabs,
.filter-row {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.2rem 0 0.6rem;
  scrollbar-width: thin;
}

.tab-button,
.filter-button {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.tab-button[aria-selected="true"],
.filter-button[aria-pressed="true"] {
  border-color: var(--forest);
  background: var(--forest);
  color: white;
}

.week-overview {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

.day-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.day-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  padding: 1rem;
}

.day-card.is-today {
  border-color: var(--coral);
  box-shadow: 0 0 0 2px var(--coral-soft);
}

.day-card h3 {
  margin-bottom: 0.6rem;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
}

.day-card ul {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.77rem;
}

.routine-grid,
.exercise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.routine-card {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  overflow: hidden;
}

.routine-card::before {
  height: 7px;
  background: var(--accent, var(--sage));
  content: "";
}

.routine-card .card-pad {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.routine-card h2 {
  margin-bottom: 0.6rem;
  font-size: 1.45rem;
}

.routine-card p {
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.routine-card .cluster {
  margin-top: auto;
}

.search-wrap {
  position: relative;
  width: min(100%, 420px);
}

.exercise-head-tools {
  display: grid;
  min-width: min(100%, 420px);
  gap: 0.75rem;
  justify-items: stretch;
}

.model-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.model-picker-label {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.model-switch {
  display: inline-flex;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  padding: 0.25rem;
}

.model-option {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 0.45rem 0.85rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.model-option[aria-pressed="true"] {
  background: var(--forest);
  color: white;
}

.exercise-detail-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.model-picker-compact .model-picker-label {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.search-input,
.field,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  padding: 0.75rem 0.9rem;
}

.search-input {
  min-height: 48px;
  padding-left: 2.8rem;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 0.95rem;
  width: 18px;
  translate: 0 -50%;
  color: var(--ink-soft);
  pointer-events: none;
}

.exercise-card {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.exercise-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.exercise-visual {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--sage-soft);
}

.exercise-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f6efe3;
  transition: transform 300ms ease;
}

.exercise-card:hover .exercise-visual img {
  transform: scale(1.025);
}

.exercise-visual .status-chip {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  border: 1px solid rgb(255 255 255 / 65%);
  background: rgb(255 254 250 / 88%);
  backdrop-filter: blur(8px);
}

.exercise-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1rem;
}

.exercise-content h2 {
  margin-bottom: 0.45rem;
  font-size: 1.28rem;
}

.exercise-content p {
  margin-bottom: 0.8rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.cue-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: auto;
}

.exercise-hero {
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
}

.exercise-hero-image {
  min-height: 440px;
  background: var(--sage-soft);
}

.exercise-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f6efe3;
}

.exercise-hero-copy {
  padding: clamp(1.5rem, 5vw, 3.5rem);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.detail-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding-left: 1.3rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.routine-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 2rem;
  align-items: center;
}

.duration-block {
  border-radius: var(--radius);
  background: var(--forest);
  color: white;
  padding: 1.5rem;
  text-align: center;
}

.duration-block strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.4rem;
  font-weight: 500;
}

.step-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
  padding: 0;
  counter-reset: steps;
  list-style: none;
}

.step-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  padding: 1rem;
  counter-increment: steps;
}

.step-list li::before {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--sage-soft);
  color: var(--forest);
  content: counter(steps);
  font-weight: 700;
}

.practice-shell {
  display: grid;
  min-height: calc(100vh - 76px);
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
}

.practice-art {
  position: relative;
  overflow: hidden;
  background: var(--sage-soft);
}

.practice-art img {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 76px);
  object-fit: contain;
  background: #f6efe3;
}

.practice-step-badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  border-radius: 999px;
  background: rgb(255 254 250 / 90%);
  padding: 0.45rem 0.75rem;
  font-size: 0.74rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.practice-panel {
  display: flex;
  min-height: calc(100vh - 76px);
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 7vw, 6rem);
}

.practice-panel h1 {
  max-width: 12ch;
}

.practice-instruction {
  max-width: 42rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.timer {
  display: grid;
  width: 190px;
  height: 190px;
  place-items: center;
  margin: 1.5rem 0;
  border: 10px solid var(--sage-soft);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  font-variant-numeric: tabular-nums;
}

.timer strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.6rem;
  font-weight: 500;
}

.practice-progress {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

.practice-progress span {
  width: 32px;
  height: 5px;
  border-radius: 999px;
  background: var(--line);
}

.practice-progress span.is-active,
.practice-progress span.is-done {
  background: var(--coral);
}

.completion-card {
  max-width: 620px;
  text-align: center;
}

.completion-mark {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  margin: 0 auto 1.25rem;
  border-radius: 30px;
  background: var(--sage-soft);
  color: var(--forest);
}

.completion-mark svg {
  width: 42px;
}

.tracker-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 1rem;
}

.slider-group {
  display: grid;
  gap: 0.4rem;
}

.slider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.slider-value {
  display: grid;
  width: 42px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: var(--sage-soft);
  font-weight: 700;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--forest);
}

.chart-wrap {
  overflow-x: auto;
  min-height: 230px;
}

.trend-chart {
  width: 100%;
  min-width: 420px;
  height: 230px;
}

.history-list {
  display: grid;
  gap: 0.6rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.history-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.habit-grid,
.safety-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.break-counter {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 1rem 0;
}

.break-dot {
  width: 30px;
  height: 12px;
  border-radius: 999px;
  background: var(--line);
}

.break-dot.is-done {
  background: var(--coral);
}

.protocol-list {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.protocol-list li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0.9rem;
  align-items: start;
}

.protocol-number {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: var(--sage-soft);
  color: var(--forest);
  font-weight: 700;
}

.notice {
  display: flex;
  gap: 0.8rem;
  border: 1px solid rgb(216 111 97 / 30%);
  border-radius: 16px;
  background: var(--coral-soft);
  padding: 1rem;
  color: #633a35;
  font-size: 0.85rem;
}

.notice svg {
  flex: 0 0 auto;
  width: 22px;
}

.field-group {
  display: grid;
  gap: 0.35rem;
}

.field-group label {
  font-size: 0.8rem;
  font-weight: 700;
}

.field-hint {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.dialog-backdrop {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(15 40 36 / 55%);
  padding: 1rem;
  backdrop-filter: blur(7px);
}

.dialog {
  overflow: auto;
  width: min(100%, 640px);
  max-height: min(90vh, 760px);
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-lg);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem;
}

.dialog-head h2 {
  margin: 0;
  font-size: 1.45rem;
}

.dialog-body {
  padding: 1.25rem;
}

.pathway-options {
  display: grid;
  gap: 0.75rem;
}

.pathway-option {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  padding: 1rem;
  cursor: pointer;
  text-align: left;
}

.pathway-option:hover,
.pathway-option.is-active {
  border-color: var(--forest);
  background: var(--sage-soft);
}

.toast {
  position: fixed;
  z-index: 160;
  right: 1rem;
  bottom: 1rem;
  max-width: min(360px, calc(100% - 2rem));
  border-radius: 16px;
  background: var(--forest);
  color: white;
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  animation: toast-in 180ms ease-out;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.empty-state {
  border: 1px dashed var(--sage);
  border-radius: var(--radius);
  padding: 2rem;
  color: var(--ink-soft);
  text-align: center;
}

.visually-hidden {
  position: absolute !important;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .desktop-nav {
    display: none;
  }

  .header-actions {
    margin-left: auto;
  }

  .hero,
  .dashboard-grid,
  .week-overview,
  .tracker-layout {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 360px;
  }

  .routine-grid,
  .exercise-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .practice-shell {
    grid-template-columns: 0.82fr 1.18fr;
  }
}

/* The bottom navigation takes over exactly where the desktop nav stops, so
   there is never a width with no primary navigation. */
@media (max-width: 1180px) {
  body {
    padding-bottom: 76px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 90;
    right: 0.65rem;
    bottom: 0.65rem;
    left: 0.65rem;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border: 1px solid rgb(216 225 220 / 80%);
    border-radius: 22px;
    background: rgb(255 254 250 / 94%);
    padding: 0.4rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
  }

  .mobile-nav a {
    display: grid;
    min-height: 54px;
    place-items: center;
    gap: 0.1rem;
    border-radius: 16px;
    color: var(--ink-soft);
    font-size: 0.62rem;
    font-weight: 700;
    text-decoration: none;
  }

  .mobile-nav a[aria-current="page"] {
    background: var(--sage-soft);
    color: var(--forest);
  }
}

/* Below 1300 the back-link label is the first thing to go: the arrow plus the
   aria-label still carry the meaning, and it buys about 90px. */
@media (max-width: 1340px) {
  .main-link span {
    display: none;
  }

  .main-link {
    padding: 0.48rem 0.55rem;
  }
}

@media (max-width: 700px) {
  .header-inner {
    min-height: 66px;
    padding: 0.55rem 1rem;
  }

  .brand-copy {
    display: none;
  }

  .guide-pill {
    max-width: 7rem;
  }

  .mobile-nav svg {
    width: 21px;
  }

  .page {
    width: min(100% - 2rem, var(--content));
    padding-top: 2rem;
  }

  .page-head,
  .routine-detail-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1rem;
  }

  .exercise-head-tools,
  .search-wrap {
    width: 100%;
  }

  .exercise-detail-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    border-radius: 24px;
  }

  .hero-copy {
    padding: 2rem 1.4rem;
  }

  .hero-art {
    min-height: 290px;
  }

  .dashboard-grid,
  .routine-grid,
  .exercise-grid,
  .detail-grid,
  .habit-grid,
  .safety-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .today-summary {
    grid-template-columns: 90px 1fr;
    gap: 1rem;
  }

  .progress-ring {
    width: 88px;
    height: 88px;
  }

  .progress-ring::before {
    width: 64px;
    height: 64px;
  }

  .day-grid {
    grid-template-columns: 1fr;
  }

  .exercise-hero {
    grid-template-columns: 1fr;
  }

  .exercise-hero-image {
    min-height: 280px;
  }

  .practice-shell {
    display: block;
  }

  .practice-art img {
    min-height: 280px;
    max-height: 44vh;
  }

  .practice-panel {
    min-height: auto;
    padding: 1.5rem 1rem 3rem;
  }

  .timer {
    width: 154px;
    height: 154px;
  }

  .task {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .task-action {
    grid-column: 2;
    justify-self: start;
  }

  .quick-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 360px) {
  .header-inner {
    gap: 0.5rem;
    padding: 0.55rem 0.7rem;
  }

  .header-actions {
    gap: 0.3rem;
  }
}

@media (max-width: 480px) {
  /* Below this width the guide pill, sources button, language switch and
     settings icon no longer all fit alongside the back-to-main-site link.
     The guide is still reachable from Settings, so this is the one to drop. */
  .guide-pill {
    display: none;
  }

  .today-summary {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .today-summary .progress-ring {
    margin: 0 auto;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  body {
    background: white;
    color: black;
    padding: 0;
    font-size: 10pt;
  }

  .site-header,
  .mobile-nav,
  .no-print,
  .toast {
    display: none !important;
  }

  .page {
    width: 100%;
    padding: 0;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
  }
}

/* ------------------------------------------------- link back to the main site */
.main-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  padding: 0.48rem 0.75rem 0.48rem 0.6rem;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.main-link:hover {
  background: var(--sage-soft);
  color: var(--forest);
}

.main-link svg {
  width: 15px;
}

/* --------------------------------------------------------- source link lists */
.src {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.src a {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  padding: 0.7rem 0.9rem;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.45;
  text-decoration: none;
}

.src a:hover {
  border-color: var(--sage);
  background: var(--sage-soft);
}

.src i {
  flex: 0 0 auto;
  color: var(--coral);
  font-size: 0.95rem;
  font-style: normal;
  line-height: 1.35;
}

/* ------------------------------------------------------------------- footer */
.site-footer {
  margin-top: 3.5rem;
  background: var(--forest);
  color: rgb(255 255 255 / 80%);
}

.footer-inner {
  width: min(var(--content), calc(100% - 2.5rem));
  margin: auto;
  padding: clamp(2rem, 5vw, 3.25rem) 0 clamp(2rem, 4vw, 2.5rem);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgb(255 255 255 / 16%);
  margin-bottom: 1.4rem;
}

.footer-nav a {
  color: rgb(255 255 255 / 85%);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--apricot);
}

.footer-main-link {
  color: var(--apricot) !important;
}

/* Sources gets a small pill treatment in the footer nav row too, so it reads
   as a distinct destination rather than one more plain link in the list. */
.footer-nav .footer-sources-link {
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  color: var(--apricot) !important;
}

.footer-nav .footer-sources-link:hover {
  background: rgb(255 255 255 / 10%);
}

.footer-note,
.footer-disclaimer {
  max-width: 62rem;
  margin: 0 0 0.9rem;
  font-size: 0.82rem;
  line-height: 1.6;
}

.footer-disclaimer {
  color: rgb(255 255 255 / 62%);
}

.footer-sign {
  margin: 1.8rem 0 0;
}

.footer-tagline {
  margin: 0 0 1.1rem;
  color: var(--apricot);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 500;
  text-align: center;
}

.footer-sign-divider {
  height: 1px;
  margin: 0 0 1.1rem;
  border: 0;
  background: rgb(255 255 255 / 16%);
}

.footer-sign-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1.5rem;
  font-size: 0.8rem;
  color: rgb(255 255 255 / 62%);
}

.footer-sign-bottom strong {
  color: rgb(255 255 255 / 92%);
  font-weight: 600;
}

@media (max-width: 640px) {
  .main-link span {
    display: none;
  }

  .main-link {
    padding: 0.48rem 0.55rem;
  }

  .footer-sign-bottom {
    justify-content: flex-start;
    gap: 0.3rem;
  }

  .footer-sign-bottom span {
    width: 100%;
  }
}

@media print {
  .site-footer,
  .main-link {
    display: none;
  }
}
