/* Modern Psychoanalysis — calm paper, sage and clay. Serif for voice, sans for reading. */
:root {
  --paper: #f5f1ea;
  --paper-2: #ebe4d8;
  --card: rgba(251, 248, 243, 0.86);
  --ink: #2b3530;
  --muted: #66716a;
  --sage: #5c7a6b;
  --sage-deep: #3c574a;
  --clay: #a5705a;
  --line: #d8cfbf;
  --focus: #a5705a;
  --ok: #3f6b52;
  --err: #a2463a;
  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 17px/1.65 var(--body);
  background:
    radial-gradient(ellipse 80% 60% at 15% 0%, #f9f6f0 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 100% 100%, #e7eee8 0%, transparent 65%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; color: var(--sage-deep); }
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--sage-deep); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

/* ---------- the six thinkers, quietly in the background ---------- */
.lineage { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.thinker { position: absolute; max-width: 22rem; color: var(--sage-deep); opacity: .13; animation: drift 38s ease-in-out infinite alternate; }
.thinker .name { font-family: var(--display); font-style: italic; font-size: clamp(2rem, 3.6vw, 3.4rem); line-height: 1; display: block; }
.thinker .years { font-size: .9rem; letter-spacing: .18em; text-transform: uppercase; display: block; margin: .45rem 0 .5rem; }
.thinker .line { font-family: var(--display); font-size: 1.35rem; line-height: 1.3; display: block; }
.thinker .src { font-size: .8rem; display: block; margin-top: .3rem; letter-spacing: .04em; }
.t1 { top: 13%; left: 3%; }
.t2 { top: 15%; right: 4%; text-align: right; animation-delay: -8s; }
.t3 { top: 46%; left: 1%; animation-delay: -15s; }
.t4 { top: 48%; right: 2%; text-align: right; animation-delay: -22s; }
.t5 { bottom: 5%; left: 6%; animation-delay: -29s; }
.t6 { bottom: 7%; right: 6%; text-align: right; animation-delay: -4s; }
@keyframes drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -18px, 0); } }
@media (max-width: 860px) { .t3, .t4 { display: none; } .thinker { opacity: .09; } }
@media (prefers-reduced-motion: reduce) { .thinker { animation: none; } html { scroll-behavior: auto; } }

/* ---------- layout ---------- */
.shell { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
header.top {
  position: sticky; top: 0; z-index: 5; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  background: rgba(245, 241, 234, .82); border-bottom: 1px solid var(--line);
}
.bar { max-width: 1200px; margin: 0 auto; padding: .7rem 1.25rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { font-family: var(--display); font-size: 1.35rem; color: var(--sage-deep); text-decoration: none; margin-right: auto; white-space: nowrap; }
.brand small { font-family: var(--body); font-size: .8rem; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; margin-left: .5rem; }
nav.tabs { display: flex; gap: .1rem; flex-wrap: nowrap; }
@media (min-width: 1081px) { nav.tabs { order: 0; } .menu { order: 1; } }
nav.tabs a, .menu > button {
  font: 500 .95rem var(--body); color: var(--ink); text-decoration: none; padding: .45rem .75rem; border-radius: 999px;
  border: 0; background: none; cursor: pointer;
}
nav.tabs a:hover, .menu > button:hover { background: var(--paper-2); }
nav.tabs a[aria-current="page"] { background: var(--sage-deep); color: #fbf8f3; }
.menu { position: relative; }
.menu-list { position: absolute; right: 0; top: calc(100% + .4rem); min-width: 13rem; background: #fbf8f3; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 30px rgba(43, 53, 48, .12); padding: .35rem; display: none; }
.menu.open .menu-list { display: block; }
.menu-list a, .menu-list button { display: block; width: 100%; text-align: left; font: .95rem var(--body); color: var(--ink); text-decoration: none; padding: .55rem .75rem; border-radius: 8px; border: 0; background: none; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { background: var(--paper-2); }
.menu-list hr { border: 0; border-top: 1px solid var(--line); margin: .3rem .2rem; }
.btn.navtoggle { display: none; }
@media (max-width: 1080px) {
  .btn.navtoggle { display: inline-flex; }
  nav.tabs { display: none; width: 100%; flex-direction: column; order: 3; }
  nav.tabs.open { display: flex; }
  nav.tabs a { border-radius: 10px; }
}

main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.page { display: none; animation: fade .5s ease; }
.page.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.4rem); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.narrow { max-width: 760px; margin: 0 auto; }
.eyebrow { font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--clay); margin-bottom: .6rem; font-weight: 600; }
.lead { font-size: 1.2rem; color: #3d4842; }
.muted { color: var(--muted); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.stack > * + * { margin-top: 1.25rem; }
ul.clean { list-style: none; padding: 0; margin: 0; }
ul.ticks { padding-left: 1.1rem; margin: 0 0 1em; }
ul.ticks li { margin-bottom: .35rem; }
ul.ticks li::marker { color: var(--clay); }

/* hero */
.hero { min-height: calc(100vh - 220px); display: grid; place-items: center; text-align: center; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.4rem); color: var(--sage-deep); margin-bottom: .3em; }
.hero .lead { max-width: 36rem; margin: 0 auto 2rem; }
.hero .rule { width: 64px; height: 1px; background: var(--clay); margin: 0 auto 1.6rem; }
.cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* buttons and forms */
.btn { display: inline-flex; align-items: center; gap: .4rem; font: 600 1rem var(--body); padding: .75rem 1.3rem; border-radius: 999px; border: 1px solid var(--sage-deep);
  background: var(--sage-deep); color: #fbf8f3; cursor: pointer; text-decoration: none; transition: background .2s, transform .2s; }
.btn:hover { background: #2f473b; }
.btn.ghost { background: transparent; color: var(--sage-deep); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.small { padding: .4rem .85rem; font-size: .9rem; }
.btn.danger { background: transparent; border-color: var(--err); color: var(--err); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; }
.field { margin-bottom: 1.05rem; }
.hint { font-weight: 400; font-size: .88rem; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=password], textarea, select {
  width: 100%; font: 1rem var(--body); color: var(--ink); padding: .7rem .85rem; border: 1px solid #cbc1b0; border-radius: 10px; background: #fffdf9;
}
textarea { min-height: 8.5rem; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .row { grid-template-columns: 1fr; } }
.counter { text-align: right; font-size: .85rem; color: var(--muted); margin-top: .25rem; }
.counter.over { color: var(--err); }
.msg { min-height: 1.4em; font-size: .95rem; margin: .5rem 0 0; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .35rem; width: 1.05rem; height: 1.05rem; accent-color: var(--sage-deep); }

/* choice cards */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.choice { display: block; position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; background: #fffdf9; cursor: pointer; font-weight: 400; }
.choice input { position: absolute; opacity: 0; }
.choice strong { font-family: var(--display); font-size: 1.4rem; font-weight: 500; display: block; color: var(--sage-deep); }
.choice:has(input:checked) { border-color: var(--sage-deep); box-shadow: 0 0 0 2px var(--sage-deep) inset; background: #f3f7f4; }
.choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

/* steps */
.steps { display: flex; gap: .5rem; margin: 0 0 1.6rem; padding: 0; list-style: none; flex-wrap: wrap; }
.steps li { font-size: .85rem; letter-spacing: .06em; padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.steps li.on { border-color: var(--sage-deep); color: var(--sage-deep); font-weight: 600; }
.steps li.done { background: var(--paper-2); }

/* slots */
.days { display: grid; gap: 1rem; }
.day h4 { margin: 0 0 .5rem; font: 600 1rem var(--body); color: var(--ink); }
.times { display: flex; flex-wrap: wrap; gap: .5rem; }
.time { font: 500 .95rem var(--body); padding: .5rem .95rem; border-radius: 999px; border: 1px solid #c4b9a6; background: #fffdf9; color: var(--ink); cursor: pointer; }
.time:hover { border-color: var(--sage-deep); }
.time[aria-pressed="true"] { background: var(--sage-deep); border-color: var(--sage-deep); color: #fbf8f3; }
.empty { padding: 1.2rem; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; }

/* notes */
.note { border-left: 3px solid var(--clay); padding: .8rem 1rem; background: rgba(165, 112, 90, .07); border-radius: 0 10px 10px 0; font-size: .95rem; }
.note.calm { border-color: var(--sage); background: rgba(92, 122, 107, .08); }

/* about */
.facts { display: grid; gap: .65rem; }
.facts li { display: flex; gap: .75rem; align-items: baseline; }
.facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--clay); flex: none; transform: translateY(-2px); }
.monogram { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-deep); color: #fbf8f3; font: 500 2.6rem var(--display); margin-bottom: 1.2rem; }

/* lineage list on the explainer page */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.person { border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; background: #fffdf9; }
.person h4 { margin: 0; font: 500 1.35rem var(--display); color: var(--sage-deep); }
.person .years { font-size: .82rem; color: var(--muted); letter-spacing: .08em; }
.person p { margin: .45rem 0 0; font-size: .95rem; }

/* contact */
.map { width: 100%; height: 360px; border: 0; border-radius: 12px; display: block; filter: saturate(.75) sepia(.08); }
.contact-list dt { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--clay); font-weight: 600; margin-top: 1rem; }
.contact-list dd { margin: .2rem 0 0; font-size: 1.1rem; }

/* practice tools */
.req { border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.15rem; background: #fffdf9; }
.req + .req { margin-top: .9rem; }
.req header { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline; justify-content: space-between; }
.req h4 { margin: 0; font: 500 1.35rem var(--display); color: var(--sage-deep); }
.badge { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; padding: .15rem .55rem; border-radius: 999px; border: 1px solid currentColor; }
.badge.new { color: var(--clay); } .badge.confirmed { color: var(--ok); } .badge.declined { color: var(--muted); }
.req .reason { white-space: pre-wrap; background: var(--paper); border-radius: 8px; padding: .6rem .8rem; margin: .6rem 0; font-size: .97rem; }
.req .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.week { width: 100%; border-collapse: collapse; font-size: .92rem; }
.week th, .week td { text-align: center; padding: .3rem; border-bottom: 1px solid var(--line); }
.week th { font-weight: 600; color: var(--muted); }
.week td:first-child, .week th:first-child { text-align: left; color: var(--muted); white-space: nowrap; }
.week input { width: 1.1rem; height: 1.1rem; accent-color: var(--sage-deep); }
.scroll-x { overflow-x: auto; }

footer.foot { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 1.2rem; text-align: center; font-size: .88rem; color: var(--muted); }

/* sign-in pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; position: relative; z-index: 1; }
.auth .panel { width: min(440px, 100%); }
.auth h1 { font-size: 2.4rem; text-align: center; }
.auth .sub { text-align: center; color: var(--muted); margin-bottom: 1.6rem; }
.pwwrap { position: relative; }
.pwwrap button { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); font: .85rem var(--body); cursor: pointer; padding: .3rem .5rem; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* phones: fewer names in the background, compact header */
@media (max-width: 1080px) { .menu { order: 1; } .btn.navtoggle { order: 2; } }
@media (max-width: 640px) {
  .t2, .t3, .t4, .t5 { display: none; }
  .t1 { top: 12%; } .t6 { bottom: 4%; }
  .brand small { display: none; }
  .bar { gap: .5rem; }
  .menu > button { padding: .45rem .5rem; }
}
