@layer tokens, base, primitives, views;

@layer views {
  .masthead {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: var(--space-2) var(--space-3);
    padding-block: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-subtle, var(--border-hairline));
  }
  .masthead > .btn-subtle:first-child,
  .desk-bar-inner > .btn-subtle:first-child {
    margin-left: calc(-1 * var(--space-3));
  }
  @media (max-width: 520px) {
    .masthead { gap: var(--space-1) var(--space-2); }
    .masthead .btn-compact { padding-inline: var(--space-2); gap: 5px; font-size: 0.78125rem; }
  }
  .wordmark {
    font-family: var(--font-serif); font-size: 1.5rem; font-weight: 500;
    letter-spacing: -0.02em; line-height: 1.15; color: var(--text-ink); margin: 0;
  }
  .overview-workspace { max-width: 68rem; margin: 0 auto; width: 100%; }
  .overview-grid {
    display: grid; grid-template-columns: 1fr; gap: 2rem;
    padding-top: var(--space-5); align-items: start; min-width: 0;
  }
  @media (min-width: 920px) {
    .overview-grid {
      grid-template-columns: minmax(300px, 350px) minmax(0, 1fr);
      gap: 2.25rem;
    }
  }
  .continue-rail {
    background: var(--bg-surface);
    border: 1px solid var(--border-strong, var(--border-hairline));
    border-top: 3px solid var(--accent, var(--accent-primary));
    border-radius: var(--radius-md); padding: 1.25rem;
    display: flex; flex-direction: column; gap: 1rem; min-width: 0;
  }
  @media (min-width: 920px) {
    .continue-rail { position: sticky; top: 1.25rem; }
  }
  .rail-heading {
    font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 600;
    letter-spacing: -0.01em; line-height: 1.3; color: var(--text-ink); margin: 0;
  }
  .rail-section {
    border-top: 1px solid var(--border-subtle, var(--border-hairline));
    padding-top: 0.875rem; display: flex; flex-direction: column; gap: 0.625rem; min-width: 0;
  }
  .rail-queue-list { display: flex; flex-direction: column; min-width: 0; }
  .rail-queue-row {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
    padding-block: 0.5rem; border-top: 1px solid var(--border-subtle, var(--border-hairline));
    color: var(--text-ink); text-decoration: none; min-width: 0; width: 100%;
  }
  .rail-queue-row:first-child { border-top: none; }
  .rail-queue-row:hover { color: var(--accent-text); text-decoration: none; }
  .rail-queue-title {
    font-family: var(--font-sans); font-size: 0.875rem; font-weight: 500;
    line-height: 1.35; overflow: hidden; text-overflow: ellipsis; min-width: 0;
  }
  .capacity-pills {
    display: flex; flex-wrap: wrap; gap: 6px; min-width: 0;
  }
  .capacity-pill {
    padding: 0 0.625rem; font-size: 0.78125rem; border-radius: var(--radius-sm);
    font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  }
  .capacity-pill[aria-pressed="true"] {
    background: var(--accent-soft-bg); border-color: var(--accent-text);
    color: var(--text-ink); font-weight: 600;
  }
  .overview-main { display: flex; flex-direction: column; gap: 1.75rem; min-width: 0; }
  .composer-disclosure, .new-topic-disclosure, .archive-disclosure {
    border: 1px solid var(--border-subtle, var(--border-hairline));
    border-radius: var(--radius-md); background: var(--bg-surface); min-width: 0;
  }
  .archive-disclosure { background: transparent; margin-top: 0.5rem; }
  .composer-disclosure > summary, .new-topic-disclosure > summary, .archive-disclosure > summary, .rail-parked-disclosure > summary {
    list-style: none; display: flex; align-items: center; justify-content: space-between;
    gap: var(--space-2); padding: 0.625rem 1rem; cursor: pointer;
    font-weight: 500; color: var(--text-ink); user-select: none;
  }
  .rail-parked-disclosure > summary { padding-inline: 0; }
  .composer-disclosure > summary::-webkit-details-marker,
  .new-topic-disclosure > summary::-webkit-details-marker,
  .archive-disclosure > summary::-webkit-details-marker,
  .rail-parked-disclosure > summary::-webkit-details-marker { display: none; }
  .composer-disclosure[open] > summary,
  .new-topic-disclosure[open] > summary,
  .archive-disclosure[open] > summary {
    border-bottom: 1px solid var(--border-subtle, var(--border-hairline));
  }
  .composer-body { padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: var(--space-3); }
  .prompt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .prompt-chip {
    font-size: 0.78125rem; padding-inline: 0.625rem; border-color: var(--border-subtle, var(--border-hairline));
    background: var(--bg-subtle); color: var(--text-ink); white-space: normal; text-align: left;
  }
  .path-card-stack { display: flex; flex-direction: column; gap: 0.875rem; min-width: 0; }
  .path-card {
    background: var(--bg-surface); border: 1px solid var(--border-subtle, var(--border-hairline));
    border-radius: var(--radius-md); padding: 1.125rem 1.25rem;
    display: flex; flex-direction: column; gap: 0.75rem; min-width: 0;
  }
  .path-card-title {
    font-family: var(--font-serif); font-size: 1.125rem; font-weight: 500;
    letter-spacing: -0.01em; line-height: 1.3; color: var(--text-ink); text-decoration: none;
  }
  .path-card-title:hover { color: var(--accent-text); text-decoration: none; }
  .path-progress-track {
    width: 100%; height: 4px; border-radius: 999px;
    background: var(--bg-subtle); overflow: hidden;
  }
  .path-progress-fill {
    height: 100%; background: var(--accent, var(--accent-primary)); transition: width 0.3s ease;
  }
  .path-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: var(--space-2); padding-top: 0.25rem;
  }
  .path-card-footer .path-card-open {
    background: var(--bg-subtle);
    border-color: var(--border-subtle, var(--border-hairline));
    color: var(--text-ink);
  }
  .path-card-footer .path-card-open:hover:not(:disabled) {
    border-color: var(--accent-text);
    color: var(--accent-text);
  }
  .mini-zone {
    margin-top: 0.75rem; padding-top: 1.75rem;
    border-top: 1px solid var(--border-subtle, var(--border-hairline));
    display: flex; flex-direction: column; gap: 1rem; min-width: 0;
  }
  .mini-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
    gap: 0.75rem; min-width: 0;
  }
  .mini-tile {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle, var(--border-hairline));
    border-left: 3px solid var(--text-muted);
    border-radius: var(--radius-md); padding: 0.875rem 1rem;
    display: flex; flex-direction: column; justify-content: space-between; gap: 0.5rem; min-width: 0;
  }
  .mini-tile-title {
    font-family: var(--font-serif); font-size: 1.03125rem; font-weight: 500;
    line-height: 1.35; color: var(--text-ink); text-decoration: none;
  }
  .mini-tile-title:hover { color: var(--accent-text); text-decoration: none; }
  .hero-compose {
    padding-block: var(--space-10) var(--space-8);
    display: flex; flex-direction: column; gap: var(--space-5);
  }
  @media (max-width: 640px) {
    .hero-compose { padding-block: var(--space-6) var(--space-5); gap: var(--space-4); }
  }
  .hero-heading {
    font-family: var(--font-serif); font-size: clamp(1.85rem, 3.6vw, 2.5rem);
    font-weight: 400; line-height: 1.18; letter-spacing: -0.02em;
    color: var(--text-ink); margin: 0; text-align: center;
  }
  .hero-heading em { font-style: italic; font-weight: 400; color: var(--accent-text); }
  .hero-caption {
    margin: 0; text-align: center; color: var(--text-muted);
    font-size: 0.96875rem; line-height: 1.55;
  }
  .prompt-sheet {
    max-width: 660px; width: 100%; margin-inline: auto;
    background: var(--bg-surface); border: 1px solid var(--border-subtle, var(--border-hairline));
    border-radius: 12px; padding: var(--space-5) var(--space-6);
    box-shadow: 0 2px 14px rgba(27, 26, 23, 0.04);
    display: flex; flex-direction: column; gap: var(--space-3);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }
  @media (max-width: 640px) { .prompt-sheet { padding: var(--space-4); } }
  .prompt-sheet:focus-within { border-color: var(--accent-text); }
  .prompt-textarea {
    width: 100%; font-family: var(--font-sans); font-size: 1.03125rem; line-height: 1.6;
    color: var(--text-ink); border: none; background: transparent;
    padding: 0; min-height: 4.5rem; resize: none; outline: none;
  }
  .prompt-textarea::placeholder { color: var(--text-muted); }
  .prompt-textarea:focus-visible { outline: none; }
  .prompt-footer {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: var(--space-2); padding-top: var(--space-2);
    border-top: 1px solid var(--border-subtle, var(--border-hairline));
  }
  .prompt-footer > .btn-primary { margin-left: auto; }
  .page-title {
    font-family: var(--font-serif); font-size: clamp(1.75rem, 3.2vw, 2.25rem);
    font-weight: 400; letter-spacing: -0.02em; line-height: 1.2;
    color: var(--text-ink); margin: 0;
  }
  .section-heading {
    font-family: var(--font-serif); font-size: 1.375rem; font-weight: 500;
    letter-spacing: -0.015em; line-height: 1.25; color: var(--text-ink); margin: 0;
  }
  .eyebrow-mono {
    font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.45;
    color: var(--text-muted); font-variant-numeric: tabular-nums;
    display: inline-flex; align-items: center; gap: 5px;
  }
  @media (max-width: 560px) { .composer-disclosure .composer-disclosure-hint { display: none; } }
  .title-link {
    font-family: var(--font-serif); font-size: 1.25rem; font-weight: 500;
    letter-spacing: -0.01em; line-height: 1.3; color: var(--text-ink); text-decoration: none;
  }
  .title-link:hover { color: var(--accent-text); text-decoration: none; }
  .open-list { display: flex; flex-direction: column; border-top: 1px solid var(--border-subtle, var(--border-hairline)); }
  .open-row {
    display: flex; flex-direction: column; gap: var(--space-3);
    padding-block: var(--space-5); border-bottom: 1px solid var(--border-subtle, var(--border-hairline)); min-width: 0;
  }
  .open-row-inline {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: var(--space-3); padding-block: var(--space-4);
    border-bottom: 1px solid var(--border-subtle, var(--border-hairline)); min-width: 0;
  }
  .spotlight-block {
    padding-block: var(--space-5); border-block: 1px solid var(--border-subtle, var(--border-hairline));
    display: flex; flex-direction: column; gap: var(--space-3);
  }
  .progress-track {
    width: 100%; height: 2px; margin-block: var(--space-1);
    background: var(--border-subtle, var(--border-hairline)); overflow: hidden;
  }
  .progress-fill { height: 100%; background: var(--accent, var(--accent-primary)); transition: width 0.3s ease; }
  .desk-bar {
    position: sticky; top: 0; z-index: 20; background: var(--bg-canvas);
    border-bottom: 1px solid var(--border-subtle, var(--border-hairline)); padding: var(--space-2) var(--space-6);
  }
  @media (max-width: 680px) {
    .desk-bar { position: sticky; top: 0; z-index: 20; padding: var(--space-1) var(--space-3); }
    .desk-bar .btn-compact { padding-inline: var(--space-2); gap: 4px; font-size: 0.75rem; }
  }
  .desk-bar-inner {
    max-width: 68rem; margin: 0 auto; width: 100%;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: var(--space-2);
  }
  .preset-pills { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
  .preset-pill[aria-pressed="true"] {
    background: var(--accent-soft-bg); border-color: var(--accent-text); color: var(--text-ink); font-weight: 600;
  }
  .focus-complete-banner, .mercy-strip {
    background: var(--bg-surface); border: 1px solid var(--border-subtle, var(--border-hairline));
    border-left: 3px solid var(--accent, var(--accent-primary)); border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); min-width: 0;
  }
  .lesson-card-stepper {
    background: var(--bg-surface); border: 1px solid var(--border-subtle, var(--border-hairline));
    border-radius: var(--radius-lg); padding: var(--space-5); min-width: 0;
  }
  .lesson-card-stepper:not(.row):not(.between) { display: flex; flex-direction: column; gap: var(--space-4); }
  @media (max-width: 640px) { .lesson-card-stepper { padding: var(--space-4); } }
  .zen-mode .zen-hide { display: none !important; }
  .zen-mode .underline-tabs { display: none; }
  .parking-popover {
    position: fixed; top: 3.75rem; right: var(--space-4); z-index: 60;
    width: min(360px, calc(100vw - 2rem)); background: var(--bg-surface);
    border: 1px solid var(--border-strong, var(--border-hairline));
    border-radius: var(--radius-lg); padding: var(--space-4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  }
  .editorial-toast {
    position: fixed; bottom: var(--space-4); right: var(--space-4); z-index: 70;
    max-width: min(420px, calc(100vw - 2rem)); background: var(--bg-surface);
    border: 1px solid var(--border-strong, var(--border-hairline));
    border-left: 3px solid var(--accent, var(--accent-primary));
    border-radius: var(--radius-md); padding: var(--space-2) var(--space-3);
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); color: var(--text-ink); font-size: 0.875rem;
  }
  .editorial-toast-ok { border-left-color: var(--status-mastery); }
  .editorial-toast-warn { border-left-color: var(--status-practice); }
  .editorial-toast-danger { border-left-color: var(--status-danger); }
  .underline-tabs {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: var(--space-1) var(--space-4);
    border-bottom: 1px solid var(--border-subtle, var(--border-hairline)); width: 100%;
  }
  .underline-tab {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 2.75rem; min-width: 2.75rem; padding: 0 var(--space-1);
    border: none; border-bottom: 2px solid transparent; border-radius: 0;
    background: transparent; color: var(--text-muted); font-size: 0.875rem;
    font-weight: 500; text-decoration: none; cursor: pointer;
    white-space: nowrap; margin-bottom: -1px;
  }
  .underline-tab:hover { color: var(--text-ink); text-decoration: none; }
  .underline-tab[aria-selected="true"], .underline-tab.active {
    border-bottom-color: var(--text-ink); color: var(--text-ink); font-weight: 600;
  }
  @media (max-width: 680px) {
    .underline-tabs { gap: var(--space-1) var(--space-3); padding-bottom: var(--space-1); }
    .underline-tab { margin-bottom: 0; }
    .underline-tab[aria-selected="true"], .underline-tab.active { border-bottom-color: var(--accent-text); }
  }
  .prose-article {
    display: flex; flex-direction: column; max-width: var(--measure-prose);
    width: 100%; font-size: 1.03125rem; line-height: 1.74; color: var(--text-ink);
  }
  .prose-lead {
    font-family: var(--font-serif); font-size: 1.21875rem; line-height: 1.62;
    color: var(--text-ink); margin: 0; padding-bottom: var(--space-6); max-width: var(--measure-prose);
  }
  .prose-section {
    padding-block: var(--space-6); border-top: 1px solid var(--border-subtle, var(--border-hairline));
    display: flex; flex-direction: column; gap: var(--space-4); min-width: 0;
  }
  .prose-h3 {
    font-family: var(--font-serif); font-size: 1.3125rem; font-weight: 500;
    letter-spacing: -0.015em; line-height: 1.3; color: var(--text-ink); margin: 0;
  }
  .editorial-callout {
    border-left: 2px solid var(--accent-text); padding: var(--space-1) 0 var(--space-1) var(--space-4);
    display: flex; flex-direction: column; gap: 6px; min-width: 0;
  }
  .editorial-callout-warn { border-left-color: var(--status-practice); }
  .editorial-callout-danger { border-left-color: var(--status-danger); }
  .editorial-callout-mastery { border-left-color: var(--status-mastery); }
  .code-box {
    overflow-x: auto; background: var(--bg-subtle); border: 1px solid var(--border-subtle, var(--border-hairline));
    border-radius: var(--radius-md); padding: var(--space-4); font-family: var(--font-mono);
    font-size: 0.8125rem; line-height: 1.55; color: var(--text-ink); margin: 0; max-width: 100%;
  }
  .code-box-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
  .colophon {
    border-top: 1px solid var(--border-subtle, var(--border-hairline)); padding-top: var(--space-6); margin-top: var(--space-8);
    color: var(--text-muted); font-size: 0.8125rem; display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: var(--space-3);
  }
  .quiz-opt {
    width: 100%; justify-content: flex-start; text-align: left; padding: var(--space-2) var(--space-4);
    white-space: normal; height: auto; line-height: 1.45; flex-shrink: 1; min-width: 0;
  }
  .quiz-opt > .tag { flex-shrink: 0; font-family: var(--font-mono); }
  .quiz-opt[aria-checked="true"] {
    background: var(--accent-soft-bg); border-color: var(--accent-text); color: var(--text-ink); font-weight: 600;
  }
  .req-item {
    width: 100%; justify-content: flex-start; text-align: left; padding: var(--space-3) var(--space-4);
    white-space: normal; height: auto; line-height: 1.45; flex-shrink: 1; min-width: 0; align-items: flex-start;
  }
  .req-item[aria-checked="true"] {
    background: var(--status-mastery-bg); border-color: var(--status-mastery-border); color: var(--text-ink);
  }
  .req-box {
    width: 18px; height: 18px; border-radius: var(--radius-sm); border: 1.5px solid var(--text-muted);
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    margin-top: 2px; background: var(--bg-surface); color: var(--status-mastery);
  }
  .req-item[aria-checked="true"] .req-box { border-color: var(--status-mastery); background: var(--status-mastery-bg); }
  .pomo-pill {
    display: inline-flex; align-items: center; gap: var(--space-2); padding: 0 var(--space-3);
    border-radius: 9999px; background: var(--bg-surface); border: 1px solid var(--border-subtle, var(--border-hairline));
    color: var(--text-ink); font-size: 0.8125rem; cursor: pointer; text-decoration: none;
    min-height: 2.75rem; min-width: 2.75rem; max-width: 100%;
  }
  .pomo-pill.running { border-color: var(--accent-text); color: var(--accent-text); }
  .pomo-pill.paused { border-style: dashed; color: var(--text-muted); }
  .pomo-pill.break-active { border-color: var(--status-mastery); color: var(--status-mastery); }
  @media (max-width: 640px) { .pomo-pill-cue { display: none; } }
  .search-wrap { position: relative; width: 100%; }
  .search-results {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
    background: var(--bg-surface); border: 1px solid var(--border-subtle, var(--border-hairline));
    border-radius: var(--radius-md); max-height: 320px; overflow-y: auto;
  }
  .search-hit {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
    padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-subtle, var(--border-hairline));
    color: var(--text-ink); text-decoration: none;
  }
  .search-hit:last-child { border-bottom: none; }
  .search-hit:hover { background: var(--bg-subtle); text-decoration: none; }
  .modal-backdrop {
    position: fixed; inset: 0; z-index: 50; background: var(--backdrop-overlay);
    display: flex; align-items: center; justify-content: center; padding: var(--space-4);
  }
  .modal-sheet {
    background: var(--bg-surface); border: 1px solid var(--border-subtle, var(--border-hairline)); border-radius: var(--radius-lg);
    max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; padding: var(--space-6);
  }
  .dag-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
  .contrast-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  @media (max-width: 640px) { .contrast-cols { grid-template-columns: 1fr; } }
  .prompt-compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); min-width: 0; }
  .prompt-compare-grid > * { min-width: 0; }
  .prompt-compare-col { padding-top: var(--space-3); border-top: 1px solid var(--border-subtle, var(--border-hairline)); min-width: 0; }
  .ai-workflow-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4);
    border-top: 1px solid var(--border-subtle, var(--border-hairline)); padding-top: var(--space-4); min-width: 0;
  }
  .ai-workflow-grid > * { min-width: 0; padding-left: var(--space-3); border-left: 1px solid var(--border-subtle, var(--border-hairline)); }
  .ai-workflow-grid > *:first-child { padding-left: 0; border-left: none; }
  @media (max-width: 720px) {
    .prompt-compare-grid, .ai-workflow-grid { grid-template-columns: 1fr; }
    .ai-workflow-grid > * {
      padding-left: 0; border-left: none; padding-top: var(--space-3); border-top: 1px solid var(--border-subtle, var(--border-hairline));
    }
    .ai-workflow-grid > *:first-child { padding-top: 0; border-top: none; }
  }

  .tag-accent {
    color: var(--accent-text);
    background: var(--accent-soft-bg);
    border-color: var(--accent-soft-border);
  }
  .tag-warn {
    color: var(--status-practice);
    background: var(--status-practice-bg);
    border-color: var(--status-practice-border);
  }

  .blueprint-box {
    padding: var(--space-4);
    border-radius: var(--radius-md);
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle, var(--border-hairline));
    border-left: 3px solid var(--accent-text);
    color: var(--text-ink);
    font-family: var(--font-mono);
    font-size: 0.84375rem;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    min-width: 0;
  }

  .dialogue-question-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: var(--space-3) var(--space-4);
    border-left: 3px solid var(--accent-primary);
    background: var(--accent-soft-bg);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    min-width: 0;
  }
  .dialogue-thread {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-width: 0;
  }
  .dialogue-turn {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle, var(--border-hairline));
    min-width: 0;
  }
  .dialogue-learner {
    background: var(--bg-subtle);
  }
  .dialogue-mentor {
    background: var(--bg-surface);
  }

  .clarify-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    min-width: 0;
  }
  .clarify-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-width: 0;
  }
  .clarify-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-ink);
    line-height: 1.4;
  }
  .clarify-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    min-width: 0;
  }
  .clarify-pill {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: var(--space-2) var(--space-3);
    min-height: 2.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle, var(--border-hairline));
    background: var(--bg-surface);
    color: var(--text-ink);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.35;
    cursor: pointer;
    max-width: 100%;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }
  .clarify-pill:hover:not(:disabled) {
    background: var(--bg-subtle);
  }
  .clarify-pill[aria-checked="true"], .clarify-pill.is-selected {
    background: var(--accent-soft-bg);
    border-color: var(--accent-text);
    color: var(--text-ink);
    font-weight: 600;
  }
  .clarify-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
    align-items: end;
    min-width: 0;
  }
  @media (max-width: 680px) {
    .clarify-fields {
      grid-template-columns: 1fr;
    }
  }
  .clarify-field-wrap {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
  }

  .practice-shell {
    max-width: 52rem;
    margin-inline: auto;
  }

  .practice-selector-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    min-width: 0;
  }
  .practice-problem-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0 var(--space-3);
    min-height: 2.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle, var(--border-hairline));
    background: var(--bg-surface);
    color: var(--text-ink);
    font-size: 0.8125rem;
    cursor: pointer;
    max-width: 100%;
    min-width: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease;
  }
  @media (max-width: 560px) {
    .practice-problem-pill {
      width: 100%;
    }
    .practice-problem-pill > span:last-child {
      margin-left: auto;
    }
  }
  .practice-problem-pill:hover:not(:disabled) {
    background: var(--bg-subtle);
  }
  .practice-problem-pill.is-active {
    background: var(--accent-soft-bg);
    border-color: var(--accent-text);
    font-weight: 600;
  }
  .practice-problem-pill.is-solved {
    border-color: var(--status-mastery-border);
  }
  .practice-problem-pill.is-solved > svg {
    color: var(--status-mastery);
    flex-shrink: 0;
  }
}
