:root {
  color-scheme: light;
  --bg: #f5f7f9;
  --surface: #fff;
  --text: #17212b;
  --muted: #637180;
  --line: #d5dce3;
  --accent: #075a8c;
  --accent-hover: #064d77;
  --danger: #b42318;
  --table-font-size: 13px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.public { max-width: 720px; margin: 14vh auto; padding: 32px; }
.public h1 { font-size: 4rem; margin: .1em 0; }
.eyebrow, .brand { color: var(--accent); font-weight: 800; letter-spacing: .12em; }
.muted { color: var(--muted); }
.topbar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 20px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 1px 5px #17212b0a; }
.topbar h1 { display: inline; margin-left: 14px; font-size: 1rem; }
.actions { display: flex; gap: 8px; }
main { width: 100%; padding: 20px 20px 80px; }
button { padding: 9px 14px; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: #fff; font: inherit; font-weight: 650; cursor: pointer; }
button:hover { background: var(--accent-hover); }
.secondary { border-color: var(--line); background: #fff; color: var(--text); }
.secondary:hover { background: #f1f4f6; }
.small { padding: 6px 9px; }
.status { min-height: 28px; color: var(--muted); }
.load-more { margin-bottom: 10px; }
.workspace-heading { display:flex; align-items:center; gap:20px; }
.brand { font-size:24px; padding-right:20px; border-right:1px solid var(--line); }
.app-label { margin:0 0 3px; font-size:11px; color:var(--muted); letter-spacing:.04em; }
.topbar h1 { display:block; margin:0; font-size:16px; }
.board-toolbar { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:14px; }
.toolbar-actions { display:flex; align-items:center; gap:8px; }
.board-toolbar h2 { margin:0 0 5px; font-size:16px; }
.count { margin-left:8px; padding:2px 7px; border-radius:4px; background:#e9eef2; color:#526371; font-size:12px; font-weight:500; }
.status { font-size:12px; }
.chronology { width:100%; max-height:calc(100dvh - 220px); min-height:240px; overflow:auto; border:1px solid var(--line); background:#fff; scrollbar-gutter:stable; }
table { width:100%; min-width:1100px; table-layout:fixed; border-collapse:separate; border-spacing:0; font-size:var(--table-font-size); }
th { position:sticky; top:0; z-index:1; text-align:left; padding:11px 10px; background:#edf1f4; color:#485b6b; border-bottom:1px solid #bcc7d0; white-space:nowrap; font-size:12px; font-weight:650; }
td { vertical-align:top; padding:12px 10px; border-bottom:1px solid #e2e7eb; line-height:1.6; overflow-wrap:anywhere; }
th + th, td + td { border-left:1px solid #e8ecf0; }
tbody tr:last-child td { border-bottom:0; }
tbody tr:nth-child(even) { background:#fafbfc; }
tbody tr:hover { background:#f1f6fa; }
tbody tr.important { background:#fffcf0; }
tr.important td:first-child { box-shadow:inset 3px 0 #d39b19; }
[data-column="number"] { color:var(--accent); font-variant-numeric:tabular-nums; font-weight:650; }
td[data-column="important"] { text-align:center; color:#8a5b00; font-size:11px; }
td[data-column$="At"] { color:#526371; font-size:12px; font-variant-numeric:tabular-nums; }
td[data-column="authorName"] { font-weight:600; }
td[data-column="tags"], td[data-column="attachments"] { color:var(--muted); }
td[data-column="body"] { white-space:pre-wrap; }
td[data-column="body"] a { color:var(--accent); text-decoration-thickness:1px; text-underline-offset:2px; }
.post-reference { font-weight:650; }
.post-reference.missing-reference { color:var(--danger); text-decoration-style:dotted; }
.back-references { margin-top:7px; color:var(--muted); font-size:11px; }
.back-references a { margin-right:4px; font-weight:650; }
tr.reference-target { background:#e6f3fb !important; }
td[data-column="actions"] { white-space:nowrap; padding:10px 6px; }
.row-action { padding:4px 5px; border:0; border-radius:3px; background:transparent; color:#496377; font-size:12px; font-weight:500; }
.row-action:hover { background:#e5edf3; color:#064d77; }
.row-action:last-child { color:#8b6262; }
.revision { display:block; color:#84909a; font-size:10px; }
.board-footer { display:flex; justify-content:space-between; gap:12px; margin:10px 0; color:var(--muted); font-size:11px; }
.empty-state { height:180px; text-align:center; vertical-align:middle; color:var(--muted); }
.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; }
:focus-visible { outline:3px solid #167cb0; outline-offset:3px; }
input:focus, textarea:focus { border-color:var(--accent); }
button:disabled { opacity:.55; cursor:wait; }
.hidden { display: none; }
dialog { width: min(640px, calc(100% - 24px)); padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); box-shadow: 0 24px 80px #17212b33; }
dialog::backdrop { background: #17212b73; }
label { display: grid; gap: 6px; margin: 14px 0; font-weight: 650; }
input, textarea, select { width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); font: inherit; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline { display: flex; gap: 8px; }
.check { display: flex; grid-template-columns: auto 1fr; align-items: center; }
.check input { width: auto; }
menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; margin: 22px 0 0; }
.error { color: var(--danger); }
.filter-panel { margin:0 0 12px; border:1px solid var(--line); background:var(--surface); }
.filter-panel summary { padding:10px 12px; color:#405666; font-size:13px; font-weight:650; cursor:pointer; }
.filter-panel form { padding:2px 12px 12px; border-top:1px solid var(--line); }
.filter-grid { display:grid; grid-template-columns:repeat(5, minmax(140px, 1fr)); gap:0 10px; }
.filter-grid label { margin:10px 0 0; font-size:12px; }
.filter-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
.filter-count { display:inline-block; min-width:20px; margin-left:5px; padding:1px 6px; border-radius:10px; background:var(--accent); color:#fff; text-align:center; font-size:11px; }
.filter-count.hidden { display:none; }
.column-settings { max-height:45vh; overflow:auto; border:1px solid var(--line); }
.column-setting { display:grid; grid-template-columns:1fr auto auto; align-items:center; gap:6px; padding:5px 8px; border-bottom:1px solid #e8ecf0; }
.column-setting:last-child { border-bottom:0; }
.column-setting label { margin:0; }
.history-list { max-height:60vh; overflow:auto; }
.history-event { padding:12px 0; border-bottom:1px solid var(--line); }
.history-event h3 { margin:0; font-size:14px; }
.history-actor { margin:4px 0 8px; color:var(--muted); font-size:11px; }
.history-event dl { display:grid; grid-template-columns:90px 1fr; gap:5px 10px; margin:0; font-size:12px; }
.history-event dt { color:var(--muted); }
.history-event dd { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }
@media (max-width: 700px) {
  .topbar { align-items: flex-start; }
  .topbar h1 { display: block; margin: 2px 0; }
  .actions { flex-direction: column; }
  main { padding: 14px 10px 60px; }
  .grid { grid-template-columns: 1fr; }
  .public { padding: 20px; }
  .app-label { display:none; }
  .workspace-heading { gap:10px; }
  .brand { padding-right:10px; }
  .board-footer { flex-direction:column; }
  .chronology { max-height:calc(100dvh - 250px); }
  .topbar button { font-size:12px; padding:7px 10px; }
  .filter-grid { grid-template-columns:1fr 1fr; }
}
.field-help { display:block; margin-top:5px; color:var(--muted); font-size:12px; }
