/* COCONYTE – legal pages (/impressum/, /datenschutz/) and /404.html: a night masthead and a calm
   paper reading column (~68ch) with a sticky contents list on wide screens. Loaded after base.css
   (font, reset, .caps/.eyebrow, .ico); the footer is footer.css. No scripts. */

/* --muted-l is the start page's too: 5.5:1 on --paper, 5:1 on #e9eaea (WCAG AA) */
:root {
  --paper: #f5f5f3; --sand: #dcd3c7; --sand-light: #ece4da; --dark: #0c0d10; --ink: #141518;
  --muted-l: #5f636a; --muted-d: #9097a1; --line-l: rgba(20, 21, 24, .12); --line-d: rgba(255, 255, 255, .09);
}
body { background: var(--paper); color: var(--ink); }
.wrap { width: min(1240px, 100% - 64px); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: calc(100% - 32px); } }

.skip { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 10px 16px; background: #fff; color: var(--ink); font-size: 14px; transition: top .2s; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------- masthead: the night half of the hero, a § watermark, the AM/PM split as a rule ---------- */
.mast { position: relative; overflow: hidden; color: #f0f1f3;
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(91, 142, 230, .24), transparent 60%),
    radial-gradient(55% 90% at 0% 110%, rgba(220, 211, 199, .12), transparent 70%),
    var(--dark); }
.mast::after { content: "§"; position: absolute; right: -.06em; bottom: -.32em; font-size: clamp(260px, 42vw, 620px); font-weight: 300; line-height: 1; color: rgba(255, 255, 255, .035); pointer-events: none; user-select: none; }
.mast__rule { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--sand) 0 50%, var(--blue) 50% 100%); }

.top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; height: 72px; }
.top__word { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; letter-spacing: .38em; }
.top__word .ico { width: 20px; height: 20px; color: var(--blue); }
.top nav { display: flex; gap: 28px; }
.top nav a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; font-size: 13px; letter-spacing: .12em; color: rgba(240, 241, 243, .82); transition: color .25s; }
.top__word { min-height: 44px; }
@media (max-width: 760px), (hover: none) and (pointer: coarse) { .top nav { gap: 20px; } .top nav a { font-size: 14px; letter-spacing: .08em; } }
@media (max-width: 379px) { .top__word { letter-spacing: .24em; gap: 8px; } .top nav { gap: 14px; } .top nav a { letter-spacing: .03em; } }
.top a:hover { color: #fff; }

.mast__body { position: relative; z-index: 1; padding: clamp(56px, 10vw, 128px) 0 clamp(48px, 7vw, 88px); }
.mast .eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--blue); margin-bottom: 22px; }
.mast .eyebrow .ico { width: 16px; height: 16px; }
.mast h1 { font-size: clamp(44px, 8.4vw, 112px); font-weight: 300; line-height: 1; letter-spacing: -.01em; overflow-wrap: anywhere; hyphens: auto; }
.mast__lead { max-width: 46ch; margin-top: 22px; font-size: clamp(16px, 1.6vw, 19px); color: rgba(240, 241, 243, .72); }
.mast__stand { margin-top: 28px; color: var(--muted-d); }
@media (prefers-reduced-motion: no-preference) {
  .mast__body > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .mast__body > :nth-child(2) { animation-delay: .08s; }
  .mast__body > :nth-child(3) { animation-delay: .16s; }
  .mast__body > :nth-child(4) { animation-delay: .24s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- reading area ---------- */
.page { padding: clamp(40px, 7vw, 104px) 0 clamp(72px, 11vw, 144px); }
.page__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
@media (min-width: 1000px) {
  .page__grid { grid-template-columns: 220px minmax(0, 1fr); gap: clamp(56px, 7vw, 120px); }
  .toc { position: sticky; top: 40px; align-self: start; max-height: calc(100vh - 80px); overflow: auto; }
}

.toc .eyebrow { color: var(--muted-l); margin-bottom: 16px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-l); }
.toc a { display: grid; grid-template-columns: 32px 1fr; align-content: center; min-height: 44px; padding: 6px 0 6px 18px; margin-left: -1px; border-left: 1px solid transparent; font-size: 15px; line-height: 1.45; color: var(--muted-l); transition: color .2s, border-color .2s; }
.toc a span { font-size: 13px; letter-spacing: .04em; color: var(--blue-ink); font-variant-numeric: tabular-nums; padding-top: 2px; }
.toc a:hover { color: var(--ink); border-left-color: var(--blue); }
@media (max-width: 999px) {
  .toc { padding: 20px 22px 14px; background: #fff; border: 1px solid var(--line-l); }
  .toc ol { border-left: 0; columns: 2 220px; column-gap: 24px; }
  .toc li { break-inside: avoid; }
  .toc a { padding-left: 0; border-left: 0; margin-left: 0; }
}

/* the text: Jost 300 at 17 px, 1.7 leading, ~68 characters per line */
.doc { max-width: 68ch; font-size: 17px; line-height: 1.72; hyphens: auto; overflow-wrap: break-word; }
.doc p + p, .doc p + ul, .doc ul + p, .doc p + address, .doc address + p, .doc dl + p, .doc p + dl { margin-top: 1.05em; }
.doc strong { font-weight: 500; }
.doc a { color: var(--blue-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s; }
.doc a:hover { color: var(--ink); }
.doc .lead { font-size: clamp(18px, 1.8vw, 20px); line-height: 1.6; }

.doc section { margin-top: clamp(48px, 6vw, 72px); scroll-margin-top: 32px; }
.doc h3[id] { scroll-margin-top: 32px; }
.doc > section:first-child, .doc > .lead + section, .doc > .summary + section { margin-top: clamp(40px, 5vw, 56px); }
.doc h2 { font-size: clamp(23px, 2.5vw, 30px); font-weight: 300; line-height: 1.22; margin-bottom: 20px; }
.doc h2::before { content: ""; display: block; width: 28px; height: 2px; margin-bottom: 18px; background: var(--blue); }
.doc h3 { font-size: 19px; font-weight: 400; line-height: 1.35; margin: 40px 0 12px; }

.doc ul { list-style: none; margin: 0; padding: 0; }
.doc li { position: relative; padding-left: 28px; }
.doc li + li { margin-top: 10px; }
.doc li::before { content: ""; position: absolute; left: 2px; top: .86em; width: 12px; height: 1px; background: var(--blue); }

.doc address { font-style: normal; padding: 18px 22px; border-left: 2px solid var(--blue); background: rgba(91, 142, 230, .07); }
.doc address strong { font-weight: 500; }

.doc dl { margin: 18px 0 0; border-top: 1px solid var(--line-l); }
.doc dt { padding-top: 14px; font-weight: 400; overflow-wrap: anywhere; }
.doc dd { margin: 2px 0 0; padding-bottom: 14px; border-bottom: 1px solid var(--line-l); color: #3a3d43; }
@media (min-width: 700px) {
  .doc dl { display: grid; grid-template-columns: minmax(150px, 34%) minmax(0, 1fr); column-gap: 28px; }
  .doc dt, .doc dd { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line-l); }
}

/* morning note (the short version) and night note (the right to object): the hero's two halves */
.doc .summary { margin-top: 28px; padding: 22px 26px; background: var(--sand-light); }
.doc .callout { margin-top: 1.4em; padding: 24px 26px; background: var(--dark); color: #e6e8eb; }
.doc .callout strong { color: #fff; font-weight: 400; }

.doc .stand { margin-top: clamp(48px, 6vw, 72px); padding-top: 20px; border-top: 1px solid var(--line-l); font-size: 13px; font-weight: 400; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-l); }

@media (max-width: 760px), (hover: none) and (pointer: coarse) { .doc .stand { font-size: 14px; letter-spacing: .1em; } .toc a { font-size: 16px; } .toc a span { font-size: 14px; padding-top: 1px; } }
@media (max-width: 640px) {
  .doc { font-size: 16px; line-height: 1.68; }
  .doc address, .doc .summary, .doc .callout { padding: 16px 18px; }
}

/* ---------- error page (/404.html, served by Caddy for any missing path): the masthead alone,
   its watermark the status code instead of the § ---------- */
.mast[data-mark]::after { content: attr(data-mark); content: attr(data-mark) / ""; right: -.04em; bottom: -.24em; font-size: clamp(170px, 30vw, 440px); letter-spacing: -.05em; }
.mast--error .mast__body { min-height: min(68vh, 720px); display: flex; flex-direction: column; justify-content: center; }
.mast__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 44px; }
.mast__actions .btn { color: #f0f1f3; }
.mast__actions .btn .ico { color: var(--blue); transition: transform .25s, color .25s; }
.mast__actions .btn:hover { background: #f0f1f3; border-color: #f0f1f3; color: var(--dark); }
.mast__actions .btn:hover .ico { color: var(--blue-deep); transform: translateX(4px); }
.mast__actions .btn--quiet { border-color: rgba(240, 241, 243, .26); color: rgba(240, 241, 243, .78); }

/* ---------- print: just the text ---------- */
@media print {
  body { background: #fff; }
  .top, .toc, footer, .skip, .mast::after, .mast__rule, .mast__actions { display: none; }
  .mast { background: none; color: #000; }
  .mast__body { padding: 0 0 8mm; }
  .mast .eyebrow, .mast__lead, .mast__stand { color: #000; }
  .mast h1 { font-size: 26pt; }
  .page { padding: 0; }
  .page__grid { display: block; }
  .doc { max-width: none; font-size: 10.5pt; line-height: 1.5; }
  .doc a { color: #000; }
  .doc .summary, .doc .callout, .doc address { background: none; color: #000; border: 1px solid #999; }
  .doc .callout strong { color: #000; }
  .doc section { break-inside: auto; }
  .doc h2, .doc h3 { break-after: avoid; }
}
