/* Sapere — styles (Part 1 search + Part 2 memory + Part 3 Pro + Part 4 the Sapere Engine)
   Serious and calm, never dull. Blue = the app; gold = what has become yours. */

:root {
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", "Noto Serif", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* light (cool paper, matches the icon) */
  --bg: #f4f6fb;
  --bg-2: #e9edf5;
  --surface: #ffffff;
  --line: rgba(15, 20, 32, .10);
  --line-2: rgba(15, 20, 32, .18);
  --text: #0f1420;
  --muted: #55607a;
  --faint: #8590a8;
  --accent: #1d5fe0;
  --accent-2: #3b7cf5;
  --accent-soft: rgba(59, 124, 245, .14);
  --blue: #2f6fe0;
  --blue-soft: rgba(47, 111, 224, .12);
  --gold: #a8781e;
  --gold-soft: rgba(201, 150, 47, .16);
  --danger: #c2412c;
  --on-accent: #ffffff;
  --settled: #1f7a4d;
  --debated: #c25a2c;
  --unknown: #6b4fc2;
  --shadow: 0 1px 2px rgba(20, 24, 30, .05), 0 10px 30px -12px rgba(20, 24, 30, .18);
  --glow: 0 0 0 4px rgba(59, 124, 245, .20);
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .4, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --dark: 1; }
}
:root[data-theme="dark"] { --dark: 1; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060a14; --bg-2: #0b1020; --surface: #0f1628;
    --line: rgba(205, 220, 255, .10); --line-2: rgba(205, 220, 255, .18);
    --text: #e8edf8; --muted: #93a0bd; --faint: #66728f;
    --accent: #4ea1ff; --accent-2: #8cc4ff; --accent-soft: rgba(78, 161, 255, .16);
    --blue: #4ea1ff; --blue-soft: rgba(78, 161, 255, .14);
    --gold: #e2b65c; --gold-soft: rgba(226, 182, 92, .16); --danger: #ff7a66; --on-accent: #04101f;
    --settled: #5fd39a; --debated: #ff8f70; --unknown: #b79cff;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 14px 40px -14px rgba(0,0,0,.7);
    --glow: 0 0 0 4px rgba(78, 161, 255, .18);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #060a14; --bg-2: #0b1020; --surface: #0f1628;
  --line: rgba(205, 220, 255, .10); --line-2: rgba(205, 220, 255, .18);
  --text: #e8edf8; --muted: #93a0bd; --faint: #66728f;
  --accent: #4ea1ff; --accent-2: #8cc4ff; --accent-soft: rgba(78, 161, 255, .16);
  --blue: #4ea1ff; --blue-soft: rgba(78, 161, 255, .14);
  --gold: #e2b65c; --gold-soft: rgba(226, 182, 92, .16); --danger: #ff7a66; --on-accent: #04101f;
  --settled: #5fd39a; --debated: #ff8f70; --unknown: #b79cff;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 14px 40px -14px rgba(0,0,0,.7);
  --glow: 0 0 0 4px rgba(78, 161, 255, .18);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--blue-soft), transparent 60%),
    var(--bg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
button { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: var(--accent-soft); }

/* ---------- top bar ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top));
}
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); }
.mark { width: 30px; height: 30px; border-radius: 9px; display: block; box-shadow: 0 0 0 1px var(--line), 0 0 18px -4px var(--blue); }
.wordmark { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: .005em; font-variation-settings: "opsz" 48; }
.top-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid transparent;
  background: transparent; cursor: pointer; display: grid; place-items: center;
  color: var(--muted); transition: background .2s, color .2s, border-color .2s;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--surface); border-color: var(--line); color: var(--text); }
.icon-btn:active { transform: scale(.96); }
.ic-moon { display: none; }
:root[data-theme="dark"] .ic-sun { display: none; }
:root[data-theme="dark"] .ic-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ic-sun { display: none; }
  :root:not([data-theme="light"]) .ic-moon { display: block; }
}

.setup-banner {
  margin: 0 16px 8px; padding: 10px 14px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--accent); color: var(--text); font-size: 14px;
}
.setup-banner code { font-family: var(--mono); font-size: 13px; background: var(--surface); padding: 1px 6px; border-radius: 6px; }

/* ---------- main ---------- */
main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px 40px; }
main.has-answer { max-width: 760px; }
@media (min-width: 900px) { main.has-answer { max-width: 1040px; } }

/* hero */
.hero { text-align: center; padding: clamp(28px, 10vh, 96px) 0 18px; }
.hero-title {
  font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 9vw, 64px);
  line-height: 1.02; margin: 0 0 12px; letter-spacing: -.015em; font-variation-settings: "opsz" 144;
}
.hero-title em { font-style: italic; color: var(--accent); }
.hero-sub { margin: 0; color: var(--muted); font-size: 16px; }
main.has-answer .hero { display: none; }

/* ask box */
.ask { margin: 10px 0 0; position: sticky; top: 0; z-index: 5; padding: 8px 0 6px; background: linear-gradient(var(--bg) 80%, transparent); }
main:not(.has-answer) .ask { position: static; background: none; }
.ask-box {
  position: relative; display: flex; align-items: flex-end; gap: 8px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 26px;
  padding: 8px 8px 8px 18px; box-shadow: var(--shadow);
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
main:not(.has-answer) .ask-box { animation: breathe 4.5s ease-in-out infinite; }
.ask-box:focus-within { border-color: var(--accent); box-shadow: var(--shadow), var(--glow); animation: none; }
.ask-box textarea {
  flex: 1; resize: none; border: 0; outline: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 17px; line-height: 1.45; padding: 8px 0; max-height: 160px;
}
.ask-box textarea::placeholder { color: var(--faint); }
.ask-btn {
  flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: var(--on-accent); display: grid; place-items: center;
  transition: transform .2s var(--spring), background .2s, opacity .2s;
}
.ask-btn svg { width: 20px; height: 20px; }
.ask-btn:hover { transform: scale(1.06); background: var(--accent-2); }
.ask-btn:active { transform: scale(.94); }
.ask-btn[disabled] { opacity: .5; cursor: default; transform: none; }
.ask-hint { display: flex; justify-content: space-between; color: var(--faint); font-size: 12.5px; padding: 8px 16px 0; }
.ask-hint .count:empty { display: none; }
main.has-answer .ask-hint { display: none; }

/* suggestions */
.suggest { margin-top: 22px; }
main.has-answer .suggest { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  border: 1px solid var(--line-2); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 8px 14px; font-size: 14px; cursor: pointer;
  transition: all .2s var(--ease); animation: rise .5s var(--ease) both;
}
.chip:nth-child(2) { animation-delay: .06s } .chip:nth-child(3) { animation-delay: .12s } .chip:nth-child(4) { animation-delay: .18s }
.chip:hover { border-color: var(--accent); color: var(--text); background: var(--accent-soft); transform: translateY(-1px); }
.recent { margin-top: 28px; }
.recent-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; text-align: center; }
.recent-list { display: flex; flex-direction: column; gap: 4px; }
.recent-item {
  text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 10px 4px;
  color: var(--muted); cursor: pointer; font-family: var(--serif); font-size: 17px; display: flex; justify-content: space-between; gap: 10px;
}
.recent-item:hover { color: var(--text); }
.recent-item span:last-child { color: var(--faint); font-family: var(--sans); font-size: 13px; flex: none; }

/* ---------- answer ---------- */
.answer { margin-top: 18px; }
.asked {
  font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 5.6vw, 34px); line-height: 1.18;
  margin: 10px 0 18px; letter-spacing: -.01em; animation: rise .5s var(--ease) both; font-variation-settings: "opsz" 72;
}

.thinking { display: flex; flex-direction: column; gap: 10px; padding: 6px 0 16px; }
.thinking[hidden] { display: none; }
.thread { height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; position: relative; }
.thread i {
  position: absolute; inset: 0; width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: thread 1.4s var(--ease) infinite;
}
.thinking-text { color: var(--muted); font-size: 14px; }

/* depth toggle */
.depths { animation: rise .5s var(--ease) both; }
.seg {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; gap: 0;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: 14px;
}
.seg-btn {
  position: relative; z-index: 1; border: 0; background: transparent; cursor: pointer; padding: 7px 18px;
  border-radius: 999px; color: var(--muted); font-weight: 500; font-size: 14px; transition: color .2s;
}
.seg-btn.is-on { color: var(--text); }
.seg-pill {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow); transition: transform .35s var(--spring);
}
.seg[data-depth="technical"] .seg-pill { transform: translateX(100%); }
@media (min-width: 900px) { .seg { display: none; } }

.depth-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.depth { display: none; animation: fade .3s var(--ease) both; }
.depth.is-on { display: block; }
@media (min-width: 900px) {
  .depth-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .depth { display: block; }
  .depth::before {
    content: attr(data-label); display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
    color: var(--faint); margin-bottom: 8px;
  }
  .depth-technical { border-left: 1px solid var(--line); padding-left: 28px; }
}

/* prose */
.prose { font-family: var(--serif); font-size: 19px; line-height: 1.55; font-variation-settings: "opsz" 18; }
.depth-technical .prose { font-family: var(--sans); font-size: 16px; line-height: 1.6; }
.prose p { margin: 0 0 .9em; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 0 0 .9em; padding-left: 1.3em; }
.prose li { margin: .25em 0; }
.prose h4 { margin: 1em 0 .4em; font-size: 1em; font-weight: 600; }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--bg-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.prose pre {
  background: #0a1020; color: #e3e9f6; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  overflow: auto; font-size: 13.5px; line-height: 1.5; margin: .8em 0;
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.prose .cite + .cite { margin-left: 4px; }
.prose .cite { color: var(--accent); font-family: var(--sans); font-size: .72em; vertical-align: super; margin-left: 1px; text-decoration: none; }
.prose .cursor { display: inline-block; width: .55em; height: 1em; background: var(--accent); vertical-align: -0.15em; margin-left: 2px; animation: blink 1s steps(2) infinite; border-radius: 2px; }

/* honesty mark */
.honesty { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 22px 0 6px; animation: rise .5s var(--ease) both; }
.honesty-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); font-size: 13.5px; font-weight: 500; white-space: nowrap;
}
.honesty-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 3px var(--accent-soft); }
.honesty[data-mark="settled"] .honesty-dot { background: var(--settled); box-shadow: 0 0 0 3px color-mix(in srgb, var(--settled) 22%, transparent); }
.honesty[data-mark="debated"] .honesty-dot { background: var(--debated); box-shadow: 0 0 0 3px color-mix(in srgb, var(--debated) 22%, transparent); }
.honesty[data-mark="unknown"] .honesty-dot { background: var(--unknown); box-shadow: 0 0 0 3px color-mix(in srgb, var(--unknown) 22%, transparent); }
.honesty-why { color: var(--muted); font-size: 14px; }

/* question behind the question */
.next {
  display: grid; gap: 4px; width: 100%; text-align: left; margin: 18px 0 0; padding: 16px 18px 16px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  position: relative; overflow: hidden; box-shadow: var(--shadow); animation: rise .5s var(--ease) both;
  transition: transform .25s var(--ease), border-color .25s;
}
.next::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(#dfe7f5, var(--accent)); }
.next:hover { transform: translateY(-2px); border-color: var(--accent); }
.next-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.next-q { font-family: var(--serif); font-size: 20px; line-height: 1.3; }
.next-go { color: var(--accent); font-size: 14px; font-weight: 500; margin-top: 2px; }

/* sources */
.sources { margin-top: 22px; animation: rise .5s var(--ease) both; }
.sources-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.sources-list { display: grid; gap: 6px; }
@media (min-width: 640px) { .sources-list { grid-template-columns: 1fr 1fr; } }
.src {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  text-decoration: none; color: var(--text); min-width: 0; transition: border-color .2s, transform .2s var(--ease);
}
.src:hover { border-color: var(--accent); transform: translateY(-1px); }
.src.is-used { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.src-ico { width: 22px; height: 22px; border-radius: 6px; background: var(--bg-2); display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--muted); overflow: hidden; }
.src-ico img { width: 16px; height: 16px; }
.src-main { min-width: 0; display: grid; gap: 1px; }
.src-host { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-n { font-size: 12px; color: var(--accent); font-weight: 600; }
.src-age { font-size: 11.5px; color: var(--faint); }
.sources-none { color: var(--muted); font-size: 14px; }

/* actions */
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px; animation: rise .5s var(--ease) both; }
.actions > button { white-space: nowrap; }
.keep {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--accent); background: transparent; color: var(--accent); font-weight: 600;
  transition: background .2s, color .2s, transform .2s var(--spring);
}
.keep svg { width: 18px; height: 18px; }
.keep:hover { background: var(--accent); color: var(--on-accent); }
.keep:active { transform: scale(.96); }
.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--muted); padding: 10px 16px; border-radius: 999px; cursor: pointer; transition: all .2s; }
.ghost:hover { color: var(--text); border-color: var(--text); }

.err { margin-top: 16px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--debated); color: var(--text); background: color-mix(in srgb, var(--debated) 10%, var(--surface)); font-size: 15px; }

/* footer */
.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; align-items: center; color: var(--faint); font-size: 12.5px; padding: 18px 16px; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
.link { background: none; border: 0; padding: 0; color: var(--faint); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--text); }
a.link { color: var(--faint); }
.signin-fine a.link { color: var(--muted); }
.sheet-links { display: flex; justify-content: center; gap: 8px; color: var(--faint); font-size: 13px; margin: 4px 0 14px; }

/* sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 20; animation: fade .25s both; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-width: 560px; margin: 0 auto;
  background: var(--surface); color: var(--text); border-radius: 22px 22px 0 0; padding: 10px 22px 22px;
  padding-bottom: max(22px, env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0,0,0,.25);
  animation: up .35s var(--ease) both; max-height: 86dvh; overflow: auto;
}
.sheet-art { width: 100%; max-width: 300px; display: block; margin: 0 auto 12px; border-radius: 18px; box-shadow: 0 10px 40px -10px rgba(0,0,0,.6); }
.sheet-tag { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 14px; font-style: italic; }
.sheet-handle { width: 38px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 4px auto 14px; }
.sheet-title { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 0 0 6px; }
.sheet-intro { color: var(--muted); margin: 0 0 14px; font-size: 15px; }
.promises { margin: 0 0 14px; padding-left: 1.2em; display: grid; gap: 10px; font-size: 15px; }
.promises b { font-weight: 600; }
.sheet-foot { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.sheet-close { width: 100%; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 30;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px;
  box-shadow: var(--shadow); animation: up .3s var(--ease) both; max-width: calc(100% - 32px); text-align: center;
}

/* animations */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes up { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
.sheet { animation-name: sheetup; }
@keyframes sheetup { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes thread { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@keyframes breathe { 0%, 100% { box-shadow: var(--shadow); } 50% { box-shadow: var(--shadow), 0 0 0 6px var(--accent-soft); } }
@keyframes blink { to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}
[hidden] { display: none !important; }

/* =====================================================================
   PART 2 — memory, sign-in, daily check, My Mind
   ===================================================================== */

/* header: My Mind */
.mind-btn {
  position: relative; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 13px 0 10px;
  border-radius: 999px; border: 1px solid var(--line-2); background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text); cursor: pointer; font-size: 14px; font-weight: 500; margin-right: 4px;
  transition: border-color .2s, background .2s, transform .2s var(--spring);
}
.mind-btn svg { width: 19px; height: 19px; color: var(--accent); }
.mind-btn:hover { border-color: var(--accent); }
.mind-btn:active { transform: scale(.96); }
.mind-btn.is-on { background: var(--accent-soft); border-color: var(--accent); }
.mind-dot { position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--bg); }
@media (max-width: 370px) { .mind-btn span { display: none; } .mind-btn { padding: 0 9px; } }

/* daily check card */
.daily {
  width: 100%; display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 14px; text-align: left;
  margin: 14px 0 0; padding: 14px 16px 14px 14px; border-radius: 20px; cursor: pointer; color: var(--text);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(120deg, var(--accent), color-mix(in srgb, var(--gold) 80%, transparent), var(--accent)) border-box;
  border: 1.5px solid transparent; box-shadow: var(--shadow); animation: rise .5s var(--ease) both;
  transition: transform .25s var(--ease);
}
.daily:hover { transform: translateY(-2px); }
.daily:active { transform: scale(.985); }
.daily-ring { position: relative; width: 48px; height: 48px; display: grid; place-items: center; }
.daily-ring svg { position: absolute; inset: 0; width: 48px; height: 48px; transform: rotate(-90deg); }
.daily-ring circle { fill: none; stroke-width: 3.5; }
.ring-bg { stroke: var(--line); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 119.4; stroke-dashoffset: 119.4; transition: stroke-dashoffset 1.1s var(--ease); }
.daily-ring b { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.daily-text { display: grid; gap: 2px; min-width: 0; }
.daily-title { font-weight: 600; font-size: 15.5px; }
.daily-sub { color: var(--muted); font-size: 13.5px; }
.daily-go { color: var(--accent); font-size: 20px; }
.daily.is-done { background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(120deg, var(--line-2), var(--line-2)) border-box; cursor: default; }
.daily.is-done .ring-fg { stroke: var(--gold); }
.daily.is-done .daily-go { display: none; }
main.has-answer .daily, main.mind-mode #daily { display: none; }

/* answer extras */
.subject-tag { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); animation: fade .4s both; }
.subject-tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--subj, var(--accent)); }
.subject-tag + .asked { margin-top: 6px; }
.keep .keep-tick { display: none; }
.keep.is-kept { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.keep.is-kept .keep-tick { display: inline; }
.keep.is-kept path:first-child { fill: currentColor; fill-opacity: .18; }
.keep.is-busy { opacity: .6; pointer-events: none; }
.keep.pop { animation: pop .5s var(--spring); }
.ghost-quiet { border-color: transparent; }
.kept-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 12px; }
.kept-note { color: var(--muted); font-size: 14px; animation: fade .4s both; }
.kept-row .link { font-size: 14px; }
.kept-note b { color: var(--text); font-weight: 600; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* primary button */
.primary {
  border: 0; border-radius: 999px; padding: 12px 20px; cursor: pointer; font-weight: 600;
  background: var(--accent); color: var(--on-accent); transition: transform .2s var(--spring), background .2s, opacity .2s;
}
.primary:hover { background: var(--accent-2); }
.primary:active { transform: scale(.97); }
.primary[disabled] { opacity: .55; cursor: default; transform: none; }
.primary.danger { background: var(--danger); }
.link-danger { color: var(--danger) !important; }

/* sign-in sheet */
.signin { text-align: center; }
.signin-mark { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 1px var(--line), 0 0 30px -6px var(--accent); }
.signin-mark img { width: 64px; height: 64px; display: block; }
.signin .sheet-intro { max-width: 340px; margin-left: auto; margin-right: auto; }
.gbtn-wrap { display: flex; justify-content: center; min-height: 44px; margin: 6px 0 2px; }
/* Google's button lives in an iframe with a light page. In dark mode the browser paints a white box behind it
   unless the iframe is told it is light too. This makes the box transparent. */
.gbtn-wrap, .gbtn-wrap iframe { color-scheme: light; }
.gbtn-wrap iframe { background: transparent !important; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 13px; margin: 14px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.email-form, .code-form { display: grid; gap: 10px; }
.email-form input, .code-form input {
  width: 100%; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); border-radius: 14px;
  padding: 13px 14px; font: inherit; font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.email-form input:focus, .code-form input:focus { border-color: var(--accent); box-shadow: var(--glow); }
.code-form input { text-align: center; font-size: 28px; letter-spacing: .4em; font-family: var(--serif); padding: 12px 0 12px .4em; }
.code-sent { color: var(--muted); font-size: 15px; margin: 0 0 12px; }
.code-sent b { color: var(--text); }
.code-links { display: flex; justify-content: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--faint); }
.signin-err { margin: 12px 0 0; color: var(--danger); font-size: 14px; }
.signin-fine { color: var(--faint); font-size: 12.5px; margin: 16px auto 12px; max-width: 340px; }

/* confirm sheet */
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- daily check overlay ---------- */
.checks {
  position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; gap: 16px;
  padding: max(14px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
  background: radial-gradient(900px 500px at 50% -10%, var(--blue-soft), transparent 60%), var(--bg);
  animation: fade .25s both;
}
.checks-top { display: flex; align-items: center; gap: 12px; max-width: 640px; width: 100%; margin: 0 auto; }
.checks-progress { flex: 1; display: flex; gap: 6px; }
.checks-progress i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; }
.checks-progress i.done { background: var(--accent); }
.checks-progress i.had { background: var(--gold); }
.checks-progress i.now { background: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.checks-stage { flex: 1; display: grid; align-items: center; max-width: 640px; width: 100%; margin: 0 auto; overflow: auto; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 22px 20px 20px;
  box-shadow: var(--shadow); animation: cardin .45s var(--ease) both;
}
.card.out-left { animation: cardout-left .38s var(--ease) both; }
.card.out-right { animation: cardout-right .38s var(--ease) both; }
@keyframes cardin { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes cardout-left { to { opacity: 0; transform: translateX(-40px) rotate(-3deg); } }
@keyframes cardout-right { to { opacity: 0; transform: translateX(40px) rotate(3deg); } }
.card-subject { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.card-subject i { width: 8px; height: 8px; border-radius: 50%; background: var(--subj, var(--accent)); }
.card-q { font-family: var(--serif); font-size: clamp(24px, 6.4vw, 32px); line-height: 1.2; margin: 10px 0 18px; letter-spacing: -.01em; }
.card-answer-area textarea {
  width: 100%; resize: none; border: 1px solid var(--line-2); background: var(--bg); color: var(--text);
  border-radius: 16px; padding: 12px 14px; font: inherit; font-size: 16px; line-height: 1.5; outline: none; min-height: 92px;
  transition: border-color .2s, box-shadow .2s;
}
.card-answer-area textarea:focus { border-color: var(--accent); box-shadow: var(--glow); }
.card-hint { color: var(--faint); font-size: 12.5px; margin-top: 8px; }
.card-reveal { animation: rise .4s var(--ease) both; }
.card-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 2px 0 6px; }
.card-yours { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed var(--line-2); }
.card-yours-text { color: var(--muted); font-size: 15.5px; white-space: pre-wrap; }
.card-kept { font-size: 18px; }
.card-from { color: var(--faint); font-size: 13px; margin-top: 10px; }
.checks-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; max-width: 640px; width: 100%; margin: 0 auto; }
.checks-actions .ghost, .checks-actions .primary { padding: 14px 16px; font-size: 16px; }
.judge-yes { background: var(--accent); }
.checks-done { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; max-width: 520px; margin: 0 auto; animation: rise .5s var(--ease) both; }
.done-orbit { position: relative; width: 120px; height: 120px; margin-bottom: 18px; }
.done-orbit i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--accent); opacity: .5; animation: orbit 3.2s linear infinite; }
.done-orbit i:nth-child(2) { inset: 18px; border-color: var(--gold); animation-duration: 2.4s; animation-direction: reverse; }
.done-orbit i:nth-child(3) { inset: 44px; background: var(--accent); border: 0; opacity: 1; box-shadow: 0 0 30px var(--accent); animation: breathe-dot 2.6s ease-in-out infinite; }
@keyframes orbit { to { transform: rotate(360deg) scale(1.02); } }
@keyframes breathe-dot { 50% { transform: scale(.85); opacity: .8; } }
.done-orbit i:nth-child(1) { border-style: dashed; }
.done-title { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0; }
.done-lines { color: var(--muted); margin: 6px 0 22px; line-height: 1.7; }
.done-lines b { color: var(--text); font-weight: 600; }
.done-lines .gold { color: var(--gold); font-weight: 600; }

/* ---------- My Mind ---------- */
.mind { padding-top: 10px; animation: rise .45s var(--ease) both; }
main.mind-mode .hero, main.mind-mode .ask, main.mind-mode .suggest, main.mind-mode .answer { display: none !important; }
.mind-head { margin: 18px 0 14px; }
.mind-title { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 8vw, 46px); margin: 0; letter-spacing: -.015em; }
.mind-sub { color: var(--muted); margin: 4px 0 0; }
.mind-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 6px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 10px; }
.stat b { display: block; font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 12.5px; }
.stat.gold b { color: var(--gold); }
.daily-inline { margin: 12px 0 4px; }
.mind-list { margin-top: 18px; display: grid; gap: 22px; }
.subj-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.subj-head i { width: 9px; height: 9px; border-radius: 50%; background: var(--subj, var(--accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--subj, var(--accent)) 22%, transparent); }
.subj-head span:last-child { margin-left: auto; color: var(--faint); letter-spacing: 0; text-transform: none; }
.mind-items { display: grid; gap: 6px; }
.mi {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; text-align: left; width: 100%;
  padding: 13px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
  transition: border-color .2s, transform .2s var(--ease);
}
.mi:hover { border-color: var(--accent); transform: translateY(-1px); }
.mi-q { font-family: var(--serif); font-size: 17.5px; line-height: 1.3; min-width: 0; }
.mi-meta { grid-column: 1 / 2; color: var(--faint); font-size: 12.5px; }
.mi-dots { grid-row: 1 / 3; grid-column: 2; display: flex; gap: 4px; }
.mi-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.mi-dots i.on { background: var(--accent); }
.mi.yours { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.mi.yours .mi-dots i { background: var(--gold); }
.mi.yours .mi-meta { color: var(--gold); }
.mind-empty { text-align: center; padding: 30px 8px 10px; color: var(--muted); }
.mind-empty-art { width: 120px; height: 120px; margin: 0 auto 10px; color: var(--accent); }
.mind-empty h3 { font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--text); margin: 0 0 8px; }
.mind-empty p { max-width: 420px; margin: 0 auto 18px; }
.mind-foot { margin-top: 34px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; justify-items: center; color: var(--faint); font-size: 13.5px; }
.mind-foot-actions { display: flex; gap: 8px; align-items: center; }
.mind-skeleton { height: 58px; border-radius: 16px; background: linear-gradient(90deg, var(--surface), var(--bg-2), var(--surface)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.kept-note b.gold { color: var(--gold); }
.confirm-actions button { white-space: nowrap; }

/* touch screens: no sticky hover after a tap */
@media (hover: none) {
  .primary:hover { background: var(--accent); }
  .primary.danger:hover { background: var(--danger); }
  .ask-btn:hover { transform: none; background: var(--accent); }
  .keep:not(.is-kept):hover { background: transparent; color: var(--accent); }
  .ghost:hover { color: var(--muted); border-color: var(--line-2); }
  .chip:hover { border-color: var(--line-2); color: var(--muted); background: transparent; transform: none; }
  .mi:hover, .daily:hover, .next:hover, .src:hover { transform: none; }
  .mi:hover { border-color: var(--line); }
  .mi.yours:hover { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
  .next:hover { border-color: var(--line); }
  .src:hover { border-color: var(--line); }
  .src.is-used:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
  .icon-btn:hover { background: transparent; border-color: transparent; color: var(--muted); }
  .mind-btn:hover { border-color: var(--line-2); }
  .mind-btn.is-on:hover { border-color: var(--accent); }
}

/* ======================================================================
   Part 3 — Pro. Blue stays the app's colour; Pro gets a deeper blue-to-violet glow.
   Gold still means only one thing: “yours for good”.
   ====================================================================== */
:root { --pro-a: #2f6fe0; --pro-b: #7b5cf0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --pro-a: #4ea1ff; --pro-b: #9d85ff; } }
:root[data-theme="dark"] { --pro-a: #4ea1ff; --pro-b: #9d85ff; }

/* header chip */
.pro-chip {
  font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 7px 2px; border-radius: 999px; color: #fff; align-self: center; margin-left: -2px;
  background: linear-gradient(120deg, var(--pro-a), var(--pro-b)); box-shadow: 0 0 14px -3px var(--pro-b);
}
@media (max-width: 360px) { .pro-chip { display: none; } }

/* “your Pro ends soon” */
.nudge {
  display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 10px 10px 10px 14px; border-radius: 16px;
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--pro-b) 35%, var(--line)); font-size: 14.5px;
  animation: rise .45s var(--ease) both;
}
.nudge-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--pro-b); box-shadow: 0 0 0 0 var(--pro-b); animation: ping 2.2s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--pro-b) 55%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.nudge-text { flex: 1; min-width: 0; }
.nudge-go { border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; padding: 6px 6px; }
.nudge-x { border: 0; background: none; color: var(--faint); font-size: 20px; line-height: 1; cursor: pointer; padding: 4px 6px; }

/* the calm limit */
.limit { text-align: center; padding: 26px 8px 8px; }
.limit.in { animation: rise .5s var(--ease) both; }
.limit-moon { width: 84px; height: 84px; margin: 0 auto 10px; }
.limit-moon svg { width: 84px; height: 84px; overflow: visible; }
.lm-ring { fill: none; stroke: var(--line-2); stroke-width: 2.5; }
.lm-arc { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 138.2; stroke-dashoffset: 138.2; transform: rotate(-90deg); transform-origin: 32px 32px; animation: fillarc 1.2s var(--ease) .15s forwards; }
@keyframes fillarc { to { stroke-dashoffset: 0; } }
.lm-moon { fill: var(--gold); opacity: .9; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--gold) 60%, transparent)); }
.limit-title { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0 0 6px; }
.limit-text { margin: 0 0 6px; font-size: 16.5px; }
.limit-text b { font-weight: 600; }
.limit-sub { color: var(--muted); margin: 0 auto 20px; max-width: 360px; font-size: 14.5px; }
.limit-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* a quiet heads-up near the end of the free questions */
.usage-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-size: 14px; }
.usage-note i { width: 7px; height: 7px; border-radius: 50%; background: var(--debated); }
.usage-note .link { color: var(--accent); font-weight: 600; }

/* plan card in My Mind */
.plan-card {
  margin: 12px 0 6px; padding: 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
  animation: rise .45s var(--ease) both;
}
.plan-card.is-pro {
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--pro-b) 14%, transparent), transparent 60%) padding-box,
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(120deg, var(--pro-a), var(--pro-b)) border-box;
  border: 1.5px solid transparent; box-shadow: 0 14px 40px -24px var(--pro-b);
}
.pc-head { display: flex; align-items: center; gap: 12px; }
.pc-badge {
  flex: none; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff;
  padding: 6px 9px 5px; border-radius: 10px; background: linear-gradient(120deg, var(--pro-a), var(--pro-b));
}
.pc-main { display: grid; gap: 1px; min-width: 0; flex: 1; }
.pc-title { font-weight: 600; font-size: 15.5px; }
.pc-sub { color: var(--muted); font-size: 13.5px; }
.pc-sub b { color: var(--text); }
.pc-link { border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; padding: 6px 2px; white-space: nowrap; }
.pc-go { padding: 9px 16px; white-space: nowrap; }
.pc-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.pc-tool {
  display: grid; grid-template-columns: 1fr; align-content: start; justify-items: start; gap: 2px; text-align: left;
  padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; transition: border-color .2s, transform .2s var(--ease);
}
.pc-tool .pc-ic { width: 30px; height: 30px; margin-bottom: 6px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.pc-tool .pc-ic svg { width: 18px; height: 18px; }
.pc-tool b { font-size: 14px; font-weight: 600; line-height: 1.2; }
.pc-tool small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.pc-tool:hover { border-color: var(--accent); }
.pc-tool:active { transform: scale(.98); }
.pc-tool.is-on { border-color: color-mix(in srgb, var(--pro-b) 60%, var(--line)); background: color-mix(in srgb, var(--pro-b) 8%, var(--bg)); }
.pc-tool.is-on .pc-ic { background: color-mix(in srgb, var(--pro-b) 18%, transparent); color: var(--pro-b); }
.pc-tool.is-locked { opacity: .62; }
.pc-tool.is-locked small::before { content: "🔒 "; font-size: 10px; }

/* the Pro sheet */
.pro { text-align: center; }
.pro-mark { position: relative; width: 64px; height: 64px; margin: 0 auto 12px; }
.pro-mark img { width: 64px; height: 64px; border-radius: 18px; display: block; box-shadow: 0 0 0 1px var(--line), 0 0 34px -6px var(--pro-b); }
.pro-mark span {
  position: absolute; right: -14px; bottom: -6px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff;
  padding: 3px 8px 2px; border-radius: 999px; background: linear-gradient(120deg, var(--pro-a), var(--pro-b)); box-shadow: 0 0 0 3px var(--surface);
}
.pro .sheet-title { font-size: 28px; }
.pro-status { color: var(--muted); font-size: 14.5px; margin: 0 auto 12px; max-width: 360px; }
.pro-status b { color: var(--text); }
.pro-perks { list-style: none; padding: 0; margin: 14px 0 16px; display: grid; gap: 10px; text-align: left; }
.pro-perks li { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; }
.perk-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--pro-b); background: color-mix(in srgb, var(--pro-b) 13%, transparent); }
.perk-ic svg { width: 21px; height: 21px; }
.pro-perks b { display: block; font-size: 15px; }
.pro-perks small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.35; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 14px; }
.plan {
  position: relative; display: grid; gap: 2px; justify-items: center; padding: 18px 10px 14px; border-radius: 18px; cursor: pointer;
  border: 1.5px solid var(--line-2); background: var(--bg); transition: border-color .2s, box-shadow .25s, transform .2s var(--spring);
}
.plan:active { transform: scale(.97); }
.plan-name { color: var(--muted); font-size: 13.5px; }
.plan-price { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
.plan-sub { color: var(--faint); font-size: 12px; min-height: 1.3em; }
.plan.is-on { border-color: var(--pro-b); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pro-b) 16%, transparent); background: color-mix(in srgb, var(--pro-b) 6%, var(--bg)); }
.plan.is-on .plan-name { color: var(--text); }
.plan-flag {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 999px; color: #fff; background: linear-gradient(120deg, var(--pro-a), var(--pro-b));
}
.pro-pay { width: 100%; padding: 14px 20px; font-size: 16px; background: linear-gradient(120deg, var(--pro-a), var(--pro-b)); color: #fff; box-shadow: 0 12px 30px -14px var(--pro-b); }
.pro-pay:hover { background: linear-gradient(120deg, var(--pro-a), var(--pro-b)); filter: brightness(1.06); }
.pro-fine { color: var(--faint); font-size: 12.5px; margin: 10px auto 12px; max-width: 360px; }
.pro .signin-err { margin: 0 0 12px; }

/* welcome to Pro */
.welcome { text-align: center; }
.welcome-orbit { position: relative; width: 128px; height: 128px; margin: 6px auto 12px; display: grid; place-items: center; }
.welcome-orbit i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed var(--pro-a); opacity: .6; animation: orbit 6s linear infinite; }
.welcome-orbit i:nth-child(2) { inset: 12px; border: 1.5px solid var(--pro-b); border-top-color: transparent; animation-duration: 2.6s; animation-direction: reverse; opacity: .8; }
.welcome-orbit i:nth-child(3) { inset: 26px; border: 0; background: radial-gradient(circle, color-mix(in srgb, var(--pro-b) 35%, transparent), transparent 70%); animation: breathe-dot 2.8s ease-in-out infinite; }
.welcome-orbit img { position: relative; width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 0 34px -4px var(--pro-b); }
.welcome .sheet-title { font-size: 30px; }
.welcome .sheet-intro b { color: var(--text); }

/* ---------- revision notes ---------- */
main.notes-mode { max-width: 760px; }
.notes { animation: rise .45s var(--ease) both; padding-top: 4px; }
.notes-bar {
  position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; gap: 10px; padding: 10px 0;
  background: linear-gradient(var(--bg) 70%, transparent);
}
.notes-head { padding: 10px 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.notes-brand { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; }
.notes-brand img { border-radius: 6px; }
.notes-title { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 7.5vw, 42px); margin: 8px 0 2px; letter-spacing: -.015em; }
.notes-meta { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.notes-toc { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; }
.notes-toc a {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line-2);
  text-decoration: none; color: var(--text); font-size: 13.5px; background: var(--surface);
}
.notes-toc a i { width: 8px; height: 8px; border-radius: 50%; background: var(--subj); }
.notes-toc a span { color: var(--faint); }
.ns { padding-top: 18px; scroll-margin-top: 64px; }
.ns-title { display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.ns-title i { width: 10px; height: 10px; border-radius: 50%; background: var(--subj); box-shadow: 0 0 0 3px color-mix(in srgb, var(--subj) 22%, transparent); }
.ns-title span { margin-left: auto; color: var(--faint); letter-spacing: 0; font-weight: 400; }
.ni { padding: 16px 16px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 10px; border-left: 3px solid var(--subj); }
.ni-q { display: flex; gap: 10px; align-items: baseline; font-family: var(--serif); font-weight: 600; font-size: 19px; line-height: 1.3; margin: 0 0 8px; }
.ni-n { flex: none; font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--faint); min-width: 16px; }
.ni .prose { font-size: 16.5px; line-height: 1.55; }
.ni-label { margin: 12px 0 4px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.ni-tech { color: var(--text); }
.ni-foot { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); font-size: 13.5px; color: var(--muted); }
.ni-check { flex: 1 1 100%; }
.ni-check b { color: var(--text); font-weight: 600; }
.ni-mark { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.ni-mark i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.ni-mark[data-mark="settled"] i { background: var(--settled); }
.ni-mark[data-mark="debated"] i { background: var(--debated); }
.ni-mark[data-mark="unknown"] i { background: var(--unknown); }
.ni-yours { color: var(--gold); font-weight: 600; font-size: 12.5px; }
.notes-empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.notes-tip { color: var(--faint); font-size: 12.5px; text-align: center; margin: 22px 0 6px; }

@media (hover: none) {
  .pc-tool:hover { border-color: var(--line); }
  .pc-tool.is-on:hover { border-color: color-mix(in srgb, var(--pro-b) 60%, var(--line)); }
  .pro-pay:hover { filter: none; }
}

/* printing / Save as PDF: only the notes, on white paper */
@media print {
  @page { margin: 14mm 12mm; }
  /* :root three times beats the dark-theme rules, so paper is always white even when the phone is in dark mode */
  :root:root:root { color-scheme: light; --bg: #fff; --surface: #fff; --bg-2: #f3f3f3; --text: #111; --muted: #444; --faint: #777; --line: #ddd; --line-2: #ccc; --accent: #1d4fc4; --gold: #8a6214; --settled: #1f7a4d; --debated: #b4532a; --unknown: #5b3fb0; }
  html, body { background: #fff !important; color: #111 !important; }
  body > *:not(main) { display: none !important; }
  main > *:not(#notes):not(#deep) { display: none !important; }
  main { padding: 0 !important; max-width: none !important; }
  .notes { animation: none !important; }
  .notes-bar, .notes-toc, .notes-tip { display: none !important; }
  .notes-head { border-bottom: 2px solid #111; }
  .ni { break-inside: avoid; page-break-inside: avoid; box-shadow: none; border-color: #ddd; }
  .ns-title { break-after: avoid; page-break-after: avoid; }
  .prose a { color: #111; text-decoration: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
main.has-answer .nudge, main.mind-mode .nudge { display: none; }

/* ======================================================================
   Big screens (laptops, desktops): a bolder home, and Plain + Technical as equals.
   Phones are untouched — everything here is inside min-width: 900px.
   ====================================================================== */
@media (min-width: 900px) {
  /* home */
  main:not(.has-answer):not(.mind-mode) { max-width: 880px; }
  .hero { position: relative; isolation: isolate; padding: clamp(60px, 15vh, 150px) 0 30px; }
  .hero-title { font-size: clamp(66px, 6.6vw, 96px); margin-bottom: 16px; }
  .hero-sub { font-size: 19px; }
  .hero::before, .hero::after { content: ""; position: absolute; left: 50%; top: calc(clamp(60px, 15vh, 150px) + .5em); border-radius: 50%; pointer-events: none; z-index: -1; font-size: clamp(66px, 6.6vw, 96px); }
  .hero::before {
    width: 420px; height: 420px; margin: -210px 0 0 -210px;
    border: 1px dashed color-mix(in srgb, var(--accent) 30%, transparent);
    background: radial-gradient(circle at 50% 0, var(--accent) 0 4px, transparent 5px);
    animation: orbit 80s linear infinite;
  }
  .hero::after {
    width: 270px; height: 270px; margin: -135px 0 0 -135px;
    border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
    background: radial-gradient(circle, var(--blue-soft), transparent 70%);
  }
  main:not(.has-answer) .ask-box { padding: 12px 12px 12px 26px; border-radius: 32px; }
  main:not(.has-answer) .ask-box textarea { font-size: 19.5px; padding: 10px 0; }
  main:not(.has-answer) .ask-btn { width: 50px; height: 50px; }
  main:not(.has-answer) .ask-btn svg { width: 22px; height: 22px; }
  .ask-hint { font-size: 13.5px; padding-left: 26px; }
  .suggest { margin-top: 28px; }
  .chip { font-size: 15px; padding: 10px 17px; }
  .recent { margin-top: 44px; }
  .recent-label { text-align: left; margin-bottom: 12px; }
  .recent-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .recent-item {
    flex-direction: column; justify-content: space-between; gap: 8px; min-height: 92px;
    border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 15px 18px;
    color: var(--text); font-size: 18px; line-height: 1.3; transition: border-color .2s, transform .2s var(--ease);
  }
  .recent-item:hover { border-color: var(--accent); transform: translateY(-2px); }
  .recent-item span:last-child { font-size: 12.5px; }
  .daily, .nudge { max-width: 880px; position: relative; z-index: 1; }

  /* answer: Plain and Technical as two equal cards */
  .depth-grid { gap: 18px; align-items: stretch; }
  .depth, .depth.is-on {
    background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px 24px 24px;
    box-shadow: 0 18px 44px -32px rgba(0, 0, 0, .55);
  }
  .depth-technical { border-left: 1px solid var(--line); padding-left: 24px; }
  .depth::before {
    display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .1em;
    color: var(--muted); margin-bottom: 12px;
  }
  .depth-plain::before { content: "●  Plain"; }
  .depth-technical::before { content: "●  Technical"; color: var(--accent); }
  .depth-plain .prose { font-size: 19.5px; }
  .depth-technical .prose { font-size: 17.5px; line-height: 1.65; color: var(--text); }
}
@media (min-width: 900px) and (hover: none) {
  .recent-item:hover { border-color: var(--line); transform: none; }
}

/* ======================================================================
   Phones and small tablets: the same new look, sized for a small screen.
   ====================================================================== */
@media (max-width: 899px) {
  /* calm orbit rings behind the title, like the S logo */
  .hero { position: relative; isolation: isolate; }
  .hero::before, .hero::after {
    content: ""; position: absolute; left: 50%; border-radius: 50%; pointer-events: none; z-index: -1;
    font-size: clamp(40px, 9vw, 64px); top: calc(clamp(28px, 10vh, 96px) + 1.1em);
  }
  .hero::before {
    width: 260px; height: 260px; margin: -130px 0 0 -130px;
    border: 1px dashed color-mix(in srgb, var(--accent) 30%, transparent);
    background: radial-gradient(circle at 50% 0, var(--accent) 0 3px, transparent 4px);
    animation: orbit 70s linear infinite;
  }
  .hero::after {
    width: 170px; height: 170px; margin: -85px 0 0 -85px;
    border: 1px solid color-mix(in srgb, var(--accent) 16%, transparent);
    background: radial-gradient(circle, var(--blue-soft), transparent 70%);
  }
  .daily, .nudge { position: relative; z-index: 1; }

  /* answers: the chosen depth sits in its own card; Technical as readable as Plain */
  .depth.is-on {
    background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px 18px 20px;
    box-shadow: 0 16px 40px -30px rgba(0, 0, 0, .55);
  }
  .depth-technical .prose { font-size: 17px; line-height: 1.62; color: var(--text); }

  /* recent questions as tidy cards */
  .recent-list { gap: 8px; }
  .recent-item {
    border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
    padding: 13px 15px; color: var(--text); align-items: baseline; line-height: 1.3;
  }
  .recent-item:active { transform: scale(.99); }
}

/* the header always sits above the decorative rings */
.top { position: relative; z-index: 2; }

/* ======================================================================
   Part 4 — the Sapere Engine: key-point checks, pictures, honest My Mind,
   reminders, exam date, owner dashboard. Gold still means only "yours for good".
   ====================================================================== */

/* the orbit rings never touch a card above the title */
@media (max-width: 899px) {
  .hero { --hero-pad: clamp(28px, 10vh, 96px); padding-top: var(--hero-pad); }
  .hero::before, .hero::after { top: calc(var(--hero-pad) + 1.1em); }
  #nudge:not([hidden]) ~ .hero, #daily:not([hidden]) ~ .hero, #retryCard:not([hidden]) ~ .hero, #examStrip:not([hidden]) ~ .hero {
    --hero-pad: calc(clamp(28px, 10vh, 96px) + 34px);
  }
}
@media (min-width: 900px) {
  .hero { --hero-pad: clamp(60px, 15vh, 150px); padding-top: var(--hero-pad); }
  .hero::before, .hero::after { top: calc(var(--hero-pad) + .5em); }
  #nudge:not([hidden]) ~ .hero, #daily:not([hidden]) ~ .hero, #retryCard:not([hidden]) ~ .hero, #examStrip:not([hidden]) ~ .hero {
    --hero-pad: calc(clamp(60px, 15vh, 150px) + 44px);
  }
  .retry-card, .exam-strip { max-width: 880px; position: relative; z-index: 1; }
}
@media (max-width: 899px) { .retry-card, .exam-strip { position: relative; z-index: 1; } }

/* morning re-try */
.retry-card {
  width: 100%; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; text-align: left;
  margin: 10px 0 0; padding: 12px 16px 12px 12px; border-radius: 18px; cursor: pointer; color: var(--text);
  background: linear-gradient(120deg, color-mix(in srgb, var(--gold) 10%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 38%, var(--line)); box-shadow: var(--shadow); animation: rise .5s var(--ease) both;
  transition: transform .25s var(--ease);
}
.retry-card:active { transform: scale(.985); }
.rc-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--gold); background: var(--gold-soft); }
.rc-ic svg { width: 22px; height: 22px; }
main.has-answer .retry-card, main.mind-mode .retry-card { display: none; }

/* exam countdown */
.exam-strip {
  display: flex; gap: 10px; align-items: baseline; margin: 10px 0 0; padding: 10px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--pro-b) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--pro-b) 28%, var(--line));
  font-size: 14px; color: var(--muted); animation: rise .5s var(--ease) both;
}
.exam-strip b { color: var(--text); }
.ex-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--pro-b); transform: translateY(-1px); }
main.has-answer .exam-strip, main.mind-mode #examStrip { display: none; }
.exam-strip-inline { margin: 10px 0 2px; }

/* a picture that explains */
.pic { margin: 20px 0 0; display: grid; justify-items: start; gap: 6px; animation: rise .5s var(--ease) both; }
.pic-frame { padding: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--bg-2); cursor: zoom-in; display: block; max-width: min(100%, 440px); box-shadow: var(--shadow); }
.pic-frame img { display: block; max-width: 100%; max-height: 320px; width: auto; height: auto; object-fit: contain; }
.pic figcaption, .card-pic figcaption { color: var(--faint); font-size: 12.5px; }
.pic figcaption a, .card-pic figcaption a { color: inherit; text-underline-offset: 3px; }
.pic-tap {
  display: grid; grid-template-columns: 22px auto; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left;
  padding: 12px 16px; border-radius: 16px; border: 1px dashed var(--line-2); background: var(--surface); color: var(--text); cursor: pointer;
}
.pic-tap svg { grid-row: 1 / 3; width: 22px; height: 22px; color: var(--accent); }
.pic-tap span { font-weight: 600; font-size: 14.5px; }
.pic-tap small { color: var(--faint); font-size: 12px; }
@media (min-width: 900px) { .pic-frame img { max-height: 360px; } }

/* full-screen picture */
.lightbox {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 56px 12px 48px;
  background: rgba(3, 6, 14, .92); animation: fade .2s both; cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox-x { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 10px; color: #fff; }
.lightbox-credit { position: absolute; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); text-align: center; color: #cdd6ea; font-size: 13px; text-decoration: none; padding: 0 16px; }

/* kept answer tools */
.kept-tools { display: inline-flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.tool-chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 6px 12px; font-size: 13.5px; cursor: pointer; transition: all .2s;
}
.tool-chip svg { width: 16px; height: 16px; }
.tool-chip.is-on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.tool-chip.is-on svg path { fill: currentColor; fill-opacity: .9; }

/* My Mind: honest numbers */
.mind-summary {
  margin: 12px 0 6px; padding: 16px 16px 14px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); animation: rise .45s var(--ease) both;
}
.ms-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ms-big { display: grid; gap: 0; min-width: 0; }
.ms-big b { font-family: var(--serif); font-size: 46px; font-weight: 600; line-height: 1; letter-spacing: -.02em; }
.ms-big span { font-size: 15px; color: var(--text); margin-top: 4px; }
.ms-big small { color: var(--faint); font-size: 12px; }
.ms-gauge { position: relative; width: 74px; height: 74px; flex: none; display: grid; place-items: center; }
.ms-gauge svg { position: absolute; inset: 0; width: 74px; height: 74px; transform: rotate(-90deg); }
.ms-gauge circle { fill: none; stroke-width: 5; }
.g-bg { stroke: var(--line); }
.g-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 169.6; stroke-dashoffset: calc(169.6 - 169.6 * var(--p) / 100); transition: stroke-dashoffset 1.2s var(--ease); }
.ms-gauge span { font-size: 14px; font-weight: 600; }
.ms-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.ms-chips span { padding: 5px 11px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.ms-chips b { color: var(--text); font-weight: 600; }
.ms-chips .gold { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 35%, var(--line)); }
.ms-chips .gold b, .ms-chips .gold { color: var(--gold); }
.ms-line { margin: 10px 0 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.ms-line b { color: var(--text); font-weight: 600; }
.mind-note { margin: 10px 0 2px; padding: 10px 14px; border-radius: 14px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 13.5px; }
.mind-note p { margin: 4px 0; }

/* My Mind: each kept thing with its strength today */
.mi { grid-template-columns: 1fr 64px; }
.mi-strength { grid-row: 1 / 3; grid-column: 2; align-self: center; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.mi-strength i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 60%, transparent), var(--accent)); }
.mi.st-new .mi-strength i { background: repeating-linear-gradient(90deg, var(--accent) 0 4px, transparent 4px 7px); opacity: .55; }
.mi.st-yours .mi-strength i { background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 60%, transparent), var(--gold)); }
.mi.st-yours { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.mi.st-yours .mi-meta { color: var(--gold); }
.mi.st-secure .mi-meta::before { content: "● "; color: var(--settled); }
.mi.st-slipping .mi-meta { color: var(--debated); }
.mi.st-resting { opacity: .6; }
.mi-star { font-style: normal; color: var(--accent); margin-right: 6px; font-size: .85em; }

/* your Sapere: settings rows */
.mind-settings { margin-top: 28px; }
.ms-title { font-size: 12.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 0 0 8px; }
.ms-row {
  width: 100%; display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; text-align: left;
  padding: 11px 14px 11px 11px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--text);
  cursor: pointer; margin-bottom: 6px; transition: border-color .2s, transform .2s var(--ease);
}
.ms-row:active { transform: scale(.99); }
.ms-row:hover { border-color: var(--accent); }
.ms-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); }
.ms-ic svg { width: 20px; height: 20px; }
.ms-main { display: grid; gap: 1px; min-width: 0; }
.ms-main b { font-size: 15px; font-weight: 600; }
.ms-main small { color: var(--muted); font-size: 13px; }
.ms-go { color: var(--faint); font-size: 22px; line-height: 1; }
.ms-owner .ms-ic { color: var(--gold); background: var(--gold-soft); }
.switch { width: 42px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .25s var(--spring); }
.ms-row[aria-checked="true"] .switch { background: var(--accent); }
.ms-row[aria-checked="true"] .switch i { transform: translateX(18px); }

/* the check: tick the key points */
.card-points { margin-bottom: 14px; }
.points { display: grid; gap: 8px; }
.pt {
  display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: center; text-align: left; width: 100%;
  padding: 11px 12px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--bg); color: var(--text);
  font-size: 15.5px; line-height: 1.35; cursor: pointer; transition: border-color .2s, background .2s, transform .15s var(--spring);
}
.pt i { width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--line-2); display: grid; place-items: center; transition: all .2s var(--spring); }
.pt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.pt[aria-pressed="true"] i { background: var(--accent); border-color: var(--accent); }
.pt[aria-pressed="true"] i::after { content: ""; width: 10px; height: 6px; border: 2.2px solid var(--on-accent); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.pt:active { transform: scale(.985); }
.card-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--debated) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--debated) 30%, var(--line)); font-size: 14px; color: var(--text); }
.card-kept-wrap { display: grid; gap: 10px; }
.card-pic { margin: 0; display: grid; gap: 4px; justify-items: start; }
.card-pic .pic-frame img { max-height: 180px; }
@media (min-width: 640px) {
  .card-kept-wrap:has(.card-pic:not([hidden])) { grid-template-columns: 1fr 180px; align-items: start; }
  .card-kept-wrap .card-pic { grid-column: 2; grid-row: 1; }
}
.checks-grade { grid-template-columns: 1fr; }
.grade-btn {
  display: grid; gap: 1px; justify-items: center; padding: 11px 16px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line-2); background: var(--surface); color: var(--text); transition: background .25s, border-color .25s, color .25s, transform .2s var(--spring);
}
.grade-btn b { font-size: 16px; font-weight: 600; }
.grade-btn small { font-size: 12px; color: var(--muted); }
.grade-btn.is-had { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.grade-btn.is-had small { color: color-mix(in srgb, var(--on-accent) 75%, transparent); }
.grade-btn:active { transform: scale(.98); }
.done-truth { color: var(--muted); font-size: 14px; font-style: italic; margin: -8px 0 22px; max-width: 360px; }
.done-truth:empty { display: none; }

/* reminder + exam sheets */
.anchor-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.a-chip {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text);
  border-radius: 999px; padding: 8px 13px; font-size: 14px; cursor: pointer; transition: all .2s;
}
.a-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--subj, var(--accent)); }
.a-chip.is-on { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.text-in {
  width: 100%; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); border-radius: 14px;
  padding: 12px 14px; font: inherit; font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s; margin-bottom: 10px;
}
.text-in:focus { border-color: var(--accent); box-shadow: var(--glow); }
.time-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.time-row .card-label { margin: 0 0 10px; }
.time-in { max-width: 160px; font-variant-numeric: tabular-nums; }
.fine { color: var(--faint); font-size: 12.5px; margin: 2px 0 12px; line-height: 1.45; }
.fine-inline { color: var(--faint); font-size: 12.5px; text-transform: none; letter-spacing: 0; }
.wide { width: 100%; display: block; text-align: center; text-decoration: none; margin-bottom: 10px; }
a.primary.wide, a.ghost.wide { box-sizing: border-box; }
.cal-step { margin-top: 6px; padding-top: 14px; border-top: 1px dashed var(--line-2); animation: rise .4s var(--ease) both; }
.cal-step .sheet-intro b { color: var(--text); }
.exam-clear { display: block; margin: 0 auto 12px; font-size: 14px; }
.steps { display: grid; gap: 12px; margin: 4px 0 10px; }
.step-group { padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); font-size: 14.5px; }
.step-group ol { margin: 6px 0 0; padding-left: 1.2em; display: grid; gap: 4px; color: var(--muted); }
.step-group b { color: var(--text); }
.step-group code { font-family: var(--mono); font-size: 12.5px; background: var(--bg-2); padding: 1px 5px; border-radius: 5px; color: var(--text); }

/* owner dashboard */
.owner { animation: rise .45s var(--ease) both; padding-top: 4px; }
.owner .mind-title { margin-top: 6px; }
.owner-body { display: grid; gap: 10px; margin-top: 16px; }
.ow-key {
  padding: 16px; border-radius: 20px; border: 1.5px solid color-mix(in srgb, var(--gold) 45%, var(--line));
  background: radial-gradient(120% 140% at 100% 0%, var(--gold-soft), transparent 60%), var(--surface);
}
.ow-key p { margin: 2px 0 4px; font-size: 16px; }
.ow-key b { color: var(--gold); }
.ow-key small, .ow small { color: var(--faint); font-size: 12px; }
.ow-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 720px) { .ow-grid { grid-template-columns: repeat(4, 1fr); } }
.ow { display: grid; gap: 1px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.ow b { font-family: var(--serif); font-size: 32px; font-weight: 600; line-height: 1.05; }
.ow span { font-size: 13.5px; color: var(--muted); }
.ow-chart, .ow-wide { padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.ow-chart svg { width: 100%; height: 110px; display: block; margin-top: 6px; }
.b-ask { fill: var(--accent); opacity: .85; }
.b-check { fill: var(--gold); opacity: .85; }
.lg { text-transform: none; letter-spacing: 0; margin-left: 8px; font-size: 12px; }
.lg::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: 0; }
.lg-ask::before { background: var(--accent); }
.lg-check::before { background: var(--gold); }
.ow-wide p { margin: 4px 0 0; font-size: 14.5px; color: var(--muted); }
.ow-wide b { color: var(--text); }

/* revision notes: picture and the checks with their key points */
.ni-pic { float: right; margin: 0 0 8px 14px; width: 110px; display: grid; gap: 2px; }
.ni-pic img { width: 110px; max-height: 140px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.ni-pic figcaption { font-size: 10.5px; color: var(--faint); }
.ni-check ol { margin: 4px 0 0; padding-left: 1.2em; }
.ni-points { color: var(--faint); }
.ni-foot { clear: both; }
@media (max-width: 420px) { .ni-pic { width: 84px; } .ni-pic img { width: 84px; max-height: 110px; } }

@media (hover: none) {
  .ms-row:hover { border-color: var(--line); }
  .tool-chip:hover { color: var(--muted); }
}
@media print {
  .ni-pic img { border: 0; }
  .owner, .mind-settings, .lightbox { display: none !important; }
}
.ms-chips .zero { opacity: .55; }
.ms-chips .zero b { color: var(--muted); }
.ms-chips .secure b { color: var(--settled); }
.ms-chips .wait { border-style: dashed; }
.ms-first span { font-size: 18px; font-family: var(--serif); }
.ms-first small { margin-top: 4px; }
/* a message never hides the sheet you are using */
.sheet:not([hidden]) ~ .toast { bottom: auto; top: max(16px, env(safe-area-inset-top)); }
.setup-banner.is-offline { background: var(--surface); border-color: var(--line-2); color: var(--muted); }
.ow-chart svg { border-bottom: 1px solid var(--line-2); }

/* ======================================================================
   Part 5 — suggestions, the web is never closed, owner money
   ====================================================================== */
.ask { position: relative; }
.suggest-box {
  position: absolute; left: 0; right: 0; top: calc(100% - 22px); z-index: 8; margin: 0 4px; padding: 6px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); display: grid; gap: 2px; animation: rise .2s var(--ease) both;
}
main.has-answer .suggest-box { top: calc(100% - 2px); }
.sug {
  text-align: left; border: 0; background: transparent; color: var(--text); padding: 10px 12px; border-radius: 12px; cursor: pointer;
  font-size: 15px; line-height: 1.3;
}
.sug::before { content: "↗ "; color: var(--faint); }
.sug:hover, .sug:focus-visible { background: var(--accent-soft); outline: none; }
a.primary { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.limit-note { color: var(--faint); font-size: 12.5px; margin: 12px auto 0; max-width: 360px; }
.ow-bars { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.ow-bars > div { display: grid; gap: 1px; padding: 10px 12px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.ow-bars span { font-size: 12.5px; color: var(--muted); }
.ow-bars b { font-family: var(--serif); font-size: 26px; font-weight: 600; }
.ow-bars small { color: var(--faint); font-size: 12px; }
@media (hover: none) { .sug:hover { background: transparent; } }

/* ======================================================================
   Part 5 — Deep Answer. Violet = depth (the same colour as Pro), calm and readable; marks stay green / orange / purple.
   ====================================================================== */
:root { --deep: var(--pro-b); }
.ask-hint { justify-content: flex-start; align-items: center; gap: 10px; }
.ask-hint .count { margin-left: auto; }
.deep-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 5px 11px 5px 9px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 500;
  transition: color .2s, border-color .2s, background .2s, transform .2s var(--spring);
}
.deep-chip svg { width: 16px; height: 16px; }
.deep-chip:hover { color: var(--text); border-color: var(--deep); }
.deep-chip:active { transform: scale(.96); }
.deep-chip.is-on { color: #fff; border-color: transparent; background: linear-gradient(120deg, var(--pro-a), var(--deep)); box-shadow: 0 6px 18px -8px var(--deep); }
.ask-box.is-deep { border-color: color-mix(in srgb, var(--deep) 70%, var(--line-2)); }
.ask-box.is-deep:focus-within { border-color: var(--deep); box-shadow: var(--shadow), 0 0 0 4px color-mix(in srgb, var(--deep) 20%, transparent); }
.ask-box.is-deep .ask-btn { background: linear-gradient(135deg, var(--pro-a), var(--deep)); }
main:not(.has-answer) .ask-box.is-deep { animation: none; }
.deeper { display: inline-flex; align-items: center; gap: 7px; color: var(--deep); border-color: color-mix(in srgb, var(--deep) 55%, var(--line-2)); }
.deeper svg { width: 17px; height: 17px; }
.deeper:hover { color: #fff; background: var(--deep); border-color: var(--deep); }

/* the deep view */
main.deep-mode { max-width: 780px; }
.deep { margin-top: 14px; animation: rise .45s var(--ease) both; }
.deep-tag {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  letter-spacing: .04em; color: var(--deep); background: color-mix(in srgb, var(--deep) 12%, transparent); border: 1px solid color-mix(in srgb, var(--deep) 30%, transparent);
}
.deep-tag svg { width: 15px; height: 15px; }
.deep-asked { margin-top: 12px; }

/* while it works */
.deep-work { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 16px; box-shadow: var(--shadow); }
.dw-head { display: flex; align-items: center; gap: 14px; }
.dw-ring { position: relative; width: 64px; height: 64px; flex: none; display: grid; place-items: center; }
.dw-ring svg { position: absolute; inset: 0; width: 64px; height: 64px; transform: rotate(-90deg); }
.dw-ring circle { fill: none; stroke-width: 5; }
.dw-ring .g-fg { stroke: var(--deep); }
.dw-ring b { font-size: 13.5px; font-weight: 600; }
.dw-now { display: grid; gap: 2px; min-width: 0; }
.dw-phase { font-family: var(--serif); font-size: 20px; line-height: 1.25; }
.dw-phase::after { content: "…"; animation: blink 1.2s steps(2) infinite; }
.dw-sub { color: var(--muted); font-size: 13px; }
.dw-restated { margin: 14px 0 0; padding: 10px 12px; border-radius: 14px; background: var(--bg); font-size: 15px; }
.dw-restated .card-label { display: block; margin: 0 0 2px; }
.dw-plan { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; counter-reset: dp; }
.dp { display: grid; grid-template-columns: 18px 1fr; gap: 0 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.dp:last-child { border-bottom: 0; }
.dp i { grid-row: 1 / 3; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; border: 2px solid var(--line-2); }
.dp.st-searching i { border-color: var(--accent); animation: pulse 1.2s ease-in-out infinite; }
.dp.st-reading i { border-color: var(--deep); background: color-mix(in srgb, var(--deep) 35%, transparent); }
.dp.st-evidence i { border-color: var(--settled); background: var(--settled); }
.dp-q { font-size: 15px; line-height: 1.35; }
.dp-meta { font-size: 12.5px; color: var(--faint); }
.dp-meta b { color: var(--deep); font-weight: 600; }
.dw-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.dw-counts span { padding: 4px 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.dw-counts b { color: var(--text); font-weight: 600; }
.dw-counts .zero { opacity: .5; }
.dw-events { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--faint); }
.dw-events li { padding-left: 14px; position: relative; overflow: hidden; text-overflow: ellipsis; }
.dw-events li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 5px; height: 5px; border-radius: 50%; background: var(--line-2); }
.dw-events li.now { color: var(--text); animation: rise .35s var(--ease) both; }
.dw-events li.now::before { background: var(--deep); }
.dw-note { margin: 12px 0 0; font-size: 13px; color: var(--muted); padding: 8px 12px; border-radius: 12px; border: 1px dashed var(--line-2); }
@keyframes pulse { 50% { transform: scale(1.35); opacity: .6; } }

/* the report */
.dr-meta { color: var(--faint); font-size: 13px; margin: -8px 0 4px; }
.dr-overall { margin-top: 10px; }
.dr-block { margin-top: 24px; }
.dr-summary .prose p { font-size: 20px; }
.ds-debated { text-decoration: underline wavy color-mix(in srgb, var(--debated) 70%, transparent); text-decoration-thickness: 1.2px; text-underline-offset: 4px; }
.ds-unknown { text-decoration: underline dotted color-mix(in srgb, var(--unknown) 80%, transparent); text-decoration-thickness: 1.6px; text-underline-offset: 4px; }
.dr-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--faint); }
.ds-key { color: var(--muted); font-family: var(--sans); }
.dr-pic { margin-top: 22px; }
.dr-next { margin-top: 22px; }
.dr-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 24px 0 4px; }
.dr-toc a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; text-decoration: none; }
.dr-toc a i, .dr-mark i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.dr-toc a[data-mark="settled"] i, .dr-mark[data-mark="settled"] i { background: var(--settled); }
.dr-toc a[data-mark="debated"] i, .dr-mark[data-mark="debated"] i { background: var(--debated); }
.dr-toc a[data-mark="unknown"] i, .dr-mark[data-mark="unknown"] i { background: var(--unknown); }
.dr-sec { margin-top: 26px; scroll-margin-top: 90px; }
.dr-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 0 0 8px; font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.25; }
.dr-mark { display: inline-flex; align-items: center; gap: 6px; font-family: var(--sans); font-size: 12px; font-weight: 500; color: var(--muted); }
.dd { padding: 14px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--debated) 35%, var(--line)); background: color-mix(in srgb, var(--debated) 6%, var(--surface)); margin-bottom: 10px; }
.dd-point { display: block; font-family: var(--serif); font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.dd-sides { display: grid; gap: 8px; }
@media (min-width: 640px) { .dd-sides { grid-template-columns: 1fr 1fr; } }
.dd-side { padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.dd-side p { margin: 2px 0 0; font-size: 15px; }
.dd-n { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.dd .cite, .dr-timeline .cite, .dc-text .cite { color: var(--accent); font-size: .72em; vertical-align: super; margin-left: 2px; text-decoration: none; }
.dr-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.dr-table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.dr-table caption { text-align: left; padding: 12px 14px 4px; font-weight: 600; }
.dr-table th, .dr-table td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.dr-table th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.dr-table tr:last-child td { border-bottom: 0; }
.dr-timeline { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid color-mix(in srgb, var(--deep) 40%, var(--line)); display: grid; gap: 12px; }
.dr-timeline li { position: relative; }
.dr-timeline li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--deep); }
.dr-timeline time { font-size: 12.5px; font-weight: 600; color: var(--deep); }
.dr-timeline p { margin: 2px 0 0; font-size: 15px; }
.dr-counter { padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.dc-text { font-family: var(--serif); font-size: 19px; font-style: italic; margin: 4px 0 10px; }
.dc-verdict { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 14.5px; color: var(--muted); }
.dc-verdict i { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--settled); }
.dr-counter[data-v="partly"] .dc-verdict i { background: var(--unknown); }
.dr-counter[data-v="qualified"] .dc-verdict i { background: var(--debated); }
.dr-concl .prose p { font-size: 20px; }
.dr-pack { padding: 16px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.dp-points { margin: 4px 0 12px; padding-left: 1.2em; display: grid; gap: 4px; font-size: 15.5px; }
.dp-checks { font-size: 14.5px; color: var(--muted); margin-bottom: 14px; }
.dp-checks b { color: var(--text); }
.dp-checks ol { margin: 6px 0 0; padding-left: 1.3em; display: grid; gap: 2px; }
.dr-pack .fine { margin-top: 10px; }
.src-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.kind { font-style: normal; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; padding: 1px 7px; border-radius: 999px; background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); }
.kind-official { color: var(--settled); border-color: color-mix(in srgb, var(--settled) 40%, var(--line)); }
.kind-academic { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.kind-weak { color: var(--debated); }
.kind-orig { color: #fff; background: linear-gradient(120deg, var(--pro-a), var(--deep)); border-color: transparent; }
.dsrc { scroll-margin-top: 100px; }
.dr-how p { color: var(--muted); font-size: 14px; margin: 0; }
.deep-fail { margin-top: 10px; }
.deep-fail .actions { margin-top: 14px; }
.deep-actions { margin-top: 26px; }

/* the sheet */
.deepsheet { text-align: center; }
.deep-mark { width: 60px; height: 60px; margin: 0 auto 12px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--pro-a), var(--deep)); box-shadow: 0 10px 30px -10px var(--deep); }
.deep-mark svg { width: 30px; height: 30px; }
.deepsheet .sheet-intro { text-align: left; }
.deep-q { font-family: var(--serif); font-size: 19px; line-height: 1.3; margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg); text-align: left; }
.deep-left { font-size: 15px; margin: 0 0 12px; }
.deep-left b { color: var(--deep); font-size: 17px; }
#deepGo, #deepPack { background: linear-gradient(120deg, var(--pro-a), var(--deep)); border: 0; }
.sheet-close-link { display: block; margin: 4px auto 0; font-size: 14px; }

/* My Mind: your Deep Answers */
.deep-mine { margin: 14px 0 6px; }
.dm-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--deep); }
.dm-head svg { width: 16px; height: 16px; }
.dm-head small { margin-left: auto; letter-spacing: 0; text-transform: none; color: var(--faint); font-size: 12.5px; }
.dm-list { display: grid; gap: 6px; }
.dm {
  display: grid; gap: 2px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 16px; cursor: pointer; color: var(--text);
  border: 1px solid color-mix(in srgb, var(--deep) 25%, var(--line)); background: var(--surface); transition: border-color .2s, transform .2s var(--ease);
}
.dm:hover { border-color: var(--deep); transform: translateY(-1px); }
.dm-q { font-family: var(--serif); font-size: 17px; line-height: 1.3; }
.dm-meta { font-size: 12.5px; color: var(--faint); }
.dm.st-working .dm-meta { color: var(--deep); }
.dm.st-failed { opacity: .65; }
.dm-try { border-style: dashed; }

/* Save as PDF: the report on white paper */
@media print {
  main > *:not(#notes):not(#deep) { display: none !important; }
  body.print-deep #deep { display: block !important; }
  .deep-actions, .dr-toc, .deep-work, .dr-pack .keep, .dr-next .next-go { display: none !important; }
  .deep { animation: none !important; }
  .dr-sec, .dr-block, .dd { break-inside: avoid; page-break-inside: avoid; box-shadow: none !important; }
  .dr-h { break-after: avoid; page-break-after: avoid; }
  .src { break-inside: avoid; }
  .sources-list { grid-template-columns: 1fr !important; }
  .src-title { white-space: normal; }
}
.dp.st-searched i { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 25%, transparent); }

/* ======================================================================
   Laptops and desktops: every screen uses the space (app v0.5.2).
   Phones and small tablets are untouched: everything below is for wide screens only,
   except .dr-side and .ow-axis, which phones never show.
   ====================================================================== */
.dr-side, .ow-axis { display: none; }
.b-hit { fill: transparent; }

/* pop-up boxes open in the middle of the screen, like a laptop app */
@media screen and (min-width: 900px) {
  .sheet {
    top: 50%; bottom: auto; left: 50%; right: auto; margin: 0; width: min(560px, calc(100vw - 48px)); max-width: none;
    border-radius: 24px; padding: 26px 28px 24px; max-height: calc(100dvh - 48px);
    transform: translate(-50%, -50%); animation-name: sheetpop;
    box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .55), 0 0 0 1px var(--line);
  }
  .sheet-handle { display: none; }
  .sheet-backdrop { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
  @keyframes sheetpop {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)) scale(.985); }
    to { opacity: 1; transform: translate(-50%, -50%); }
  }
}

/* My Mind: your things on the left; your plan and settings on the right */
@media screen and (min-width: 1000px) {
  main.mind-mode:not(.notes-mode) { max-width: 1140px; padding-left: 28px; padding-right: 28px; }
  .mind { display: grid; grid-template-columns: minmax(0, 1fr) 344px; grid-template-rows: auto auto auto 1fr; column-gap: 32px; align-items: start; }
  .mind-head { grid-column: 1 / -1; grid-row: 1; margin: 22px 0 8px; display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
  .mind-title { font-size: 52px; }
  .mind-sub { font-size: 17px; }
  .mind-main { grid-column: 1; grid-row: 2 / 5; min-width: 0; }
  .mind > .plan-card { grid-column: 2; grid-row: 2; }
  .mind > .mind-settings { grid-column: 2; grid-row: 3; margin-top: 22px; }
  .mind > .mind-foot { grid-column: 2; grid-row: 4; margin-top: 22px; }
  .mind > .plan-card .pc-tools { grid-template-columns: 1fr; gap: 6px; }
  .mind > .plan-card .pc-tool { grid-template-columns: 30px 1fr; column-gap: 12px; align-items: center; padding: 10px 12px; }
  .mind > .plan-card .pc-tool .pc-ic { grid-row: 1 / 3; margin: 0; }
  .mind-summary { padding: 22px 24px 18px; }
  .ms-big b { font-size: 58px; }
  .ms-gauge, .ms-gauge svg { width: 92px; height: 92px; }
  .ms-gauge span { font-size: 16px; }
  .mind-main .mi, .mind-main .dm { padding: 15px 16px; }
  .mind-main .mind-list { gap: 26px; margin-top: 24px; }
  .mind-main .deep-mine { margin-top: 22px; }
  .mind-empty { padding-top: 60px; }
}
@media screen and (min-width: 1200px) {
  .mind-main .mind-items, .mind-main .dm-list { grid-template-columns: 1fr 1fr; gap: 10px; }
  .mind-main .mi, .mind-main .dm { height: 100%; }
}

/* the owner dashboard: a real dashboard */
@media screen and (min-width: 1000px) {
  main.notes-mode.owner-mode { max-width: 1140px; padding-left: 28px; padding-right: 28px; }
  .owner .mind-title { font-size: 52px; }
  .owner-body { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
  .owner-body > * { grid-column: span 12; }
  .owner-body > .ow-key { grid-column: span 4; display: flex; flex-direction: column; justify-content: center; padding: 20px 22px; }
  .ow-key p { font-size: 17px; line-height: 1.45; }
  .ow-key b { font-family: var(--serif); font-size: 26px; font-weight: 600; display: inline-block; }
  .owner-body > .ow-grid { grid-column: span 8; grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .ow { padding: 18px 18px 16px; align-content: start; }
  .ow b { font-size: 44px; }
  .ow span { font-size: 14.5px; }
  .owner-body > .ow-chart { grid-column: span 8; padding: 18px 20px 14px; }
  .ow-chart svg { height: 200px; margin-top: 12px; }
  .ow-axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); margin-top: 6px; }
  .ow-chart g:hover .b-hit { fill: color-mix(in srgb, var(--accent) 8%, transparent); }
  .owner-body > .ow-honest { grid-column: span 4; display: flex; flex-direction: column; justify-content: center; padding: 20px 22px; }
  .ow-honest p { font-size: 17px; line-height: 1.5; }
  .owner-body > .ow-money, .owner-body > .ow-deep { grid-column: span 6; padding: 18px 20px; }
  .owner-body > .ow-full { grid-column: span 12; }
  .owner-body > .ow-pay { grid-column: span 12; padding: 16px 20px; }
  .ow-wide p { font-size: 15px; }
}

/* Deep Answer: two columns while it works; the report with a side panel */
@media screen and (min-width: 1100px) {
  main.deep-mode { max-width: 1140px; padding-left: 28px; padding-right: 28px; }
  .deep-asked { font-size: clamp(34px, 3vw, 44px); }
  .deep-work {
    display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr;
    grid-template-areas: "head head" "rest side" "plan side"; column-gap: 34px; padding: 24px 26px;
  }
  .dw-head { grid-area: head; }
  .dw-ring, .dw-ring svg { width: 76px; height: 76px; }
  .dw-ring b { font-size: 15px; }
  .dw-phase { font-size: 24px; }
  .dw-restated { grid-area: rest; }
  .dw-plan { grid-area: plan; }
  .dw-side {
    grid-area: side; align-self: start; margin-top: 14px; padding: 16px 18px; border-radius: 18px;
    background: var(--bg); border: 1px solid var(--line); min-width: 0;
  }
  .dw-side::before { content: "Live"; display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--deep); }
  .dw-side .dw-counts { margin-top: 10px; }
  .dw-side .dw-events { font-size: 13.5px; gap: 6px; }
  .dw-side .dw-events li { white-space: normal; }

  #deepReport { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 48px; align-items: start; }
  .dr-main { min-width: 0; }
  .dr-main > .dr-meta, .dr-main > .dr-overall, .dr-main > .dr-toc { display: none; }
  .dr-main > .dr-summary { margin-top: 6px; }
  .dr-main .dr-summary .prose p, .dr-main .dr-concl .prose p { font-size: 21px; line-height: 1.6; }
  .dr-main .dr-sec .prose p { font-size: 18px; }
  .dr-side {
    display: grid; gap: 12px; position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto;
    padding: 2px 2px 8px; scrollbar-width: thin;
  }
  .ds-card { padding: 14px 18px 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
  .ds-card[data-mark="settled"] { border-color: color-mix(in srgb, var(--settled) 40%, var(--line)); }
  .ds-card[data-mark="debated"] { border-color: color-mix(in srgb, var(--debated) 40%, var(--line)); }
  .ds-card[data-mark="unknown"] { border-color: color-mix(in srgb, var(--unknown) 40%, var(--line)); }
  .ds-mark { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 21px; margin-top: 6px; }
  .ds-mark i { width: 11px; height: 11px; border-radius: 50%; background: var(--faint); flex: none; }
  .ds-card[data-mark="settled"] .ds-mark i { background: var(--settled); box-shadow: 0 0 0 4px color-mix(in srgb, var(--settled) 18%, transparent); }
  .ds-card[data-mark="debated"] .ds-mark i { background: var(--debated); box-shadow: 0 0 0 4px color-mix(in srgb, var(--debated) 18%, transparent); }
  .ds-card[data-mark="unknown"] .ds-mark i { background: var(--unknown); box-shadow: 0 0 0 4px color-mix(in srgb, var(--unknown) 18%, transparent); }
  .ds-why { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
  .ds-stats { margin: 10px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--faint); }
  .ds-stats b { color: var(--text); font-weight: 600; }
  .ds-toc { display: grid; gap: 1px; padding: 12px 10px 8px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
  .ds-toc .card-label { padding: 0 8px 6px; }
  .ds-toc a {
    display: grid; grid-template-columns: 8px 1fr; gap: 10px; align-items: baseline; padding: 6px 8px; border-radius: 10px;
    color: var(--muted); text-decoration: none; font-size: 13.5px; line-height: 1.35; transition: background .2s, color .2s;
  }
  .ds-toc a i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); transform: translateY(-1px); }
  .ds-toc a[data-mark="settled"] i { background: var(--settled); }
  .ds-toc a[data-mark="debated"] i { background: var(--debated); }
  .ds-toc a[data-mark="unknown"] i { background: var(--unknown); }
  .ds-toc a.ds-extra { grid-template-columns: 1fr; padding-left: 26px; font-size: 13.5px; }
  .ds-toc a:not(.ds-extra) + a.ds-extra { margin-top: 13px; position: relative; }
  .ds-toc a:not(.ds-extra) + a.ds-extra::before { content: ""; position: absolute; left: 8px; right: 8px; top: -7px; border-top: 1px solid var(--line); }
  .ds-toc a:hover { background: var(--bg-2); color: var(--text); }
  .ds-toc a.is-here { background: color-mix(in srgb, var(--deep) 10%, transparent); color: var(--text); font-weight: 500; }
  .ds-actions { display: grid; gap: 8px; }
  .ds-actions .keep { width: 100%; justify-content: center; }
  .ds-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .ds-row .ghost { width: 100%; padding-left: 8px; padding-right: 8px; }
}
@media screen and (min-width: 1100px) and (hover: none) {
  .ds-toc a:hover { background: transparent; color: var(--muted); }
}
@media print {
  .dr-side { display: none !important; }
  #deepReport { display: block !important; }
}
