/* Fenla — legal & support pages. Matches the app's design system:
   SF Pro · deep teal #015551 · accent #57B4BA · CTA #FE4F2D · Liquid Glass · light + dark. */

:root {
  --accent: #57b4ba;          /* brand accent (fixed in both modes) */
  --accent-deep: #015551;     /* headings / wordmark (light) */
  --accent-hover: #4a9da3;
  --cta: #fe4f2d;
  --grad: linear-gradient(135deg, #57b4ba 0%, #4a9da3 100%);

  --text: #1c1c1e;
  --text-muted: #6b6f76;
  --text-soft: #8a8f98;

  --bg: #f2f2f7;
  --card: #ffffff;
  --inset: #f2f2f7;
  --border: #ececf1;

  --shadow-sm: 0 4px 16px rgba(1, 85, 81, 0.06);
  --shadow-md: 0 14px 40px rgba(1, 85, 81, 0.10);
  --shadow-hero: 0 20px 54px rgba(87, 180, 186, 0.36);

  --maxw: 680px;
  --radius: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent-deep: #7fd6d0;   /* readable teal on black (app's dark secondary token) */
    --text: #f2f2f7;
    --text-muted: #aeaeb2;
    --text-soft: #98989e;
    --bg: #000000;
    --card: #1c1c1e;
    --inset: #2c2c2e;
    --border: rgba(255, 255, 255, 0.10);
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-hero: 0 20px 54px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji";
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---- Sticky glass header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--card); /* fallback for browsers without color-mix */
  background: color-mix(in srgb, var(--card) 72%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
}
.brand .dot { color: var(--cta); }
.nav a {
  margin-left: 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}
.nav a:hover { color: var(--accent-deep); }

/* ---- Content shell ---- */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 44px 20px 72px;
}
.doc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 40px 40px 16px;
}

h1 {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--accent-deep);
  margin: 0 0 8px;
}
.effective {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0 0 12px;
}
h2 {
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--accent-deep);
  margin: 36px 0 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
h2::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--accent);
  transform: translateY(-2px);
}
h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent-deep);
  margin: 24px 0 6px;
}
p, li { font-size: 17px; }
ul { padding-left: 22px; margin: 10px 0; }
li { margin: 6px 0; }
li::marker { color: var(--accent); }
strong { font-weight: 650; color: var(--text); }
em { color: var(--text-muted); }
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 30px 0;
}
.doc p a, .doc li a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); }

/* ---- Landing hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--grad);
  color: #fff;
  border-radius: 28px;
  padding: 64px 32px 56px;
  text-align: center;
  box-shadow: var(--shadow-hero);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% -10%, rgba(255, 255, 255, 0.35), transparent 60%);
  pointer-events: none;
}
.hero h1 {
  position: relative;
  color: #fff;
  font-size: 40px;
  letter-spacing: -0.03em;
  margin: 0 auto;
  max-width: 16ch;
}
.hero p {
  position: relative;
  color: rgba(255, 255, 255, 0.92);
  font-size: 19px;
  margin: 14px auto 0;
  max-width: 38ch;
}

/* ---- Landing link cards ---- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 22px;
}
.card {
  position: relative;
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 22px 52px 22px 24px;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: var(--shadow-md);
}
.card h2 {
  display: block;
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--accent-deep);
}
.card h2::before { display: none; }
.card p { margin: 0; color: var(--text-muted); font-size: 15px; }
.card::after {
  content: "›";
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  line-height: 1;
  color: var(--accent);
  transition: transform 0.18s ease;
}
.card:hover::after { transform: translate(4px, -50%); }

/* ---- Support contact ---- */
.contact-box {
  background: color-mix(in srgb, var(--accent) 9%, var(--card));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: 16px;
  padding: 20px 22px;
  margin: 22px 0;
}
.contact-box .email {
  font-size: 19px;
  font-weight: 700;
  word-break: break-all;
  margin: 0;
}
.contact-box .email a { color: var(--accent-deep); }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--card);
}
.site-footer .wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 20px;
  color: var(--text-soft);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  justify-content: space-between;
}
.site-footer a { color: var(--text-soft); font-weight: 600; }
.site-footer a:hover { color: var(--accent-deep); }
.site-footer .links a { margin-left: 16px; }
.site-footer .links a:first-child { margin-left: 0; }

/* ---- Mobile ---- */
@media (max-width: 540px) {
  body { font-size: 16px; }
  main { padding: 28px 16px 56px; }
  .doc { padding: 26px 20px 6px; border-radius: 18px; }
  h1 { font-size: 28px; }
  .hero { padding: 48px 22px 44px; border-radius: 22px; }
  .hero h1 { font-size: 31px; }
  .hero p { font-size: 17px; }
  .nav a { margin-left: 14px; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .site-footer .links a:first-child { margin-left: 0; }
}

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