/* lemonGba legal — flat black shell (app Settings language) */
:root {
  --bg: #000000;
  --lemon: #ffd93d;
  --cream: #fff8e7;
  --on-lemon: #0b0c10;
  --label-dim: #8e8e9c;
  --label-on: #e8e8f0;
  --hairline: rgba(232, 232, 240, 0.14);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max-w: 40rem;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --gutter: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--label-on);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--lemon);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

code {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  color: var(--lemon);
  word-break: break-all;
}

/* ── Shell / header ────────────────────────────────────────────────────── */

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--hairline);
  padding:
    calc(10px + var(--safe-t))
    max(var(--gutter), var(--safe-r))
    10px
    max(var(--gutter), var(--safe-l));
}

.topbar-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
  color: var(--cream);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  min-height: 40px;
  padding: 2px 0;
  -webkit-tap-highlight-color: transparent;
}

.brand:hover {
  color: var(--lemon);
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: block;
  flex-shrink: 0;
}

/* Always one row with brand: Privacy | Terms */
.nav {
  display: flex;
  flex-direction: row;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--label-dim);
  font-weight: 700;
  font-size: 0.8125rem;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.nav a:hover {
  color: var(--cream);
  border-color: rgba(255, 217, 61, 0.35);
  text-decoration: none;
}

.nav a:active {
  opacity: 0.9;
}

.nav a.active {
  color: var(--on-lemon);
  background: var(--lemon);
  border-color: var(--lemon);
}

.main {
  flex: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding:
    24px
    max(var(--gutter), var(--safe-r))
    calc(40px + var(--safe-b))
    max(var(--gutter), var(--safe-l));
}

.footer {
  padding:
    16px
    max(var(--gutter), var(--safe-r))
    calc(16px + var(--safe-b))
    max(var(--gutter), var(--safe-l));
  text-align: center;
  color: var(--label-dim);
  font-size: 0.75rem;
  line-height: 1.5;
  border-top: 1px solid var(--hairline);
}

.footer a {
  color: var(--label-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 4px;
}

.footer a:hover {
  color: var(--lemon);
}

/* ── Type ──────────────────────────────────────────────────────────────── */

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--label-dim);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 7vw, 2.125rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--cream);
  letter-spacing: -0.02em;
}

.meta {
  margin: 0 0 24px;
  color: var(--label-dim);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.meta strong {
  color: var(--label-on);
  font-weight: 600;
}

.prose {
  max-width: 100%;
}

.prose > :first-child {
  margin-top: 0;
}

/* Section labels like app Settings */
h2 {
  margin: 32px 0 12px;
  padding-top: 16px;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--lemon);
  line-height: 1.35;
  border-top: 1px solid var(--hairline);
}

.prose > h2:first-of-type {
  margin-top: 8px;
}

h3 {
  margin: 20px 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--cream);
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  border: none;
  padding: 0;
}

p {
  margin: 0 0 12px;
  color: var(--label-on);
  font-size: 1rem;
  line-height: 1.65;
}

ul,
ol {
  margin: 0 0 12px;
  padding-left: 1.2rem;
}

li {
  margin-bottom: 8px;
  color: var(--label-on);
  font-size: 1rem;
  line-height: 1.55;
}

li::marker {
  color: var(--lemon);
}

strong {
  color: var(--cream);
  font-weight: 700;
}

.note {
  margin: 16px 0 24px;
  padding: 0 0 0 12px;
  border-left: 2px solid var(--lemon);
  background: transparent;
  color: var(--label-on);
  font-size: 1rem;
  line-height: 1.6;
}

/* Data deletion / legal comparison tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 0.9375rem;
  line-height: 1.5;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.prose thead,
.prose tbody,
.prose tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.prose th,
.prose td {
  border: 1px solid var(--hairline);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  color: var(--label-on);
  word-wrap: break-word;
}

.prose th {
  color: var(--cream);
  font-weight: 700;
  background: rgba(255, 217, 61, 0.06);
}

.note strong {
  color: var(--lemon);
}

.contact {
  margin-top: 32px;
  padding-top: 8px;
}

.contact h2 {
  margin-top: 0;
}

/* ── Home: big tappable doc buttons ────────────────────────────────────── */

.hero {
  margin-bottom: 28px;
}

.hero .lead {
  margin: 0;
  font-size: 1rem;
  color: var(--label-on);
  line-height: 1.6;
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 88px;
  padding: 18px 16px;
  margin: 0;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: transparent;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

.doc-btn:hover {
  border-color: var(--lemon);
  text-decoration: none;
}

.doc-btn:active {
  background: rgba(255, 217, 61, 0.06);
}

.doc-btn-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
  text-align: left;
}

.doc-btn-title {
  font-weight: 800;
  font-size: 1.0625rem;
  color: var(--cream);
  line-height: 1.25;
}

.doc-btn-desc {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--label-dim);
  line-height: 1.4;
}

.doc-btn-go {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--lemon);
  color: var(--on-lemon);
  font-weight: 800;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

.doc-btn:hover .doc-btn-title {
  color: var(--lemon);
}

/* ── Desktop / wider ───────────────────────────────────────────────────── */

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }

  .brand {
    font-size: 1.125rem;
  }

  .brand img {
    width: 30px;
    height: 30px;
  }

  .nav {
    gap: 8px;
  }

  .nav a {
    min-height: 40px;
    padding: 10px 14px;
    font-size: 0.875rem;
  }

  .main {
    padding-top: 32px;
  }

  .doc-btn {
    padding: 20px 20px;
  }
}
