/* klardenkmal.de audit brief — shared styles */

:root {
  --paper: #f5f5f0;
  --paper-2: #ecece5;
  --ink: #17191a;
  --ink-2: #3c4042;
  --muted: #63696b;
  --rule: #d3d5cc;
  --rule-strong: #b7bab0;
  --red: #b3261e;
  --red-soft: #f3e4e1;
  --serif: "Spectral", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131516;
    --paper-2: #1a1d1e;
    --ink: #ecece5;
    --ink-2: #c2c6c2;
    --muted: #909694;
    --rule: #2c3031;
    --rule-strong: #3e4344;
    --red: #e8776c;
    --red-soft: #2a1b18;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 500; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
a { color: var(--ink); text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--red); }
strong { color: var(--ink); font-weight: 600; }
img { max-width: 100%; height: auto; display: block; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 0; }

.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 70; background: var(--ink); color: var(--paper); padding: 0.5rem 0.9rem; font-size: 0.9rem; text-decoration: none; }
.skip:focus { top: 12px; }
.tag { color: var(--red); font-family: var(--serif); font-style: italic; font-size: 0.88em; }
code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 0.86em; background: var(--paper-2); padding: 0.05em 0.3em; }

/* ---------- chrome ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; }
.progress span { display: block; height: 100%; width: 0; background: var(--red); }

.chrome {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-inline: clamp(16px, 4vw, 40px);
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.brand { font-family: var(--serif); font-size: 1.02rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand em { font-style: normal; color: var(--muted); }
.chrome nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); }
.chrome nav a { font-size: 0.86rem; color: var(--ink-2); text-decoration: none; }
.chrome nav a:hover { color: var(--red); }
.lang { display: flex; gap: 0; border: 1px solid var(--rule-strong); }
.lang a { padding: 3px 10px; font-size: 0.78rem; text-decoration: none; color: var(--muted); }
.lang a[aria-current="true"] { background: var(--ink); color: var(--paper); }
@media (max-width: 760px) {
  .chrome nav a:not(.lang a) { display: none; }
  .chrome nav .sections { display: none; }
}

/* ---------- layout ---------- */
main { padding-top: 56px; }
.wrap { width: min(1120px, 100% - clamp(32px, 8vw, 96px)); margin-inline: auto; }
.measure { max-width: 68ch; }

section { padding-block: clamp(56px, 9vw, 104px); border-top: 1px solid var(--rule); }
section:first-of-type { border-top: 0; }
section[id], .finding[id] { scroll-margin-top: 72px; }

.kicker { font-family: var(--serif); font-style: italic; color: var(--red); font-size: 1rem; margin-bottom: 0.6rem; }

h2.sec { font-size: clamp(1.9rem, 3.6vw, 3rem); margin-bottom: 1.1rem; }
.standfirst { font-size: clamp(1.05rem, 1.7vw, 1.28rem); line-height: 1.55; color: var(--ink-2); max-width: 60ch; }

/* ---------- cover ---------- */
.cover { padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(40px, 6vw, 72px); }
.cover .domain { font-family: var(--serif); font-size: clamp(2.4rem, 10.5vw, 7rem); line-height: 0.95; color: var(--ink); letter-spacing: -0.03em; margin: 0 0 0.35rem; }
.cover .kind { font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 2vw, 1.5rem); color: var(--muted); margin-bottom: clamp(28px, 5vw, 48px); }
.cover .headline { font-family: var(--serif); font-weight: 500; font-size: clamp(1.7rem, 3.6vw, 2.8rem); line-height: 1.15; color: var(--ink); max-width: 26ch; margin-bottom: 1.4rem; }
.cover .headline span { color: var(--red); }
.cover .standfirst { margin-bottom: clamp(32px, 5vw, 52px); }

.facts { border-top: 1px solid var(--rule-strong); max-width: 46rem; }
.facts dl { display: grid; grid-template-columns: 10.5rem 1fr; margin: 0; }
.facts dt, .facts dd { margin: 0; padding: 0.62rem 0; border-bottom: 1px solid var(--rule); font-size: 0.92rem; }
.facts dt { color: var(--muted); }
.facts dd { color: var(--ink); }
@media (max-width: 560px) {
  .facts dl { grid-template-columns: 1fr; }
  .facts dt { padding-bottom: 0; border-bottom: 0; }
}

/* ---------- scorecard ---------- */
.table-wrap { overflow-x: auto; }
table.score { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.score th, table.score td { text-align: left; padding: 0.7rem 0.9rem 0.7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.score th { font-weight: 500; color: var(--muted); font-size: 0.82rem; border-bottom-color: var(--rule-strong); }
table.score td:first-child { color: var(--ink); font-weight: 500; white-space: nowrap; }
.verdict { font-family: var(--serif); font-style: italic; }
.verdict.strong { color: var(--ink); }
.verdict.good { color: var(--ink-2); }
.verdict.weak { color: var(--red); }
@media (max-width: 700px) {
  table.score thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.score tr { display: grid; gap: 0.1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
  table.score td { border: 0; padding: 0; }
}

.note { margin-top: 1.6rem; font-size: 0.86rem; color: var(--muted); max-width: 60ch; }
.note .tag { color: var(--red); font-style: italic; font-family: var(--serif); }

/* ---------- findings ---------- */
.finding { position: relative; padding-block: clamp(34px, 5vw, 56px); border-top: 1px solid var(--rule); }
.finding:first-of-type { border-top: 0; padding-top: 0; }
.finding-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.finding-head h3 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); max-width: 34ch; }
.sev { flex: none; font-family: var(--sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; color: var(--red); border: 1.5px solid var(--red); padding: 2px 7px 1px; }
.sev.p1 { color: var(--ink); border-color: var(--ink); }
.sev.p2 { color: var(--muted); border-color: var(--rule-strong); }
.finding .lead { font-size: 1.04rem; max-width: 66ch; }

blockquote.evidence {
  margin: 1.3rem 0;
  padding: 0.9rem 0 0.9rem 1.2rem;
  border-left: 3px solid var(--red);
  background: color-mix(in srgb, var(--red-soft) 55%, transparent);
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--ink);
  max-width: 62ch;
}
blockquote.evidence p { margin: 0 0 0.5rem; }
blockquote.evidence p:last-child { margin-bottom: 0; }
blockquote.evidence cite { display: block; font-family: var(--sans); font-style: normal; font-size: 0.8rem; color: var(--muted); }

.finding dl { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.55rem 1.4rem; margin: 1.2rem 0 0; max-width: 66ch; }
.finding dt { color: var(--muted); font-size: 0.86rem; padding-top: 0.12rem; }
.finding dd { margin: 0; color: var(--ink-2); }
@media (max-width: 620px) {
  .finding dl { grid-template-columns: 1fr; gap: 0.15rem; }
  .finding dt { margin-top: 0.5rem; }
}

.mnote { display: none; }
@media (min-width: 1700px) {
  .mnote {
    display: block; position: absolute; top: 2.2rem; left: calc(100% + 2.6rem); width: 15rem;
    font-family: var(--serif); font-style: italic; font-size: 0.95rem; line-height: 1.5; color: var(--red);
  }
  .mnote::before { content: ""; display: block; width: 1.6rem; height: 2px; background: var(--red); margin-bottom: 0.55rem; }
}
@media (min-width: 1280px) and (max-width: 1699px) {
  .mnote { display: block; margin-top: 1.1rem; font-family: var(--serif); font-style: italic; font-size: 0.95rem; line-height: 1.5; color: var(--red); max-width: 60ch; }
  .mnote::before { content: ""; display: block; width: 1.6rem; height: 2px; background: var(--red); margin-bottom: 0.55rem; }
}

/* ---------- secondary findings ---------- */
.groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(24px, 4vw, 52px); }
@media (max-width: 820px) { .groups { grid-template-columns: 1fr; } }
.group h3 { font-family: var(--sans); font-size: 0.95rem; font-weight: 600; color: var(--ink); margin-bottom: 0.6rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--rule-strong); }
.group ul { list-style: none; margin: 0; padding: 0; }
.group li { padding: 0.55rem 0; border-bottom: 1px solid var(--rule); font-size: 0.93rem; }
.group li:last-child { border-bottom: 0; }
.group li b { color: var(--ink); font-weight: 600; }
.group li .tag { color: var(--red); font-size: 0.78rem; margin-left: 0.35rem; }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 36px); }
@media (max-width: 780px) { .gallery { grid-template-columns: 1fr; } }
figure.shot { margin: 0; }
figure.shot img { border: 1px solid var(--rule-strong); background: var(--paper-2); width: 100%; }
figure.shot.mobile img { max-width: 300px; }
figure.shot figcaption { font-size: 0.86rem; color: var(--muted); margin-top: 0.6rem; }
figure.shot figcaption b { color: var(--ink); font-weight: 500; }

/* ---------- plan ---------- */
.plan-block { margin-bottom: clamp(32px, 5vw, 56px); }
.plan-block:last-child { margin-bottom: 0; }
.plan-block h3 { font-size: 1.45rem; margin-bottom: 0.35rem; }
.plan-block .when { font-size: 0.88rem; color: var(--muted); margin-bottom: 1rem; }
.table-wrap.plan { border-top: 1px solid var(--rule-strong); }
table.plan { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.plan th, table.plan td { text-align: left; padding: 0.66rem 0.9rem 0.66rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.plan th { font-weight: 500; color: var(--muted); font-size: 0.82rem; }
table.plan td.num { width: 2.2rem; color: var(--muted); }
table.plan td.effort { white-space: nowrap; color: var(--ink); }

/* ---------- keep / method ---------- */
ul.keeps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 2.4rem; }
@media (max-width: 820px) { ul.keeps { grid-template-columns: 1fr; } }
ul.keeps li { padding: 0.6rem 0; border-bottom: 1px solid var(--rule); font-size: 0.95rem; }
ul.keeps li b { color: var(--ink); font-weight: 600; }

.method { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); }
@media (max-width: 820px) { .method { grid-template-columns: 1fr; } }
.method p { font-size: 0.95rem; }
.method h3 { font-family: var(--sans); font-size: 0.95rem; font-weight: 600; margin-bottom: 0.6rem; }
.method ul { padding-left: 1.1rem; font-size: 0.93rem; }
.method li { margin-bottom: 0.4rem; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--rule-strong); padding-block: 2.2rem 3.2rem; }
footer .inner { display: flex; flex-wrap: wrap; gap: 1rem 2.4rem; align-items: baseline; justify-content: space-between; font-size: 0.88rem; color: var(--muted); }
footer .sig { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
footer a { color: var(--ink-2); }

/* ---------- print ---------- */
@media print {
  .chrome, .progress, .lang { display: none; }
  main { padding-top: 0; }
  body { font-size: 11pt; background: #fff; color: #000; }
  section { padding-block: 18pt; break-inside: auto; }
  .finding, figure.shot, .plan-block { break-inside: avoid; }
  .mnote { display: none; }
  a { color: #000; text-decoration: none; }
}
