:root {
  --bg: #fbfaf7;
  --fg: #1d1d1f;
  --muted: #5b5b62;
  --line: #d9d6cf;
  --accent: #1f5f8b;
  --needs: #a14a00;
  --done: #2b6e3a;
  --tray: #5b5b62;
  --card: #ffffff;
  --mark: #ffe58a;
  --warn-bg: #fff4e0;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--fg); background: var(--bg); line-height: 1.5; }
body { margin: 0; }
main { max-width: 72rem; margin: 0 auto; padding: 1rem 1.25rem 3rem; }
a { color: var(--accent); }
h1 { font-size: 2rem; line-height: 1.2; margin: 1rem 0 0.5rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.5rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
h4 { font-size: 1rem; margin: 1.25rem 0 0.5rem; }

.site-header { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--line); background: #fff; }
.site-header .brand { font-weight: 700; text-decoration: none; color: var(--fg); }
.site-header nav a { margin-left: 1rem; }
.site-footer { border-top: 1px solid var(--line); padding: 1rem 1.25rem; color: var(--muted); font-size: 0.9rem; text-align: center; }

.hero .sub { font-size: 1.15rem; color: var(--muted); max-width: 44rem; }
.muted { color: var(--muted); font-size: 0.92rem; }
.note { font-weight: 600; }
.notice { background: var(--warn-bg); border: 1px solid #e8c48a; padding: 0.6rem 0.8rem; border-radius: 6px; }
.warning { background: var(--warn-bg); border-left: 4px solid var(--needs); padding: 0.5rem 0.8rem; }
.status { min-height: 1.2em; }
.status.ok { color: var(--done); font-weight: 600; }
.status.error { color: #a11; font-weight: 600; }

label { display: block; font-weight: 600; margin-top: 0.5rem; }
label.check { font-weight: 400; display: flex; gap: 0.5rem; align-items: center; }
input[type="text"], input[type="email"], input[type="date"], select, textarea {
  font: inherit; padding: 0.5rem 0.6rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--fg);
}
textarea { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92rem; }
.stack input[type="text"], .stack input[type="email"], .stack select, .stack textarea { width: 100%; max-width: 40rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.5rem 0; }
.row input[type="text"] { flex: 1 1 18rem; }

button, .button {
  font: inherit; display: inline-block; padding: 0.5rem 0.9rem; border-radius: 6px; border: 1px solid var(--line);
  background: #fff; color: var(--fg); cursor: pointer; text-decoration: none;
}
button:hover, .button:hover { border-color: var(--accent); }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
button:focus-visible, .button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #8cb8d8; outline-offset: 2px; }

.counts { font-size: 1rem; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 52rem) { .board { grid-template-columns: 1fr; } }
.column { background: #f2f0ea; border: 1px solid var(--line); border-radius: 8px; padding: 0.75rem; min-height: 8rem; }
.column h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.col-needs h3 { color: var(--needs); }
.col-done h3 { color: var(--done); }
.col-unclear h3 { color: var(--tray); }
.column.drop-target { outline: 3px dashed var(--accent); outline-offset: -3px; }
.cards { list-style: none; margin: 0; padding: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 0.6rem; margin-bottom: 0.6rem; cursor: grab; }
.card.dragging { opacity: 0.5; }
.card-text { margin: 0 0 0.35rem; overflow-wrap: anywhere; }
.card-meta { margin: 0 0 0.35rem; font-size: 0.82rem; color: var(--muted); }
.session { display: inline-block; background: #e7eef4; color: #234; border-radius: 4px; padding: 0 0.35rem; font-size: 0.82rem; }
.session.none { background: transparent; color: var(--muted); padding: 0; }
.matched code { font-size: 0.82rem; background: var(--mark); padding: 0 0.25rem; border-radius: 3px; }
mark { background: var(--mark); color: inherit; padding: 0 0.1rem; border-radius: 2px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.card-actions button { font-size: 0.8rem; padding: 0.2rem 0.5rem; }
.more, .empty-col { font-size: 0.9rem; color: var(--muted); margin: 0.25rem 0 0; }
.more { font-weight: 600; }

.list { list-style: none; padding: 0; }
.list li { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.b-title { font-weight: 600; }

.review .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.75rem; margin: 1rem 0; }
.review .stats div { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.8rem; }
.review dt { font-size: 0.85rem; color: var(--muted); }
.review dd { margin: 0; font-size: 1.6rem; font-weight: 700; }
.review-list li { margin-bottom: 0.3rem; overflow-wrap: anywhere; }

.key { display: inline-block; font-size: 1rem; padding: 0.5rem 0.7rem; background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow-wrap: anywhere; }
.prose { max-width: 44rem; }

.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

@media print {
  .site-header nav, .paste, #unlock, .site-footer, .card-actions, button, .button, .note { display: none !important; }
  html, body { background: #fff; }
  main { max-width: none; padding: 0; }
  .board { grid-template-columns: repeat(3, 1fr); }
  .column { background: #fff; }
  .card { break-inside: avoid; border-color: #999; }
  mark { background: none; text-decoration: underline; }
  a { color: inherit; text-decoration: none; }
}
