/* Kena — shared design system for Support, Privacy Policy, and Terms & Conditions */

:root {
  color-scheme: light dark;
  --brand: #20573b;
  --brand-dark: #163d29;
  --brand-tint: #eaf3ee;
  --brand-tint-strong: #d8ecdf;
  --ink: #101828;
  --ink-soft: #475467;
  --ink-faint: #667085;
  --border: #e4e7ec;
  --border-soft: #eef1f4;
  --bg: #f8fafc;
  --card: #ffffff;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.06), 0 2px 4px -2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 32px -12px rgba(16, 24, 40, 0.16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--brand); text-underline-offset: 2px; }
::selection { background: var(--brand-tint-strong); color: var(--brand-dark); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
  font-size: 13px;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--brand);
  z-index: 60;
  transition: width 80ms linear;
}

/* ---------- Top nav ---------- */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.nav-brand img { display: block; height: 24px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover { background: var(--brand-tint); color: var(--brand-dark); }
.nav-links a[aria-current="page"] {
  background: var(--brand-tint);
  color: var(--brand-dark);
  font-weight: 600;
}

/* ---------- Hero ---------- */
.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 24px 32px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-tint);
  color: var(--brand);
  margin-bottom: 20px;
}
.hero-badge svg { width: 22px; height: 22px; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 700;
}
.hero p.lead {
  color: var(--ink-soft);
  font-size: 17px;
  max-width: 620px;
  margin: 0 0 22px;
}
.hero .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-faint);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
}

/* ---------- Layout ---------- */
.layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 8px 24px 96px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.layout.single { grid-template-columns: minmax(0, 1fr); max-width: 880px; }

/* ---------- Sidebar TOC ---------- */
nav.toc {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 4px;
}
nav.toc h2 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 12px;
  padding-left: 12px;
}
nav.toc ol { list-style: none; margin: 0; padding: 0; }
nav.toc li { margin: 0; }
nav.toc a {
  display: block;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 13.5px;
  padding: 8px 12px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
nav.toc a:hover { background: var(--brand-tint); color: var(--brand-dark); }
nav.toc a.active {
  color: var(--brand-dark);
  font-weight: 600;
  border-left-color: var(--brand);
  background: var(--brand-tint);
}

.toc-mobile { display: none; margin-bottom: 8px; }

/* ---------- Content card ---------- */
main.doc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 48px;
}

.intro {
  padding: 0 48px 8px;
  margin-bottom: 8px;
}
.intro p.lead { color: var(--ink-soft); font-size: 15.5px; }

section { scroll-margin-top: 96px; }
section + section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border-soft);
}

h2.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 21px;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  font-weight: 700;
}
h2.section-title .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  background: var(--brand-tint);
  border-radius: 9px;
}

h3 { font-size: 15.5px; margin: 22px 0 8px; font-weight: 600; }

p { margin: 0 0 14px; color: var(--ink); }
p.lead { color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }

ul, ol.plain { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 8px; }

.callout {
  background: var(--brand-tint);
  border: 1px solid var(--brand-tint-strong);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 0 0 16px;
  font-size: 14.5px;
}
.callout strong { color: var(--brand-dark); }

.caps {
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0.005em;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

address.contact {
  font-style: normal;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 14.5px;
  line-height: 1.8;
}

.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 44px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 22px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary:hover { background: var(--brand-dark); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-primary svg { width: 16px; height: 16px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  color: var(--ink) !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-secondary:hover { border-color: var(--brand); background: var(--brand-tint); }

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--border);
  background: var(--card);
  margin-top: 32px;
}
.site-footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}
.footer-brand { display: flex; align-items: flex-start; gap: 12px; max-width: 320px; }
.footer-brand img { height: 22px; margin-top: 3px; }
.footer-brand p { margin: 0; font-size: 13px; color: var(--ink-faint); line-height: 1.6; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 12px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--ink-soft); text-decoration: none; font-size: 13.5px; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  border-top: 1px solid var(--border-soft);
  color: var(--ink-faint);
  font-size: 12.5px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  nav.toc.desktop { display: none; }
  .toc-mobile { display: block; }
  .toc-mobile summary {
    cursor: pointer;
    list-style: none;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile[open] summary { border-radius: var(--radius-md) var(--radius-md) 0 0; border-bottom: none; }
  .toc-mobile .toc-body {
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 6px 10px 10px;
  }
  .toc-mobile ol { list-style: none; margin: 0; padding: 0; }
  .toc-mobile a {
    display: block;
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 13.5px;
    padding: 9px 10px;
    border-radius: 8px;
  }
  .toc-mobile a.active { color: var(--brand-dark); font-weight: 600; background: var(--brand-tint); }
  .intro { padding: 0 4px 8px; }
}

@media (max-width: 640px) {
  .nav-links a span.full { display: none; }
  main.doc { padding: 28px 20px; }
  .hero { padding: 40px 20px 20px; }
  .hero h1 { font-size: 30px; }
  .hero p.lead { font-size: 15.5px; }
  .site-footer-inner { padding: 32px 20px 36px; gap: 28px; }
  .footer-cols { gap: 32px; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4caf7d;
    --brand-dark: #7cd3a4;
    --brand-tint: #143523;
    --brand-tint-strong: #1b4a30;
    --ink: #eef1ef;
    --ink-soft: #b7c0bb;
    --ink-faint: #8a938d;
    --border: #262b28;
    --border-soft: #1d211f;
    --bg: #0c0f0d;
    --card: #141815;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px -12px rgba(0, 0, 0, 0.5);
  }
  header.nav { background: rgba(12, 15, 13, 0.75); }
  .meta-pill { background: var(--card); }
  .caps { background: #101310; }
  address.contact { background: #101310; }
}
