:root {
  --paper: #f6f0e4; --card: #fffbf3; --ink: #1c1b22; --muted: #5f5a4d; --line: #ddd3be;
  --saffron: #b45f0e; --saffron-text: #8f4808; --indigo: #201d45; --gold: #e9b44c; --green: #2e6b45; --brick: #a4432e;
  --display: "Fraunces", "Tiro Devanagari Hindi", Georgia, serif; --body: "Instrument Sans", "Noto Sans Devanagari", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); line-height: 1.5; }
a { color: inherit; }
em { font-style: italic; }
.nav { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 20px 5vw; position: sticky; top: 0; z-index: 20; background: var(--paper); }
body:has(.chat) .nav { position: static; } /* the chat thread has its own sticky header */
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 24px; font-weight: 600; }
.nav-link { text-decoration: none; font-weight: 600; }
a.nav-signin { background: var(--ink); color: var(--paper); padding: 9px 18px; border-radius: 999px; }
.hero { display: grid; gap: 28px 48px; padding: 16px 5vw 64px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.hero .hero-form { margin-top: 0; max-width: none; }
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); grid-template-areas: "copy form" "preview form"; grid-template-rows: auto 1fr; padding-top: 32px; }
  .hero-copy { grid-area: copy; }
  .hero-form { grid-area: form; position: sticky; top: 16px; }
  .hero-preview { grid-area: preview; }
}
.pill { display: inline-block; margin: 0; padding: 7px 16px; border-radius: 999px; background: #e4efdd; color: var(--green); font-size: 14px; font-weight: 600; }
h1 { margin: 20px 0 0; font-family: var(--display); font-weight: 400; font-size: clamp(38px, 5.4vw, 66px); line-height: 1.04; letter-spacing: -1.5px; }
h1 em { color: var(--saffron); }
h2 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4vw, 44px); letter-spacing: -1px; margin: 0 0 8px; }
.lede { font-size: 19px; color: #4a4740; max-width: 600px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.form { margin-top: 28px; max-width: 640px; box-shadow: 0 18px 40px -22px rgba(60, 40, 10, 0.35); }
.label { display: block; margin: 0 0 6px; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.sub, .note { font-size: 13px; color: var(--muted); }
.note { text-align: center; margin: 12px 0 0; }
textarea, input[type="text"], input[type="search"], input[type="date"], input[type="time"] {
  width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font: inherit; font-size: 16px; color: var(--ink);
}
textarea { font-family: var(--display); font-size: 24px; resize: none; }
.row { display: flex; gap: 10px; }
.field { flex: 1; margin: 8px 0; }
.field label, .field .sub { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.check { font-size: 14px; color: var(--ink); }
.segmented { display: flex; gap: 8px; }
.segmented label { padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 16px; }
.chip { min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font: inherit; font-size: 14px; cursor: pointer; }
.options { display: grid; gap: 4px; margin-top: 4px; }
.option { min-height: 44px; text-align: left; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font: inherit; cursor: pointer; }
.primary { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 56px; margin-top: 12px; border: 0; border-radius: 14px; background: var(--ink); color: var(--paper); font: inherit; font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer; }
.hero-preview .placeholder { color: var(--muted); display: flex; align-items: center; gap: 18px; }
.ghost { flex: none; width: 84px; height: 84px; color: var(--line); }
.chart { display: flex; justify-content: center; }
.chart svg { max-width: 100%; height: auto; }
.facts { margin: 12px 0; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-top: 1px solid #e4dbc8; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; font-weight: 500; }
.callout { background: #f6ecd3; border-radius: 12px; padding: 10px 12px; font-size: 14px; color: #5a4a2a; }
.error { border-color: var(--brick); }
.contrast, .free { padding: 56px 5vw; }
.contrast { background: #ede4d0; border-block: 1px solid var(--line); }
.two { display: grid; gap: 20px; margin-top: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.muted { background: var(--paper); }
.accent { border: 1.5px solid var(--saffron); }
.cross, .tick { list-style: none; padding: 0; margin: 0; }
.cross li::before { content: "\00d7"; color: var(--brick); font-weight: 700; margin-right: 10px; }
.tick li::before { content: "\2713"; color: var(--green); font-weight: 700; margin-right: 10px; }
.free { background: var(--indigo); color: var(--paper); }
.free h2 { font-size: clamp(56px, 9vw, 108px); line-height: .95; }
.free h2 em { color: var(--gold); }
.free h3 { font-family: var(--display); font-weight: 400; font-size: 26px; }
.chips-static { list-style: none; display: flex; gap: 12px; padding: 0; flex-wrap: wrap; }
.chips-static li { border: 1px solid #4a4690; border-radius: 999px; padding: 8px 18px; }
.footer { padding: 28px 5vw; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer a { margin-right: 20px; padding: 14px 0; display: inline-block; }
.simple { padding: 64px 5vw; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.inline { display: inline; }
.link { background: none; border: 0; padding: 12px 0; font: inherit; font-weight: 600; cursor: pointer; color: inherit; }
.list { list-style: none; padding: 0; margin: 0 0 24px; }
.list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.list a { text-decoration: none; display: block; }
.list .sub { display: block; }
.inline-form { display: flex; gap: 8px; margin-top: 8px; }
.inline-form input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.primary.small { width: auto; min-height: 44px; margin: 0; padding: 0 18px; font-size: 15px; }
.thread { max-width: 720px; margin: 0 auto; padding: 16px 5vw 64px; }
.thread-head { display: flex; justify-content: space-between; align-items: center; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #ede4d0; color: var(--muted); font-size: 12px; font-weight: 600; }
.badge.status { background: #f3d9b0; color: #7a4508; }
.bubble { max-width: 80%; padding: 10px 14px; border-radius: 16px; margin: 10px 0; }
.msg-body { display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-note { display: block; margin-top: 8px; color: var(--muted); }
.bubble small, .bubble .reviewed { display: block; margin-bottom: 2px; }
.sky { background: radial-gradient(1.5px 1.5px at 12% 18%, #fff8 50%, transparent 51%), radial-gradient(1px 1px at 70% 30%, #fff9 50%, transparent 51%), radial-gradient(1.5px 1.5px at 40% 75%, #ffe9a8aa 50%, transparent 51%), radial-gradient(1px 1px at 88% 82%, #fff8 50%, transparent 51%), linear-gradient(180deg, #201d45, #33306a); border-radius: 18px; padding: 14px; margin: 12px 0; }
.sky .report, .sky .honest { color: var(--ink); }
.sky .bubble.theirs { background: #fffbf3; }
.reviewed { font-size: 12px; font-weight: 600; color: var(--saffron-text); }
.wait-line { color: var(--gold); text-align: center; font-size: 14px; margin: 12px 0 2px; }
.rate { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 10px; color: var(--paper); font-size: 13px; }
.rate input[type="text"] { flex: 1; min-width: 140px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.bubble.mine { margin-left: auto; background: #f1c77a; border-bottom-right-radius: 4px; }
.bubble.theirs { background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.report { margin: 16px 0; }
.report-head { display: flex; justify-content: space-between; align-items: center; }
.dark-card { background: var(--indigo); color: var(--paper); border-radius: 14px; padding: 12px; margin: 14px 0; }
.dark-card .label { color: var(--gold); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #e4dbc8; }
.table tr.now { background: #f3d9b0; font-weight: 600; }
.honest { background: var(--indigo); color: var(--paper); margin: 16px 0; }
.honest .label { color: var(--gold); }
.honest h3 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 6px 0; }
details summary { cursor: pointer; padding: 10px 0; font-weight: 600; }

/* admin */
.admin { max-width: 860px; margin: 0 auto; padding: 8px 5vw 64px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.counter { min-width: 220px; padding: 12px 16px; }
.counter progress { display: block; width: 100%; height: 8px; margin: 6px 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip.on { background: var(--ink); color: var(--paper); }
.queue { list-style: none; padding: 0; margin: 0 0 24px; }
.q-row { border: 1px solid var(--line); border-left-width: 6px; border-radius: 12px; margin-bottom: 10px; background: var(--card); }
.q-row a { display: flex; gap: 14px; padding: 12px 14px; text-decoration: none; }
.q-row.age-fresh { border-left-color: var(--green); }
.q-row.age-aging { border-left-color: var(--gold); }
.q-row.age-late { border-left-color: var(--brick); }
.q-pos { font-family: var(--display); font-size: 26px; min-width: 30px; }
.q-main { flex: 1; display: grid; gap: 2px; }
.q-text { color: #4a4740; }
.q-flags { display: flex; gap: 6px; flex-wrap: wrap; }
.q-age { color: var(--muted); font-size: 13px; }
.reply-banner { position: sticky; top: 0; z-index: 2; margin-bottom: 12px; }
.reply-box { font-size: 16px; font-family: var(--body); }
.callout.error { background: #f6dcd4; color: #7a2a1a; }
.bubble small { color: var(--muted); }
.snippet-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.admin-form { display: grid; gap: 8px; margin-top: 8px; }
.admin-form input, .admin-form select { padding: 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }

/* language */
.langs { display: flex; gap: 4px; }
.lang { text-decoration: none; padding: 6px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lang.on { background: var(--ink); color: var(--paper); }
.lang-banner { margin: 0; padding: 8px 5vw; background: #f6ecd3; font-size: 14px; }
.primary.danger { background: var(--brick); }

input[type="email"] { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font: inherit; font-size: 16px; color: var(--ink); }
a.chip { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.stars { display: inline-flex; gap: 8px; }
.stars input { accent-color: var(--gold); }

.nav-link, .link { white-space: nowrap; }
.nav-link { padding: 12px 0; }
.nav-links { flex-wrap: wrap; gap: 0 18px; }
@media (max-width: 640px) {
  .nav { padding: 12px 16px 4px; }
  .brand { font-size: 22px; }
  .nav-links { width: 100%; justify-content: space-between; gap: 0 10px; }
  .langs { order: 5; width: 100%; margin: 2px 0 6px; }
  .nav-links-guest { justify-content: flex-end; }
  .nav-links-guest .langs { order: 0; width: auto; margin: 0; }
  .nav-link, .link { font-size: 15px; }
  a.nav-signin { padding: 8px 14px; }
  .hero, .contrast, .free, .simple { padding-left: 16px; padding-right: 16px; }
  .footer { padding-left: 16px; padding-right: 16px; }
  .thread, .admin { padding-left: 12px; padding-right: 12px; }
  .lang-banner { padding-left: 16px; padding-right: 16px; }
}
.options:empty { display: none; }

/* simple pages, lists, inputs */
.simple { max-width: 720px; margin: 0 auto; padding-top: 12px; padding-bottom: 64px; }
.simple h1 { font-size: clamp(34px, 5vw, 48px); margin-top: 8px; }
.simple h2 { font-size: clamp(24px, 3vw, 30px); margin-top: 32px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font: inherit; font-size: 16px; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--saffron); outline-offset: 1px; }
.button:focus-visible, .primary:focus-visible, .chip:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; }
.inline-form input { width: auto; }
.list li { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; }
.list li a { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.li-main { display: grid; gap: 2px; min-width: 0; }
.li-main strong { overflow: hidden; text-overflow: ellipsis; }
.badge.s-answered { background: #dcebd5; color: var(--green); }
.badge.s-closed { background: #e6e2d8; color: var(--muted); }
.empty { text-align: center; }
.empty .primary { display: inline-flex; padding: 0 22px; }
.field input, .field select { width: 100%; }
.simple .form { max-width: none; margin-top: 12px; }
.segmented { margin: 8px 0; flex-wrap: wrap; }

/* chat thread */
.thread-head h1 { font-size: clamp(28px, 4vw, 38px); margin: 4px 0; }
.chart svg { max-width: 300px; }
.fold { border-top: 1px solid #e4dbc8; margin-top: 8px; }
.fold summary { padding: 12px 0; }
.fold .dark-card { margin: 0 0 12px; }
.table-wrap { overflow-x: auto; }

/* admin chat: thread left, reply panel right */
.admin-cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) {
  .chat-admin { max-width: 1180px; }
  .admin-cols { grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); }
  .admin-side { position: sticky; top: 92px; display: grid; gap: 12px; }
  .admin-cols .thread { max-width: none; padding: 0; margin: 0; }
}
.admin-side .card { margin: 0; }
.sent-report { margin: 12px 0; }
.sent-report > summary { list-style: none; cursor: pointer; padding: 10px 14px; background: #ede4d0; border-radius: 12px; }
.sent-report[open] > summary { margin-bottom: 8px; }
.reply-banner { font-size: 15px; padding: 12px 16px; }
@media (max-width: 640px) { .reply-banner { font-size: 14px; padding: 10px 12px; } }
/* user composer */
.composer { position: sticky; bottom: 0; background: var(--paper); padding: 10px 0 12px; }
.composer .form { margin: 0; padding: 12px; }
.composer textarea { font-size: 17px; font-family: var(--body); min-height: 52px; }
.composer .primary { margin-top: 8px; min-height: 48px; }
.err { text-align: center; padding: 72px 16px; }
.err .code { font-family: var(--display); font-size: 88px; color: var(--saffron); margin: 0; line-height: 1; }

.admin-side .row { align-items: center; margin-bottom: 10px; }
.admin-side .label { margin-top: 4px; }

.segmented label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; }
.segmented label:has(input:checked) { border-color: var(--saffron); background: #f6ecd3; }
#birth-form.htmx-request .primary { opacity: .65; cursor: progress; }
#birth-form.htmx-request .primary::after { content: "\2026"; margin-left: 2px; }
body:has(#birth-form.htmx-request) #preview { opacity: .45; transition: opacity .2s; }
.q-row a:hover { background: #fbf3e0; border-radius: 10px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

.form h2 { margin-top: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.keys { margin-top: 12px; }
.q-row a:focus-visible { outline: 2px solid var(--saffron); border-radius: 10px; }

.segmented label { white-space: nowrap; flex: 0 0 auto; }
:lang(hi) em { font-style: normal; }

/* how it works and FAQ */
.how, .faq { padding: 56px 5vw 24px; }
.faq details { max-width: 760px; }
.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.steps h3 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 8px 0 4px; }
.steps p { margin: 0; color: #4a4740; }
.step-n { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; background: var(--ink); color: var(--paper); font-weight: 600; }
.faq { padding-bottom: 56px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding: 16px 0; font-size: 18px; }
.faq details p { margin: 0 0 16px; color: #4a4740; max-width: 640px; }
@media (max-width: 640px) { .how, .faq { padding-left: 16px; padding-right: 16px; } }

/* compact composer */
.composer-form { display: flex; align-items: flex-end; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 6px 6px 6px 18px; box-shadow: 0 10px 30px -18px rgba(60, 40, 10, .5); }
.composer-form textarea { flex: 1; border: 0; background: transparent; padding: 10px 0; font: inherit; font-size: 16px; line-height: 1.4; min-height: 44px; max-height: 140px; resize: none; }
.composer-form textarea:focus { outline: none; }
.composer-form:focus-within { border-color: var(--saffron); }
.send { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.composer { padding: 8px 0 10px; }

/* logo */
.brand { gap: 12px; }
.logo { flex: none; filter: drop-shadow(0 6px 10px rgba(32, 29, 69, .28)); }
.wordmark { display: inline-flex; align-items: baseline; letter-spacing: -.5px; line-height: 1; }
.wm-my { font-weight: 400; color: var(--muted); }
.wm-k { font-weight: 600; color: var(--indigo); }
@media (max-width: 640px) { .logo { width: 32px; height: 32px; } }

.advanced { margin: 6px 0 4px; }
.advanced summary { padding: 8px 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.coords-error { color: var(--brick); }

/* what people said */
.said { padding: 64px 5vw 24px; }
.said-note { margin: 4px 0 22px; color: var(--muted); max-width: 640px; }
.quotes { list-style: none; padding: 0; margin: 0; columns: 3 300px; column-gap: 16px; }
.quote { break-inside: avoid; margin: 0 0 16px; padding: 22px 24px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; position: relative; transition: transform .18s ease, box-shadow .18s ease; }
.quote::before { content: "\201C" / ""; position: absolute; top: 4px; right: 18px; font-family: var(--display); font-size: 64px; line-height: 1; color: var(--gold); opacity: .55; }
.quote:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -20px rgba(60, 40, 10, .45); }
.quote blockquote { margin: 0 0 12px; font-family: var(--display); font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; }
.quote .who { margin: 0; font-size: 13px; color: var(--muted); }
.quote .sub { margin: 2px 0; }
.quote.lead { column-span: all; background: var(--indigo); color: var(--paper); border-color: var(--indigo); padding: 32px clamp(22px, 4vw, 48px); }
.quote.lead::before { color: var(--gold); opacity: .9; font-size: 96px; top: 10px; right: 30px; }
.quote.lead blockquote { font-size: clamp(26px, 3.4vw, 38px); line-height: 1.2; max-width: 22em; }
.quote.lead .who { color: var(--gold); }
.stars-row { margin: 0 0 8px; color: var(--saffron); letter-spacing: 2px; }
.quote.lead .stars-row { color: var(--gold); }
.more { margin-top: 8px; }
.more summary { display: inline-block; padding: 12px 20px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-weight: 600; cursor: pointer; }
.more[open] summary { margin-bottom: 16px; }
.share { color: var(--paper); font-size: 12px; flex-basis: 100%; }
@media (max-width: 640px) { .said { padding-left: 16px; padding-right: 16px; } .quotes { columns: 1; } }

/* long words must never push the layout sideways */
.q-main, .li-main { min-width: 0; }
.q-text, .li-main strong, .thread-head h1, .queue strong { overflow-wrap: anywhere; }
.thread-head h1 { min-width: 0; }

/* information pages and footer */
.prose { max-width: 680px; }
.prose h2 { font-size: 24px; margin: 28px 0 6px; }
.prose p, .prose li { color: #3f3c36; }
.foot-links a { margin-right: 18px; }
.footer .sub { margin: 4px 0 0; }

.quote.lead:hover { transform: none; }

/* "writing your reply" */
.typing { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; }
.typing[hidden] { display: none; }
.typing-label { font-size: 13px; color: var(--muted); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .4; animation: dot 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .18s; }
.dots i:nth-child(3) { animation-delay: .36s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; opacity: .7; } }

.footer .sub a { margin-right: 0; padding: 0; display: inline; }

.whose { border: 0; padding: 0; margin: 4px 0 8px; min-width: 0; }
.whose legend { padding: 0; margin-bottom: 6px; }
.whose .segmented label { padding: 8px 12px; }

.method-link { margin: 18px 0 0; font-weight: 600; }
.method-link a { text-underline-offset: 3px; }
.wait-email { color: var(--paper); opacity: .8; text-align: center; font-size: 13px; margin: 0 0 4px; overflow-wrap: anywhere; }
.method dt { min-width: 120px; }

.remove { margin-top: 10px; }
.remove summary { font-size: 13px; color: var(--muted); cursor: pointer; padding: 6px 0; }
.danger-chip { border-color: var(--brick); color: var(--brick); }
.wrong { text-align: center; font-size: 12px; margin: 0 0 6px; color: var(--paper); opacity: .75; }
.wrong summary { cursor: pointer; list-style: none; padding: 6px; text-decoration: underline; text-underline-offset: 3px; }
.wrong p { margin: 2px 8px 8px; }
.wrong a { color: var(--paper); }
.reply-banner .next { margin-left: auto; text-decoration: none; }

.bubble .help { display: block; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.closed-note { text-align: center; color: var(--muted); padding: 14px 8px; }
.callout.flash { margin: 8px 5vw 0; }
@media (max-width: 640px) { .callout.flash { margin: 8px 16px 0; } }
.chart-key { text-align: center; margin: 2px 0 10px; font-size: 13px; color: var(--muted); }
.nav-user { padding: 4px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.greet { margin: -6px 0 14px; font-size: 16px; }
.msg-tools { margin-top: 8px; font-size: 14px; }
.msg-tools summary { cursor: pointer; color: var(--muted); }
.msg-tools .edit-form { margin: 8px 0; display: grid; gap: 8px; }
.msg-tools textarea { width: 100%; }
.chip.danger { color: #8b2a1a; border-color: #d9b0a6; }

/* ---- the person's chat list and thread: the WhatsApp shape everyone already knows ---- */
.avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #f0b040, #d9791c); color: #2a1b06; font-weight: 700; font-size: 19px; }
.chatlist { max-width: 720px; }
.chat-rows { list-style: none; margin: 0 0 16px; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.chat-rows li { border-bottom: 1px solid var(--line); }
.chat-rows li:last-child { border-bottom: 0; }
.chat-row { display: flex; gap: 14px; align-items: center; padding: 12px 16px; text-decoration: none; color: inherit; min-height: 72px; }
.chat-row:hover { background: #fbf4e6; }
.row-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.row-top, .row-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.row-name { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-time { flex: none; font-size: 12.5px; color: var(--muted); }
.has-unread .row-time { color: var(--saffron-text); font-weight: 700; }
.row-preview { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 15px; }
.row-preview em { font-style: normal; color: var(--saffron-text); }
.has-unread .row-preview { color: var(--ink); font-weight: 600; }
.unread { flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--saffron); color: #fff; font-size: 12.5px; font-weight: 700; display: inline-grid; place-items: center; }

.chat { max-width: 760px; margin: 0 auto; padding: 0 0 8px; display: flex; flex-direction: column; min-height: calc(100vh - 90px); }
.chat-head { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--paper); border-bottom: 1px solid var(--line); }
.chat-head .back { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink); }
.chat-head .back:hover { background: #ede4d0; }
.chat-head .avatar { width: 40px; height: 40px; font-size: 17px; }
.chat-head .who { flex: 1; min-width: 0; }
.chat-head h1 { margin: 0; font-size: 18px; line-height: 1.2; font-family: var(--body); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-line { margin: 0; font-size: 13px; color: var(--muted); }
.status-line.s-answered { color: var(--green); }
.status-line.typing-now { color: var(--green); font-weight: 600; }
.chat-menu { position: relative; }
.chat-menu summary { list-style: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
.chat-menu summary::-webkit-details-marker { display: none; }
.chat-menu summary:hover { background: #ede4d0; }
.menu-pop { position: absolute; right: 0; top: 44px; min-width: 230px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 30px -14px rgba(40, 30, 10, .5); padding: 6px; display: grid; }
.menu-pop a { padding: 12px 14px; border-radius: 10px; text-decoration: none; }
.menu-pop a:hover { background: #f4ead5; }

.msgs { flex: 1; padding: 14px 12px 20px; background: #eee5d3; background-image: radial-gradient(#e3d8c1 1px, transparent 1.4px); background-size: 22px 22px; display: flex; flex-direction: column; }
.chat .bubble { position: relative; max-width: 82%; margin: 3px 0; padding: 8px 12px 6px; border-radius: 14px; box-shadow: 0 1px 1px rgba(60, 40, 10, .12); overflow-wrap: anywhere; }
.chat .bubble.mine { align-self: flex-end; background: #f7d896; border: 0; border-top-right-radius: 4px; }
.chat .bubble.theirs { align-self: flex-start; background: #fffdf8; border: 0; border-top-left-radius: 4px; }
.chat .msg-body { display: block; white-space: pre-wrap; font-size: 16.5px; line-height: 1.42; }
.chat .meta { display: block; text-align: right; margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.chat .bubble .reviewed { display: inline-block; margin-bottom: 3px; font-size: 12px; color: var(--saffron-text); }
.chat .bubble .help { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.ticks { font-size: 12px; letter-spacing: -2px; color: #9a927e; }
.ticks.seen { color: #2f7be8; }
.day-sep, .new-sep { align-self: center; margin: 12px 0 6px; }
.day-sep span, .new-sep span, .sys-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #fbf4e3; color: #6b5f45; font-size: 12.5px; box-shadow: 0 1px 1px rgba(60, 40, 10, .1); }
.new-sep { align-self: stretch; text-align: center; }
.new-sep span { background: #2f7be8; color: #fff; }
.sys-pill { align-self: center; margin: 10px 0 2px; text-align: center; max-width: 92%; color: #5a4a2a; }
.sys-pill.quiet { background: transparent; box-shadow: none; color: var(--muted); font-size: 12px; margin-top: 0; overflow-wrap: anywhere; }
.sys-note { align-self: center; max-width: 92%; margin: 6px 0; font-size: 13px; }
.sys-note summary { cursor: pointer; text-align: center; color: var(--muted); list-style: none; padding: 6px; text-decoration: underline; text-underline-offset: 3px; }
.sys-note .honest { margin: 6px 0; }
.chat .typing { align-self: flex-start; }

.chart-msg { align-self: stretch; margin: 6px 0; background: #fffdf8; border-radius: 16px; box-shadow: 0 1px 2px rgba(60, 40, 10, .15); overflow: hidden; }
.chart-msg > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.chart-msg > summary::-webkit-details-marker { display: none; }
.cm-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #f0b040, #d9791c); color: #2a1b06; font-size: 20px; }
.cm-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.cm-text strong { font-size: 16px; }
.cm-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-open { flex: none; font-size: 13px; font-weight: 700; color: var(--saffron-text); }
.chart-msg[open] .cm-open::after { content: " \25B2"; font-size: 10px; }
.chart-msg:not([open]) .cm-open::after { content: " \25BC"; font-size: 10px; }
.chart-msg > .report, .chart-msg > .card { margin: 0; border-radius: 0; box-shadow: none; border: 0; border-top: 1px solid var(--line); }

.rate-box { align-self: flex-start; margin: 2px 0 8px 6px; max-width: 92%; }
.rate-box > summary { list-style: none; display: inline-block; cursor: pointer; padding: 5px 12px; border-radius: 999px; background: #fbf4e3; color: #6b5f45; font-size: 13px; box-shadow: 0 1px 1px rgba(60, 40, 10, .1); }
.rate-box > summary::-webkit-details-marker { display: none; }
.rate-box[open] > summary { margin-bottom: 6px; }
.rate-box .rate { background: #fffdf8; border-radius: 14px; padding: 10px 12px; color: var(--ink); box-shadow: 0 1px 2px rgba(60, 40, 10, .15); }

.chat .composer { position: sticky; bottom: 0; background: var(--paper); padding: 8px 10px 10px; border-top: 1px solid var(--line); }
.chat .callout.flash { margin: 8px 12px 0; }
@media (max-width: 640px) {
  .chat { min-height: calc(100vh - 70px); }
  .chat .bubble { max-width: 88%; }
  .chat-row { padding: 12px; }
}
.chatlist h1 { margin-bottom: 4px; }
.chatlist .greet { margin: 0 0 14px; }

/* ---- chat: review round 1 (contrast, tap size, Hindi, phones, screen readers) ---- */
.ticks { color: #6b6350; }
.ticks.seen { color: #1a5fc4; }
.new-sep span { background: #1f5fc0; }
.chat-head .back, .chat-menu summary { width: 44px; height: 44px; }
.rate-box > summary, .sys-note summary { min-height: 44px; display: inline-flex; align-items: center; }
.rate-box .stars label { min-height: 44px; display: inline-flex; align-items: center; gap: 4px; }
.chatlist .chip { min-height: 44px; display: inline-flex; align-items: center; }
.reviewed-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; margin: 0 0 3px; padding: 0; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--saffron-text); cursor: pointer; }
.chat .bubble .help { margin: 2px 0 6px; padding: 0 0 6px; border-top: 0; border-bottom: 1px solid var(--line); }
.chat .bubble .help[hidden] { display: none; }
.sys-pill.quiet { font-size: 13px; color: #5a4a2a; }
summary:focus-visible, .reviewed-btn:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; border-radius: 8px; }
:lang(hi) .chat .msg-body { line-height: 1.75; }
:lang(hi) .chat .meta, :lang(hi) .status-line, :lang(hi) .cm-sub, :lang(hi) .sys-pill, :lang(hi) .row-time { font-size: 14px; }
.chart-msg { overflow: visible; }
.chart-msg > summary { border-radius: 16px; background: #fffdf8; }
.chart-msg[open] > summary { position: sticky; top: 64px; z-index: 5; border-bottom: 1px solid var(--line); border-radius: 16px 16px 0 0; }
.chart-msg .report-head { display: none; }
.chart-msg > .report { border-radius: 0 0 16px 16px; }
.chat { min-height: calc(100dvh - 90px); }
.chat .composer { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
@media (max-width: 640px) { .chat { min-height: calc(100dvh - 70px); } }

/* ---- chat: review round 2 ---- */
html { scroll-padding-top: 150px; scroll-padding-bottom: 190px; }
html[lang="hi"] * { letter-spacing: 0 !important; text-transform: none; }
html[lang="hi"] .day-sep span, html[lang="hi"] .new-sep span, html[lang="hi"] .cm-open,
html[lang="hi"] .rate-box > summary, html[lang="hi"] .reviewed-btn, html[lang="hi"] .sys-note summary,
html[lang="hi"] .row-preview, html[lang="hi"] .chat .meta { font-size: 14px; }
html[lang="hi"] .chat .msg-body { line-height: 1.7; }
.reviewed-btn { min-height: 44px; margin-bottom: 0; }
.rate-box > summary { text-decoration: underline; text-underline-offset: 3px; }
body:has(.chat) .footer { display: none; }
.menu-pop .menu-langs { display: flex; gap: 6px; padding: 8px 10px 4px; border-top: 1px solid var(--line); margin-top: 4px; flex-wrap: wrap; }
.menu-pop .menu-langs a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }
.menu-pop .menu-langs a.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.composer-form .send:disabled { opacity: .35; cursor: default; }
@media (max-width: 640px) {
  body:has(.chat) .nav .langs, body:has(.chat) .lang-banner { display: none; }
}

/* ---- admin: the two-pane messenger layout (chats on the left, the conversation on the right) ---- */
.admin-app { display: grid; grid-template-columns: 380px minmax(0, 1fr); height: calc(100dvh - 76px); min-height: 520px; max-width: 1500px; margin: 0 auto; border-top: 1px solid var(--line); background: var(--paper); }
.inbox { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--card); }
.inbox-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px 6px; flex-wrap: wrap; }
.inbox-title { display: flex; align-items: center; gap: 8px; }
.inbox-head h1 { margin: 0; font-size: 22px; font-family: var(--body); font-weight: 700; }
.inbox-head .today { font-size: 13px; color: var(--muted); background: #f1e8d3; border-radius: 999px; padding: 4px 10px; }
#push-toggle { min-height: 32px; padding: 0 12px; font-size: 13px; }
.inbox-tabs { display: flex; gap: 6px; padding: 4px 12px 8px; }
.inbox-tabs .tab { padding: 8px 14px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--muted); }
.inbox-tabs .tab.on { background: var(--ink); color: var(--paper); }
.inbox-tabs .count { margin-left: 6px; background: var(--saffron); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 12px; }
.inbox-tools { padding: 0 12px 8px; display: grid; gap: 6px; }
.inbox-tools input[type="search"] { width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; font: inherit; font-size: 15px; background: var(--paper); min-height: 44px; }
.inbox-tools .filter summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 6px 4px; min-height: 32px; }
.inbox-tools .filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.inbox .queue { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; }
.inbox .q-row { border-bottom: 1px solid var(--line); margin: 0; padding: 0; background: transparent; border-radius: 0; border-left: 4px solid transparent; }
.inbox .q-row[hidden] { display: none; }
.inbox .q-row a { display: flex; gap: 12px; align-items: center; padding: 12px 14px; text-decoration: none; color: inherit; }
.inbox .q-row:hover { background: #fbf4e6; }
.inbox .q-row.current { background: #f6e7c6; }
.inbox .q-row.age-aging { border-left-color: #e2a53a; }
.inbox .q-row.age-late { border-left-color: #c8452b; }
.inbox .q-row.age-fresh { border-left-color: #6a9a4a; }
.inbox .q-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.inbox .q-top, .inbox .q-bottom { display: flex; align-items: center; gap: 8px; min-width: 0; }
.inbox .q-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-code { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .3px; }
.inbox .q-age { margin-left: auto; font-size: 12px; color: var(--muted); flex: none; }
.inbox .q-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 14.5px; }
.q-pos { flex: none; min-width: 24px; height: 24px; border-radius: 999px; background: var(--saffron); color: #fff; font-size: 12.5px; font-weight: 700; display: inline-grid; place-items: center; padding: 0 6px; }
.inbox .q-flags { display: flex; gap: 4px; flex-wrap: wrap; }
.inbox-empty { padding: 24px 16px; color: var(--muted); text-align: center; }
.pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #eee5d3; }
.pane-empty { padding: 24px; gap: 14px; overflow-y: auto; align-items: center; }
.pane-empty > * { width: min(560px, 100%); }
.empty-hero { text-align: center; padding: 20px 0 4px; display: grid; gap: 10px; justify-items: center; }
.empty-hero h2 { margin: 0; font-size: 26px; }
.avatar.big { width: 84px; height: 84px; font-size: 40px; }
.pane-head { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--paper); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pane-head .back { display: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); }
.pane-head .who { flex: 1; min-width: 180px; }
.pane-head h1 { margin: 0; font-size: 18px; font-family: var(--body); font-weight: 700; }
.pane-head .sub { margin: 0; font-size: 13px; }
.pane .msgs.thread { flex: 1; min-height: 0; overflow-y: auto; max-width: none; margin: 0; padding: 14px 16px 18px; }
.chat-admin .bubble { max-width: 74%; margin: 4px 0; padding: 8px 12px 6px; border-radius: 14px; box-shadow: 0 1px 1px rgba(60, 40, 10, .12); overflow-wrap: anywhere; }
.chat-admin .bubble.in { align-self: flex-start; background: #fffdf8; border: 0; border-top-left-radius: 4px; }
.chat-admin .bubble.out { align-self: flex-end; background: #f7d896; border: 0; border-top-right-radius: 4px; }
.chat-admin .bubble small { display: block; text-align: right; color: var(--muted); font-size: 11.5px; }
.chat-admin .bubble .msg-body { display: block; white-space: pre-wrap; font-size: 15.5px; line-height: 1.42; }
.chat-admin .sent-report { align-self: stretch; margin: 6px 0; background: #fffdf8; border-radius: 14px; padding: 8px 12px; }
.copied-note { padding: 4px 16px 0; min-height: 0; }
.admin-composer { position: static; padding: 8px 12px 10px; border-top: 1px solid var(--line); background: var(--paper); }
.admin-composer .snippet-bar { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 8px; }
.admin-composer .snippet-bar .chip { flex: none; white-space: nowrap; }
.admin-composer .composer-form { display: flex; align-items: flex-end; gap: 8px; }
.admin-composer textarea { flex: 1; resize: none; max-height: 40vh; font-size: 16px; }
.admin-composer .hint { margin: 6px 4px 0; font-size: 12.5px; }
.admin-menu { position: relative; }
.admin-menu .menu-pop { min-width: 260px; padding: 10px; }
.admin-menu .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
@media (max-width: 900px) {
  .admin-app { grid-template-columns: 1fr; height: calc(100dvh - 60px); }
  .admin-app.is-list .pane { display: none; }
  .admin-app.is-chat .inbox { display: none; }
  .pane-head .back { display: grid; }
  .chat-admin .bubble { max-width: 88%; }
}

/* ---- admin: review round 1 ---- */
.inbox .q-row a:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; background: #fbf4e6; }
.inbox .q-top strong.unanswered { font-weight: 800; }
.inbox .q-row.current .q-top strong { color: #7a4508; }
.pane-head .who-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pane-head .badge { white-space: nowrap; }
.age-badge.age-aging { background: #f6dfae; color: #7a4508; }
.age-badge.age-late { background: #f3c7bb; color: #7a2a1a; }
.age-badge.age-fresh { background: #dcebd5; color: var(--green); }
.copied-note { color: var(--green); font-weight: 600; }
.copied-note.bad { color: #8b2a1a; }
#copy-birth.is-done { background: var(--green); }
.admin-composer .chip, .filter summary, .admin-menu summary, .pane-head .primary.small { min-height: 44px; display: inline-flex; align-items: center; }
.admin-composer .callout.error { border: 1px solid #d9a698; }
.inbox .q-code, .inbox .q-age, .chat-admin .bubble small { color: #5f5745; }
.search-form { margin: 0; }
@media (max-width: 1040px) and (min-width: 901px) { .admin-app { grid-template-columns: 320px minmax(0, 1fr); } }
@media (max-width: 1040px) {
  .admin-app { grid-template-columns: 1fr; height: calc(100dvh - 60px); }
  .admin-app.is-list .pane { display: none; }
  .admin-app.is-chat .inbox { display: none; }
  .pane-head .back { display: grid; }
  .chat-admin .bubble { max-width: 88%; }
}
.pane-head h1 .q-code { margin-left: 8px; }
.chat-admin .bubble { display: flex; flex-direction: column; }
.chat-admin .bubble small { order: 5; margin-top: 2px; }

/* ---- landing: "we check your past first" section, styled like the how-it-works steps ---- */
.verify { text-align: center; }
.verify .lede { margin-left: auto; margin-right: auto; }
.verify-points { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); text-align: left; }
.verify-points h3 { font-family: var(--display); font-weight: 400; font-size: 21px; margin: 0 0 4px; }
.verify-points p { margin: 0; color: #4a4740; }
@media (min-width: 760px) { .verify-points { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
