/*
 * Pathfinder (mockup 2): guided by your goal.
 *
 * One question at a time, with the path so far always visible as a trail you can step back
 * along. The trail is the one bold element; everything around it stays quiet.
 * Only shared tokens are used; new values are tints mixed from token colours.
 */

:root {
  --header-h: 58px;
  --gutter: clamp(16px, 4vw, 40px);
  --rail-w: 252px;
  --sticky-top: calc(var(--switcher-h, 0px) + var(--header-h) + 20px);
  --title-size: clamp(30px, 4.2vw, 44px);

  /* The three lenses, the same everywhere */
  --people: var(--series-2);
  --science: var(--accent);
  --society: var(--violet);

  /* Darker mixes of token colours for small text on light glass (WCAG AA) */
  --people-ink: color-mix(in srgb, var(--series-2) 62%, var(--ink));
  --good-ink: color-mix(in srgb, var(--status-good) 70%, var(--ink));
  --bad-ink: color-mix(in srgb, var(--status-critical) 80%, var(--ink));
}

/* ---------- Page frame ---------- */

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}

.skip {
  position: fixed;
  left: 12px;
  top: calc(var(--switcher-h, 0px) + 8px);
  z-index: 60;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  font-weight: var(--weight-semibold);
  transform: translateY(-300%);
}

.skip:focus {
  transform: none;
}

.site-header {
  position: relative;
  z-index: 20;
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
}

@media (min-width: 760px) {
  .site-header {
    position: sticky;
    top: var(--switcher-h, 0px);
  }
}

.header-inner {
  max-width: 1200px;
  min-height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  font-size: var(--text-heading);
  font-weight: var(--weight-strong);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-trail {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 0.1 4.4;
}

.brand-start {
  fill: var(--accent);
}

.brand-end {
  fill: var(--violet);
}

.main-nav {
  margin-left: auto;
}

.main-nav ul {
  display: flex;
  gap: 2px;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: var(--text-control);
  font-weight: var(--weight-medium);
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--ink);
  background: var(--wash);
}

.main-nav a[aria-current='page'] {
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-weight: var(--weight-semibold);
}

@media (max-width: 759px) {
  .header-inner {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .main-nav {
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
    width: calc(100% + var(--gutter) * 2);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .main-nav ul {
    justify-content: space-between;
    gap: 0;
  }

  .main-nav a {
    padding: 0 clamp(6px, 2vw, 12px);
  }
}


main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px) var(--gutter) 72px;
}

[tabindex='-1']:focus {
  outline: none;
}

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: var(--inner);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px var(--gutter) 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: var(--text-small);
  color: var(--muted);
}

.sample-notice {
  color: var(--caution-ink);
}

/* A small entrance when a new step or page appears: it answers the person's click. */
.anim {
  animation: rise 0.32s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------- Shared type and controls ---------- */

.page-title {
  font-size: var(--title-size);
  line-height: 1.06;
  font-weight: var(--weight-display);
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.lead {
  margin-top: 14px;
  max-width: 60ch;
  font-size: var(--text-lead);
  line-height: 1.5;
  color: var(--ink-2);
}

h2 {
  font-size: var(--text-title);
  line-height: 1.2;
  font-weight: var(--weight-strong);
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--text-heading);
  line-height: 1.3;
  font-weight: var(--weight-semibold);
  letter-spacing: -0.012em;
}

.small {
  font-size: var(--text-small);
  color: var(--muted);
}

.sec-intro {
  margin-top: 6px;
  max-width: 62ch;
  color: var(--ink-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  font-size: var(--text-control);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  background: color-mix(in srgb, var(--accent-strong) 86%, var(--ink));
}

.btn-quiet {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

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

.btn-big {
  min-height: 52px;
  padding: 0 26px;
  font-size: var(--text-body);
}

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-strong);
  font-weight: var(--weight-semibold);
  text-align: left;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent-strong) 35%, transparent);
  text-underline-offset: 3px;
}

.link-btn:hover {
  text-decoration-color: currentColor;
}

a.text-link {
  color: var(--accent-strong);
  font-weight: var(--weight-semibold);
  text-underline-offset: 3px;
}

.sample-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--status-warning) 24%, var(--surface));
  color: var(--caution-ink);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.real-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--status-good) 14%, var(--surface));
  color: var(--good-ink);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
}

/* ---------- Data pieces: evidence score, what people report, effort, verdict ---------- */

.score {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.meter {
  flex: 1;
  max-width: 150px;
  min-width: 70px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  overflow: hidden;
}

.meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--science);
}

.score-num {
  font-size: var(--text-small);
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.score-num b {
  font-size: var(--text-control);
  font-weight: var(--weight-semibold);
  color: var(--ink);
}

.people {
  display: grid;
  gap: 6px;
  width: 100%;
}

.stack {
  display: flex;
  gap: 2px;
  max-width: 150px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
}

.stack > span {
  display: block;
  height: 100%;
}

.stack .pos,
.lg.pos::before,
.stance--positive i {
  background: var(--status-good);
}

.stack .mix,
.lg.mix::before,
.stance--mixed i {
  background: var(--series-4);
}

.stack .neg,
.lg.neg::before,
.stance--negative i {
  background: var(--status-critical);
}

.people-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  font-size: var(--text-small);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.lg {
  white-space: nowrap;
}

.lg::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 2px;
}

.people-n {
  color: var(--muted);
}

.people--big .stack {
  max-width: none;
  height: 12px;
}

.people--big .people-legend {
  font-size: var(--text-control);
}

.effort {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: var(--text-control);
  color: var(--ink);
  white-space: nowrap;
}

.eg .on {
  fill: var(--ink-2);
}

.eg .off {
  fill: var(--line-strong);
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 7px;
  border-radius: 999px;
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.tier-badge--try {
  background: color-mix(in srgb, var(--status-good) 14%, var(--surface));
  color: var(--good-ink);
}

.tier-badge--maybe {
  background: color-mix(in srgb, var(--status-warning) 26%, var(--surface));
  color: var(--caution-ink);
}

.tier-badge--skip {
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.ladder {
  display: inline-flex;
  gap: 3px;
}

.ladder i {
  width: 12px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent-soft);
}

.ladder i.on {
  background: var(--science);
}

/* ---------- The trail: your path so far ---------- */

.guide {
  display: grid;
  gap: 20px;
}

@media (min-width: 960px) {
  .guide {
    grid-template-columns: var(--rail-w) minmax(0, 1fr);
    gap: clamp(32px, 4vw, 60px);
    align-items: start;
  }

  .rail {
    position: sticky;
    top: var(--sticky-top);
    max-height: calc(100vh - var(--sticky-top) - 16px);
    overflow-y: auto;
  }
}

.rail {
  padding: 20px 18px 10px;
  border-radius: var(--radius-xl);
}

.rail-title {
  margin-bottom: 14px;
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  color: var(--muted);
}

.stops {
  display: grid;
}

.stop {
  position: relative;
}

/* The line between stops: solid where you have walked, dashed for the road ahead. */
.stop:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 36px;
  bottom: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.stop.is-current:not(:last-child)::before,
.stop.is-next:not(:last-child)::before,
.stop.is-open:not(:last-child)::before {
  background: repeating-linear-gradient(180deg, var(--line-strong) 0 4px, transparent 4px 9px);
}

.stop-box {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 2px 4px 16px 0;
  border-radius: var(--radius-md);
  color: inherit;
  text-decoration: none;
}

a.stop-box:hover .stop-a {
  color: var(--accent-strong);
}

a.stop-box:hover .stop-change {
  color: var(--accent-strong);
  text-decoration: underline;
}

.dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: var(--text-control);
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
}

.is-done .dot {
  background: var(--accent-strong);
  color: #fff;
}

.is-current .dot {
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 2px var(--accent), 0 0 0 5px var(--accent-soft);
}

.is-next .dot,
.is-open .dot {
  background: var(--inner);
  color: var(--muted);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
}

.stop-text {
  display: grid;
  gap: 1px;
  padding-top: 5px;
  min-width: 0;
}

.stop-q-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.stop-q {
  font-size: var(--text-small);
  color: var(--muted);
}

.stop-a {
  font-size: var(--text-body);
  line-height: 1.3;
  font-weight: var(--weight-semibold);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.is-current .stop-a {
  color: var(--accent-strong);
}

.is-next .stop-a,
.is-open .stop-a {
  font-weight: var(--weight-medium);
  color: var(--muted);
}

.stop-change {
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  color: var(--muted);
}

.rail-sections {
  margin: 6px -18px 0;
  padding: 16px 18px 10px;
  border-top: 1px solid var(--line);
}

.rail-sections ul {
  display: grid;
}

.rail-sections button {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  font-size: var(--text-control);
  color: var(--ink-2);
  text-align: left;
}

.rail-sections button:hover {
  background: var(--wash);
  color: var(--ink);
}

.rail-sections .sec-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.rail-sections .sec-dot--people {
  background: var(--people);
}

.rail-sections .sec-dot--science {
  background: var(--science);
}

.rail-sections .sec-dot--society {
  background: var(--society);
}

/* On narrow screens the trail becomes a row of breadcrumb stops above the question. */
@media (max-width: 959px) {
  .rail {
    padding: 12px;
    border-radius: var(--radius-lg);
  }

  .rail--empty,
  .rail-sections {
    display: none;
  }

  .rail-title {
    margin: 0 0 8px 2px;
  }

  .stops {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .stop::before {
    display: none;
  }

  .stop.is-next,
  .stop.is-open {
    display: none;
  }

  .stop-box {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 4px 14px 4px 4px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
  }

  .is-current .stop-box {
    background: var(--accent-soft);
    border-color: transparent;
  }

  .dot {
    width: 30px;
    height: 30px;
    font-size: var(--text-small);
  }

  .is-current .dot {
    box-shadow: inset 0 0 0 2px var(--accent);
  }

  .stop-text {
    padding: 0;
  }

  .stop-q-row {
    display: none;
  }

  .stop-a {
    font-size: var(--text-control);
  }
}

/* ---------- One question at a time ---------- */

.step-count {
  margin-bottom: 12px;
  font-size: var(--text-control);
  font-weight: var(--weight-semibold);
  color: var(--accent-strong);
}

.question {
  max-width: 15ch;
  font-size: var(--text-display);
  line-height: 1.02;
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-display);
  text-wrap: balance;
}

.question--md {
  max-width: 18ch;
  font-size: clamp(32px, 4.6vw, 50px);
}

.choices {
  margin-top: clamp(24px, 4vw, 40px);
  display: grid;
  gap: 12px;
}

.choice {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 64px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: box-shadow 0.18s, border-color 0.18s;
}

.choice:hover,
.lens-choice:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--glass-edge));
  box-shadow: var(--shadow-pop);
}

.choice > svg {
  color: var(--muted);
}

.choice:hover > svg {
  color: var(--accent-strong);
}

.choice-body {
  display: grid;
  gap: 4px;
}

.choice-name {
  font-size: 20px;
  line-height: 1.25;
  font-weight: var(--weight-semibold);
  letter-spacing: -0.015em;
}

.choice-plain {
  color: var(--ink-2);
}

.choice-meta {
  font-size: var(--text-small);
  color: var(--muted);
}

.tag-current {
  justify-self: start;
  display: inline-flex;
  margin-bottom: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
}

.choice.is-current {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--glass-edge));
}

/* Step 1: life or business, big and inviting */
.lens-choices {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}

.lens-choice {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  min-height: 300px;
  padding: clamp(22px, 3vw, 32px);
  text-decoration: none;
  transition: box-shadow 0.18s, border-color 0.18s;
}

.lens-name {
  font-size: clamp(34px, 4.4vw, 50px);
  line-height: 1;
  font-weight: var(--weight-display);
  letter-spacing: -0.04em;
}

.lens-plain {
  font-size: var(--text-lead);
  color: var(--ink-2);
}

.lens-areas {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.lens-areas-title {
  font-size: var(--text-small);
  color: var(--muted);
}

.lens-area-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lens-area-list span {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--inner);
  border: 1px solid var(--line);
  font-size: var(--text-small);
  color: var(--ink-2);
}

.lens-go {
  margin-top: auto;
  padding-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: var(--weight-semibold);
  color: var(--accent-strong);
}

.step-aside {
  margin-top: 22px;
  color: var(--ink-2);
}

/* Step 2: areas */
@media (min-width: 720px) {
  .area-choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.area-choices .choice {
  align-items: start;
  height: 100%;
}

/* Step 3: goals */
.goal-choices .choice-name {
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: -0.025em;
}

.goal-choices .choice {
  padding: 24px 26px;
}

/* Step 4: effort */
@media (min-width: 720px) {
  .effort-choices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.effort-choice {
  grid-template-columns: 1fr;
  align-content: start;
  align-items: start;
  gap: 10px;
  height: 100%;
  padding: 24px;
}

.effort-big .eg {
  width: 38px;
  height: 32px;
}

.effort-choice .choice-meta {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: var(--text-control);
  color: var(--ink-2);
}

.effort-choice .choice-meta b {
  color: var(--ink);
}

/* ---------- The shortlist ---------- */

.result-head .page-title {
  max-width: 22ch;
}

.effort-switch {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.effort-switch-label {
  font-size: var(--text-control);
  color: var(--ink-2);
}

.seg {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 4px;
  border-radius: 999px;
  background: var(--wash);
  border: 1px solid var(--line);
}

.seg a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: var(--text-control);
  font-weight: var(--weight-medium);
  color: var(--ink-2);
  text-decoration: none;
}

.seg a:hover {
  color: var(--ink);
}

.seg a[aria-current='true'] {
  background: var(--surface);
  color: var(--ink);
  font-weight: var(--weight-semibold);
  box-shadow: var(--shadow-soft), 0 0 0 1px var(--line);
}

.tiers {
  margin-top: 28px;
  display: grid;
  gap: 16px;
}

.tier {
  border-radius: var(--radius-xl);
}

.tier-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px 24px 16px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.tier-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.tier--try .tier-head {
  background: linear-gradient(180deg, color-mix(in srgb, var(--status-good) 10%, transparent), transparent);
}

.tier--try .tier-mark {
  background: color-mix(in srgb, var(--status-good) 16%, var(--surface));
  color: var(--good-ink);
}

.tier--maybe .tier-head {
  background: linear-gradient(180deg, color-mix(in srgb, var(--status-warning) 14%, transparent), transparent);
}

.tier--maybe .tier-mark {
  background: color-mix(in srgb, var(--status-warning) 28%, var(--surface));
  color: var(--caution-ink);
}

.tier--skip .tier-mark {
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.tier-head h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 21px;
}

.tier-count {
  font-size: var(--text-control);
  font-weight: var(--weight-medium);
  color: var(--muted);
}

.tier-head p {
  margin-top: 2px;
  color: var(--ink-2);
}

.tier-empty {
  padding: 0 24px 22px 70px;
  color: var(--muted);
}

.opts {
  padding: 0 8px 8px;
}

.opt {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 14px 32px;
  padding: 18px 16px;
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  .opt {
    grid-template-columns: 1fr;
  }

  .tier-empty {
    padding-left: 24px;
  }
}

.opt-name {
  font-size: 19px;
  letter-spacing: -0.015em;
}

.opt-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}

.opt-link:hover {
  color: var(--accent-strong);
  text-decoration-color: currentColor;
}

/* Grow the tap target of inline links on phones without changing the look. */
@media (max-width: 760px) {
  .opt-link,
  .link-btn,
  .hit-title a,
  a.text-link {
    display: inline-block;
    padding: 11px 0;
    margin: -11px 0;
  }
}

.opt-line {
  margin-top: 6px;
  color: var(--ink-2);
}

.opt-next {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-small);
  color: var(--muted);
}

.opt-next--full {
  color: var(--accent-strong);
  font-weight: var(--weight-semibold);
}

.opt-facts {
  display: grid;
  gap: 10px;
  align-content: start;
}

.fact {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.fact dt {
  padding-top: 1px;
  font-size: var(--text-small);
  color: var(--muted);
}

.more {
  margin-top: 16px;
  padding: 22px 24px;
  border-radius: var(--radius-xl);
  border-style: dashed;
  border-color: var(--line-strong);
  background: var(--inner);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

.more h2 {
  font-size: 19px;
}

.more > p {
  margin-top: 4px;
  color: var(--ink-2);
}

.more-list {
  margin: 14px 0 18px;
  display: grid;
}

.more-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.more-list .opt-link {
  font-weight: var(--weight-semibold);
  margin-right: auto;
}

.empty {
  margin-top: 24px;
  padding: 26px;
  border-radius: var(--radius-xl);
}

.empty p {
  margin-top: 6px;
  color: var(--ink-2);
}

.actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.next-steps {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 12px;
}

.next-card {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--inner);
  text-decoration: none;
}

.next-card b {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--accent-strong);
  font-weight: var(--weight-semibold);
}

.next-card span {
  font-size: var(--text-control);
  color: var(--ink-2);
}

.next-card:hover {
  border-color: var(--accent);
  background: var(--surface);
}

/* ---------- Topic: a stop on your path ---------- */

.topic {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.topic > section {
  scroll-margin-top: calc(var(--switcher-h, 0px) + var(--header-h) + 16px);
}

.topic-head {
  margin-bottom: 6px;
}

.topic-head .lead {
  margin-top: 10px;
}

.updated {
  margin-top: 10px;
  font-size: var(--text-small);
  color: var(--muted);
}

.fit {
  padding: clamp(22px, 3.2vw, 34px);
  border-radius: var(--radius-xl);
}

.fit h2 {
  font-size: clamp(26px, 3vw, 32px);
  letter-spacing: -0.025em;
}

.bottom-line {
  margin-top: 12px;
  max-width: 62ch;
  font-size: var(--text-lead);
  line-height: 1.55;
}

.fit-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.fit-grid > div {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px 18px 18px 0;
}

.fit-grid > div + div {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.fit-grid dt {
  font-size: var(--text-small);
  color: var(--muted);
}

.fit-grid dd {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.fit-grid dd p {
  font-size: var(--text-control);
  color: var(--ink-2);
}

@media (max-width: 640px) {
  .fit-grid {
    grid-template-columns: 1fr;
  }

  .fit-grid > div,
  .fit-grid > div + div {
    padding: 14px 0;
    border-left: 0;
  }

  .fit-grid > div + div {
    border-top: 1px solid var(--line);
  }
}

.fit-bottom {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px 28px;
}

@media (max-width: 760px) {
  .fit-bottom {
    grid-template-columns: 1fr;
  }
}

.what-it-is h3 {
  font-size: var(--text-body);
}

.what-it-is p {
  margin-top: 4px;
  color: var(--ink-2);
}

.fit-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  align-self: start;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--ink);
}

.fit-note svg {
  flex: none;
  margin-top: 3px;
  color: var(--accent-strong);
}

.fit-note--miss {
  background: color-mix(in srgb, var(--status-warning) 18%, var(--surface));
}

.fit-note--miss svg {
  color: var(--caution-ink);
}

.fit-note a {
  color: var(--accent-strong);
  font-weight: var(--weight-semibold);
  text-underline-offset: 3px;
}

.three-title {
  margin-top: 14px;
  font-size: var(--text-heading);
  color: var(--ink-2);
  font-weight: var(--weight-semibold);
}

.lens-strip {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 760px) {
  .lens-strip {
    grid-template-columns: 1fr;
  }
}

.lens-pill {
  width: 100%;
  height: 100%;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--inner);
  text-align: left;
}

.lens-pill:hover {
  background: var(--surface);
  border-color: var(--lens);
}

.lens-pill b {
  display: block;
  font-weight: var(--weight-semibold);
}

.lens-pill span span {
  display: block;
  margin-top: 2px;
  font-size: var(--text-small);
  color: var(--ink-2);
}

.lens-pill--people,
.lens-sec--people {
  --lens: var(--people);
  --lens-ink: var(--people-ink);
}

.lens-pill--science,
.lens-sec--science {
  --lens: var(--science);
  --lens-ink: var(--accent-strong);
}

.lens-pill--society,
.lens-sec--society {
  --lens: var(--society);
  --lens-ink: var(--society);
}

.lens-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--lens);
  color: #fff;
}

/* The three lenses: clearly separate sections, each with its own colour edge and tint. */
.lens-sec {
  position: relative;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--lens) 11%, transparent), transparent 180px),
    linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
}

.lens-sec::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 28px;
  width: 4px;
  height: 56px;
  border-radius: 0 4px 4px 0;
  background: var(--lens);
}

.lens-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.lens-head .lens-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.lens-kicker {
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  color: var(--lens-ink);
}

.lens-head p:not(.lens-kicker) {
  margin-top: 4px;
  max-width: 60ch;
  color: var(--ink-2);
}

.people-overall {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--inner);
  border: 1px solid var(--line);
}

.people-overall h3 {
  margin-bottom: 10px;
  font-size: var(--text-body);
}

.claims {
  display: grid;
  gap: 10px;
}

.claim {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--inner);
  border: 1px solid var(--line);
}

.claim-text {
  font-size: var(--text-heading);
  line-height: 1.4;
  font-weight: var(--weight-medium);
  letter-spacing: -0.01em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: var(--text-small);
  color: var(--ink-2);
}

.chip b {
  font-weight: var(--weight-semibold);
  color: var(--ink);
}

.stance i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.share {
  display: inline-block;
  width: 34px;
  height: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--people) 16%, transparent);
  overflow: hidden;
}

.share span {
  display: block;
  height: 100%;
  background: var(--people);
}

.chip--none b {
  color: var(--bad-ink);
}

.tone--extreme {
  background: color-mix(in srgb, var(--status-critical) 9%, var(--surface));
  border-color: color-mix(in srgb, var(--status-critical) 28%, transparent);
}

.tone--extreme b {
  color: var(--bad-ink);
}

.chip--noise {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-weight: var(--weight-semibold);
}

.where {
  font-size: var(--text-small);
  color: var(--muted);
}

.noise {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--line-strong);
}

.noise h3 {
  font-size: var(--text-body);
}

.noise > p {
  margin: 2px 0 12px;
  font-size: var(--text-control);
  color: var(--ink-2);
}

.claim.is-noise {
  background: transparent;
  border-style: dashed;
  border-color: var(--line-strong);
}

.claim.is-noise .claim-text {
  color: var(--ink-2);
}

.verdict {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--inner);
  border: 1px solid var(--line);
}

.verdict-word {
  font-size: 22px;
  font-weight: var(--weight-strong);
  letter-spacing: -0.02em;
  color: var(--accent-strong);
}

.verdict p + p {
  margin-top: 4px;
  color: var(--ink-2);
}

.studies {
  display: grid;
  gap: 10px;
}

.study {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--inner);
  border: 1px solid var(--line);
}

@media (max-width: 640px) {
  .study {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.study-level {
  display: grid;
  gap: 6px;
  align-content: start;
  justify-items: start;
}

@media (max-width: 640px) {
  .study-level {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
  }
}

.level-name {
  font-size: var(--text-control);
  font-weight: var(--weight-semibold);
  color: var(--accent-strong);
}

.study h3 {
  font-size: var(--text-body);
  line-height: 1.4;
}

.finding {
  margin-top: 6px;
  color: var(--ink-2);
}

.study-facts {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: var(--text-small);
}

.study-facts dt {
  color: var(--muted);
}

.study-facts dd {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: var(--weight-semibold);
  color: var(--ink);
}

.study-facts .is-conflict dd {
  color: var(--caution-ink);
}

.levels {
  margin-top: 14px;
}

.levels summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  list-style: none;
  font-weight: var(--weight-semibold);
  color: var(--accent-strong);
  cursor: pointer;
}

.levels summary::-webkit-details-marker {
  display: none;
}

.levels summary svg {
  transition: transform 0.15s;
}

.levels[open] summary svg {
  transform: rotate(90deg);
}

.levels ol {
  margin-top: 6px;
  display: grid;
  gap: 8px;
}

.levels li {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  font-size: var(--text-control);
}

.levels li p {
  color: var(--ink-2);
}

.beliefs {
  display: grid;
  gap: 10px;
}

.belief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--inner);
  overflow: hidden;
}

@media (max-width: 640px) {
  .belief {
    grid-template-columns: 1fr;
  }
}

.belief-side,
.facts-side {
  padding: 16px 18px;
}

.belief-side {
  background: color-mix(in srgb, var(--society) 8%, transparent);
}

.mini-label {
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  color: var(--muted);
}

.belief-side .mini-label {
  color: var(--society);
}

.belief-text {
  margin-top: 4px;
  font-size: var(--text-heading);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
}

.origin {
  margin-top: 8px;
  font-size: var(--text-small);
  color: var(--ink-2);
}

.facts-side p:not(.mini-label) {
  margin-top: 4px;
}

.plain-sec {
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--radius-xl);
}

.voices {
  margin-top: 16px;
  display: grid;
}

.voices-head,
.voice {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 18px;
  padding: 14px 0;
}

.voices-head {
  padding-top: 0;
  font-size: var(--text-small);
  color: var(--muted);
}

.voice {
  border-top: 1px solid var(--line);
}

.voice-who b {
  display: block;
  font-weight: var(--weight-semibold);
}

.voice-who span {
  font-size: var(--text-small);
  color: var(--muted);
}

.voice-says {
  font-style: italic;
  color: var(--ink);
}

.voice-match {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: var(--text-control);
}

.voice-match svg {
  flex: none;
  margin-top: 2px;
}

.voice-match--good svg {
  color: var(--good-ink);
}

.voice-match--part svg {
  color: var(--caution-ink);
}

.voice-match--off svg {
  color: var(--bad-ink);
}

@media (max-width: 720px) {
  .voices-head {
    display: none;
  }

  .voice {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.books {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 22px;
}

.book {
  padding-top: 14px;
  border-top: 3px solid var(--ink);
}

.book h3 {
  font-size: 19px;
  letter-spacing: -0.02em;
}

.book .by {
  margin-top: 2px;
  font-size: var(--text-small);
  color: var(--muted);
}

.book p:last-child {
  margin-top: 8px;
  font-size: var(--text-control);
  color: var(--ink-2);
}

.others {
  margin: 14px 0 18px;
  display: grid;
}

.other {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 140px 130px;
  gap: 8px 18px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.other .opt-link {
  justify-self: start;
  font-weight: var(--weight-semibold);
}

.other-facts {
  display: contents;
}

.other-facts .meter {
  width: 70px;
  flex: none;
}

@media (max-width: 760px) {
  .other {
    grid-template-columns: 1fr;
  }

  .other-facts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
  }

  .other-facts .score {
    width: auto;
  }
}

/* ---------- Drawer for options without a full page ---------- */

.drawer {
  position: fixed;
  inset: var(--switcher-h, 0px) 0 0 auto;
  width: min(440px, 100%);
  height: auto;
  max-width: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--glass-edge);
  background: var(--surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-pop);
  color: var(--ink);
}

.drawer[open] {
  animation: slide-in 0.24s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes slide-in {
  from {
    transform: translateX(24px);
    opacity: 0;
  }
}

.drawer::backdrop {
  background: color-mix(in srgb, var(--ink) 28%, transparent);
}

.drawer-inner {
  display: grid;
  gap: 16px;
  min-height: 100%;
  align-content: start;
  padding: 24px;
}

.drawer-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.drawer-top h2 {
  font-size: 24px;
}

.icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}

.icon-btn:hover {
  border-color: var(--line-strong);
}

.drawer-line {
  font-size: var(--text-lead);
  color: var(--ink-2);
}

.drawer-facts {
  display: grid;
  border-top: 1px solid var(--line);
}

.drawer-facts > div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.drawer-facts dt {
  font-size: var(--text-small);
  color: var(--muted);
}

.drawer-facts dd {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.drawer-facts dd p {
  font-size: var(--text-control);
  color: var(--ink-2);
}

.coming {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--wash);
  color: var(--ink-2);
  font-size: var(--text-control);
}

.coming svg {
  flex: none;
  margin-top: 2px;
}

@media (max-width: 640px) {
  .drawer {
    inset: auto 0 0 0;
    width: 100%;
    max-height: 86vh;
    border-left: 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  @keyframes slide-in {
    from {
      transform: translateY(24px);
      opacity: 0;
    }
  }
}

/* ---------- Search ---------- */

.search-page {
  display: grid;
  gap: 28px;
}

@media (min-width: 1000px) {
  .search-page {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 48px;
    align-items: start;
  }

  .search-side {
    position: sticky;
    top: var(--sticky-top);
  }
}

.search-box {
  margin-top: 24px;
}

.search-label {
  display: block;
  margin-bottom: 8px;
  font-weight: var(--weight-semibold);
}

.search-field {
  position: relative;
}

.search-field svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  min-height: 58px;
  padding: 0 18px 0 50px;
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: var(--text-lead);
}

.search-field input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.search-field input::placeholder {
  color: var(--muted);
}

.suggest {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.suggest-label {
  font-size: var(--text-control);
  color: var(--muted);
}

.suggest-chip {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--inner);
  font-size: var(--text-control);
  color: var(--ink-2);
}

.suggest-chip:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--surface);
}

.results-count {
  margin-top: 26px;
  min-height: 1.5em;
  font-size: var(--text-control);
  color: var(--muted);
}

.results {
  margin-top: 10px;
  display: grid;
  gap: 16px;
}

.group {
  padding: 20px 22px 8px;
  border-radius: var(--radius-xl);
}

.group h2 {
  font-size: 19px;
}

.group-sub {
  margin-top: 2px;
  font-size: var(--text-small);
  color: var(--muted);
}

.hits {
  margin-top: 8px;
}

.hit {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.hit-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.hit-title {
  font-size: var(--text-heading);
}

.hit-title a {
  color: var(--ink);
  text-underline-offset: 4px;
  text-decoration-color: var(--line-strong);
}

.hit-title a:hover {
  color: var(--accent-strong);
  text-decoration-color: currentColor;
}

.hit-kind {
  font-size: var(--text-small);
  color: var(--muted);
}

.hit-snippet {
  color: var(--ink-2);
  font-size: var(--text-control);
}

.hit-meta {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.hit-meta .score {
  width: auto;
}

.hit-meta .meter {
  width: 80px;
  flex: none;
}

mark {
  padding: 0 2px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--status-warning) 34%, transparent);
  color: inherit;
}

.search-side {
  padding: 22px;
  border-radius: var(--radius-xl);
}

.search-side h2 {
  font-size: 19px;
}

.search-side > p {
  margin-top: 4px;
  font-size: var(--text-control);
  color: var(--ink-2);
}

.browse {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

.browse h3 {
  font-size: var(--text-control);
  color: var(--muted);
  font-weight: var(--weight-semibold);
}

.browse ul {
  margin-top: 2px;
}

.browse a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 0 2px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: var(--weight-medium);
}

.browse a svg {
  color: var(--muted);
}

.browse a:hover {
  color: var(--accent-strong);
}

/* ---------- Learn: a short guided lesson ---------- */

.practice {
  margin-top: 28px;
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--radius-xl);
}

.practice-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
  margin-bottom: 16px;
}

.practice-head h2 {
  font-size: 20px;
}

.practice-head p {
  width: 100%;
  color: var(--ink-2);
}

.rungs {
  display: grid;
}

.rung {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.rung-text b {
  display: block;
  font-weight: var(--weight-semibold);
}

.rung-text span {
  font-size: var(--text-small);
  color: var(--ink-2);
}

.rung-studies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rung-studies .pill {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
}

.rung-studies .none {
  font-size: var(--text-small);
  color: var(--muted);
}

@media (max-width: 640px) {
  .rung {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .rung-studies {
    grid-column: 2;
  }
}

.prac-rows {
  display: grid;
}

.prac-row {
  display: grid;
  grid-template-columns: minmax(0, 190px) minmax(0, 1fr);
  gap: 6px 18px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
  .prac-row {
    grid-template-columns: 1fr;
  }
}

.prac-label b {
  display: block;
  font-weight: var(--weight-semibold);
}

.prac-label span {
  font-size: var(--text-small);
  color: var(--muted);
}

.pbar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-control);
  font-variant-numeric: tabular-nums;
}

.pbar > span:first-child {
  flex: 1;
  max-width: 360px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  overflow: hidden;
}

.pbar > span:first-child span {
  display: block;
  height: 100%;
  background: var(--science);
}

.prac-caption {
  margin-top: 10px;
  font-size: var(--text-small);
  color: var(--muted);
}

.yesno {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: var(--weight-semibold);
}

.yesno--yes {
  color: var(--good-ink);
}

.yesno--no {
  color: var(--ink-2);
}

.conflict {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--caution-ink);
  font-weight: var(--weight-semibold);
}

.prac-sum {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
}

.step-nav {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.traps {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 12px;
}

.trap {
  height: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--inner);
}

.trap summary {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  list-style: none;
  cursor: pointer;
}

.trap summary::-webkit-details-marker {
  display: none;
}

.trap-q {
  font-size: 19px;
  line-height: 1.35;
  font-weight: var(--weight-semibold);
  letter-spacing: -0.015em;
}

.trap-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-control);
  font-weight: var(--weight-semibold);
  color: var(--accent-strong);
}

.trap[open] .trap-open svg {
  transform: rotate(90deg);
}

.trap p {
  margin: 0 20px 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.trap[open] {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}

.learn-end {
  margin-top: 24px;
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--radius-xl);
}

.learn-end p {
  margin-top: 8px;
  max-width: 62ch;
  font-size: var(--text-lead);
  color: var(--ink-2);
}

.lesson-facts {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lesson-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--inner);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: var(--text-control);
}

.lesson-facts b {
  color: var(--ink);
}

/* ---------- Habits ---------- */

.page-head {
  margin-bottom: 26px;
}

.habits-page {
  display: grid;
  gap: 16px;
}

.season {
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--radius-xl);
}

.season-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
}

.season-day {
  font-size: var(--text-lead);
  color: var(--ink-2);
}

.season-day b {
  color: var(--ink);
  font-weight: var(--weight-strong);
}

.season-track {
  position: relative;
  margin: 46px 0 10px;
  height: 14px;
  border-radius: 999px;
  background: var(--wash);
  box-shadow: inset 0 0 0 1px var(--line);
}

.season-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: var(--accent-gradient);
}

.season-marker {
  position: absolute;
  top: -34px;
  bottom: -6px;
  width: 2px;
  background: var(--ink);
}

.season-marker span {
  position: absolute;
  top: 0;
  right: 8px;
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.season-caption {
  font-size: var(--text-small);
  color: var(--muted);
}

.rules {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
}

.rules li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--inner);
  border: 1px solid var(--line);
  font-size: var(--text-control);
}

.rules svg {
  flex: none;
  margin-top: 2px;
  color: var(--accent-strong);
}

.habits-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 1000px) {
  .habits-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
  }
}

.mine {
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--radius-xl);
}

.mine-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
  padding-bottom: 18px;
}

.mine-head p {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: var(--text-control);
}

.score-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px 10px 10px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.score-ring {
  position: relative;
  width: 64px;
  height: 64px;
}

.score-ring svg {
  display: block;
  transform: rotate(-90deg);
}

.score-ring .ring-track {
  fill: none;
  stroke: var(--accent-soft);
  stroke-width: 6;
}

.score-ring .ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.3s;
}

.score-ring b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: var(--weight-strong);
  font-variant-numeric: tabular-nums;
}

.score-box p {
  font-size: var(--text-small);
  color: var(--ink-2);
  max-width: 20ch;
}

.score-box p b {
  display: block;
  font-size: var(--text-control);
  color: var(--ink);
}

.habit-list {
  display: grid;
}

.habit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 28px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
  .habit {
    grid-template-columns: 1fr;
  }
}

.habit h3 {
  font-size: 19px;
}

.habit-from {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: var(--text-control);
  color: var(--ink-2);
}

.check {
  position: relative;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  user-select: none;
}

.check input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.check .box {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  color: transparent;
  transition: background 0.15s, border-color 0.15s;
}

.check input:checked + .box {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

.check:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.check:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.habit-track {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.days {
  display: grid;
  grid-template-rows: repeat(7, 11px);
  grid-auto-flow: column;
  grid-auto-columns: 11px;
  gap: 3px;
}

.days i {
  border-radius: 3px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}

.days i.kept {
  background: var(--accent-strong);
  box-shadow: none;
}

.days i.missed {
  background: color-mix(in srgb, var(--ink) 12%, transparent);
  box-shadow: none;
}

.days i.today {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.days i.kept.today {
  box-shadow: inset 0 0 0 2px var(--accent-strong), inset 0 0 0 3.5px var(--surface);
}

.habit-kept {
  font-size: var(--text-small);
  color: var(--ink-2);
}

.habit-kept b {
  color: var(--ink);
}

.days-legend {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: var(--text-small);
  color: var(--muted);
}

.days-legend span::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  vertical-align: -1px;
  border-radius: 3px;
}

.days-legend .k::before {
  background: var(--accent-strong);
}

.days-legend .m::before {
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}

.days-legend .f::before {
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.days-legend .t::before {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.habit-status {
  margin-top: 8px;
  min-height: 1.4em;
  font-size: var(--text-control);
  color: var(--good-ink);
  font-weight: var(--weight-semibold);
}

.why {
  padding: 24px;
  border-radius: var(--radius-xl);
}

.why h2 {
  margin-top: 12px;
  font-size: 20px;
}

.why-fact {
  margin-top: 10px;
  font-size: var(--text-lead);
  line-height: 1.5;
}

.why-fact b {
  font-weight: var(--weight-strong);
}

.why-source {
  margin-top: 12px;
  font-size: var(--text-small);
  color: var(--muted);
}

.why-round {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
}

.company {
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--radius-xl);
}

.company > header p {
  margin-top: 4px;
  color: var(--ink-2);
}

.company-grid {
  margin-top: 20px;
  display: grid;
  gap: 28px;
}

@media (min-width: 900px) {
  .company-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 40px;
  }
}

.company h3 {
  font-size: var(--text-body);
  margin-bottom: 10px;
}

.teams {
  display: grid;
  gap: 2px;
}

.team {
  display: grid;
  grid-template-columns: minmax(90px, 0.6fr) minmax(0, 1fr) 40px;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
}

.team-name b {
  display: block;
  font-weight: var(--weight-semibold);
}

.team-name span {
  font-size: var(--text-small);
  color: var(--muted);
}

.team-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  overflow: hidden;
}

.team-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.team .num {
  font-weight: var(--weight-semibold);
}

.leaders {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-control);
}

.leaders th,
.leaders td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.leaders thead th {
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
  color: var(--muted);
}

.leaders tbody th {
  font-weight: var(--weight-semibold);
}

.leaders .num {
  text-align: right;
}

.leaders tr.is-me th,
.leaders tr.is-me td {
  background: var(--accent-soft);
}

.leaders tr.is-me th {
  color: var(--accent-strong);
}

.popular {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.popular ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.popular button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--inner);
  font-size: var(--text-control);
}

.popular button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

/* ---------- Manage ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
}

.stat dt {
  font-size: var(--text-control);
  color: var(--ink-2);
}

.stat dd {
  margin-top: 4px;
  font-size: var(--text-stat);
  line-height: 1.1;
  font-weight: var(--weight-strong);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.manage-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 1080px) {
  .manage-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
  }

  .editor {
    grid-column: 1;
    grid-row: 1;
  }

  .queue {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: var(--sticky-top);
  }
}

.queue {
  padding: 22px;
  border-radius: var(--radius-xl);
}

.queue h2,
.editor h2 {
  font-size: 20px;
}

.queue > p {
  margin-top: 2px;
  font-size: var(--text-small);
  color: var(--muted);
}

.queue ul {
  margin-top: 12px;
}

.q-item {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.q-item .q-text {
  font-weight: var(--weight-medium);
}

.q-item .q-topic {
  font-size: var(--text-small);
  color: var(--muted);
}

.q-item .btn {
  justify-self: start;
  min-height: 40px;
}

.q-item.is-done .q-text {
  color: var(--muted);
  text-decoration: line-through;
}

.editor {
  padding: clamp(20px, 3vw, 28px);
  border-radius: var(--radius-xl);
}

.editor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.editor-head p {
  margin-top: 2px;
  font-size: var(--text-small);
  color: var(--muted);
}

.ed-block {
  margin: 22px 0 0;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  min-width: 0;
}

.ed-block legend {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: 4px;
  font-size: var(--text-heading);
  font-weight: var(--weight-semibold);
}

.ed-block legend + * {
  clear: both;
}

.hint {
  margin: 0 0 12px;
  font-size: var(--text-small);
  color: var(--muted);
}

.field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.field > span:first-child,
.field-label {
  font-size: var(--text-control);
  font-weight: var(--weight-medium);
  color: var(--ink-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: var(--text-body);
}

.field textarea {
  min-height: 120px;
  line-height: 1.5;
  resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 12px 14px;
}

.ed-studies {
  display: grid;
  margin-bottom: 16px;
}

.ed-studies li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 14px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.ed-studies li:first-child {
  border-top: 0;
}

.ed-studies b {
  font-weight: var(--weight-semibold);
  font-size: var(--text-control);
}

.ed-studies .small {
  grid-column: 1;
}

.ed-studies .tag-col {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.new-tag {
  display: inline-flex;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.add-study {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--inner);
  border: 1px solid var(--line);
}

.add-study h3 {
  margin-bottom: 12px;
  font-size: var(--text-body);
}

.add-study .field-wide {
  grid-column: 1 / -1;
}

.add-study-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.form-error {
  color: var(--bad-ink);
  font-size: var(--text-control);
  font-weight: var(--weight-semibold);
}

.ed-claims {
  display: grid;
}

.ed-claim {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 8px 16px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.ed-claim:first-child {
  border-top: 0;
}

@media (max-width: 640px) {
  .ed-claim {
    grid-template-columns: 1fr;
  }
}

.ed-claim p {
  font-weight: var(--weight-medium);
}

.ed-claim .small {
  margin-top: 2px;
  font-weight: var(--weight-regular, 400);
}

.noise-flag {
  display: inline-flex;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
}

.save-bar {
  position: sticky;
  bottom: 12px;
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-pop);
}

@media (max-width: 640px) {
  .save-bar {
    position: static;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }
}

.save-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: var(--weight-semibold);
  font-size: var(--text-control);
}

.save-status.is-ok {
  color: var(--good-ink);
}

.save-status.is-error {
  color: var(--bad-ink);
}

/* Panels give more room to their content on phones. */
@media (max-width: 640px) {
  .fit,
  .lens-sec,
  .plain-sec,
  .practice,
  .season,
  .mine,
  .company,
  .editor,
  .queue,
  .why {
    padding: 20px 16px;
  }

  .claim,
  .study,
  .people-overall,
  .verdict {
    padding: 14px;
  }

  .lens-sec::before {
    top: 22px;
  }

  .more-list .opt-link {
    width: 100%;
  }
}
