:root {
  color-scheme: dark;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e4eaf0;
  background: #20262d;
  --nav: #161c24;
  --list: #1b2129;
  --line: #36414d;
  --muted: #aab8c5;
  --accent: #a7c9e9;
  --active: #29394a;
  --warning: #edbe80;
  --danger: #f0a29b;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.6rem, 3vw, 2rem); letter-spacing: -.025em; }
h2 { font-size: 1.18rem; line-height: 1.3; }
h3 { font-size: 1rem; }
p { line-height: 1.55; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible { outline: 2px solid #b9ddff; outline-offset: 3px; }
button, .button, input, select, textarea { font: inherit; }
button, .button {
  background: #202b36; border: 1px solid #495a6b; color: #e4eaf0; border-radius: 6px;
  padding: .5rem .85rem; display: inline-flex; align-items: center; justify-content: center;
  font-size: .9rem; font-weight: 600; min-height: 2.4rem; text-decoration: none; cursor: pointer;
}
button:hover, .button:hover { background: #2e4050; }
button.primary, .button.primary { background: #a7c9e9; border-color: #a7c9e9; color: #152430; }
button.primary:hover, .button.primary:hover { background: #c3def6; }
button.check { background: none; border: 0; color: var(--accent); padding-inline: 0; text-align: left; }
input, select, textarea {
  width: 100%; color: #edf2f7; background: #161c24; padding: .52rem .6rem;
  border: 1px solid #4b5a68; border-radius: 5px; min-height: 2.45rem;
}
textarea { resize: vertical; }
input::placeholder { color: #a5b2bf; }
label { display: grid; gap: .35rem; font-size: .88rem; font-weight: 600; min-width: 0; }
form { display: grid; gap: .7rem; }
form > button { justify-self: start; }
time, .count { font-variant-numeric: tabular-nums; }
summary { cursor: pointer; }
summary.button { list-style: none; }
summary.button::-webkit-details-marker { display: none; }
.entry { min-height: 100vh; display: grid; align-content: center; justify-content: center; padding: 2rem; }
.signin { max-width: 31rem; display: grid; gap: 1.25rem; justify-items: start; }
.signin p { color: var(--muted); }
.signin .brand { border-bottom: 1px solid var(--line); padding-bottom: 1.1rem; width: 100%; }
.brand { display: flex; align-items: center; gap: .7rem; color: #edf2f7; text-decoration: none; font-size: 1.18rem; font-weight: 700; }
.mark { color: var(--accent); font-size: 1.5rem; line-height: 1; }
.shell { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); min-height: 100vh; }
.nav { background: var(--nav); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 1.75rem .8rem 1rem; gap: 2rem; }
.nav .brand { padding-inline: .75rem; }
.nav nav { display: grid; gap: .12rem; }
.nav nav a { display: flex; align-items: center; justify-content: space-between; padding: .6rem .65rem; border-inline-start: 3px solid transparent; text-decoration: none; color: var(--muted); min-height: 2.5rem; font-size: .94rem; }
.nav nav a:hover { background: var(--active); }
.nav nav a[aria-current] { border-color: var(--accent); background: var(--active); color: #e2effa; }
.count { font-size: .8rem; color: var(--accent); }
.account { margin-top: auto; padding: .8rem .7rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; }
.account span { overflow-wrap: anywhere; }
.toolbar { padding: 1.55rem 1.8rem; border-bottom: 1px solid var(--line); min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.toolbar p { color: var(--muted); font-size: .88rem; margin-top: .2rem; }
.quick { position: relative; }
.quick > form { position: absolute; z-index: 1; right: 0; width: min(21rem, 78vw); padding: 1rem; background: #202b36; border: 1px solid #566878; border-radius: 6px; margin-top: .55rem; }
.board { display: grid; grid-template-columns: minmax(15rem, 24rem) minmax(0, 1fr); min-height: calc(100dvh - 6rem); }
.queue { border-right: 1px solid var(--line); background: var(--list); }
.case { display: grid; gap: .35rem; padding: .9rem 1.2rem; border-bottom: 1px solid var(--line); border-inline-start: 3px solid transparent; color: inherit; text-decoration: none; }
.case:hover, .case[aria-current] { background: var(--active); }
.case[aria-current] { border-inline-start-color: var(--accent); }
.case-meta { display: flex; gap: .55rem 1rem; flex-wrap: wrap; align-items: center; justify-content: space-between; color: var(--muted); font-size: .82rem; }
.case strong { overflow-wrap: anywhere; font-weight: 640; }
.phase { font-size: .82rem; color: var(--accent); font-weight: 650; }
.phase.waiting { color: var(--warning); }
.phase.review { color: #f0b3a5; }
.phase.done { color: #a4d5ba; }
.muted, .detail-head p { color: var(--muted); font-size: .9rem; }
.detail { padding: 1.3rem 1.8rem 2rem; min-width: 0; }
.detail-head { display: grid; gap: .4rem; margin-bottom: 1.2rem; overflow-wrap: anywhere; }
.detail-form { max-width: 47rem; }
.form-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.subsection { margin-top: 1.2rem; border-top: 1px solid var(--line); padding-top: 1rem; max-width: 47rem; }
.subsection h3, .subsection summary { margin-bottom: .65rem; }
.subsection summary { font-weight: 650; }
.subsection p, .row p { color: var(--muted); }
.empty { padding: 1.5rem; color: var(--muted); display: grid; align-content: start; gap: .5rem; }
.empty h2 { color: #e4eaf0; }
.detail-empty { min-height: 10rem; }
.content { max-width: 56rem; padding: 0 1.8rem 2rem; }
.row { padding: 1.2rem 0; border-bottom: 1px solid var(--line); display: grid; gap: .65rem; }
.row a.button { justify-self: start; }
.preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.notice, .inline-note { padding: .65rem 1rem; margin: .65rem 1.8rem; border-inline-start: 3px solid var(--accent); background: var(--active); }
.signin .notice { margin: 0; }
.notice.error { border-color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 950px) {
  .shell { grid-template-columns: 10rem minmax(0, 1fr); }
  .board { grid-template-columns: minmax(12rem, 17rem) minmax(0, 1fr); }
  .detail, .toolbar, .content { padding-inline: 1rem; }
  .form-pair { grid-template-columns: 1fr; }
  .notice, .inline-note { margin-inline: 1rem; }
}
@media (max-width: 650px) {
  .shell { display: block; }
  .nav { gap: .65rem; padding: .7rem; border: 0; border-bottom: 1px solid var(--line); }
  .nav nav { display: flex; overflow: auto; gap: .2rem; }
  .nav nav a { flex: 0 0 auto; border-inline: 0; border-bottom: 3px solid transparent; padding-inline: .55rem; }
  .nav nav a .count { padding-inline-start: .4rem; }
  .account { display: flex; align-items: center; justify-content: space-between; }
  .account button { min-height: 2rem; padding-block: .3rem; }
  .board { display: block; min-height: auto; }
  .queue { border-right: 0; max-height: 18rem; overflow: auto; }
  .detail-empty { display: none; }
}
