@font-face {
  font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 500; font-display: swap;
  src: url('/assets/cormorant-garamond-latin-500-italic.woff2') format('woff2');
}
:root {
  --ink: #233f34; --muted: #50645a; --sage: #eaf0e7; --edge: #cbd4c9; --paper: #fffefa;
  --serif: Georgia, 'Times New Roman', serif; --sans: 'DM Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f4f6f0; color: var(--ink); font: 1rem/1.55 var(--sans); }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--ink); text-underline-offset: .22em; }
[hidden] { display: none !important; }
.visually-hidden, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; inset: .4rem auto auto .5rem; z-index: 2; padding: .55rem; background: white; }
:focus-visible { outline: 3px solid #476851; outline-offset: 2px; }
.coach-site-header { border-bottom: 1px solid var(--edge); padding: 1rem max(1.25rem, calc((100% - 68rem)/2)); }
.coach-site-header a { color: var(--ink); font: 1.35rem var(--serif); text-decoration: none; }
.assistant-page { width: min(100% - 2.5rem, 43rem); margin: clamp(2rem, 8vh, 5.75rem) auto 3rem; }
.chat-panel { border: 1px solid var(--edge); border-radius: 1.25rem; padding: clamp(1.35rem,4.3vw,3rem); background: linear-gradient(146deg,#f3f5eb 0%,#fffefa 36%); box-shadow: 0 14px 46px #2d433313; }
.chat-bar { display: flex; justify-content: space-between; align-items: start; gap: .7rem; }
.guide-identity h1 { margin: 0; font: normal clamp(2.8rem,6.5vw,4.75rem)/1.02 var(--serif); letter-spacing: -.055em; }
.guide-identity h1 em { font-family: 'Cormorant Garamond',var(--serif); font-weight: 500; }
.guide-identity sup { font: 500 .2em var(--sans); letter-spacing: 0; vertical-align: top; position: relative; top: .65em; margin-left: .28em; }
.guide-byline { color: var(--muted); margin: .42rem 0 0; font-size: .95rem; }
.chat-log { display: flex; flex-direction: column; align-items: flex-start; gap: .9rem; margin: clamp(1.75rem,5vh,3.35rem) 0 1.25rem; min-width: 0; max-height: min(49vh, 28rem); padding: .2rem .25rem .3rem 0; overflow-y: auto; overscroll-behavior-y: contain; }
.chat-log:focus-visible { outline-offset: 0; }
.chat-message { max-width: min(95%, 36rem); overflow-wrap: anywhere; }
.chat-message p { margin: .2rem 0 0; white-space: pre-line; }
.welcome-message { max-width: 100%; }
.welcome-message .hello { margin: 0; font: 400 clamp(1.47rem,3.3vw,2rem)/1.24 var(--serif); letter-spacing: -.025em; }
.chat-log:has(.chat-message:nth-child(2)) { border-top: 1px solid var(--edge); padding-top: 1rem; margin-top: 1.25rem; }
.chat-log:has(.chat-message:nth-child(2)) .welcome-message { display: none; }
.chat-message.visitor { align-self: flex-end; padding: .55rem .9rem; border-radius: .85rem .85rem .15rem .85rem; background: var(--sage); }
.speaker { display: block; font-size: .875rem; font-weight: 650; color: #415847; }
.chat-sources, .followup-list, .sample-list { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .8rem; margin-top: .5rem; }
.chat-sources a { font-size: .9375rem; }
.question-row { display: flex; align-items: center; gap: .35rem; border: 1px solid #819386; padding: .32rem; border-radius: .9rem; background: white; }
.question-row:focus-within { border-color: #466a53; box-shadow: 0 0 0 2px #466a5335; }
.question-row input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; padding: .55rem .65rem; font-size: 1rem; color: var(--ink); }
.question-row input:focus { outline: none; }
.question-row input::placeholder { color: #617066; }
.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: .55rem 1.25rem; border: 1px solid #365643; border-radius: .62rem; background: #31513e; color: white; font-weight: 600; }
.btn:hover:enabled { background: #213e2d; }
.btn:disabled { border-color: #d5dfd0; color: #49634f; background: #e0e8dc; }
#privacy-note, .script-note, .chat-detail p { color: var(--muted); font-size: .875rem; margin: .7rem 0 0; }
.chat-status:empty, .model-status:empty, #step-status:empty, #step-week:empty { display: none; }
.chat-status, .model-status { margin: .55rem 0 0; color: var(--muted); }
.coach-footer { position: relative; margin-top: .3rem; }
.coach-tools > summary, .human-support { min-height: 44px; align-items: center; display: inline-flex; color: var(--muted); font-size: .9rem; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ''; display: inline-block; width: .43em; height: .43em; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-.12em) rotate(45deg); margin-left: .7rem; }
details[open] > summary::after { transform: translateY(.12em) rotate(225deg); }
.human-support { position: absolute; right: 0; top: 0; }
.tools-body { margin-top: .3rem; border-top: 1px solid var(--edge); }
.chat-detail { border-bottom: 1px solid var(--edge); padding: .15rem 0; }
.chat-detail summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-weight: 550; }
.chat-detail[open] { padding-bottom: .9rem; }
.quiet-button, .library-link { display: inline-flex; align-items: center; min-height: 44px; padding: .45rem .15rem; border: none; background: transparent; color: var(--muted); font-size: .9rem; text-decoration: underline; text-underline-offset: .22em; }
#clear-chat:disabled { display: none; }
.goal-label { display: block; margin: .65rem 0 .25rem; }
.chat-detail select { display: block; width: 100%; min-height: 44px; border: 1px solid #809083; color: var(--ink); background: white; padding: .55rem; border-radius: .48rem; }
.remember-label { display: flex; gap: .55rem; align-items: baseline; padding: .65rem 0; font-size: .94rem; }
.remember-label input { accent-color: #385e44; }
.sample-list button, .followup-list button, .goal-button { min-height: 44px; padding: .45rem .85rem; border: 1px solid #aab9aa; border-radius: .65rem; background: var(--paper); color: var(--ink); }
.sample-list button:hover:enabled, .followup-list button:hover:enabled, .goal-button:hover:enabled { background: var(--sage); }
.mode-card .btn { margin-top: .75rem; }
.chat-embedded body { background: var(--paper); }
.chat-embedded .coach-site-header, .chat-embedded .skip { display: none; }
.chat-embedded .assistant-page { width: 100%; margin: 0; }
.chat-embedded .chat-panel { padding: clamp(1.25rem,5.5vw,2rem); border: 0; border-radius: 0; box-shadow: none; }
.chat-embedded .chat-bar h1 { font-size: clamp(2.9rem,10vw,3.6rem); }
.chat-embedded .coach-footer { margin: 0 clamp(1.25rem,5.5vw,2rem) 1.25rem; border-top: 1px solid var(--edge); }
@media (max-width: 480px) {
  .assistant-page { width: calc(100% - 1.75rem); margin-top: 1.25rem; }
  .chat-panel { border-radius: 1rem; }
  .btn { padding-inline: 1rem; }
}
@media (max-height: 500px) {
  .chat-log { margin-top: 1.1rem; max-height: 35vh; }
}
@media (prefers-reduced-motion: no-preference) {
  .chat-message:not(.welcome-message) { animation: guide-arrive .18s ease-out; }
  @keyframes guide-arrive { from { opacity: .45; transform: translateY(3px); } }
}
