/* ==========================================================================
   Things I Believe — one stylesheet, no dependencies.
   Light and dark are both defined via tokens on :root.
   ========================================================================== */

:root {
  color-scheme: light dark;

  --bg:            #fbf9f5;
  --bg-sunk:       #f2eee6;
  --surface:       #ffffff;
  --surface-alt:   #f7f4ee;
  --border:        #e2dcd0;
  --border-strong: #cec6b5;

  --text:          #241f1a;
  --text-soft:     #5c554a;
  --text-faint:    #857d70;

  --accent:        #5b4cc4;
  --accent-hover:  #4a3cae;
  --accent-soft:   #eceafb;
  --accent-text:   #ffffff;

  --ok:            #1f6d4a;
  --ok-soft:       #e2f2e9;
  --warn:          #9a5b12;
  --warn-soft:     #fbeeda;
  --danger:        #a3271f;
  --danger-soft:   #fbe7e5;

  --agree:         #1f6d4a;
  --agree-soft:    #e2f2e9;
  --partly:        #8a6212;
  --partly-soft:   #f9eed8;
  --disagree:      #a3271f;
  --disagree-soft: #fbe7e5;
  --unsure:        #5c554a;
  --unsure-soft:   #efece6;

  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  --shadow:    0 1px 2px rgb(36 31 26 / 0.05), 0 4px 16px -6px rgb(36 31 26 / 0.10);
  --shadow-lg: 0 2px 4px rgb(36 31 26 / 0.06), 0 16px 40px -12px rgb(36 31 26 / 0.18);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --measure: 68ch;
  --page: 1140px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #16151a;
    --bg-sunk:       #100f13;
    --surface:       #1e1d24;
    --surface-alt:   #26252d;
    --border:        #34323d;
    --border-strong: #4a4854;

    --text:          #ece9f0;
    --text-soft:     #b3aec0;
    --text-faint:    #8b8698;

    --accent:        #a99bf5;
    --accent-hover:  #bcb1ff;
    --accent-soft:   #2a2740;
    --accent-text:   #16151a;

    --ok:            #6ddba0;
    --ok-soft:       #172c22;
    --warn:          #e6b665;
    --warn-soft:     #2e2517;
    --danger:        #f08b81;
    --danger-soft:   #33191a;

    --agree:         #6ddba0;
    --agree-soft:    #172c22;
    --partly:        #e6b665;
    --partly-soft:   #2e2517;
    --disagree:      #f08b81;
    --disagree-soft: #33191a;
    --unsure:        #b3aec0;
    --unsure-soft:   #26252d;

    --shadow:    0 1px 2px rgb(0 0 0 / 0.4), 0 4px 16px -6px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / 0.4), 0 16px 40px -12px rgb(0 0 0 / 0.6);
  }
}

/* --- reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.65rem); }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.95rem; font-family: var(--font); text-transform: uppercase;
     letter-spacing: 0.06em; color: var(--text-faint); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }

img, svg { max-width: 100%; }
code { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface-alt);
       padding: 0.1em 0.35em; border-radius: 4px; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--accent-text);
  padding: 0.75rem 1.25rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

.muted { color: var(--text-faint); }
.lede { color: var(--text-soft); font-size: 1.05rem; }

/* --- header --------------------------------------------------------------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.bar {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-right: auto;
  letter-spacing: -0.02em;
}
.wordmark:hover { color: var(--text); }

.beta-tag {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  line-height: 1;
}

.wordmark-mark {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  background: var(--accent);
  box-shadow: inset 0 0 0 3px var(--surface), 0 0 0 1.5px var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.site-nav a:hover { background: var(--surface-alt); color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }
.site-nav .nav-cta { margin-left: 0.35rem; }
/* Beat the `.site-nav a` colour rule above, which is more specific than .btn-primary. */
.site-nav a.btn-primary,
.site-nav a.btn-primary:hover { color: var(--accent-text); background: var(--accent); }
.site-nav a.btn-primary:hover { background: var(--accent-hover); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 40px; height: 38px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
  position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding-top: 0.5rem;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.7rem 0.75rem; }
  .site-nav .nav-cta { margin: 0.4rem 0 0; text-align: center; }
}

/* --- page shell ----------------------------------------------------------- */

.page {
  flex: 1;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
.page-wide { max-width: var(--page); }
.narrow { max-width: var(--measure); margin: 0 auto; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.page-head h1 { margin-bottom: 0.25rem; }
.page-foot { margin-top: 2.5rem; font-size: 0.925rem; }

.section { margin-top: 3rem; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.section-head h2 { margin-bottom: 0.5rem; }
.section-head a { font-size: 0.925rem; }

.count {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-faint);
  background: var(--surface-alt);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  vertical-align: middle;
}

.breadcrumb { font-size: 0.925rem; margin-bottom: 1rem; }

/* --- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font: inherit;
  font-weight: 550;
  font-size: 0.95rem;
  line-height: 1.2;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-text); }

.btn-quiet {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-quiet:hover { background: var(--surface-alt); color: var(--text); }

.btn-ghost { background: transparent; color: var(--text-soft); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-alt); color: var(--text); }

.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--bg); }

.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.875rem; }
.btn-lg { padding: 0.85rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

.form-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.5rem;
}
.inline-form { display: inline-block; margin: 0 0.5rem 0.5rem 0; }

/* --- forms ---------------------------------------------------------------- */

.stack { display: flex; flex-direction: column; gap: 1.35rem; }
.stack .form-actions { margin-top: 0; }

.field { display: flex; flex-direction: column; gap: 0.4rem; border: 0; padding: 0; margin: 0; }
.field > label, .field > legend {
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--text);
  padding: 0;
}

input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input:not([type]), textarea, select {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  width: 100%;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
textarea { resize: vertical; line-height: 1.55; }

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 1rem center, right 0.7rem center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}

.hint { font-size: 0.85rem; color: var(--text-faint); margin: 0; }

.input-prefix {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding-left: 0.8rem;
}
.input-prefix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-prefix span { color: var(--text-faint); font-weight: 500; }
.input-prefix input { border: none; box-shadow: none; padding-left: 0.15rem; background: transparent; }
.input-prefix input:focus { box-shadow: none; }

.choice {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}
.choice + .choice { margin-top: 0.5rem; }
.choice:hover { border-color: var(--border-strong); }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin-top: 0.3rem; flex: none; accent-color: var(--accent); }
.choice span { display: flex; flex-direction: column; gap: 0.1rem; }
.choice strong { font-weight: 600; font-size: 0.95rem; }
.choice em { font-style: normal; font-size: 0.875rem; color: var(--text-soft); }
.choice-compact { padding: 0.65rem 0.8rem; }
.choice-compact + .choice-compact { margin-top: 0; }

.position-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.5rem; }

.checkbox {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.925rem;
  color: var(--text-soft);
  cursor: pointer;
}
.checkbox input { margin-top: 0.25rem; accent-color: var(--accent); flex: none; }

.slider-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.slider-row input[type="range"] { flex: 1 1 240px; width: auto; accent-color: var(--accent); }

.slider-readout {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface-alt);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  white-space: nowrap;
}

.filters {
  display: flex;
  gap: 0.85rem;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}
.field-inline { flex: 1 1 190px; gap: 0.3rem; }
.field-inline > label { font-size: 0.8rem; color: var(--text-faint); font-weight: 600;
                        text-transform: uppercase; letter-spacing: 0.04em; }

/* --- flashes & callouts --------------------------------------------------- */

.flash {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.75rem;
  border: 1px solid;
  font-size: 0.95rem;
}
.flash ul { margin: 0; padding-left: 1.2rem; }
.flash-ok { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.flash-error { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

.callout {
  padding: 1.1rem 1.25rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
  margin: 1.75rem 0;
  font-size: 0.95rem;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
}

.profile-links-note {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
  cursor: help;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.tag-link {
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.tag-link:hover,
.tag-link:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
}

.filter-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.input-inline {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

.hero-beta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* --- copy-for-an-LLM panel ------------------------------------------------ */

.llm-export {
  margin: 1.75rem 0;
  padding: 1.25rem 1.35rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.llm-export h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.llm-export p {
  margin: 0;
  font-size: 0.95rem;
}

.llm-export-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.copy-status {
  font-size: 0.9rem;
  color: var(--muted);
}

.llm-preview {
  margin-top: 0.9rem;
  font-size: 0.9rem;
}

.llm-preview summary {
  cursor: pointer;
  color: var(--muted);
}

.llm-preview-body {
  margin-top: 0.75rem;
  max-height: 22rem;
  overflow: auto;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* --- cards & grid --------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.belief-card { display: flex; flex-direction: column; gap: 0.7rem; }
.belief-card.is-due { border-color: var(--warn); }

.card-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.card-title {
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 0;
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: 0;
}
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--accent); text-decoration: underline; }

.card-meta { font-size: 0.85rem; color: var(--text-faint); margin: 0; }
.author-link { font-weight: 500; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text-soft);
  border: 1px solid var(--border);
}
.tag-public   { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tag-private  { background: var(--surface-alt); color: var(--text-faint); }
.tag-due      { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tag-muted    { background: transparent; color: var(--text-faint); }
.tag-agree    { background: var(--agree-soft); color: var(--agree); border-color: transparent; }
.tag-partly   { background: var(--partly-soft); color: var(--partly); border-color: transparent; }
.tag-disagree { background: var(--disagree-soft); color: var(--disagree); border-color: transparent; }
.tag-unsure   { background: var(--unsure-soft); color: var(--unsure); border-color: transparent; }

/* --- conviction bar ------------------------------------------------------- */

.conviction { display: flex; align-items: center; gap: 0.7rem; }

.conviction-track {
  flex: 1;
  height: 9px;
  background: var(--bg-sunk);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.conviction-sm .conviction-track { height: 7px; }

.conviction-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 999px;
}

.conviction-value {
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--text-soft);
  white-space: nowrap;
}
.conviction-unit { color: var(--text-faint); font-weight: 400; }
.conviction-word { font-size: 0.85rem; color: var(--text-faint); }


/* Conviction bar widths as classes, so no inline style attribute is needed
   and the Content-Security-Policy can stay strict (no unsafe-inline). */
.cf-0 { width: 0%; }
.cf-1 { width: 1%; }
.cf-2 { width: 2%; }
.cf-3 { width: 3%; }
.cf-4 { width: 4%; }
.cf-5 { width: 5%; }
.cf-6 { width: 6%; }
.cf-7 { width: 7%; }
.cf-8 { width: 8%; }
.cf-9 { width: 9%; }
.cf-10 { width: 10%; }
.cf-11 { width: 11%; }
.cf-12 { width: 12%; }
.cf-13 { width: 13%; }
.cf-14 { width: 14%; }
.cf-15 { width: 15%; }
.cf-16 { width: 16%; }
.cf-17 { width: 17%; }
.cf-18 { width: 18%; }
.cf-19 { width: 19%; }
.cf-20 { width: 20%; }
.cf-21 { width: 21%; }
.cf-22 { width: 22%; }
.cf-23 { width: 23%; }
.cf-24 { width: 24%; }
.cf-25 { width: 25%; }
.cf-26 { width: 26%; }
.cf-27 { width: 27%; }
.cf-28 { width: 28%; }
.cf-29 { width: 29%; }
.cf-30 { width: 30%; }
.cf-31 { width: 31%; }
.cf-32 { width: 32%; }
.cf-33 { width: 33%; }
.cf-34 { width: 34%; }
.cf-35 { width: 35%; }
.cf-36 { width: 36%; }
.cf-37 { width: 37%; }
.cf-38 { width: 38%; }
.cf-39 { width: 39%; }
.cf-40 { width: 40%; }
.cf-41 { width: 41%; }
.cf-42 { width: 42%; }
.cf-43 { width: 43%; }
.cf-44 { width: 44%; }
.cf-45 { width: 45%; }
.cf-46 { width: 46%; }
.cf-47 { width: 47%; }
.cf-48 { width: 48%; }
.cf-49 { width: 49%; }
.cf-50 { width: 50%; }
.cf-51 { width: 51%; }
.cf-52 { width: 52%; }
.cf-53 { width: 53%; }
.cf-54 { width: 54%; }
.cf-55 { width: 55%; }
.cf-56 { width: 56%; }
.cf-57 { width: 57%; }
.cf-58 { width: 58%; }
.cf-59 { width: 59%; }
.cf-60 { width: 60%; }
.cf-61 { width: 61%; }
.cf-62 { width: 62%; }
.cf-63 { width: 63%; }
.cf-64 { width: 64%; }
.cf-65 { width: 65%; }
.cf-66 { width: 66%; }
.cf-67 { width: 67%; }
.cf-68 { width: 68%; }
.cf-69 { width: 69%; }
.cf-70 { width: 70%; }
.cf-71 { width: 71%; }
.cf-72 { width: 72%; }
.cf-73 { width: 73%; }
.cf-74 { width: 74%; }
.cf-75 { width: 75%; }
.cf-76 { width: 76%; }
.cf-77 { width: 77%; }
.cf-78 { width: 78%; }
.cf-79 { width: 79%; }
.cf-80 { width: 80%; }
.cf-81 { width: 81%; }
.cf-82 { width: 82%; }
.cf-83 { width: 83%; }
.cf-84 { width: 84%; }
.cf-85 { width: 85%; }
.cf-86 { width: 86%; }
.cf-87 { width: 87%; }
.cf-88 { width: 88%; }
.cf-89 { width: 89%; }
.cf-90 { width: 90%; }
.cf-91 { width: 91%; }
.cf-92 { width: 92%; }
.cf-93 { width: 93%; }
.cf-94 { width: 94%; }
.cf-95 { width: 95%; }
.cf-96 { width: 96%; }
.cf-97 { width: 97%; }
.cf-98 { width: 98%; }
.cf-99 { width: 99%; }
.cf-100 { width: 100%; }

/* --- belief detail -------------------------------------------------------- */

.belief-detail { max-width: var(--measure); margin: 0 auto; }

.belief-title {
  font-size: clamp(1.55rem, 1.2rem + 1.5vw, 2.2rem);
  margin: 0.6rem 0 0.4rem;
}
.belief-byline { color: var(--text-faint); font-size: 0.9rem; margin-bottom: 1.75rem; }

.belief-conviction {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.75rem;
}
.stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 0.5rem;
}
.stat-value { font-size: 1.1rem; font-weight: 600; margin: 0; }
.stat-sub { font-size: 0.825rem; color: var(--text-faint); margin: 0.15rem 0 0; }

.shift { font-size: 1.5rem; font-weight: 650; margin: 0; font-variant-numeric: tabular-nums; }
.shift-unit { font-size: 0.8rem; font-weight: 500; color: var(--text-faint); }

.delta { font-size: 0.825rem; font-weight: 600; }
.delta-up { color: var(--ok); }
.delta-down { color: var(--danger); }
.delta-flat { color: var(--text-faint); }

/* --- chart ---------------------------------------------------------------- */

.chart {
  margin: 2.5rem 0;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.chart figcaption {
  font-size: 0.75rem; font-weight: 650; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 1rem;
}
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-area { fill: var(--accent); opacity: 0.10; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2.5;
              stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }
.chart-axis {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: var(--text-faint); margin-top: 0.6rem;
}

/* --- timeline ------------------------------------------------------------- */

.history { margin-top: 3rem; }

.timeline { list-style: none; margin: 1.5rem 0 0; padding: 0 0 0 1.5rem; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px;
  width: 2px; background: var(--border);
}

.timeline-item { position: relative; padding-bottom: 2.25rem; }
.timeline-item::before {
  content: ""; position: absolute; left: -1.5rem; top: 7px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--bg);
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.timeline-head time { font-weight: 650; font-size: 0.925rem; }

.timeline-conviction {
  display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap;
  margin: 0.5rem 0 0.75rem; max-width: 420px;
}
.timeline-conviction .conviction { flex: 1 1 200px; }

.timeline-rename { font-size: 0.875rem; color: var(--text-faint); font-style: italic; margin: 0 0 0.6rem; }

.timeline-note {
  background: var(--surface-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}
.timeline-note h4 { margin: 0 0 0.2rem; }
.timeline-note p { font-size: 0.95rem; margin: 0; }

.timeline-body { font-size: 0.95rem; color: var(--text-soft); }
.timeline-body p { margin-bottom: 0.6em; }

.prose p { margin-bottom: 0.8em; }

/* --- prior quote on the revisit form -------------------------------------- */

.prior {
  margin: 1.75rem 0;
  padding: 1.15rem 1.35rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.prior-label {
  font-size: 0.75rem; font-weight: 650; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 0.5rem;
}
.prior-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }
.prior p:last-child { margin-bottom: 0; }

/* --- respond -------------------------------------------------------------- */

.respond {
  margin: 2.5rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.respond h2 { margin-bottom: 0.3rem; }
.respond > .muted { font-size: 0.9rem; margin-bottom: 1.25rem; }

.quick-respond { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 1rem; }
.quick-respond .card-title { margin-bottom: 0.35rem; }
.quick-form { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.85rem 0 0.6rem; }

/* --- dashboard ------------------------------------------------------------ */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat .stat-label { margin: 0.25rem 0 0; text-transform: none; letter-spacing: 0;
                    font-size: 0.85rem; font-weight: 500; }

.shift-list, .response-list, .upcoming, .plain-list, .review-queue {
  list-style: none; margin: 1rem 0 0; padding: 0;
}
.shift-list li, .upcoming li, .plain-list li {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding: 0.8rem 0; border-bottom: 1px solid var(--border);
}
.shift-list li:last-child, .upcoming li:last-child, .plain-list li:last-child { border-bottom: none; }
.shift-figures { display: flex; align-items: baseline; gap: 0.5rem;
                 font-variant-numeric: tabular-nums; font-weight: 600; }

.response-list li { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.response-list li:last-child { border-bottom: none; }
.response-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
                 font-size: 0.9rem; margin-bottom: 0.35rem; }
.response-belief { display: block; font-weight: 500; color: var(--text); text-decoration: none; }
.response-belief:hover { color: var(--accent); text-decoration: underline; }
.response-note { font-size: 0.9rem; color: var(--text-soft); margin: 0.35rem 0 0;
                 padding-left: 0.85rem; border-left: 2px solid var(--border); }

.review-queue { display: grid; gap: 1rem; }
.review-item { display: flex; flex-direction: column; gap: 0.6rem; }
.review-item .card-title { font-size: 1.15rem; }

.steps { padding-left: 1.3rem; display: flex; flex-direction: column; gap: 0.6rem; margin: 1.5rem 0; }
.steps li { padding-left: 0.3rem; }

/* --- compare -------------------------------------------------------------- */

.score {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.score-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 600;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.score-body p { margin: 0; }
.score-body p + p { margin-top: 0.2rem; font-size: 0.9rem; }

.compare-card { display: flex; flex-direction: column; gap: 0.7rem; }
.compare-note {
  margin: 0;
  padding: 0.7rem 0.9rem;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.compare-note p { margin: 0 0 0.3rem; }
.compare-note cite { font-style: normal; font-size: 0.8rem; color: var(--text-faint); }

.explainer { padding: 1.5rem; background: var(--surface-alt); border-radius: var(--radius); }
.explainer h2 { margin-top: 0; }

/* --- profile -------------------------------------------------------------- */

.profile-head { margin-bottom: 2.5rem; }
.profile-head h1 { margin-bottom: 0.1rem; }
.handle { color: var(--text-faint); font-family: var(--font-mono); font-size: 0.925rem; margin-bottom: 0.75rem; }
.bio { max-width: var(--measure); }

/* --- auth ----------------------------------------------------------------- */

.auth-shell { display: flex; justify-content: center; padding-top: 1rem; }
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 { margin-bottom: 0.3rem; }
.auth-card .lede { margin-bottom: 1.75rem; }
.auth-alt { margin-top: 1.5rem; font-size: 0.925rem; text-align: center; }
.auth-fineprint {
  margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-faint); text-align: center;
}

/* --- landing -------------------------------------------------------------- */

.hero { text-align: center; padding: 3rem 0 3.5rem; max-width: 44rem; margin: 0 auto; }
.hero h1 { font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.6rem); margin-bottom: 0.5rem; }
.hero-lede { font-size: clamp(1.05rem, 1rem + 0.35vw, 1.2rem); color: var(--text-soft); }
.hero-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.hero-fineprint { margin-top: 1.25rem; font-size: 0.875rem; color: var(--text-faint); }

.how { margin-top: 2rem; }
.how > h2 { text-align: center; margin-bottom: 2rem; }
.how-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem;
}
.how-grid li {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.how-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: 0.9rem; margin-bottom: 0.85rem;
}
.how-grid h3 { margin-bottom: 0.4rem; font-family: var(--font); }
.how-grid p { font-size: 0.925rem; color: var(--text-soft); margin: 0; }

.pitch {
  margin-top: 3.5rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem;
}
.pitch-item h2 { font-size: 1.25rem; }
.pitch-item p { color: var(--text-soft); font-size: 0.95rem; margin: 0; }

.cta {
  margin-top: 4rem; text-align: center;
  padding: 3rem 1.5rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.cta h2 { margin-bottom: 0.3rem; }
.cta p { color: var(--text-soft); margin-bottom: 1.75rem; }

/* --- misc ----------------------------------------------------------------- */

.empty {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.empty h2 { margin-bottom: 0.4rem; }
.empty-body { color: var(--text-soft); max-width: 44ch; margin: 0 auto 1.5rem; }
.empty-body:last-child { margin-bottom: 0; }

.pagination { display: flex; align-items: center; justify-content: center;
              gap: 1rem; margin-top: 2.5rem; }

.danger {
  margin-top: 3rem;
  padding: 1.5rem;
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  background: var(--danger-soft);
}
.danger h2 { color: var(--danger); margin-top: 0; font-size: 1.15rem; }
.danger p { font-size: 0.925rem; }

.prose-page h2 { margin-top: 2.25rem; }
.prose-page ul { padding-left: 1.3rem; }
.prose-page li { margin-bottom: 0.45rem; }

/* --- footer --------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: auto;
}
.footer-inner {
  max-width: var(--page); margin: 0 auto; padding: 2.5rem 1.25rem;
  display: flex; flex-direction: column; gap: 0.85rem; align-items: flex-start;
}
.footer-brand { font-family: var(--font-display); font-weight: 600; margin: 0; }
.footer-inner nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-inner nav a { font-size: 0.9rem; color: var(--text-soft); text-decoration: none; }
.footer-inner nav a:hover { color: var(--accent); text-decoration: underline; }
.footer-note { font-size: 0.85rem; color: var(--text-faint); margin: 0; max-width: 52ch; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
