/* Kita — shared styles for Terms, Privacy and Refund pages.
   Matches index.html / pricing.html (same tokens, nav and footer). */

:root {
  --bg: #f3f5f4;
  --surface: #ffffff;
  --ink: #1a2230;
  --muted: #5b6575;
  --line: #d9dee3;
  --brand: #5b4cf0;
  --brand-dark: #4537d6;
  --brand-tint: #eceafe;

  --display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;

  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand);
  display: grid;
  place-items: center;
}

.logo-mark svg { width: 16px; height: 16px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
}

.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }

.nav-links .btn {
  display: inline-flex;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 9px 16px;
  border-radius: 10px;
  transition: background-color 0.15s ease;
}

.nav-links .btn:hover { background: var(--brand-dark); color: #fff; }

@media (max-width: 640px) {
  .nav-links .hide-sm { display: none; }
}

/* ---------- Document layout ---------- */
.doc-head {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
}

.doc-head h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.4rem, 5.6vw, 3.8rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.updated {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.doc {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 64px;
  padding-top: 48px;
}

/* Contents list: section jump links */
.toc {
  position: sticky;
  top: 24px;
  align-self: start;
  font-size: 0.9rem;
}

.toc p {
  margin: 0 0 10px;
  font-weight: 600;
}

.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}

.toc a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
}

.toc a:hover {
  color: var(--ink);
  border-left-color: var(--brand);
}

/* Body text */
.prose { max-width: 68ch; }

.prose > *:first-child { margin-top: 0; }

.prose p { margin: 0 0 16px; }

.prose h2 {
  font-family: var(--display);
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 48px 0 14px;
  scroll-margin-top: 24px;
}

.prose ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--brand); }

.prose a {
  color: var(--brand-dark);
  font-weight: 500;
  text-underline-offset: 2px;
}

.prose strong { font-weight: 600; }

.prose code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}

/* "The short version" summary */
.callout {
  margin: 0 0 32px;
  padding: 20px 24px;
  background: var(--brand-tint);
  border-left: 3px solid var(--brand);
  border-radius: 0 12px 12px 0;
  color: var(--ink);
}

.callout strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--display);
  font-size: 1.05rem;
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 112px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

.footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer a { text-decoration: none; }
.footer a:hover, .footer a[aria-current] { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .doc { grid-template-columns: 1fr; gap: 32px; }
  .toc { position: static; }
  .footer { margin-top: 80px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .doc-head { padding: 32px 0 28px; }
  .doc { padding-top: 32px; }
  .callout { padding: 16px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
