/* taichihome.com — shared styles. Quiet and book-like: white paper, calm blues, plain typography. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #ffffff;
  --bg-2: #f4f8fd;
  --card: #ffffff;
  --ink: #0f2742;
  --ink-2: #3b5373;
  --ink-3: #687b96;
  --line: #e2e9f2;
  --accent: #2559a8;
  --accent-hover: #1d4a8f;
  --on-accent: #ffffff;
  --calm: #3a86c8;
  --calm-soft: #e8f1fb;
  --warn: #b65a3c;
  --focus: #3a86c8;
  --yy-light: #ffffff;
  --yy-dark: #2559a8;
  --shadow: 0 1px 2px rgb(16 42 84 / 0.05), 0 6px 20px rgb(16 42 84 / 0.05);
  --book-shadow: 0 1px 1px rgb(12 35 64 / 0.08), 0 10px 22px rgb(12 35 64 / 0.1), 0 34px 60px rgb(12 35 64 / 0.16);
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1080px;
  --narrow: 760px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-zh: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color-scheme: light;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

/* Smooth jumps within a page, but a #link from another page lands straight away. */
html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

svg {
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 4.6vw, 3rem);
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--calm-soft);
}

/* SVG elements ignore the UA [hidden] rule, so make it universal. */
[hidden] {
  display: none !important;
}

.zh {
  font-family: var(--font-zh);
  font-weight: 500;
}

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

.small {
  font-size: 0.9rem;
}

/* A detail still waiting to be filled in (see src/data/programmes.ts). */
mark.ph {
  padding: 0 0.2em;
  border-radius: 4px;
  background: #fff1bf;
  color: #6a4b00;
}

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

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.narrow {
  width: min(100% - 32px, var(--narrow));
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand svg {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 8px;
}

.brand b {
  color: var(--calm);
  font-weight: inherit;
}

.brand-tld {
  color: var(--ink-3);
  font-weight: 500;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--bg-2);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--calm);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

.site-nav .nav-buy {
  margin-left: 0.5rem;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  color: var(--accent);
  font-weight: 600;
}

.site-nav .nav-buy:hover {
  border-color: var(--accent);
  background: var(--calm-soft);
  color: var(--accent);
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: -16px;
    right: -16px;
    display: none;
    padding: 0.5rem 16px 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    padding: 0.75rem 0.9rem;
    font-size: 1.05rem;
  }

  .site-nav .nav-buy {
    margin: 0.5rem 0 0;
    text-align: center;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--ghost {
  border-color: var(--line);
  background: var(--bg);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--calm);
}

.btn--small {
  min-height: 40px;
  padding: 0.45rem 1rem;
  font-size: 0.93rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(3rem, 7vw, 4.5rem) 0;
}

.section--alt {
  background: var(--bg-2);
}

.page-header + .section {
  padding-top: clamp(1rem, 3vw, 1.75rem);
}

.section h2 {
  margin-bottom: 1.25rem;
}

h2.spaced {
  margin-top: 3rem;
}

.lead {
  color: var(--ink-2);
  font-size: clamp(1.08rem, 1.8vw, 1.2rem);
  line-height: 1.65;
}

.hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--ink-3);
  font-size: 0.95rem;
}

.hint svg {
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 0.2rem;
  color: var(--calm);
}

.fine {
  margin-top: 0.85rem;
  color: var(--ink-3);
  font-size: 0.9rem;
}

/* ---------- Free PDFs (/programs/) ---------- */

.product {
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(3rem, 7vw, 5rem);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
}

.product-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

.product-cover {
  margin: 0;
  justify-self: center;
  width: 100%;
  max-width: 380px;
}

.cover {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: var(--book-shadow);
}

.kicker {
  margin-bottom: 0.6rem;
  color: var(--calm);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.product-info h2 {
  margin-bottom: 0.35rem;
}

.product-subtitle {
  color: var(--ink-2);
  font-size: 1.15rem;
}

.product-info .lead {
  margin-bottom: 1.5rem;
}

.facts {
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.facts li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.97rem;
}

.facts li > span:first-child {
  color: var(--ink-3);
}

.buy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
}

.price {
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

@media (max-width: 760px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-cover {
    max-width: 260px;
  }
}

.contents {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: chapter;
}

.contents li {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  counter-increment: chapter;
}

.contents li::before {
  content: counter(chapter, decimal-leading-zero);
  color: var(--calm);
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.85;
}

@media (max-width: 640px) {
  .contents {
    grid-template-columns: 1fr;
  }
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
}

@media (max-width: 720px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.author-name {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
  font-weight: 600;
}

/* Home page: hero with quick-start sessions, features, who it's for, how it works */

.hero {
  padding: clamp(2.5rem, 7vw, 5rem) 0;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

.hero h1 {
  margin-bottom: 0.9rem;
  font-size: clamp(2.3rem, 5.2vw, 3.4rem);
}

.hero .lead {
  max-width: 34em;
  margin-bottom: 1.6rem;
}

.hero-note {
  margin: 1rem 0 0;
  color: var(--ink-3);
  font-size: 0.93rem;
}

.quickstart {
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.quickstart-title {
  margin: 0 0 0.4rem;
  padding: 0 0.5rem;
  font-weight: 600;
}

.quickstart ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.quickstart a {
  display: grid;
  grid-template-columns: 2.4rem 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
}

.quickstart li + li {
  border-top: 1px solid var(--line);
}

.quickstart a:hover {
  background: var(--calm-soft);
}

.qs-play {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--calm-soft);
  color: var(--accent);
}

.qs-play svg {
  width: 15px;
  height: 15px;
  margin-left: 2px;
}

.quickstart strong {
  display: block;
  font-weight: 600;
}

.quickstart small {
  color: var(--ink-3);
  font-size: 0.9rem;
}

.qs-min {
  color: var(--calm);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.quickstart-foot {
  margin: 0.5rem 0.5rem 0;
  color: var(--ink-3);
  font-size: 0.88rem;
}

.section-head {
  max-width: 40em;
  margin-bottom: 2rem;
}

.section-head p {
  margin: 0;
  color: var(--ink-2);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  height: 100%;
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.feature:hover {
  border-color: var(--calm);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.feature svg,
.persona svg {
  width: 26px;
  height: 26px;
  margin-bottom: 0.45rem;
  color: var(--calm);
}

.feature strong {
  font-size: 1.05rem;
  font-weight: 600;
}

.feature span,
.persona p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.55;
}

.persona-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.persona {
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.persona h3 {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  padding-top: 1rem;
  border-top: 2px solid var(--line);
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 0.5rem;
  color: var(--calm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.steps h3 {
  margin-bottom: 0.35rem;
  font-size: 1.1rem;
}

.steps p {
  margin: 0;
  color: var(--ink-2);
}

.cta {
  text-align: center;
}

.cta .btn-row {
  justify-content: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .feature-grid,
  .persona-grid,
  .steps {
    grid-template-columns: 1fr;
  }
}

/* Free PDF cards (home, /programs/) */

.pdf-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.pdf-card {
  display: grid;
  align-content: start;
  gap: 0.2rem;
  height: 100%;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pdf-card:hover {
  border-color: var(--calm);
  box-shadow: var(--shadow);
}

.pdf-card-cover {
  width: 120px;
  margin: 0.25rem 0 1rem;
}

.pdf-card-cover .cover {
  border-radius: 3px;
}

.pdf-card strong {
  font-weight: 600;
  line-height: 1.3;
}

.pdf-card:hover strong {
  color: var(--accent);
}

.pdf-card span {
  color: var(--ink-2);
  font-size: 0.95rem;
}

.pdf-card small {
  margin-top: 0.4rem;
  color: var(--calm);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .pdf-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .pdf-card {
    padding: 0.9rem 1rem;
  }

  .pdf-card-cover {
    width: 80px;
  }
}

.programme-detail {
  margin-top: clamp(2rem, 5vw, 3rem);
}

.programme-detail h3 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.contents--single {
  grid-template-columns: 1fr;
}

.soon {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.45rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-3);
  font-size: 0.93rem;
  font-weight: 600;
}

/* The free PDF that matches the page, at the end of the free pages */

.pdf-box {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: clamp(1.75rem, 4vw, 2.5rem) 0;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.section + .pdf-box {
  margin-top: 0;
}

.pdf-box + .site-footer,
main:has(> .pdf-box:last-child) + .site-footer {
  border-top: 0;
}

.pdf-box-list {
  display: grid;
  max-width: var(--narrow);
}

.pdf-box-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.5rem;
  align-items: center;
}

.pdf-box-item + .pdf-box-item {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.pdf-box-cover {
  display: block;
}

.pdf-box-cover .cover {
  border-radius: 3px;
  box-shadow: 0 1px 1px rgb(12 35 64 / 0.08), 0 6px 14px rgb(12 35 64 / 0.14);
}

.pdf-box p {
  margin-bottom: 0.4rem;
  color: var(--ink-2);
  font-size: 0.97rem;
}

.pdf-box strong {
  color: var(--ink);
}

.pdf-box-kicker {
  color: var(--calm) !important;
  font-size: 0.75rem !important;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pdf-box .btn-row {
  margin-top: 0.9rem;
}

.pdf-box .pdf-box-more {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.95rem;
  font-weight: 600;
}

@media (max-width: 520px) {
  .pdf-box-item {
    grid-template-columns: 80px 1fr;
    align-items: start;
    gap: 1rem;
  }
}

/* Email forms: free PDF, tips sign-up and contact (sent by src/client/forms.ts) */

.email-form {
  display: grid;
  gap: 0.6rem;
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.email-form input[type="email"],
.email-form input[type="text"],
.email-form textarea {
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  font: inherit;
}

.field-row input[type="email"] {
  flex: 1 1 15rem;
  min-width: 0;
}

.email-form textarea {
  resize: vertical;
}

.email-form input:focus,
.email-form textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
}

.email-form button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-2);
  font-size: 0.92rem;
  cursor: pointer;
}

.check input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-status:empty {
  display: none;
}

.form-status {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
}

.form-status.is-error {
  color: var(--warn);
}

.form-note {
  color: var(--ink-3);
  font-size: 0.85rem;
}

.form-note a {
  color: inherit;
}

.email-form.is-sent .field-row,
.email-form.is-sent .check {
  display: none;
}

.buy-row .email-form {
  flex: 1 1 22rem;
}

.field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.contact-form label {
  display: grid;
  gap: 0.3rem;
  color: var(--ink-2);
  font-size: 0.93rem;
  font-weight: 500;
}

.contact-form {
  margin-top: 1.25rem;
}

@media (max-width: 560px) {
  .field-pair {
    grid-template-columns: 1fr;
  }
}

/* The tips sign-up at the top of the footer */

.newsletter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 1rem 2.5rem;
  align-items: center;
  margin-top: 2.5rem;
  padding: 1.6rem 1.8rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
}

.site-footer .newsletter h2 {
  margin-bottom: 0.3rem;
  color: var(--ink);
  font-size: 1.05rem;
  letter-spacing: 0;
  text-transform: none;
}

.newsletter p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.95rem;
}

@media (max-width: 760px) {
  .newsletter {
    grid-template-columns: 1fr;
  }
}

/* ---------- Page header (free pages) ---------- */

.page-header {
  padding: clamp(2.25rem, 5vw, 3.5rem) 0 clamp(1.5rem, 3vw, 2rem);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
}

.page-header .lead {
  max-width: 36em;
  margin-bottom: 0;
}

.needs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.needs li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-2);
  font-size: 0.9rem;
}

.needs svg {
  width: 16px;
  height: 16px;
  color: var(--calm);
}

/* ---------- TOC layout ---------- */

.with-toc {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(1rem, 3vw, 2rem) 0 clamp(2rem, 5vw, 3rem);
}

.toc {
  position: sticky;
  top: 88px;
  align-self: start;
  font-size: 0.93rem;
}

.toc p {
  margin-bottom: 0.6rem;
  color: var(--ink-3);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}

.toc a {
  display: block;
  margin-left: -1px;
  padding: 0.3rem 0 0.3rem 1rem;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  text-decoration: none;
}

.toc a:hover {
  color: var(--ink);
}

.toc a.is-active {
  border-left-color: var(--calm);
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 900px) {
  .with-toc {
    grid-template-columns: 1fr;
  }

  .toc {
    display: none;
  }
}

.prose {
  max-width: 760px;
}

.prose > section {
  margin-bottom: clamp(2.75rem, 6vw, 3.75rem);
}

.prose > section:last-child {
  margin-bottom: 0;
}

/* ---------- Lists ---------- */

.checklist {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  margin-bottom: 0.55rem;
  padding-left: 1.9rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.4em;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--calm-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%233a86c8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E")
    center / 72% no-repeat;
}

.checklist--grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.6rem 1.75rem;
}

.checklist--grid li {
  margin: 0;
}

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: principle;
}

.principles li {
  display: grid;
  grid-template-columns: 2.1rem 1fr;
  gap: 0 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
  counter-increment: principle;
}

.principles li::before {
  content: counter(principle, decimal-leading-zero);
  grid-row: span 2;
  color: var(--calm);
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.75;
}

.principles strong {
  font-weight: 600;
}

.principles span {
  color: var(--ink-3);
  font-size: 0.93rem;
}

/* ---------- Stances ---------- */

.stances {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stance {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.stance svg {
  display: block;
  width: 100%;
  max-width: 150px;
  height: auto;
  margin: 0 auto 0.5rem;
}

.stance figcaption {
  font-size: 0.93rem;
  line-height: 1.45;
}

.stance figcaption strong {
  font-weight: 600;
  font-size: 1rem;
}

.stance figcaption > span:last-child {
  display: block;
  margin-top: 0.3rem;
  color: var(--ink-2);
}

.foot {
  fill: var(--accent);
}

.foot--light {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 4 3;
}

.foot-label {
  fill: var(--ink-2);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
}

.facing {
  fill: none;
  stroke: var(--calm);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.facing-label {
  fill: var(--calm);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

/* ---------- Tables ---------- */

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
}

th,
td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--bg-2);
  color: var(--ink-3);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr:last-child > * {
  border-bottom: 0;
}

td strong,
tbody th {
  font-weight: 600;
}

td:first-child strong {
  white-space: nowrap;
}

.fix-table td:first-child {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--warn) 60%, transparent);
}

.fix-table td:last-child {
  font-weight: 500;
}

.compare tbody th {
  white-space: nowrap;
}

.compare tbody th .zh {
  color: var(--calm);
  margin-right: 0.15rem;
}

.compare tbody th small {
  display: block;
  color: var(--ink-3);
  font-weight: 400;
}

.compare td.muted {
  font-size: 0.9rem;
}

/* ---------- Callouts ---------- */

.callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  margin: 1.25rem 0;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--ink-2);
  font-size: 0.95rem;
}

.callout svg {
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  color: var(--calm);
}

.callout p {
  margin: 0;
}

.callout--warn svg {
  color: var(--warn);
}

/* ---------- FAQ ---------- */

.faq-group + .faq-group {
  margin-top: 2.75rem;
}

.faq {
  border-bottom: 1px solid var(--line);
}

h2 + .faq {
  border-top: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 1rem 2.5rem 1rem 0;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  width: 1.4rem;
  height: 1.4rem;
  margin-top: -0.7rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%232559a8' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M8 3.5v9M3.5 8h9'/%3E%3C/svg%3E")
    center / 70% no-repeat;
  transition: transform 0.25s ease;
}

.faq[open] summary::after {
  transform: rotate(45deg);
}

.faq p {
  margin: 0;
  padding: 0 0 1.1rem;
  color: var(--ink-2);
}

/* ---------- Styles page ---------- */

.versus {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.versus div {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.versus strong {
  font-weight: 600;
}

.versus span {
  color: var(--ink-2);
  font-size: 0.95rem;
}

/* ---------- Tags & chips ---------- */

.tag {
  display: inline-block;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: var(--calm-soft);
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.tag--challenge {
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  color: var(--warn);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  min-height: 38px;
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-2);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

.chip:hover {
  color: var(--ink);
  border-color: var(--calm);
}

.chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

/* ---------- Movements ---------- */

.move-tools {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 2rem;
}

.search {
  position: relative;
  max-width: 520px;
}

.search svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  color: var(--ink-3);
  pointer-events: none;
}

.search input {
  width: 100%;
  min-height: 50px;
  padding: 0.75rem 1rem 0.75rem 2.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  font: inherit;
}

.search input::placeholder {
  color: var(--ink-3);
}

.search input:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
}

.move-group {
  margin-bottom: 2.25rem;
}

.move-group-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-bottom: 0.6rem;
}

.move-group-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.move-group-head span {
  color: var(--ink-3);
  font-size: 0.9rem;
}

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

.move-card {
  padding: clamp(1.1rem, 3vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.move-card-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.9rem;
  margin-bottom: 1.1rem;
}

.move-card-head h3 {
  margin: 0.1rem 0 0.1rem;
  font-size: 1.2rem;
}

.move-card-head .move-tags {
  margin-top: 0.45rem;
}

.move-py .zh {
  margin-right: 0.25rem;
  color: var(--ink-2);
}

.move-num {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--calm-soft);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.move-py {
  display: block;
  color: var(--ink-3);
  font-size: 0.85rem;
}

.move-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.empty-state {
  padding: 2.5rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-3);
  text-align: center;
}

.move-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

@media (max-width: 720px) {
  .move-body {
    grid-template-columns: 1fr;
  }
}

.howto {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: how;
  border-top: 1px solid var(--line);
}

.howto li {
  position: relative;
  padding: 0.85rem 0 0.85rem 2.6rem;
  border-bottom: 1px solid var(--line);
  counter-increment: how;
}

.howto li::before {
  content: counter(how);
  position: absolute;
  left: 0;
  top: 0.85rem;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.82rem;
  font-weight: 600;
}

.tips {
  display: grid;
  gap: 0.6rem;
  margin: 0;
}

.tip {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.tip dt {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tip dd {
  margin: 0.15rem 0 0;
  color: var(--ink-2);
}

.tip--focus {
  background: var(--calm-soft);
  border-color: transparent;
}

.tip--focus dt {
  color: var(--accent);
}

.tip--avoid dt {
  color: var(--warn);
}

.tip--easier dt {
  color: var(--ink-3);
}

/* ---------- Practice ---------- */

/* The written chair tai chi exercises on /practice/ */

.chair-moves {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
}

.chair-moves li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 0.75rem 1.1rem 0.75rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.chair-move-figure {
  margin: 0;
}

.chair-move-figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.chair-moves h3 {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
}

.chair-moves h3 span {
  color: var(--calm);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.chair-moves p {
  margin: 0 0 0.3rem;
  color: var(--ink-2);
}

@media (max-width: 520px) {
  .chair-moves li {
    grid-template-columns: 80px 1fr;
    gap: 0.9rem;
  }
}

.session-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
}

.session-option {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  cursor: pointer;
}

.session-option:hover {
  border-color: var(--calm);
}

.session-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.session-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--calm-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.session-option:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.session-option strong {
  font-weight: 600;
}

.session-meta {
  color: var(--calm);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .session-picker {
    grid-template-columns: 1fr 1fr;
  }

  .session-option {
    flex-direction: column;
    gap: 0.1rem;
  }
}

.player {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--card);
  box-shadow: var(--shadow);
}

.timer {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  margin: 0 auto;
}

.timer svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer .track {
  fill: none;
  stroke: var(--calm-soft);
  stroke-width: 4;
}

.timer .progress {
  fill: none;
  stroke: url(#ring-grad);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.25s linear;
}

.ring-stop-a {
  stop-color: var(--calm);
}

.ring-stop-b {
  stop-color: var(--accent);
}

.timer .breath-orb {
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, color-mix(in srgb, var(--calm) 26%, transparent), color-mix(in srgb, var(--calm) 8%, transparent) 70%);
  opacity: 0;
  transform: scale(0.62);
  transition: opacity 0.6s ease;
  will-change: transform;
}

.timer[data-breathing] .breath-orb {
  opacity: 1;
}

.timer .readout {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.timer .time {
  font-size: clamp(2.6rem, 7vw, 3.3rem);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1;
}

.timer .breath-cue {
  min-height: 1.5em;
  margin-top: 0.5rem;
  color: var(--calm);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.now .step-count {
  margin: 0;
  color: var(--calm);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.now h2 {
  margin: 0.3rem 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.now .instruction {
  margin-bottom: 0.8rem;
  color: var(--ink-2);
  font-size: 1.05rem;
}

.now .cues {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.now .cues li {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--calm-soft);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
}

.move-link {
  display: inline-flex;
  margin-bottom: 1rem;
  font-size: 0.93rem;
  font-weight: 600;
}

.session-bar {
  height: 4px;
  margin-bottom: 1.25rem;
  border-radius: 999px;
  background: var(--calm-soft);
  overflow: hidden;
}

.session-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--calm);
  transition: width 0.25s linear;
}

.session-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  color: var(--ink-3);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.icon-btn:hover {
  border-color: var(--calm);
  background: var(--calm-soft);
}

.icon-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.play-btn {
  min-width: 9rem;
}

.toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 1rem;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 36px;
  color: var(--ink-2);
  font-size: 0.93rem;
  font-weight: 500;
  cursor: pointer;
}

.switch input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 40px;
  height: 24px;
  margin: 0;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.switch input::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
  transition: transform 0.2s ease;
}

.switch input:checked {
  background: var(--calm);
}

.switch input:checked::after {
  transform: translateX(16px);
}

.switch input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .player {
    grid-template-columns: 1fr;
  }

  .timer {
    max-width: 230px;
  }

  .play-btn {
    min-width: 7.5rem;
  }

  .now {
    text-align: center;
  }

  .now .cues,
  .controls,
  .toggles {
    justify-content: center;
  }
}

.practice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  margin-top: 2rem;
  align-items: start;
}

.practice-layout h2 {
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

@media (max-width: 900px) {
  .practice-layout {
    grid-template-columns: 1fr;
  }
}

.step-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-list button {
  display: grid;
  grid-template-columns: 1.8rem 1fr auto;
  gap: 0.6rem;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink-2);
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}

.step-list button:hover {
  border-color: var(--calm);
  color: var(--ink);
}

.step-list .step-n,
.step-list .step-d {
  color: var(--ink-3);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.step-list .step-n {
  font-weight: 600;
}

.step-list .is-done button {
  color: var(--ink-3);
}

.step-list .is-done .step-name {
  text-decoration: line-through;
  text-decoration-color: var(--line);
}

.step-list .is-current button {
  border-color: var(--accent);
  background: var(--calm-soft);
  color: var(--ink);
  font-weight: 600;
}

.step-list .is-current .step-n {
  color: var(--accent);
}

/* Week tracker */

.week {
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.week-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.3rem;
  margin: 0 0 0.8rem;
  padding: 0;
  list-style: none;
  text-align: center;
}

.week-days li {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  color: var(--ink-3);
  font-size: 0.75rem;
  font-weight: 600;
}

.week-days .dot {
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--line);
  border-radius: 50%;
}

.week-days .is-today {
  color: var(--accent);
}

.week-days .is-today .dot {
  border-color: var(--calm);
}

.week-days .is-done .dot {
  border-color: var(--calm);
  background: var(--calm)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E")
    center / 62% no-repeat;
}

.week-count {
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.week .muted {
  margin: 0.6rem 0 0;
}

/* Breathing pacer */

.pacer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

.pacer-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 300px);
  aspect-ratio: 1;
  margin: 0 auto;
}

.pacer-ring {
  position: absolute;
  inset: 0;
  border: 1px dashed var(--line);
  border-radius: 50%;
}

.pacer-orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, color-mix(in srgb, var(--calm) 40%, transparent), color-mix(in srgb, var(--calm) 14%, transparent) 70%);
  transform: scale(0.5);
  will-change: transform;
}

.pacer-text {
  position: relative;
  text-align: center;
}

.pacer-phase {
  display: block;
  font-size: 1.4rem;
  font-weight: 600;
}

.pacer-count {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.range-row {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.1rem;
}

.range-row label {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.range-row output {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

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

@media (max-width: 760px) {
  .pacer {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 2.75rem 0 1.75rem;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.93rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
}

.site-footer h2 {
  margin-bottom: 0.7rem;
  color: var(--ink-3);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin-bottom: 0.4rem;
}

.site-footer a {
  color: var(--ink-2);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.site-footer .brand {
  margin-bottom: 0.7rem;
}

.disclaimer {
  max-width: 30em;
  color: var(--ink-3);
  font-size: 0.88rem;
}

.footer-bottom {
  margin: 2rem 0 0;
  color: var(--ink-3);
  font-size: 0.85rem;
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
}

/* ---------- 404 ---------- */

.not-found {
  display: grid;
  place-items: center;
  min-height: 60vh;
  padding: 4rem 0;
  text-align: center;
}

.not-found .yinyang {
  width: 88px;
  height: 88px;
  margin-bottom: 1.25rem;
}

.not-found .btn-row {
  justify-content: center;
}

.yy-light {
  fill: var(--yy-light);
}

.yy-dark {
  fill: var(--yy-dark);
}

.yy-stroke {
  fill: none;
  stroke: var(--yy-dark);
  stroke-width: 2;
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Print ---------- */

@media print {
  .site-header,
  .site-footer,
  .toc,
  .btn,
  .skip-link,
  .move-tools,
  .pdf-box {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .with-toc {
    display: block;
  }
}
