/* vikunja-enterprise website: tokens, base, header, footer, buttons, 404. Shared by every page.
   Design system shared with the bdhtml2pdf site. No external fonts, scripts or trackers. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-soft: #f5f6fb;
  --surface: #ffffff;
  --ink: #161a2c;
  --ink-2: #454b63;
  --muted: #646a80;
  --line: #e2e4ee;
  --accent: #4252d9;
  --accent-ink: #ffffff;
  --accent-soft: #eceefe;
  --accent-text: #3442c4;
  --good: #1d7a4c;
  --warn: #8a5a00;
  --bad: #b3261e;
  --important: #7b3fc4;
  --code-bg: #10142a;
  --code-ink: #e6e8f5;
  --shadow: 0 1px 2px rgba(22, 26, 44, .06), 0 10px 30px rgba(22, 26, 44, .08);
  --radius: 14px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", "Noto Sans", Roboto, Ubuntu, Cantarell, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Noto Sans Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1020;
    --bg-soft: #141831;
    --surface: #171b35;
    --ink: #eef0fa;
    --ink-2: #c3c7dc;
    --muted: #9ba1bb;
    --line: #2a2f52;
    --accent: #8c98ff;
    --accent-ink: #0d1020;
    --accent-soft: #1f2550;
    --accent-text: #a9b2ff;
    --good: #5fd39a;
    --warn: #f0b955;
    --bad: #ff8a80;
    --important: #c7a0ff;
    --code-bg: #0a0d1c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code, kbd, pre { font-family: var(--mono); font-size: .9em; }
:not(pre) > code { padding: .1em .35em; border-radius: 5px; background: var(--bg-soft); border: 1px solid var(--line); overflow-wrap: anywhere; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 10px 16px; border-radius: 8px; background: var(--accent); color: var(--accent-ink);
}
.skip:focus { top: 12px; }


/* Header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 19px; letter-spacing: -.01em; white-space: nowrap; }
.logo img { width: 30px; height: 30px; }
.top-nav { display: none; margin-left: auto; }
.top-nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.top-nav a { display: block; padding: 6px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 15px; font-weight: 550; white-space: nowrap; }
.top-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.top-nav a[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); }
.top-nav a.gh { color: var(--ink); border: 1px solid var(--line); }

/* Mobile menu: a <details>, no scripts */
.menu { margin-left: auto; }
.menu summary { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 16px; height: 2px; border-radius: 1px; background: currentColor; content: ""; }
.menu-icon { position: relative; }
.menu-icon::before { position: absolute; top: -5px; }
.menu-icon::after { position: absolute; top: 5px; }
.menu[open] .menu-icon { background: transparent; }
.menu[open] .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu[open] .menu-icon::after { top: 0; transform: rotate(-45deg); }
.menu-panel { position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; padding: 8px 16px 24px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 24px; }
.menu-title { margin: 16px 0 4px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.menu-panel ul { margin: 0; padding: 0; list-style: none; }
.menu-panel a { display: block; padding: 8px 4px; color: var(--ink); text-decoration: none; font-weight: 550; }
.menu-panel a:hover { color: var(--accent-text); text-decoration: underline; }
.menu-panel a[aria-current="page"] { color: var(--accent-text); font-weight: 700; }
@media (min-width: 1020px) { .top-nav { display: block; } .menu { display: none; } }
@media (max-width: 380px) { .site-header .wrap { gap: 8px; } .logo { font-size: 16px; gap: 8px; } .logo img { width: 26px; height: 26px; } .menu summary { padding: 8px 10px; } }

/* Buttons and small shared pieces */
.eyebrow { display: inline-flex; gap: 8px; align-items: center; margin: 0 0 18px; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 14px; font-weight: 650; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 650; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--muted); }
.btn svg { width: 18px; height: 18px; }
.note { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.note a { color: var(--accent-text); }

/* Footer */
.site-footer { margin-top: 64px; padding: 40px 0 48px; border-top: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); font-size: 14.5px; }
.site-footer .wrap { display: grid; gap: 32px 48px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .site-footer .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); } }
.footer-about p { margin: 0 0 10px; max-width: 34em; }
.footer-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 24px; }
.footer-title { margin: 0 0 8px; color: var(--ink); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.footer-nav ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.site-footer a { color: var(--ink-2); }
.site-footer a:hover { color: var(--accent-text); }
.footer-by { grid-column: 1 / -1; margin: 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 15px; }
.byline { margin: 18px 0 0; color: var(--ink-2); font-size: 15px; }
.by-link, .site-footer .by-link { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 8px; color: var(--ink); font-weight: 700; text-decoration: none; }
.by-link:hover, .site-footer .by-link:hover { color: var(--accent-text); }
.by-domain { padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 650; }

/* 404 */
.lost { min-height: 60vh; display: grid; align-content: center; justify-items: start; padding: 80px 0; }
.lost h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0; letter-spacing: -.03em; }
.lost p { color: var(--ink-2); }
.lost .eyebrow { margin-bottom: 18px; }

@media print {
  .site-header, .skip, .actions { display: none; }
  body { font-size: 11pt; }
}
