/*
  Katun pages under /katun/, on top of /assets/komovi.css. No external requests.
  Paper by day, night and hearthlight in dark mode (prefers-color-scheme), like the game.
  Contrast (WCAG): every text colour is >= 4.5:1 on the background it sits on.
*/

/* legal + support pages (/katun/datenschutz, /katun/privacy, /katun/support)
   The palette is the same as .katun in landing.css; keep the two in step (or merge them here). */
.katun-doc {
  --bg: #F6F4EF;          /* paper */
  --surface: #FFFFFF;
  --surface-2: #ECE7DC;
  --ink: #16140F;
  --ink-2: #3A362D;
  --muted: #5E584C;
  --line: #DAD3C3;
  --accent: #A8380A;      /* rust */
  --on-accent: #FFFFFF;
  --accent-soft: #F6DECF;
  --accent-ink: #8E2F08;
  --bar-bg: rgba(246, 244, 239, .82);
}
@media (prefers-color-scheme: dark) {
  .katun-doc {
    --bg: #0E1426;        /* night */
    --surface: #151C33;
    --surface-2: #1B2340;
    --ink: #F4E9C8;       /* hearthlight */
    --ink-2: #DCD2B6;
    --muted: #AAB1CC;
    --line: #2A3456;
    --accent: #FFB45E;    /* amber */
    --on-accent: #1A1206;
    --accent-soft: #3A2A16;
    --accent-ink: #FFC98A;
    --bar-bg: rgba(14, 20, 38, .8);
  }
}
.katun-doc .app-tag { display: flex; align-items: center; gap: 12px; margin: 32px 0 0; font-weight: 700; color: var(--ink-2); }
.katun-doc .app-tag img { width: 44px; height: 44px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.katun-doc .legal h1 { margin-top: 12px; }
.katun-doc .legal h2 { scroll-margin-top: 84px; }
.katun-doc .legal h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; margin: 24px 0 6px; }
.katun-doc .legal ul, .katun-doc .legal ol { margin: 8px 0; padding-left: 1.3em; color: var(--ink-2); }
.katun-doc .legal li { margin: 5px 0; }
.katun-doc .legal li::marker { color: var(--accent); }
.katun-doc .legal strong, .katun-doc .legal b { color: var(--ink); }
.katun-doc .meta { color: var(--muted); font-size: .95rem; }
.katun-doc .box p:first-child { margin-top: 0; }
.katun-doc .table-scroll { overflow-x: auto; margin: 12px 0; }
.katun-doc table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .95rem; }
.katun-doc th, .katun-doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.katun-doc th { color: var(--ink); background: var(--surface-2); }
.katun-doc details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin: 0 0 10px; }
.katun-doc summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.katun-doc summary::marker { color: var(--accent); }
.katun-doc details[open] summary { margin-bottom: 4px; }
.katun-doc details:target { border-color: var(--accent); }

/* The Komovi strip carries the studio; the header carries Katun (frame.css, 30 Oct 2026). */
.brand-app { width: 30px; height: 30px; border-radius: 7px; box-shadow: 0 0 0 1px var(--line); }
@media (max-width: 599px) { .site-nav a.wide { display: none; } }

/* Support: one language at a time (no JS). English when the URL targets #en or anything inside it, else German.
   Browsers without :has() show both parts stacked, which is still complete. */
body:has(#en:target, #en :target) .only-de { display: none; }
body:not(:has(#en:target, #en :target)) .only-en { display: none; }
.katun-doc .langswitch { margin: 6px 0 0; font-weight: 650; }
.katun-doc .topics ul { list-style: none; margin: 8px 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.katun-doc .topics a { display: inline-block; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.katun-doc .topics a:hover { border-color: var(--accent); }
.katun-doc .topics li[hidden], .katun-doc details[hidden] { display: none; }
.katun-doc .qfilter { margin: 0 0 18px; }
.katun-doc .qfilter label { display: block; font-weight: 650; }
.katun-doc .qfilter input { display: block; width: 100%; max-width: 28rem; margin-top: 6px; padding: 11px 14px; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.katun-doc .qnone { color: var(--muted); }
.katun-doc details { scroll-margin-top: 84px; }
