/* Ego website — the app's "quiet / floating" design (TheCouncil/src/ui/tokens.js), on the web. */
:root {
  --ground: #EEEEF1;
  --card: #FFFFFF;
  --card-faded: rgba(255, 255, 255, 0.6);
  --ink: #0A0A0A;
  --body: #3A3A3F;
  --muted: #5F5F64; /* 5.4:1 on the ground, 6.3:1 on white */
  --track: #E4E4E7;
  --ring: #8E8E93; /* the app's empty done circle */
  --signal: #F0441E;
  --on-ink: #FFFFFF;
  --r-card: 28px;
  --r-bubble: 22px;
  --r-pill: 30px;
  --float: 0 14px 40px rgba(20, 20, 30, 0.12), 0 2px 6px rgba(20, 20, 30, 0.04);
  --low: 0 4px 20px rgba(20, 20, 30, 0.06);
  --pill: 0 12px 36px rgba(10, 10, 10, 0.28);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--on-ink); padding: 10px 16px; border-radius: 999px; z-index: 20; }
.skip:focus { left: 16px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

/* ---- floating nav: the app's black tab pill ---- */
.nav-wrap { position: sticky; top: 14px; z-index: 10; padding-inline: 16px; }
.nav {
  width: min(var(--wrap), 100%); margin: 14px auto 0; display: flex; align-items: center; gap: 6px;
  padding: 6px 6px 6px 14px; border-radius: var(--r-pill); background: rgba(10, 10, 10, 0.92);
  backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px); box-shadow: var(--pill);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--on-ink); text-decoration: none; font-weight: 600; letter-spacing: -0.02em; margin-right: auto; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a, .nav-cta {
  color: #A3A3A3; text-decoration: none; font-size: 15px; font-weight: 500; padding: 10px 16px; border-radius: 22px; white-space: nowrap;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--on-ink); background: rgba(255, 255, 255, 0.08); }
.nav-links a[aria-current="page"], .nav-support[aria-current="page"] { color: var(--on-ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.nav-cta { color: var(--ink); background: var(--on-ink); font-weight: 600; }
.nav-support { display: none; color: #C9C9CE; text-decoration: none; font-size: 15px; font-weight: 500; padding: 10px 12px; min-height: 44px; align-items: center; }
.nav-cta:hover { background: #E9E9EC; }
@media (max-width: 760px) { .nav-links { display: none; } .nav-support { display: inline-flex; } }

/* ---- type ---- */
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.045em; line-height: 1.02; text-wrap: balance; }
h1 { font-size: clamp(44px, 6.4vw, 80px); }
h2 { font-size: clamp(34px, 5vw, 60px); }
h3 { font-size: 21px; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
h2 .line { display: block; }   /* break a multi-sentence headline between sentences… */
h2 .s { display: inline-block; } /* …and never inside a short one */
.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--body); max-width: 34em; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 14px; letter-spacing: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 12px; border-radius: 999px; justify-self: start;
  background: var(--card); box-shadow: var(--low); font-size: 14px; font-weight: 500; color: var(--body); text-decoration: none;
}
a.eyebrow:hover { box-shadow: var(--float); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); flex: none; box-shadow: 0 0 0 4px rgba(240, 68, 30, 0.14); }
.dot.live { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(240, 68, 30, 0.05); } }

/* ---- buttons ---- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 56px; padding: 0 26px; border-radius: 28px;
  font-size: 17px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: transform .2s, box-shadow .2s, background .2s;
}
@media (max-width: 480px) { .hero .btn, .cta .btn { width: 100%; } }
.btn-ink { background: var(--ink); color: var(--on-ink); box-shadow: var(--pill); }
.btn-ink:hover { transform: translateY(-2px); }
.btn-ghost { background: var(--card); color: var(--ink); box-shadow: var(--low); }
.btn-ghost:hover { box-shadow: var(--float); }
.btn[aria-disabled="true"] { cursor: default; }
.btn[aria-disabled="true"]:hover { transform: none; }

/* ---- floating layers (Float / Bubble / Monogram in the app) ---- */
.card { background: var(--card); border-radius: var(--r-card); padding: 22px; box-shadow: var(--float); }
.card.faded { background: var(--card-faded); box-shadow: none; }
.bubble {
  display: inline-flex; align-items: center; gap: 10px; max-width: 340px; background: var(--card); box-shadow: var(--float);
  border-radius: var(--r-bubble) var(--r-bubble) var(--r-bubble) 6px; padding: 12px 16px 12px 14px; font-size: 15px; font-weight: 500;
}
.mono-chip { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 600; flex: none; }
.mono-chip.two { font-size: 12px; } /* two letters when alters share an initial, as in the app */
.c1 { background: #2D4FD6; color: #fff; } .c2 { background: #F2A33A; color: #0A0A0A; } .c3 { background: #1B6E5A; color: #fff; }
.c4 { background: #B4235A; color: #fff; } .c5 { background: #5B3FD1; color: #fff; }

/* Each layer drifts on its own rhythm, like the app: alive, never busy. */
.drift-0 { animation: drift6 6s ease-in-out infinite; }
.drift-1 { animation: drift4 7.5s ease-in-out -3.75s infinite; }
.drift-2 { animation: drift6 8s ease-in-out -2s infinite; }
.drift-3 { animation: drift4 6.5s ease-in-out -4.9s infinite; }
.drift-4 { animation: drift5 9s ease-in-out -0.9s infinite; }
@keyframes drift6 { 50% { transform: translateY(-6px); } }
@keyframes drift5 { 50% { transform: translateY(-5px); } }
@keyframes drift4 { 50% { transform: translateY(-4px); } }

/* ---- hero ---- */
.hero { padding: clamp(56px, 9vw, 110px) 0 40px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero-copy { display: grid; gap: 26px; }
.hero-note { font-size: 14px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note span + span::before { content: "·"; margin-right: 14px; }
.stage { position: relative; display: grid; gap: 16px; justify-items: stretch; max-width: 420px; margin-left: auto; width: 100%; }
.stage .bubble { justify-self: start; }
.stage .q { justify-self: end; max-width: 330px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .stage { margin: 8px auto 0; }
}

/* Today mock */
.today-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.today-head b { font-size: 24px; letter-spacing: -0.04em; font-weight: 600; }
.busy { display: flex; gap: 10px; align-items: baseline; padding: 4px 2px; font-size: 15px; font-weight: 500; color: var(--body); }
.now { display: flex; align-items: center; gap: 8px; margin: 10px 2px; }
.now .mono { color: var(--body); }
.now::after { content: ""; flex: 1; height: 1.5px; background: var(--signal); opacity: .6; }
.block { position: relative; border-radius: 22px; padding: 16px 18px; background: var(--card); box-shadow: var(--low); border: 1px solid #F1F1F3; display: grid; gap: 6px; }
.block > span:not(.done-circle) { padding-right: 52px; }
.done-circle { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; background: var(--card); box-shadow: 0 4px 10px rgba(20, 20, 30, 0.08); display: grid; place-items: center; }
.done-circle::after { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ring); }
.block .title { font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.steps { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: 15px; line-height: 1.4; counter-increment: s; }
.steps li::before {
  content: counter(s); width: 24px; height: 24px; border-radius: 50%; background: var(--ground); display: grid; place-items: center;
  font-size: 13px; font-weight: 600; margin-top: -1px;
}
.show { font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 8px; }

/* ---- sections ---- */
section { padding: clamp(64px, 9vw, 120px) 0 0; }
.sec-head { display: grid; gap: 18px; margin-bottom: 40px; max-width: 760px; }
.kicker { font-family: var(--mono); font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.how .card { display: grid; gap: 14px; align-content: start; padding: 28px; }
.num { font-family: var(--mono); font-size: 14px; color: var(--muted); }
@media (max-width: 860px) { .how { grid-template-columns: 1fr; } }

.quiet { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.evidence { display: grid; gap: 12px; }
.ev { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-radius: 22px; background: var(--card); box-shadow: var(--low); font-size: 15px; }
.ev b { font-weight: 600; }
.ev .out { font-family: var(--mono); font-size: 14px; padding: 6px 11px; border-radius: 999px; background: var(--ground); color: #3F3F46; white-space: nowrap; }
.ev .out.acts { background: var(--ink); color: var(--on-ink); }
@media (max-width: 860px) { .quiet { grid-template-columns: 1fr; } }

/* bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.bento .card { display: grid; gap: 12px; align-content: start; padding: 26px; }
.span-6 { grid-column: 1 / -1; } .span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; } .span-2 { grid-column: span 2; }
.bento p { color: var(--body); font-size: 16px; }
@media (max-width: 980px) { .span-4, .span-3, .span-2 { grid-column: span 3; } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; } .span-4, .span-3, .span-2 { grid-column: auto; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { font-size: 14px; font-weight: 500; padding: 7px 12px; border-radius: 999px; background: var(--ground); color: var(--body); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.alters { display: flex; gap: 18px; margin-top: auto; }
.alter-chip { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--body); }
.alters .mono-chip { width: 44px; height: 44px; font-size: 17px; box-shadow: var(--low); }
.alters .mono-chip.two { font-size: 16px; }
.earlier-row { color: var(--muted); font-weight: 400; font-size: 14px; }
.map {
  position: relative; height: 120px; border-radius: 18px; margin-top: auto; overflow: hidden;
  background:
    linear-gradient(90deg, transparent 47%, #fff 47%, #fff 53%, transparent 53%),
    linear-gradient(0deg, transparent 44%, #fff 44%, #fff 50%, transparent 50%),
    linear-gradient(135deg, #E3ECE4 0 30%, transparent 30%),
    #E9E9ED;
}
.pin { position: absolute; left: 54%; top: 36%; width: 18px; height: 18px; border-radius: 50%; background: var(--signal); border: 3px solid #fff; box-shadow: var(--low); }
.addr { font-size: 14px; font-weight: 500; color: var(--body); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 118px; margin-top: auto; }
.bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.bar i { width: 100%; border-radius: 8px 8px 4px 4px; background: var(--track); }
.bar.short i { background: var(--ink); }
.bar span { font-family: var(--mono); font-size: 14px; color: var(--body); }
.bar.short span { color: var(--ink); font-weight: 600; }
.bars-caption { font-size: 14px; color: var(--muted); }
.record { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.record li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--ground); }
.record .ok { color: var(--ink); font-weight: 600; } .record .no { color: var(--body); }

/* privacy promises */
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.promise { display: grid; gap: 10px; align-content: start; }
.tick { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; }
.tick svg { width: 17px; height: 17px; }
@media (max-width: 900px) { .promises { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .promises { grid-template-columns: 1fr; } }
.more { display: inline-block; margin-top: 26px; font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--ink); padding-bottom: 2px; }

/* FAQ: heading on the left, questions on the right */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.faq-wrap .sec-head { position: sticky; top: 110px; margin: 0; }
@media (max-width: 900px) { .faq-wrap { grid-template-columns: 1fr; gap: 0; } .faq-wrap .sec-head { position: static; margin-bottom: 32px; } }
.faq { display: grid; gap: 12px; }
.faq details { background: var(--card); border-radius: 22px; box-shadow: var(--low); padding: 0 22px; transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--float); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 30px 20px 0; font-weight: 600; letter-spacing: -0.01em; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 16px; font-size: 22px; font-weight: 400; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--body); }

/* final CTA */
.cta { margin-top: clamp(64px, 9vw, 120px); padding: clamp(40px, 6vw, 72px); border-radius: 36px; background: var(--ink); color: var(--on-ink); display: grid; gap: 22px; justify-items: start; box-shadow: var(--pill); }
.cta .lead { color: #C9C9CE; }
.cta .btn-ink { background: var(--on-ink); color: var(--ink); box-shadow: none; }
.get-note { font-size: 14px; color: var(--muted); }
.get-note a { color: var(--ink); }
.cta .get-note { color: #C9C9CE; }
.cta .get-note a { color: var(--on-ink); }

/* documents (privacy, terms, support) */
.doc { padding: clamp(48px, 7vw, 90px) 0 0; display: grid; gap: 28px; }
.doc-head { display: grid; gap: 14px; max-width: 820px; }
.doc-body { background: var(--card); border-radius: var(--r-card); box-shadow: var(--float); padding: clamp(24px, 4vw, 52px); }
.legal { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.legal .doc-body > * { max-width: 600px; } /* about 75 characters a line */
.toc { position: sticky; top: 110px; background: var(--card); border-radius: 22px; box-shadow: var(--low); padding: 20px 22px; }
.toc-head { font-family: var(--mono); font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 7px 0; text-decoration: none; color: var(--body); font-size: 15px; line-height: 1.35; }
.toc a:hover { color: var(--ink); }
/* Narrow screens: the list folds into one tappable row above the text. */
.toc-fold { display: none; position: static; padding: 0 22px; }
.toc-fold summary { cursor: pointer; list-style: none; min-height: 48px; display: flex; align-items: center; justify-content: space-between; font-weight: 600; }
.toc-fold summary::-webkit-details-marker { display: none; }
.toc-fold summary::after { content: "+"; font-size: 22px; font-weight: 400; color: var(--muted); }
.toc-fold[open] summary::after { content: "\2212"; }
.toc-fold ol { padding-bottom: 14px; }
.toc-fold .count { color: var(--muted); font-weight: 400; }
@media (max-width: 1023px) {
  .legal { grid-template-columns: minmax(0, 1fr); }
  .toc-wide { display: none; }
  .toc-fold { display: block; order: -1; }
}
.doc-body h2 { scroll-margin-top: 100px; }
.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.contact-card p { color: var(--body); }
.doc-body h2 { font-size: 24px; letter-spacing: -0.03em; margin: 34px 0 10px; line-height: 1.2; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body p, .doc-body li { color: var(--body); }
.doc-body p + p { margin-top: 12px; }
.doc-body ul { padding-left: 20px; margin: 10px 0 0; display: grid; gap: 8px; }
.doc-body b { color: var(--ink); font-weight: 600; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 18px; background: var(--ground); color: var(--body); font-size: 15px; margin-top: 14px; }
.notice .dot { margin-top: 7px; }
.help-grid .card.crisis { grid-column: 1 / -1; display: flex; gap: 16px; align-items: flex-start; }
.crisis > div { display: grid; gap: 10px; max-width: 720px; }
.crisis .dot { margin-top: 9px; }
.crisis b, .crisis a { color: var(--ink); }
.help-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.help-grid .card { display: grid; gap: 10px; align-content: start; padding: 26px; }
.help-grid p { color: var(--body); font-size: 16px; }
@media (max-width: 760px) { .help-grid { grid-template-columns: 1fr; } }

/* footer */
footer { margin-top: clamp(64px, 9vw, 120px); padding: 48px 0 40px; border-top: 1px solid #DCDCE1; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.foot h4 { margin: 0 0 12px; font-size: 14px; font-family: var(--mono); font-weight: 400; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.foot a { display: block; text-decoration: none; color: var(--body); padding: 4px 0; font-size: 15px; }
.foot a:hover { color: var(--ink); }
.foot .brand { display: flex; color: var(--ink); margin-bottom: 10px; }
.fine { margin-top: 36px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.foot a[aria-current="page"] { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr 1fr; } .foot > div:first-child { grid-column: 1 / -1; } .foot a { padding: 10px 0; } .foot .brand { padding: 0; } }

/* reveal on scroll (only when JS is on: .js is set on <html>) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 360px) {
  .nav .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .chip { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [class*="drift-"], .dot.live { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
