/* Beraad — editorial, calm, legible. Tenant colour arrives as --accent on <html>. */
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("fonts/dm-mono.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --accent: #038C4C;
  --bg: #f6f4ef; --surface: #fffdf8; --ink: #17201b; --muted: #5d6660; --line: #dcd8cd;
  --soft: color-mix(in srgb, var(--accent) 9%, var(--surface));
  --danger: #a3291b; --warn: #8a5a00;
  --radius: 14px;
  --display: "Fraunces", Georgia, serif; --body: "DM Sans", system-ui, sans-serif; --mono: "DM Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #101412; --surface: #171c19; --ink: #ecefe9; --muted: #9aa49d; --line: #2a322d;
          --soft: color-mix(in srgb, var(--accent) 16%, var(--surface)); --danger: #f08a7c; --warn: #e3b55c; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--body); }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 560; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0 0 .6rem; }
h2 { font-size: 1.55rem; margin: 2rem 0 .6rem; }
h3 { font-size: 1.15rem; margin: 1.4rem 0 .4rem; }
.mono, code, .eyebrow { font-family: var(--mono); font-size: .82rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
header.top { border-bottom: 1px solid var(--line); background: var(--surface); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-size: 1.25rem; font-weight: 600; }
.brand img { max-height: 34px; max-width: 160px; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
nav.top { display: flex; align-items: center; gap: 14px; font-size: .92rem; flex-wrap: wrap; justify-content: flex-end; }
nav.top a { color: var(--muted); text-decoration: none; }
nav.top a:hover { color: var(--ink); }
main { padding: 40px 0 72px; }
footer.bottom { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: .85rem; }
footer.bottom .wrap { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.side { grid-template-columns: 1.5fr 1fr; } }
.notice { background: var(--soft); border-left: 3px solid var(--accent); padding: 12px 16px; border-radius: 8px; font-size: .92rem; }
.notice.warn { border-color: var(--warn); }
.notice.danger { border-color: var(--danger); }

label { display: block; font-weight: 600; font-size: .92rem; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=date], input[type=number], input[type=url], input[type=tel], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 13px; }
textarea { min-height: 190px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 200px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .97rem var(--body);
  border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 999px; padding: 11px 22px;
  cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.small { padding: 7px 14px; font-size: .86rem; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; }

.choice { display: grid; gap: 10px; }
@media (min-width: 640px) { .choice { grid-template-columns: 1fr 1fr; } }
.choice label { margin: 0; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; font-weight: 400; background: var(--bg); }
.choice input { margin-right: 8px; }
.choice label:has(input:checked) { border-color: var(--accent); background: var(--soft); }
.choice strong { display: block; }

table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th, table.list td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-family: var(--mono); font-weight: 400; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.scroll { overflow-x: auto; }
.pill { display: inline-block; font: .74rem var(--mono); padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.done { color: var(--accent); border-color: var(--accent); }
.pill.failed { color: var(--danger); border-color: var(--danger); }
.pill.running, .pill.queued { color: var(--warn); border-color: var(--warn); }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; padding: 10px 0 10px 44px; position: relative; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 9px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--soft); color: var(--accent); font: 600 .85rem/28px var(--mono); text-align: center; }

/* Case thread */
.question { background: var(--soft); border-radius: var(--radius); padding: 16px 20px; white-space: pre-wrap; }
.memo { line-height: 1.7; }
.memo h2 { font-size: 1.3rem; border-top: 1px solid var(--line); padding-top: 1.2rem; }
.memo h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.memo table { border-collapse: collapse; width: 100%; font-size: .92rem; display: block; overflow-x: auto; }
.memo th, .memo td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.memo blockquote { margin: 1rem 0; padding: .2rem 1rem; border-left: 3px solid var(--accent); color: var(--muted); }
.memo a { word-break: break-word; }
.progress { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.progress li { padding: 7px 0 7px 26px; position: relative; color: var(--muted); border-bottom: 1px dashed var(--line); }
.progress li::before { content: "✓"; position: absolute; left: 4px; color: var(--accent); }
.progress li:last-child { color: var(--ink); }
.progress.live li:last-child::before { content: ""; width: 10px; height: 10px; top: 14px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .progress.live li:last-child::before { animation: none; } }

.lawyer { display: grid; gap: 6px; }
.lawyer h3 { margin: 0; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 4px 12px; font-size: .92rem; }
.stat { font-family: var(--display); font-size: 2rem; line-height: 1; }
details summary { cursor: pointer; font-weight: 600; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 40ch; }

@media print {
  header.top, footer.bottom, .noprint, form { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .card { border: 0; padding: 0; }
  .memo a::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
}

/* fixes after visual review */
.grid > .card + .card { margin-top: 0; }
.brand { white-space: nowrap; }
@media (max-width: 520px) {
  header.top .wrap { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  nav.top { gap: 10px; font-size: .85rem; }
}
