/* package fonts (woff2, copied into dist/assets/fonts) */
@font-face { font-family: 'Caprasimo'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/caprasimo-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: 'Figtree'; font-style: italic; font-weight: 300; font-display: swap; src: url("/assets/fonts/figtree-latin-300-italic.woff2") format("woff2"); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300; font-display: swap; src: url("/assets/fonts/figtree-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: 'Figtree'; font-style: italic; font-weight: 400; font-display: swap; src: url("/assets/fonts/figtree-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: 'Figtree'; font-style: italic; font-weight: 500; font-display: swap; src: url("/assets/fonts/figtree-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: 'Figtree'; font-style: italic; font-weight: 600; font-display: swap; src: url("/assets/fonts/figtree-latin-600-italic.woff2") format("woff2"); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: 'Figtree'; font-style: italic; font-weight: 700; font-display: swap; src: url("/assets/fonts/figtree-latin-700-italic.woff2") format("woff2"); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/figtree-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: 'Figtree'; font-style: italic; font-weight: 800; font-display: swap; src: url("/assets/fonts/figtree-latin-800-italic.woff2") format("woff2"); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/figtree-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: 'Figtree'; font-style: italic; font-weight: 900; font-display: swap; src: url("/assets/fonts/figtree-latin-900-italic.woff2") format("woff2"); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 900; font-display: swap; src: url("/assets/fonts/figtree-latin-900-normal.woff2") format("woff2"); }
/* generated block: satellite design tokens (light) */
:root {
  --bg-light-base: #fff5ee;
  --fg-light-base-body: #2b2729;
  --fg-light-base-heading: #2b2729;
  --fg-light-base-muted: #5a4d50;
  --fg-light-base-link: #2b2729;
  --fg-light-base-inverse: #2b2729;
  --bg-light-card: #f9cfb4;
  --fg-light-card-body: #2b2729;
  --fg-light-card-heading: #2b2729;
  --fg-light-card-muted: #5a4d50;
  --fg-light-card-link: #2b2729;
  --fg-light-card-inverse: #2b2729;
  --bg-light-elevated: #ffffff;
  --fg-light-elevated-body: #2b2729;
  --fg-light-elevated-heading: #2b2729;
  --fg-light-elevated-muted: #5a4d50;
  --fg-light-elevated-link: #2b2729;
  --fg-light-elevated-inverse: #2b2729;
  --brand-light-accent: #2b2729;
  --brand-light-accent-hover: #6a3826;
  --brand-light-on-accent: #fff5ee;
  --focus-light-ring: #2b2729;
  --border-light-default: #2b2729;
  --border-light-subtle: #eebb9c;
}
.bg-surface-base { background: var(--bg-light-base); --fg-body: var(--fg-light-base-body); --fg-heading: var(--fg-light-base-heading); --fg-muted: var(--fg-light-base-muted); --fg-link: var(--fg-light-base-link); --fg-inverse: var(--fg-light-base-inverse); }
.bg-surface-card { background: var(--bg-light-card); --fg-body: var(--fg-light-card-body); --fg-heading: var(--fg-light-card-heading); --fg-muted: var(--fg-light-card-muted); --fg-link: var(--fg-light-card-link); --fg-inverse: var(--fg-light-card-inverse); }
.bg-surface-elevated { background: var(--bg-light-elevated); --fg-body: var(--fg-light-elevated-body); --fg-heading: var(--fg-light-elevated-heading); --fg-muted: var(--fg-light-elevated-muted); --fg-link: var(--fg-light-elevated-link); --fg-inverse: var(--fg-light-elevated-inverse); }
/* component rules: semantic carriers and renderer-owned behaviours */
.text-role-body { color: var(--fg-body); overflow-wrap: anywhere; }
.text-role-heading { color: var(--fg-heading); overflow-wrap: anywhere; }
.text-role-muted { color: var(--fg-muted); }
.text-role-link { color: var(--fg-link); }
.text-role-inverse { color: var(--fg-inverse); }
.text-role-link { text-decoration: underline; }
.text-role-link:hover { color: var(--brand-light-accent-hover); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--focus-light-ring); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
.site-logo { max-width: 100%; height: auto; }
.site-menu > summary { list-style: none; cursor: pointer; }
.site-menu > summary::-webkit-details-marker { display: none; }
:where(section[data-section][style]) { background-size: cover; background-position: center; padding: clamp(1.5rem, 4vw, 3rem); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { position: static; padding: 0.25rem 0.5rem; outline: 2px solid var(--focus-light-ring); }

/* package stylesheet (verbatim; model-owned rules win by source order) */
/* Ask About Back Pain: a friendly consult-room conversation */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Figtree', 'Trebuchet MS', Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: 'Caprasimo', Georgia, serif;
  font-weight: 400;
  line-height: 1.15;
  color: var(--fg-heading);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.8rem); margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.25rem; margin: 1.75rem 0 0.6rem; }

p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }

a { text-decoration-thickness: 2px; text-underline-offset: 0.22em; text-decoration-color: var(--border-light-subtle); }
a:hover { text-decoration-color: currentColor; }

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0 0 1.75rem; }

.skip-link {
  background: var(--bg-light-elevated);
  border-radius: 999px;
  font-weight: 600;
}
.skip-link:focus { position: absolute; left: 1rem; top: 0.75rem; z-index: 10; padding: 0.6rem 1.1rem; }

/* ---------- Bubbles ---------- */

.bubble {
  position: relative;
  border-radius: 2rem;
}

/* Peach bubbles: the reader's side of the conversation, tail at lower left. */
.bubble-peach { padding: 1.75rem 2rem; }
.bubble-peach::after {
  content: "";
  position: absolute;
  left: 2.25rem;
  bottom: -1.1rem;
  width: 1.9rem;
  height: 1.3rem;
  background: var(--bg-light-card);
  clip-path: polygon(0 0, 100% 0, 8% 100%);
}

/* Reply bubbles: white with a charcoal line, tail at lower right. */
.reply {
  position: relative;
  border: 2px solid var(--border-light-default);
  border-radius: 1.6rem;
  margin: 0;
}
.reply::after {
  content: "";
  position: absolute;
  right: 1.75rem;
  bottom: -0.85rem;
  width: 1.2rem;
  height: 0.85rem;
  background: var(--border-light-default);
  clip-path: polygon(0 0, 100% 0, 92% 100%);
}

.reply-link {
  display: block;
  min-height: 44px;
  padding: 0.9rem 1.4rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}
.reply-link:hover { text-decoration: underline; }
.reply-link:focus-visible { outline-offset: 4px; border-radius: 1.4rem; }

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

.talkhead { padding: 0 1rem; border-bottom: 2px solid var(--border-light-subtle); }

.talkhead-bar {
  max-width: 72rem;
  margin: 0 auto;
  min-height: 4.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  text-decoration: none;
  font-family: 'Caprasimo', Georgia, serif;
  font-size: 1.3rem;
  line-height: 1.1;
}
.brand .site-logo { width: 2.6rem; height: 2.6rem; }

.talkhead-nav { display: flex; align-items: center; }

.talkhead-links {
  display: flex;
  justify-content: flex-end;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.talkhead-links li { margin: 0; }
.talkhead-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  border-radius: 999px;
  font-size: 1rem;
  white-space: nowrap;
  font-weight: 600;
  text-decoration: none;
}
.talkhead-links a:hover { background: var(--bg-light-card); color: var(--fg-link); }

.site-menu { position: relative; display: none; }
.site-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: var(--brand-light-accent);
  color: var(--brand-light-on-accent);
  font-weight: 600;
  white-space: nowrap;
}
.site-menu ul {
  position: absolute;
  right: 0;
  top: calc(100% + 0.6rem);
  z-index: 5;
  min-width: 15rem;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  background: var(--bg-light-elevated);
  border: 2px solid var(--border-light-default);
  border-radius: 1.4rem;
}
.site-menu li { margin: 0; }
.site-menu li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.site-menu li a:hover { background: var(--bg-light-card); }

@media (max-width: 1180px) {
  .talkhead-links { display: none; }
  .site-menu { display: block; }
}

/* ---------- Page frame ---------- */

.room {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem 4.5rem;
}

.breadcrumbs { padding: 1.1rem 0 0.5rem; font-size: 0.95rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.3rem 0; list-style: none; margin: 0; padding: 0; }
.breadcrumbs li { margin: 0; display: inline-flex; align-items: center; }
.breadcrumbs li + li::before {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  margin: 0 0.65rem;
  border-radius: 50%;
  background: var(--fg-muted);
}

.prose { max-width: 40rem; }

.photo-hero img { width: 100%; border-radius: 2rem; aspect-ratio: 16 / 7; object-fit: cover; }
.photo-inline img,
.photo-section img { width: 100%; border-radius: 1.5rem; }
.photo-section { margin: 1.75rem 0; }
figcaption { font-size: 0.95rem; color: var(--fg-muted); padding: 0.5rem 0.75rem 0; }

/* ---------- Home ---------- */

.home {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem 3rem;
  padding-top: 2rem;
}
@media (min-width: 960px) {
  .home { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
  .home-prose { grid-column: 1 / -1; }
}

.opener-speaker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 0.9rem 0.5rem;
}
.opener-speaker h1 {
  font-family: 'Figtree', 'Trebuchet MS', Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}
.speaker-dot {
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--brand-light-accent);
}

.bubble-hero { padding: 2.5rem 2.5rem 2.25rem; border-bottom-left-radius: 0.75rem; }
.bubble-hero::after { display: none; }

.opener-line {
  font-family: 'Caprasimo', Georgia, serif;
  font-size: clamp(2.3rem, 6.4vw, 4.1rem);
  line-height: 1.04;
  margin: 0 0 1.25rem;
  max-width: 14ch;
}

.opener-sub { font-size: 1.2rem; max-width: 34rem; margin: 0; }

.bubble-follow {
  margin-top: 0.6rem;
  max-width: 30rem;
  padding: 1.1rem 1.6rem;
  border-top-left-radius: 0.75rem;
}

.replies { padding-top: 0.5rem; }
@media (min-width: 960px) { .replies { padding-top: 3.25rem; } }

.replies-title { font-size: 1.35rem; margin: 0 0 1.25rem; text-align: right; }

.reply-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.reply-stack .reply { max-width: min(100%, 24rem); }
.reply-stack .reply:nth-child(even) { margin-right: 1.75rem; }

.home-prose { padding-top: 1rem; }

/* ---------- Question detail: chat thread ---------- */

.thread {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem 3rem;
  padding-top: 1.5rem;
}
@media (min-width: 960px) {
  .thread { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .thread-ask { position: sticky; top: 1.5rem; }
  .thread-answer { padding-top: 5rem; }
}

.thread-who { font-size: 0.95rem; font-weight: 600; margin: 0 0 0.6rem 0.75rem; }
.thread-who-reply { text-align: right; margin: 0 0.75rem 0.6rem 0; }

.bubble-ask { padding: 2rem 2rem 1.9rem; }
.thread-question h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.12; }

.reply-card {
  border: 2px solid var(--border-light-default);
  border-radius: 2rem;
  border-top-right-radius: 0.75rem;
  padding: 2rem 2rem 1.5rem;
}
.answer-prose { max-width: none; }
.answer-prose > :first-child { margin-top: 0; }
.answer-prose > p:first-of-type { font-size: 1.22rem; }

/* ---------- Topic cluster: grouped bubble clusters ---------- */

.cluster { padding-top: 1.5rem; }

.bubble-title {
  display: inline-block;
  max-width: 100%;
  margin: 0 0 2.5rem;
  padding: 1.6rem 2.25rem;
}

.cluster-prose { max-width: 48rem; }
.cluster-prose h3 { font-family: 'Caprasimo', Georgia, serif; font-size: 1.35rem; }

.cluster-prose h3 + ul,
.cluster-all ul,
.town-tags ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}
.cluster-prose h3 + ul li,
.cluster-all li,
.town-tags li { margin: 0; }

.cluster-prose h3 + ul a,
.cluster-all a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  border: 2px solid var(--border-light-default);
  border-radius: 1.4rem 1.4rem 1.4rem 0.4rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}
.cluster-prose h3 + ul a:hover,
.cluster-all a:hover { text-decoration: underline; }

.cluster-all {
  margin-top: 3rem;
  padding: 1.75rem 1.75rem 0.75rem;
  border-radius: 2rem;
  max-width: 48rem;
}
.cluster-all-title { font-size: 1.35rem; margin: 0 0 1rem; }
.cluster-all:not(:has(li)) { display: none; }

/* ---------- Geo cluster: town tags ---------- */

.towns { padding-top: 1.5rem; }
.town-tags:not(:has(li)) { display: none; }
.town-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: var(--bg-light-card);
  font-weight: 600;
  text-decoration: none;
}
.towns-prose ul li::marker { color: var(--fg-muted); }

/* ---------- About: a short letter ---------- */

.letter-wrap { padding-top: 2rem; }

.letter {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.75rem 2.5rem 2.25rem;
  border-radius: 2rem;
  border: 2px solid var(--border-light-subtle);
}
.letter-greeting h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 1.5rem; }
.letter-prose h2 { font-size: 1.3rem; margin-top: 2rem; }
.letter-sign {
  margin: 2.25rem 0 0;
  font-family: 'Caprasimo', Georgia, serif;
  font-size: 1.3rem;
}

/* ---------- Contact: open speech bubble form ---------- */

.ask { padding-top: 1.5rem; }
.ask-head h1 { margin-bottom: 1.5rem; }

.ask-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem 3rem;
}
@media (min-width: 960px) {
  .ask-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
}

.bubble-open {
  padding: 2rem 2rem 2.25rem;
  border: 2px solid var(--border-light-default);
  border-bottom-left-radius: 0.6rem;
}
.bubble-open::after {
  content: "";
  position: absolute;
  left: 2.25rem;
  bottom: -1rem;
  width: 1.4rem;
  height: 1rem;
  background: var(--border-light-default);
  clip-path: polygon(0 0, 100% 0, 6% 100%);
}
.ask-form-title { font-family: 'Caprasimo', Georgia, serif; font-size: 1.5rem; margin: 0 0 1.25rem; }

.ask-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 560px) {
  .ask-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ask-field-wide { grid-column: 1 / -1; }
}

.ask-field label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.ask-field input,
.ask-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 1rem;
  font: inherit;
  color: var(--fg-body);
  background: var(--bg-light-base);
  border: 2px solid var(--border-light-default);
  border-radius: 1.1rem;
}
.ask-field textarea { resize: vertical; min-height: 9rem; }
.ask-field input:focus-visible,
.ask-field textarea:focus-visible { outline: 2px solid var(--focus-light-ring); outline-offset: 2px; }

.ask-send {
  min-height: 48px;
  padding: 0 1.75rem;
  font: inherit;
  font-weight: 700;
  color: var(--brand-light-on-accent);
  background: var(--brand-light-accent);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}
.ask-send:hover { background: var(--brand-light-accent-hover); }

/* ---------- Thank you: a reply bubble ---------- */

.received { padding-top: 2rem; max-width: 44rem; }
.bubble-received { padding: 2.25rem 2.25rem 1.5rem; }
.received-title h1 { margin-bottom: 1rem; }
.received-next {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.25rem;
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
}

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

.talkfoot { padding: 2.5rem 1rem; border-radius: 2.5rem 2.5rem 0 0; }
.talkfoot-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.talkfoot-line { margin: 0; max-width: 38rem; }
.talkfoot-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.talkfoot-links li { margin: 0; }
.talkfoot-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

@media (max-width: 560px) {
  .bubble-hero { padding: 2rem 1.5rem 1.75rem; }
  .bubble-ask, .reply-card, .letter, .bubble-open { padding-left: 1.4rem; padding-right: 1.4rem; }
  .reply-stack .reply:nth-child(even) { margin-right: 0.75rem; }
}

/* Section photo cards: the renderer pads the section, the card needs its own inset */
section[data-section][style] > .bg-surface-card { padding: 1.6rem 2rem; border-radius: 14px; }
.talkfoot-ask { display: inline-block; font-size: 1.35rem; font-weight: 700; padding: 0.5rem 0; }

/* Pinned header per 03-ia/chrome-plan.json; it unpins while the phone menu is open */
header.talkhead { position: sticky; top: 0; z-index: 40; }
header.talkhead:has(.site-menu[open]) { position: static; }
html { scroll-padding-top: 94px; }
