:root {
  --paper: #faf8f4;
  --surface: #ffffff;
  --ink: #1d2126;
  --ink-2: #4a525c;
  --muted: #7a828c;
  --rule: #e6e1d8;
  --rule-strong: #d5cec2;
  --accent: #2d5a4c;
  --accent-ink: #ffffff;
  --accent-soft: #e8f0ec;
  --warn: #9a4a1c;
  --warn-soft: #fbefe6;
  --danger: #a3302a;
  --ok: #2d6a3e;
  --shadow: 0 1px 2px rgb(30 25 15 / 0.04), 0 4px 16px rgb(30 25 15 / 0.05);
  --radius: 10px;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #15181b;
    --surface: #1c2024;
    --ink: #ece8e1;
    --ink-2: #c3beb5;
    --muted: #8d949c;
    --rule: #2c3136;
    --rule-strong: #3a4046;
    --accent: #7fb8a2;
    --accent-ink: #10201a;
    --accent-soft: #1f2e29;
    --warn: #e0a070;
    --warn-soft: #2e231b;
    --danger: #e4847d;
    --ok: #86c596;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  font-feature-settings: "cv11", "ss01";
}
a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  text-decoration-thickness: 2px;
}
h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-top: 0.2em;
}
h2 {
  font-size: 1.45rem;
  margin-top: 1.6em;
}
h3 {
  font-size: 1.15rem;
  margin-top: 1.2em;
}
h4 {
  font: 600 0.78rem/1.4 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 1.2em 0 0.6em;
}
p {
  margin: 0 0 1em;
}
code,
pre {
  font:
    0.88em/1.5 ui-monospace,
    "SF Mono",
    Menlo,
    monospace;
}

.demo-bar {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0.45rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.82rem;
}
.demo-bar a {
  color: inherit;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1160px;
  margin: 0 auto;
  padding: 1.4rem 24px 1.1rem;
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.1;
}
.wordmark-school {
  font: 500 1.3rem var(--serif);
}
.wordmark-sub {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 0.2rem;
}
.masthead nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.92rem;
  flex-wrap: wrap;
}
.masthead nav a {
  color: var(--ink-2);
  text-decoration: none;
}
.masthead nav a:hover {
  color: var(--ink);
}
.who {
  color: var(--muted);
}
.masthead nav button.link {
  color: var(--ink-2);
  text-decoration: none;
  font-size: inherit;
}
.masthead nav button.link:hover {
  color: var(--ink);
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 24px 5rem;
}
main.wide {
  max-width: 1160px;
}
main.medium {
  max-width: 960px;
}

.lede {
  font-size: 1.08rem;
  color: var(--ink-2);
  max-width: 46em;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.85rem;
}
.fine {
  font-size: 0.85rem;
  color: var(--muted);
}
.warn {
  color: var(--warn);
}
.ok {
  color: var(--ok);
}
.empty {
  color: var(--muted);
  font-style: italic;
  font-family: var(--serif);
  font-size: 1.05rem;
}
.crumbs {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.crumbs a {
  color: var(--muted);
}
.section {
  font: 600 0.78rem/1.4 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 2.4rem 0 1rem;
}
.count {
  font: 500 0.85rem var(--sans);
  color: var(--muted);
  margin-left: 0.3rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  border: 1px solid;
}
.flash-ok {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--ink);
}
.flash-error {
  background: var(--warn-soft);
  border-color: transparent;
  color: var(--warn);
}
.callout {
  background: var(--accent-soft);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  color: var(--ink-2);
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.card > h2:first-child,
.card > h3:first-child {
  margin-top: 0;
}
.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.link-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.link-card:hover {
  border-color: var(--rule-strong);
  transform: translateY(-1px);
}
.card-title {
  font: 500 1.35rem/1.25 var(--serif);
}
.eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.status {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
}
.link-card .badge {
  align-self: flex-start;
  margin-top: 0.3rem;
}
.tone-todo .status {
  color: var(--accent);
  font-weight: 500;
}
.tone-todo {
  border-left: 3px solid var(--accent);
}

.badge {
  display: inline-block;
  font: 500 0.72rem/1 var(--sans);
  letter-spacing: 0.04em;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  background: var(--rule);
  color: var(--ink-2);
  vertical-align: middle;
  margin-right: 0.3rem;
}
.phase-ranking,
.run-draft {
  background: var(--accent-soft);
  color: var(--accent);
}
.phase-review {
  background: var(--warn-soft);
  color: var(--warn);
}
.phase-booking,
.run-published {
  background: var(--accent);
  color: var(--accent-ink);
}

/* Forms */
label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-2);
}
input,
select,
textarea {
  font: 400 1rem var(--sans);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  width: 100%;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  accent-color: var(--accent);
}
label.check {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  font-weight: 400;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
legend {
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0;
  margin-bottom: 0.5rem;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.stack > p {
  margin: 0;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.form-grid .span {
  grid-column: 1 / -1;
}
.inline {
  display: inline;
}
.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.inline-form label {
  flex: 1 1 200px;
}
details > summary {
  cursor: pointer;
  font: 500 1.05rem var(--serif);
  list-style: none;
}
details > summary::before {
  content: "+";
  display: inline-block;
  width: 1.1em;
  color: var(--accent);
}
details[open] > summary::before {
  content: "–";
}
.search {
  margin-bottom: 1rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: 500 0.95rem var(--sans);
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--rule-strong);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.button:hover {
  border-color: var(--ink-2);
}
.button.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.button.primary:hover {
  filter: brightness(1.08);
}
.button.small {
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
}
.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.button.google {
  width: 100%;
}
button.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
button.link.danger,
.danger {
  color: var(--danger);
}
button.icon {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  border: 1px solid transparent;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
button.icon:hover:not(:disabled) {
  border-color: var(--rule-strong);
  color: var(--ink);
}
button.icon:disabled {
  opacity: 0.25;
  cursor: default;
}
.or {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.or::before,
.or::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--rule);
}

/* Sign in */
.sign-in {
  max-width: 420px;
  margin: 2rem auto;
}

/* Time */
.time {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.3;
}
.time-day {
  font-size: 0.82rem;
  color: var(--muted);
}
.time-range {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
}
.guardian-email {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
}
.chip .time,
.slot-list .time {
  flex-direction: row;
}

/* Ranking */
.ranker-intro {
  max-width: 44em;
}
.note-edit {
  background: var(--warn-soft);
  color: var(--warn);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  font-size: 0.9rem;
}
.ranker-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 2.5rem;
  margin-top: 1.5rem;
}
.ranker h3 {
  margin-top: 0;
}
.ranked {
  list-style: none;
  padding: 0;
  margin: 0 0 0.8rem;
  counter-reset: rank;
}
.ranked li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 0.6rem 0.7rem 0.9rem;
  margin-bottom: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.ranked li .time {
  flex: 1;
}
.rank {
  font: 500 1.1rem var(--serif);
  color: var(--accent);
  min-width: 2.2rem;
}
.row-actions {
  display: flex;
  gap: 0.1rem;
}
.placeholder {
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius);
  padding: 1.4rem;
  text-align: center;
}
.saved {
  font-size: 0.85rem;
  color: var(--ok);
}
.note-form {
  margin-top: 1.5rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: 400 0.92rem var(--sans);
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  cursor: pointer;
}
.chip:hover:not(:disabled) {
  border-color: var(--accent);
}
.chip:disabled {
  cursor: default;
  opacity: 0.5;
}
.chip.chosen {
  background: var(--accent-soft);
  border-color: var(--accent);
  opacity: 1;
}
.chip.radio:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.day {
  margin-bottom: 1rem;
}
.day legend,
.day h3 {
  font: 600 0.78rem/1.4 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 1.2em 0 0.6em;
}
.booked {
  border-left: 3px solid var(--accent);
}
.booked .time-day {
  font: 500 1.5rem var(--serif);
  color: var(--ink);
}
.booked .time-range {
  font-size: 1.15rem;
}
.booked .time {
  margin: 0.4rem 0 0.2rem;
}
.ranked.readonly li {
  box-shadow: none;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}
.table th {
  text-align: left;
  font: 600 0.72rem var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.6rem 0.8rem 0.6rem 0;
  border-bottom: 1px solid var(--rule-strong);
}
.table td {
  padding: 0.75rem 0.8rem 0.75rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.table td a {
  text-decoration: none;
  color: var(--ink);
}
.table td a:hover {
  color: var(--accent);
}
.row-warn td {
  background: var(--warn-soft);
}
.row-muted td {
  opacity: 0.55;
}
.student-note {
  font: italic 0.9rem var(--serif);
  color: var(--ink-2);
  margin-top: 0.2rem;
}
.assign {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.assign select {
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  min-width: 0;
}
.booking-cell {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
}

/* Layout bits */
.columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
.columns > section > h2:first-child {
  margin-top: 0.4rem;
}
.title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}
.title-row h2 {
  margin-top: 0.4rem;
}
.actions {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
  align-items: center;
}
.actions form {
  margin: 0;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  margin: 1.5rem 0;
  color: var(--ink-2);
  font-size: 0.9rem;
}
.stat {
  display: block;
  font: 500 1.9rem/1.1 var(--serif);
  color: var(--ink);
}
.stats .warn .stat {
  color: var(--warn);
}
.plain {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.plain li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--rule);
}
.row {
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.row form {
  margin-left: auto;
}
.columns-list {
  columns: 2;
}
.tabs {
  display: flex;
  gap: 1.6rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.6rem;
  overflow-x: auto;
}
.tabs a {
  padding: 0.6rem 0;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tabs a.active {
  color: var(--ink);
  border-color: var(--accent);
}
.danger-zone {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.slot-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.slot-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--rule);
}
.slot-list .slot-who {
  flex: 1;
}
.slot-list li.taken .slot-who {
  font-weight: 500;
}
.add-slots {
  margin-bottom: 1.5rem;
}
.season-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}
.season-list .link-card {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
.next-step {
  border-left: 3px solid var(--accent);
}
.secondary-step {
  margin-top: 0.8rem;
  font-size: 0.88rem;
}
.token-reveal {
  background: var(--accent-soft);
  padding: 0.8rem 1rem;
  border-radius: 8px;
}
.token-reveal code {
  word-break: break-all;
}
.activity li {
  border: 0;
  padding: 0.2rem 0;
}

.stepper {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 1.6rem;
  gap: 0;
  counter-reset: step;
  flex-wrap: wrap;
}
.stepper li {
  flex: 1 1 0;
  min-width: 110px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.8rem 0.6rem 0;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 2px solid var(--rule);
}
.stepper li.done {
  color: var(--ink-2);
  border-color: var(--accent);
}
.stepper li.current {
  color: var(--ink);
  font-weight: 600;
  border-color: var(--accent);
}
.step-n {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: 0.75rem;
  border: 1px solid var(--rule-strong);
}
.stepper li.done .step-n {
  background: var(--accent-soft);
  border-color: transparent;
}
.stepper li.current .step-n {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* Demo */
.people {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip.person {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  text-align: left;
}
.families {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 0.4rem 1.5rem;
}
.family h3 {
  font-size: 1rem;
  margin: 0.8em 0 0.4em;
}
.email header {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.6rem;
}
.email pre {
  white-space: pre-wrap;
  margin: 0;
  font-family: var(--sans);
  font-size: 0.92rem;
}

@media (max-width: 760px) {
  main {
    padding: 1.4rem 16px 4rem;
  }
  .masthead {
    padding: 1rem 16px;
  }
  .columns,
  .ranker-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .pair {
    grid-template-columns: 1fr;
  }
  .columns-list {
    columns: 1;
  }
  .table {
    font-size: 0.88rem;
  }
  .assign {
    flex-wrap: wrap;
  }
}

@media print {
  .masthead nav,
  .demo-bar,
  .no-print,
  .flash,
  .crumbs,
  .add-slots {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .card {
    box-shadow: none;
  }
  main.wide {
    max-width: none;
  }
}

/* Fixes from walkthrough */
.booked {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}
.booked p {
  margin: 0.8rem 0 0;
}
.booked .fine {
  margin-top: 0.4rem;
}
label.chip.radio {
  flex-direction: row;
  font-weight: 400;
  color: var(--ink);
}
label.chip.radio input {
  margin: 0;
}
.label-text {
  display: block;
}

/* Test environment: a cool blue-gray paper instead of warm ivory, so it's never mistaken for production. */
body.env-test {
  --paper: #e8eef6;
  --surface: #f8fafd;
  --rule: #d3dce8;
  --rule-strong: #bccadb;
}
body.env-test .demo-bar {
  background: #2c4a73;
  color: #eef3fa;
}
@media (prefers-color-scheme: dark) {
  body.env-test {
    --paper: #121b27;
    --surface: #1a2432;
    --rule: #263446;
    --rule-strong: #33445a;
  }
  body.env-test .demo-bar {
    background: #3b6296;
  }
}

/* Improve */
.improve-trigger {
  color: var(--accent) !important;
  font-weight: 500;
}
.improve-dialog {
  width: min(640px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 20px 60px rgb(0 0 0 / 0.2);
}
.improve-dialog::backdrop {
  background: rgb(20 20 20 / 0.35);
}
.improve-form {
  padding: 1.4rem 1.5rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.improve-form > p {
  margin: 0;
}
.improve-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.improve-head h2 {
  margin: 0.1rem 0 0;
}
.improve-dialog textarea {
  resize: vertical;
  line-height: 1.55;
}
.improve-files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.improve-files:empty {
  display: none;
}
.improve-files li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.2rem 0.2rem 0.2rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-size: 0.85rem;
}
.improve-files .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.improve-files .meta {
  color: var(--muted);
  white-space: nowrap;
}
.improve-files li.error .meta {
  color: var(--warn);
}
.improve-files li.uploaded .meta {
  color: var(--ok);
}
.improve-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.improve-actions .spacer {
  flex: 1;
}
.improve-attach {
  position: relative;
  flex-direction: row;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.88rem;
}
.improve-attach input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.improve-attach:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.improve-error {
  margin: 0;
  font-size: 0.9rem;
}
.improve-tasks {
  padding: 0.8rem 1.5rem 1.2rem;
  border-top: 1px solid var(--rule);
}
.improve-tasks summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.improve-toolbar {
  margin: 0.5rem 0;
}
.improve-task-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.improve-task-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.85rem;
}
.task-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}
.task-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.task-reason {
  margin: 0.3rem 0 0;
  color: var(--warn);
}
.task-status {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  background: var(--rule);
  color: var(--ink-2);
}
.task-status:empty {
  display: none;
}
.task-status.in-progress {
  background: #e4edf6;
  color: #3d5f7c;
}
.task-status.done {
  background: var(--accent-soft);
  color: var(--accent);
}
.task-status.blocked {
  background: var(--warn-soft);
  color: var(--warn);
}
.improve-drop {
  display: none;
}
.improve-dialog.dragging .improve-drop {
  display: grid;
  place-items: center;
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  outline: 2px dashed var(--accent);
  outline-offset: -10px;
  color: var(--accent);
  font-weight: 500;
  pointer-events: none;
}
.improve-tasks > summary::before { content: "▸"; width: 1em; font-size: 0.8em; color: var(--muted); transition: transform 0.15s; }
.improve-tasks[open] > summary::before { content: "▸"; transform: rotate(90deg); }
.improve-tasks > summary { font-family: var(--sans); }
