/* Shared visual system for Nuvink's hand-uploaded legal pages. */
:root {
  --navy: #0b1437;
  --navy-2: #121e4c;
  --bg: #f5f8ff;
  --card: #ffffff;
  --card-muted: #f8faff;
  --ink-1: #101936;
  --ink-2: #475477;
  --ink-3: #7180a0;
  --border: #dbe3f3;
  --accent: #2563eb;
  --accent-2: #8b5cf6;
  --accent-soft: #eaf1ff;
  --accent-ink: #ffffff;
  --danger: #c2413b;
  --danger-bg: #fff0ef;
  --shadow: 0 20px 50px rgba(34, 62, 122, 0.1);
  /* The page as a notebook: ruled lines and a margin, in the brand blue. */
  --rule: rgba(37, 99, 235, 0.06);
  --margin-rule: rgba(139, 92, 246, 0.12);
  --glow-1: rgba(34, 184, 245, 0.14);
  --glow-2: rgba(139, 92, 246, 0.12);
  --ribbon-opacity: 0.09;
}

/* Dark: when the device asks for it, unless the reader chose light with the
   header button; or whenever the reader chose dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #080f28;
    --card: #101a3d;
    --card-muted: #0d1633;
    --ink-1: #f4f7ff;
    --ink-2: #c2cce4;
    --ink-3: #8998bd;
    --border: #27365f;
    --accent: #62a7ff;
    --accent-2: #a78bfa;
    --accent-soft: #172959;
    --danger: #ff857c;
    --danger-bg: #3a1d2a;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.26);
    --rule: rgba(98, 167, 255, 0.05);
    --margin-rule: rgba(167, 139, 250, 0.14);
    --glow-1: rgba(34, 184, 245, 0.10);
    --glow-2: rgba(139, 92, 246, 0.12);
    --ribbon-opacity: 0.12;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #080f28;
  --card: #101a3d;
  --card-muted: #0d1633;
  --ink-1: #f4f7ff;
  --ink-2: #c2cce4;
  --ink-3: #8998bd;
  --border: #27365f;
  --accent: #62a7ff;
  --accent-2: #a78bfa;
  --accent-soft: #172959;
  --danger: #ff857c;
  --danger-bg: #3a1d2a;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.26);
  --rule: rgba(98, 167, 255, 0.05);
  --margin-rule: rgba(167, 139, 250, 0.14);
  --glow-1: rgba(34, 184, 245, 0.10);
  --glow-2: rgba(139, 92, 246, 0.12);
  --ribbon-opacity: 0.12;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  min-width: 320px;
  /* Ink glows in the logo's two colours, a notebook margin, and ruled lines. */
  background-color: var(--bg);
  background-image:
    radial-gradient(640px 420px at 100% 100%, var(--glow-2), transparent 70%),
    radial-gradient(560px 380px at 0% 55%, var(--glow-1), transparent 70%),
    linear-gradient(to right, transparent 72px, var(--margin-rule) 72px, var(--margin-rule) 73px, transparent 73px),
    repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule) 31px 32px);
  background-attachment: fixed;
  color: var(--ink-1);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.7;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 260px;
  z-index: -1;
  background:
    repeating-linear-gradient(to bottom, transparent 0 31px, rgba(255, 255, 255, 0.035) 31px 32px),
    linear-gradient(135deg, var(--navy) 0%, #12235a 58%, #1e3f9a 100%);
}
/* The ink ribbon from the logo's N, drawn faintly in a corner. */
body::after {
  content: "";
  position: fixed;
  inset-inline-end: -40px;
  bottom: -30px;
  width: 520px;
  height: 360px;
  z-index: -1;
  pointer-events: none;
  opacity: var(--ribbon-opacity);
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 520 360'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='1' x2='1' y2='0'%3E%3Cstop offset='0' stop-color='%2322B8F5'/%3E%3Cstop offset='.55' stop-color='%232563EB'/%3E%3Cstop offset='1' stop-color='%238B5CF6'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M20 320 C 90 300 120 90 190 70 C 260 50 270 290 340 300 C 390 308 420 230 470 60' fill='none' stroke='url(%23g)' stroke-width='34' stroke-linecap='round'/%3E%3C/svg%3E");
}

.wrap { width: min(1160px, 100%); margin: 0 auto; padding: 28px 24px 72px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 56px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.brand .logo { width: 40px; height: 40px; object-fit: contain; }
.brand .name { font-size: 21px; font-weight: 760; letter-spacing: -0.03em; }
.langbtn {
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.1);
  color: #fff;
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.langbtn:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.5); transform: translateY(-1px); }
.topbar-actions { display: inline-flex; align-items: center; gap: 8px; }
/* Day / night, beside the language button and styled like it. */
.themebtn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.1);
  color: #fff;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.themebtn:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.5); transform: translateY(-1px); }
.themebtn svg { width: 18px; height: 18px; }
.langbtn:focus-visible, a:focus-visible, input:focus-visible, button:focus-visible { outline: 3px solid #8bc5ff; outline-offset: 3px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 28px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: clamp(26px, 4vw, 50px); box-shadow: var(--shadow); min-width: 0; }
.hero { border-bottom: 1px solid var(--border); padding-bottom: 24px; margin-bottom: 26px; }
.badge { display: inline-flex; align-items: center; gap: 7px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 5px 11px; font-size: 11px; font-weight: 800; letter-spacing: .04em; margin-bottom: 15px; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(135deg, #22b8f5, var(--accent-2)); }
h1 { font-size: clamp(29px, 4vw, 42px); line-height: 1.18; letter-spacing: -0.04em; margin: 0 0 8px; }
.subtitle { color: var(--ink-3); font-size: 13px; margin: 0; }
h2 { scroll-margin-top: 24px; font-size: 19px; line-height: 1.35; letter-spacing: -0.02em; margin: 34px 0 10px; }
p, li { color: var(--ink-2); font-size: 15px; }
p { margin: 0 0 17px; }
ul { padding-inline-start: 22px; margin: 10px 0 20px; }
li { margin: 8px 0; padding-inline-start: 3px; }
strong { color: var(--ink-1); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }

.toc { position: sticky; top: 24px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 20px 18px; box-shadow: 0 12px 30px rgba(34,62,122,.06); }
.toc-label { color: var(--ink-3); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 10px; }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0; padding: 0; }
.toc a { display: block; color: var(--ink-2); font-size: 13px; line-height: 1.4; text-decoration: none; padding: 7px 9px; border-radius: 9px; }
.toc a:hover { background: var(--accent-soft); color: var(--accent); }

footer { text-align: center; color: var(--ink-3); font-size: 12px; margin-top: 28px; }
footer a { color: inherit; }

/* delete-account.html form bits */
.form-intro { color: var(--ink-2); margin-bottom: 20px; }
label { display: block; font-size: 13px; font-weight: 750; color: var(--ink-1); margin: 17px 0 6px; }
input[type="email"], input[type="password"], input[type="text"] {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--card-muted); color: var(--ink-1); font: inherit; font-size: 14.5px;
}
input:focus { border-color: var(--accent); outline: 2px solid color-mix(in srgb, var(--accent) 28%, transparent); outline-offset: 1px; }
.warning { background: var(--danger-bg); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 18%, transparent); border-radius: 14px; padding: 15px 16px; font-size: 13.5px; margin: 20px 0; }
button.primary {
  width: 100%; margin-top: 20px; padding: 13px 16px; border: 0; border-radius: 12px;
  background: linear-gradient(100deg, var(--danger), #e45d57); color: #fff; font: inherit; font-size: 15px; font-weight: 750; cursor: pointer;
  transition: filter .2s ease, transform .2s ease;
}
button.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
button.primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.msg { margin-top: 16px; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; display: none; }
.msg.show { display: block; }
.msg.ok { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.msg.err { background: var(--danger-bg); color: var(--danger); }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: -2px; margin-inline-end: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
[dir="rtl"] { font-family: Tahoma, Arial, sans-serif; }

@media (max-width: 820px) {
  .wrap { padding: 22px 18px 52px; }
  .topbar { margin-bottom: 34px; }
  .layout { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; }
  .toc ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; }
}
/* On a phone the page is short enough to scroll; the table of contents only
   pushed the text down. It stays on tablets and wider screens. */
@media (max-width: 600px) {
  .toc { display: none; }
  body { background-image:
    radial-gradient(420px 300px at 100% 100%, var(--glow-2), transparent 70%),
    repeating-linear-gradient(to bottom, transparent 0 31px, var(--rule) 31px 32px); }
  body::after { width: 320px; height: 220px; }
}
@media (max-width: 480px) {
  .wrap { padding-inline: 14px; }
  .topbar { margin-bottom: 28px; }
  .brand .logo { width: 36px; height: 36px; }
  .brand .name { font-size: 19px; }
  .langbtn { padding: 7px 12px; }
  .card { border-radius: 18px; padding: 23px 18px; }
  .toc { padding: 16px 13px; }
  .toc ul { display: block; }
  .toc a { padding: 6px 7px; }
  p, li { font-size: 14.5px; }
}
