/* ============================================================
   anfuehrungszeichen.de — Stylesheet
   Aesthetic: Editorial / Druckerei — warm paper, ink black,
   vermillion red accents, classic serif hierarchy.
   ============================================================ */

/* Local fonts - no external requests */

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --ink:       #1c1917;
  --ink-soft:  #44403c;
  --ink-muted: #78716c;
  --paper:     #faf8f5;
  --paper-w:   #f0ebe3;
  --paper-m:   #e4ddd3;
  --rule:      #d6cfc5;
  --red:       #c0392b;
  --red-dk:    #96281b;
  --red-bg:    rgba(192,57,43,.07);
  --green:     #276749;
  --green-bg:  rgba(39,103,73,.07);
  --blue:      #1a4b8c;
  --f-d: Georgia, 'Liberation Serif', 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  --f-b: 'Inter', system-ui, -apple-system, sans-serif;
  --f-m: 'Liberation Mono', 'Courier New', Consolas, Monaco, monospace;
  --max: 1080px;
  --r:   5px;
  --rl:  10px;
  --sh:  0 2px 12px rgba(28,25,23,.10);
  --shl: 0 8px 32px rgba(28,25,23,.14);
}

/* ── RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--f-b);
  font-size: 1.0625rem;
  line-height: 1.75;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ── SKIP LINK ───────────────────────────────────────────────── */
.skip {
  position: absolute; top: -9999px; left: 1rem;
  background: var(--red); color: #fff;
  padding: .4rem 1rem; border-radius: var(--r);
  font-size: .875rem; font-weight: 600;
  text-decoration: none; z-index: 9999;
  transition: top .15s;
}
.skip:focus { top: .75rem; }

/* ── STICKY NAV ──────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 80;
  background: var(--ink);
  border-bottom: 3px solid var(--red);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 0 1.5rem;
  display: flex; align-items: center;
  justify-content: space-between;
  height: 60px; gap: 1rem;
}
.nav-logo {
  font-family: var(--f-d); font-size: 1.2rem; font-weight: 700;
  color: var(--paper); text-decoration: none;
  white-space: nowrap; flex-shrink: 0;
}
.nav-logo .dot { color: var(--red); }
.nav-links { display: flex; gap: .15rem; flex-wrap: wrap; }
.nav-links a {
  font-family: var(--f-b); font-size: .8rem;
  color: rgba(250,248,245,.65);
  text-decoration: none; padding: .35rem .65rem;
  border-radius: var(--r); transition: all .15s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--paper); background: rgba(255,255,255,.1); }
.nav-links a.active { color: var(--paper); font-weight: 600; }
.nav-ham {
  display: none; background: none;
  border: 1px solid rgba(255,255,255,.3); color: var(--paper);
  padding: .35rem .5rem; border-radius: var(--r);
  cursor: pointer; font-size: 1rem; line-height: 1;
}

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  background: var(--ink); color: var(--paper);
  padding: 4.5rem 1.5rem 4rem;
  text-align: center; position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; font-family: var(--f-d);
  font-size: 30rem; font-weight: 900;
  color: rgba(255,255,255,.025);
  top: -5rem; left: 50%; transform: translateX(-50%);
  pointer-events: none; user-select: none; line-height: 1;
}
.hero-inner { max-width: 680px; margin: 0 auto; position: relative; }
.hero-kicker {
  display: inline-block; font-family: var(--f-m);
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: #fff; background: rgba(192,57,43,.12);
  padding: .3rem .85rem; border-radius: 999px;
  border: 1px solid rgba(192,57,43,.3); margin-bottom: 1.4rem;
}
.hero h1 {
  font-family: var(--f-d);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 900; line-height: 1.1; letter-spacing: -.02em;
  margin-bottom: 1.1rem;
}
.hero h1 em { font-style: italic; color: rgba(250,248,245,.65); }
.hero-sub {
  font-size: 1.05rem; color: rgba(250,248,245,.65);
  max-width: 540px; margin: 0 auto 2.25rem; line-height: 1.65;
}
.hero-ctas { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--f-b); font-size: .875rem; font-weight: 600;
  padding: .6rem 1.4rem; border-radius: var(--r);
  text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: all .18s; line-height: 1;
}
.btn-red  { background: var(--red);  color: #fff;        border-color: var(--red); }
.btn-red:hover { background: var(--red-dk); border-color: var(--red-dk); }
.btn-ghost { background: transparent; color: var(--paper); border-color: rgba(250,248,245,.3); }
.btn-ghost:hover { border-color: var(--paper); background: rgba(255,255,255,.08); }

/* ── STAT BAR ────────────────────────────────────────────────── */
.stat-bar { background: var(--paper-w); border-bottom: 1px solid var(--rule); padding: 1.1rem 1.5rem; }
.stat-bar-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num {
  font-family: var(--f-d); font-size: 1.6rem; font-weight: 900;
  color: var(--red); line-height: 1; display: block;
}
.stat-lbl { font-size: .7rem; color: var(--ink-muted); font-family: var(--f-m); letter-spacing: .07em; text-transform: uppercase; }

/* ── PAGE LAYOUT ─────────────────────────────────────────────── */
.page { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem 5rem; }
.with-sidebar {
  display: grid; grid-template-columns: 1fr 220px;
  gap: 3rem; align-items: start;
}

/* ── SECTION HEADERS ─────────────────────────────────────────── */
.sec-head {
  display: flex; align-items: baseline; gap: 1rem;
  padding: 3rem 0 1.25rem;
  border-top: 2px solid var(--ink);
  margin-top: 3rem;
}
.sec-head:first-child { margin-top: 2.5rem; }
.sec-num {
  font-family: var(--f-m); font-size: .75rem;
  color: var(--red); letter-spacing: .08em; font-weight: 600;
  white-space: nowrap; flex-shrink: 0;
}
.sec-head h2 {
  font-family: var(--f-d); font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -.01em; line-height: 1.2;
}

/* ── PROSE ───────────────────────────────────────────────────── */
.prose p { margin-bottom: 1.15rem; max-width: 72ch; }
.prose p:last-child { margin-bottom: 0; }
.prose h3 { font-family: var(--f-d); font-size: 1.15rem; font-weight: 700; margin: 1.75rem 0 .55rem; }
.prose h4 { font-family: var(--f-d); font-size: 1rem; font-weight: 700; font-style: italic; margin: 1.25rem 0 .4rem; color: var(--ink-soft); }
.prose ul, .prose ol { margin: .5rem 0 1.1rem 1.6rem; }
.prose li { margin-bottom: .3rem; }
.prose strong { font-weight: 600; }
.prose em { font-style: italic; }
.prose a { color: var(--blue); text-underline-offset: 3px; }
.prose a:hover { color: var(--red); }
.lead { font-size: 1.15rem; color: var(--ink-soft); line-height: 1.7; margin-bottom: 1.5rem; max-width: 72ch; }

.prose blockquote {
  border-left: 3px solid var(--rule);
  background: var(--paper-w);
  padding: .8rem 1.25rem; margin: 1rem 0;
  border-radius: 0 var(--r) var(--r) 0;
}
.prose blockquote p { margin: 0; font-style: italic; color: var(--ink-soft); }

/* ── CALLOUT ─────────────────────────────────────────────────── */
.callout {
  background: var(--paper-w);
  border-left: 3px solid var(--red);
  border-radius: 0 var(--rl) var(--rl) 0;
  padding: 1rem 1.4rem; margin: 1.25rem 0;
  font-size: .9375rem; max-width: 72ch;
}
.callout-title { font-family: var(--f-d); font-weight: 700; font-size: .88rem; color: var(--red); margin-bottom: .3rem; }
.callout p { max-width: none; margin: 0; }
.callout.green { border-left-color: var(--green); }
.callout.green .callout-title { color: var(--green); }
.callout.blue { border-left-color: var(--blue); }
.callout.blue .callout-title { color: var(--blue); }

/* ── CODE ────────────────────────────────────────────────────── */
code {
  font-family: var(--f-m); font-size: .84em;
  background: var(--paper-w); border: 1px solid var(--rule);
  border-radius: var(--r); padding: .1em .38em; color: var(--red);
}
.code-block {
  background: #1c1917; color: #c9c5c0;
  font-family: var(--f-m); font-size: .82rem; line-height: 1.75;
  padding: 1.25rem 1.5rem; border-radius: var(--rl);
  overflow-x: auto; margin: 1.25rem 0; max-width: 72ch;
}
.code-block .k { color: #7ec8e3; }
.code-block .v { color: #a5d6a7; }
.code-block .c { color: #6b6860; font-style: italic; }

/* ── TABLES ──────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; margin: 1.25rem 0; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th {
  background: var(--ink); color: var(--paper);
  font-family: var(--f-d); font-weight: 700;
  padding: .6rem 1rem; text-align: left;
}
td { padding: .55rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: middle; }
tr:nth-child(even) td { background: var(--paper-w); }
.td-char { font-family: var(--f-d); font-size: 1.5rem; font-weight: 700; white-space: nowrap; }
.td-mono { font-family: var(--f-m); font-size: .78em; color: var(--red); }

/* ── KBD ─────────────────────────────────────────────────────── */
kbd {
  display: inline-block; font-family: var(--f-m); font-size: .78em;
  background: var(--ink); color: var(--paper);
  padding: .15em .5em; border-radius: 4px;
  border-bottom: 2px solid rgba(0,0,0,.35); margin: 0 .1em;
}

/* ══ COPY TOOL ════════════════════════════════════════════════ */
.tool-area {
  background: var(--paper-w); border: 1px solid var(--rule);
  border-radius: var(--rl); padding: 1.5rem; margin: 1.5rem 0;
}
.filter-bar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.25rem; }
.filter-search {
  flex: 1; min-width: 200px;
  background: #fff; border: 1.5px solid var(--rule);
  border-radius: var(--r); color: var(--ink);
  font-family: var(--f-b); font-size: .9rem;
  padding: .55rem .9rem; outline: none; transition: border-color .18s;
}
.filter-search::placeholder { color: var(--ink-muted); }
.filter-search:focus { border-color: var(--red); }
.filter-tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.ftag {
  background: #fff; border: 1.5px solid var(--rule);
  color: var(--ink-muted);
  font-family: var(--f-b); font-size: .78rem; font-weight: 600;
  padding: .32rem .8rem; border-radius: 999px;
  cursor: pointer; transition: all .15s; user-select: none;
}
.ftag:hover { border-color: var(--red); color: var(--red); }
.ftag.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.grp-head { display: flex; align-items: baseline; gap: .75rem; margin: 1.75rem 0 .65rem; }
.grp-title { font-family: var(--f-d); font-size: 1rem; font-weight: 700; }
.grp-rule { flex: 1; height: 1px; background: var(--rule); }
.grp-count { font-family: var(--f-m); font-size: .68rem; color: var(--ink-muted); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: .65rem;
}

/* Copy card */
.ccard {
  background: #fff; border: 1.5px solid var(--rule);
  border-radius: var(--rl);
  padding: .95rem .85rem .8rem;
  cursor: pointer; transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
  display: flex; flex-direction: column; gap: .25rem;
  position: relative; overflow: hidden;
  text-align: left; font-family: inherit; color: inherit;
}
.ccard:hover { border-color: var(--red); background: var(--red-bg); transform: translateY(-2px); box-shadow: var(--sh); }
.ccard:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.ccard:active { transform: translateY(0); }
.ccard.copied { border-color: var(--green) !important; background: var(--green-bg) !important; transform: translateY(0) !important; }
.ccard.copied .cchar { color: var(--green); }

.cbadge {
  position: absolute; top: .4rem; right: .5rem;
  font-family: var(--f-m); font-size: .58rem; font-weight: 600;
  background: var(--green); color: #fff;
  padding: .13rem .38rem; border-radius: 999px;
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.ccard.copied .cbadge { opacity: 1; }

.cchar {
  font-family: var(--f-d); font-size: 2rem; font-weight: 700;
  line-height: 1; min-height: 2.1rem; color: var(--ink);
  display: flex; align-items: center; transition: color .18s;
}
.clabel { font-size: .74rem; font-weight: 600; color: var(--ink-soft); line-height: 1.3; }
.csub   { font-size: .68rem; color: var(--ink-muted); line-height: 1.25; }
.ccode  { font-family: var(--f-m); font-size: .63rem; color: var(--red); margin-top: .1rem; }

/* Toast */
#toast {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--ink); color: var(--paper);
  padding: .5rem 1.25rem; border-radius: 999px;
  font-family: var(--f-b); font-size: .875rem; font-weight: 500;
  box-shadow: var(--shl); z-index: 999;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  white-space: nowrap; pointer-events: none;
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* ══ LANGUAGE TABLES ══════════════════════════════════════════ */
.region-head {
  background: var(--ink); color: var(--paper);
  padding: .65rem 1.1rem; font-family: var(--f-d);
  font-size: 1rem; font-weight: 700;
  border-radius: var(--rl) var(--rl) 0 0;
  display: flex; align-items: center; gap: .6rem;
  margin-top: 1.75rem;
}
.flag { font-size: 1.2rem; }
.copy-inline {
  display: inline-flex; align-items: center; gap: .25rem;
  background: none; border: none; cursor: pointer;
  font-family: var(--f-d); font-size: 1.3rem; font-weight: 700;
  padding: .2rem .45rem; border-radius: var(--r);
  transition: background .15s; color: var(--ink);
}
.copy-inline:hover { background: var(--red-bg); }
.copy-inline:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.ci { font-size: .65rem; color: var(--red); opacity: 0; transition: opacity .15s; }
.copy-inline:hover .ci { opacity: 1; }

/* ══ HTML ENTITY TABLE ════════════════════════════════════════ */
.ent {
  display: inline-block;
  font-family: var(--f-m); font-size: .8em;
  background: var(--red-bg); border: 1px solid rgba(192,57,43,.2);
  border-radius: var(--r); padding: .1em .4em;
  color: var(--red); cursor: pointer; transition: background .15s;
}
.ent:hover { background: rgba(192,57,43,.18); }
.ent:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ══ PLATFORM TABS ════════════════════════════════════════════ */
.ptabs { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0; }
.ptab {
  background: var(--paper-w); border: 1.5px solid var(--rule);
  color: var(--ink-muted);
  font-family: var(--f-b); font-size: .85rem; font-weight: 600;
  padding: .4rem 1rem; border-radius: 999px;
  cursor: pointer; transition: all .15s;
}
.ptab:hover { border-color: var(--red); color: var(--red); }
.ptab.on { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ppanel { display: none; }
.ppanel.on { display: block; }

.sc-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem 0; border-bottom: 1px solid var(--rule);
  gap: 1rem; flex-wrap: wrap;
}
.sc-row:last-child { border-bottom: none; }
.sc-char { font-family: var(--f-d); font-size: 1.4rem; font-weight: 700; min-width: 2rem; }
.sc-name { flex: 1; font-size: .85rem; color: var(--ink-soft); }
.sc-keys { font-size: .84rem; white-space: nowrap; }

/* ══ STICKY TOC ═══════════════════════════════════════════════ */
.sticky-toc {
  position: sticky; top: 76px;
  background: var(--paper-w); border: 1px solid var(--rule);
  border-radius: var(--rl); padding: 1.1rem 1.1rem 1.4rem;
}
.toc-title {
  font-family: var(--f-d); font-size: .85rem; font-weight: 700;
  margin-bottom: .75rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--rule);
}
.toc-list { list-style: none; }
.toc-list li { border-bottom: 1px solid var(--paper-m); }
.toc-list li:last-child { border-bottom: none; }
.toc-list a {
  display: block; padding: .4rem 0;
  font-size: .8rem; color: var(--blue); text-decoration: none;
  transition: color .15s;
}
.toc-list a:hover { color: var(--red); }
.toc-list a.cur { font-weight: 600; color: var(--red); }

/* ══ MODAL ════════════════════════════════════════════════════ */
.modal-bg {
  display: none; position: fixed; inset: 0;
  background: rgba(28,25,23,.75); z-index: 500;
  padding: 2rem 1rem; overflow-y: auto;
}
.modal-bg.open { display: flex; align-items: flex-start; justify-content: center; }
.modal {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--rl); max-width: 620px; width: 100%;
  padding: 2rem; margin: auto; position: relative;
  box-shadow: var(--shl);
}
.modal h2 { font-family: var(--f-d); font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--rule); }
.modal h3 { font-family: var(--f-d); font-size: .95rem; font-weight: 700; color: var(--red); margin: 1.1rem 0 .35rem; }
.modal p, .modal address { font-size: .875rem; color: var(--ink-soft); line-height: 1.65; font-style: normal; }
.modal a { color: var(--blue); }
.mcls {
  position: absolute; top: .85rem; right: .85rem;
  background: var(--paper-w); border: 1px solid var(--rule);
  color: var(--ink-muted); width: 1.9rem; height: 1.9rem;
  border-radius: 50%; cursor: pointer; font-size: 1rem;
  transition: all .15s; display: flex; align-items: center; justify-content: center;
  font-family: inherit;
}
.mcls:hover { background: var(--ink); color: var(--paper); }

/* ══ FOOTER ═══════════════════════════════════════════════════ */
.site-footer { background: var(--ink); color: rgba(250,248,245,.55); padding: 2.5rem 1.5rem; }
.footer-grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem;
}
.footer-grid h4 { font-family: var(--f-d); font-size: .95rem; font-weight: 700; color: var(--paper); margin-bottom: .75rem; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: .4rem; }
.footer-grid a { font-size: .82rem; color: rgba(250,248,245,.55); text-decoration: none; transition: color .15s; }
.footer-grid a:hover { color: var(--paper); }
.footer-bottom {
  max-width: var(--max); margin: 1.5rem auto 0;
  padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: .6rem; font-size: .78rem;
}
.footer-bottom a { color: rgba(250,248,245,.4); text-decoration: none; }
.footer-bottom a:hover { color: var(--paper); }

/* ══ RESPONSIVE ═══════════════════════════════════════════════ */
@media (max-width: 860px) {
  .with-sidebar { grid-template-columns: 1fr; }
  .sticky-toc { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 60px; left: 0; right: 0;
    background: var(--ink); padding: .5rem;
    border-bottom: 1px solid rgba(255,255,255,.1); z-index: 79;
  }
  .nav-ham { display: flex; }
  .hero h1 { font-size: 2.2rem; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .stat-bar-inner { gap: 1.5rem; }
}

/* ══ PRINT ════════════════════════════════════════════════════ */
@media print {
  .site-nav, .sticky-toc, .filter-bar, .cbadge, .site-footer, .hero-ctas { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ══ REDUCED MOTION ═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* == LEGAL PAGE ============================================== */
.legal-wrap { max-width: 720px; margin: 0 auto; padding: 3rem 1.5rem 5rem; }
.legal-wrap h1 { font-family: var(--f-d); font-size: clamp(1.8rem,4vw,2.6rem); font-weight: 900; letter-spacing: -.02em; line-height: 1.1; margin-bottom: .4rem; }
.legal-sub { font-size: .875rem; color: var(--ink-muted); padding-bottom: 1.75rem; margin-bottom: .5rem; border-bottom: 2px solid var(--ink); }
.legal-block { margin-top: 2.75rem; padding-top: 1.75rem; border-top: 1px solid var(--rule); }
.legal-block h2 { font-family: var(--f-d); font-size: 1.45rem; font-weight: 700; margin-bottom: 1rem; display: flex; align-items: center; gap: .6rem; }
.legal-block h2 .lnum { font-family: var(--f-m); font-size: .7rem; color: var(--red); font-weight: 600; letter-spacing: .08em; }
.legal-block h3 { font-family: var(--f-d); font-size: .95rem; font-weight: 700; color: var(--red); margin: 1.25rem 0 .35rem; }
.legal-block p, .legal-block address { font-style: normal; line-height: 1.7; color: var(--ink-soft); max-width: 64ch; margin-bottom: .85rem; }
.legal-block a { color: var(--blue); text-underline-offset: 3px; }
.legal-back { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; font-weight: 600; color: var(--ink-muted); text-decoration: none; margin-bottom: 2rem; padding: .4rem .8rem; border-radius: var(--r); border: 1px solid var(--rule); transition: all .15s; background: var(--paper-w); }
.legal-back:hover { color: var(--ink); border-color: var(--ink); }
