/* AnyDroid — privacy policy pages. Same look as the homepage, tuned for reading. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f7f8fa;
  --ink: #202124;
  --text: #3c4043;
  --muted: #5f6368;
  --line: #e6e8eb;
  --green: #39d982;
  --green-deep: #22b269;
  --green-ink: #127a45;
  --green-soft: #eafbf1;
  --green-ring: #c9f2da;
  --lavender: #f4f2fc; --lavender-ring: #e8e3f8;
  --yellow: #fffae8;   --yellow-ring: #f8e8ad;

  --display: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Varela Round", system-ui, sans-serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --max-width: 1180px;
  --reading-width: 720px;
  --gutter: 40px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c;
    --surface: #191d23;
    --ink: #eef0f3;
    --text: #c9ced6;
    --muted: #a4abb6;
    --line: #2a2f38;
    --green-ink: #5fe39b;
    --green-soft: #15261d;
    --green-ring: #1e3a2a;
    --lavender: #1e1c2b; --lavender-ring: #2b2741;
    --yellow: #24211a;   --yellow-ring: #3a3322;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
a:focus-visible {
  outline: 3px solid var(--green-ink);
  outline-offset: 3px;
  border-radius: 8px;
}

.shell {
  width: min(calc(100% - var(--gutter) * 2), var(--max-width));
  margin: 0 auto;
}

/* Header (full-width bar, content aligned to the page column) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  min-height: 76px;
  background: var(--bg);
  /* Shadows paint the full-width bar and its bottom line without widening the page. */
  box-shadow: 0 0 0 100vmax var(--bg), 0 1px 0 100vmax var(--line);
  clip-path: inset(0 -100vmax -1px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-family: var(--display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand::before {
  content: "";
  display: block;
  width: 36px;
  height: 36px;
  background: url("/assets/favicon.svg") center / contain no-repeat;
}

/* Language links (if a page has them) */
.site-header nav { margin-left: auto; color: var(--muted); font-size: 15px; }
.site-header nav a { font-weight: 600; text-decoration: none; }
.site-header nav a:hover { color: var(--ink); }

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 6vw, 72px);
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  width: 320px;
  height: 320px;
  right: 0;
  top: -150px;
  background: var(--lavender);
  border: 30px solid var(--lavender-ring);
}
.hero::after {
  width: 150px;
  height: 150px;
  right: 230px;
  bottom: -10px;
  background: var(--yellow);
  border: 22px solid var(--yellow-ring);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 7px 16px 7px 12px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-ink);
  font-size: 15px;
  font-weight: 700;
}
.kicker::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green-deep);
}

h1 {
  max-width: 14em;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(44px, 6.4vw, 80px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1;
}

.hero-copy {
  max-width: 34em;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.55;
}

.effective-date {
  display: inline-flex;
  margin-top: 26px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

/* Layout */
.policy-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, var(--reading-width));
  gap: clamp(40px, 7vw, 88px);
  align-items: start;
  padding-bottom: clamp(88px, 11vw, 136px);
}

/* Contents */
.contents {
  position: sticky;
  top: 100px;
  padding: 22px;
  border-radius: 24px;
  background: var(--surface);
}

.contents-title {
  margin: 0 0 10px;
  padding-left: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.contents ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: policy-section;
}
.contents li { counter-increment: policy-section; }

.contents a {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  min-height: 42px;
  padding: 6px 10px;
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.contents a::before {
  content: counter(policy-section, decimal-leading-zero);
  color: var(--green-ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}
.contents a:hover { background: var(--bg); color: var(--ink); }

/* Policy text */
.policy { min-width: 0; }

.policy-section { padding: 0 0 48px; }
.policy-section + .policy-section {
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

.section-number {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 28px;
  margin: 0 0 16px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
}

h2 {
  margin: 0 0 20px;
  font-family: var(--display);
  font-size: clamp(28px, 3.2vw, 36px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.12;
}

h3 {
  margin: 30px 0 10px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.015em;
}

.policy p,
.policy li {
  color: var(--text);
  font-size: 17px;
  line-height: 1.75;
}
.policy p { margin: 0 0 18px; }
.policy p:last-child { margin-bottom: 0; }

.policy ul, .policy ol {
  display: grid;
  gap: 8px;
  margin: 14px 0 20px;
  padding-left: 1.3rem;
}
.policy li::marker { color: var(--green-deep); }

.policy strong { color: var(--ink); font-weight: 700; }

.policy a {
  color: var(--green-ink);
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.policy a:hover { text-decoration-thickness: 2px; }

.policy a, .policy code { overflow-wrap: anywhere; }
.policy code {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--mono);
  font-size: .86em;
}

.notice {
  margin: 24px 0 8px;
  padding: 20px 24px;
  border-radius: 20px;
  background: var(--green-soft);
}
.notice p { color: var(--ink); }

.contact-card {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding: 24px;
  border-radius: 20px;
  background: var(--surface);
}
.contact-card p { margin: 0; }

/* Footer */
.site-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  min-height: 96px;
  color: var(--muted);
  font-size: 15px;
  background: var(--surface);
  box-shadow: 0 0 0 100vmax var(--surface), 0 -1px 0 100vmax var(--line);
  clip-path: inset(-1px -100vmax 0);
}

.footer-links { display: flex; gap: 8px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.footer-links a:hover { background: var(--bg); }

/* Responsive */
@media (max-width: 860px) {
  .policy-layout { grid-template-columns: 1fr; gap: 40px; }
  .contents { position: static; }
  .contents ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  html { scroll-padding-top: 80px; }
  .site-header { min-height: 64px; }
  .brand { font-size: 20px; }
  .brand::before { width: 30px; height: 30px; }
  .hero { padding: 44px 0 40px; }
  .hero::before { width: 180px; height: 180px; right: 0; top: -110px; border-width: 22px; }
  .hero::after { display: none; }
  .contents { padding: 16px; border-radius: 20px; }
  .contents ol { grid-template-columns: 1fr; }
  .policy p, .policy li { font-size: 16px; }
  .policy-section { padding-bottom: 40px; }
  .policy-section + .policy-section { padding-top: 40px; }
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 28px 0;
  }
  .footer-links { margin-left: -14px; }
}

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