:root {
  --paper: #f4f1eb;
  --paper-2: #ebe6de;
  --white: #fffcf8;
  --ink: #243034;
  --muted: #5c6b66;
  --line: #e3ddd3;
  --line-2: #d5cfc4;
  --green: #1e4f3c;
  --green-2: #2f6b52;
  --green-3: #173d2e;
  --sage: #dce8e1;
  --sage-2: #c9d9d0;
  --mint: #8fbfa8;
  --body: #2c3834;
  --body-hot: #3d6b54;
  --stage: #f4f1eb;
  --danger: #8d3a32;
  --shadow: 0 18px 50px rgba(36, 48, 52, 0.08);
  --shadow-sm: 0 6px 18px rgba(36, 48, 52, 0.07);
  --shadow-up: 0 14px 34px rgba(30, 79, 60, 0.14);
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --ease: 180ms cubic-bezier(0.2, 0.7, 0.2, 1);
  --serif: Vazirmatn, Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--green-2); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--sage); color: var(--green-3); }
.vh, .skip {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.skip:focus {
  position: fixed;
  top: 0.6rem;
  inset-inline-start: 0.6rem;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  background: var(--white);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  z-index: 20;
}

.wrap { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
/* The view is filled by script. Reserving a screen of height keeps the footer
   from painting at the top and then jumping down (layout shift). */
#view { min-height: 100vh; min-height: 100svh; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 252, 248, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 74px;
  position: relative;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 46px; height: 44px; object-fit: contain; }
.brand strong { display: block; font-size: 1.22rem; letter-spacing: 0.05em; line-height: 1.1; font-weight: 800; color: var(--green-3); }
.brand small { display: block; color: var(--muted); font-size: 0.76rem; line-height: 1.4; margin-top: 0.1rem; }
.site-nav { display: flex; align-items: center; gap: 0.15rem; margin-inline-start: auto; }
.site-nav a {
  color: var(--ink);
  font-size: 0.95rem;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  transition: background var(--ease), color var(--ease);
}
.site-nav a:hover { background: var(--paper-2); text-decoration: none; }
.site-nav a[aria-current="page"] { background: var(--sage); color: var(--green-3); font-weight: 650; text-decoration: none; }
.nav-toggle {
  display: none;
  margin-inline-start: auto;
  background: var(--white);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0.38rem 0.95rem;
  cursor: pointer;
}
.nav-toggle[aria-expanded="true"] { background: var(--sage); border-color: var(--sage-2); color: var(--green-3); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
  font-weight: 600;
  transition: background var(--ease), border-color var(--ease), box-shadow var(--ease), transform var(--ease), color var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--green); color: white; box-shadow: 0 8px 20px rgba(30, 79, 60, 0.18); }
.btn-primary:hover { background: var(--green-3); box-shadow: var(--shadow-up); }
.btn-ghost { background: var(--white); border-color: var(--line-2); color: var(--green-3); }
.btn-ghost:hover { border-color: var(--green-2); background: #fff; }
.btn[disabled], .btn.is-disabled { opacity: 0.55; pointer-events: none; transform: none; }
.header-book { flex: 0 0 auto; padding: 0.55rem 1.05rem; }

/* Type */
.page { padding: 1.6rem 0 4.5rem; }
h1, h2, h3 { line-height: 1.3; font-weight: 800; margin: 0 0 0.6rem; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4.2vw, 3.2rem); margin-bottom: 0.8rem; }
h2 { font-size: clamp(1.45rem, 2.8vw, 2.05rem); }
h3 { font-size: 1.12rem; font-weight: 700; }
h3.sub { margin-top: 1.4rem; }
.lede { font-size: 1.1rem; color: #3c4a46; max-width: 40rem; margin-top: 0; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--green-2);
  font-weight: 650;
  font-size: 0.92rem;
  margin: 0 0 0.5rem;
}
.eyebrow::before { content: ""; width: 1.4rem; height: 2px; border-radius: 2px; background: var(--mint); }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.3rem; }
.dotrow { display: flex; gap: 0.45rem; margin: 1.4rem 0; }
.dotrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); display: block; }

/* Home */
.hero {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 1.2rem;
}
.hero-figure { order: -1; }
.hero-copy .eyebrow { margin-bottom: 0.8rem; }
.section { padding: 3.4rem 0; }
.section > .eyebrow + h2 { margin-bottom: 1.2rem; }
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.feature { padding: 1.5rem 1rem 1.3rem; text-align: center; }
.feature + .feature { border-inline-start: 1px solid var(--line); }
.feature .ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--green);
}
.feature strong { display: block; margin-top: 0.7rem; font-weight: 700; }
.feature p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.93rem; }
.ico svg { width: 28px; height: 28px; }

.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 2.5rem; align-items: center; }
.logo-card {
  background: white;
  border-radius: var(--r-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.logo-card img { width: min(100%, 420px); height: auto; margin-inline: auto; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; }
.card, .post-card, .visit, .panel, .stage {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.card, .post-card {
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.card { padding: 1.3rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; min-height: 100%; }
.card:hover, .post-card:hover { text-decoration: none; border-color: var(--sage-2); transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3, .post-card h3 { margin-bottom: 0.2rem; }
.card p, .post-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card .more, .post-card .more { margin-top: auto; padding-top: 0.6rem; color: var(--green-2); font-weight: 650; font-size: 0.93rem; }
.card .more::after, .post-card .more::after { content: " ←"; }

.why {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, rgba(143, 191, 168, 0.22), transparent 42%),
    radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.06), transparent 36%),
    #1c3d32;
  color: #f6f3ee;
  border-radius: var(--r-xl);
  padding: 2.6rem 1.6rem 2.4rem;
}
.why h2 { text-align: center; color: #fff; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.4rem; }
.why article { text-align: center; padding: 1rem 0.8rem; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); }
.why h3 { color: #fff; margin-bottom: 0.3rem; }
.why p { margin: 0.25rem 0 0; color: #d5e4db; font-size: 0.95rem; }

.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.post-card { padding: 0 0 1.15rem; display: flex; flex-direction: column; gap: 0.4rem; min-height: 100%; overflow: hidden; }
.post-card .post-img { width: 100%; aspect-ratio: 5 / 2; object-fit: cover; object-position: center 40%; margin-bottom: 0.75rem; }
.post-card .post-meta, .post-card h3, .post-card p, .post-card .more { margin-inline: 1.2rem; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.7rem; margin: 0 0 0.35rem; color: var(--muted); font-size: 0.82rem; }
.post-card .post-meta { margin-bottom: 0.1rem; }
.tag {
  display: inline-flex;
  align-items: center;
  background: var(--sage);
  color: var(--green-3);
  border-radius: 999px;
  padding: 0.08rem 0.65rem;
  font-weight: 650;
  font-size: 0.8rem;
  line-height: 1.7;
}

/* Blog */
.blog-filter { margin: 0.2rem 0 1.3rem; }
.blog-filter .chip { flex: 0 0 auto; flex-direction: row; gap: 0.4rem; min-width: 0; padding: 0.4rem 0.95rem; border-radius: 999px; font-size: 0.9rem; }
.blog-filter .chip small { font-size: 0.78rem; color: var(--muted); background: var(--paper-2); border-radius: 999px; padding: 0 0.45rem; line-height: 1.6; }
.blog-filter .chip.is-on small { background: #fff; color: var(--green-3); }
.note-box {
  margin-top: 2rem;
  padding: 1.3rem 1.3rem 1.4rem;
  border-radius: var(--r-lg);
  background: var(--white);
  border: 1px dashed var(--line-2);
}
.note-box strong { font-size: 1.08rem; }
.note-box p { margin: 0.25rem 0 0; color: var(--muted); }
.note-box .row-actions { margin-top: 1rem; }
.article-head { max-width: 42rem; margin-bottom: 1rem; }
.article-head h1 { margin-bottom: 0.4rem; }
.article-figure { margin: 0.9rem 0 0; }
.article-figure img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-lg); }
.article h2 { font-size: 1.35rem; margin-top: 2rem; }
.article .fine { max-width: 42rem; margin-top: -0.25rem; }
.caution {
  border-inline-start: 3px solid var(--mint);
  padding: 0.55rem 0.95rem;
  background: var(--white);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
[dir="rtl"] .caution { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-top: 1.8rem; }
.post-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--white);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.post-nav a.is-next { text-align: start; }
.post-nav a:hover { text-decoration: none; border-color: var(--green-2); box-shadow: var(--shadow-sm); }
.post-nav small { color: var(--muted); font-size: 0.8rem; }
.post-nav strong { font-weight: 700; line-height: 1.5; }
.service-reads { margin: 0.9rem 0 0; font-size: 0.95rem; color: var(--muted); }

/* Staff calendar */
button.chip { font: inherit; cursor: pointer; }
form[data-form="hours"] .pick-row { flex-wrap: wrap; }
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.8rem; }
.cal-bar strong { font-size: 1.15rem; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.35rem; }
.cal-head { text-align: center; color: var(--muted); font-size: 0.8rem; }
.cal-day {
  min-height: 4rem;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--r-sm);
  padding: 0.3rem 0.15rem;
  text-align: center;
  cursor: pointer;
  color: var(--ink);
}
.cal-day.is-out { visibility: hidden; }
.cal-day.is-shut { background: var(--paper-2); color: var(--muted); }
.cal-day.is-busy { background: var(--sage); border-color: var(--sage-2); }
.cal-day.is-on { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.cal-day.is-past { opacity: 0.55; }
.cal-day small { display: block; color: var(--green-3); font-size: 0.75rem; }
.desk-day { margin-top: 0.9rem; }
.slot-line { border-top: 1px solid var(--line); padding: 0.85rem 0; }
.slot-line header { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.45rem; }
.slot-line.is-shut header strong { color: var(--muted); }
.slot-edits { display: grid; gap: 0.45rem; }
.slot-edit { display: flex; gap: 0.45rem; align-items: center; }
.slot-edit input { width: 8rem; }
.move-form { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin: 0.4rem 0 0.8rem; }
.move-form input, .move-form select { border: 1px solid var(--line-2); background: white; border-radius: var(--r-sm); padding: 0.45rem 0.6rem; }
.service-reads a { color: var(--green-2); font-weight: 650; }

/* Explore */
.explore-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr); gap: 1.1rem; align-items: start; }
.panel, .stage { padding: 1.15rem 1.15rem 1.25rem; }
.narrow { max-width: 32rem; }
.stage {
  background: var(--white);
  position: sticky;
  top: 88px;
  padding: 0.85rem 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
}
.stage-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 0.9rem;
  margin: 0 0.2rem 0.7rem;
}
.stage-ctl { display: flex; align-items: center; gap: 0.5rem; }
.stage-ctl-label { font-size: 0.82rem; color: var(--muted); }
.face-toggle, .pick-row, .chips { display: flex; gap: 0.35rem; }
.face-toggle {
  background: var(--paper-2);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.face {
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.28rem 0.85rem;
  font-size: 0.9rem;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), box-shadow var(--ease);
}
.face:hover { text-decoration: none; color: var(--green-3); }
.face.is-on { background: var(--green); color: white; box-shadow: 0 3px 10px rgba(30, 79, 60, 0.22); }
button.face { font: inherit; font-size: 0.9rem; }
.svg-host { max-width: 430px; margin-inline: auto; }
.avatar-frame {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(36, 48, 52, 0.06);
}
.avatar-host {
  position: relative;
  height: min(70vh, 680px);
  min-height: 440px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 36%, #f7f4ef 0%, #d7e4dc 68%, #c5d6cc 100%);
  touch-action: none;
}
.avatar-host canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
.avatar-host.is-hot canvas { cursor: pointer; }
.avatar-status {
  position: absolute;
  inset-inline: 0;
  top: 0.7rem;
  margin: 0 auto;
  width: fit-content;
  max-width: calc(100% - 1.6rem);
  text-align: center;
  color: var(--green-3);
  background: rgba(255, 252, 248, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(36, 48, 52, 0.08);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.86rem;
  line-height: 1.55;
  pointer-events: none;
  box-shadow: var(--shadow-sm);
}
.avatar-status:empty { display: none; }
.figure-labels {
  position: absolute;
  inset-inline: 0;
  bottom: 0.85rem;
  display: flex;
  justify-content: space-between;
  padding: 0 0.7rem;
  pointer-events: none;
  font-size: 0.78rem;
  color: var(--muted);
}
.figure-labels span {
  background: rgba(255, 252, 248, 0.7);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
}
.stage-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.1rem;
  list-style: none;
  counter-reset: hint;
  margin: 0.8rem 0.2rem 0.2rem;
  padding: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}
.stage-hints li { display: flex; align-items: center; gap: 0.4rem; counter-increment: hint; }
.stage-hints li::before {
  content: counter(hint, persian);
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sage);
  color: var(--green-3);
  font-size: 0.74rem;
  font-weight: 700;
}
.figure-note { text-align: center; color: var(--muted); font-size: 0.9rem; margin: 0.2rem 0 0.6rem; }
.chips {
  margin: 0.75rem 0.1rem 0;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  gap: 0.45rem;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  min-width: 74px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  border-radius: var(--r-md);
  padding: 0.5rem 0.4rem 0.4rem;
  font-size: 0.84rem;
  text-decoration: none;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.chip svg { width: 26px; height: 26px; }
.chip:hover { text-decoration: none; border-color: var(--sage-2); color: var(--green-3); background: #fff; }
.chip.is-on { background: var(--sage); border-color: var(--sage-2); color: var(--green-3); font-weight: 650; }
.pick { position: relative; }
.pick input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
}
fieldset.field { border: 0; margin: 0; padding: 0; }
fieldset.field legend { font-weight: 650; padding: 0; margin-bottom: 0.3rem; }
.pick {
  border: 1px solid var(--line-2);
  background: var(--white);
  border-radius: 999px;
  padding: 0.28rem 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.pick:hover { text-decoration: none; border-color: var(--green-2); }
.pick.is-on { background: var(--green); color: white; border-color: var(--green); }
.side-pick { margin-bottom: 0.9rem; }
.pick-label { margin: 0 0 0.35rem; font-weight: 650; font-size: 0.95rem; }
.service-block + .service-block { margin-top: 0.9rem; }

.crumb { display: flex; flex-wrap: wrap; gap: 0.35rem; color: var(--muted); font-size: 0.9rem; margin-bottom: 0.6rem; }
.crumb a { color: var(--green-2); }
.steps { display: flex; gap: 0.4rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.steps li {
  padding: 0.12rem 0.75rem;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 0.86rem;
  position: relative;
}
.steps li + li::before {
  content: "";
  position: absolute;
  inset-inline-start: -0.4rem;
  top: 50%;
  width: 0.4rem;
  height: 1px;
  background: var(--line-2);
}
.steps li.is-on { background: var(--green); color: white; font-weight: 650; }
.choices { display: grid; gap: 0.55rem; margin-top: 0.8rem; }
.choice {
  position: relative;
  display: grid;
  gap: 0.1rem;
  padding: 0.85rem 1rem;
  padding-inline-end: 2.4rem;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--white);
  transition: border-color var(--ease), background var(--ease), transform var(--ease), box-shadow var(--ease);
}
.choice::after {
  content: "";
  position: absolute;
  inset-inline-end: 1.05rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-left: 2px solid var(--sage-2);
  border-bottom: 2px solid var(--sage-2);
  transform: translateY(-50%) rotate(45deg);
  transition: border-color var(--ease), transform var(--ease);
}
.choice:hover { border-color: var(--green-2); text-decoration: none; background: #fff; box-shadow: var(--shadow-sm); }
.choice:hover::after { border-color: var(--green-2); transform: translateY(-50%) translateX(-3px) rotate(45deg); }
.choice strong { font-weight: 700; }
.choice small { color: var(--muted); line-height: 1.6; }
.feels { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0.7rem 0; list-style: none; }
.feels li { background: var(--sage); color: var(--green-3); border-radius: 999px; padding: 0.1rem 0.75rem; font-size: 0.88rem; }
.callout {
  background: var(--paper);
  border-inline-start: 3px solid var(--mint);
  border-radius: var(--r-sm);
  padding: 0.85rem 1rem;
  margin: 0.9rem 0;
}
.callout strong { display: block; margin-bottom: 0.15rem; }
.callout p { margin: 0; }
.callout .btn { margin-top: 0.5rem; }
.service-link { display: flex; align-items: baseline; gap: 0.5rem; margin: 0.6rem 0 0; }
.service-link .muted { font-size: 0.88rem; }
.service-link a { color: var(--green-2); font-weight: 650; }
.disclaimer { font-size: 0.88rem; color: var(--muted); margin-top: 1.1rem; }

/* Forms */
.search { margin: 0.8rem 0 0.4rem; }
.search input, .field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  background: white;
  border-radius: var(--r-sm);
  padding: 0.68rem 0.85rem;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.search input:focus-visible, .field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none;
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px var(--sage);
}
.field input[readonly] { background: var(--paper); color: var(--muted); }
.search-results { margin-top: 0.4rem; }
.field { display: grid; gap: 0.25rem; margin-bottom: 0.8rem; }
.field label { font-weight: 650; font-size: 0.95rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 0.9rem; }
.form-grid .wide { grid-column: 1 / -1; }
.err { color: var(--danger); font-size: 0.86rem; margin: 0; }
.field.is-bad input, .field.is-bad select, .field.is-bad textarea { border-color: var(--danger); }
.alert { background: #f8e8e4; color: #6e2e28; border-radius: var(--r-sm); padding: 0.75rem 0.9rem; border: 1px solid #efd3cd; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 0.4rem; }
.check input { margin-top: 0.45rem; accent-color: var(--green); }
.check.is-bad span { color: var(--danger); }
.hp { position: absolute; inset-inline-start: -9999px; height: 0; width: 0; opacity: 0; }
.ltr { direction: ltr; text-align: left; }
.ltr-num { direction: ltr; text-align: inherit; unicode-bidi: isolate; }

.prose { max-width: 42rem; }
.prose p { margin: 0 0 0.95rem; }
.prose .lede { font-size: 1.14rem; }
.visit { padding: 1.1rem 1.15rem; margin-bottom: 0.8rem; }
.visit.is-new { border-color: var(--green-2); box-shadow: var(--shadow); }
.visit header { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 0.4rem; }
.visit header h2 { font-size: 1.2rem; margin: 0; }
.visit header strong {
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  background: var(--sage);
  color: var(--green-3);
  border-radius: 999px;
  padding: 0.12rem 0.7rem;
  direction: ltr;
}
.visit p { margin: 0.1rem 0; }
.visit .row-actions { margin-top: 0.9rem; }
.ok { background: var(--sage); color: var(--green-3); border-radius: var(--r-md); padding: 0.9rem 1rem; border: 1px solid var(--sage-2); }

/* Footer */
.site-footer { background: #24312e; color: #e7efe9; padding: 2.6rem 0 1.4rem; margin-top: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 1.5rem; align-items: start; }
.site-footer a { color: #e7efe9; }
.footer-logo { width: 140px; height: auto; background: white; border-radius: var(--r-md); padding: 0.4rem; }
.site-footer .fine { color: #b7c7be; font-size: 0.88rem; }
.fine { color: var(--muted); font-size: 0.88rem; }
.foot-head { color: #9fb8ab; font-size: 0.82rem; font-weight: 650; margin: 0 0 0.4rem; letter-spacing: 0.02em; }
.foot-links { display: grid; gap: 0.2rem; }
.foot-links a { width: fit-content; }
.foot-contact p { margin: 0 0 0.15rem; }
.foot-bottom {
  margin-top: 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.3rem 1.5rem;
}
.foot-bottom p { margin: 0; }

/* Legacy SVG figure classes (js/body.js is not loaded) */
.body-svg { width: 100%; height: auto; display: block; }
.ground { fill: #e1ebe6; }
.dot { fill: var(--mint); }
.spine-line, .blade { fill: none; stroke: var(--mint); stroke-width: 2.2; stroke-linecap: round; }
.mass .visual { fill: var(--body); }
.limb .visual { fill: none; stroke: var(--body); stroke-width: 26; stroke-linecap: round; }
.joint .visual { fill: var(--body); stroke: var(--stage); stroke-width: 4; }
.limb .hit { fill: none; stroke: transparent; stroke-width: 42; stroke-linecap: round; }
.mass .hit, .joint .hit { fill: transparent; }
.zone { cursor: pointer; }
.mass:hover .visual, .joint:hover .visual { fill: var(--body-hot); }
.limb:hover .visual { stroke: var(--body-hot); }
.mass.is-inside .visual, .joint.is-inside .visual { fill: #3c6550; }
.limb.is-inside .visual { stroke: #3c6550; }
.mass.is-current .visual, .joint.is-current .visual { fill: var(--green-2); }
.limb.is-current .visual { stroke: var(--green-2); fill: none; }

/* Hero preview */
.hero-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  height: 460px;
  padding: 0.45rem 0.6rem 0.85rem;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: radial-gradient(circle at 50% 38%, #f7f4ef 0%, #d7e4dc 70%, #c9d9d0 100%);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  text-decoration: none;
}
.hero-preview img, .hero-preview video {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: center bottom;
  transition: transform 400ms cubic-bezier(0.2, 0.7, 0.2, 1);
  background: transparent;
}
.hero-preview:hover img, .hero-preview:hover video { transform: scale(1.03); }
.hero-preview-cta {
  flex: 0 0 auto;
  background: var(--green);
  color: white;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-weight: 650;
  white-space: nowrap;
  line-height: 1.4;
  box-shadow: 0 8px 20px rgba(30, 79, 60, 0.2);
  transition: background var(--ease);
}
.hero-preview:hover { text-decoration: none; }
.hero-preview:hover .hero-preview-cta { background: var(--green-3); }

@media (min-width: 960px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr); align-items: center; gap: 2.4rem; padding-top: 2rem; }
  .hero-figure { order: 0; }
}
@media (max-width: 959px) {
  .features, .cards, .why-grid, .posts, .split, .explore-grid, .footer-grid, .form-grid { grid-template-columns: 1fr 1fr; }
  .stage { position: static; }
  .explore-grid { grid-template-columns: 1fr; }
  .stage-wrap { order: -1; }
  .feature:nth-child(2n + 1) { border-inline-start: 0; }
  .feature:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  body { font-size: 1rem; }
  .avatar-host { height: 62vh; min-height: 360px; }
  .hero-preview { height: 420px; }
  .nav-toggle { display: inline-flex; }
  .header-book { display: none; }
  .site-nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.7rem 1rem 1rem;
    gap: 0.2rem;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.6rem 0.8rem; border-radius: var(--r-sm); }
  .features, .cards, .why-grid, .posts, .split, .footer-grid, .form-grid { grid-template-columns: 1fr; }
  .feature + .feature { border-inline-start: 0; border-top: 1px solid var(--line); }
  .feature:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .section { padding: 2.6rem 0; }
  .why { padding: 2rem 1.1rem; }
  .stage-ctl-label { display: none; }
  .stage-bar { justify-content: center; }
  .avatar-status { font-size: 0.8rem; }
  .stage-hints { gap: 0.25rem 0.8rem; }
  .visit header { align-items: flex-start; }
  .foot-bottom { flex-direction: column; }
  .post-nav { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .hero-preview:hover img, .hero-preview:hover video { transform: none; }
}
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: white; }
  .visit { break-inside: avoid; }
}
