/* db.sccrpg.com — same printed-wayfinding look as sccrpg.com: rain-slate ground,
   wet-asphalt ink, transit teal for anything you can act on, sign-marigold for
   anything you have marked. */
:root {
  --ground: #dde5e4; --paper: #f7f5ee; --paper-2: #ece8db;
  --ink: #1e2a33; --ink-2: #4a5a64; --line: #c3ccc9;
  --teal: #0e7c7b; --teal-ink: #075453; --marigold: #f2b01e; --madrona: #a8392b;
  --display: 'Bricolage Grotesque', 'Trebuchet MS', sans-serif;
  --body: 'Atkinson Hyperlegible', Verdana, sans-serif;
  --hard: 3px 4px 0 var(--ink);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1rem/1.55 var(--body); }
h1, h2, h3, p, ul, ol, dl, dd, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: var(--teal-ink); text-underline-offset: 0.15em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 4px; }
.skip:focus { top: 8px; }

.top, .hero, .tabs, main, .foot { max-width: 1180px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 18px; }
.wordmark { display: grid; gap: 1px; text-decoration: none; color: var(--ink); }
.wordmark-letters { font: 800 1.5rem/1 var(--display); letter-spacing: 0.02em; }
.wordmark-long { font-size: 0.75rem; color: var(--ink-2); }
.proto { font: 700 0.72rem/1 var(--body); letter-spacing: 0.08em; text-transform: uppercase; border: 1.5px solid var(--ink); border-radius: 999px; padding: 6px 10px; background: var(--marigold); white-space: nowrap; }

.hero { padding-top: 34px; padding-bottom: 22px; }
.hero h1 { font: 800 clamp(1.9rem, 5.2vw, 3.2rem)/1.05 var(--display); max-width: 18ch; text-wrap: balance; }
.lede { margin-top: 14px; max-width: 68ch; font-size: 1.08rem; }
.fine { margin-top: 8px; font-size: 0.88rem; color: var(--ink-2); max-width: 68ch; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 14px; }
.tabs button { border: 1.5px solid var(--ink); background: var(--paper); border-radius: 6px; padding: 8px 12px; cursor: pointer; font-weight: 700; font-size: 0.95rem; }
.tabs button[aria-current="page"] { background: var(--ink); color: var(--paper); }
.pill { display: inline-block; min-width: 1.5em; text-align: center; background: var(--marigold); color: var(--ink); border-radius: 999px; font-size: 0.8rem; padding: 0 6px; margin-left: 4px; }

main { padding-bottom: 48px; }
.layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 22px; align-items: start; }
.layout > * { min-width: 0; }
.filters { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px; box-shadow: var(--hard); padding: 16px; display: grid; gap: 16px; position: sticky; top: 12px; max-height: calc(100dvh - 24px); overflow: auto; }
.field { display: grid; gap: 5px; }
.field > span, legend { font-weight: 700; font-size: 0.86rem; }
legend { margin-bottom: 6px; }
input, select, textarea { width: 100%; background: #fff; border: 1.5px solid var(--ink-2); border-radius: 6px; padding: 9px 10px; min-height: 44px; }
textarea { min-height: 96px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1.5px solid var(--ink-2); background: #fff; border-radius: 999px; padding: 5px 11px; cursor: pointer; font-size: 0.88rem; min-height: 34px; }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal-ink); color: #fff; font-weight: 700; }
.chip .n { opacity: 0.7; font-size: 0.8em; margin-left: 3px; }
.filter-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.more { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); border-radius: 6px; padding: 8px 12px; min-height: 40px; cursor: pointer; text-decoration: none; font-weight: 700; font-size: 0.9rem; }
.btn:hover { background: var(--paper-2); }
.btn.solid { background: var(--teal); color: #fff; border-color: var(--teal-ink); box-shadow: var(--hard); }
.btn.ghost { border-color: var(--ink-2); font-weight: 400; }
.linkish { background: none; border: 0; padding: 0; color: var(--teal-ink); text-decoration: underline; cursor: pointer; }

.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#showing { font-weight: 700; }

.cards { display: grid; gap: 12px; }
.card { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px; padding: 16px 18px; display: grid; gap: 8px; }
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.card h3 { font: 700 1.2rem/1.2 var(--display); overflow-wrap: anywhere; }
.card .co { font-weight: 700; }
.card .where { color: var(--ink-2); font-size: 0.93rem; }
.card .desc { max-width: 75ch; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 0.78rem; border: 1px solid var(--line); background: var(--paper-2); border-radius: 4px; padding: 2px 7px; overflow-wrap: anywhere; }
.tag.paid { background: #d5ede2; border-color: #7dbb9f; font-weight: 700; }
.tag.unpaid { background: #f6d9d3; border-color: #cf8d82; font-weight: 700; }
.tag.open { background: var(--marigold); border-color: var(--ink); font-weight: 700; }
.tag.soon { background: var(--madrona); color: #fff; border-color: var(--madrona); font-weight: 700; }
.tag.care { border-style: dashed; border-color: var(--madrona); }
.card-foot { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 0.9rem; }
.card-foot .checked { color: var(--ink-2); font-size: 0.82rem; margin-left: auto; }
.star { border: 1.5px solid var(--ink); background: #fff; border-radius: 6px; min-width: 44px; min-height: 44px; cursor: pointer; font-size: 1.2rem; line-height: 1; flex: none; }
.star[aria-pressed="true"] { background: var(--marigold); }
.note { font-size: 0.86rem; color: var(--ink-2); }

.empty { padding: 28px 0; }
.prose { max-width: 72ch; display: grid; gap: 12px; margin-bottom: 18px; }
.prose h2 { font: 800 1.6rem/1.15 var(--display); }
.prose h3 { font: 700 1.1rem/1.2 var(--display); margin-top: 12px; }
.defs { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.defs dt { font-weight: 700; }
.plain { list-style: disc; padding-left: 1.2em; display: grid; gap: 4px; }

.form { background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px; box-shadow: var(--hard); padding: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 760px; }
.form .wide { grid-column: 1 / -1; }
.hp { position: absolute; left: -9999px; }
.msg { margin-top: 10px; font-weight: 700; }
.msg.bad { color: var(--madrona); }

.foot { padding-top: 18px; padding-bottom: 36px; font-size: 0.86rem; color: var(--ink-2); border-top: 1.5px solid var(--line); }

@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; max-height: none; box-shadow: none; }
  .btn.more { display: inline-flex; }
  .filters.shut fieldset, .filters.shut .sortfield, .filters.shut .filter-actions { display: none; }
  .form { grid-template-columns: 1fr; }
  .wordmark-long { display: none; }
  .defs { grid-template-columns: 1fr; gap: 2px; }
  .defs dd { margin-bottom: 8px; }
  .card-foot .checked { margin-left: 0; width: 100%; }
}
@media print {
  body { background: #fff; }
  .tabs, .filters, .bar-actions, .star, .foot, .proto, .skip { display: none !important; }
  .layout { grid-template-columns: 1fr; }
  .card { break-inside: avoid; border-width: 1px; }
}
