/* LawDek v2 — plain CSS, hand-written.
 * Trial partner, plain memo. No framework. */

:root {
  --paper: #fafaf8;
  --ink: #1a1a1a;
  --ink-muted: rgba(26, 26, 26, 0.62);
  --rule: #e5e5e2;
  --accent: #7a3326;
  --warn: #a8451c;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: Charter, "Iowan Old Style", "Source Serif Pro", Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--paper); color: var(--ink); }
body {
  font-family: var(--font-sans);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 64rem; margin: 0 auto; padding: 0 1.5rem; }

/* Header / nav */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header-inner { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; }
.brand { font-family: var(--font-serif); font-size: 1.125rem; }
.brand:hover { text-decoration: none; }
.nav { font-size: 0.875rem; color: var(--ink-muted); }
.nav a { margin-left: 1rem; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a.active { color: var(--ink); }

/* Main column */
main { padding: 2rem 0 4rem; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; line-height: 1.2; }
h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.25rem; margin-top: 2rem; margin-bottom: 0.5rem; }
h3 { font-size: 1.05rem; margin-top: 1.5rem; margin-bottom: 0.25rem; }
p { margin-bottom: 0.75rem; }

.muted { color: var(--ink-muted); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.8125rem; }

/* Lists */
.plain-list { list-style: none; }
.plain-list li { margin-bottom: 0.5rem; }

/* Links */
.link-accent { color: var(--accent); }
.link-accent:hover { text-decoration: underline; }

/* Tables (the operational shape) */
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; color: var(--ink-muted); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr:hover td { background: rgba(0,0,0,0.02); }

/* Forms */
form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 24rem; }
label { font-size: 0.8125rem; color: var(--ink-muted); display: flex; flex-direction: column; gap: 0.25rem; }
input[type="text"], input[type="email"], input[type="date"], input[type="number"], textarea, select {
  font: inherit;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--rule);
  border-radius: 0.25rem;
  background: white;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}
button {
  font: inherit;
  padding: 0.5rem 1rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  border-radius: 0.25rem;
  cursor: pointer;
}
button:hover { background: transparent; color: var(--ink); }
button.secondary { background: transparent; color: var(--ink); }
button.secondary:hover { background: var(--ink); color: var(--paper); }

/* HTMX indicator */
.htmx-request .htmx-indicator { opacity: 1; }
.htmx-indicator { opacity: 0; transition: opacity 200ms; }

/* Severity tokens (data-only, no judgment language) */
.sev { display: inline-block; padding: 0.0625rem 0.375rem; border-radius: 0.125rem; font-size: 0.75rem; font-family: var(--font-mono); }
.sev-critical { background: rgba(168, 69, 28, 0.12); color: var(--warn); }
.sev-high     { background: rgba(168, 69, 28, 0.08); color: var(--warn); }
.sev-medium   { background: rgba(0, 0, 0, 0.06); color: var(--ink); }
.sev-low      { background: rgba(0, 0, 0, 0.04); color: var(--ink-muted); }
