
:root {
  --bg: #fbfbfd; --surface: #fff; --text: #1d1d26; --muted: #6a6a7a; --line: #e7e7ef; --line-strong: #d5d5e0;
  --link: #3b4fc4; --accent: #1e2235; --accent-text: #fff;
  --head-bg: #1e2235; --head-text: #fff; --head-link: #dfe3f5; --head-hover: #2f3550; --head-muted: #a3a9c6; --head-line: #454c6e;
  --col-bg: #f2f2f7; --btn-bg: #fff; --btn-text: #26263a; --btn-border: #d5d5e0; --shadow: 0 1px 3px rgba(20, 20, 60, .08);
  --r: 14px; --r-sm: 8px;
  --danger: #dc2626; --danger-bg: #fee9e9; --danger-line: #f7c0c0; --warn-bg: #fff7e0; --warn-line: #f2cf74;
  --tag-bg: #e6e9fb; --tag-text: #2f3a8f; --ok-bg: #e7f8ee; --ok-line: #a3dfbb;
  --c1: #f1ecff; --c1t: #6d28d9; --c2: #e9f1ff; --c2t: #1d4ed8; --c3: #fff2e3; --c3t: #c2410c; --c4: #e8f7ee; --c4t: #15803d;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101016; --surface: #1a1a23; --text: #e9e9f2; --muted: #9b9bb0; --line: #2a2a36; --line-strong: #3a3a4a;
    --link: #9aa8ff; --accent: #4b5cd6;
    --head-bg: #0b0d16; --head-hover: #1d2033; --head-line: #2f3450;
    --col-bg: #16161e; --btn-bg: #22222d; --btn-text: #e9e9f2; --btn-border: #3a3a4a; --shadow: none; --btn-hover: 1.15;
    --danger: #ff6b6b; --danger-bg: #3b1a1d; --danger-line: #6b2c31; --warn-bg: #2f2812; --warn-line: #61501d;
    --tag-bg: #22284a; --tag-text: #b9c2ff; --ok-bg: #13281c; --ok-line: #2d5c3f;
    --c1: #1e1a2e; --c1t: #c4a8ff; --c2: #16213a; --c2t: #8fb3ff; --c3: #2c1f12; --c3t: #ffb37a; --c4: #13261b; --c4t: #7fdca5;
  }
}
*, *::before, *::after { box-sizing: border-box; }
body { font: 15px/1.5 var(--font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif); margin: 0; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; line-height: 1.2; font-weight: var(--h-weight, 650); margin: .4rem 0 1rem; letter-spacing: -.01em; }
h1, h2, h3 { font-family: var(--h-font, inherit); }
header { display: flex; gap: 1.5rem; align-items: center; padding: .6rem 1.25rem; background: var(--head-bg); color: var(--head-text); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
header strong { font-size: 1.05rem; }
header nav { display: flex; gap: .25rem; flex: 1; flex-wrap: wrap; }
header nav a { color: var(--head-link); padding: .3rem .6rem; border-radius: var(--r-sm); }
header nav a:hover { background: var(--head-hover); text-decoration: none; }
header form span { color: var(--head-muted); margin-right: .5rem; }
main { max-width: 60rem; padding: 1.25rem; }
main.wide { max-width: none; }
table { border-collapse: collapse; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
th, td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; font-size: .85rem; color: var(--muted); background: var(--col-bg); }
tr:last-child td { border-bottom: 0; }
table + form.inline { display: block; margin-top: .6rem; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: 0 0 1rem; }
dt { color: var(--muted); }
dd { margin: 0; }
details { margin: .75rem 0; }
summary { cursor: pointer; color: var(--link); }
details.reply { margin: .25rem 0; }
details.reply > summary { color: inherit; list-style: none; }
details.reply > summary::-webkit-details-marker { display: none; }
details.reply > summary .preview { display: block; margin: 0; }
details.reply > summary .more, details.reply > summary .less { color: var(--link); font-size: .9rem; }
details.reply > summary .less, details.reply[open] > summary .preview, details.reply[open] > summary .more { display: none; }
details.reply[open] > summary .less { display: inline; }
code, pre { font: .9em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--col-bg); border-radius: var(--r-sm); padding: .1em .3em; }
input, select, textarea, button { font: inherit; color: inherit; }
input:not([type=checkbox]):not([type=hidden]), select, textarea { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: .35rem .55rem; min-height: 2.1rem; }
textarea { width: 100%; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type=checkbox] { accent-color: var(--accent); width: 1rem; height: 1rem; }
button { background: var(--btn-bg); color: var(--btn-text); border: 1px solid var(--btn-border); border-radius: var(--r-sm); padding: .35rem .8rem; min-height: 2.1rem; cursor: pointer; font-weight: 500; }
button:hover { filter: brightness(var(--btn-hover, .95)); }
.stack button, form:not(.inline) > button { background: var(--accent); color: var(--accent-text); border-color: var(--accent); justify-self: start; }
header button { background: transparent; color: var(--head-link); border-color: var(--head-line, var(--line-strong)); min-height: 1.9rem; padding: .2rem .7rem; }
.inline { display: inline; }
.stack { display: grid; gap: .8rem; max-width: 30rem; }
.stack label { display: grid; gap: .25rem; font-weight: 500; }
.stack label.check { display: flex; gap: .5rem; align-items: center; font-weight: normal; }
.stack textarea { min-height: 8rem; }
.hint { color: var(--muted); margin: 0; font-size: .875rem; font-weight: normal; }
.off { color: var(--danger); font-size: .85rem; }
.error { background: var(--danger-bg); border: 1px solid var(--danger-line); color: var(--text); padding: .6rem .85rem; border-radius: var(--r); }
.filters { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 1rem; }
.filters a { padding: .25rem .7rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); font-size: .9rem; }
.filters a:hover { text-decoration: none; border-color: var(--accent); }
.filters .current { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.lane { margin-bottom: 1.5rem; }
.lane > h2, h2.lane { font-size: 1.05rem; margin: 1.25rem 0 .6rem; }
h2.lane.empty { font-weight: normal; color: var(--muted); }
.board { display: grid; grid-template-columns: repeat(4, minmax(12rem, 1fr)); gap: .9rem; align-items: start; }
.board section { background: var(--col-bg); padding: .6rem; border-radius: var(--r); border: 1px solid var(--col-line, transparent); }
.board h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: .15rem .2rem .6rem; font-weight: 650; }
.board section > .hint { margin: -.3rem .2rem .5rem; font-size: .8rem; }
.card { background: var(--surface); border: 1px solid var(--card-line, var(--line)); border-radius: var(--r); padding: .6rem .7rem; margin-bottom: .55rem; box-shadow: var(--shadow); }
.card:last-child { margin-bottom: 0; }
.card.over { border-left: 3px solid var(--danger); }
.card p { margin: .1rem 0; }
.card > p:first-child a:not(.tag) { color: var(--text); font-weight: 550; }
.card form { display: flex; gap: .35rem; margin-top: .45rem; }
.card select { flex: 1; min-width: 0; min-height: 1.85rem; padding: .15rem .4rem; font-size: .85rem; }
.card button { min-height: 1.85rem; padding: .15rem .6rem; font-size: .85rem; background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-border); }
.meta { color: var(--muted); font-size: .8rem; }
.warn { color: var(--danger); font-size: .8rem; font-weight: 600; }
.card .warn { display: inline-block; background: var(--danger-bg); padding: 0 .4rem; border-radius: var(--r-sm); margin: .2rem .25rem 0 0; }
.pre { white-space: pre-wrap; }
.tag { display: inline-block; font-size: .7rem; line-height: 1.5; border-radius: 999px; padding: 0 .5rem; color: var(--tag-text); background: var(--tag-bg); vertical-align: .1em; font-weight: 600; }
a.tag:hover { text-decoration: none; filter: brightness(.95); }
.activity, .waiting { padding: .75rem 1rem; border-radius: var(--r); margin-bottom: 1rem; }
.activity { background: var(--surface); border: 1px solid var(--line); }
.activity h2, .waiting h2 { font-size: 1rem; margin: 0 0 .25rem; }
.activity h3, .waiting h3 { font-size: .9rem; margin: .6rem 0 .2rem; }
.activity ul, .waiting ul { margin: 0; padding-left: 1.2rem; font-size: .9rem; }
.waiting { background: var(--warn-bg); border: 1px solid var(--warn-line); }
.revoked { color: var(--muted); }
.scroll { overflow-x: auto; }
.issued { border: 1px solid var(--ok-line); background: var(--ok-bg); padding: .6rem .85rem; border-radius: var(--r); }
.issued code, .issued pre { word-break: break-all; white-space: pre-wrap; }
@media (max-width: 50rem) { .board { grid-template-columns: 1fr; } main { padding: 1rem; } dl { grid-template-columns: 1fr; gap: 0; } dd { margin-bottom: .4rem; } }
header strong { color: var(--head-text); }
header nav a:hover { color: var(--head-text); }
header { border-bottom: 0; padding-bottom: calc(.6rem + 3px); background-image: linear-gradient(90deg, var(--c1t) 0 25%, var(--c2t) 25% 50%, var(--c3t) 50% 75%, var(--c4t) 75%); background-size: 100% 3px; background-repeat: no-repeat; background-position: bottom; }
.board section { padding: .7rem; }
.board section:nth-child(1) { background: var(--c1); } .board section:nth-child(1) h2 { color: var(--c1t); }
.board section:nth-child(2) { background: var(--c2); } .board section:nth-child(2) h2 { color: var(--c2t); }
.board section:nth-child(3) { background: var(--c3); } .board section:nth-child(3) h2 { color: var(--c3t); }
.board section:nth-child(4) { background: var(--c4); } .board section:nth-child(4) h2 { color: var(--c4t); }
.board h2::before { content: ""; display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; margin-right: .45rem; vertical-align: .05em; }
.card { border-color: transparent; }
.card.over { border-left-color: var(--danger); }
