/* FLOGVIT.photosuite — family tokens (portal/STYLE.md): paper, ink, one dot.
   photosuite accent = rav. The culling identity is dark-first, so the default
   theme is dark; a light-preferring OS gets light via prefers-color-scheme, and
   an explicit [data-fv-theme] wins either way. Both modes are first-class. */

:root {
  /* dark-first default */
  --paper: #161614;
  --surface: #1e1e1b;
  --ink: #edece6;
  --ink-2: #99978d;
  --line: #2e2d29;
  --bad: #e0604f;
  --accent: #e0aa4f;      /* rav, dark */
  --on-accent: #161614;

  --radius: 10px;
  --radius-pill: 999px;
  --maxw: 1120px;

  --font-ui: 'Schibsted Grotesk', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --paper: #faf9f6;
    --surface: #ffffff;
    --ink: #1b1b18;
    --ink-2: #67665f;
    --line: #dcdacf;
    --bad: #c03b2e;
    --accent: #8a5d0b;    /* rav, light */
    --on-accent: #faf9f6;
  }
}

:root[data-fv-theme='dark'] {
  --paper: #161614; --surface: #1e1e1b; --ink: #edece6; --ink-2: #99978d;
  --line: #2e2d29; --bad: #e0604f; --accent: #e0aa4f; --on-accent: #161614;
}
:root[data-fv-theme='light'] {
  --paper: #faf9f6; --surface: #ffffff; --ink: #1b1b18; --ink-2: #67665f;
  --line: #dcdacf; --bad: #c03b2e; --accent: #8a5d0b; --on-accent: #faf9f6;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-ui);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; transition: color 150ms ease-out; }
a:hover { color: color-mix(in oklab, var(--accent) 80%, var(--ink)); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px;
}
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
img { max-width: 100%; height: auto; }
::selection { background: color-mix(in oklab, var(--accent) 25%, transparent); color: var(--ink); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.site-main { flex: 1; padding-top: 72px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.6rem 1.25rem; border-radius: var(--radius-pill);
  font-size: 0.95rem; font-weight: 500; border: 1px solid transparent;
  transition: background 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out;
  cursor: pointer; text-align: center;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in oklab, var(--accent) 85%, var(--ink)); border-color: color-mix(in oklab, var(--accent) 85%, var(--ink)); color: var(--on-accent); }
.btn-secondary { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.btn.is-disabled, .btn:disabled { opacity: 0.55; cursor: default; pointer-events: none; }

/* ── Header / chrome ──────────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.site-brand { font-size: 1.25rem; }
.site-nav { display: flex; gap: 0.5rem; }
.site-nav-link {
  color: var(--ink-2); font-size: 0.875rem; font-weight: 500;
  padding: 0.4rem 0.75rem; border-radius: var(--radius-pill);
  transition: color 150ms ease-out, background 150ms ease-out;
}
.site-nav-link:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.site-nav-link.active { color: var(--accent); background: color-mix(in oklab, var(--accent) 10%, transparent); }
.site-actions { display: flex; align-items: center; gap: 1rem; }
.site-login { color: var(--ink-2); font-size: 0.875rem; font-weight: 500; }
.site-login:hover { color: var(--ink); }
.site-cta {
  padding: 0.5rem 1.25rem; background: var(--accent); border: 1px solid var(--accent);
  color: var(--on-accent); font-size: 0.875rem; font-weight: 500; border-radius: var(--radius-pill);
}
.site-cta:hover { background: color-mix(in oklab, var(--accent) 85%, var(--ink)); color: var(--on-accent); }
.site-cta.comingSoon { opacity: 0.6; cursor: default; }
.site-hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 4px; }
.site-hamburger span { display: block; width: 22px; height: 2px; background: var(--ink-2); border-radius: 1px; }

@media (max-width: 768px) {
  .site-nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 1rem 1.5rem; gap: 0.5rem;
  }
  .site-nav.open { display: flex; }
  .site-actions { display: none; }
  .site-hamburger { display: flex; }
}

/* ── Wordmark + family menu ───────────────────────────────────────────────── */
.wordmark { display: inline-flex; align-items: baseline; white-space: nowrap; color: var(--ink); }
.fvmenu { position: relative; display: inline-block; }
.fvmenu-summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: baseline; gap: 5px;
  font-weight: 800; letter-spacing: -0.02em; color: var(--ink);
}
.fvmenu-summary::-webkit-details-marker { display: none; }
.fvmenu-caret { color: var(--ink-2); transition: transform 0.15s ease-out; }
.fvmenu[open] .fvmenu-caret { transform: rotate(180deg); }
.fvmenu-panel {
  position: absolute; left: -10px; top: calc(100% + 10px); z-index: 120;
  display: flex; flex-direction: column; min-width: 230px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px;
}
.fvmenu-item {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 8px 12px; border-radius: 6px; font-weight: 400; letter-spacing: 0; color: var(--ink);
}
a.fvmenu-item { transition: background 0.12s ease; }
a.fvmenu-item:hover { background: color-mix(in oklab, var(--ink) 6%, var(--surface)); color: var(--ink); }
.fvmenu-item[aria-current] { background: color-mix(in oklab, var(--ink) 6%, var(--surface)); }
.fvmenu-wm { display: inline-flex; align-items: baseline; white-space: nowrap; }
.fvmenu-b { font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.fvmenu-dot { font-weight: 800; color: var(--ink); }
.fvmenu-prod { font-family: var(--font-mono); font-weight: 500; font-size: 0.95em; }
.fvmenu-item.soon { cursor: default; }
.fvmenu-item.soon .fvmenu-wm { opacity: 0.5; }
.fvmenu-chip { font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); }

.dotPuzzles { color: #2b5bb7; } .dotPhotosuite { color: #8a5d0b; } .dotImage { color: #0f6e77; }
.dotFoto { color: #b0355f; } .dotLab { color: #6743b8; } .dotBooks { color: #2f7d43; } .dotBibel { color: #7a4a21; }
@media (prefers-color-scheme: dark) {
  .dotPuzzles { color: #7ea6ec; } .dotPhotosuite { color: #e0aa4f; } .dotImage { color: #6fc7cd; }
  .dotFoto { color: #ef8fb1; } .dotLab { color: #b39df0; } .dotBooks { color: #85c795; } .dotBibel { color: #d9a06b; }
}
/* Forced theme (data-fv-theme) must flip the dots too, else a light OS forced to
   dark (or vice-versa) keeps the other palette's dots. Mirrors the token blocks. */
:root[data-fv-theme='light'] .dotPuzzles { color: #2b5bb7; } :root[data-fv-theme='light'] .dotPhotosuite { color: #8a5d0b; }
:root[data-fv-theme='light'] .dotImage { color: #0f6e77; } :root[data-fv-theme='light'] .dotFoto { color: #b0355f; }
:root[data-fv-theme='light'] .dotLab { color: #6743b8; } :root[data-fv-theme='light'] .dotBooks { color: #2f7d43; }
:root[data-fv-theme='light'] .dotBibel { color: #7a4a21; }
:root[data-fv-theme='dark'] .dotPuzzles { color: #7ea6ec; } :root[data-fv-theme='dark'] .dotPhotosuite { color: #e0aa4f; }
:root[data-fv-theme='dark'] .dotImage { color: #6fc7cd; } :root[data-fv-theme='dark'] .dotFoto { color: #ef8fb1; }
:root[data-fv-theme='dark'] .dotLab { color: #b39df0; } :root[data-fv-theme='dark'] .dotBooks { color: #85c795; }
:root[data-fv-theme='dark'] .dotBibel { color: #d9a06b; }

/* Family theme preference — segmented control in the FLOGVIT menu panel. */
.fvmenu-prefs {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 4px; padding: 8px 12px; border-top: 1px solid var(--line);
}
.fvmenu-prefs-label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.fvmenu-seg {
  display: inline-flex; padding: 2px; gap: 2px;
  background: color-mix(in oklab, var(--ink) 6%, var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius-pill);
}
.fvmenu-segBtn {
  appearance: none; cursor: pointer; border: 0; background: transparent;
  font: inherit; font-size: 12px; font-weight: 500; color: var(--ink-2);
  padding: 3px 9px; border-radius: var(--radius-pill); line-height: 1.4;
  transition: color 0.12s ease, background 0.12s ease;
}
.fvmenu-segBtn:hover { color: var(--ink); }
.fvmenu-segBtn.on { background: var(--accent); color: var(--on-accent); }

.fvmenu-product { color: var(--ink); font-family: var(--font-mono); font-weight: 500; font-size: 0.95em; }
.fvmenu-product:hover { color: var(--ink); }
.fvmenu-productDot { font-family: var(--font-ui); font-weight: 800; font-size: 1.0526em; color: var(--accent); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 4rem; }
.site-footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 3rem 1.5rem 2rem; display: grid; gap: 2rem; grid-template-columns: 1.5fr 2fr; }
.site-footer-brand .wordmark { font-size: 1.15rem; }
.site-footer-tagline { color: var(--ink-2); font-size: 0.9rem; margin-top: 0.75rem; max-width: 320px; }
.site-footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.site-footer-col { display: flex; flex-direction: column; gap: 0.5rem; }
.site-footer-col h4 { font-family: var(--font-mono); font-size: 0.75rem; text-transform: lowercase; letter-spacing: 0.02em; color: var(--ink-2); font-weight: 500; margin-bottom: 0.25rem; }
.site-footer-col a { color: var(--ink-2); font-size: 0.875rem; }
.site-footer-col a:hover { color: var(--accent); }
.site-footer-bottom { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 1.5rem; display: flex; justify-content: space-between; color: var(--ink-2); font-size: 0.8rem; }
@media (max-width: 768px) {
  .site-footer-inner { grid-template-columns: 1fr; }
  .site-footer-links { grid-template-columns: repeat(2, 1fr); }
  .site-footer-bottom { flex-direction: column; gap: 0.5rem; }
}

/* ── Marketing: hero ──────────────────────────────────────────────────────── */
.hero { position: relative; min-height: 78vh; display: flex; align-items: center;
  background: radial-gradient(ellipse at 30% 30%, color-mix(in oklab, var(--accent) 22%, var(--paper)), var(--paper) 70%); overflow: hidden; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--paper) 60%, transparent)); }
.hero-content { position: relative; }
.hero-headline { font-size: clamp(2.5rem, 6vw, 3.5rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; }
.hero-subline { font-size: 1.25rem; color: var(--ink-2); margin-top: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.hero-note { color: var(--ink-2); font-size: 0.85rem; margin-top: 1rem; }

.painpoint { padding: 5rem 0; text-align: center; }
.painpoint h2 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.painpoint p { color: var(--ink-2); max-width: 640px; margin: 1rem auto 0; }
.painpoint-conclusion { color: var(--accent) !important; font-weight: 600; font-size: 1.15rem; }

.selling { padding: 4rem 0; border-top: 1px solid var(--line); }
.selling-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.selling-inner.reversed .selling-media { order: 2; }
.selling-text h2 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.selling-text p { color: var(--ink-2); margin-top: 1rem; }
.media-placeholder { aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in oklab, var(--ink) 4%, var(--surface)); display: flex; align-items: center; justify-content: center; }
.media-placeholder span { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-2); }
@media (max-width: 768px) {
  .selling-inner { grid-template-columns: 1fr; }
  .selling-inner.reversed .selling-media { order: 0; }
}

.showcase { padding: 5rem 0; text-align: center; border-top: 1px solid var(--line); }
.showcase h2 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 2rem; }
.showcase-media { max-width: 900px; margin: 0 auto; }
.showcase-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 1.5rem; font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-2); }
.showcase-tags .sep { color: var(--line); }

.credibility { padding: 5rem 0; text-align: center; border-top: 1px solid var(--line); }
.credibility h2 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.credibility p { color: var(--ink-2); max-width: 640px; margin: 1rem auto 0; }
.credibility-emphasis { color: var(--ink) !important; font-weight: 600; }

/* ── Pricing ──────────────────────────────────────────────────────────────── */
.pricing-section { padding: 5rem 0; border-top: 1px solid var(--line); }
.section-heading { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; text-align: center; }
.section-subheading { color: var(--ink-2); text-align: center; margin-top: 0.5rem; }
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
@media (max-width: 980px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pricing-grid { grid-template-columns: 1fr; } }
.pricing-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem 1.5rem; display: flex; flex-direction: column; }
.pricing-card.highlighted { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pricing-badge { position: absolute; top: -0.7rem; left: 1.5rem; background: var(--accent); color: var(--on-accent); font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.6rem; border-radius: var(--radius-pill); }
.pricing-name { font-size: 1.15rem; font-weight: 700; }
.pricing-price { display: flex; align-items: baseline; gap: 0.4rem; margin-top: 0.5rem; }
.pricing-amount { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.pricing-period { color: var(--ink-2); font-size: 0.85rem; }
.pricing-desc { color: var(--ink-2); font-size: 0.9rem; margin-top: 0.5rem; min-height: 2.5em; }
.pricing-features { list-style: none; margin: 1.25rem 0; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.pricing-features li { font-size: 0.85rem; color: var(--ink); padding-left: 1.25rem; position: relative; }
.pricing-features li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

.finalcta { padding: 6rem 0; text-align: center; border-top: 1px solid var(--line); }
.finalcta h2 { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.finalcta p { color: var(--ink-2); margin: 1rem 0 2rem; }

/* ── Generic page ─────────────────────────────────────────────────────────── */
.page { padding: 3rem 0 4rem; }
.page-title { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.02em; text-align: center; }
.page-subtitle { color: var(--ink-2); text-align: center; margin-top: 0.75rem; max-width: 640px; margin-left: auto; margin-right: auto; }
.pricing-page .pricing-grid { margin-top: 3rem; }

/* ── About ────────────────────────────────────────────────────────────────── */
.about-hero { padding: 3rem 1.5rem 1rem; }
.about-section { padding: 2.5rem 1.5rem; }
.about-section h2 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1rem; }
.about-section p { color: var(--ink-2); max-width: 680px; margin-bottom: 1rem; }
.about-two-col { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; align-items: start; }
.about-two-col h2 { margin-bottom: 0.25rem; }
.about-role { color: var(--accent) !important; font-family: var(--font-mono); font-size: 0.85rem; margin-bottom: 1rem !important; }
.about-portrait-ph { aspect-ratio: 1; border-radius: var(--radius); border: 1px solid var(--line); background: color-mix(in oklab, var(--accent) 12%, var(--surface)); display: flex; align-items: center; justify-content: center; font-size: 3rem; font-weight: 800; color: var(--accent); }
.about-products, .about-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1rem; }
.about-product-card, .about-contact-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; background: var(--surface); }
.about-product-card h3, .about-contact-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.25rem; }
.about-product-card p, .about-contact-card p { color: var(--ink-2); margin-bottom: 0.5rem; font-size: 0.9rem; }
.about-product-status { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent) !important; }
.about-product-card.upcoming { opacity: 0.75; }
.about-product-card.upcoming .about-product-status { color: var(--ink-2) !important; }
.about-contact-link { font-family: var(--font-mono); font-size: 0.85rem; }
.about-company { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-top: 1rem; max-width: 520px; }
.about-company h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.about-company dl { display: grid; grid-template-columns: auto 1fr; gap: 0.4rem 1.5rem; font-size: 0.9rem; }
.about-company dt { color: var(--ink-2); }
.about-cta { padding: 4rem 0; text-align: center; border-top: 1px solid var(--line); margin-top: 2rem; }
.about-cta h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.about-cta p { color: var(--ink-2); margin: 0.75rem 0 1.5rem; }
.about-cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
@media (max-width: 768px) {
  .about-two-col, .about-products, .about-contact-grid { grid-template-columns: 1fr; }
  .about-portrait { max-width: 180px; }
}

/* ── Docs ─────────────────────────────────────────────────────────────────── */
.site-main.docs { padding-top: 72px; }
.docs-layout { max-width: var(--maxw); margin: 0 auto; padding: 2rem 1.5rem 4rem; display: grid; grid-template-columns: 260px 1fr; gap: 2.5rem; align-items: start; }
.docs-sidebar { position: sticky; top: 90px; align-self: start; }
.docs-sidebar-title { font-size: 0.8rem; font-family: var(--font-mono); text-transform: lowercase; color: var(--ink-2); margin-bottom: 0.75rem; }
.docs-search { position: relative; margin-bottom: 0.75rem; }
.docs-search-input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 0.85rem; }
.docs-search-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; max-height: 60vh; overflow-y: auto; }
.docs-search-result { padding: 0.5rem 0.6rem; border-radius: 6px; cursor: pointer; }
.docs-search-result.active, .docs-search-result:hover { background: color-mix(in oklab, var(--ink) 6%, var(--surface)); }
.docs-search-result-title { font-weight: 600; font-size: 0.85rem; }
.docs-search-result-heading { color: var(--ink-2); font-size: 0.85rem; }
.docs-search-result-snippet { color: var(--ink-2); font-size: 0.75rem; margin-top: 0.2rem; }
.docs-search-none { padding: 0.5rem 0.6rem; color: var(--ink-2); font-size: 0.8rem; }
.docs-os-switcher { display: flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 1.25rem; }
.docs-os-switcher button { flex: 1; padding: 0.35rem 0; font-size: 0.7rem; color: var(--ink-2); background: transparent; border: none; transition: all 150ms ease; }
.docs-os-switcher button.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.docs-nav { list-style: none; display: flex; flex-direction: column; gap: 0.1rem; }
.docs-nav-link { display: block; padding: 0.35rem 0.6rem; border-radius: 6px; color: var(--ink-2); font-size: 0.875rem; }
.docs-nav-link:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 5%, transparent); }
.docs-nav-link.active { color: var(--accent); background: color-mix(in oklab, var(--accent) 10%, transparent); font-weight: 500; }
.docs-index-title { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.docs-index-intro { color: var(--ink-2); margin-top: 0.5rem; }
.docs-index-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2rem; }
.docs-index-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: var(--surface); }
.docs-index-card:hover { border-color: var(--accent); }
.docs-index-card h2 { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.docs-index-card p { color: var(--ink-2); font-size: 0.85rem; margin-top: 0.35rem; }
@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
  .docs-index-grid { grid-template-columns: 1fr; }
}

/* Prose (rendered markdown) */
.docs-prose { max-width: 760px; }
.docs-prose h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 1rem; }
.docs-prose h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin: 2rem 0 0.75rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }
.docs-prose h3 { font-size: 1.15rem; font-weight: 700; margin: 1.5rem 0 0.5rem; }
.docs-prose h4 { font-size: 1rem; font-weight: 700; margin: 1.25rem 0 0.5rem; }
.docs-prose p { margin: 0.75rem 0; color: var(--ink); }
.docs-prose ul, .docs-prose ol { margin: 0.75rem 0 0.75rem 1.5rem; }
.docs-prose li { margin: 0.3rem 0; }
.docs-prose a { text-decoration: underline; text-underline-offset: 2px; }
.docs-prose code { font-family: var(--font-mono); font-size: 0.85em; background: color-mix(in oklab, var(--ink) 8%, var(--surface)); padding: 0.1em 0.4em; border-radius: 4px; }
.docs-prose pre { background: color-mix(in oklab, var(--ink) 8%, var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; overflow-x: auto; margin: 1rem 0; }
.docs-prose pre code { background: none; padding: 0; }
.docs-prose blockquote { border-left: 3px solid var(--accent); padding-left: 1rem; color: var(--ink-2); margin: 1rem 0; }
.docs-prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; }
.docs-prose th, .docs-prose td { border: 1px solid var(--line); padding: 0.5rem 0.75rem; text-align: left; }
.docs-prose th { background: color-mix(in oklab, var(--ink) 5%, var(--surface)); font-weight: 600; }
.docs-prose hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }
.doc-key { font-family: var(--font-mono); font-size: 0.85em; background: color-mix(in oklab, var(--ink) 8%, var(--surface)); border: 1px solid var(--line); border-radius: 4px; padding: 0.1em 0.4em; }
.doc-os { font-style: normal; }

/* ── Auth ─────────────────────────────────────────────────────────────────── */
.auth-wrapper { min-height: calc(100vh - 72px); display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.auth-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.auth-subtitle { color: var(--ink-2); font-size: 0.9rem; margin-top: 0.35rem; margin-bottom: 1.5rem; }
.auth-error { background: color-mix(in oklab, var(--bad) 12%, transparent); color: var(--bad); border: 1px solid color-mix(in oklab, var(--bad) 40%, transparent); border-radius: 6px; padding: 0.6rem 0.8rem; font-size: 0.85rem; margin-bottom: 1rem; }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field-label { font-size: 0.8rem; color: var(--ink-2); font-weight: 500; }
.field-input { padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); font-size: 0.95rem; }
.field-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.auth-switch { text-align: center; color: var(--ink-2); font-size: 0.85rem; margin-top: 1.25rem; }

/* ── Dashboard ────────────────────────────────────────────────────────────── */
.dash { padding: 2.5rem 0 4rem; }
.dash-loading { display: flex; justify-content: center; padding: 4rem 0; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dash-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.dash-welcome { color: var(--ink-2); margin-top: 0.25rem; }
.dash-header-actions { display: flex; gap: 0.75rem; }
.dash-section { margin-top: 2.5rem; }
.dash-section-title { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1rem; }
.dash-muted { color: var(--ink-2); font-size: 0.9rem; }
.dash-empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; display: flex; flex-direction: column; gap: 1rem; align-items: center; }
.dash-password-form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 400px; }
.dash-pw-msg { font-size: 0.85rem; }
.dash-pw-msg.is-ok { color: var(--accent); }
.dash-pw-msg.is-error { color: var(--bad); }

.license-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.license-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: var(--surface); }
.license-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; flex-wrap: wrap; }
.license-head > div { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.license-tier { font-weight: 700; }
.license-type { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-2); }
.license-key { margin: 1rem 0; }
.license-key code { font-family: var(--font-mono); font-size: 0.85rem; background: color-mix(in oklab, var(--ink) 8%, var(--surface)); padding: 0.4rem 0.6rem; border-radius: 6px; display: block; word-break: break-all; }
.license-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.license-detail { display: flex; flex-direction: column; }
.license-detail-label { font-size: 0.7rem; color: var(--ink-2); font-family: var(--font-mono); }
.license-machines { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.license-machines-title { font-size: 0.7rem; color: var(--ink-2); font-family: var(--font-mono); }
.license-machine { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.license-machine > div { display: flex; flex-direction: column; }
.license-platform { font-size: 0.75rem; color: var(--ink-2); }

.badge { display: inline-block; font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: var(--radius-pill); font-family: var(--font-mono); }
.badge-success { background: color-mix(in oklab, #2f7d43 20%, transparent); color: color-mix(in oklab, #2f7d43 70%, var(--ink)); }
.badge-warning { background: color-mix(in oklab, var(--accent) 20%, transparent); color: color-mix(in oklab, var(--accent) 80%, var(--ink)); }
.badge-danger { background: color-mix(in oklab, var(--bad) 18%, transparent); color: var(--bad); }
.badge-default { background: color-mix(in oklab, var(--ink) 10%, transparent); color: var(--ink-2); }

.release-list { display: flex; flex-direction: column; gap: 1rem; }
.release-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: var(--surface); }
.release-head { display: flex; align-items: baseline; gap: 0.75rem; }
.release-version { font-weight: 700; font-size: 1.05rem; }
.release-date { color: var(--ink-2); font-size: 0.8rem; font-family: var(--font-mono); }
.release-notes { color: var(--ink-2); font-size: 0.9rem; margin: 0.6rem 0; white-space: pre-line; }
.release-downloads { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
.data-table th { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-2); font-weight: 500; text-transform: lowercase; }
.data-table tbody tr:last-child td, .data-table tr:last-child td { border-bottom: none; }

/* ── Admin UI ─────────────────────────────────────────────────────────────── */
.admin { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; align-items: start; padding-top: 2rem; padding-bottom: 4rem; }
.admin-sidebar { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1rem; }
.admin-sidebar-title { font-weight: 800; letter-spacing: -0.02em; font-size: 1rem; }
.admin-nav { display: flex; flex-direction: column; gap: 0.15rem; }
.admin-nav-link { color: var(--ink-2); font-size: 0.9rem; font-weight: 500; padding: 0.45rem 0.7rem; border-radius: 6px; }
.admin-nav-link:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.admin-nav-link.active { color: var(--accent); background: color-mix(in oklab, var(--accent) 10%, transparent); }
.admin-sidebar-footer { border-top: 1px solid var(--line); padding-top: 0.75rem; }
.admin-back { color: var(--ink-2); font-size: 0.8rem; }
.admin-back:hover { color: var(--ink); }
.admin-content { min-width: 0; }

.admin-title { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; }
.admin-subtitle { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem; color: var(--ink-2); }
.admin-subtitle code { font-family: var(--font-mono); font-size: 0.85rem; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.admin-back-link { display: inline-block; color: var(--ink-2); font-size: 0.85rem; margin-bottom: 1rem; }
.admin-back-link:hover { color: var(--ink); }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.admin-stat { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.35rem; }
.admin-stat-value { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.admin-stat-label { font-size: 0.75rem; color: var(--ink-2); font-family: var(--font-mono); }
.admin-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.admin-panel-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.75rem; }

.admin-search { max-width: 340px; margin-bottom: 1rem; }
.admin-filters { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.admin-filters .admin-search { margin-bottom: 0; flex: 1 1 240px; }
.admin-filter { max-width: 200px; }
.admin-row-click { cursor: pointer; }
.admin-row-click:hover td { background: color-mix(in oklab, var(--ink) 4%, transparent); }
.admin-row-off td { opacity: 0.5; }
.admin-sub { display: block; font-size: 0.75rem; color: var(--ink-2); }
.admin-pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; font-size: 0.85rem; }

.admin-section { margin-top: 2rem; }
.admin-section-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 1rem; }
.admin-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 1.25rem; }
.admin-info-item { display: flex; flex-direction: column; gap: 0.25rem; }
.admin-info-label { font-size: 0.7rem; color: var(--ink-2); font-family: var(--font-mono); }
.admin-info-item code { font-family: var(--font-mono); font-size: 0.85rem; }
.admin-user-info { margin-top: 1.25rem; }

.admin-form { display: flex; flex-direction: column; gap: 1rem; max-width: 520px; margin-top: 1.5rem; }
.admin-form textarea.field-input { resize: vertical; font-family: inherit; }
.admin-form select.field-input { cursor: pointer; }
.admin-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--ink); }
.admin-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.admin-error { color: var(--bad); font-size: 0.85rem; }
.admin-msg { font-size: 0.85rem; }
.admin-msg.is-ok { color: var(--accent); }
.admin-msg.is-error { color: var(--bad); }

.admin-dropdown { position: absolute; z-index: 20; left: 0; right: 0; margin-top: 0.25rem; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; max-height: 240px; overflow-y: auto; box-shadow: 0 8px 24px rgba(0,0,0,0.25); }
#ent-admin-wrap, #lic-user-wrap { position: relative; }
.admin-dropdown-item { padding: 0.5rem 0.75rem; cursor: pointer; display: flex; flex-direction: column; }
.admin-dropdown-item:hover { background: color-mix(in oklab, var(--ink) 6%, var(--surface)); }
.admin-dropdown-email { font-size: 0.9rem; }
.admin-dropdown-name { font-size: 0.75rem; color: var(--ink-2); }

.ent-edit { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.ent-email-input { min-width: 180px; }

.admin-dropzone { border: 1px dashed var(--line); border-radius: 6px; padding: 1.25rem; text-align: center; cursor: pointer; }
.admin-dropzone.is-over { border-color: var(--accent); background: color-mix(in oklab, var(--accent) 8%, transparent); }
.admin-dropzone .up-input { display: none; }
.admin-file { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 6px; padding: 0.6rem 0.8rem; }
.admin-file-name { font-family: var(--font-mono); font-size: 0.85rem; word-break: break-all; }
.admin-progress { border: 1px solid var(--line); border-radius: 6px; padding: 0.6rem 0.8rem; }
.admin-progress-bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.admin-progress-fill { height: 100%; background: var(--accent); transition: width 120ms ease-out; }
.admin-progress-info { display: flex; justify-content: space-between; align-items: center; margin-top: 0.4rem; font-size: 0.8rem; color: var(--ink-2); }

.admin-forbidden { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }

@media (max-width: 720px) {
  .admin { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .admin-nav { flex-direction: row; flex-wrap: wrap; }
}

/* Uniform konto-oppforing i familiemenyen */
.fvmenu-kontoitem {
  font-size: 13px;
  border-top: 1px solid var(--border, #ddd);
  margin-top: 4px;
  padding-top: 10px;
}

/* Settings page (portal/SETTINGS.md) */
.settings { max-width: 640px; }
.settings-title { margin: 0 0 1.25rem; }
.settings-group { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.settings-group:first-of-type { border-top: none; padding-top: 0; }
.settings-group h2 { font-size: 1rem; margin: 0 0 0.25rem; color: var(--ink); }
.settings-hint { margin: 0 0 0.75rem; font-size: 0.85rem; color: var(--ink-2); }
.settings-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.settings-link:hover { text-decoration: underline; }
.site-settings { display: inline-flex; align-items: center; color: var(--ink-2); text-decoration: none; font-size: 1.05rem; }
.site-settings:hover, .site-settings.active { color: var(--ink); }
