/* ============================================================
   appsstore.ai — Legal pages
   Shared styling for Terms, Privacy, DPA, and other policies.
   Reuses the brand tokens from styles.css.
   ============================================================ */

:root {
  --bg: #f4f3ef;
  --ink: #111110;
  --ink-soft: #2a2a26;
  --lime: #c8ff00;
  --lime-deep: #3f5e00;
  --muted: #57564e;
  --muted-2: #8a887e;
  --line: #e2e0d8;
  --line-2: #d6d4ca;
  --card-line: #e6e4db;

  --sans: 'Geist', system-ui, -apple-system, sans-serif;
  --display: 'Space Grotesk', var(--sans);
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', monospace;

  --maxw: 1100px;
  --readw: 720px;
  --pad: 32px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}
::selection { background: var(--lime); color: var(--ink); }

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

/* ---- nav ---- */
.lnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 243, 239, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.lnav__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px var(--pad); gap: 24px;
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand__logo {
  width: 27px; height: 27px; border-radius: 8px; background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  color: var(--bg); font-weight: 700; font-family: var(--display); font-size: 15px;
}
.brand__name { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.brand__name .dim { color: var(--muted-2); }
.lnav__back { font-size: 14px; color: var(--muted); transition: color .15s; }
.lnav__back:hover { color: var(--ink); }

/* ---- layout ---- */
.lwrap {
  max-width: var(--maxw); margin: 0 auto;
  padding: 56px var(--pad) 80px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
@media (min-width: 940px) {
  .lwrap { grid-template-columns: 220px minmax(0, 1fr); gap: 56px; }
}

/* ---- table of contents ---- */
.toc {
  align-self: start;
  position: sticky; top: 92px;
  font-size: 13.5px;
}
.toc__head {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  color: var(--muted-2); margin-bottom: 12px;
}
.toc ol { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.toc a { color: var(--muted); transition: color .15s; display: block; line-height: 1.4; }
.toc a:hover { color: var(--ink); }
@media (max-width: 939px) {
  .toc { position: static; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; background: #fbfaf7; }
}

/* ---- document ---- */
.doc { max-width: var(--readw); }
.doc__eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  color: var(--muted-2); margin-bottom: 14px;
}
.doc__title {
  font-family: var(--display); font-weight: 600;
  font-size: 40px; line-height: 1.03; letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.doc__meta {
  font-size: 13.5px; color: var(--muted);
  padding-bottom: 22px; margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 6px 18px;
}
.doc__meta strong { color: var(--ink); font-weight: 600; }

.doc h2 {
  font-family: var(--display); font-weight: 600;
  font-size: 22px; letter-spacing: -0.02em;
  margin: 44px 0 14px; scroll-margin-top: 92px;
}
.doc h2 .num { color: var(--muted-2); font-weight: 500; margin-right: 10px; }
.doc h3 {
  font-family: var(--sans); font-weight: 600;
  font-size: 16.5px; margin: 26px 0 8px;
}
.doc p { margin: 0 0 15px; color: var(--ink-soft); }
.doc ul, .doc ol { margin: 0 0 15px; padding-left: 22px; color: var(--ink-soft); }
.doc li { margin-bottom: 7px; }
.doc li::marker { color: var(--muted-2); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc a { color: var(--lime-deep); text-decoration: underline; text-underline-offset: 2px; }
.doc code {
  font-family: var(--mono); font-size: 0.9em;
  background: #ecebe4; padding: 1px 6px; border-radius: 5px;
}

/* placeholder token to fill before launch */
.fill {
  font-family: var(--mono); font-size: 0.86em; font-weight: 500;
  background: var(--lime); color: var(--lime-deep);
  padding: 1px 7px; border-radius: 5px; white-space: nowrap;
}

/* callout / notice box */
.note {
  border: 1px solid var(--line-2); background: #fbfaf7;
  border-radius: 14px; padding: 20px 22px; margin: 22px 0;
  font-size: 14.5px;
}
.note--warn { border-color: #d9c24a; background: #fbf7e3; }
.note__label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--muted-2); margin-bottom: 8px;
}

/* summary table */
.doc table {
  width: 100%; border-collapse: collapse; margin: 18px 0 22px;
  font-size: 14px; display: block; overflow-x: auto;
}
.doc th, .doc td {
  text-align: left; padding: 11px 14px;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.doc th {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--muted); text-transform: uppercase; font-weight: 500;
  white-space: nowrap;
}

/* ---- footer ---- */
.lfoot {
  border-top: 1px solid var(--line);
  max-width: var(--maxw); margin: 0 auto;
  padding: 30px var(--pad) 48px;
  display: flex; flex-wrap: wrap; gap: 14px 26px;
  align-items: center;
  font-size: 13.5px; color: var(--muted);
}
.lfoot a { color: var(--muted); transition: color .15s; }
.lfoot a:hover { color: var(--ink); }
.lfoot__spacer { flex: 1 1 auto; }

/* index cards */
.lindex { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 8px; }
@media (min-width: 640px) { .lindex { grid-template-columns: 1fr 1fr; } }
.lcard {
  border: 1px solid var(--card-line); border-radius: 16px;
  padding: 22px 24px; background: #fbfaf7;
  transition: border-color .15s, transform .12s;
  display: block;
}
.lcard:hover { border-color: var(--line-2); transform: translateY(-2px); }
.lcard__title { font-family: var(--display); font-weight: 600; font-size: 18px; margin-bottom: 6px; letter-spacing: -0.01em; }
.lcard__body { font-size: 14px; color: var(--muted); line-height: 1.5; }
