/* Werkbank: workshop ledger. Phone first, one column; brass accent from the videoforge pages. */
:root {
  --bg: #f2f1ee; --surface: #ffffff; --fg: #1d2129; --muted: #5d6573; --line: #dcdad4;
  --accent: #8a6420; --accent-soft: #f2e9d6; --ok: #2f7a4d; --ok-soft: #e1f0e6; --bad: #a33a2b; --bad-soft: #f6e3df;
  --code-bg: #ebe9e4;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161b; --surface: #1c1f26; --fg: #e5e7ec; --muted: #9ba3b2; --line: #2e333e;
    --accent: #d6ac5c; --accent-soft: #2b2517; --ok: #6cc08f; --ok-soft: #17291f; --bad: #e07a6a; --bad-soft: #2f1c18;
    --code-bg: #23262e; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 var(--body);
  padding: env(safe-area-inset-top, 0px) max(14px, env(safe-area-inset-right, 0px)) 48px max(14px, env(safe-area-inset-left, 0px)); }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.25rem; }
p { margin: 0; }
.wrap { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.mono { font-family: var(--mono); }

/* top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 4px; border-bottom: 1px solid var(--line); }
.brand { font-family: var(--display); font-size: 1.25rem; font-weight: 700; color: var(--fg); text-decoration: none; letter-spacing: .01em; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 14px; align-items: center; font-size: .92rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a.on { color: var(--fg); font-weight: 600; }
.linkbtn { background: none; border: none; color: var(--muted); font: inherit; font-size: .92rem; padding: 0; cursor: pointer; }

/* forms */
input[type=text], input[type=search], input[type=password], textarea, select {
  width: 100%; font: inherit; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
textarea { resize: vertical; min-height: 84px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .86rem; color: var(--muted); }
button, .btn { font: inherit; font-weight: 600; background: var(--accent); color: var(--surface); border: none; border-radius: 8px; padding: 10px 18px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn.ghost, button.ghost { background: var(--code-bg); color: var(--fg); font-weight: 500; }
button.danger { background: var(--bad-soft); color: var(--bad); font-weight: 500; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row > * { min-width: 0; }

/* capture box */
.capture { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.capture textarea { min-height: 64px; }
.capture details summary { cursor: pointer; font-size: .86rem; color: var(--muted); }
.capture .more { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; }
@media (max-width: 520px) { .capture .more { grid-template-columns: minmax(0, 1fr); } }

/* filters */
.filters { display: flex; flex-direction: column; gap: 10px; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chip { flex: none; font-size: .84rem; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--line); color: var(--fg); text-decoration: none; background: var(--surface); white-space: nowrap; }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip b { font-weight: 500; color: var(--muted); font-family: var(--mono); font-size: .76rem; margin-left: 4px; }
.chip.on b { color: inherit; opacity: .7; }

/* cards */
.list { display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card.fresh { border-color: var(--accent); }
.card .top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.kind { font-family: var(--mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.card h3 { font-size: 1.05rem; overflow-wrap: anywhere; }
.card h3 a { color: var(--fg); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card .by { font-size: .86rem; color: var(--muted); }
.card .note { font-size: .9rem; overflow-wrap: anywhere; }
.card .meta { font-size: .78rem; color: var(--muted); font-family: var(--mono); }
.verdicts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.verdicts button { font-size: .8rem; font-weight: 500; padding: 5px 11px; border-radius: 99px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.verdicts button.on[value="packt mich"] { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.verdicts button.on[value="vielleicht"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.verdicts button.on[value="nein"] { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.empty { padding: 28px 8px; text-align: center; color: var(--muted); }

/* item page */
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: .9rem; }
.facts dt { font-family: var(--mono); font-size: .74rem; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.fulltext { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; max-height: 360px; overflow-y: auto; font-size: .9rem; white-space: pre-wrap; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.flash { background: var(--ok-soft); color: var(--ok); border-radius: 8px; padding: 8px 12px; font-size: .9rem; }
.warn { background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 8px 12px; font-size: .86rem; overflow-wrap: anywhere; }
ul.log { list-style: none; margin: 0; padding: 0; font-size: .8rem; color: var(--muted); font-family: var(--mono); display: flex; flex-direction: column; gap: 2px; }

/* login */
.login { max-width: 360px; margin: 12vh auto 0; display: flex; flex-direction: column; gap: 14px; }

.htmx-request.card, .htmx-request .verdicts { opacity: .6; }
@media (prefers-reduced-motion: no-preference) { .card.fresh { animation: pop .35s ease-out; } @keyframes pop { from { transform: translateY(-4px); opacity: .4; } } }
