/* Kosmora website. Self-contained: system fonts, no external requests. */
:root {
  --green: #00ed64;
  --forest: #00684a;
  --slate: #001e2b;
  --violet: #5b4fc4;
  --bg: #f7faf9;
  --bg-2: #ebefed;
  --card: #ffffff;
  --text: #171d1b;
  --muted: #3f4945;
  --line: #d5dedb;
  --accent: #00684a;
  --accent-ink: #ffffff;
  --accent-soft: #b8f5d2;
  --accent-soft-ink: #002114;
  --code-bg: #eef3f1;
  --shadow: 0 1px 2px rgba(0, 30, 43, 0.08), 0 8px 24px rgba(0, 30, 43, 0.08);
  --font: Inter, 'Google Sans Text', 'Segoe UI', Roboto, system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --display: 'Inter Display', Inter, 'Google Sans', 'Segoe UI', Roboto, system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'Roboto Mono', 'Cascadia Code', Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #001e2b;
    --bg-2: #062734;
    --card: #0b2c3a;
    --text: #e3eef0;
    --muted: #b8c8cd;
    --line: #1d4252;
    --accent: #00ed64;
    --accent-ink: #002814;
    --accent-soft: #00513a;
    --accent-soft-ink: #b8f5d2;
    --code-bg: #062734;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #001e2b;
  --bg-2: #062734;
  --card: #0b2c3a;
  --text: #e3eef0;
  --muted: #b8c8cd;
  --line: #1d4252;
  --accent: #00ed64;
  --accent-ink: #002814;
  --accent-soft: #00513a;
  --accent-soft-ink: #b8f5d2;
  --code-bg: #062734;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code, kbd, pre { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--code-bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto; line-height: 1.5; }
pre code { background: none; border: 0; padding: 0; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; background: var(--card); }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Top bar */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--text); letter-spacing: -0.4px; }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { white-space: nowrap; color: var(--muted); padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: 15px; }
.nav a:hover, .nav a.active { background: var(--bg-2); color: var(--text); text-decoration: none; }
.theme-btn { border: 1px solid var(--line); background: var(--card); color: var(--text); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.theme-btn svg { width: 20px; height: 20px; fill: currentColor; }
.menu-btn { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; padding: 12px 24px; font-weight: 600; font-size: 15px; border: 1px solid transparent; transition: transform 0.15s, box-shadow 0.15s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.tonal { background: var(--accent-soft); color: var(--accent-soft-ink); }
.btn.outline { border-color: var(--line); color: var(--text); background: var(--card); }

/* Hero (always space-dark) */
.hero {
  position: relative; overflow: hidden; color: #e3eef0;
  background: radial-gradient(1100px 600px at 12% 0%, #0b3b4a 0, #001e2b 55%, #000f17 100%);
}
.hero::before {
  content: ''; position: absolute; inset: 0; opacity: 0.7;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 20%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 70%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 35% 35%, #c6bfff 50%, transparent 51%),
    radial-gradient(1px 1px at 48% 85%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 62% 15%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 75% 55%, #c6bfff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 80%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 15% 92%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 45%, #fff 50%, transparent 51%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
.hero h1 { font-family: var(--display); font-size: clamp(40px, 6vw, 68px); line-height: 1.05; letter-spacing: -2px; margin: 18px 0 18px; }
.hero h1 span { background: linear-gradient(90deg, #71f6a5, #00ed64); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 19px; color: #b8c8cd; margin: 0 0 28px; max-width: 520px; }
.hero .btn.primary { background: #00ed64; color: #002814; }
.hero .btn.outline { background: transparent; color: #e3eef0; border-color: #2f4b56; }
.hero .shot { border-radius: 16px; border: 1px solid #2f4b56; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 0 8px rgba(11, 44, 58, 0.6); }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #2f4b56; background: #0b2c3a; color: #cde9db; border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 500; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: #00ed64; box-shadow: 0 0 10px #00ed64; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.facts { display: flex; gap: 28px; margin-top: 36px; color: #b8c8cd; font-size: 14px; flex-wrap: wrap; }
.facts b { display: block; color: #fff; font-size: 24px; font-family: var(--display); }

/* Sections */
section.block { padding: 88px 0; }
section.alt { background: var(--bg-2); }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; }
h2.title { font-family: var(--display); font-size: clamp(30px, 4vw, 42px); letter-spacing: -1px; line-height: 1.15; margin: 8px 0 14px; }
p.sub { color: var(--muted); font-size: 18px; max-width: 680px; margin: 0 0 40px; }
.grid { display: grid; gap: 20px; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.card h3 { margin: 14px 0 6px; font-size: 19px; font-family: var(--display); }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-soft-ink); }
.ico svg { width: 26px; height: 26px; fill: currentColor; }
.ico.v { background: #e4dfff; color: #170065; }
:root[data-theme='dark'] .ico.v { background: #3f31a8; color: #e4dfff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .ico.v { background: #3f31a8; color: #e4dfff; } }

.steps { counter-reset: s; }
.step { position: relative; padding-left: 64px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.step h3 { margin: 6px 0 6px; font-family: var(--display); }
.step p { margin: 0; color: var(--muted); }

.formats { display: flex; flex-wrap: wrap; gap: 12px; }
.fmt { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; font-weight: 600; }
.fmt small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }

/* Gallery */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tab { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px; padding: 8px 18px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.tab[aria-selected='true'] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.frame { border-radius: 18px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--card); }
.caption { color: var(--muted); margin-top: 14px; font-size: 15px; text-align: center; }

.privacy { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.check { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check li { padding-left: 34px; position: relative; }
.check li::before { content: ''; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%2300684a' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") center/16px no-repeat; }

details.faq { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px; }
details.faq + details.faq { margin-top: 12px; }
details.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
details.faq p { color: var(--muted); margin: 10px 0 0; }

.cta { text-align: center; border-radius: 28px; padding: 56px 24px; color: #e3eef0; background: radial-gradient(800px 300px at 50% 0, #0b3b4a, #001e2b 70%); }
.cta h2 { font-family: var(--display); font-size: 36px; margin: 0 0 10px; letter-spacing: -1px; }
.cta p { color: #b8c8cd; margin: 0 0 26px; }
.cta .actions { justify-content: center; }
.cta .btn.primary { background: #00ed64; color: #002814; }
.cta .btn.outline { background: transparent; color: #e3eef0; border-color: #2f4b56; }

footer.foot { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: 14px; }
footer.foot .wrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
footer.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* Guide layout */
.guide { display: grid; grid-template-columns: 260px 1fr; gap: 48px; padding-top: 36px; padding-bottom: 80px; }
.toc { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; font-size: 14px; }
.toc b { display: block; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin: 0 0 10px 12px; }
.toc a { display: block; color: var(--muted); padding: 6px 12px; border-radius: 10px; }
.toc a:hover { background: var(--bg-2); color: var(--text); text-decoration: none; }
.toc a.on { background: var(--accent-soft); color: var(--accent-soft-ink); font-weight: 600; }
.doc { min-width: 0; max-width: 820px; }
.doc h1 { font-family: var(--display); font-size: 44px; letter-spacing: -1.2px; margin: 0 0 8px; line-height: 1.1; }
.doc h2 { font-family: var(--display); font-size: 30px; letter-spacing: -0.6px; margin: 64px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.doc h2 .n { color: var(--accent); margin-right: 10px; }
.doc h3 { font-size: 20px; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc .lead { font-size: 19px; color: var(--muted); }
.doc ol, .doc ul { padding-left: 24px; }
.doc li { margin: 6px 0; }
.doc figure { margin: 24px 0; }
.doc figure img { border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.doc figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; text-align: center; }
table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 15px; background: var(--card); border-radius: 12px; overflow: hidden; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
.note { border-radius: 14px; padding: 14px 18px; margin: 18px 0; background: var(--accent-soft); color: var(--accent-soft-ink); }
.note.warn { background: #ffdea6; color: #261900; }
.note b { display: block; margin-bottom: 2px; }
.cover { display: none; }

@media (max-width: 900px) {
  .hero .wrap, .privacy { grid-template-columns: 1fr; }
  .g3, .g4 { grid-template-columns: 1fr 1fr; }
  .guide { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
  .nav a.hide-sm { display: none; }
}
@media (max-width: 600px) {
  .g3, .g4, .g2 { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
  .nav a:not(.keep) { display: none; }
  section.block { padding: 60px 0; }
}

/* Print (PDF manual) */
@page { size: A4; margin: 18mm 16mm 20mm; }
@page :first { margin: 0; }
@media print {
  :root { --bg: #fff; --bg-2: #f1f4f3; --card: #fff; --text: #171d1b; --muted: #3f4945; --line: #d5dedb; --accent: #00684a; --accent-soft: #e3f7ec; --accent-soft-ink: #002114; --code-bg: #f3f6f5; color-scheme: light; }
  html { scroll-padding-top: 0; }
  body { font-size: 11pt; background: #fff; }
  .top, .toc, footer.foot, .no-print { display: none !important; }
  .guide { display: block; padding: 0; }
  .wrap { max-width: none; padding: 0; }
  .doc { max-width: none; }
  .doc > h1, .doc > .lead { display: none; }
  .doc h2 { break-before: page; border-top: 0; margin-top: 0; font-size: 24pt; }
  .doc h3 { break-after: avoid; }
  .doc figure, table, pre, .note { break-inside: avoid; }
  .doc figure img { box-shadow: none; max-height: 120mm; width: auto; margin: 0 auto; }
  a { color: var(--accent); }
  .cover { display: flex; flex-direction: column; justify-content: space-between; height: 257mm; break-after: page; padding: 0; color: #e3eef0; background: radial-gradient(160mm 120mm at 10% 0, #0b3b4a, #001e2b 60%, #000f17); margin: 0; padding: 30mm 22mm; height: 297mm; box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cover img { width: 46mm; height: 46mm; }
  .cover h1 { font-family: var(--display); font-size: 54pt; margin: 14mm 0 4mm; letter-spacing: -2px; line-height: 1; }
  .cover h1 span { color: #00ed64; }
  .cover .t { font-size: 20pt; color: #b8c8cd; }
  .cover .meta { font-size: 11pt; color: #b8c8cd; line-height: 1.7; }
  .cover .meta b { color: #fff; }
  .print-toc { display: block !important; break-after: page; }
  .print-toc h2 { break-before: auto !important; }
  .print-toc ol { columns: 1; font-size: 12pt; line-height: 2; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.print-toc { display: none; }
.watermark { display: none; }
@media print {
  .watermark { display: flex; position: fixed; inset: 0; align-items: center; justify-content: center; pointer-events: none; z-index: 50; }
  .wm-mark { transform: rotate(-32deg); display: flex; flex-direction: column; align-items: center; gap: 2mm; color: #00684a; opacity: 0.07; white-space: nowrap; }
  .wm-name { font-family: var(--display); font-weight: 700; font-size: 64pt; letter-spacing: 2px; line-height: 1; }
  .wm-sub { font-size: 13pt; font-weight: 500; letter-spacing: 1px; }
}
