/* Workspace and step views. Builds on tokens and components from styles.css. */

/* ---------- View rhythm ---------- */
.view-enter {
  animation: rise var(--t-slow) var(--ease-out) both;
}
.stack > * + * {
  margin-top: 64px;
}
.stack > .sr-only + * {
  margin-top: 0;
}
.stack > .tabs-row + .tabpanel {
  margin-top: 32px;
}
.stack > .stats + .callout,
.stack > .result + .callout {
  margin-top: 32px;
}
.stack > .step-footer {
  margin-top: 80px;
}
.tabs-row {
  display: flex;
}

/* ---------- Project header ---------- */
.project-head {
  margin-bottom: 56px;
}
.project-title {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.project-title:focus {
  outline: none;
}
.project-sub {
  margin-top: 10px;
  font-size: 19px;
  color: var(--muted);
  letter-spacing: -0.016em;
}

/* ---------- Job bar ---------- */
.jobbar-slot {
  position: sticky;
  top: calc(var(--header-h) + 12px);
  z-index: 12;
}
.jobbar-slot:not(:empty) {
  margin-bottom: 40px;
}
.jobbar {
  padding: 14px 18px 0;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(245, 245, 247, 0.9);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  animation: rise var(--t-slow) var(--ease-out) both;
}
.jobbar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
}
.jobbar-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  column-gap: 10px;
  font-size: 15px;
  line-height: 1.4;
}
.jobbar-title {
  font-weight: 600;
}
.jobbar-activity {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.jobbar-time {
  font-size: 14px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  min-width: 3em;
  text-align: right;
}
.jobbar .progress {
  margin: 0 -18px;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.05);
}

/* ---------- Banners ---------- */
.banners:not(:empty) {
  margin-bottom: 40px;
  display: grid;
  gap: 12px;
}
.callout.flash {
  align-items: center;
  animation: rise var(--t-slow) var(--ease-out) both;
}
.callout.flash .callout-actions {
  margin-top: 0;
}
.callout.flash .callout-body {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.callout.flash > .btn {
  margin: -6px -10px -6px 0;
  color: var(--faint);
}

/* ---------- Step footer ---------- */
.step-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.step-footer > .btn-ghost {
  margin-left: -12px;
  padding-left: 10px;
}
.step-footer-main {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

/* ---------- Stats ---------- */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 56px;
}
.stat {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.stat-value {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 14px;
  color: var(--muted);
}
.stat.tone-danger .stat-value {
  color: var(--red);
}
.stat.tone-warning .stat-value {
  color: var(--orange);
}

/* ---------- Running job stages ---------- */
.stages {
  list-style: none;
  display: grid;
  gap: 2px;
}
.stage {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-size: 15px;
  color: var(--faint);
  transition: color var(--t) var(--ease);
}
.stage-mark {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line-2);
  transition: all var(--t) var(--ease);
}
.stage.is-done {
  color: var(--ink-2);
}
.stage.is-done .stage-mark {
  background: var(--green-dot);
  border-color: transparent;
  color: #fff;
  animation: pop var(--t-slow) var(--ease-out);
}
.stage.is-active {
  color: var(--ink);
  font-weight: 500;
}
.stage.is-active .stage-mark {
  border-color: transparent;
}
.stage-label {
  min-width: 0;
  overflow-wrap: anywhere;
}
@keyframes pop {
  0% {
    transform: scale(0.6);
  }
  60% {
    transform: scale(1.12);
  }
  100% {
    transform: none;
  }
}

/* ---------- Start ---------- */
.start {
  max-width: 720px;
  margin: 0 auto;
  padding-top: 7vh;
}
.start-hero {
  text-align: center;
  margin-bottom: 44px;
}
.start-title {
  font-size: clamp(34px, 3vw + 18px, 56px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.06;
}
.start-lead {
  margin-top: 16px;
  font-size: 21px;
  color: var(--muted);
  letter-spacing: -0.018em;
}
.start > .callout {
  margin-bottom: 20px;
}
.composer {
  padding: 18px 18px 12px;
  border-radius: var(--radius-xl);
  background: var(--fill);
  transition:
    background var(--t) var(--ease),
    box-shadow var(--t) var(--ease);
}
.composer:focus-within {
  background: #fff;
  box-shadow:
    0 0 0 1px var(--line-2),
    0 12px 40px rgba(0, 0, 0, 0.08);
}
.composer.is-over {
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px var(--accent);
}
.composer:has(.composer-input[aria-invalid='true']) {
  box-shadow: 0 0 0 1px var(--red);
}
.composer-input {
  display: block;
  width: 100%;
  min-height: 148px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  resize: none;
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: -0.016em;
  color: var(--ink);
}
.composer-input:focus {
  outline: none;
}
.composer-input::placeholder {
  color: var(--faint);
}
.composer-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.composer-bar > .btn-ghost {
  margin-left: -6px;
  color: var(--muted);
}
.composer-status {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--muted);
  text-align: right;
}
.file-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 4px;
}
.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 5px 6px 5px 12px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
  font-size: 14px;
  animation: rise var(--t) var(--ease-out);
}
.file-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}
.file-chip-size {
  color: var(--faint);
  font-size: 13px;
  white-space: nowrap;
}
.file-chip-remove {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--faint);
}
.file-chip-remove:hover {
  background: var(--fill);
  color: var(--ink);
}
.start-error {
  margin-top: 10px;
  padding: 0 8px;
}
.start-examples {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  margin-top: 28px;
  font-size: 14px;
  color: var(--faint);
}

/* ---------- Login ---------- */
.login-wrap {
  min-height: calc(100vh - var(--header-h) - 240px);
  display: grid;
  place-items: center;
}
.login {
  width: min(340px, 100%);
  display: grid;
  gap: 14px;
  text-align: center;
}
.login-title {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.login .input {
  text-align: center;
  font-size: 17px;
  padding: 14px;
}
.login .btn {
  width: 100%;
}

/* ---------- Request ---------- */
.clarify {
  padding: 36px 40px;
  border-radius: var(--radius-xl);
  background: var(--fill);
}
.clarify .panel-head {
  margin-bottom: 28px;
}
.clarify .input,
.clarify .textarea {
  border-color: transparent;
}
.clarify .input:focus,
.clarify .textarea:focus {
  border-color: var(--accent);
}
.choice-row {
  margin-top: 2px;
}
.clarify-extra {
  margin: 28px 0 24px;
}
.clarify-extra > .disclosure {
  border-color: var(--line-2) !important;
}
.clarify-form > .field-error {
  margin-bottom: 12px;
}
.request-text {
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.014em;
}
.request-text.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.request-text + .btn {
  margin: 8px 0 0 -8px;
}
.refs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
}
.refs-head .btn {
  margin-right: -8px;
}
.refs {
  list-style: none;
  margin-top: 8px;
}
.ref {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.ref-icon {
  flex: none;
  color: var(--faint);
  padding-top: 2px;
}
.ref-body {
  min-width: 0;
}
.ref-name {
  font-size: 15px;
  overflow-wrap: anywhere;
}
.ref-meta {
  font-size: 13px;
  color: var(--muted);
}
.ref-warnings {
  list-style: none;
  display: grid;
  gap: 4px;
  margin-top: 6px;
}
.ref-warnings li {
  font-size: 13px;
  color: var(--orange);
  line-height: 1.45;
}
.refs-empty {
  margin-top: 8px;
  color: var(--faint);
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 48px;
  margin: 0;
}
.fact {
  min-width: 0;
}
.fact dt {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}
.fact dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.fact-missing {
  color: var(--orange);
  font-weight: 500;
}
.fact-pending {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.callout + .facts {
  margin-top: 28px;
}
.spec-block {
  margin-top: 48px;
}
.spec-block > .subhead {
  margin-bottom: 12px;
}

/* ---------- Plan ---------- */
.goal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.goal-head .btn {
  margin-right: -8px;
}
.goal-text {
  margin-top: 10px;
  font-size: 21px;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.goal-text.is-folded {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.goal-text + .btn {
  margin: 6px 0 0 -8px;
}
.goal .stats {
  margin-top: 48px;
}
.attention {
  padding: 0 24px;
  border-radius: 16px;
  background: var(--fill);
}
.attention .disclosure-summary {
  padding: 18px 0;
}
.attention-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}
.attention-meta {
  display: block;
  margin: 2px 0 0 18px;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}
.attention-body {
  padding-top: 4px;
}
.attention-body > .subhead {
  margin: 28px 0 8px;
  font-size: 15px;
}
.attention-body > .subhead:first-child {
  margin-top: 0;
}
.attention-body .findings .finding:first-child {
  border-top: 0;
}
.attention .btn-secondary {
  background: #fff;
}

.hours-table .data-table td,
.hours-table .data-table th {
  vertical-align: middle;
}
.hours-table .data-table :is(td, th):not(:first-child):not(:last-child) {
  padding-left: 8px;
  padding-right: 8px;
}
.hours-module {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}
.hours-index {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--fill);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.hours-index.is-blank {
  background: none;
}
.hours-title {
  min-width: 0;
  font-weight: 500;
}
.col-total {
  min-width: 150px;
}
.hours-cell {
  display: grid;
  gap: 4px;
}
.hours-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hours-stepper .btn {
  --btn-h: 28px;
  width: 28px;
  color: var(--muted);
}
.hours-input {
  width: 64px;
  text-align: center;
  padding: 5px 4px;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border-radius: 8px;
  border-color: transparent;
  background: var(--fill);
  -moz-appearance: textfield;
  appearance: textfield;
}
.hours-input::-webkit-outer-spin-button,
.hours-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.hours-cell.is-changed .hours-input {
  background: var(--accent-soft);
  color: var(--link);
}
.hours-error {
  font-size: 12px;
  color: var(--red);
  line-height: 1.3;
}
.hours-error:empty {
  display: none;
}
.hours-fixed {
  display: inline-block;
  padding-left: 36px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.row-assess th,
.row-assess td {
  color: var(--muted);
}
.hours-total {
  font-variant-numeric: tabular-nums;
  padding-left: 32px;
  white-space: nowrap;
}
.hours-total.is-off {
  color: var(--orange);
}
.hours-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.hours-actions:has(> .hours-status:empty):has(> .btn-row[hidden]) {
  display: none;
}
.hours-status {
  font-size: 15px;
  font-weight: 500;
}
.hours-status:empty {
  display: none;
}
.hours-status.tone-success {
  color: var(--green);
}
.hours-status.tone-warning {
  color: var(--orange);
}
.hours-status.tone-danger {
  color: var(--red);
}
.hours-actions > .btn-row {
  margin-left: auto;
}
.dist {
  margin-bottom: 36px;
}
.dist-bar {
  display: flex;
  gap: 2px;
  height: 8px;
  border-radius: var(--pill);
  overflow: hidden;
  background: var(--fill);
}
.dist-seg {
  min-width: 4px;
  flex-basis: 0;
  transition: flex-grow 0.5s var(--ease);
}
.seg-m0 {
  background: #0071e3;
}
.seg-m1 {
  background: #3a8fea;
}
.seg-m2 {
  background: #6aaaf0;
}
.seg-m3 {
  background: #95c3f5;
}
.seg-m4 {
  background: #bcd9f9;
}
.seg-m5 {
  background: #dbeafc;
}
.seg-assess {
  background: #c7c7cc;
}
.seg-free {
  background: var(--orange-soft);
  box-shadow: inset 0 0 0 1.5px var(--orange-dot);
}
.dist-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}
.dist-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}
.dist-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.dist-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.dist-value {
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.map-table .data-table th,
.map-table .data-table td {
  padding-top: 10px;
  padding-bottom: 10px;
  vertical-align: middle;
}
.map-table .data-table .map-group th {
  padding-bottom: 6px;
}
.map-table .data-table .map-group td {
  border-bottom: 0;
}
.col-outcome {
  min-width: 300px;
}
.map-outcome {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  border: 0;
  background: none;
  padding: 4px 0;
  text-align: left;
  color: var(--ink);
  border-radius: 6px;
}
.map-outcome:hover .map-desc {
  color: var(--link);
}
.map-desc {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.map-dot {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--link);
  font-size: 12.5px;
  font-weight: 600;
}
.map-empty {
  color: var(--line-2);
}
.map-assess {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: var(--pill);
  background: var(--green-soft);
  color: var(--green);
  font-size: 12.5px;
  font-weight: 600;
}
.map-assess.is-low {
  background: var(--orange-soft);
  color: var(--orange);
}
.map-legend {
  margin-top: 16px;
  color: var(--faint);
  font-size: 13px;
}
.outcome.is-target > .disclosure-summary {
  color: var(--link);
}
.outcome-summary {
  display: grid;
  gap: 6px;
}
.outcome-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.map-outcome .outcome-num {
  margin-top: -2px;
}
.outcome-desc {
  font-weight: 500;
  line-height: 1.45;
}
.outcome-summary .summary-meta {
  padding-left: 2px;
  font-size: 13px;
}
.kas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 32px;
}
.kas-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}
.kas .bullets {
  font-size: 14px;
}
.outcome-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
  margin-top: 32px;
}
.link-list {
  list-style: none;
  display: grid;
  gap: 4px;
  font-size: 14px;
  line-height: 1.45;
}
.link-button,
.link-row {
  display: flex;
  gap: 10px;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: 4px 0;
  color: var(--ink-2);
}
.link-button:hover {
  color: var(--link);
}
.link-kind {
  flex: none;
  color: var(--faint);
  font-size: 13px;
  padding-top: 1px;
  min-width: 74px;
}
.link-text {
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.outcome .callout {
  margin-top: 28px;
}

.module-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}
.module-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  min-width: 0;
}
.module-num,
.outcome-num {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--fill);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.module-name {
  font-weight: 600;
  min-width: 0;
}
.topics {
  list-style: none;
  display: grid;
  padding-left: 36px;
}
.topic {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.topic:first-child {
  border-top: 0;
  padding-top: 0;
}
.topic-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}
.topic-title {
  font-weight: 500;
  font-size: 15px;
}
.topic-hours {
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.topic-summary {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.topic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 10px;
}
.hour-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.hour-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--pill);
  background: var(--fill);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.hour-kind {
  color: var(--faint);
}
.hour-chip.is-remote {
  background: var(--accent-soft);
  color: var(--link);
}
.topic-slides {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--faint);
}

.calendar-summary {
  margin-bottom: 20px;
  font-size: 15px;
  color: var(--muted);
}
.calendar-table .data-table td,
.calendar-table .data-table th {
  padding-top: 10px;
  padding-bottom: 10px;
}
.row-group th {
  padding-top: 32px !important;
  font-weight: 600;
  border-bottom-color: var(--line-2);
}
.calendar-table tbody tr.row-group:first-child th {
  padding-top: 6px !important;
}
.cal-topic {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0 4px;
}
.cal-topic.is-assess {
  color: var(--link);
  font-weight: 500;
}

/* ---------- Approve ---------- */
.review-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 28px;
}
.review-list {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--line);
}
.review-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.review-row dt {
  font-size: 14px;
  color: var(--muted);
  padding-top: 1px;
}
.review-row dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  min-width: 0;
  overflow-wrap: anywhere;
}
.review-goal {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
}
.mini-bars {
  list-style: none;
  display: grid;
  gap: 10px;
}
.mini-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) 56px;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}
.mini-bar-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-2);
}
.mini-bar-track {
  height: 6px;
  border-radius: var(--pill);
  background: var(--fill);
  overflow: hidden;
}
.mini-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transform-origin: left;
  animation: grow 0.7s var(--ease-out) both;
}
.mini-bar.is-assess .mini-bar-fill {
  background: #c7c7cc;
}
.mini-bar.is-stale .mini-bar-fill {
  background: var(--orange-dot);
}
.mini-bar-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
@keyframes grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: none;
  }
}
.review .disclosures {
  margin-top: 32px;
}
.review-checks {
  margin-top: 32px;
  display: grid;
  gap: 12px;
}
.approve-actions {
  margin-top: 40px;
}
.approved {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 40px 0 8px;
}
.approved-mark {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-dot);
  color: #fff;
  margin-bottom: 24px;
  animation: pop 0.5s var(--ease-out);
}
.approved-title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.approved-text {
  margin-top: 10px;
  font-size: 19px;
  color: var(--muted);
  letter-spacing: -0.016em;
  max-width: 520px;
}
.approved-actions {
  justify-content: center;
  margin-top: 32px;
}

/* ---------- Materials ---------- */
.materials-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.module-rail {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
  margin-left: -12px;
}
.module-rail-list {
  list-style: none;
  display: grid;
  gap: 2px;
}
.module-link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  transition:
    background var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease);
}
.module-link:hover {
  background: rgba(0, 0, 0, 0.03);
  color: var(--ink);
}
.module-link.is-active {
  background: var(--fill);
  color: var(--ink);
}
.module-link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.module-link-num {
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  background: var(--fill);
  color: var(--muted);
}
.module-link.is-active .module-link-num {
  background: var(--ink);
  color: #fff;
}
.module-link-num.state-stale {
  background: var(--orange-soft);
  color: var(--orange);
}
.module-link-num.state-missing,
.module-link-num.state-queued {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--line-2);
  color: var(--faint);
}
.module-link.is-active .module-link-num.state-missing,
.module-link.is-active .module-link-num.state-queued {
  background: transparent;
  color: var(--faint);
}
.module-link-num.state-working {
  background: var(--accent-soft);
}
.module-link-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.module-link-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.module-link-meta {
  font-size: 12.5px;
  color: var(--faint);
}
.module-detail {
  min-width: 0;
}
.module-eyebrow {
  font-size: 14px;
  color: var(--muted);
}
.module-title {
  margin-top: 4px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.module-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.module-description {
  margin-top: 28px;
}
.module-lead {
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.module-tabs {
  margin-top: 36px;
}
.module-stack > .tabpanel {
  margin-top: 8px;
}
.module-stack > .empty-state {
  padding-top: 56px;
}
.items {
  list-style: none;
}
.item {
  padding: 36px 0;
  border-top: 1px solid var(--line);
}
.items > .item:first-child {
  border-top: 0;
}
.item-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.item-titles {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.item-title {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.018em;
  overflow-wrap: anywhere;
}
.item-meta {
  font-size: 14px;
  color: var(--muted);
}
.item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: none;
  margin-right: -8px;
}
@media (hover: hover) {
  .item-actions .btn {
    opacity: 0;
    transition: opacity var(--t) var(--ease);
  }
  .item:hover .item-actions .btn,
  .item:focus-within .item-actions .btn {
    opacity: 1;
  }
  .item:hover .item-actions .btn:disabled,
  .item:focus-within .item-actions .btn:disabled {
    opacity: 0.38;
  }
}
.item-block {
  margin-top: 24px;
}
.item-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
.question-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--faint);
}
.question > .item-head {
  align-items: center;
  margin-bottom: 6px;
}
.question-text {
  font-size: 17px;
  line-height: 1.55;
  font-weight: 500;
  letter-spacing: -0.016em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.options {
  list-style: none;
  display: grid;
  gap: 6px;
  margin-top: 16px;
}
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
  background: var(--fill);
  transition: background var(--t-fast) var(--ease);
}
.option-letter {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.option-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.option.is-correct {
  background: var(--green-soft);
}
.option.is-correct .option-letter {
  background: var(--green-dot);
  color: #fff;
}
.option-key {
  display: grid;
  place-items: center;
  flex: none;
  color: var(--green);
}
.option.is-editing {
  padding: 0;
}
.option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  cursor: pointer;
  border-radius: 12px;
}
.option-label input {
  accent-color: var(--green-dot);
}
.option.is-editing:has(input:checked) {
  background: var(--green-soft);
}
.key-fieldset {
  border: 0;
  padding: 0;
  margin: 16px 0 0;
  min-width: 0;
}
.key-fieldset .options {
  margin-top: 0;
}
.key-actions {
  margin-top: 14px;
}
.explanation {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}
.text-warning {
  color: var(--orange);
}
.timeline {
  list-style: none;
  display: grid;
}
.timeline-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.timeline-item:first-child {
  border-top: 0;
  padding-top: 0;
}
.timeline-min {
  font-size: 14px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.timeline-title {
  font-size: 15px;
  font-weight: 500;
}
.timeline-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 2px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.slides-disclosure {
  margin-top: 28px;
}
.slides {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 12px;
}
.slide {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--fill);
  min-width: 0;
}
.slide:has(.code) {
  grid-column: 1 / -1;
}
.slide-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.slide-num {
  flex: none;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--pill);
  display: grid;
  place-items: center;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.slide-title {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.slide-points {
  font-size: 14px;
}
.notes {
  margin-top: 12px;
}
.notes > .disclosure-summary {
  padding: 8px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.notes > .disclosure-body {
  padding: 0 0 4px;
}
.notes .prose {
  font-size: 14px;
}
.code {
  margin-top: 14px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line);
}
.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 8px 8px 14px;
  border-bottom: 1px solid var(--line);
}
.code-label {
  font-size: 13px;
  color: var(--faint);
  font-weight: 500;
}
.code-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}
.code-tools .select {
  width: auto;
}
.code-pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink);
  tab-size: 4;
  max-height: 420px;
  letter-spacing: 0;
}
.code-pre:focus-visible {
  outline: none;
  box-shadow: inset var(--focus-ring);
}
.code-result:not(:empty) {
  border-top: 1px solid var(--line);
  padding: 10px 14px;
  animation: reveal var(--t) var(--ease-out);
}
.code-status {
  font-size: 14px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.code-status.is-ok {
  color: var(--green);
}
.code-status.is-error {
  color: var(--red);
}
.code-output {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #1d1d1f;
  color: #f5f5f7;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  letter-spacing: 0;
}
.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 8px 0 4px;
}
.thumbs.compact {
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  margin-top: 14px;
  grid-column: 2 / -1;
}
.thumb {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  background: var(--fill);
  aspect-ratio: 16 / 9;
  box-shadow: 0 0 0 1px var(--line);
  transition:
    transform var(--t) var(--ease),
    box-shadow var(--t) var(--ease);
}
.thumb:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pop);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb-more {
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--fill);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  aspect-ratio: 16 / 9;
}
button.thumb,
button.thumb-more {
  width: 100%;
  padding: 0;
  border: 0;
  font: inherit;
  cursor: zoom-in;
}
button.thumb-more {
  font-size: 13px;
  font-weight: 600;
  transition: background var(--t) var(--ease);
}
button.thumb-more:hover {
  background: var(--fill-2);
}

/* ---------- Slide viewer ---------- */
dialog.viewer {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #121214;
  color: #fff;
}
dialog.viewer[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  animation: fade-in var(--t) var(--ease);
}
dialog.viewer::backdrop {
  background: transparent;
}
.viewer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 24px;
}
.viewer-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.viewer-count {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.viewer .btn-ghost {
  color: #fff;
}
.viewer .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}
.viewer-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 8px 84px;
  touch-action: pan-y;
}
.viewer-image {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  user-select: none;
  -webkit-user-drag: none;
}
.viewer-nav.btn-icon {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}
.viewer-nav.is-prev {
  left: 20px;
}
.viewer-nav.is-next {
  right: 20px;
}
.viewer-nav:disabled {
  opacity: 0;
  pointer-events: none;
}
.viewer-strip {
  display: flex;
  justify-content: safe center;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 24px 20px;
  scrollbar-width: none;
}
.viewer-thumb {
  flex: none;
  width: 96px;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: #2a2a2e;
  opacity: 0.4;
  cursor: pointer;
  transition: opacity var(--t) var(--ease);
}
.viewer-thumb:hover,
.viewer-thumb[aria-current='true'] {
  opacity: 1;
}
.viewer-thumb[aria-current='true'] {
  box-shadow: 0 0 0 2px #fff;
}
.viewer-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.revise {
  margin-top: 64px;
  padding: 28px 32px;
  border-radius: 20px;
  background: var(--fill);
}
.revise .textarea {
  border-color: transparent;
}
.revise .textarea:focus {
  border-color: var(--accent);
}
.revise .btn-row {
  margin-top: 14px;
  justify-content: flex-end;
}
.doc {
  display: grid;
}
.doc-block {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.doc-block:first-child {
  border-top: 0;
  padding-top: 0;
}
.doc-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}
#final > .prose {
  margin-bottom: 28px;
}

/* ---------- Checks ---------- */
.finding-group + .finding-group {
  margin-top: 40px;
}
.finding-group > .subhead {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 4px;
}
.findings {
  list-style: none;
  display: grid;
}
.finding {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.findings > .finding:first-child {
  border-top: 0;
}
.finding-dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--disabled);
}
.finding.sev-error .finding-dot {
  background: var(--red-dot);
}
.finding.sev-warning .finding-dot {
  background: var(--orange-dot);
}
.finding-body {
  flex: 1;
  min-width: 0;
}
.finding-text {
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.finding-target {
  font-size: 13px;
  color: var(--faint);
  margin-top: 2px;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.finding .btn {
  flex: none;
  margin-right: -8px;
}
.sources {
  list-style: none;
  display: grid;
}
.source {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.sources > .source:first-child {
  border-top: 0;
  padding-top: 0;
}
.source-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.source-title a {
  color: var(--ink);
}
.source-title a:hover {
  color: var(--link);
}
.source-meta {
  margin-top: 2px;
  font-size: 13px;
  color: var(--faint);
  overflow-wrap: anywhere;
}
.source.is-verified .source-status {
  color: var(--green);
}
.source.is-unverified .source-status {
  color: var(--orange);
}
.source-quote {
  margin: 10px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--line-2);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.source-link {
  margin-top: 7px;
  font-size: 13px;
}
.source-link a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.source-note {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* ---------- Files ---------- */
.result {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 32px;
  border-radius: var(--radius-xl);
  background: var(--fill);
}
.result-mark {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green-dot);
  color: #fff;
  animation: pop 0.55s var(--ease-out);
}
.result-text {
  flex: 1 1 240px;
  min-width: 0;
}
.result-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.result-meta {
  color: var(--muted);
  font-size: 15px;
  margin-top: 4px;
}
.btn-size {
  font-weight: 400;
  opacity: 0.75;
  font-size: 14px;
}
.file-list {
  list-style: none;
  display: grid;
}
.file-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.file-list > .file-row:first-child {
  border-top: 0;
  padding-top: 0;
}
.file-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--fill);
  color: var(--muted);
}
.file-info {
  min-width: 0;
}
.file-title {
  font-size: 15px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.file-meta {
  font-size: 13px;
  color: var(--faint);
  overflow-wrap: anywhere;
}
.file-actions {
  display: flex;
  gap: 2px;
  margin-right: -8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .materials-layout {
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 40px;
  }
}
@media (max-width: 900px) {
  .materials-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .module-rail {
    position: static;
    max-height: none;
    overflow: visible;
    margin: 0 -4px;
  }
  .module-rail-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .module-rail-list > li {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
  .module-link {
    width: 220px;
  }
  .kas {
    grid-template-columns: minmax(0, 1fr);
  }
  .outcome-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 860px) {
  .jobbar-slot {
    top: 12px;
  }
  .module-rail {
    top: 12px;
  }
}
@media (max-width: 640px) {
  .viewer-stage {
    padding: 8px 12px;
  }
  .viewer-nav.btn-icon {
    display: none;
  }
  .viewer-head {
    padding-left: 16px;
  }
  .viewer-thumb {
    width: 72px;
  }
  .stack > * + * {
    margin-top: 48px;
  }
  .project-head {
    margin-bottom: 40px;
  }
  .project-title {
    font-size: 30px;
  }
  .project-sub {
    font-size: 17px;
  }
  .start {
    padding-top: 16px;
  }
  .start-lead {
    font-size: 18px;
  }
  .composer {
    border-radius: 20px;
  }
  .composer-bar {
    flex-wrap: wrap;
  }
  .composer-bar .btn-primary {
    margin-left: auto;
  }
  .composer-status {
    flex-basis: 100%;
    order: 3;
    text-align: left;
  }
  .clarify {
    padding: 24px 20px;
    margin: 0 -4px;
  }
  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .review-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
  .mini-bar {
    grid-template-columns: minmax(0, 1fr) 56px;
  }
  .mini-bar-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .stats {
    gap: 20px 32px;
  }
  .stat-value {
    font-size: 28px;
  }
  .goal-text {
    font-size: 18px;
  }
  .attention {
    padding: 0 18px;
  }
  .item-head {
    flex-direction: column;
    gap: 8px;
  }
  .item-actions {
    justify-content: flex-start;
    margin: 0 0 0 -8px;
  }
  .file-row {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .file-actions {
    grid-column: 2;
    justify-self: start;
    margin: 0 0 0 -8px;
  }
  .thumbs.compact {
    grid-column: 1 / -1;
  }
  .result {
    padding: 24px;
  }
  .result > .btn {
    width: 100%;
  }
  .revise {
    padding: 22px 20px;
  }
  .approved-title {
    font-size: 26px;
  }
  .step-footer {
    flex-wrap: wrap;
  }
  .step-footer-main {
    flex: 1;
  }
  .step-footer-main .btn {
    flex: 1;
  }
  .timeline-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .topics {
    padding-left: 0;
  }
}
.result-text > .btn-quiet {
  margin: 6px 0 0 -8px;
}

/* Plan editing remains next to the content, outside disclosure summaries. */
.plan-edit-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}
.topic-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 12px;
  flex: none;
}
.topic-head {
  align-items: flex-start;
  flex-wrap: wrap;
}
.topic-head .topic-title {
  flex: 1;
  min-width: min(240px, 100%);
}
#editor-extra .textarea {
  min-height: 100px;
}

.stat-action {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
  color: inherit;
  cursor: pointer;
  border-radius: 6px;
}
.stat-action .stat-label {
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-action .stat-label .icon {
  color: var(--faint);
}
.stat-action:hover .stat-label,
.stat-action:hover .icon {
  color: var(--link);
}
.stat-action:disabled {
  cursor: default;
  opacity: 0.6;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}
@media (max-width: 540px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}
