/*
 * SetCtl Wissen — foundation, shell and controls.
 * The design system of the product page (welcome/src/styles/tokens.css):
 * true black, iOS grouped cards without borders, Ember as the one accent,
 * capsule controls, large tight Inter titles. Light mode is the product page's
 * light sheet (#F2F2F7 with white cards). Page layouts live in reference.css.
 */
@font-face {
  font-family: Inter;
  src: url("assets/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Product page tokens */
  --surface-black: #000000;
  --surface-1: #0d0d0f;
  --surface-2: #1c1c1e;
  --surface-3: #2c2c2e;
  --surface-4: #3a3a3c;
  --surface-light: #f2f2f7;
  --surface-light-card: #ffffff;
  --ember: #ff672e;
  --ember-fill: #ff5a1d;
  --ember-ink: #c83e0a;
  --ember-glow: rgb(255 103 46 / 0.26);
  --teal: #5fd0c5;
  --green: #30d158;
  --blue: #64a8ff;
  --purple: #bf5af2;
  --yellow: #ffd60a;
  --c: var(--ember);

  --font:
    -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", var(--font);
  --text-display: clamp(3rem, 1.6rem + 6.4vw, 7.5rem);
  --text-title-1: clamp(2.5rem, 1.5rem + 3.6vw, 4.5rem);
  --text-title-2: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
  --text-title-3: 1.375rem;
  --text-lede: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  --text-body: 1.0625rem;
  --text-footnote: 0.875rem;
  --text-caption: 0.75rem;
  --tracking-display: -0.045em;
  --tracking-title: -0.03em;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --space-9: 112px;
  --section-space: clamp(72px, 5vw + 48px, 136px);
  --gutter: clamp(16px, 4vw, 40px);
  --content: 1180px;
  --reading: 46rem;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-sheet: clamp(28px, 4vw, 48px);
  --radius-pill: 999px;

  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-standard: 250ms;

  /* Roles (dark) */
  --bg: var(--surface-black);
  --card: var(--surface-2);
  --card-2: var(--surface-3);
  --fill: var(--surface-3);
  --fill-strong: var(--surface-4);
  --label: #ffffff;
  --label-2: rgb(235 235 245 / 0.64);
  --label-3: rgb(235 235 245 / 0.38);
  --sep: rgb(84 84 88 / 0.6);
  --accent-text: var(--ember);
  --on-accent: #ffffff;
  --header-bg: rgb(0 0 0 / 0.72);
  --shadow: 0 30px 60px -36px rgb(0 0 0 / 0.8);
  --focus-ring: 0 0 0 3px var(--bg), 0 0 0 5px var(--ember);
  color-scheme: dark;

  /* Names the shadcn and Bklit adaptations read (components/components.css). */
  --text: var(--label);
  --muted: var(--label-2);
  --border: var(--sep);
  --surface: var(--card);
  --panel: var(--card);
  --panel-2: var(--card-2);
  --accent: var(--ember);
  --accent-foreground: #ffffff;
  --chart-1: var(--ember);
  --chart-2: var(--teal);
  --chart-3: var(--green);
  --chart-4: #ffb340;
  --chart-5: var(--blue);
  --chart-grid: var(--sep);
}


*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
ol,
ul,
figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  text-wrap: balance;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

::selection {
  background: var(--ember-glow);
}

code,
kbd,
pre {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--label);
  color: var(--bg);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

.boot {
  padding: 30vh var(--gutter);
  color: var(--label-2);
  text-align: center;
}

.muted {
  color: var(--label-2);
}

.ember {
  color: var(--accent-text);
}

.dim {
  color: var(--label-3);
}

.eyebrow {
  color: var(--accent-text);
  font-size: 0.9375rem;
  font-weight: 700;
}

/* Shell: Cloudflare-style structure (sidebar with collapsible groups),
   drawn in the product page's language. */
body {
  --sidebar: 264px;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: var(--sidebar);
  padding: var(--space-4) var(--space-3);
  overflow-y: auto;
  background: var(--surface-1);
  box-shadow: inset -0.5px 0 0 var(--sep);
  scrollbar-width: thin;
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px var(--space-2) var(--space-2);
}

.side-head .side-close {
  display: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--label);
}

.brand img {
  width: 22px;
  height: 22px;
}

.brand-word {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.brand-docs {
  color: var(--label-2);
  font-size: 1.1875rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.side-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px 0 12px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--label-3);
  font-size: 0.9375rem;
  text-align: left;
}

.side-search span {
  flex: 1;
}

.side-search:hover {
  color: var(--label-2);
}

.side-nav {
  display: grid;
  gap: 2px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--label-2);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
  transition:
    background-color var(--duration-fast),
    color var(--duration-fast);
}

.side-link span {
  flex: 1;
}

.side-link:hover {
  background: var(--card);
  color: var(--label);
}

.side-link.active,
.side-link.current {
  color: var(--label);
}

.side-link.active {
  background: var(--card);
}

.side-link .caret {
  width: 16px;
  height: 16px;
  color: var(--label-3);
  transition: transform var(--duration-standard) var(--ease-standard);
}

.side-group.open .caret {
  transform: rotate(180deg);
}

.side-sub {
  display: grid;
  gap: 1px;
  margin: 2px 0 6px 21px;
  padding-left: 12px;
  box-shadow: inset 1px 0 0 var(--sep);
}

.side-sub[hidden] {
  display: none;
}

.side-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  color: var(--label-2);
  font-size: 0.875rem;
  font-weight: 500;
}

.side-item:hover {
  background: var(--card);
  color: var(--label);
}

.side-item.active {
  background: var(--card);
  color: var(--label);
  font-weight: 600;
}

.side-item .count {
  margin-left: auto;
}

.side-bottom {
  display: grid;
  gap: var(--space-2);
  margin-top: auto;
  padding: var(--space-3) var(--space-2) 0;
}

.side-foot-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--label-3);
  font-size: var(--text-footnote);
}

.side-foot-link .icon {
  width: 14px;
  height: 14px;
}

.workspace {
  min-width: 0;
  margin-left: var(--sidebar);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 60px;
  padding: 0 var(--gutter);
  background: rgb(0 0 0 / 0.72);
  box-shadow: 0 0.5px 0 var(--sep);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.top-brand,
.menu-toggle.icon-button,
.top-search.icon-button {
  display: none;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--label-3);
  font-size: 0.875rem;
  font-weight: 500;
}

.crumbs .icon {
  width: 14px;
  height: 14px;
  flex: none;
}

.crumbs a:hover {
  color: var(--label);
}

.crumbs strong {
  overflow: hidden;
  color: var(--label);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

/* Language menu (behaviour adapted from the 21st.dev language selector). */
.lang {
  position: relative;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--card);
  color: var(--label);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background-color var(--duration-fast);
}

.lang-trigger:hover {
  background: var(--card-2);
}

.lang-trigger .icon {
  width: 16px;
  height: 16px;
  color: var(--label-2);
}

.lang-trigger .caret {
  width: 14px;
  height: 14px;
  transition: transform var(--duration-standard) var(--ease-standard);
}

.lang-trigger[aria-expanded="true"] .caret {
  transform: rotate(180deg);
}

.lang-short {
  display: none;
}

.lang-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  display: grid;
  min-width: 200px;
  padding: 6px;
  border-radius: var(--radius-lg);
  background: rgb(44 44 46 / 0.92);
  box-shadow:
    0 0 0 0.5px var(--sep),
    0 24px 50px rgb(0 0 0 / 0.5);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  animation: fade-in var(--duration-standard) var(--ease-enter);
}

.lang-list[hidden] {
  display: none;
}

.lang-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--label);
  font-size: 0.9375rem;
  text-align: left;
}

.lang-list button:hover {
  background: var(--fill);
}

.lang-list button[aria-selected="true"] {
  font-weight: 600;
}

.lang-list .icon {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--ember);
}

.lang-code {
  display: grid;
  place-items: center;
  width: 28px;
  height: 20px;
  border-radius: 6px;
  background: var(--fill);
  color: var(--label-2);
  font-size: 0.6875rem;
  font-weight: 700;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.menu-scrim {
  display: none;
}

@media (max-width: 1023px) {
  .sidebar {
    width: min(320px, 86vw);
    box-shadow: 0 0 60px rgb(0 0 0 / 0.6);
    transform: translateX(-102%);
    transition: transform var(--duration-standard) var(--ease-standard);
  }

  .sidebar.open {
    transform: none;
  }

  .side-head .side-close {
    display: inline-grid;
  }

  .workspace {
    margin-left: 0;
  }

  .menu-toggle.icon-button,
  .top-search.icon-button {
    display: inline-grid;
  }

  .top-brand {
    display: inline-flex;
  }

  .crumbs {
    display: none;
  }

  .lang-label {
    display: none;
  }

  .lang-short {
    display: inline;
  }

  .lang-trigger > .icon:first-child {
    display: none;
  }

  .menu-scrim.open {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    border: 0;
    background: rgb(0 0 0 / 0.55);
  }
}

.content {
  display: block;
  max-width: 1120px;
  min-height: 70vh;
  margin: 0 auto;
  padding: var(--space-7) var(--gutter) var(--section-space);
  outline: none;
}

.footer {
  display: grid;
  gap: var(--space-3);
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-6) var(--gutter) var(--space-7);
  box-shadow: inset 0 0.5px 0 var(--sep);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  color: var(--label-2);
  font-size: var(--text-footnote);
}

.footer-links a:hover {
  color: var(--label);
}

.footer p {
  color: var(--label-3);
  font-size: var(--text-footnote);
}

/* Colour roles: one tone per area, from the app palette. */
[data-color="ember"],
.ember-c {
  --c: var(--ember);
}

[data-color="green"] {
  --c: var(--green);
}

[data-color="blue"] {
  --c: var(--blue);
}

[data-color="purple"] {
  --c: var(--purple);
}

[data-color="yellow"] {
  --c: var(--yellow);
}

[data-color="teal"] {
  --c: var(--teal);
}

.dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember);
}

.dot.green,
.tile-icon.green {
  --c: var(--green);
}

.dot.blue,
.tile-icon.blue {
  --c: var(--blue);
}

.dot.purple,
.tile-icon.purple {
  --c: var(--purple);
}

.dot.yellow,
.tile-icon.yellow {
  --c: var(--yellow);
}

.dot.teal,
.tile-icon.teal {
  --c: var(--teal);
}

.dot.ember,
.tile-icon.ember {
  --c: var(--ember);
}

.dot {
  background: var(--c, var(--ember));
}

.tile-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c, var(--ember)) 18%, transparent);
  color: var(--c, var(--ember));
}

.tile-icon .icon {
  width: 18px;
  height: 18px;
}

/* Controls: capsules like the product page and the app. */
.button,
.sc-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--fill);
  color: var(--label);
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    transform var(--duration-fast) var(--ease-standard),
    opacity var(--duration-fast);
}

.button:hover,
.sc-button:hover {
  background: var(--fill-strong);
}

.button:active,
.sc-button:active {
  transform: scale(0.97);
}

.button.primary,
.sc-button[data-variant="default"] {
  background: var(--ember-fill);
  color: var(--on-accent);
}

.button.primary:hover,
.sc-button[data-variant="default"]:hover {
  background: var(--ember);
}

.button.ghost,
.sc-button[data-variant="ghost"] {
  background: transparent;
  color: var(--label-2);
}

.button.ghost:hover,
.sc-button[data-variant="ghost"]:hover {
  background: var(--fill);
  color: var(--label);
}

.button.small,
.sc-button[data-size="sm"] {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.875rem;
}

.button .icon,
.sc-button svg {
  width: 16px;
  height: 16px;
}

.button:disabled,
.sc-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--label-2);
  transition:
    background-color var(--duration-fast),
    color var(--duration-fast);
}

.icon-button:hover {
  background: var(--fill);
  color: var(--label);
}

.icon-button.selected,
.icon-button[aria-pressed="true"] {
  background: var(--fill);
  color: var(--accent-text);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent-text);
  font-size: 0.9375rem;
  font-weight: 600;
}

.section-link .icon {
  width: 16px;
  height: 16px;
  transition: transform var(--duration-fast) var(--ease-standard);
}

.section-link:hover .icon {
  transform: translateX(3px);
}

.chips,
.plans-controls,
.picker-categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--card);
  color: var(--label-2);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.chip .icon {
  width: 15px;
  height: 15px;
}

.chip:hover {
  color: var(--label);
}

.chip.active {
  background: var(--label);
  color: var(--bg);
}

.segmented {
  display: inline-flex;
  gap: 2px;
  margin-bottom: var(--space-6);
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--card);
}

.segmented a,
.segmented button {
  min-height: 36px;
  padding: 7px 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--label-2);
  font-size: 0.9375rem;
  font-weight: 600;
}

.segmented .active,
.segmented [aria-selected="true"] {
  background: var(--fill-strong);
  color: var(--label);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill,
.sc-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--fill);
  color: var(--label-2);
  font-size: var(--text-caption);
  font-weight: 600;
  white-space: nowrap;
}

.pill.green {
  background: rgb(48 209 88 / 0.16);
  color: var(--green);
}

.pill.orange,
.sc-badge[data-variant="default"] {
  background: rgb(255 103 46 / 0.16);
  color: var(--accent-text);
}

.pill.blue {
  background: rgb(100 168 255 / 0.16);
  color: var(--blue);
}

.count {
  min-width: 22px;
  margin-left: auto;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: var(--fill);
  color: var(--label-2);
  font-size: var(--text-caption);
  font-weight: 600;
  text-align: center;
}

/* Fields: filled iOS inputs, no outlines until focus. */
.field {
  display: grid;
  gap: var(--space-2);
  color: var(--label-2);
  font-size: var(--text-footnote);
  font-weight: 600;
}

.field small {
  color: var(--label-3);
  font-weight: 500;
}

.field-input {
  position: relative;
  display: flex;
  align-items: center;
}

.field-input input,
.field select,
.filter-bottom select,
.result-tools select,
.sc-input,
.sc-native-select,
.search-field input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--fill);
  color: var(--label);
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
  appearance: none;
  -webkit-appearance: none;
}

.field-input input {
  padding-right: 64px;
  font-family: var(--font-rounded);
  font-size: 1.375rem;
  font-weight: 600;
}

.field select,
.filter-bottom select,
.result-tools select,
.sc-native-select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  cursor: pointer;
}

.unit {
  position: absolute;
  right: 16px;
  color: var(--label-3);
  font-size: var(--text-footnote);
  font-weight: 600;
  pointer-events: none;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

input[type="number"] {
  -moz-appearance: textfield;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: var(--label-2);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--ember-fill);
}

/* Cards and grouped lists */
.text-card,
.notice {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.text-card p + p,
.text-card .pills + p {
  margin-top: var(--space-3);
}

.text-card .pills:not(:first-child) {
  margin-top: var(--space-5);
}

.notice {
  margin-top: var(--space-5);
  color: var(--label-2);
  font-size: var(--text-footnote);
}

.grouped-list {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--card);
}

.grouped-list > a,
.grouped-list > button {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 60px;
  padding: 12px var(--space-4);
  border: 0;
  background: transparent;
  text-align: left;
  transition: background-color var(--duration-fast);
}

.grouped-list > * + * {
  box-shadow: inset 0 0.5px 0 var(--sep);
}

.grouped-list > a:hover,
.grouped-list > button:hover {
  background: var(--card-2);
}

.grouped-list span:not(.topic-dot):not(.tile-icon) {
  display: grid;
  flex: 1;
  gap: 2px;
}

.grouped-list strong {
  font-size: 1.0625rem;
  font-weight: 600;
}

.grouped-list small {
  color: var(--label-2);
  font-size: var(--text-footnote);
}

.grouped-list .icon {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--label-3);
}

.grouped-list .more {
  color: var(--accent-text);
  font-weight: 600;
}

.grouped-list .more .icon {
  color: inherit;
}

.grouped-list .tile-icon .icon {
  width: 18px;
  height: 18px;
  margin: 0;
  color: inherit;
}

.topic-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ember);
}

.topic-dot.n1 {
  background: var(--green);
}

.topic-dot.n2 {
  background: #bf5af2;
}

.topic-dot.n3 {
  background: var(--teal);
}

.topic-dot.n4 {
  background: #ffd60a;
}

/* Section heads */
.page-intro {
  display: grid;
  gap: var(--space-3);
  max-width: 52rem;
  margin-bottom: var(--space-7);
}

.page-intro h1 {
  font-size: var(--text-title-1);
  line-height: 1;
  letter-spacing: var(--tracking-title);
}

.page-intro > p:last-child {
  max-width: 40rem;
  margin-top: var(--space-2);
  color: var(--label-2);
  font-size: var(--text-lede);
  line-height: 1.45;
}

.section {
  margin-top: var(--space-8);
}

.section-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

.section-top > div {
  display: grid;
  gap: var(--space-2);
}

.section-top h2 {
  font-size: var(--text-title-2);
  line-height: 1.05;
  letter-spacing: var(--tracking-title);
}

.section-top h3 {
  font-size: var(--text-title-3);
  letter-spacing: -0.02em;
}

.section-top p {
  max-width: 38rem;
  color: var(--label-2);
}

.list-heading {
  margin-bottom: var(--space-3);
  color: var(--label-2);
  font-size: var(--text-footnote);
  font-weight: 600;
}

.metadata-footnote,
.figure-caption,
.calc-note {
  margin-top: var(--space-4);
  color: var(--label-3);
  font-size: var(--text-footnote);
  line-height: 1.5;
}

.empty {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  padding: var(--space-8) var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--card);
  text-align: center;
}

.empty > .icon {
  width: 32px;
  height: 32px;
  color: var(--label-3);
}

.empty h1 {
  font-size: var(--text-title-2);
  letter-spacing: var(--tracking-title);
}

.empty p {
  max-width: 30rem;
  color: var(--label-2);
}

/* Tables: inset grouped, numbers tabular. */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  background: var(--card);
}

.training-table,
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.training-table th,
.training-table td,
.compare-table td {
  padding: 14px var(--space-4);
  text-align: left;
  vertical-align: middle;
}

.training-table th {
  color: var(--label-3);
  font-size: var(--text-caption);
  font-weight: 600;
}

.training-table tbody tr,
.compare-table tr + tr {
  box-shadow: inset 0 0.5px 0 var(--sep);
}

.training-table td:first-child {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 260px;
  font-weight: 600;
}

.training-table td:first-child > span {
  width: 22px;
  color: var(--label-3);
  font-size: var(--text-caption);
}

.table-exercise-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface-light);
  object-fit: contain;
}

.compare-table td {
  min-width: 200px;
  vertical-align: top;
  font-size: var(--text-footnote);
}

.compare-table td:first-child {
  min-width: 120px;
  color: var(--label-3);
  font-weight: 600;
}

/* Dialogs: iOS sheets */
dialog {
  width: min(760px, calc(100% - 24px));
  max-height: min(86vh, 900px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-xl);
  background: var(--card);
  color: var(--label);
  box-shadow: 0 40px 100px rgb(0 0 0 / 0.5);
}

dialog::backdrop {
  background: rgb(0 0 0 / 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5);
  background: var(--card);
  box-shadow: 0 0.5px 0 var(--sep);
  color: var(--label-2);
  font-size: var(--text-footnote);
  font-weight: 600;
}

.dialog-body {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-5) var(--space-6);
}

.dialog-body h2 {
  font-size: var(--text-title-3);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.dialog-body h3 {
  margin-top: var(--space-3);
  font-size: 1.0625rem;
}

.dialog-body p {
  color: var(--label-2);
}

.takeaway {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: rgb(255 103 46 / 0.1);
}

.takeaway h3 {
  margin: 0 0 var(--space-2);
  color: var(--accent-text);
  font-size: var(--text-title-3);
  letter-spacing: -0.02em;
}

.takeaway p {
  color: var(--label);
}

.study-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--card-2);
}

.study-info div {
  padding: var(--space-3) var(--space-4);
}

.study-info div:nth-child(n + 3) {
  box-shadow: inset 0 0.5px 0 var(--sep);
}

.study-info dt {
  color: var(--label-3);
  font-size: var(--text-caption);
  font-weight: 600;
}

.study-info dd {
  font-size: var(--text-footnote);
}

.source-provenance,
.schema-code,
.copy-fallback {
  overflow: auto;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--card-2);
  color: var(--label-2);
  font-size: var(--text-caption);
}

.copy-fallback {
  width: 100%;
  min-height: 220px;
  border: 0;
}

.explanation {
  color: var(--accent-text);
  font-weight: 600;
  cursor: pointer;
}

.step-list {
  display: grid;
  gap: var(--space-3);
  counter-reset: step;
}

.step-list li {
  position: relative;
  padding-left: 40px;
  color: var(--label-2);
  counter-increment: step;
}

.step-list li::before {
  content: counter(step);
  position: absolute;
  top: -1px;
  left: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ember-fill);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
}

.step-list strong {
  color: var(--label);
}

/* Search sheet */
.search-dialog {
  width: min(640px, calc(100% - 24px));
  margin-top: 10vh;
}

.search-modal-top {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5);
  box-shadow: 0 0.5px 0 var(--sep);
  color: var(--label-3);
}

.search-modal-top input {
  flex: 1;
  min-height: 44px;
  border: 0;
  background: transparent;
  font-size: 1.125rem;
  outline: none;
}

.search-modal-top input:focus-visible {
  box-shadow: none;
}

.search-modal-results {
  display: grid;
  max-height: 56vh;
  overflow: auto;
  padding: var(--space-2);
}

.search-result {
  display: grid;
  gap: 2px;
  padding: 12px var(--space-4);
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  text-align: left;
}

.search-result:hover,
.search-result:focus-visible {
  background: var(--card-2);
}

.search-result small {
  color: var(--label-2);
  font-size: var(--text-footnote);
}

.search-modal-footer {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  box-shadow: inset 0 0.5px 0 var(--sep);
  color: var(--label-3);
  font-size: var(--text-caption);
}

kbd {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--fill);
  color: var(--label-2);
  font-size: 0.6875rem;
}

/* Compare dock and toast */
.compare-bar {
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 8px 8px 20px;
  border-radius: var(--radius-pill);
  background: var(--card-2);
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.45);
  font-size: var(--text-footnote);
  font-weight: 600;
  transform: translateX(-50%);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 60;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--label);
  color: var(--bg);
  font-size: var(--text-footnote);
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity var(--duration-standard) var(--ease-standard),
    transform var(--duration-standard) var(--ease-standard);
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.compare-bar ~ .toast {
  bottom: 88px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/*
 * SetCtl Wissen — page layouts. Same rhythm as the product page: one large
 * statement per section, grouped cards, and a light sheet for the plans so the
 * exercise illustrations sit on the background they were drawn on.
 */

/* Übersicht */
.home-hero {
  display: grid;
  justify-items: start;
  gap: var(--space-3);
  padding: var(--space-4) 0 var(--space-7);
}

.home-hero h1 {
  font-size: clamp(2.75rem, 1.6rem + 4.6vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: var(--tracking-display);
}

.home-hero .lede {
  max-width: 36rem;
  margin-top: var(--space-2);
  color: var(--label-2);
  font-size: var(--text-lede);
  line-height: 1.45;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: min(560px, 100%);
  min-height: 52px;
  margin-top: var(--space-4);
  padding: 0 var(--space-3) 0 var(--space-5);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--card);
  color: var(--label-3);
  font-size: 1rem;
  text-align: left;
}

.hero-search:hover {
  background: var(--card-2);
}

.hero-search span {
  flex: 1;
}

/* Quick access: three equal columns like the Cloudflare home. */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--space-4);
}

.quick-col {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: var(--space-3);
}

.quick-col h2 {
  color: var(--label-2);
  font-size: var(--text-footnote);
  font-weight: 600;
}

.quick-col .grouped-list {
  align-content: start;
}

.quick-item {
  min-height: 64px;
}

.quick-item .tile-icon {
  width: 32px;
  height: 32px;
}

.quick-item strong {
  font-size: 0.9375rem !important;
}

.quick-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-section {
  padding-top: var(--space-8);
}

.topic-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-3);
}

.topic-tile {
  display: grid;
  gap: 4px;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(
      160deg,
      color-mix(in srgb, var(--c) 22%, transparent),
      transparent 70%
    ),
    var(--card);
  transition: background-color var(--duration-fast);
}

.topic-tile:hover {
  background-color: var(--card-2);
}

.topic-tile strong {
  font-size: 1rem;
}

.topic-tile span {
  color: var(--label-2);
  font-size: var(--text-footnote);
}

/* Research questions */
.question-rail {
  display: grid;
  grid-auto-columns: minmax(270px, 1fr);
  grid-auto-flow: column;
  gap: var(--space-3);
  margin-inline: calc(var(--gutter) * -1);
  padding: 0 var(--gutter) var(--space-2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.question-rail::-webkit-scrollbar {
  display: none;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
}

.question-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: start;
  gap: var(--space-3);
  min-height: 220px;
  padding: var(--space-5);
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--card);
  text-align: left;
  scroll-snap-align: start;
}

.question-card:hover {
  background: var(--card-2);
}

.question-card .question {
  color: var(--accent-text);
  font-size: var(--text-footnote);
  font-weight: 700;
}

.question-card strong {
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.question-source {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-top: var(--space-3);
  box-shadow: inset 0 0.5px 0 var(--sep);
  color: var(--label-3);
  font-size: var(--text-caption);
  font-weight: 600;
}

.design-meter {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  flex: none;
}

.design-meter i {
  width: 4px;
  border-radius: 1px;
  background: var(--fill-strong);
}

.design-meter i:nth-child(1) {
  height: 6px;
}

.design-meter i:nth-child(2) {
  height: 8px;
}

.design-meter i:nth-child(3) {
  height: 10px;
}

.design-meter i:nth-child(4) {
  height: 12px;
}

.design-meter i:nth-child(5) {
  height: 14px;
}

.design-meter i.on {
  background: var(--ember);
}

.exercise-triptych {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.exercise-triptych img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: var(--surface-light);
  object-fit: contain;
}

/* Studienbibliothek */
.library-questions {
  margin-bottom: var(--space-7);
}

.library-questions[hidden] {
  display: none;
}

.library-questions .question-card {
  min-height: 200px;
}

.catalogue-state-unused {
  margin-bottom: var(--space-4);
  color: var(--label-2);
  font-size: var(--text-footnote);
}

.catalogue-state strong {
  color: var(--label);
}

.catalogue-state a {
  color: var(--accent-text);
  font-weight: 600;
}

.filter-panel {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field .icon {
  position: absolute;
  left: 20px;
  color: var(--label-3);
}

.search-field input {
  min-height: 56px;
  padding-left: 52px;
  border-radius: var(--radius-pill);
  background: var(--card);
}

.filter-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}

.filter-bottom select,
.result-tools select {
  width: auto;
  min-height: 36px;
  padding: 0 36px 0 14px;
  border-radius: var(--radius-pill);
  background-color: var(--card);
  font-size: 0.875rem;
  font-weight: 600;
  background-position: right 12px center;
}

.filter-reset {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--accent-text);
  font-size: 0.875rem;
  font-weight: 600;
}

.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

#result-count {
  color: var(--label-2);
  font-size: var(--text-footnote);
}

#result-count strong {
  color: var(--label);
}

.result-tools {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.result-list {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--card);
}

.result-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding-right: var(--space-3);
  transition: background-color var(--duration-fast);
}

.result-item + .result-item {
  box-shadow: inset 0 0.5px 0 var(--sep);
}

.result-item:hover {
  background: var(--card-2);
}

.result-main {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  flex: 1;
  gap: var(--space-4);
  padding: var(--space-4) 0 var(--space-4) var(--space-4);
  border: 0;
  background: transparent;
  text-align: left;
}

.result-design {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 6px;
  padding-top: 3px;
}

.result-design small {
  color: var(--label-3);
  font-size: var(--text-caption);
  font-weight: 600;
}

.result-text {
  display: grid;
  gap: 6px;
}

.result-note {
  color: var(--accent-text);
  font-size: var(--text-footnote);
}

.result-text h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.result-meta {
  color: var(--label-2);
  font-size: var(--text-footnote);
}

.item-actions {
  display: flex;
  gap: 2px;
  padding-top: var(--space-3);
}

/* Card view */
.result-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-3);
  overflow: visible;
  background: transparent;
}

.result-grid .result-item {
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: none;
}

.result-grid .result-main {
  grid-template-columns: 1fr;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
  color: var(--label-2);
  font-size: var(--text-footnote);
}

.pagination-buttons {
  display: flex;
  gap: var(--space-2);
}

/* Featured study rows (plans, guides) */
.featured-rows {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--card);
}

.study-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border: 0;
  background: transparent;
  text-align: left;
  transition: background-color var(--duration-fast);
}

.study-row + .study-row {
  box-shadow: inset 0 0.5px 0 var(--sep);
}

.study-row:hover {
  background: var(--card-2);
}

.study-row h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
}

.study-row p {
  margin-top: 4px;
  color: var(--label-2);
  font-size: var(--text-footnote);
}

.row-end {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--label-3);
}

.row-end .icon {
  width: 16px;
}

/* Trainingspläne */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.plan-card {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--card);
  transition: background-color var(--duration-fast);
}

.plan-card:hover {
  background: var(--card-2);
}

.plan-cover {
  padding: var(--space-4) var(--space-4) 0;
}

.plan-cover img {
  border-radius: var(--radius-md);
}

.plan-card-content {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5) var(--space-5);
}

.plan-card h2 {
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}

.plan-card p {
  color: var(--label-2);
  font-size: 0.9375rem;
}

.plan-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-2);
  color: var(--label-3);
  font-size: var(--text-footnote);
  font-weight: 600;
}

.plan-card-bottom .icon {
  color: var(--accent-text);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--space-6);
  color: var(--accent-text);
  font-size: 0.9375rem;
  font-weight: 600;
}

.back-link .icon {
  width: 16px;
}

.plan-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: var(--space-7);
}

.plan-detail-hero h1 {
  font-size: var(--text-title-1);
  line-height: 1;
  letter-spacing: var(--tracking-title);
}

.plan-detail-hero p {
  color: var(--label-2);
  font-size: var(--text-lede);
}

.plan-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.plan-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--card);
  color: var(--label-2);
  font-size: var(--text-footnote);
  font-weight: 600;
}

.plan-meta .icon {
  width: 15px;
}

.tiny-line {
  display: none;
}

.week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-2);
}

.week-day {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  color: var(--label-3);
  font-size: var(--text-caption);
  font-weight: 600;
}

.week-day span {
  display: grid;
  place-items: center;
  width: min(48px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--fill);
  color: var(--label-3);
  font-size: 0.875rem;
}

.week-day.on span {
  background: var(--ember-fill);
  color: #fff;
}

.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  margin: var(--space-6) 0 var(--space-3);
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--card);
}

.tab {
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--label-2);
  font-size: 0.875rem;
  font-weight: 600;
}

.tab.active {
  background: var(--fill-strong);
  color: var(--label);
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.two-col .eyebrow {
  font-size: var(--text-footnote);
}

.two-col h3 {
  margin: var(--space-2) 0;
  font-size: var(--text-title-3);
  letter-spacing: -0.02em;
}

.two-col p {
  color: var(--label-2);
}

/* Generator: the app planner's grouped rows. */
.generator-workbench {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  align-items: start;
  gap: var(--space-5);
}

.generator-config {
  position: sticky;
  top: 84px;
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  background: var(--card);
}

.generator-config > label {
  display: grid;
  gap: var(--space-2);
  color: var(--label-2);
  font-size: var(--text-footnote);
  font-weight: 600;
}

.config-title {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.config-title span {
  display: none;
}

.config-title h2 {
  font-size: var(--text-title-3);
  letter-spacing: -0.02em;
}

.day-segment {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--fill);
}

.day-segment .sc-button {
  min-height: 34px;
  padding: 0;
  background: transparent;
  color: var(--label-2);
}

.day-segment .sc-button[data-variant="default"] {
  background: var(--ember-fill);
  color: #fff;
}

.sc-native-select-wrapper {
  position: relative;
}

.sc-native-select-icon {
  display: none;
}

.config-explainer {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--card-2);
  color: var(--label-2);
  font-size: var(--text-footnote);
}

.config-explainer h3 {
  color: var(--label);
  font-size: 0.9375rem;
}

.generator-preview {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.generator-preview-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
}

.generator-preview-header h2 {
  margin: var(--space-2) 0 var(--space-1);
  font-size: var(--text-title-2);
  line-height: 1.05;
  letter-spacing: var(--tracking-title);
}

.generator-preview-header p {
  color: var(--label-2);
}

.generator-export {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.week-dock {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-2);
}

.week-dock div {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: var(--space-3) 4px;
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--label-3);
  font-size: var(--text-caption);
  font-weight: 600;
}

.week-dock strong {
  font-size: 0.8125rem;
}

.week-dock .training {
  background: rgb(255 103 46 / 0.14);
  color: var(--accent-text);
}

.generator-days {
  display: inline-flex;
  flex-wrap: wrap;
  justify-self: start;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--card);
}

.generator-days .sc-button {
  min-height: 34px;
  padding: 0 16px;
  background: transparent;
  color: var(--label-2);
  font-size: 0.875rem;
}

.generator-days .sc-button[data-variant="secondary"] {
  background: var(--fill-strong);
  color: var(--label);
}

.generator-table-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--label-3);
  font-size: var(--text-caption);
  font-weight: 600;
}

.editable-exercise-list {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--card);
}

.editable-exercise {
  display: grid;
  grid-template-columns: 22px 56px minmax(150px, 1fr) auto auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
}

.editable-exercise + .editable-exercise {
  box-shadow: inset 0 0.5px 0 var(--sep);
}

.exercise-index {
  color: var(--label-3);
  font-size: var(--text-caption);
  font-weight: 600;
}

.exercise-thumbnail img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--surface-light);
  object-fit: contain;
}

.exercise-row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.exercise-row-main strong {
  font-size: 1rem;
  font-weight: 600;
}

.exercise-row-main button {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-text);
  font-size: var(--text-footnote);
  font-weight: 600;
}

.exercise-prescription {
  display: grid;
  grid-template-columns: repeat(5, 62px);
  gap: var(--space-2);
}

.exercise-prescription label {
  display: grid;
  gap: 4px;
  color: var(--label-3);
  font-size: 0.6875rem;
  font-weight: 600;
  text-align: center;
}

.exercise-prescription .sc-input {
  min-height: 40px;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  font-family: var(--font-rounded);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}

.row-reorder {
  display: flex;
  gap: 2px;
}

.row-reorder .sc-button {
  width: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 50%;
  font-size: 1rem;
}

.add-exercise {
  justify-self: start;
}

.generator-analysis,
.generator-rationale {
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  background: var(--card);
}

.generator-analysis .section-top {
  margin-bottom: var(--space-3);
}

.generator-analysis .section-top h3 {
  font-size: var(--text-title-3);
}

.generator-rationale h3 {
  font-size: var(--text-title-3);
  letter-spacing: -0.02em;
}

.generator-rationale p {
  margin-top: var(--space-2);
  color: var(--label-2);
}

.generator-rationale .button-row a {
  color: var(--accent-text);
  font-weight: 600;
}

.exercise-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background: rgb(0 0 0 / 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.exercise-picker {
  display: grid;
  gap: var(--space-4);
  width: min(860px, 100%);
  max-height: 86vh;
  overflow: auto;
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  background: var(--card);
}

.picker-heading {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
}

.picker-heading h2 {
  font-size: var(--text-title-3);
}

.picker-heading p {
  color: var(--label-2);
  font-size: var(--text-footnote);
}

.picker-categories .sc-button {
  min-height: 34px;
  padding: 0 14px;
  font-size: 0.8125rem;
  background: var(--fill);
}

.picker-categories .sc-button[data-variant="secondary"] {
  background: var(--label);
  color: var(--bg);
}

.exercise-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3);
}

.exercise-picker-grid button {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-2) var(--space-3);
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--card-2);
  font-size: var(--text-footnote);
  text-align: left;
}

.exercise-picker-grid button:hover {
  box-shadow: inset 0 0 0 2px var(--ember);
}

.exercise-picker-grid img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  background: var(--surface-light);
  object-fit: contain;
}

/* Rechner */
.calculator-layout {
  display: grid;
  gap: var(--space-5);
}

.calculator-nav {
  display: flex;
  flex-wrap: wrap;
  justify-self: start;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--card);
}

.calculator-nav button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--label-2);
  font-size: 0.9375rem;
  font-weight: 600;
}

.calculator-nav button .icon {
  width: 16px;
  height: 16px;
}

.calculator-nav button.active {
  background: var(--fill-strong);
  color: var(--label);
}

.calculator-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: start;
  gap: var(--space-4) var(--space-7);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  background: var(--card);
}

.calc-form {
  display: grid;
  align-content: start;
  gap: var(--space-4);
}

.calc-form > p {
  color: var(--label-2);
}

.calc-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.calc-head h2 {
  font-size: var(--text-title-2);
  line-height: 1.05;
  letter-spacing: var(--tracking-title);
}

.calculator-fields {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

.calc-output {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--card-2);
}

.output-label {
  color: var(--label-2);
  font-size: var(--text-footnote);
  font-weight: 600;
}

.output-value {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  color: var(--accent-text);
  font-family: var(--font-rounded);
  font-size: clamp(3.25rem, 2.4rem + 3vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.output-value span {
  color: var(--label-2);
  font-family: var(--font);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0;
}

.formula {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--label-2);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: var(--text-footnote);
  font-variant-numeric: tabular-nums;
}

.load-bars {
  display: grid;
  gap: var(--space-2);
}

.load-row {
  display: grid;
  grid-template-columns: 44px 1fr 72px;
  align-items: center;
  gap: var(--space-3);
  color: var(--label-2);
  font-size: var(--text-footnote);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.load-row output {
  color: var(--label);
  text-align: right;
}

.load-track,
.range-track {
  display: flex;
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--fill);
}

.load-fill,
.segment {
  height: 100%;
  background: var(--ember);
}

.segment.extension {
  background: rgb(255 103 46 / 0.4);
}

.segment-labels {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--label-3);
  font-size: var(--text-caption);
  font-weight: 600;
}

.calc-warning {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: rgb(255 69 58 / 0.14);
  color: #ff6961;
  font-size: var(--text-footnote);
  font-weight: 600;
}

:root[data-theme="light"] .calc-warning {
  color: #c1121f;
}

#calc-chart {
  margin-top: var(--space-4);
}

/* Index */
.model-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  color: var(--label-2);
  font-size: var(--text-footnote);
  font-weight: 600;
}

.model-status button {
  border: 0;
  background: none;
  color: var(--accent-text);
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.index-scale {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: var(--space-2);
}

.index-scale i {
  height: 10px;
  border-radius: 5px;
  background: var(--fill);
}

.index-output[data-zone="low"] .index-scale i:nth-of-type(1),
.index-output[data-zone="middle"] .index-scale i:nth-of-type(2),
.index-output[data-zone="high"] .index-scale i:nth-of-type(3) {
  background: var(--ember);
}

.index-scale span {
  position: absolute;
  top: -6px;
  width: 4px;
  height: 22px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--label);
}

.zone-caption {
  color: var(--label-2);
  font-size: var(--text-footnote);
}

.factor-list {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg);
}

.factor-list > div {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-footnote);
}

.factor-list > div + div {
  box-shadow: inset 0 0.5px 0 var(--sep);
}

.factor-list strong {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.factor-list small {
  color: var(--label-3);
}

.index-method {
  display: grid;
  gap: var(--space-5);
}

.index-method h2 {
  font-size: var(--text-title-2);
  letter-spacing: var(--tracking-title);
}

.method-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.method-columns article {
  display: grid;
  align-content: start;
  gap: var(--space-2);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.method-columns span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ember-fill);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
}

.method-columns h3 {
  font-size: 1.125rem;
}

.method-columns p {
  color: var(--label-2);
  font-size: 0.9375rem;
}

.index-method > .button {
  justify-self: start;
}

/* Leitfäden and articles */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
}

.guide-card {
  display: grid;
  align-content: space-between;
  gap: var(--space-5);
  min-height: 200px;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--card);
  transition: background-color var(--duration-fast);
}

.guide-card:hover {
  background: var(--card-2);
}

.guide-card .category,
.article-header .eyebrow {
  color: var(--accent-text);
  font-size: var(--text-footnote);
  font-weight: 700;
}

.guide-card h3 {
  font-size: 1.5rem;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.read {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--label-3);
  font-size: var(--text-footnote);
  font-weight: 600;
}

.read .icon {
  width: 16px;
  color: var(--accent-text);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--reading)) minmax(200px, 260px);
  justify-content: space-between;
  gap: var(--space-8);
}

.article-header {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-7);
}

.article-header h1 {
  font-size: var(--text-title-1);
  line-height: 1;
  letter-spacing: var(--tracking-title);
}

.article-header > p {
  color: var(--label-2);
  font-size: var(--text-lede);
  line-height: 1.45;
}

.article-section {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-6) 0;
  box-shadow: inset 0 0.5px 0 var(--sep);
}

.article-section h2 {
  font-size: 1.625rem;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.article-section p {
  color: var(--label-2);
  font-size: 1.125rem;
  line-height: 1.6;
}

.article-section .button {
  justify-self: start;
}

.toc {
  position: sticky;
  top: 96px;
  display: grid;
  align-self: start;
  gap: var(--space-2);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--card);
  font-size: var(--text-footnote);
}

.toc strong {
  margin-bottom: var(--space-1);
}

.toc a {
  color: var(--label-2);
}

.toc a:hover {
  color: var(--accent-text);
}

.toc p {
  color: var(--label-2);
}

.method-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-7);
}

.method-stats .text-card {
  display: grid;
  gap: 4px;
}

.method-stats strong {
  font-family: var(--font-rounded);
  font-size: 2.5rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.method-stats small {
  color: var(--label-2);
  font-size: var(--text-footnote);
}

/* Responsive */
@media (max-width: 1099px) {
  .generator-workbench {
    grid-template-columns: minmax(0, 1fr);
  }

  .generator-config {
    position: static;
  }

  .editable-exercise {
    grid-template-columns: 22px 56px minmax(0, 1fr) auto;
  }

  .exercise-prescription {
    grid-column: 2 / -1;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .row-reorder {
    grid-row: 1;
    grid-column: 4;
  }

  .calculator-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .calculator-card > #calc-result {
    grid-column: 1;
    grid-row: auto;
  }

  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    display: none;
  }
}

@media (max-width: 899px) {
  .content {
    padding-top: var(--space-6);
  }

  .quick-grid,
  .plan-detail-hero,
  .two-col,
  .method-columns,
  .method-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .topic-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .result-main {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-2);
  }

  .result-design {
    display: flex;
    align-items: center;
  }

  .result-item {
    flex-direction: column;
    padding: 0 0 var(--space-3);
  }

  .item-actions {
    padding: 0 var(--space-3);
  }

  .filter-reset {
    margin-left: 0;
  }

  .calculator-card {
    padding: var(--space-5);
  }

  .week-dock {
    gap: 4px;
  }

  .week-dock strong {
    font-size: 0.6875rem;
  }
}

@media (max-width: 599px) {
  .question-rail {
    grid-auto-columns: 82%;
  }

  .editable-exercise {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    padding: var(--space-3);
  }

  .exercise-index {
    display: none;
  }

  .exercise-thumbnail img {
    width: 48px;
    height: 48px;
  }

  .exercise-prescription {
    grid-column: 1 / -1;
  }

  .row-reorder {
    grid-column: 3;
  }

  .calculator-nav,
  .generator-days,
  .tabs {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .generator-days .sc-button,
  .tab {
    flex: none;
  }

  .calculator-nav button {
    white-space: nowrap;
  }

  .study-info {
    grid-template-columns: minmax(0, 1fr);
  }

  .study-info div:nth-child(n + 2) {
    box-shadow: inset 0 0.5px 0 var(--sep);
  }

  .study-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .row-end {
    display: none;
  }

  .compare-bar {
    width: calc(100% - 24px);
    justify-content: space-between;
  }
}

/* ===== v2 components ===== */

/* Page intro gets its area colour as a thin accent line. */
.page-intro h1::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  margin-top: var(--space-4);
  border-radius: 2px;
  background: var(--c, var(--ember));
}

/* Filters: coloured topic chips, a real switch instead of a checkbox. */
.chip[data-color].active {
  background: color-mix(in srgb, var(--c) 22%, var(--card));
  color: var(--label);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  color: var(--label-2);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 40px;
  height: 24px;
  border-radius: 12px;
  background: var(--fill-strong);
  transition: background-color var(--duration-standard) var(--ease-standard);
}

.switch-track span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.3);
  transition: transform var(--duration-standard) var(--ease-standard);
}

.switch input:checked + .switch-track {
  background: var(--green);
}

.switch input:checked + .switch-track span {
  transform: translateX(16px);
}

.switch input:focus-visible + .switch-track {
  box-shadow: var(--focus-ring);
}

.result-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Calculators */
.calculator-nav {
  margin-bottom: var(--space-5);
}

.calculator-nav button .icon {
  color: var(--c);
}

.calculator-nav button.active {
  background: color-mix(in srgb, var(--c) 20%, var(--fill));
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.field > span {
  color: var(--label-2);
}

.choice {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--fill);
}

.choice button {
  min-height: 40px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--label-2);
  font-size: 0.9375rem;
  font-weight: 600;
}

.choice button[aria-checked="true"] {
  background: var(--fill-strong);
  color: var(--label);
}

.calc-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--label-2);
  font-size: var(--text-footnote);
  font-weight: 600;
}

.calc-source .icon {
  width: 15px;
  height: 15px;
}

.calc-source:hover {
  color: var(--label);
}

.calc-note a {
  color: var(--accent-text);
  font-weight: 600;
}

.calc-output {
  background:
    radial-gradient(
      120% 80% at 100% 0%,
      color-mix(in srgb, var(--c) 16%, transparent),
      transparent 60%
    ),
    var(--card-2);
}

.output-value {
  flex-wrap: wrap;
  color: var(--c);
}

.range-dash {
  margin: 0 0.18em;
  color: var(--label-3);
  font-size: 0.55em;
  font-style: normal;
  font-weight: 400;
  vertical-align: 0.35em;
}

.calc-steps {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg);
}

.calc-steps div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 12px var(--space-4);
  font-size: var(--text-footnote);
}

.calc-steps div + div {
  box-shadow: inset 0 0.5px 0 var(--sep);
}

.calc-steps dt {
  color: var(--label-2);
}

.calc-steps dd {
  color: var(--label-2);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.calc-steps b {
  color: var(--label);
  font-weight: 600;
}

.goal-rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.goal-rows div {
  display: grid;
  gap: 2px;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--c) 12%, var(--bg));
}

.goal-rows span {
  color: var(--c);
  font-size: var(--text-caption);
  font-weight: 700;
}

.goal-rows strong {
  font-family: var(--font-rounded);
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
}

.goal-rows strong .range-dash {
  color: var(--label-3);
}

.goal-rows small {
  color: var(--label-3);
  font-size: var(--text-caption);
}

.load-row {
  grid-template-columns: 44px 1fr 72px 80px;
}

.load-row small {
  color: var(--label-3);
  font-size: var(--text-caption);
}

.load-fill {
  background: var(--c, var(--ember));
}

/* Guides */
.guide-filter {
  margin-bottom: var(--space-5);
}

.guide-card {
  position: relative;
  min-height: 230px;
  padding-top: calc(var(--space-5) + 4px);
  overflow: hidden;
}

.guide-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--c);
}

.guide-card .category {
  color: var(--c) !important;
}

.guide-card p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--label-2);
  font-size: 0.9375rem;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.article-layout .eyebrow {
  color: var(--c);
}

.answer {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--c) 12%, var(--card));
  box-shadow: inset 4px 0 0 var(--c);
}

.answer span {
  color: var(--c);
  font-size: var(--text-footnote);
  font-weight: 700;
}

.answer p {
  font-size: 1.1875rem;
  line-height: 1.5;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.facts div {
  display: grid;
  gap: 4px;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.facts strong {
  color: var(--c);
  font-family: var(--font-rounded);
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.facts span {
  color: var(--label-2);
  font-size: var(--text-footnote);
}

.visual {
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  background: var(--card);
}

.visual figcaption {
  color: var(--label-3);
  font-size: var(--text-footnote);
}

.vbar {
  display: grid;
  grid-template-columns: minmax(90px, 0.6fr) 1fr auto;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-footnote);
}

.vbar-label {
  color: var(--label-2);
}

.vbar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--fill);
}

.vbar-track span {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: color-mix(in srgb, var(--c) 45%, var(--fill-strong));
}

.vbar.on .vbar-track span {
  background: var(--c);
}

.vbar strong {
  font-variant-numeric: tabular-nums;
}

.vrange {
  position: relative;
  height: 64px;
  margin: 0 8px;
}

.vrange::before {
  content: "";
  position: absolute;
  inset: 18px 0 auto;
  height: 12px;
  border-radius: 6px;
  background: var(--fill);
}

.vrange-band {
  position: absolute;
  top: 18px;
  height: 12px;
  border-radius: 6px;
  background: var(--c);
}

.vrange-mark {
  position: absolute;
  top: 12px;
  display: grid;
  justify-items: center;
  width: 120px;
  margin-left: -60px;
  text-align: center;
}

.vrange-mark b {
  width: 3px;
  height: 24px;
  border-radius: 2px;
  background: var(--label);
}

.vrange-mark small {
  margin-top: 4px;
  color: var(--label-2);
  font-size: var(--text-caption);
  font-weight: 600;
}

.vrange-ends {
  display: flex;
  justify-content: space-between;
  color: var(--label-3);
  font-size: var(--text-caption);
}

.visual-timeline ol,
.visual-steps ol {
  display: grid;
  gap: 0;
}

.visual-timeline li,
.visual-steps li {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 0 0 var(--space-4) 28px;
}

.visual-timeline li::before,
.visual-steps li::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c);
}

.visual-timeline li:not(:last-child)::after,
.visual-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 2px;
  left: 5px;
  width: 2px;
  background: color-mix(in srgb, var(--c) 35%, transparent);
}

.vt-time {
  color: var(--c);
  font-size: var(--text-caption);
  font-weight: 700;
}

.visual-timeline p,
.visual-steps p {
  color: var(--label-2);
  font-size: 0.9375rem;
}

.visual-steps ol {
  counter-reset: vs;
}

.visual-steps li {
  counter-increment: vs;
  padding-left: 36px;
}

.visual-steps li::before {
  content: counter(vs);
  top: -1px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
}

.visual-steps li:not(:last-child)::after {
  left: 11px;
  top: 26px;
}

.vweek-head,
.vweek-row {
  display: grid;
  grid-template-columns: minmax(96px, 1.4fr) repeat(7, minmax(0, 1fr));
  align-items: center;
  gap: 4px;
}

.vweek-head span {
  color: var(--label-3);
  font-size: var(--text-caption);
  font-weight: 600;
  text-align: center;
}

.vweek-row strong {
  font-size: var(--text-footnote);
}

.vweek-row span {
  display: grid;
  place-items: center;
  height: 30px;
  border-radius: 8px;
  background: var(--fill);
  color: var(--label-3);
  font-size: 0.6875rem;
  font-weight: 700;
}

.vweek-row span.on {
  background: color-mix(in srgb, var(--c) 30%, var(--fill));
  color: var(--label);
}

.tool-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--card);
}

.tool-link span:not(.tile-icon) {
  display: grid;
  flex: 1;
}

.tool-link small {
  color: var(--label-2);
  font-size: var(--text-footnote);
}

.tool-link > .icon {
  color: var(--c);
}

/* Study dialog */
.dialog-meta {
  font-size: var(--text-footnote);
}

.takeaway span {
  color: var(--accent-text);
  font-size: var(--text-footnote);
  font-weight: 700;
}

.takeaway h3 {
  margin: 6px 0 0;
  color: var(--label);
  font-size: 1.375rem;
  line-height: 1.2;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

.note-block {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--card-2);
  box-shadow: inset 0 3px 0 var(--c);
}

.note-block h3 {
  margin: 0;
  color: var(--c);
  font-size: var(--text-footnote);
}

.note-block p {
  color: var(--label) !important;
  font-size: 0.9375rem;
}

.design-explain {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--card-2);
}

.design-explain .design-meter {
  margin-top: 4px;
}

.design-explain p {
  margin-top: 2px;
  font-size: var(--text-footnote);
}

/* Splits */
.split-compare {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.split-chip {
  display: grid;
  gap: 2px;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--c) 14%, var(--card));
  box-shadow: inset 0 3px 0 var(--c);
}

.split-chip span {
  color: var(--label-2);
  font-size: var(--text-footnote);
}

.split-section {
  padding-top: var(--space-7);
}

.split-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
}

.split-head h2 {
  font-size: var(--text-title-2);
  letter-spacing: var(--tracking-title);
}

.split-head h2::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 12px;
  border-radius: 50%;
  background: var(--c);
  vertical-align: middle;
}

.split-head p {
  max-width: 40rem;
  margin-top: var(--space-2);
  color: var(--label-2);
}

.split-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.split-facts span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--card);
  color: var(--label-2);
  font-size: var(--text-footnote);
  font-weight: 600;
}

.split-facts .icon {
  width: 15px;
  color: var(--c);
}

.plan-card h3 {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

/* Responsive (mobile first adjustments) */
@media (max-width: 1099px) {
  .calculator-card {
    grid-template-columns: minmax(0, 1fr);
  }


}

@media (max-width: 899px) {
  .split-compare {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .content {
    padding-top: var(--space-5);
  }

  .topic-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .goal-rows,
  .note-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .load-row {
    grid-template-columns: 40px 1fr 64px;
  }

  .load-row small {
    display: none;
  }

  .vbar {
    grid-template-columns: minmax(70px, 0.7fr) 1fr auto;
  }

  .calculator-card {
    padding: var(--space-4);
    border-radius: var(--radius-lg);
  }

  .calc-head h2 {
    font-size: 1.5rem;
  }
}

/* Scoped shadcn adaptations and Bklit chart presentation. No runtime CSS CDN.
   Buttons, inputs, selects and badges take the shared SetCtl styles from
   styles.css (capsules, filled iOS fields); only card parts are defined here. */
.sc-card {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--label);
}
.sc-card-header,
.sc-card-content {
  display: grid;
  gap: var(--space-2);
}
.sc-card-title {
  font-size: var(--text-title-3);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.sc-card-description {
  color: var(--label-2);
  font-size: var(--text-footnote);
}
.sc-card-footer {
  display: flex;
  align-items: center;
}
.sc-button[data-variant="outline"],
.sc-button[data-variant="secondary"] {
  background: var(--fill);
  color: var(--label);
}
.sc-button[data-variant="link"] {
  min-height: 0;
  padding: 0;
  background: none;
  color: var(--accent-text);
}
.sc-button[data-size="icon"] {
  width: 36px;
  min-height: 36px;
  padding: 0;
}
.sc-input::placeholder {
  color: var(--label-3);
}
.sc-input[aria-invalid="true"],
.sc-native-select[aria-invalid="true"] {
  box-shadow: inset 0 0 0 2px #ff453a;
}
.bklit-island {
  margin: 0;
  min-width: 0;
  --chart-background: var(--surface, var(--panel, #191d22));
  --chart-foreground: var(--text, #e9ece9);
  --chart-foreground-muted: var(--muted, #9ca49f);
  --chart-label: var(--muted, #9ca49f);
  --chart-line-primary: var(--chart-1, #c5dc9c);
  --chart-line-secondary: var(--chart-2, #66b4a9);
  --chart-crosshair: var(--muted, #9ca49f);
  --chart-grid: var(--border, #30362f);
  --chart-indicator-color: var(--text, #e9ece9);
  --chart-indicator-secondary-color: var(--muted, #9ca49f);
  --chart-marker-background: var(--surface, var(--panel, #191d22));
  --chart-marker-border: var(--border, #30362f);
  --chart-marker-foreground: var(--text, #e9ece9);
  --chart-marker-badge-background: var(--surface-2, var(--panel-2, #262b30));
  --chart-marker-badge-foreground: var(--text, #e9ece9);
  --chart-segment-background: var(--surface-2, var(--panel-2, #262b30));
  --chart-segment-line: var(--border, #30362f);
  --chart-brush-border: var(--accent, #c5dc9c);
  --chart-tooltip-background: var(--surface, var(--panel, #191d22));
}
.bklit-chart-wrap,
.docs-bklit-chart {
  position: relative;
  height: var(--docs-chart-height, 240px);
  width: 100%;
  min-width: 0;
}
.bklit-chart-wrap svg {
  display: block;
}
.bklit-description {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 9px;
}
.bklit-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 10px 0;
  font-size: 11px;
  color: var(--muted);
}
.bklit-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bklit-legend i {
  height: 7px;
  width: 7px;
  border-radius: 2px;
}
.bklit-data-table {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
}
.bklit-data-table summary {
  cursor: pointer;
  width: fit-content;
}
.bklit-data-table table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.bklit-data-table th,
.bklit-data-table td {
  padding: 7px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.bklit-data-table th {
  font-weight: 500;
  color: var(--text);
}
.bklit-empty {
  padding: 30px;
  color: var(--muted);
  font-size: 13px;
}
/* Bklit ships Tailwind class names; these selected utilities are scoped to its island. */
.bklit-island .relative {
  position: relative;
}
.bklit-island .absolute {
  position: absolute;
}
.bklit-island .inset-0 {
  inset: 0;
}
.bklit-island .top-0 {
  top: 0;
}
.bklit-island .bottom-0 {
  bottom: 0;
}
.bklit-island .right-0 {
  right: 0;
}
.bklit-island .z-50 {
  z-index: 50;
}
.bklit-island .pointer-events-none {
  pointer-events: none;
}
.bklit-island .overflow-visible {
  overflow: visible;
}
.bklit-island .overflow-hidden {
  overflow: hidden;
}
.bklit-island .w-full {
  width: 100%;
}
.bklit-island .w-max {
  width: max-content;
}
.bklit-island .flex {
  display: flex;
}
.bklit-island .items-center {
  align-items: center;
}
.bklit-island .justify-between {
  justify-content: space-between;
}
.bklit-island .justify-end {
  justify-content: flex-end;
}
.bklit-island .gap-2 {
  gap: 8px;
}
.bklit-island .gap-6 {
  gap: 24px;
}
.bklit-island .min-w-0 {
  min-width: 0;
}
.bklit-island .shrink-0 {
  flex-shrink: 0;
}
.bklit-island .size-2 {
  width: 8px;
  height: 8px;
}
.bklit-island .rounded-full {
  border-radius: 50%;
}
.bklit-island .rounded-xl {
  border-radius: 10px;
}
.bklit-island .border {
  border: 1px solid var(--border);
}
.bklit-island .border-b {
  border-bottom: 1px solid var(--border);
}
.bklit-island .text-sm {
  font-size: 12px;
}
.bklit-island .font-medium {
  font-weight: 500;
}
.bklit-island .text-left {
  text-align: left;
}
.bklit-island .text-right {
  text-align: right;
}
.bklit-island .tabular-nums {
  font-variant-numeric: tabular-nums;
}
.bklit-island .text-chart-tooltip-foreground {
  color: var(--text);
}
.bklit-island .text-chart-tooltip-muted {
  color: var(--muted);
}
.bklit-island .truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bklit-island .pr-2 {
  padding-right: 8px;
}
.bklit-island .px-3\.5 {
  padding-inline: 14px;
}
.bklit-island .py-2\.5 {
  padding-block: 10px;
}
.bklit-island .py-3 {
  padding-block: 12px;
}
.bklit-island .space-y-2 > * + * {
  margin-top: 8px;
}
.bklit-island .mt-2 {
  margin-top: 8px;
}
.bklit-island .min-w-\[160px\] {
  min-width: 160px;
}
.bklit-island .bg-chart-tooltip-background {
  background: var(--chart-tooltip-background);
}
@media (prefers-reduced-motion: reduce) {
  .sc-button,
  .sc-input,
  .sc-native-select {
    transition: none;
  }
}
.bklit-island {
  --foreground: var(--text);
}
.bklit-island .text-xs {
  font-size: 11px;
}
.bklit-island .whitespace-nowrap {
  white-space: nowrap;
}
.bklit-island .text-chart-label {
  color: var(--chart-label);
}
