:root {
  --paper: #f6f5fb;
  --surface: #ffffff;
  --ink: #171521;
  --muted: #686475;
  --line: #e4e1ec;
  --accent: #5b3df5;
  --accent-deep: #3e25d7;
  --accent-soft: #efebff;
  --shadow: 0 24px 60px rgba(32, 24, 74, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(91, 61, 245, 0.11), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(72, 191, 145, 0.09), transparent 28%),
    var(--paper);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--accent-deep); }
a:hover { color: var(--accent); }

.site-header {
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--accent);
  font-weight: 800;
}

.header-links { display: flex; align-items: center; gap: 8px; }
.header-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.header-links a:hover { color: var(--accent); background: var(--accent-soft); }

.legal-shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 42px 24px 88px;
}

.legal-card {
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 62px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.meta { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.lead {
  margin: 30px 0 0;
  padding: 20px 22px;
  border-left: 4px solid var(--accent);
  border-radius: 0 14px 14px 0;
  color: #3d3849;
  background: var(--accent-soft);
  font-size: 16px;
  line-height: 1.7;
}

.policy-nav {
  margin: 32px 0 6px;
  padding: 16px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfaff;
  font-size: 13px;
}
.policy-nav strong { color: var(--ink); }

section { padding-top: 30px; }
h2 {
  margin: 0 0 12px;
  font-size: 23px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
h3 { margin: 22px 0 8px; font-size: 17px; }
p, li { color: #484352; font-size: 15px; line-height: 1.72; }
p { margin: 10px 0; }
ul, ol { margin: 10px 0; padding-left: 24px; }
li + li { margin-top: 7px; }
.contact-box {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfaff;
}
.contact-box p { margin: 4px 0; }

.site-footer {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 24px 42px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}
.site-footer nav { margin-bottom: 10px; }
.site-footer a { margin: 0 8px; color: var(--muted); }

@media (max-width: 640px) {
  .site-header { align-items: flex-start; padding: 16px; }
  .header-links { flex-wrap: wrap; justify-content: flex-end; }
  .header-links a { padding: 7px 8px; font-size: 12px; }
  .legal-shell { padding: 24px 14px 58px; }
  .legal-card { border-radius: 20px; }
}

/* Terms uses the Figma legal desktop/compact structure without changing the
   shared Privacy and Refund page layout above. */
.terms-page {
  background: var(--public-bg);
  background-image: none;
}

.terms-page .terms-shell {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  padding: 68px 0 96px;
}

.terms-page .terms-heading h1 {
  margin: 0;
  color: var(--public-ink);
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 52px;
}

.terms-page .terms-heading .meta {
  margin: 12px 0 0;
  color: var(--public-faint);
  font-size: 12px;
  line-height: 20px;
}

.terms-page .terms-layout {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 180px minmax(0, 760px);
  gap: 80px;
  align-items: start;
}

.terms-page .terms-sidebar {
  position: sticky;
  top: 32px;
}

.terms-page .terms-sidebar nav { display: grid; }

.terms-page .terms-sidebar a {
  min-height: 32px;
  display: flex;
  align-items: center;
  color: var(--public-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
}

.terms-page .terms-sidebar a:hover,
.terms-page .terms-sidebar a[aria-current="page"] { color: var(--public-ink); }
.terms-page .terms-sidebar a[aria-current="page"]::before { content: ""; width: 3px; height: 18px; margin-right: 9px; border-radius: 99px; background: var(--public-accent); }

.terms-page .terms-article { min-width: 0; }

.terms-page .terms-article .lead {
  margin: 0 0 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--public-muted);
  background: transparent;
  font-size: 14px;
  line-height: 28px;
}

.terms-page .terms-article section {
  padding-top: 0;
  margin-top: 28px;
}

.terms-page .terms-article h2 {
  margin: 0 0 8px;
  color: var(--public-ink);
  font-family: "IBM Plex Sans", "Noto Sans SC", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 28px;
}

.terms-page .terms-article h3 { font-size: 14px; line-height: 28px; }

.terms-page .terms-article p,
.terms-page .terms-article li {
  color: var(--public-muted);
  font-size: 14px;
  line-height: 28px;
}

.terms-page .terms-article p { margin: 0; }
.terms-page .terms-article p + p { margin-top: 12px; }
.terms-page .terms-article ul,
.terms-page .terms-article ol { margin: 4px 0 0; padding-left: 22px; }
.terms-page .terms-article li + li { margin-top: 4px; }

.terms-page .contact-box {
  margin-top: 10px;
  padding: 18px 20px;
  border: 1px solid var(--public-line);
  border-radius: 14px;
  background: #fff;
}

@media (max-width: 900px) {
  .terms-page .terms-shell { width: min(738px, calc(100% - 48px)); }
  .terms-page .terms-layout { grid-template-columns: 160px minmax(0, 1fr); gap: 48px; }
}

@media (max-width: 640px) {
  .terms-page .terms-shell {
    width: 100%;
    padding: 44px 20px 72px;
  }
  .terms-page .terms-heading h1 { font-size: 30px; line-height: 40px; }
  .terms-page .terms-heading .meta { margin-top: 10px; }
  .terms-page .terms-layout { margin-top: 46px; display: block; }
  .terms-page .terms-sidebar { display: none; }
  .terms-page .terms-article .lead { margin-bottom: 28px; }
}
