/* kotschmar.net — Startseite, Rechtstexte und Pomodoro-Timer
   Gestaltung nach macOS, Schrift Inter Tight vom eigenen Server (OFL, schrift/OFL.txt),
   heller und dunkler Modus, keine externen Ressourcen. */

@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("schrift/inter-tight.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --separator: rgba(60, 60, 67, .18);
  --accent: #007aff;
  --accent-soft: rgba(0, 122, 255, .08);
  --focus: rgba(0, 122, 255, .5);
  --fill: rgba(118, 118, 128, .12);
  --bar: rgba(255, 255, 255, .72);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .05), 0 0 0 .5px rgba(0, 0, 0, .06);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, .08);
  --radius: 12px;
  --sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1c1e;
    --surface: #2c2c2e;
    --text: #f5f5f7;
    --text-muted: #98989d;
    --separator: rgba(235, 235, 245, .16);
    --accent: #0a84ff;
    --accent-soft: rgba(10, 132, 255, .14);
    --focus: rgba(10, 132, 255, .6);
    --fill: rgba(118, 118, 128, .24);
    --bar: rgba(44, 44, 46, .72);
    --shadow-card: 0 0 0 .5px rgba(255, 255, 255, .08);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 64px; }

/* Angeheftete Kopfleiste schuetzen: Cookie-Banner-Blocker (Browser-Erweiterungen) setzen
   "html, body { overflow: auto !important }". Dann wird body selbst zum Scrollbereich und
   position: sticky haftet nicht mehr. :root ist spezifischer und gewinnt. */
:root, :root > body { overflow: visible !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 16px/1.5 var(--sans);
  letter-spacing: .005em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration-thickness: from-font; text-underline-offset: .15em; }

::selection { background: var(--focus); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-radius: 4px; }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }

main { flex: 1; }

/* ---------- Startseite: Visitenkarte ---------- */

.karte {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 40px 16px;
}

.karte .inner { width: 100%; max-width: 420px; text-align: center; }

.mono {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  border-radius: 50%;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0;
  color: #fff;
  background: linear-gradient(145deg, #3a3a3c, #1d1d1f);
}

@media (prefers-color-scheme: dark) {
  .mono { background: linear-gradient(145deg, #48484a, #2c2c2e); }
}

.karte h1 {
  margin: 0 0 26px;
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 700;
  letter-spacing: -.015em;
}

.kachel {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  text-align: left;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform .15s ease, box-shadow .15s ease;
}

.kachel + .kachel { margin-top: 10px; }

.kachel:hover, .kachel:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card), var(--shadow-hover);
}

.kachel:active { transform: scale(.99); }

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

.kachel svg {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 7px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(180deg, #2b8cff, #0063e1);
  box-shadow: inset 0 .5px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .12);
}

.kachel strong { display: block; font-size: 16px; font-weight: 600; }

.kachel span { display: block; margin-top: 1px; color: var(--text-muted); font-size: 14px; line-height: 1.4; }

.kachel .pfeil { margin-left: auto; color: var(--accent); font-size: 22px; line-height: 1; }

footer.site.mitte .wrap { justify-content: center; }

/* ---------- Rechtstexte ---------- */

/* Werkzeugleiste wie unter macOS: angeheftet, durchscheinend */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: .5px solid var(--separator);
  background: var(--surface);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  header.site {
    background: var(--bar);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }
}

/* Zurueck-Link links, Titel mittig wie in einer macOS-Werkzeugleiste */
header.site .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

header.site h1 { grid-column: 2; margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; text-align: center; }

header.site a { font-size: 14px; text-decoration: none; }

header.site .zurueck {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: -6px;
  padding: 5px 8px 5px 6px;
  font-size: 15px;
  border-radius: 7px;
  white-space: nowrap;
}

header.site .zurueck svg { width: 8px; height: 14px; flex: none; }

header.site .zurueck:hover { background: var(--fill); }

/* Schmal: Titel neben dem Link statt mittig, damit nichts ueberlappt */
@media (max-width: 520px) {
  header.site .wrap { grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; }
  header.site h1 { text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.prose { padding-top: 24px; padding-bottom: 40px; }

.prose h2 { font-size: 19px; font-weight: 650; letter-spacing: -.01em; margin: 32px 0 8px; }

.prose p, .prose ul { margin: 0 0 12px; }

.prose ul { padding-left: 20px; }

.prose code {
  font-family: var(--mono);
  font-size: .92em;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--accent-soft);
}

.notice {
  margin: 0 0 18px;
  padding: 13px 16px;
  border-radius: var(--radius);
  background: var(--accent-soft);
}

table.tbl { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 14px; }

table.tbl th, table.tbl td {
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
  border-bottom: .5px solid var(--separator);
  overflow-wrap: anywhere;
}

table.tbl th { font-size: 12px; font-weight: 600; color: var(--text-muted); }

/* ---------- Fußzeile ---------- */

footer.site {
  padding: 18px 0 24px;
  border-top: .5px solid var(--separator);
  font-size: 13px;
  color: var(--text-muted);
}

footer.site .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; }

footer.site a { color: var(--text-muted); }

footer.site a:hover { color: var(--accent); }

@media print {
  body { background: #fff; color: #000; }
  header.site, footer.site { border: 0; }
  a { color: #000; }
}
