/* ==========================================================================
   Therapy Mends 2.0 — base styles and components for new pages.
   Requires tm-chrome.css (tokens) to load first.
   ========================================================================== */

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

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--tm-header-h) + 16px);
}

body {
  margin: 0;
  background: var(--tm-ivory);
  color: var(--tm-ink);
  font-family: var(--tm-sans);
  font-size: var(--tm-step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--tm-ink);
  font-family: var(--tm-serif);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 { font-size: var(--tm-step-4); }
h2 { font-size: var(--tm-step-3); }
h3 { font-size: var(--tm-step-2); }
h4 { font-size: var(--tm-step-1); }

h1 em, h2 em, h3 em { font-style: italic; color: var(--tm-clay-ink); }

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 1em; }

a { color: var(--tm-forest); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--tm-forest-deep); text-decoration-thickness: 2px; }
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible { outline: none; box-shadow: var(--tm-focus); border-radius: 6px; }

ul, ol { margin: 0; padding: 0; }

::selection { background: var(--tm-clay-soft); color: var(--tm-ink); }

main { display: block; }

/* Component display rules must never override the hidden attribute. */
[hidden] { display: none !important; }
main:focus { outline: none; }

/* ---------- Layout ---------- */

.tm-container {
  width: 100%;
  max-width: var(--tm-max);
  margin-inline: auto;
  padding-inline: var(--tm-gutter);
}

.tm-container--narrow { max-width: 820px; }

.tm-section { padding-block: clamp(3.5rem, 2.2rem + 6vw, 7rem); }
.tm-section--tight { padding-block: clamp(2.5rem, 1.8rem + 3vw, 4.5rem); }
.tm-section--alt { background: var(--tm-ivory-2); }
.tm-section--sand { background: linear-gradient(180deg, var(--tm-ivory-2), var(--tm-sand) 140%); }
.tm-section--forest { background: var(--tm-forest); color: rgba(251, 247, 240, 0.88); }
.tm-section--forest h2,
.tm-section--forest h3 { color: var(--tm-ivory); }
.tm-section--forest h2 em { color: #e7b49b; }

.tm-section__head {
  display: grid;
  gap: var(--tm-space-4);
  max-width: 720px;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.25rem);
}

.tm-section__head--split {
  max-width: none;
  align-items: end;
}

@media (min-width: 900px) {
  .tm-section__head--split { grid-template-columns: 1.2fr 1fr; gap: var(--tm-space-7); }
}

.tm-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  color: var(--tm-clay-ink);
  font: 800 0.76rem/1.2 var(--tm-sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tm-eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: currentColor;
}

.tm-section--forest .tm-eyebrow { color: #e7b49b; }

.tm-lead {
  color: var(--tm-ink-2);
  font-size: var(--tm-step-1);
  line-height: 1.6;
  max-width: 62ch;
}

.tm-section--forest .tm-lead { color: rgba(251, 247, 240, 0.82); }

.tm-muted { color: var(--tm-ink-3); }
.tm-small { font-size: var(--tm-step--1); }

.tm-grid { display: grid; gap: var(--tm-space-5); }
.tm-grid > * { min-width: 0; }

@media (min-width: 700px) {
  .tm-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .tm-grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .tm-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .tm-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.tm-stack > * + * { margin-top: var(--tm-space-4); }
.tm-stack-lg > * + * { margin-top: var(--tm-space-6); }

.tm-prose { max-width: 68ch; color: var(--tm-ink-2); }
.tm-prose p + p { margin-top: 1.1em; }
.tm-prose h2 { margin: 2.2em 0 0.7em; font-size: var(--tm-step-2); }
.tm-prose h2:first-child { margin-top: 0; }

/* ---------- Line motif (echoes the single-line logo) ---------- */

.tm-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.tm-divider {
  display: block;
  width: 140px;
  height: 28px;
  color: var(--tm-sage);
}

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

.tm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.8rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 700 1rem/1.15 var(--tm-sans);
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--tm-ease), color 0.2s var(--tm-ease),
    border-color 0.2s var(--tm-ease), transform 0.2s var(--tm-ease), box-shadow 0.2s var(--tm-ease);
}

.tm-btn:active { transform: translateY(1px); }
.tm-btn:focus-visible { outline: none; box-shadow: var(--tm-focus); }

.tm-btn svg { width: 18px; height: 18px; flex: none; transition: transform 0.2s var(--tm-ease); }
.tm-btn:hover svg { transform: translateX(3px); }

.tm-btn--primary { background: var(--tm-forest); border-color: var(--tm-forest); color: var(--tm-ivory); }
.tm-btn--primary:hover { background: var(--tm-forest-deep); border-color: var(--tm-forest-deep); color: var(--tm-ivory); }

.tm-btn--secondary { background: transparent; border-color: var(--tm-forest); color: var(--tm-forest); }
.tm-btn--secondary:hover { background: var(--tm-sage-soft); color: var(--tm-forest-deep); }

.tm-btn--light { background: var(--tm-ivory); border-color: var(--tm-ivory); color: var(--tm-forest); }
.tm-btn--light:hover { background: #fff; color: var(--tm-forest-deep); }

.tm-btn--ghost-light { background: transparent; border-color: rgba(251, 247, 240, 0.55); color: var(--tm-ivory); }
.tm-btn--ghost-light:hover { background: rgba(251, 247, 240, 0.1); color: #fff; }

.tm-btn--lg { min-height: 54px; padding: 0.95rem 1.8rem; font-size: 1.05rem; }
.tm-btn--sm { min-height: 40px; padding: 0.55rem 1.1rem; font-size: 0.92rem; }
.tm-btn--block { width: 100%; }

.tm-btn[aria-disabled="true"],
.tm-btn:disabled {
  background: var(--tm-ivory-2);
  border-color: var(--tm-sand-2);
  border-style: dashed;
  color: var(--tm-ink-3);
  cursor: not-allowed;
  transform: none;
}

.tm-btn[aria-busy="true"] { cursor: progress; }
.tm-btn[aria-busy="true"]::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: tm-spin 0.7s linear infinite;
}

.tm-btn-row { display: flex; flex-wrap: wrap; gap: var(--tm-space-3); align-items: center; }

.tm-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  color: var(--tm-forest);
  font-weight: 800;
  text-decoration: none;
}

.tm-link-arrow svg { width: 17px; height: 17px; transition: transform 0.2s var(--tm-ease); }
.tm-link-arrow:hover { color: var(--tm-forest-deep); text-decoration: underline; }
.tm-link-arrow:hover svg { transform: translateX(3px); }

/* ---------- Forms ---------- */

.tm-form { display: grid; gap: var(--tm-space-4); }

.tm-field { display: grid; gap: 0.4rem; }

.tm-label {
  color: var(--tm-ink);
  font-size: 0.95rem;
  font-weight: 700;
}

.tm-label .tm-req { color: var(--tm-clay-ink); text-decoration: none; border: 0; }

.tm-input,
.tm-select,
.tm-textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.75rem 0.95rem;
  border: 1.5px solid var(--tm-line-strong);
  border-radius: 12px;
  background: var(--tm-paper);
  color: var(--tm-ink);
  font: 400 1rem/1.4 var(--tm-sans);
  transition: border-color 0.2s var(--tm-ease), box-shadow 0.2s var(--tm-ease);
}

.tm-textarea { min-height: 120px; resize: vertical; }

.tm-input::placeholder,
.tm-textarea::placeholder { color: var(--tm-ink-3); }

.tm-input:hover,
.tm-select:hover,
.tm-textarea:hover { border-color: var(--tm-ink-3); }

.tm-input:focus,
.tm-select:focus,
.tm-textarea:focus {
  outline: none;
  border-color: var(--tm-forest);
  box-shadow: 0 0 0 4px rgba(34, 70, 58, 0.16);
}

.tm-input[aria-invalid="true"],
.tm-select[aria-invalid="true"],
.tm-textarea[aria-invalid="true"] { border-color: var(--tm-danger); }

.tm-hint { color: var(--tm-ink-3); font-size: 0.88rem; }

.tm-error {
  display: none;
  align-items: flex-start;
  gap: 0.4rem;
  color: var(--tm-danger);
  font-size: 0.9rem;
  font-weight: 700;
}

.tm-error.is-visible { display: flex; }
.tm-error::before { content: "!"; display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--tm-danger); color: #fff; font-size: 0.75rem; }

.tm-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  color: var(--tm-ink-2);
  font-size: 0.93rem;
  line-height: 1.5;
}

.tm-check input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--tm-forest);
}

.tm-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Cards ---------- */

.tm-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--tm-space-4);
  padding: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem);
  border: 1px solid var(--tm-sand);
  border-radius: var(--tm-radius-lg);
  background: var(--tm-paper);
  box-shadow: var(--tm-shadow-sm);
}

.tm-card--interactive { transition: transform 0.3s var(--tm-ease), box-shadow 0.3s var(--tm-ease), border-color 0.3s var(--tm-ease); }
.tm-card--interactive:hover { transform: translateY(-3px); box-shadow: var(--tm-shadow); border-color: var(--tm-sand-2); }

/* Whole-card link without nesting interactive elements */
.tm-card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tm-card__link { text-decoration: none; color: inherit; }
.tm-card__link:focus-visible { box-shadow: none; }
.tm-card:has(.tm-card__link:focus-visible) { box-shadow: var(--tm-focus); }

.tm-card__title { font-size: var(--tm-step-2); }
.tm-card__body { color: var(--tm-ink-2); }
.tm-card__foot { margin-top: auto; padding-top: var(--tm-space-2); }

.tm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--tm-ink-2);
  font-size: 0.93rem;
  font-weight: 600;
}

.tm-meta li { display: inline-flex; align-items: center; gap: 0.4rem; }
.tm-meta svg { width: 17px; height: 17px; color: var(--tm-sage-ink); }

.tm-price {
  font-family: var(--tm-serif);
  font-size: var(--tm-step-2);
  font-weight: 600;
  color: var(--tm-forest);
  font-variant-numeric: lining-nums tabular-nums;
}

.tm-price small { font-family: var(--tm-sans); font-size: 0.85rem; font-weight: 600; color: var(--tm-ink-3); }

.tm-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; padding: 0; list-style: none; }

.tm-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--tm-sage-soft);
  color: var(--tm-sage-ink);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
}

.tm-tag--clay { background: var(--tm-clay-soft); color: var(--tm-clay-ink); }
.tm-tag--outline { background: transparent; border: 1px solid var(--tm-sand-2); color: var(--tm-ink-2); }

.tm-num {
  font-family: var(--tm-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--tm-clay-ink);
}

/* ---------- Notices and states (loading / empty / error) ---------- */

.tm-notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--tm-sand);
  border-radius: var(--tm-radius);
  background: var(--tm-ivory-2);
  color: var(--tm-ink-2);
  font-size: 0.97rem;
}

.tm-notice svg { width: 22px; height: 22px; margin-top: 2px; color: var(--tm-sage-ink); }
.tm-notice strong { color: var(--tm-ink); }
.tm-notice--clay { background: var(--tm-clay-soft); border-color: #e8c9b6; }
.tm-notice--clay svg { color: var(--tm-clay-ink); }
.tm-notice--danger { background: var(--tm-danger-soft); border-color: #ecc0b8; color: #5a1f19; }
.tm-notice--danger svg { color: var(--tm-danger); }
.tm-notice--success { background: var(--tm-success-soft); border-color: #c5d8bf; }
.tm-notice--success svg { color: var(--tm-success); }

.tm-state {
  display: grid;
  justify-items: start;
  gap: 0.6rem;
  padding: 1.4rem;
  border: 1.5px dashed var(--tm-sand-2);
  border-radius: var(--tm-radius);
  background: var(--tm-paper);
  color: var(--tm-ink-2);
}

.tm-state__title { margin: 0; font: 700 1.02rem/1.35 var(--tm-sans); color: var(--tm-ink); }
.tm-state__icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--tm-sage-soft); color: var(--tm-sage-ink); }
.tm-state__icon svg { width: 18px; height: 18px; }

.tm-state--error { border-style: solid; border-color: #ecc0b8; background: var(--tm-danger-soft); }
.tm-state--error .tm-state__icon { background: #f1cdc6; color: var(--tm-danger); }

.tm-state--loading { border-style: solid; border-color: var(--tm-sand); }

.tm-skeleton {
  display: block;
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--tm-ivory-2) 25%, var(--tm-sand) 45%, var(--tm-ivory-2) 65%);
  background-size: 300% 100%;
  animation: tm-shimmer 1.4s ease-in-out infinite;
}

.tm-skeleton--slot { height: 46px; border-radius: 12px; }

@keyframes tm-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes tm-spin { to { transform: rotate(360deg); } }

/* ---------- Availability block (booking-engine hook) ---------- */

.tm-availability { display: grid; gap: var(--tm-space-4); }
.tm-availability__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; align-items: baseline; }
.tm-availability__title,
.tm-panel .tm-availability__title { margin: 0; font: 800 0.8rem/1.2 var(--tm-sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--tm-ink-2); }

/* ---------- Breadcrumbs ---------- */

.tm-breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.25rem; list-style: none; color: var(--tm-ink-3); font-size: 0.9rem; }
.tm-breadcrumbs li { display: inline-flex; align-items: center; gap: 0.25rem; }
.tm-breadcrumbs li + li::before { content: "/"; color: var(--tm-sand-2); margin-right: 0.25rem; }
.tm-breadcrumbs a { color: var(--tm-ink-2); text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.tm-breadcrumbs a:hover { color: var(--tm-forest); text-decoration: underline; }

/* ---------- FAQ (native details/summary) ---------- */

.tm-faq { border-top: 1px solid var(--tm-sand-2); }

.tm-faq details { border-bottom: 1px solid var(--tm-sand-2); }

.tm-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding: 1rem 0;
  color: var(--tm-ink);
  font: 500 var(--tm-step-1)/1.35 var(--tm-serif);
  list-style: none;
  cursor: pointer;
}

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

.tm-faq summary::after {
  content: "";
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid var(--tm-sand-2);
  border-radius: 50%;
  background:
    linear-gradient(var(--tm-forest), var(--tm-forest)) center / 11px 1.5px no-repeat,
    linear-gradient(var(--tm-forest), var(--tm-forest)) center / 1.5px 11px no-repeat;
  transition: transform 0.25s var(--tm-ease), background-color 0.25s var(--tm-ease);
}

.tm-faq details[open] summary::after { transform: rotate(45deg); background-color: var(--tm-sage-soft); }
.tm-faq summary:hover { color: var(--tm-forest); }

.tm-faq__answer { padding: 0 2.5rem 1.4rem 0; color: var(--tm-ink-2); }
.tm-faq__answer a { font-weight: 700; }

/* ---------- Hero (homepage) ---------- */

.tm-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 1.5rem + 5vw, 6rem) clamp(3.5rem, 2rem + 6vw, 7rem);
  background:
    radial-gradient(60% 70% at 85% 20%, rgba(169, 185, 160, 0.28), transparent 70%),
    radial-gradient(50% 60% at 0% 100%, rgba(194, 123, 91, 0.12), transparent 70%),
    var(--tm-ivory);
}

.tm-hero__grid { display: grid; gap: clamp(2.5rem, 2rem + 3vw, 4.5rem); align-items: center; }

@media (min-width: 960px) {
  .tm-hero__grid { grid-template-columns: 1.08fr 0.92fr; }
}

.tm-hero__copy { display: grid; gap: var(--tm-space-5); justify-items: start; }
.tm-hero h1 { max-width: 15ch; }
.tm-hero .tm-lead { max-width: 52ch; }

.tm-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin: 0;
  padding: var(--tm-space-4) 0 0;
  list-style: none;
  border-top: 1px solid var(--tm-sand-2);
  color: var(--tm-ink-2);
  font-size: 0.95rem;
  font-weight: 600;
}

.tm-facts li { display: inline-flex; align-items: center; gap: 0.45rem; }
.tm-facts svg { width: 18px; height: 18px; color: var(--tm-sage-ink); }

.tm-duo {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.9rem, 0.5rem + 1.5vw, 1.6rem);
  max-width: 560px;
  margin-inline: auto;
  width: 100%;
}

.tm-duo__loop {
  position: absolute;
  inset: -6% -8% auto;
  width: 116%;
  height: auto;
  color: var(--tm-clay);
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}

.tm-duo__item { position: relative; z-index: 1; margin: 0; }
.tm-duo__item:nth-child(3) { margin-top: clamp(2.2rem, 1.5rem + 3vw, 4rem); }

.tm-arch {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px var(--tm-radius-lg) var(--tm-radius-lg);
  background: var(--tm-sand);
  box-shadow: var(--tm-shadow-lg);
}

.tm-arch img { width: 100%; height: 100%; object-fit: cover; }

.tm-duo figcaption { margin-top: 0.85rem; padding-left: 0.25rem; }
.tm-duo figcaption a { font: 500 1.1rem/1.3 var(--tm-serif); color: var(--tm-ink); text-decoration: none; }
.tm-duo figcaption a:hover { color: var(--tm-forest); text-decoration: underline; }
.tm-duo figcaption span { display: block; color: var(--tm-ink-3); font-size: 0.88rem; font-weight: 600; }

.tm-draw path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: tm-draw 2.6s 0.3s var(--tm-ease) forwards; }
@keyframes tm-draw { to { stroke-dashoffset: 0; } }

/* Page entrance: one quiet staggered reveal */
.tm-rise { animation: tm-rise 0.8s var(--tm-ease) both; }
.tm-rise--2 { animation-delay: 0.08s; }
.tm-rise--3 { animation-delay: 0.16s; }
.tm-rise--4 { animation-delay: 0.24s; }
.tm-rise--5 { animation-delay: 0.32s; }
@keyframes tm-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Service cards ---------- */

.tm-service-card .tm-num { display: block; }
.tm-service-card__title { font-size: var(--tm-step-2); }
.tm-service-card__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; margin-top: auto; padding-top: var(--tm-space-4); border-top: 1px solid var(--tm-sand); }

/* ---------- Psychologist cards ---------- */

.tm-person {
  container: person / inline-size;
  min-width: 0;
  border: 1px solid var(--tm-sand);
  border-radius: var(--tm-radius-lg);
  background: var(--tm-paper);
}

.tm-person__inner {
  display: grid;
  gap: var(--tm-space-5);
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
}

@container person (min-width: 540px) {
  .tm-person__inner { grid-template-columns: minmax(170px, 0.75fr) 1.25fr; align-items: start; }
}

.tm-person__photo { max-width: 260px; }
.tm-person__name { font-size: var(--tm-step-2); }
.tm-person__name a { color: inherit; text-decoration: none; }
.tm-person__name a:hover { color: var(--tm-forest); text-decoration: underline; }
.tm-person__title { margin-top: 0.3rem; color: var(--tm-clay-ink); font-weight: 700; font-size: 0.95rem; }
.tm-person__summary { color: var(--tm-ink-2); }
.tm-person__body { display: grid; gap: var(--tm-space-4); }

.tm-dl { display: grid; gap: 0.7rem; margin: 0; font-size: 0.94rem; }
.tm-dl div { display: grid; gap: 0.1rem; }
.tm-dl dt { color: var(--tm-ink-3); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.tm-dl dd { margin: 0; color: var(--tm-ink); }

/* ---------- Steps ---------- */

.tm-steps { display: grid; gap: var(--tm-space-5); margin: 0; padding: 0; list-style: none; counter-reset: tm-step; }

@media (min-width: 760px) { .tm-steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .tm-steps { grid-template-columns: repeat(4, 1fr); gap: var(--tm-space-6); } }

.tm-step { position: relative; display: grid; gap: 0.6rem; align-content: start; padding-top: 3.4rem; counter-increment: tm-step; }

.tm-step::before {
  content: counter(tm-step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--tm-sage);
  border-radius: 50%;
  background: var(--tm-paper);
  color: var(--tm-forest);
  font: italic 500 1.15rem/1 var(--tm-serif);
}

.tm-step::after {
  content: "";
  position: absolute;
  top: 1.3rem;
  left: 3.2rem;
  right: 0;
  border-top: 1px dashed var(--tm-sage);
}

.tm-step:last-child::after { display: none; }
.tm-step h3 { font-size: var(--tm-step-1); }
.tm-step p { color: var(--tm-ink-2); font-size: 0.97rem; }

/* ---------- Pricing table ---------- */

.tm-fees { display: grid; gap: var(--tm-space-4); }

.tm-fee {
  display: grid;
  gap: 0.75rem 1.5rem;
  align-items: center;
  padding: 1.35rem 1.4rem;
  border: 1px solid var(--tm-sand);
  border-radius: var(--tm-radius);
  background: var(--tm-paper);
}

@media (min-width: 760px) {
  .tm-fee { grid-template-columns: 1.4fr 0.7fr 0.9fr auto; padding: 1.4rem 1.8rem; }
}

.tm-fee__name { font: 500 var(--tm-step-1)/1.3 var(--tm-serif); color: var(--tm-ink); }
.tm-fee__name a { color: inherit; text-decoration: none; }
.tm-fee__name a:hover { color: var(--tm-forest); text-decoration: underline; }
.tm-fee__desc { display: block; margin-top: 0.2rem; font: 400 0.92rem/1.5 var(--tm-sans); color: var(--tm-ink-3); }
.tm-fee__duration { color: var(--tm-ink-2); font-weight: 700; }
.tm-fee__amount { font: 600 var(--tm-step-1)/1.2 var(--tm-serif); color: var(--tm-forest); font-variant-numeric: lining-nums tabular-nums; }
.tm-fee__amount--pending { font: 700 0.95rem/1.4 var(--tm-sans); color: var(--tm-ink-2); }

/* ---------- Resource cards ---------- */

.tm-resource { padding: 0; overflow: hidden; gap: 0; }
.tm-resource__img { aspect-ratio: 16 / 10; background: var(--tm-sand); overflow: hidden; }
.tm-resource__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--tm-ease); }
.tm-resource:hover .tm-resource__img img { transform: scale(1.03); }
.tm-resource__body { display: grid; gap: 0.6rem; padding: 1.3rem 1.4rem 1.5rem; }
.tm-resource__title { font-size: var(--tm-step-1); line-height: 1.3; }
.tm-resource__meta { color: var(--tm-ink-3); font-size: 0.87rem; font-weight: 700; }

/* ---------- Check-in (quiz) ---------- */

.tm-checkin { gap: var(--tm-space-5); }
.tm-checkin__progress { height: 4px; border-radius: 4px; background: var(--tm-sand); overflow: hidden; }
.tm-checkin__bar { height: 100%; width: 100%; background: var(--tm-forest); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--tm-ease); }
.tm-checkin__step { color: var(--tm-ink-3); font-size: 0.86rem; font-weight: 700; }
.tm-checkin__q { font: 500 var(--tm-step-2)/1.25 var(--tm-serif); color: var(--tm-ink); }
.tm-checkin__sub { color: var(--tm-ink-3); font-size: 0.94rem; }
.tm-checkin__opts { display: grid; gap: 0.55rem; }
.tm-checkin__opts--scale { grid-template-columns: repeat(5, 1fr); }

.tm-opt {
  min-height: 48px;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--tm-line-strong);
  border-radius: 12px;
  background: var(--tm-paper);
  color: var(--tm-ink);
  font: 600 0.98rem/1.35 var(--tm-sans);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s var(--tm-ease), background-color 0.2s var(--tm-ease);
}

.tm-checkin__opts--scale .tm-opt { text-align: center; font-family: var(--tm-serif); font-size: 1.15rem; }
.tm-opt:hover { border-color: var(--tm-forest); }
.tm-opt[aria-pressed="true"] { border-color: var(--tm-forest); background: var(--tm-sage-soft); color: var(--tm-forest-deep); }
.tm-opt:focus-visible { outline: none; box-shadow: var(--tm-focus); }

.tm-checkin__scale-labels { display: flex; justify-content: space-between; color: var(--tm-ink-3); font-size: 0.82rem; font-weight: 700; }
.tm-checkin__echo { color: var(--tm-sage-ink); font: italic 400 1.02rem/1.5 var(--tm-serif); min-height: 1.5em; }
.tm-checkin__nav { display: flex; justify-content: space-between; gap: 0.75rem; }

/* ---------- Profile page ---------- */

.tm-profile-hero { padding-block: clamp(2rem, 1.5rem + 3vw, 4rem) clamp(3rem, 2rem + 4vw, 5rem); }
.tm-profile-hero__grid { display: grid; gap: clamp(2rem, 1.5rem + 3vw, 4rem); }

@media (min-width: 900px) {
  .tm-profile-hero__grid { grid-template-columns: 0.8fr 1.2fr; align-items: start; }
}

.tm-profile-hero__photo { max-width: min(300px, 78vw); width: 100%; }
@media (min-width: 900px) { .tm-profile-hero__photo { max-width: 420px; } }
.tm-profile-hero__copy { display: grid; gap: var(--tm-space-5); align-content: start; }

.tm-panel {
  padding: clamp(1.3rem, 1rem + 1vw, 1.9rem);
  border: 1px solid var(--tm-sand);
  border-radius: var(--tm-radius-lg);
  background: var(--tm-paper);
}

.tm-panel h2 { font-size: var(--tm-step-2); margin-bottom: var(--tm-space-4); }

.tm-checklist { display: grid; gap: 0.7rem; margin: 0; padding: 0; list-style: none; }
.tm-checklist li { position: relative; padding-left: 1.9rem; color: var(--tm-ink-2); }
.tm-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--tm-sage-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%234b6245' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
}

.tm-keyfacts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--tm-sand);
  border-radius: var(--tm-radius);
  background: var(--tm-sand);
}

@media (min-width: 900px) { .tm-keyfacts { grid-template-columns: repeat(4, 1fr); } }

.tm-keyfacts div { padding: 1rem 1.15rem; background: var(--tm-paper); }
.tm-keyfacts dt { color: var(--tm-ink-3); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.tm-keyfacts dd { margin: 0.3rem 0 0; color: var(--tm-ink); font: 500 1.12rem/1.3 var(--tm-serif); }

.tm-two-col { display: grid; gap: clamp(2rem, 1.5rem + 3vw, 4rem); }
@media (min-width: 960px) { .tm-two-col { grid-template-columns: 1.35fr 0.85fr; align-items: start; } }
@media (min-width: 960px) { .tm-sticky { position: sticky; top: calc(var(--tm-header-h) + 1.5rem); } }

/* ---------- Approach row ---------- */

.tm-approach { display: grid; gap: var(--tm-space-5); }
.tm-approach > h3 { font-size: var(--tm-step-2); }
.tm-approach ul { list-style: none; }
.tm-approach li { display: grid; gap: 0.5rem; align-content: start; padding-top: var(--tm-space-4); border-top: 1.5px solid var(--tm-sage); }
.tm-approach h4 { font-size: var(--tm-step-1); }
.tm-approach p { color: var(--tm-ink-2); font-size: 0.97rem; }

/* ---------- Lists: contact, links, sessions ---------- */

.tm-contact-list { display: grid; gap: 0.15rem; margin-top: var(--tm-space-4); list-style: none; }
.tm-contact-list li { display: flex; align-items: center; gap: 0.7rem; }
.tm-contact-list svg { width: 19px; height: 19px; flex: none; color: var(--tm-sage-ink); }
.tm-contact-list a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; overflow-wrap: anywhere; }

.tm-support h2,
.tm-support h3 { font-size: var(--tm-step-2); margin-bottom: 0.4rem; }

.tm-link-list { display: grid; list-style: none; border-top: 1px solid var(--tm-sand-2); }
.tm-link-list li { border-bottom: 1px solid var(--tm-sand-2); }

.tm-link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
  padding: 0.75rem 0;
  color: var(--tm-ink);
  font: 500 var(--tm-step-1)/1.3 var(--tm-serif);
  text-decoration: none;
}

.tm-link-list a svg { width: 20px; height: 20px; flex: none; color: var(--tm-clay-ink); transition: transform 0.2s var(--tm-ease); }
.tm-link-list a:hover { color: var(--tm-forest); }
.tm-link-list a:hover svg { transform: translateX(4px); }

.tm-link-list--compact a { min-height: 48px; font: 700 0.98rem/1.35 var(--tm-sans); }

.tm-session-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem 1rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--tm-sand);
  font-size: 0.97rem;
}

.tm-session-row:last-child { border-bottom: 0; padding-bottom: 0; }
.tm-session-row a { font-weight: 700; }
.tm-session-row span { color: var(--tm-ink-3); font-weight: 600; }
.tm-session-row strong { color: var(--tm-forest); font-variant-numeric: tabular-nums; }

.tm-profile-hero .tm-fees { gap: 0; }

@media (min-width: 760px) {
  .tm-steps--stacked { grid-template-columns: 1fr; }
}

@media (min-width: 1100px) {
  .tm-steps--stacked { grid-template-columns: 1fr; gap: var(--tm-space-5); }
}

.tm-steps--stacked .tm-step { padding: 0 0 0 3.6rem; min-height: 2.6rem; }
.tm-steps--stacked .tm-step::after { top: 2.9rem; left: 1.3rem; right: auto; bottom: -1.2rem; border-top: 0; border-left: 1px dashed var(--tm-sage); }

/* ---------- Spacing utilities ---------- */

.tm-mt-4 { margin-top: var(--tm-space-4); }
.tm-mt-5 { margin-top: var(--tm-space-5); }
.tm-mt-6 { margin-top: var(--tm-space-6); }
.tm-mt-7 { margin-top: var(--tm-space-7); }
.tm-measure { max-width: 780px; }

/* ---------- Closing CTA band ---------- */

.tm-cta-band { position: relative; overflow: hidden; }
.tm-cta-band__inner { display: grid; gap: var(--tm-space-5); justify-items: start; max-width: 760px; }
.tm-cta-band__loop { position: absolute; right: -60px; bottom: -40px; width: 420px; color: rgba(251, 247, 240, 0.16); pointer-events: none; }

/* ---------- Reduced motion ---------- */

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

/* Phase 8: service-page booking steps and limitations */
.tm-numbered { display: grid; gap: 0.8rem; margin: 0; padding-left: 1.4rem; color: var(--tm-ink-2); }
.tm-numbered li { padding-left: 0.3rem; }
.tm-numbered li::marker { color: var(--tm-forest); font-weight: 700; }
.tm-checklist--plain li::before { width: 0.45rem; height: 0.45rem; top: 0.62em; left: 0.3rem; border-radius: 50%; background: var(--tm-clay); }
