/* Same two faces as the marketing site, same paths, so the browser reuses the
   cached files across both surfaces instead of fetching twice. */
@font-face {
  font-family: "JetBrains Mono";
  src: url("/static/fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/static/fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* susipere.de journal — standalone stylesheet.
   Deliberately does not import the SPA's hashed asset bundle: that filename
   changes on every marketing-site rebuild, which would silently unstyle the
   journal. The design tokens below mirror apps/susipere-web/src/styles.css. */

:root {
  --bg: oklch(0.97 0.006 240);
  --surface: oklch(0.995 0.002 240);
  --surface-muted: oklch(0.93 0.008 240);
  --text: oklch(0.18 0.014 240);
  --text-secondary: oklch(0.42 0.018 240);
  --border: oklch(0.82 0.012 240);
  --brand: oklch(0.46 0.16 142);
  --brand-hover: oklch(0.39 0.15 142);
  /* One font, matching the marketing site. */
  --font-body: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, color-mix(in oklch, var(--text) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--text) 6%, transparent) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); text-decoration: underline; }

.container {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

.mono, .sec-tag, .entry-meta, .entry-open, .crumbs, .seg, .foot-bot, .sec-meta {
  font-family: var(--font-mono);
}

/* ---------------------------------------------------------------- chrome */

.topbar { border-bottom: 1px solid var(--border); background: var(--bg); }

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 12.5px;
}

.crumbs, .seg { display: flex; align-items: center; gap: 10px; }
.muted-dot { color: var(--text-secondary); opacity: 0.6; }

.pulse {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand) 18%, transparent);
}

.navwrap { border-bottom: 1px solid var(--border); background: var(--surface); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.logo { display: flex; align-items: center; gap: 12px; color: var(--text); }
.logo:hover { text-decoration: none; }

.logomark {
  position: relative;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--brand);
  background: color-mix(in oklch, var(--brand) 8%, transparent);
  color: var(--brand);
  font-family: var(--font-mono); font-weight: 700; font-size: 15px;
}
.logomark::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px dashed color-mix(in oklch, var(--brand) 40%, transparent);
  pointer-events: none;
}

.name { font-family: var(--font-mono); font-size: 17px; font-weight: 600; letter-spacing: 0.02em; }
.name span { color: var(--text-secondary); }

.navlinks {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.navlink { font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.navlink:hover { color: var(--text); }
.navlink.active { color: var(--brand); font-weight: 700; }

/* No JavaScript here, so the mobile disclosure is a checkbox plus a label.
   A <details> looked tidier but does not work: browsers hide a closed
   details' contents through the UA shadow tree, so no amount of CSS on the
   child reveals it, and the desktop nav silently vanished. */
/* Matches .theme-toggle in apps/susipere-web/src/styles.css. */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid color-mix(in oklch, var(--brand) 35%, transparent);
  background: color-mix(in oklch, var(--brand) 7%, transparent);
  color: var(--brand);
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.accent-text { color: var(--brand); }

.navtoggle-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.navtoggle { display: none; }
.navtoggle-input:focus-visible + .navtoggle { outline: 3px solid color-mix(in oklch, var(--brand) 40%, transparent); outline-offset: 2px; }
.navtoggle {
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  list-style: none;
}
.navtoggle::-webkit-details-marker { display: none; }
.navtoggle-bars { display: grid; gap: 3px; }
.navtoggle-bars span { display: block; width: 16px; height: 2px; background: var(--brand); }

@media (max-width: 1080px) {
  .nav { flex-wrap: wrap; }
  .navtoggle { display: inline-flex; }
  .navlinks { display: none; order: 3; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 8px; }
  .navtoggle-input:checked ~ .navlinks { display: flex; }
  .navlinks .navlink {
    display: flex;
    align-items: center;
    min-height: 44px;
    border-bottom: 1px solid var(--border);
  }
}

/* ----------------------------------------------------------------- index */

.journal { padding: 48px 0 72px; }

.sec-hd {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.sec-tag { font-size: 12px; letter-spacing: 0.08em; color: var(--brand); }

.sec-h {
  margin: 8px 0 0;
  font-family: var(--font-mono);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.sec-lead { margin: 12px 0 0; max-width: 62ch; color: var(--text-secondary); }
.sec-meta { font-size: 12.5px; color: var(--text-secondary); }

.entries { display: grid; gap: 0; }

.entry { padding: 28px 0; border-bottom: 1px solid var(--border); }

.entry-meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-secondary);
}

.entry-title { margin: 10px 0 0; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.3; letter-spacing: -0.015em; }
.entry-title a { color: var(--text); }
.entry-title a:hover { color: var(--brand); text-decoration: none; }

.entry-desc { margin: 8px 0 0; max-width: 72ch; color: var(--text-secondary); }

.entry-open { display: inline-block; margin-top: 12px; font-size: 13px; }

.empty { padding: 40px 0; color: var(--text-secondary); font-family: var(--font-mono); }

/* ------------------------------------------------------------------ post */

.post { max-width: 74ch; padding-top: 8px; }

.post-title {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.post-lead {
  margin: 14px 0 0;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  font-size: 18px;
  color: var(--text-secondary);
}

.post-body { margin-top: 28px; }
.post-body > :first-child { margin-top: 0; }

.post-body h2, .post-body h3, .post-body h4, .post-body h5 {
  margin: 36px 0 10px;
  font-family: var(--font-mono);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.post-body h2 { font-size: 24px; }
.post-body h3 { font-size: 19px; }
.post-body h4, .post-body h5 { font-size: 16px; }

.post-body p { margin: 0 0 18px; }
.post-body ul, .post-body ol { margin: 0 0 18px; padding-left: 22px; }
.post-body li { margin-bottom: 6px; }

.post-body hr { margin: 32px 0; border: 0; border-top: 1px solid var(--border); }

.post-body blockquote {
  margin: 0 0 18px;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--brand);
  color: var(--text-secondary);
}

.post-body blockquote p:last-child { margin-bottom: 0; }

.post-body code {
  padding: 1px 5px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.post-body pre {
  margin: 0 0 20px;
  padding: 16px 18px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13.5px;
  line-height: 1.6;
}

.post-body pre code { padding: 0; background: none; border: 0; font-size: inherit; }

.post-body a { text-decoration: underline; text-underline-offset: 2px; }

.post-foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ---------------------------------------------------------------- footer */

footer { border-top: 1px solid var(--border); background: var(--surface); padding: 28px 0 40px; }

.foot-line { overflow: hidden; white-space: nowrap; color: var(--border); font-family: var(--font-mono); font-size: 12px; }

.foot-bot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  margin-top: 16px;
  font-size: 12.5px; color: var(--text-secondary);
}

.foot-bot .links { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .journal { padding: 32px 0 56px; }
  .nav { min-height: 60px; }
}


/* Mirrors html[data-theme="dark"] in apps/susipere-web/src/styles.css. Set by
   the inline bootstrap in the <head>, which reads the same localStorage key
   the marketing site writes. */
html[data-theme="dark"] {
  --bg: oklch(0.16 0.012 240);
  --surface: oklch(0.20 0.014 240);
  --surface-muted: oklch(0.24 0.014 240);
  --text: oklch(0.96 0.005 240);
  --text-secondary: oklch(0.78 0.010 240);
  --border: oklch(0.32 0.012 240);
  --brand: oklch(0.86 0.18 142);
}
