/* Kaskit marketing site. Palette shared with the app (app/src/app.css). */
:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --text: #1d2420;
  --muted: #56625b;
  --border: #dde2dc;
  --accent: #1f7a4d;
  --accent-strong: #17603c;
  --accent-text: #ffffff;
  --accent-soft: #e4f2ea;
  --warn-bg: #fff5d9;
  --warn-border: #e8c766;
  --shadow: 0 1px 2px rgb(20 40 30 / 6%), 0 8px 24px rgb(20 40 30 / 6%);
  --radius: 12px;
  --wrap: 1080px;
  --narrow: 720px;
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Dark palette: follows the device unless the visitor picked a theme with the toggle (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151a17;
    --surface: #1e2420;
    --text: #e6ebe7;
    --muted: #a3afa8;
    --border: #333c36;
    --accent: #4cbb85;
    --accent-strong: #6fd1a0;
    --accent-text: #0d1a12;
    --accent-soft: #1f3a2b;
    --warn-bg: #3a3218;
    --warn-border: #7a6526;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #151a17;
  --surface: #1e2420;
  --text: #e6ebe7;
  --muted: #a3afa8;
  --border: #333c36;
  --accent: #4cbb85;
  --accent-strong: #6fd1a0;
  --accent-text: #0d1a12;
  --accent-soft: #1f3a2b;
  --warn-bg: #3a3218;
  --warn-border: #7a6526;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  color-scheme: dark;
}

:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
/* Sticky footer: on short pages the footer sits at the bottom of the window, on long pages after the content. */
body > main { flex: 1 0 auto; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); margin: 0.2em 0 0.4em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 2em 0 0.6em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 0.4em; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: 0.35em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.wrap.narrow { max-width: calc(var(--narrow) + 40px); padding-block: 1.5rem 3rem; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font: inherit; font-weight: 600; text-decoration: none; line-height: 1.2;
  padding: 0.75rem 1.2rem; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); min-height: 44px;
}
.button:hover { border-color: var(--accent); color: var(--text); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.button.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-text); }
.button.small { padding: 0.45rem 0.85rem; font-size: 0.9rem; min-height: 38px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; padding-block: 0.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.25rem; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.brand:hover { color: var(--text); }
.logo-mark { flex: none; }
.nav { display: flex; align-items: center; gap: 0.3rem 1.1rem; flex-wrap: wrap; }
.nav-link { color: var(--text); text-decoration: none; font-size: 0.95rem; }
.nav-link:hover { color: var(--accent); text-decoration: underline; }
.lang-switch { font-weight: 700; font-size: 0.9rem; text-decoration: none; border: 1px solid var(--border); border-radius: 6px; padding: 0.3rem 0.55rem; color: var(--text); }
.lang-switch:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 680px) {
  .nav-link { display: none; }
  .header-inner { min-height: 56px; flex-wrap: nowrap; }
  .nav { gap: 0.5rem; flex-wrap: nowrap; }
  .site-header .button.small { white-space: nowrap; }
}
@media (max-width: 380px) {
  .header-inner { gap: 0.5rem; }
  .brand { font-size: 1.1rem; gap: 0.4rem; }
  .nav { gap: 0.35rem; }
  .site-header .button.small { padding-inline: 0.6rem; font-size: 0.85rem; }
  .theme-toggle { width: 34px; height: 34px; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 3rem; font-size: 0.92rem; }
.footer-inner { padding-block: 2rem; display: grid; gap: 1rem 2rem; grid-template-columns: minmax(0, 1fr) auto; }
.footer-brand p { color: var(--muted); margin: 0.5rem 0 0; max-width: 34ch; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.4rem; }
.site-footer .disclaimer, .site-footer .publisher { grid-column: 1 / -1; color: var(--muted); margin: 0; font-size: 0.85rem; }
.site-footer .disclaimer { border-top: 1px solid var(--border); padding-top: 1rem; }
@media (max-width: 600px) { .footer-inner { grid-template-columns: 1fr; } }

/* Landing sections */
.section { padding-block: 3.5rem; }
.section.alt { background: var(--surface); border-block: 1px solid var(--border); }
.section > .wrap > h2:first-child, .section h2.section-title { margin-top: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: var(--accent); margin: 0 0 0.4rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.section-intro { max-width: 62ch; }

.hero { padding-block: 3.5rem 3rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2.5rem; align-items: center; }
.hero h1 { margin-top: 0; }
.hero .lead { color: var(--text); opacity: 0.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 1rem; }
.hero-note { color: var(--muted); font-size: 0.92rem; margin: 0; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

/* Sample statement shown in the hero */
.sample { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.3rem; font-size: 0.88rem; }
.sample-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.6rem; }
.sample-head strong { font-size: 1rem; }
.sample-tag { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0.1rem 0.5rem; white-space: nowrap; }
.sample table { width: 100%; border-collapse: collapse; }
.sample th, .sample td { padding: 0.3rem 0.4rem; border-bottom: 1px solid var(--border); text-align: left; }
.sample th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.sample td.num, .sample th.num { text-align: right; font-variant-numeric: tabular-nums; }
.sample tr.total td { font-weight: 700; border-top: 2px solid var(--text); border-bottom: none; }
.sample-caption { margin-top: 0.8rem; font-size: 0.85rem; color: var(--muted); }
.sample .result { margin: 0.7rem 0 0; padding: 0.5rem 0.6rem; background: var(--accent-soft); border-radius: 6px; display: flex; justify-content: space-between; font-weight: 600; }

/* Cards and grids */
.grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.section.alt .card { background: var(--bg); }
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); margin-bottom: 0.7rem; }
.icon svg { width: 22px; height: 22px; }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.steps > li { counter-increment: step; margin: 0; }
.steps h3 { margin: 0 0 0.5rem; }
.steps h3::before { content: counter(step); display: grid; place-items: center; width: 2rem; height: 2rem; margin-bottom: 0.85rem; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 0.95rem; }
.steps p { font-size: 0.97rem; }

/* Feature list: two wide columns, icon beside the text, so titles stay on one line and rows line up. */
.features { gap: 1rem 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.features .card { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1rem; align-items: start; align-content: start; padding: 1.2rem 1.35rem; }
.features .icon { grid-row: span 2; margin: 0.1rem 0 0; }
.features h3 { margin: 0.15rem 0 0.3rem; font-size: 1.08rem; }
.features p { margin: 0; font-size: 0.97rem; color: var(--muted); }

.pain { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 1.6rem; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0.1rem; top: 0.45em; width: 0.75rem; height: 0.4rem; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }

.privacy-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (max-width: 760px) { .privacy-block { grid-template-columns: 1fr; } }
.note { background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 10px; padding: 0.9rem 1.1rem; }
.note p:last-child { margin-bottom: 0; }

/* Pricing */
.pricing { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); max-width: 820px; }
.plan { display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--accent); }
.plan h3 { margin: 0 0 0.3rem; }
.price { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; line-height: 1.2; }
.price small { display: block; margin-top: 0.2rem; font-size: 0.95rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.pricing + p { margin-top: 1.2rem; }
.plan .checklist { flex: 1; margin: 1rem 0 1.2rem; }
.soon { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 0.05rem 0.45rem; margin-left: 0.25rem; white-space: nowrap; }

/* FAQ */
.faq { max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font-weight: 600; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 0.3rem; top: 0.9rem; font-size: 1.3rem; color: var(--accent); line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 0 1rem; }
.faq-answer p:last-child { margin-bottom: 0; }

.faq-more { margin-top: 1.5rem; }
.final-cta { text-align: center; }
.final-cta .lead { margin-inline: auto; }
.final-cta .hero-actions { justify-content: center; }

/* Articles */
.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.3rem; font-size: 0.9rem; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 0.3rem; color: var(--muted); }
.article-meta { color: var(--muted); font-size: 0.92rem; margin-top: -0.4rem; }
.article h2 { margin-top: 2.2em; }
.article .intro { font-size: 1.12rem; }
.summary { background: var(--accent-soft); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin: 1.5rem 0; }
.summary h2 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.summary ul { margin: 0; padding-left: 1.2rem; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.table-wrap caption { text-align: left; padding: 0.7rem 0.8rem 0.2rem; font-weight: 600; }
.table-wrap th, .table-wrap td { padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.table-wrap td.num, .table-wrap th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap tr.group td { background: var(--accent-soft); font-weight: 700; }
.table-wrap tr.total td { font-weight: 700; border-top: 2px solid var(--text); }
.example { border-left: 4px solid var(--accent); background: var(--surface); padding: 0.9rem 1.2rem; border-radius: 0 10px 10px 0; margin: 0 0 1.2rem; }
.example p:last-child { margin-bottom: 0; }
.sources { font-size: 0.92rem; }
.sources li { overflow-wrap: anywhere; }
.cta-box { background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); padding: 1.3rem 1.5rem; margin: 2.5rem 0 1.5rem; }
.cta-box h2 { margin: 0 0 0.5rem; font-size: 1.3rem; }
.cta-box p:last-child { margin-bottom: 0; }
.article .disclaimer, .wrap.narrow > .disclaimer { color: var(--muted); font-size: 0.88rem; }

/* Guide index */
.guide-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.guide-list li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 0; }
.guide-list h2 { font-size: 1.25rem; margin: 0 0 0.4rem; }
.guide-list h2 a { text-decoration: none; }
.guide-list h2 a:hover { text-decoration: underline; }
.guide-list p { margin: 0 0 0.4rem; color: var(--muted); }
.guide-list .more { font-weight: 600; text-decoration: none; }

/* Simple prose pages (privacy, 404) */
.prose h2 { font-size: 1.35rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media print {
  .site-header, .site-footer .footer-links, .cta-box, .skip { display: none; }
  :root:not([data-theme="print-never"]) { /* specificity ≥ the dark-mode selectors, so print is always light */ --bg: #fff; --surface: #fff; --text: #000; --muted: #333; }
}

/* Light/dark toggle (shared look with the app). Shows a moon in light mode, a sun in dark mode. */
.theme-toggle { display: inline-grid; place-items: center; width: 36px; height: 36px; min-height: 0; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
