/* ─────────────────────────────────────────────────────────────────────────
   Chelria · one stylesheet for every page.
   Owner 11-17 (second pass): lay every page out the way OpenAI does, keep our
   own details — the original three typefaces and the clay mark.

   Layout taken from ChatGPT / OpenAI on Mobbin: white ground, a #f9f9f9
   sidebar, a centred question with a pill-shaped composer under it, a black
   round send button, pill buttons everywhere, pricing as cards with a big
   plan name and a stacked "USD / month", log-in as one narrow centred column
   of pill buttons, settings as one bordered panel with tabs on the left.

   Ours: BioRhyme for headings and the greeting, Spinnaker for UI and the
   reading, Pacifico only for the wordmark, 华文中宋 for Chinese, the brand's
   own CJK punctuation, the clay logo mark. No other fonts.

   Responsive breakpoints (the full table, with the scripts' own breakpoints, is in CLAUDE.md §5):
     ≤ 880px  sidebar becomes a drawer; the top bar shows menu + logo + account
     ≥ 881px  sidebar folds to a 60px rail (on the new look it floats over the page)
     ≤ 640px  phone layout on the home page (home-look.js)
   Check with: node tests/responsive.cjs   (0 ERRORs before shipping)
   ───────────────────────────────────────────────────────────────────────── */

@font-face { font-family: "BioRhyme"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("../assets/fonts/BioRhyme.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Spinnaker"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/Spinnaker-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Pacifico"; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/Pacifico-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "ChelriaPunct-Serif"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("../assets/fonts/ChelriaPunct-Serif.woff2") format("woff2"); unicode-range: U+3001-3002, U+300A-300F, U+FF01, U+FF05, U+FF08-FF09, U+FF0C, U+FF0E-FF0F, U+FF1A-FF1C, U+FF1E-FF1F, U+FF3B, U+FF3D, U+FF5E; }
@font-face { font-family: "ChelriaPunct-Sans"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("../assets/fonts/ChelriaPunct-Sans.woff2") format("woff2"); unicode-range: U+3001-3002, U+300A-300F, U+FF01, U+FF05, U+FF08-FF09, U+FF0C, U+FF0E-FF0F, U+FF1A-FF1C, U+FF1E-FF1F, U+FF3B, U+FF3D, U+FF5E; }

:root {
  --bg: #ffffff;
  --bg-2: #f9f9f9;
  --surface: #ffffff;
  --ink: #0d0d0d;
  --ink-2: #424242;
  --muted: #6b6b6b;
  --line: #ececec;
  --line-2: #dcdcdc;
  --hover: #f3f3f3;
  --sel: #ececec;
  --accent: #c96442;
  --accent-2: #a9502f;
  --accent-soft: #fbf1ec;
  --ok: #2f7a4b;
  --warn: #c0352b;

  --font-zh: "STZhongsong", "华文中宋", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --serif: "BioRhyme", "ChelriaPunct-Serif", var(--font-zh);
  --sans: "Spinnaker", "ChelriaPunct-Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --brand: "Pacifico", "BioRhyme", cursive;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-sans: var(--sans);
  --font-serif: var(--serif);
  --font-brand: var(--brand);
  --read: var(--sans);

  /* names the reading and figure styles already use */
  --paper: var(--bg);
  --paper-raised: var(--surface);
  --paper-dim: #f4f4f4;
  --dim: var(--ink-2);
  --faint: var(--muted);
  --ghost: #8f8f8f;
  --line-soft: #f0f0f0;
  --terracotta: var(--accent);
  --prussian: #2f3d46;
  --prussian-on: #ffffff;
  --pine: #4f6b57;
  --chip: var(--paper-dim);
  --bw-mark: var(--accent-soft);
  --bw-ink-on-sky: var(--ink);
  --th-ink: var(--ink);
  --bw-palette-cloud: #f4f4f4;
  --bw-palette-gem: var(--accent);
  --bw-palette-4: #e3e3e3; --bw-palette-6: #b4b4b4; --bw-palette-7: #8a8a8a; --bw-palette-8: #666666; --bw-palette-10: #424242;
  --tracking-label: 0;
  --ui-hairline: 1px;
  --ui-radius: 16px;
  --ui-radius-small: 12px;
  --ui-radius-pill: 999px;
  --ctl: 40px;
  --ctl-compact: 32px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --dur-fast: 140ms;
  --dur-base: 190ms;
  --dur-slow: 360ms;

  --shadow-card: none;
  --shadow-input: 0 4px 16px rgba(0, 0, 0, .05), 0 0 0 1px rgba(0, 0, 0, .02);
  --shadow-pop: 0 8px 32px rgba(0, 0, 0, .12), 0 0 0 1px rgba(0, 0, 0, .05);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 400 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* brand mark: the swallow silhouette, in the ink, beside the wordmark */
.c-mark, .bw-bird {
  /* the box has the swallow's own proportions (112 × 89) */
  display: inline-block; width: 28px; height: 28px; flex: none;
  background: var(--ink);
  -webkit-mask: url("../assets/brand/bird.png") center / contain no-repeat; mask: url("../assets/brand/bird.png") center / contain no-repeat;
}

/* ── shared controls ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
  font: 400 14px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2f2f2f; }
.btn-line { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-line:hover { background: var(--hover); }
.btn-quiet { background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--hover); color: var(--ink); }
.btn-warn { background: var(--surface); color: var(--warn); border-color: #ecc8c4; }
.btn-warn:hover { background: #fdf3f2; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 52px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
/* Aliases: account/settings scripts still inject the old double-dash names. */
.btn--dark, .btn--primary { background: var(--ink); color: #fff; }
.btn--dark:hover, .btn--primary:hover { background: #2f2f2f; }
.btn--quiet { background: transparent; color: var(--ink-2); }
.btn--quiet:hover { background: var(--hover); color: var(--ink); }
.btn--warn { background: var(--surface); color: var(--warn); border-color: #ecc8c4; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; }

.input {
  display: block; width: 100%; height: 52px; padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 15px;
}
.input::placeholder { color: var(--ghost); }
.input:focus { outline: none; border-color: var(--ink); box-shadow: none; }
.label { display: block; font: 400 13px/1.3 var(--sans); color: var(--ink-2); margin: 0 0 6px 20px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--paper-dim); color: var(--ink-2); font: 500 12px/1 var(--sans); }
.pill-accent { background: var(--accent-soft); color: var(--accent-2); }

.toast {
  /* centred by layout (snapped to whole pixels), not by translate(-50%), which lands an odd-width toast on a half pixel and blurs its edge */
  position: fixed; left: 0; right: 0; margin-inline: auto; width: max-content; max-width: calc(100vw - 32px); bottom: 24px; transform: translateY(12px); opacity: 0; pointer-events: none; z-index: 90;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow-pop);
  transition: opacity var(--dur-base) ease, transform var(--dur-base) var(--ease-out);
}
.toast.on { opacity: 1; transform: none; }

/* ═════════════════════════════════════════════════════════════════════════
   INNER PAGES (pricing · login · settings · guide · about · legal · 404)
   ═════════════════════════════════════════════════════════════════════════ */
.site-head {
  position: sticky; top: 0; z-index: 40; height: 64px; display: flex; align-items: center; gap: 24px;
  padding: 0 max(20px, calc((100vw - 1280px) / 2)); background: rgba(255, 255, 255, .92); backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid transparent; transition: border-color var(--dur-base) ease;
}
.site-head { border-bottom: 1.5px solid color-mix(in srgb, var(--ink) 35%, transparent); }
.site-head.is-stuck { border-bottom-color: color-mix(in srgb, var(--ink) 55%, transparent); }
.site-brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.site-brand b { font: 400 22px/1 var(--brand); letter-spacing: 0; }
.site-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.site-nav a {
  position: relative; padding: 10px 12px; border-radius: 0; text-decoration: none; white-space: nowrap;
  font: 700 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink);
}
.site-nav a::after {
  content: ""; position: absolute; left: 12px; right: calc(12px - .2em); bottom: 2px; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left center;
}
.site-nav a:hover { background: none; color: var(--ink); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--ink); background: none; }
.site-nav .nl-short { display: none; }
.site-head > .btn { flex: none; margin-left: 8px; }
@media (max-width: 900px) {
  .site-nav .nl-long { display: none; }
  .site-nav .nl-short { display: inline; }
}
.site-actions { display: flex; gap: 8px; margin-left: 8px; }
.site-actions .btn-line { background: var(--hover); border-color: transparent; }
.site-actions .btn-line:hover { background: #e9e9e9; }

.page { max-width: 1200px; margin: 0 auto; padding: 72px 20px 96px; }
.page-narrow { max-width: 720px; }
.page-mid { max-width: 960px; }
.page-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.page-head.left { text-align: left; margin-left: 0; }
.page-head.hero .h1 { font-size: 64px; letter-spacing: -.03em; margin: 8px 0 20px; }
.page-head.hero .lede { max-width: 560px; margin: 0 auto; }
.eyebrow { font: 500 13px/1.3 var(--sans); color: var(--muted); margin: 0 0 12px; }
.h1 { font: 400 40px/1.15 var(--serif); letter-spacing: -.02em; margin: 0 0 16px; color: var(--ink); }
.h2 { font: 400 26px/1.2 var(--serif); letter-spacing: -.01em; margin: 0 0 12px; color: var(--ink); }
.h3 { font: 400 17px/1.4 var(--sans); margin: 0 0 6px; color: var(--ink); }
.lede { font-size: 16px; line-height: 1.6; color: var(--ink-2); margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.5; }

.card { background: var(--surface); border: 1px solid #e5e5e5; border-radius: 20px; }
.card-pad { padding: 28px; }
.stack > * + * { margin-top: 16px; }
.section { margin-top: 88px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* prose: guide, about, legal */
.prose { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.prose h2 { font: 400 22px/1.3 var(--serif); color: var(--ink); letter-spacing: -.01em; margin: 56px 0 12px; scroll-margin-top: 88px; }
.prose h3 { font: 400 17px/1.4 var(--sans); color: var(--ink); margin: 28px 0 8px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.prose strong, .prose em, .lede strong {
  font-style: normal; font-weight: 700; font-family: inherit; font-size: 1em; color: inherit;
  background: #7eb6f2; padding: .04em .14em; border-radius: 2px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose .note { background: var(--paper-dim); border: 0; border-radius: 16px; padding: 16px 18px; color: var(--ink-2); margin: 24px 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* legal and guide: a quiet index on the left on wide screens */
.doc { max-width: 680px; margin: 0 auto; }
.doc > article > .eyebrow, .doc > article > .h1, .doc > article > .lede { text-align: center; }
.doc > article > .h1 { font-size: 56px; letter-spacing: -.03em; margin: 8px 0 20px; }
.doc > article > .lede { margin-bottom: 40px; }
.doc .prose { color: var(--ink); }
.doc-index { display: none; }
.doc-index p { font-weight: 500; color: var(--ink); margin: 0 0 10px; }
.doc-index a { display: block; padding: 6px 12px; margin-left: -12px; border-radius: 999px; color: var(--muted); text-decoration: none; }
.doc-index a:hover { background: var(--hover); color: var(--ink); }

/* pricing */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--paper-dim); border-radius: 999px; }
.seg button { height: 32px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 500 14px/1 var(--sans); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.seg .save { color: var(--accent-2); font-weight: 500; }
.plan { display: flex; flex-direction: column; padding: 28px 24px; position: relative; }
.plan > * { order: 6; }
.plan .plan-name { order: 1; } .plan .price { order: 2; } .plan .plan-desc { order: 3; } .plan .grant { order: 4; } .plan .btn { order: 5; }
.plan .plan-name { font: 400 32px/1.1 var(--serif); margin: 0 0 18px; letter-spacing: -.01em; }
.plan .plan-desc { color: var(--ink); font-size: 15px; margin: 14px 0 2px; }
.plan .price { display: flex; align-items: baseline; gap: 8px; margin: 0 0 4px; }
.plan .price b { font: 400 44px/1 var(--serif); letter-spacing: -.03em; }
.plan .price .cur { align-self: flex-start; margin: 2px -6px 0 0; font: 400 16px/1 var(--sans); color: var(--muted); }
.plan .price span { font-size: 12px; color: var(--muted); line-height: 1.25; max-width: 4.5em; }
.plan .grant { font-size: 13px; color: var(--muted); margin: 0 0 22px; min-height: 20px; }
.plan .btn { margin-bottom: 24px; }
.plan ul { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--ink-2); }
.plan li { position: relative; padding-left: 24px; margin: 9px 0; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 11px; height: 6px; border: solid var(--ink-2); border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg); }
.plan.featured { border-color: #e6b8a5; background: linear-gradient(180deg, #fdf4ef 0%, #ffffff 70%); }
.plan.featured .plan-name::after { content: "Popular"; position: absolute; top: 30px; right: 24px; height: 22px; padding: 0 10px; border-radius: 999px; background: #f6dfd4; color: var(--accent-2); font: 400 11px/22px var(--sans); letter-spacing: .04em; }
.plan.featured .btn-dark { background: var(--accent); }
.plan.featured .btn-dark:hover { background: var(--accent-2); }
.pack { padding: 20px; text-align: left; cursor: pointer; transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease; }
.pack:hover { border-color: var(--line-2); background: #fffefb; }
.pack .u { font: 400 22px/1.2 var(--serif); }
.pack { border-radius: 20px; }
.pack .p { font-size: 15px; font-weight: 500; margin-top: 6px; }
.pack .unit-price { font-size: 12px; color: var(--muted); margin-top: 4px; }
.balance { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin: 0 auto 28px; }
.balance b { color: var(--ink); font-weight: 400; }
table.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
table.compare th, table.compare td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); }
table.compare thead th { font-weight: 500; color: var(--muted); }
table.compare tbody th { font-weight: 500; color: var(--ink); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 0; font: 400 16px/1.4 var(--sans); color: var(--ink); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--ink-2); line-height: 1.65; }

/* login */
.auth { max-width: 360px; margin: 0 auto; text-align: center; }
.auth .h1 { font-size: 32px; margin-bottom: 12px; }
.auth .card { text-align: left; padding: 0; margin-top: 28px; border: 0; border-radius: 0; background: none; }
.auth .tabs { display: flex; gap: 2px; padding: 3px; background: var(--paper-dim); border-radius: 999px; margin-bottom: 20px; }
.auth .tab { flex: 1; height: 38px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font: 500 14px/1 var(--sans); cursor: pointer; }
.auth .tab.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.auth .field { margin-bottom: 14px; }
.auth .pass-wrap { position: relative; }
.auth .pass-wrap .input { padding-right: 64px; }
.auth .pass-toggle { position: absolute; right: 8px; top: 8px; height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; cursor: pointer; }
.auth .pass-toggle:hover { background: var(--hover); color: var(--ink); }
body:not([data-mode="register"]) .reveal-row { display: none; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 20px 0; text-transform: uppercase; letter-spacing: .06em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.oauth-providers { display: grid; gap: 8px; }
.oauth-btn { height: 52px; justify-content: flex-start; padding: 0 22px; gap: 14px; font-size: 15px; }
.oauth-btn .arr { display: none; }
.oauth-btn .ic svg { width: 18px; height: 18px; }
.form-msg { font-size: 13px; margin: 12px 0 0; }
.form-msg.err { color: var(--warn); }
.form-msg.ok { color: var(--ok); }
.fine { font-size: 12px; color: var(--muted); text-align: center; margin: 16px 0 0; line-height: 1.5; }
.fine a { color: var(--ink-2); }

/* settings */
.settings { display: grid; grid-template-columns: 210px minmax(0, 1fr); max-width: 920px; margin: 0 auto; border: 1px solid #e5e5e5; border-radius: 20px; box-shadow: 0 8px 32px rgba(0, 0, 0, .06); overflow: clip; }
.settings > div { padding: 24px 32px 8px; min-width: 0; }
.settings-nav { position: sticky; top: 64px; align-self: start; display: grid; gap: 2px; padding: 16px 10px; }
.settings-nav a { padding: 9px 12px; border-radius: 10px; font-size: 14px; color: var(--ink); text-decoration: none; }
.settings-nav a:hover { background: var(--hover); }
.settings-nav a.on { background: var(--sel); color: var(--ink); }
.s-group { margin-bottom: 36px; scroll-margin-top: 96px; }
.s-group > .card { border: 0; border-radius: 0; background: none; }
.s-group > h2 { font: 400 18px/1.3 var(--serif); margin: 0; padding: 0 0 12px; border-bottom: 1px solid var(--line); }
.rows { padding: 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; }
.row + .row { border-top: 1px solid var(--line); }
.rl { min-width: 0; }
.rl b { display: block; font-weight: 400; font-size: 14px; color: var(--ink); }
.rl span, .rl p { display: block; font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.rr { display: flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.row--stack { flex-direction: column; align-items: stretch; gap: 10px; }
.rr--wide { flex: 1 1 auto; justify-content: flex-end; }
.rr--wide textarea.input { flex: 1 1 100%; width: 100%; min-height: 72px; height: auto; padding: 10px 14px; border-radius: 18px; line-height: 1.45; resize: vertical; }
.rl b .opt { display: inline; margin: 0; color: var(--muted); font-size: 12px; }
.units-big { font: 400 26px/1 var(--serif); }
.meter { height: 6px; border-radius: 3px; background: var(--paper-dim); overflow: hidden; width: 160px; }
.meter > i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.mrow { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; }
.mrow + .mrow { margin-top: 8px; }
.mrow.sel { border-color: var(--ink); }
.mrow .radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; }
.mrow.sel .radio { border: 5px solid var(--ink); }
.mrow .mmain { flex: 1; }
.mrow .mmain b { font-weight: 500; font-size: 14px; }
.mrow .mmain p { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.mrow .mcost { font-size: 12px; color: var(--muted); }
.av { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.id-row { display: flex; align-items: center; gap: 14px; }
.id-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.id-main b { font-weight: 400; }
.id-main span { color: var(--dim); font-size: 13px; overflow-wrap: anywhere; }
.prov-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: 999px; background: var(--paper-dim); color: var(--ink-2); font: 500 12px/1 var(--sans); margin-left: 6px; }
.usage-remain { margin: 6px 0 0; color: var(--dim); font-size: 13px; }
.signedout-note { color: var(--dim); font-size: 14px; }

/* 404 */
.lost { text-align: center; max-width: 480px; margin: 40px auto; }
.lost .c-mark { width: 56px; height: 44px; margin: 0 auto 20px; }

/* footer */
.site-foot { border-top: 1px solid var(--line); background: var(--bg); }
.foot-in { max-width: 1200px; margin: 0 auto; padding: 48px 20px 40px; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot-brand { display: flex; flex-direction: column; gap: 10px; }
.foot-brand p { margin: 0; font-size: 13px; color: var(--muted); max-width: 260px; }
.foot-col h4 { margin: 0 0 14px; font: 400 13px/1 var(--sans); color: var(--muted); }
.foot-col a { display: block; font-size: 14px; color: var(--ink); text-decoration: none; padding: 6px 0; }
.foot-col a:hover { color: var(--muted); }
.foot-bottom { max-width: 1200px; margin: 0 auto; padding: 16px 20px 32px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }

@media (max-width: 900px) {
  .doc, .settings { grid-template-columns: 1fr; gap: 24px; }
  .doc-index, .settings-nav { position: static; }
  .doc-index { display: none; }
  .settings-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; border-bottom: 1px solid var(--line); }
  .settings > div { padding: 20px 18px 4px; }
  .settings-nav a { white-space: nowrap; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .site-head { height: 56px; gap: 8px; padding: 0 16px; }
  .site-nav a { padding: 10px 6px; font-size: 12px; letter-spacing: .08em; }
  .site-nav .opt { display: none; }
  .site-actions .btn-line { display: none; }
  .page { padding: 40px 16px 72px; }
  .h1 { font-size: 30px; }
  .doc > article > .h1, .page-head.hero .h1 { font-size: 40px; }
  .auth .h1 { font-size: 28px; }
  .h2 { font-size: 24px; }
  .section { margin-top: 64px; }
  .grid-2 { grid-template-columns: 1fr; }
  .row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .rr { justify-content: flex-start; }
  .compare-wrap { overflow-x: auto; }
  table.compare { min-width: 520px; }
}

/* ═════════════════════════════════════════════════════════════════════════
   THE APP (index.html): sidebar · conversation · composer
   ═════════════════════════════════════════════════════════════════════════ */
body[data-page="app"] { display: flex; height: 100vh; height: 100dvh; overflow: hidden; }

/* sidebar */
.sidebar {
  width: 260px; flex: none; display: flex; flex-direction: column; height: 100%;
  background: var(--bg-2); border-right: 0; padding: 10px 8px 8px; position: relative; z-index: 30;
  transition: width var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.side-top { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 4px 0 8px; margin-bottom: 8px; }
.brand-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 4px; cursor: pointer; color: var(--ink); }
.brand-word { font: 400 21px/1 var(--brand); letter-spacing: 0; text-shadow: 0 0 .4px currentColor, 0 0 5px color-mix(in srgb, currentColor 14%, transparent); }   /* owner 11-23: the glow was too much; a faint edge only */
.side-toggle, .side-open-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.side-toggle:hover, .side-open-btn:hover { background: var(--hover); color: var(--ink); }
.new-cast { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: 400 14px/1 var(--sans) !important; cursor: pointer; text-align: left; }
.new-cast:hover { background: var(--hover); }
.new-cast .ic { width: 18px; height: 18px; flex: none; color: var(--ink-2); display: grid; place-items: center; }
.new-cast .ic svg { width: 18px; height: 18px; }
.new-cast .fade { font: inherit !important; }
.mobile-side-nav { display: none; }
.castings { flex: 1; overflow-y: auto; margin-top: 16px; padding: 0 2px; }
.castings .lbl { font: 400 13px/1 var(--sans) !important; color: var(--muted) !important; padding: 8px; text-transform: none !important; letter-spacing: 0 !important; }
.castings .casting-row { position: relative; }
.castings .casting { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; color: var(--ink); text-decoration: none; }
.castings .casting:hover, .castings .casting-row:hover .casting { background: var(--hover); }
.castings .casting.active { background: var(--sel); }
.castings .casting-title { display: block; font-size: 14px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.castings .casting-meta { display: none; }
.castings .empty-note, .castings p { font-size: 13px; color: var(--muted); padding: 4px 10px; line-height: 1.5; margin: 0; }

/* balance: one quiet line above the account row */
.ledger { margin: 8px 4px 4px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line) !important; }
.ledger-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.ledger-head .lbl { font-weight: 400; }
.ledger-plan { color: var(--ink-2); }
.ledger-bal { display: flex; align-items: baseline; gap: 6px; margin: 6px 0 8px; }
.ledger-bal .count { font: 400 22px/1 var(--serif) !important; color: var(--ink); }
.ledger-unit { font: 400 13px/1 var(--sans) !important; color: var(--muted); }
.ledger-meter { height: 4px; border-radius: 2px; background: var(--paper-dim); overflow: hidden; }
.ledger-meter span { display: block; height: 100%; background: var(--ink); border-radius: 2px; }
.ledger-cap { font: 400 12px/1.4 var(--sans) !important; color: var(--muted); margin-top: 8px; }
.exchange { margin-top: 10px; width: 100%; height: 34px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font: 400 13px/1 var(--sans) !important; color: var(--ink); cursor: pointer; }
.exchange:hover { background: var(--hover); }
.exchange.shortfall { background: var(--ink); color: #fff; border-color: var(--ink); }

.signin-coach { position: relative; margin: 4px 4px; padding: 12px 28px 12px 12px; border-radius: 16px; background: var(--accent-soft); color: var(--ink-2); font-size: 13px; line-height: 1.45; cursor: pointer; }
.signin-coach b { color: var(--ink); font-weight: 400; }
.signin-coach .cx, .guide-coach .cx { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 6px; font-size: 16px; line-height: 1; }
.signin-coach .cx:hover { background: rgba(20, 20, 19, .06); }

.side-foot { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 4px; padding: 8px; border: 0 !important; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; }
.side-foot:hover { background: var(--hover); }
.avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font: 400 13px/1 var(--sans); }
.side-foot .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side-foot .who b { font: 400 14px/1.3 var(--sans) !important; color: var(--ink); }
.side-foot .who i { font: 400 12px/1.3 var(--sans) !important; font-style: normal; color: var(--muted) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .go { color: var(--muted); }
.acct-menu { position: absolute; left: 8px; right: 8px; bottom: 60px; z-index: 50; background: var(--surface); border-radius: 14px; box-shadow: 0 10px 28px rgba(0, 0, 0, .08), 0 0 0 1px rgba(0, 0, 0, .06); padding: 6px; display: none; }
@media (min-width: 881px) {
  body.rail .acct-menu { left: 68px; right: auto; width: 220px; bottom: 12px; }
}
.acct-menu.open { display: block; }
.acct-menu .who { padding: 8px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.acct-menu .who b { display: block; font: 400 14px/1.3 var(--sans) !important; }
.acct-menu .who span { display: block; font: 400 12px/1.4 var(--sans) !important; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu .mi { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font: 400 14px/1 var(--sans) !important; color: var(--ink); cursor: pointer; text-align: left; }
.acct-menu .mi:hover { background: var(--hover); }
.acct-menu .mi svg { color: var(--muted); }
.side-scrim { display: none; }

/* main column */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100%; position: relative; }
.topbar { height: 52px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 16px; }
.side-open-btn { display: none; }
.topbar-brand { display: none; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
#convTitle { flex: 1; min-width: 0; margin: 0; padding: 0 !important; font: 400 16px/1.3 var(--sans) !important; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.is-empty #convTitle { visibility: hidden; }
.top-right { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.top-right .ghost {
  position: relative; padding: 10px 12px; border-radius: 0; text-decoration: none; white-space: nowrap;
  font: 700 12px/1 var(--sans) !important; letter-spacing: .2em; text-transform: uppercase; color: var(--ink);
}
.top-right .ghost::after {
  content: ""; position: absolute; left: 12px; right: calc(12px - .2em); bottom: 2px; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left center;
}
.top-right .ghost:hover { background: none; color: var(--ink); }
.top-right .ghost:hover::after { transform: scaleX(1); }
.top-right .plans-short, .top-right .why-short { display: none; }
.topbar-acct { display: none; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 4px; border-radius: 999px; border: 1px solid var(--line-2); text-decoration: none; color: var(--ink); font-size: 13px; }
.ta-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 11px; }
.units-chip, .claude-note, .guide-coach, .read-progress { display: none !important; }

.thread { flex: 1; min-height: 0; overflow-y: auto; }
.thread-inner { max-width: 768px; margin: 0 auto; padding: 16px 24px 32px; }

/* landing: the question and the composer centred together, like ChatGPT's home */
body.is-empty .main { justify-content: center; }
body.is-empty .topbar { position: absolute; top: 0; left: 0; right: 0; }
body.is-empty .thread { flex: 0 0 auto; overflow: visible; }
body.is-empty .thread-inner { padding-bottom: 20px; }
.hero-empty { text-align: center; }
.greeting { display: flex; align-items: center; justify-content: center; gap: 14px; }
.greeting .bw-hero-mark { display: none; }
#greetLine .gl-1, #greetLine .gl-2 { display: block; white-space: nowrap; }
/* a name is never cut: it shrinks to fit its own line, and if it still does not fit at the smallest size it wraps */
#greetLine .gl-2 { white-space: normal; overflow-wrap: anywhere; }
#greetLine.gl-measure .gl-2 { white-space: nowrap; }
/* with a name the first line is "What's on your mind," (about 11.2em of BioRhyme): the size comes from
   the width straight away, so the greeting never spills and never jumps when the name arrives */
#greetLine.has-name { font-size: min(30px, calc((100vw - 32px) / 11.4)) !important; }
@media (max-width: 880px) { #greetLine.has-name { font-size: min(26px, calc((100vw - 32px) / 11.4)) !important; } }
#greetLine { margin: 0; font: 400 30px/1.25 var(--serif) !important; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }

/* composer: the pill */
.composer-zone { position: relative; flex: none; width: 100%; max-width: 768px; margin: 0 auto; padding: 0 24px 16px; }
body.is-empty .composer-zone { max-width: 720px; padding-bottom: 12vh; }
.composer {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "input input input" "chip . send";
  gap: 4px 8px; padding: 14px 12px 10px 18px; background: var(--surface); border: 1px solid #e3e3e3; border-radius: 28px;
  box-shadow: var(--shadow-input); transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.composer:focus-within { border-color: #d6d6d6; box-shadow: 0 4px 20px rgba(0, 0, 0, .07); }
#composerInput {
  grid-area: input; width: 100%; min-height: 44px; max-height: 240px; resize: none; border: 0; outline: 0; background: transparent;
  font: 400 16px/1.5 var(--sans); color: var(--ink); padding: 2px 4px; margin: 0;
}
#composerInput::placeholder { color: var(--ghost); }
.stria, #methodChip {
  grid-area: chip; justify-self: start; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink-2); font: 400 13px/1 var(--sans); cursor: pointer;
}
.stria:hover, #methodChip:hover { background: var(--hover); }
.send, #sendBtn {
  grid-area: send; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: var(--ink); color: #fff; cursor: pointer; transition: background var(--dur-fast) ease, opacity var(--dur-fast) ease;
}
.send:hover { background: #2f2f2f; }
.send:disabled, .send[disabled] { opacity: .45; cursor: default; }
.send .bw-organic-loader { display: none; }
.send.busy svg, .send.is-busy svg { display: none; }
.send.busy .bw-organic-loader, .send.is-busy .bw-organic-loader { display: inline-flex; gap: 3px; }
.bw-organic-loader i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: c-dot 1s ease-in-out infinite; }
.bw-organic-loader i:nth-child(2) { animation-delay: .15s; }
.bw-organic-loader i:nth-child(3) { animation-delay: .3s; }
@keyframes c-dot { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.disclaimer { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.composer-zone .site-foot { border: 0; background: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.composer-zone .site-foot a { color: var(--muted); text-decoration: none; }
.composer-zone .site-foot a:hover { color: var(--ink); }
.composer-zone .sf-dot { display: none; }
body:not(.is-empty) .composer-zone .site-foot { display: none; }
/* in a conversation the one-line notice stays under the box, small, like the big chat apps' "can make mistakes" (owner 11-23) */
body:not(.is-empty) .disclaimer { margin: 6px 0 0; font-size: 11px; }
.unit-warn { margin: 0 0 8px; padding: 10px 14px; border-radius: 16px; background: var(--accent-soft); color: var(--ink-2); font-size: 13px; }
.unit-warn a { color: var(--ink); }

/* popup menus (method picker, carried castings) */
.method-menu { position: absolute; z-index: 80; min-width: 260px; max-width: 360px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-pop); padding: 6px; display: none; }
#methodMenu { left: 24px; bottom: 78px; }
.method-menu.open { display: block; }
.mm-row, .cm-row { display: flex; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; cursor: pointer; color: var(--ink); font-size: 14px; }
.mm-row:hover, .cm-row:hover { background: var(--hover); }
.mm-main { display: grid; gap: 2px; min-width: 0; }
.mm-name, .cm-title { font-weight: 400; }
.mm-tag { font-size: 11px; color: var(--muted); }
.mm-blurb, .cm-meta, .cm-note { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
.mm-dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--line-2); margin-top: 6px; flex: none; }
.mm-row.active .mm-dot { background: var(--accent); border-color: var(--accent); }
.carry-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.carry-bar:empty { display: none; }
.carry-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; background: var(--paper-dim); font-size: 12px; color: var(--ink-2); }

/* the conversation: reader on the right in a grey bubble, the reading in Spinnaker */
.msg-user { margin-left: auto !important; max-width: 70% !important; width: fit-content; background: var(--paper-dim) !important; border: 0 !important; border-radius: 22px !important;
  padding: 10px 18px !important; font: 400 15px/1.55 var(--sans) !important; color: var(--ink) !important; box-shadow: none !important; }

/* phones: the sidebar becomes a drawer */
@media (max-width: 880px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-104%); box-shadow: var(--shadow-pop); }
  body.side-open .sidebar, .sidebar.open { transform: none; }
  body.side-open .side-scrim { display: block; position: fixed; inset: 0; background: rgba(20, 20, 19, .25); z-index: 25; }
  .side-open-btn, .topbar-brand, .topbar-acct { display: inline-flex; }
  .topbar-brand .brand-word { font-size: 19px; }
  body.is-empty #convTitle { display: none; }
  body:not(.is-empty) .topbar-brand { display: none; }
  .top-right .ghost { display: none; }
  .mobile-side-nav { display: grid; gap: 2px; margin-top: 12px; }
  .mobile-side-nav a { padding: 8px 10px; border-radius: 10px; font-size: 14px; color: var(--ink-2); text-decoration: none; }
  .mobile-side-nav a:hover { background: var(--hover); }
  .thread-inner { padding: 12px 16px 24px; }
  .composer-zone { padding: 0 12px 12px; }
  #greetLine { font-size: 26px !important; }
  .greeting { flex-direction: column; gap: 10px; }
  body.is-empty .composer-zone { padding-bottom: 8vh; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* desktop: the sidebar folds to a rail */
@media (min-width: 881px) {
  body.rail .sidebar { width: 60px; }
  body.rail .sidebar .fade, body.rail .sidebar .brand-word, body.rail .sidebar .ledger, body.rail .sidebar .signin-coach, body.rail .sidebar .castings { display: none !important; }
  body.rail .side-top { flex-direction: column; height: auto; gap: 6px; padding: 0; }
  body.rail .new-cast { justify-content: center; padding: 0; }
  body.rail .side-foot { justify-content: center; }
}

/* Touch: every control reaches the 24px WCAG minimum in its short axis, and
   inline policy links never break across lines (a link split over two lines
   has a box that covers its neighbour, which steals the tap). */
.prose a, .fine a, .lede a { white-space: nowrap; }
@media (pointer: coarse) {
  .site-brand, #homeBrand { min-height: 44px; }
  .composer-zone .site-foot a { display: inline-flex; align-items: center; min-height: 32px; }
  .composer-zone .site-foot { gap: 0 12px; }
  #newCast, .side-links a { min-height: 44px; }
  .ly-appendix summary, .ly-rest summary { min-height: 32px; display: flex; align-items: center; }
  .ly-act { min-width: 32px; min-height: 32px; display: inline-grid; place-items: center; }
  #coachClose { min-width: 32px; min-height: 32px; }
  .foot-bottom a { display: inline-flex; align-items: center; min-height: 32px; }
}

/* Log in: like OpenAI's — only the wordmark up top, one column, the policy links under the form. */
body[data-page="login"] .site-nav, body[data-page="login"] .site-actions { display: none; }
body[data-page="login"] .site-head { position: static; }
body[data-page="login"] .site-foot { display: none; }
body[data-page="login"] .page { padding-top: 56px; }
body[data-page="login"] .auth .lede { font-size: 15px; }

/* ── icons in lists (settings tabs, sidebar links) ───────────────────── */
.settings-nav a, .side-links a { display: flex; align-items: center; gap: 10px; }
.settings-nav a svg, .side-links a svg { flex: none; color: var(--ink-2); }
.side-links { display: grid; gap: 2px; margin-top: 2px; }
.side-links a { height: 38px; padding: 0 10px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: 14px; }
.side-links a:hover { background: var(--hover); }
body.rail .side-links a { justify-content: center; padding: 0; }
body.rail .side-links .fade { display: none; }
.pill-ok { background: #e7f3ea; color: var(--ok); }
.rw-ic { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); margin-bottom: 12px; }
.rw-ic.sm { width: 22px; height: 22px; margin: 0 6px 0 0; vertical-align: middle; }

/* ── Rewind ─────────────────────────────────────────────────────────── */
.rw-steps .card { border-radius: 20px; }
.rw-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.rw-head .h2 { margin: 0; }
.rw-filter { margin-bottom: 16px; }
.rw-list { display: grid; gap: 10px; }
.rw-item { border-radius: 20px; overflow: hidden; }
.rw-top { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "t p" "m p"; align-items: center; gap: 2px 16px; width: 100%; padding: 16px 20px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); }
.rw-top:hover { background: var(--bg-2); }
.rw-title { grid-area: t; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rw-fold { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: #FFF3C4; color: #7A5B00; font-size: 11px; vertical-align: 2px; }
.rw-meta { grid-area: m; font-size: 13px; color: var(--muted); }
.rw-top .pill { grid-area: p; }
.rw-body { padding: 4px 20px 20px; }
.rw-body .label { margin: 14px 0 6px 4px; }
.rw-ta { height: auto; min-height: 84px; padding: 12px 16px; border-radius: 16px; resize: vertical; line-height: 1.5; }
.rw-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.rw-empty { text-align: center; }
.rw-none { padding: 12px 4px; }
.rw-private { margin-top: 20px; display: flex; align-items: center; }

/* ── Weatherology ───────────────────────────────────────────────────── */
.wx-form { max-width: 620px; margin: 0 auto; padding: 24px; }
.wx-row { display: flex; gap: 12px; align-items: flex-end; }
.wx-row .field { flex: 1; }
.wx-late { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; font-size: 13px; color: var(--ink-2); cursor: pointer; line-height: 1.4; }
.wx-late input { width: 24px; height: 24px; margin: -2px 0 0; flex: none; accent-color: var(--ink); }
.wx-fine { text-align: left; }
.wx-result { margin-top: 48px; scroll-margin-top: 80px; }
.wx-card { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 32px; border-radius: 24px; background: linear-gradient(180deg, #fdf4ef 0%, #ffffff 60%); border-color: #f0d9cd; }
.wx-glyph { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 20px; background: #fff; border: 1px solid #f0d9cd; aspect-ratio: 1; }
.wx-glyph span { font: 400 64px/1.1 var(--font-zh); color: var(--ink); letter-spacing: .04em; }
.wx-glyph small { margin-top: 6px; font-size: 13px; color: var(--muted); }
.wx-glyph small + small { margin-top: 2px; }
.wx-main .h2 { margin: 4px 0 6px; }
.wx-season { margin: 0 0 16px; font-size: 14px; }
.wx-main > p { line-height: 1.65; }
.wx-rel { margin: 18px 0; padding: 14px 16px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.wx-rel p { margin: 8px 0 0; }
.wx-q { display: flex; gap: 12px; align-items: flex-start; }
.wx-q .rw-ic { margin: 0; flex: none; }
.wx-q p { margin: 6px 0 0; font-family: var(--serif); font-size: 17px; line-height: 1.45; }
.wx-actions { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.wx-next { margin-top: 16px; }
.wx-cta { text-decoration: none; color: var(--ink); border-radius: 20px; transition: border-color var(--dur-fast) ease; }
.wx-cta:hover { border-color: var(--line-2); }
.wx-go { display: inline-block; margin-top: 10px; font-size: 14px; color: var(--accent-2); }
@media (max-width: 640px) {
  .wx-row { flex-direction: column; align-items: stretch; }
  .wx-card { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .wx-glyph { aspect-ratio: auto; padding: 20px 0; }
  .wx-glyph span { font-size: 52px; }
}

/* ── the thinking list (owner 11-18: rebuilt after Claude Code's own) ───
   top: one muted summary line with a chevron ("2 of 5 steps done ›") ·
   middle: a rounded card, one row per step, a coloured ring in front of
   each (Slack's five colours, in turn) — filled and ticked when done, dashed
   while it runs · bottom: what is happening now and how long it has taken,
   behind three clay dots. Done steps go grey, the running one stays black. */
body[data-page="app"] .ly-think { margin: 6px 0 14px; font-family: var(--sans); }
body[data-page="app"] .ly-think-head {
  all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; max-width: 100%;
  cursor: pointer; font: 400 15px/1.4 var(--sans); color: var(--muted);
}
body[data-page="app"] .ly-think-head:hover { color: var(--ink); }
body[data-page="app"] .ly-think-head:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
body[data-page="app"] .ly-think-chev { display: grid; place-items: center; width: 16px; height: 16px; transition: transform var(--dur-base) ease; }
body[data-page="app"] .ly-think-chev svg { width: 14px; height: 14px; }
body[data-page="app"] .ly-think.is-open .ly-think-chev { transform: rotate(90deg); }
body[data-page="app"] .ly-steps {
  display: none; list-style: none; margin: 8px 0 0; padding: 14px 24px; border: 1px solid #e3e3e3; border-radius: 16px; background: #fff;
}
body[data-page="app"] .ly-think.is-open .ly-steps { display: grid; gap: 2px; }
body[data-page="app"] .ly-step {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: start; column-gap: 12px; padding: 6px 0;
  font: 400 15px/1.45 var(--sans); color: var(--ink);
}
body[data-page="app"] .ly-ic { display: grid; place-items: center; width: 20px; height: 21px; }
body[data-page="app"] .ly-ic svg { width: 20px; height: 20px; overflow: visible; }
body[data-page="app"] .ly-ring { fill: none; stroke: var(--c); stroke-width: 1.5; }
body[data-page="app"] .ly-tk { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: none; }
body[data-page="app"] .ly-dot { fill: var(--c); display: none; }
body[data-page="app"] .ly-tx { min-width: 0; }
body[data-page="app"] .ly-nm { display: block; }
body[data-page="app"] .ly-gi { display: block; font-size: 13px; line-height: 1.45; color: var(--muted); margin-top: 1px; }
body[data-page="app"] .ly-gi:empty { display: none; }
body[data-page="app"] .ly-sec { font-size: 13px; line-height: 21px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* done: filled, ticked, grey words */
body[data-page="app"] .ly-step[data-st="done"] { color: var(--muted); }
body[data-page="app"] .ly-step[data-st="done"] .ly-ring { fill: var(--c); }
body[data-page="app"] .ly-step[data-st="done"] .ly-tk { display: block; }
/* running: dashed ring turning slowly, black words */
body[data-page="app"] .ly-step[data-st="run"] .ly-ring { stroke-dasharray: 3.2 2.7; stroke-width: 1.7; }
body[data-page="app"] .ly-step[data-st="run"] .ly-sec { color: var(--ink); }
/* waiting for its turn: a light ring in its colour */
body[data-page="app"] .ly-step[data-st="wait"] .ly-ring { stroke: color-mix(in srgb, var(--c) 45%, #fff); }
body[data-page="app"] .ly-step[data-st="wait"] { color: var(--ink-2); }
/* waiting for the reader: a ring with a dot in it */
body[data-page="app"] .ly-step[data-st="you"] .ly-dot { display: block; }
body[data-page="app"] .ly-step[data-st="fail"] .ly-ring { stroke: #E01E5A; }
/* the live line */
body[data-page="app"] .ly-live { display: none; align-items: center; gap: 10px; margin-top: 12px; font: 400 15px/1.4 var(--sans); color: var(--muted); }
body[data-page="app"] .ly-think.is-running .ly-live { display: flex; }
body[data-page="app"] .ly-live .ly-pc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
body[data-page="app"] .ly-live .ly-el { flex: none; font-variant-numeric: tabular-nums; }
body[data-page="app"] .ly-dots { display: none; }
body[data-page="app"] .ly-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
body[data-page="app"] .ly-dots i:nth-child(2) { animation-delay: .15s; transform: translateY(-3px); }
body[data-page="app"] .ly-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ly-dot { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (max-width: 560px) {
  body[data-page="app"] .ly-steps { padding: 10px 16px; }
  body[data-page="app"] .ly-sec { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="app"] .ly-step[data-st="run"] .ly-ic svg, body[data-page="app"] .ly-dots i { animation: none; }
}

/* ── developer view (admins only): the full reasoning under a reading ── */
.ly-devpanel { margin: 4px 0 24px; padding: 16px 18px; border: 1px dashed #c9c9c9; border-radius: 16px; background: #fafafa; font: 400 13px/1.5 var(--sans); color: var(--ink); }
.ly-dev-h { margin: 0 0 10px; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.ly-dev-gua h4 { margin: 6px 0 8px; font: 400 15px/1.4 var(--serif); }
.ly-dev-gua p { margin: 8px 0; }
.ly-dev-gua ul { margin: 4px 0 8px; padding-left: 18px; }
.ly-devpanel details { margin: 6px 0; }
.ly-devpanel summary { cursor: pointer; color: var(--ink-2); }
.ly-dev-node { margin-left: 12px; }
.ly-dev-node.is-bad > summary { color: #b42318; }
.ly-dev-pre { margin: 6px 0; padding: 10px 12px; max-height: 420px; overflow: auto; white-space: pre-wrap; word-break: break-word; background: #fff; border: 1px solid var(--line); border-radius: 10px; font: 400 12px/1.5 var(--mono); }

/* 电脑上的「Log in」（owner 11-22：「谷歌登录是不是没了」）。侧边栏默认收成窄条之后，窄条把登录提示卡藏了，
   而顶栏的账户片只在 ≤880px 出现——电脑上没登录的人找不到任何登录入口（谷歌登录本身是好的）。
   现在没登录时顶栏最右边一个黑色药丸，和内容页的「Start a casting」同一个样子；登录了就不出现（账户在侧边栏）。 */
@media (min-width: 881px) {
  .top-right .topbar-acct:not(.is-member) { display: inline-flex; order: 99; height: 36px; padding: 0 16px; margin-left: 8px; border: 0; border-radius: 999px;
    background: var(--ink); color: #fff; font: 500 13px/1 var(--sans); letter-spacing: 0; text-transform: none; }
  .top-right .topbar-acct:not(.is-member):hover { background: #2f2f2f; }
  .top-right .topbar-acct:not(.is-member) .ta-avatar { display: none; }
}

/* 灯塔（Lighthouse，owner 11-23）：侧边栏点一下，输入框进入灯塔模式——方法片换成一颗浅蓝药丸（灯塔圆标 + ×），
   框子描一圈蓝，提示改成「想往哪个方向看」。发出去之后自动退出。 */
.lh-chip { grid-area: chip; justify-self: start; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 5px;
  border: 0; border-radius: 999px; background: color-mix(in srgb, #36C5F0 22%, #fff); color: var(--ink); font: 700 13px/1 var(--sans); cursor: pointer; }
.lh-chip:hover { background: color-mix(in srgb, var(--mk-b,#36C5F0) 34%, #fff); }
.lh-chip .lh-ic { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--mk-b,#36C5F0); color: #1D1C1D; }
.lh-chip .lh-ic svg { width: 14px; height: 14px; }
.lh-chip .lh-x { font-weight: 400; font-size: 16px; opacity: .55; }
body.lh-mode #methodChip { display: none; }
body.lh-mode .composer { border-color: #36C5F0; box-shadow: 0 0 0 3px color-mix(in srgb, var(--mk-b,#36C5F0) 24%, transparent); }
#lhBtn svg { color: #1D9BD1; }
/* 灯塔模式下输入框上方的说明卡：它是干什么的、会给你什么、不做什么、花多少，加三个可以直接点的例子。
   首页上它顶替问候语的位置（问候语和它的手写标记先藏起来，高度差不多，输入框和四周的纸条几乎不动）；
   首页的输入框区域是 pointer-events:none（好让后面的纸条能悬停），卡片得自己把点击要回来。 */
body.lh-mode.is-empty .hero-empty, body.lh-mode .look-title { display: none !important; }
.lh-card { pointer-events: auto; position: relative; z-index: 3; margin: 0 0 12px; padding: 16px 18px; border-radius: 16px; background: var(--surface, #fff);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .05), inset 0 0 0 1px color-mix(in srgb, #36C5F0 45%, transparent); text-align: left; }
.lh-card-h { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font: 700 15px/1.3 var(--sans); color: var(--ink); }
.lh-card-h .lh-ic { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--mk-b,#36C5F0); color: #1D1C1D; }
.lh-card-h .lh-ic svg { width: 15px; height: 15px; }
.lh-card-b { margin: 0 0 12px; font: 400 14px/1.6 var(--sans), "ChelriaPunct-Sans", var(--font-zh), sans-serif; color: var(--ink-2); }
.lh-ex { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── plans (owner 11-23: plan icons, feature icons, new colours, the same everywhere) ─────────────────────────────
   Each plan has one colour and one icon (account.js PLAN_LOOK): Free green · one coin, Pro blue · three coins,
   Premium aubergine · the hexagram. A card opens with a square block in its colour (the reading's label style);
   features carry their own icon in a tinted circle; buttons are pills. planBadge() shows the same colour and icon
   wherever a plan is named. */
.plan-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; background: color-mix(in srgb, var(--pc) 18%, #fff);
  color: var(--ink); font: 600 13px/1.3 var(--sans); white-space: nowrap; vertical-align: middle; }
.plan-badge .pb-ic { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--pc); color: var(--pi); }
.plan-badge .pb-ic svg { width: 13px; height: 13px; }
.plan-badge.is-small { padding: 1px 8px 1px 2px; font-size: 12px; gap: 5px; }
.plan-badge.is-small .pb-ic { width: 16px; height: 16px; }
.plan-badge.is-small .pb-ic svg { width: 11px; height: 11px; }
.side-foot i .plan-badge { font-style: normal; }

.plan { --pc: #2EB67D; --pi: #1D1C1D; padding: 0 0 24px; overflow: hidden; border-radius: 16px; }
.plan[data-plan="pro"] { --pc: #36C5F0; --pi: #1D1C1D; }
.plan[data-plan="premium"] { --pc: #4A154B; --pi: #FFFFFF; }
.plan > *:not(.plan-top) { margin-left: 24px; margin-right: 24px; }
.plan .plan-top > * { order: 0; }
.plan .plan-top { order: 0; position: relative; display: flex; align-items: center; gap: 12px; margin: 0 0 20px; padding: 18px 24px; background: var(--pc); color: var(--pi); }
.plan .plan-top .plan-name { margin: 0; font: 400 28px/1.1 var(--serif); color: var(--pi); }
.plan .plan-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--pi) 16%, transparent); color: var(--pi); }
.plan .plan-ic svg { width: 22px; height: 22px; }
.plan .plan-tag { margin-left: auto; padding: 4px 10px; border-radius: 2px; background: #ECB22E; color: #1D1C1D; font: 700 12px/1.3 var(--sans); letter-spacing: .04em; }
.plan.featured { border-color: var(--line); background: var(--surface, #fff); box-shadow: 0 0 0 2px var(--pc); }
.plan.featured .plan-name::after { content: none; }
.plan .btn { border-radius: 999px; width: auto; align-self: stretch; }
.plan .btn-dark, .plan.featured .btn-dark { background: var(--pc); color: var(--pi); border-color: transparent; }
.plan .btn-dark:hover, .plan.featured .btn-dark:hover { background: color-mix(in srgb, var(--pc) 85%, #000); }
.plan .btn-line { background: color-mix(in srgb, var(--ink) 6%, transparent); border-color: transparent; }
.plan .btn[disabled] { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted); }
.plan li { display: flex; align-items: flex-start; gap: 10px; padding-left: 0; margin: 10px 0; }
.plan li::before { content: none; }
.plan li .fi, table.compare th .fi { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--pc, #1D1C1D) 22%, #fff); color: #1D1C1D; }
.plan li .fi svg, table.compare th .fi svg { width: 14px; height: 14px; }
table.compare tbody th { display: flex; align-items: center; gap: 10px; --pc: #36C5F0; }

/* ── the guide (owner 11-23: "how to use" → Guide, an interactive walkthrough of the product as it is now) ───────────
   One step at a time, each with something to try. The pills, colour marks and line colours are the reading page's
   own (reading.css scopes them to the app page, so the few the guide shows are repeated here for .gd only). */
.gd { max-width: 760px; margin: 0 auto; }
.gd-head { margin: 0 0 24px; }
.gd-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.gd-steps button { min-height: 36px; padding: 6px 14px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); font: 600 13px/1.2 var(--sans); cursor: pointer; }
.gd-steps button.on { background: var(--ink); color: #fff; }
.gd-steps button.seen:not(.on) { background: color-mix(in srgb, #2EB67D 22%, #fff); }
.gd-step { display: none; }
.gd-step.on { display: block; animation: gd-in .3s ease-out both; }
@keyframes gd-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.gd-n { margin: 0 0 4px; font: 700 12px/1.4 var(--sans); letter-spacing: .06em; color: var(--muted); }
.gd-step h2 { margin: 0 0 12px; font: 400 28px/1.2 var(--serif); }
.gd-step > p { max-width: 640px; font-size: 16px; line-height: 1.65; }
.gd-demo { margin: 20px 0 8px; padding: 20px; border-radius: 16px; background: var(--surface, #fff); box-shadow: 0 2px 10px rgba(0,0,0,.05), inset 0 0 0 1px var(--line); }
.gd-k { margin: 0 0 12px; font: 600 14px/1.4 var(--sans); }
.gd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.gd-say { margin: 4px 0 0; min-height: 1.5em; font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.gd-say.good b { color: #1f8a5c; } .gd-say.warn b { color: #b8135f; }
.gd :is(.ly-btn, .ly-opt, .ly-chip) { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 16px 6px 10px; border: 0; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); font: 700 13px/1.3 var(--sans); text-decoration: none; text-align: left; cursor: pointer; }
.gd :is(.ly-btn, .ly-opt, .ly-chip):hover { background: color-mix(in srgb, var(--ink) 11%, transparent); }
.gd :is(.ly-btn, .ly-chip)::before { content: "+"; flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--mk-b,#36C5F0); color: #1D1C1D; font: 700 13px/1 var(--sans); }
.gd .ly-btn[data-act="toss"]::before, .gd .ly-btn[data-act="run"]::before { content: "\25B6"; font-size: 9px; background: var(--mk-c,#2EB67D); }
.gd .ly-btn[data-act="skip"]::before { content: "?"; background: var(--mk-a,#ECB22E); }
.gd .ly-btn[data-act="full"]::before, .gd .gd-start::before, .gd .gd-next::before { content: "\2192"; background: var(--mk-c,#2EB67D); }
.gd .gd-prev::before { content: "\2190"; background: color-mix(in srgb, var(--ink) 14%, #fff); }
.gd .gd-demo-go::before { content: "\25B6"; font-size: 9px; background: #E01E5A; color: #fff; }
.gd .gd-lh::before { content: ""; background: var(--mk-b,#36C5F0) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D1C1D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.6 9h4.8l1.2 11H8.4z'/%3E%3Cpath d='M9.2 9 12 5.2 14.8 9'/%3E%3Cpath d='M6.5 20.5h11'/%3E%3C/svg%3E") center / 13px no-repeat; }
.gd .gd-pr::before { content: "$"; background: var(--mk-a,#ECB22E); }
.gd .gd-rw::before { content: "\21BA"; background: #4A154B; color: #fff; }
.gd .ly-opt { padding: 6px 16px; font-weight: 500; }
.gd .ly-opt.is-on { background: var(--ink); color: #fff; }
.gd .mk { padding: .04em .14em; border-radius: 2px; font-weight: 700; }
.gd .mk-lead { background: color-mix(in srgb, #ECB22E 48%, #fff); } .gd .mk-pro, .gd .mk-so { background: color-mix(in srgb, #2EB67D 34%, #fff); }
.gd .mk-con { background: color-mix(in srgb, #E01E5A 26%, #fff); } .gd .mk-key { background: color-mix(in srgb, #36C5F0 40%, #fff); }
.gd .mk-sym, .gd .gd-red { background: none; color: #E01E5A; font-weight: 600; text-decoration: underline solid rgba(224,30,90,.35); text-underline-offset: 3px; }
.gd-mk { border: 0; background: none; padding: 4px 6px; border-radius: 8px; font: 400 14px/1.4 var(--sans); color: var(--ink-2); cursor: pointer; }
.gd-mk.on { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.gd-sample p { margin: 0 0 10px; font-size: 16px; line-height: 1.7; }
.gd-sample.focus .mk:not(.lit) { background: none; font-weight: 400; }
.gd-sample .mk { transition: background-color .2s ease; }
.gd-cast { display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: center; }
.gd-hex { width: 120px; height: 108px; }
/* the toss plays by itself (owner 11-24): each line drops in, colours come up once all six have landed, then it clears */
.gd-hex rect { fill: #1D1C1D; transition: fill .6s cubic-bezier(.2,.7,.2,1); }
.gd-hex .ln { opacity: 0; transform: translateY(-14px) scaleX(.82); transform-box: fill-box; transform-origin: 50% 50%;
  transition: opacity .5s cubic-bezier(.2,.7,.2,1), transform .62s cubic-bezier(.16,.9,.24,1.08); will-change: transform, opacity; }
.gd-hex .ln.in { opacity: 1; transform: none; }
.gd-hex.out .ln { opacity: 0; transform: translateY(6px); transition-duration: .45s; transition-timing-function: ease-in; }
.gd-hex.lit .self rect { fill: #C9663F; } .gd-hex.lit .resp rect { fill: #1D9BD1; } .gd-hex.lit .mv rect { fill: #2EB67D; }
.gd-key { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.gd-key i { width: 18px; height: 5px; border-radius: 3px; }
.gd-run { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.gd-run li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; font-size: 15px; line-height: 1.45; }
.gd-run .r { width: 18px; height: 18px; border-radius: 50%; border: 1.6px dashed var(--c); margin-top: 1px; }
.gd-run li.run .r { animation: gd-spin 2.4s linear infinite; }
.gd-run li.done .r { border-style: solid; background: var(--c); }
.gd-run .f { display: block; font-size: 13px; color: var(--muted); min-height: 1.45em; }
.gd-run .f.new { animation: gd-f-in .4s cubic-bezier(.2,.7,.2,1) both; }
@keyframes gd-f-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.gd-run li .r { transition: background-color .35s ease, border-color .35s ease; }
@keyframes gd-spin { to { transform: rotate(360deg); } }
.gd-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 0; }
.gd-dots { display: flex; gap: 6px; } .gd-dots i { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 18%, transparent); } .gd-dots i.on { background: var(--ink); }
@media (max-width: 560px) { .gd-cast { grid-template-columns: 1fr; } .gd-step h2 { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { .gd-step.on, .gd-run li.run .r { animation: none; } }
/* the header's "Start a casting" pill pushed a 390px page to 490px wide (a sideways scroll on every content page);
   below 520px it goes — the logo already goes home, and every page has its own "Start a reading" */
@media (max-width: 520px) { .site-head > .btn { display: none; } }
/* ── pricing cards = small product covers (owner 11-23: "pricing页的三个box设计和我准备的图哪怕有一点关联吗").
   The covers going up on Creem are pale paper with a soft glow of the plan's colours, the plan's mark on a disc,
   the name in BioRhyme with a highlighter swipe and a hand underline, a big price, a ticket stub (monthly) or a
   calendar page (yearly), and pinned paper strips. A card here is the same sheet, so the page and the checkout
   look like one thing. Colours per plan, as on the covers: Free green, Pro blue + yellow, Premium gold + aubergine. */
.grid-3 .plan { --pb: #1D1C1D; --pt: #FFFFFF; --hl: #2EB67D; --ul: #1D1C1D; --g1: rgba(46,182,125,.16); --g2: rgba(236,178,46,.12); }
.grid-3 .plan[data-plan="pro"] { --hl: #36C5F0; --ul: #ECB22E; --g1: rgba(54,197,240,.22); --g2: rgba(236,178,46,.14); }
.grid-3 .plan[data-plan="premium"] { --pb: #4A154B; --hl: #ECB22E; --ul: #4A154B; --g1: rgba(236,178,46,.18); --g2: rgba(74,21,75,.14); }
.grid-3 .plan.card {
  position: relative; overflow: visible; border: 0; border-radius: 4px; padding: 28px 0 24px; color: #1D1C1D;
  background:
    radial-gradient(90% 60% at 22% 8%, var(--g1), transparent 72%),
    radial-gradient(80% 60% at 84% 96%, var(--g2), transparent 70%),
    #F7F6F2;
  box-shadow: 0 1px 1.5px rgba(0,0,0,.16), 0 6px 18px -6px rgba(0,0,0,.14);
}
.grid-3 .plan.card::after {   /* the paper's grain, as on the covers */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .32; mix-blend-mode: soft-light;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 160px;
}
.grid-3 .plan.featured { transform: none; box-shadow: 0 1px 1.5px rgba(0,0,0,.18), 0 12px 28px -8px rgba(0,0,0,.2); }
.grid-3 .plan .plan-top { background: none; color: #1D1C1D; padding: 0 24px; margin: 0 0 18px; gap: 14px; }
.grid-3 .plan .plan-ic { width: 48px; height: 48px; background: var(--pc); color: var(--pi); box-shadow: 0 2px 3px rgba(0,0,0,.14), 0 6px 14px rgba(0,0,0,.06); }
.grid-3 .plan .plan-ic svg { width: 28px; height: 28px; }
/* the name: BioRhyme, a highlighter swipe across its lower half, a hand underline below */
.grid-3 .plan .plan-top .plan-name { position: relative; isolation: isolate; color: #1D1C1D; font: 400 34px/1.05 var(--serif); font-variation-settings: "wght" 640; font-weight: 640; letter-spacing: -.03em; padding-bottom: 10px; }
.grid-3 .plan .plan-name::before { content: ""; position: absolute; z-index: -1; left: -.06em; right: -.05em; top: 46%; bottom: 26%; background: var(--hl); opacity: .62; clip-path: polygon(0 16%, 100% 4%, 102% 92%, -2% 100%); }
.grid-3 .plan .plan-name::after { content: ""; position: absolute; left: -2px; right: -10px; bottom: 0; height: 10px; background: var(--ul);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6.5C30 9 70 4 112 6q5 0 6-4' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6.5C30 9 70 4 112 6q5 0 6-4' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat; }
/* the price, big, as on the covers, with its stub beside it */
.grid-3 .plan .price { position: relative; align-items: baseline; margin-bottom: 6px; min-height: 64px; }
.grid-3 .plan .price b { color: #1D1C1D; font: 640 56px/1 var(--serif); font-variation-settings: "wght" 640; letter-spacing: -.04em; }
.grid-3 .plan .price .cur { color: #1D1C1D; font-size: 18px; margin: 6px -4px 0 0; }
.grid-3 .plan .price span.period { color: #1D1C1D; opacity: .78; font-size: 14px; max-width: none; white-space: nowrap; }
.grid-3 .plan :is(.plan-desc, li) { color: #1D1C1D; }
.grid-3 .plan .grant { color: #1D1C1D; opacity: .72; }
.grid-3 .plan li .fi { background: color-mix(in srgb, var(--pc) 24%, #fff); color: #1D1C1D; }
.grid-3 .plan[data-plan="premium"] li .fi { background: color-mix(in srgb, #ECB22E 34%, #fff); }
.grid-3 .plan :is(.btn-dark, .btn-line), .grid-3 .plan.featured .btn-dark { background: var(--pb); color: var(--pt); }
.grid-3 .plan :is(.btn-dark, .btn-line):hover, .grid-3 .plan.featured .btn-dark:hover { background: color-mix(in srgb, var(--pb) 84%, #fff); }
.grid-3 .plan .btn.btn[disabled] { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(29,28,29,.32); color: #1D1C1D; opacity: .7; cursor: default; }
/* ticket stub (monthly) / calendar page (yearly): the same two pieces the covers use to say "monthly" and "annual".
   Scoped under .price because the old `.plan .price span` (12px, max-width 4.5em) otherwise squeezes every span in them. */
.grid-3 .plan .price :is(.pc-stub, .pc-cal), .grid-3 .plan .price :is(.pc-stub, .pc-cal) span { max-width: none; line-height: 1.1; }
.grid-3 .plan .price :is(.pc-stub, .pc-cal) span { color: inherit; }
.grid-3 .plan .price .pc-stub { position: absolute; right: 0; top: 50%; transform: translateY(-50%) rotate(-3deg); display: flex; height: 50px; font-family: var(--sans); color: #1D1C1D;
  filter: drop-shadow(0 1px 1.2px rgba(0,0,0,.2)) drop-shadow(0 3px 6px rgba(0,0,0,.06)); }
.grid-3 .plan .price .pc-stub .n { min-width: 40px; padding: 0 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--pc); color: var(--pi); font: 640 20px/1 var(--serif); font-variation-settings: "wght" 640; }
.grid-3 .plan .price .pc-stub .n small, .grid-3 .plan .price .pc-stub .k { font: 400 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.grid-3 .plan .price .pc-stub .n small { margin-top: 3px; }
.grid-3 .plan .price .pc-stub .b { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 10px; background: #FBF9F4; }
.grid-3 .plan .price .pc-stub .b .k { opacity: .72; }
.grid-3 .plan .price .pc-stub .b .v { font-size: 12px; }
.grid-3 .plan .price .pc-cal { display: none; position: absolute; right: 2px; top: 50%; transform: translateY(-50%) rotate(3deg); width: 64px; text-align: center; color: #1D1C1D;
  filter: drop-shadow(0 1px 1.2px rgba(0,0,0,.2)) drop-shadow(0 3px 6px rgba(0,0,0,.06)); }
.grid-3 .plan .price .pc-cal::before { content: ""; display: block; height: 9px; background: #1D1C1D; }
.grid-3 .plan .price .pc-cal div { background: #FBF9F4; padding: 4px 0 6px; }
.grid-3 .plan .price .pc-cal .k { display: block; font: 400 10px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--cal, #1D9BD1); }
.grid-3 .plan .price .pc-cal b { display: block; font: 640 26px/1 var(--serif); font-variation-settings: "wght" 640; letter-spacing: -.04em; margin: 2px 0 1px; }
.grid-3 .plan .price .pc-cal i { font: 400 10px/1 var(--sans); font-style: normal; }
.grid-3[data-cycle="annual"] .plan[data-plan="pro"] .pc-stub, .grid-3[data-cycle="annual"] .plan[data-plan="premium"] .pc-stub { display: none; }
.grid-3[data-cycle="annual"] .plan .price .pc-cal { display: block; }
.grid-3 .plan[data-plan="premium"] .pc-cal { --cal: #4A154B; }
/* a pinned paper strip, square like the tappers: "Popular" on Pro, one line on each other card */
.pc-strip { position: absolute; z-index: 2; top: -12px; right: 18px; padding: 4px 10px 5px; font: 400 13px/1.25 var(--sans); white-space: nowrap; background: var(--sf, #ECB22E); color: var(--si, #1D1C1D);
  rotate: 3deg; filter: drop-shadow(0 1px 1.2px rgba(0,0,0,.2)) drop-shadow(0 3px 6px rgba(0,0,0,.06)); }
.pc-strip::before { content: ""; position: absolute; left: 12px; top: -6px; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.75) 0 12%, transparent 30%), radial-gradient(circle at 50% 55%, #E01E5A 0 58%, #8d1238 100%); box-shadow: 1px 2px 2px rgba(0,0,0,.3); }
.pc-strip.is-ink { --sf: #1D1C1D; --si: #fff; rotate: -2deg; }
.pc-strip.is-plum { --sf: #4A154B; --si: #fff; rotate: -1.5deg; top: -16px; }
.pc-strip.is-ink::before, .pc-strip.is-plum::before { content: none; }
.grid-3 .plan .plan-tag { display: none; }
@media (max-width: 400px) { .grid-3 .plan .price b { font-size: 48px; } }
/* the allowance, shown as a pile of questions (owner 11-23: "1 4 10 模拟额度增多 能问的问题增多", "上下左右都给放点",
   then "试试" the pile): each card sits on the questions its plan holds. Free one slip peeking out, Pro four, Premium
   ten spilling out above and below in two layers, past the corners, in three sizes (18 / 15 / 12, the home page's ladder, smaller further out), in the
   plan's own colours, all horizontal. The slips are under the card (z-index -1 inside the grid's own layer), so the
   card's words always sit on top. --out is how far a slip sticks out past the card's edge: the front row ~28px
   (tucked a few px under it), the back row ~54px (behind the front row, its words just clearing it). Side slips were
   tried and dropped: in a 16-44px gap they show 'Wh' and 'ow?', fragments, not questions.
   The card must not be a stacking context (no container-type, transform, filter or isolation on it), or the slips
   would paint over its paper instead of under it. */
.grid-3:has(.pc-q) { position: relative; z-index: 0; isolation: isolate; column-gap: 40px; margin-top: 72px; margin-bottom: 72px; }   /* pile() sets the real top, bottom and stacked row gaps */
.grid-3[data-cycle] .plan.featured { transform: none; }
.grid-3 .plan[data-plan="free"] .price .pc-stub { transform: translateY(-50%); filter: none; box-shadow: inset 0 0 0 1px rgba(29,28,29,.12); }
.pc-q { position: absolute; z-index: -1; margin: 0 !important; display: flex; flex-direction: column; align-items: flex-start; font: 400 14px/1.25 var(--sans); white-space: nowrap; color: var(--qi, #1D1C1D); }
.pc-q i { display: block; font-style: normal; padding: 3px 9px 4px; background: var(--qf); box-shadow: 0 1px 1.5px rgba(0,0,0,.2), 0 4px 10px -4px rgba(0,0,0,.14); }
.pc-q i + i { margin: -1px 0 0 .9em; }   /* two strips, two lengths, the second set in a little: a tapper */
.pc-q.is-M { font-size: 16px; } .pc-q.is-S { font-size: 13px; }
.grid-3 .plan[data-plan="premium"] .pc-q.is-M { font-size: 15px; } .grid-3 .plan[data-plan="premium"] .pc-q.is-S { font-size: 12px; }
/* the pin goes through a strip, on the part that shows: the first strip on a slip above the card, the last below it */
.pc-q i { position: relative; }
.pc-q.is-pin[data-side="top"] i:first-child::before, .pc-q.is-pin[data-side="bottom"] i:last-child::before { content: ""; position: absolute; left: -4px; top: -5px; width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(255,255,255,.75) 0 12%, transparent 30%), radial-gradient(circle at 50% 55%, #E01E5A 0 58%, #8d1238 100%); box-shadow: 1px 2px 2px rgba(0,0,0,.3); }
.pc-q.is-green { --qf: #2EB67D; } .pc-q.is-blue { --qf: #36C5F0; } .pc-q.is-yellow { --qf: #ECB22E; } .pc-q.is-gold { --qf: #E3B341; }
.pc-q.is-pink { --qf: #E01E5A; --qi: #fff; } .pc-q.is-plum { --qf: #4A154B; --qi: #fff; } .pc-q.is-ink { --qf: #1D1C1D; --qi: #fff; }
.pc-q.is-white { --qf: #FFFFFF; }
/* one column (phone): the sides have 16px to the screen edge, so a side slip shows a sliver, not a sentence */
/* a narrow card (three across below ~1240px, or a very small phone) has no room beside the price for the whole stub: it keeps its number only.
   A media query, not a container query: container-type would make the card a stacking context and put the pile on top of it. */
.grid-3 .plan.card { container-type: normal; }
@media (min-width: 901px) and (max-width: 1240px), (max-width: 380px) { .grid-3 .plan .price .pc-stub .b { display: none; } .grid-3 .plan .price b { font-size: 46px; } }
/* guide · the Rewind demo (owner 11-23): select words, Add to Rewind, the list with its + */
.gd .gd-rw-text { margin: 8px 0 10px; font: 400 15px/1.6 var(--sans); }
.gd .gd-rw-text mark.rw-mark { background: linear-gradient(transparent 52%, rgba(236,178,46,.55) 52%); color: inherit; }
.gd .gd-rw-list { margin-top: 12px; max-width: 320px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 5%, transparent); padding: 4px; }
.gd .gd-rw-h { all: unset; cursor: pointer; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; font: 700 13px/1.2 var(--sans); }
.gd .gd-rw-h b { flex: 1; }
.gd .gd-rw-n { min-width: 20px; height: 20px; border-radius: 999px; display: inline-grid; place-items: center; font: 700 11px/1 var(--sans); background: color-mix(in srgb, var(--ink) 9%, transparent); }
.gd .gd-rw-pm { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--mk-b,#36C5F0); font: 700 14px/1 var(--sans); }
.gd .gd-rw-it { padding: 6px 10px 10px; }
.gd .gd-rw-it p { margin: 0; font: 400 13px/1.4 var(--sans); }
.gd .gd-rw-it small { color: var(--muted); font-size: 11px; }
.gd .gd-card .ly-btn[disabled] { opacity: .4; pointer-events: none; }

/* the home page says, in its own words, that every reading is written by AI (owner 11-27) */
.greeting:has(.hero-ai) { flex-wrap: wrap; }
/* a small strip, not a paragraph (owner 11-27: 「不能喧宾夺主 就在旁边一小条申明即可 不大不小」; 「ai句不用有ai圆标」):
   one line of text in the same quiet pill as the Rewind strip, no mark */
.hero-ai { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; margin: 18px auto 0; padding: 5px 14px;
  border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); font: 400 12.5px/1.3 var(--sans), var(--font-zh), sans-serif;
  color: color-mix(in srgb, var(--ink) 80%, transparent); }
.greeting:has(.hero-ai) .hero-ai { flex-basis: auto; }
.greeting:has(.hero-ai)::after { content: ""; flex: 0 0 100%; order: 1; height: 0; }
.greeting .hero-ai { order: 2; }
body:not(.is-empty) .hero-ai { display: none; }
body.is-empty #methodNote .mn-ai { display: none; }   /* the strip says the AI half; under the box only "for reflection, not advice" */
@media (max-width: 640px) { .hero-ai { font-size: 11.5px; margin-top: 12px; max-width: calc(100vw - 32px); } }

/* letters in a round avatar sit at the optical centre (owner 11-27: 圆里的符号要居中). Spinnaker's capitals ride about
   about .09em high in a line box; a top pad of twice that brings them down to the middle (measured: tests/circles.cjs). */
.av, .ta-avatar { box-sizing: border-box; padding-top: .18em; }   /* .avatar already sets line-height 1 and sits true */

/* the Guide's demo pills: the same centred, drawn + as the reading page (owner 11-27, tests/circles.cjs) */
.gd :is(.ly-btn, .ly-chip) { padding-left: 8px !important; }
.gd :is(.ly-btn:not([data-act]), .ly-chip)::before { content: "" !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 1.2v7.6M1.2 5h7.6' stroke='%231D1C1D' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: 10px 10px; }
/* a round badge and the icon in it move as one picture: on a row that starts a fraction of a pixel down, the badge's
   edge is smoothed but the icon snaps to whole pixels, and on phones it landed up to 1px off centre. Drawn as one
   layer they cannot part (owner 11-27: 圆里的符号要居中; tests/circles.cjs). */
.plan li .fi, table.compare th .fi, .plan .plan-ic { will-change: transform; }

/* the sidebar holding up in a short window (owner 11-27: 「前端的各板块有点崩」, screenshot of the open sidebar):
   the top links never squeeze into the line under the logo; the history list scrolls on a thin bar with no arrow
   buttons, fading at its edges; the × on a history row shows only on hover or for the open reading (always on touch);
   the units card loses its footnote and some padding when height runs short, so the list keeps room. */
.sidebar .new-cast, .sidebar .side-links, .sidebar .side-links > * { flex-shrink: 0; }
.sidebar .side-top + * { margin-top: 8px; }
.castings { min-height: 96px; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--ink) 22%, transparent) transparent;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10px, #000 calc(100% - 14px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 10px, #000 calc(100% - 14px), transparent 100%); }
.castings::-webkit-scrollbar { width: 6px; }
.castings::-webkit-scrollbar-button { display: none; height: 0; }
.castings::-webkit-scrollbar-track { background: transparent; }
.castings::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 3px; }
@media (hover: hover) {
  .castings .casting-del { opacity: 0; transition: opacity var(--dur-fast); }
  .castings .casting-row:hover .casting-del, .castings .casting-row.active .casting-del, .castings .casting-del:focus-visible { opacity: 1; }
}
@media (max-height: 760px) {
  .ledger { padding: 10px 12px; }
  .ledger .ledger-cap { display: none; }
  .ledger-bal { margin: 4px 0 6px; }
}
