/* Shared look of the account and legal pages (same tokens as landing.css). */
  @import url("https://fonts.googleapis.com/css2?family=Comfortaa:wght@500;700&family=Inter:wght@400;500;600;700&display=swap");
  :root {
    --bg: #0b0d12; --bg-2: #11141b; --bg-3: #171b24;
    --fg: #e7e9ee; --fg-strong: #ffffff; --muted: #99a0b0;
    --line: rgba(255,255,255,0.09); --line-2: rgba(255,255,255,0.14);
    --red: #ff0000; --red-soft: #ff3b3b;
    --blue: #3b82f6; --green: #30c58f;
    --shadow: 0 24px 60px rgba(0,0,0,0.45);
    --font-brand: "Comfortaa", "Trebuchet MS", sans-serif;
    --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    color-scheme: dark;
  }
  @media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
      --bg: #ffffff; --bg-2: #f6f7f9; --bg-3: #eceff4;
      --fg: #333843; --fg-strong: #0a0c10; --muted: #5b6270;
      --line: rgba(0,0,0,0.10); --line-2: rgba(0,0,0,0.16);
      --blue: #005fb8; --green: #16a06f;
      --shadow: 0 24px 60px rgba(13,20,40,0.14);
      color-scheme: light;
    }
  }
  :root[data-theme="light"] {
    --bg: #ffffff; --bg-2: #f6f7f9; --bg-3: #eceff4;
    --fg: #333843; --fg-strong: #0a0c10; --muted: #5b6270;
    --line: rgba(0,0,0,0.10); --line-2: rgba(0,0,0,0.16);
    --blue: #005fb8; --green: #16a06f;
    --shadow: 0 24px 60px rgba(13,20,40,0.14);
    color-scheme: light;
  }

  * { box-sizing: border-box; }
  body {
    margin: 0; background: var(--bg); color: var(--fg);
    font-family: var(--font-ui); line-height: 1.6;
    -webkit-font-smoothing: antialiased; overflow-x: hidden;
  }
  body::before {
    content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
    z-index: 60; background: var(--bg);
  }
  a { color: inherit; }
  h1, h2, h3 { color: var(--fg-strong); text-wrap: balance; margin: 0; }
  .wrap {
    width: 100%; max-width: 1120px; margin: 0 auto;
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
  }
  .eyebrow {
    font-family: var(--font-brand); font-weight: 700; font-size: 0.72rem;
    letter-spacing: 0.16em; text-transform: uppercase; color: var(--red);
  }

  /* Wordmark */
  .mark { display: inline-flex; align-items: center; gap: 0.5em; text-decoration: none; }
  .lm { width: 2em; height: 2em; display: block; color: var(--fg-strong); flex: none; }
  .lm .sh { fill: currentColor; }
  .lm .pad { fill: var(--bg); }
  .lm .pad-s { fill: none; stroke: var(--bg); stroke-width: 3.4; stroke-linecap: round; }
  .lm .kh { fill: var(--red); }
  .foot .lm { width: 2em; height: 2em; }
  .word { font-family: var(--font-brand); font-weight: 700; letter-spacing: -0.01em; color: var(--fg-strong); }
  .word .vpn { color: var(--red); }

  /* Header */
  header {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
  }
  .nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
  .nav .word { font-size: 1.3rem; }
  .nav .lm { width: 2.4em; height: 2.4em; }
  .nav-right { display: flex; align-items: center; gap: 0.35rem; }
  .seg {
    display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px;
    overflow: hidden; background: var(--bg-2);
  }
  .seg button {
    appearance: none; border: 0; background: transparent; color: var(--muted);
    font-family: var(--font-ui); font-weight: 600; font-size: 0.8rem;
    padding: 0.32rem 0.7rem; cursor: pointer;
  }
  .seg button[aria-pressed="true"] { background: var(--red); color: #fff; }
  .theme-seg button { padding: 0.34rem 0.52rem; display: inline-flex; align-items: center; }
  .theme-seg button svg { width: 15px; height: 15px; display: block; }

  /* Footer */
  footer { border-top: 1px solid var(--line); padding-block: 2.4rem; margin-top: 2rem; }
  .foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
  .foot .word { font-size: 1.1rem; }
  .foot .muted { color: var(--muted); font-size: 0.86rem; }
  .brandline { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--font-brand); font-weight: 700; font-size: 0.95rem; }
  .brandline img { width: 1.1em; height: 1.1em; }
  .brandline .b { color: var(--red); }

  /* Document */
  .doc { padding-block: clamp(2.5rem, 6vw, 4rem); }
  .doc .wrap { max-width: 820px; }
  .doc h1 { font-family: var(--font-brand); font-weight: 700; font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin-top: 0.6rem; }
  .doc .updated { color: var(--muted); font-size: 0.9rem; margin-top: 0.6rem; }
  .doc .draft {
    margin-top: 1.4rem; border: 1px solid var(--line-2); border-left: 3px solid var(--red);
    background: var(--bg-2); border-radius: 10px; padding: 0.9rem 1.1rem; color: var(--muted); font-size: 0.92rem;
  }
  .doc .toc { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.6rem; }
  .doc .toc a { text-decoration: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 0.35rem 0.8rem; font-size: 0.85rem; color: var(--fg-strong); background: var(--bg-2); }
  .doc section.legal { padding-block: 0; border: 0; }
  .doc h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin-top: 2.4rem; scroll-margin-top: 90px; }
  .doc h3 { font-size: 1.05rem; margin-top: 1.5rem; }
  .doc p { color: var(--fg); margin: 0.7rem 0 0; }
  .doc ul { margin: 0.7rem 0 0; padding-left: 1.2rem; color: var(--fg); }
  .doc li { margin-top: 0.35rem; }
  .doc .muted-note { color: var(--muted); font-size: 0.92rem; }

  @media (max-width: 560px) {
    .nav .word { display: none; }
  }
  @media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
  html { scroll-behavior: smooth; }
  :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

  /* Buttons (from the landing page) */
  .btn {
    display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none;
    font-weight: 600; font-size: 0.95rem; border-radius: 10px; padding: 0.7rem 1.15rem;
    border: 1px solid transparent; cursor: pointer; transition: transform .08s ease, background .15s ease;
  }
  .btn:active { transform: translateY(1px); }
  .btn-primary { background: var(--red); color: #fff; }
  .btn-primary:hover { background: var(--red-soft); }
  .btn-ghost { background: transparent; color: var(--fg-strong); border-color: var(--line-2); }
  .btn-ghost:hover { border-color: var(--fg-strong); }
  .btn-sm { padding: 0.5rem 0.85rem; font-size: 0.86rem; }

  /* Account pages */
  .doc .wrap.narrow { max-width: 520px; }
  .card {
    margin-top: 1.6rem; border: 1px solid var(--line-2); background: var(--bg-2);
    border-radius: 14px; padding: 1.4rem 1.4rem 1.5rem;
  }
  .field { display: block; margin-top: 1rem; }
  .field span { display: block; font-size: 0.88rem; font-weight: 600; color: var(--fg-strong); margin-bottom: 0.35rem; }
  .field input {
    width: 100%; font: inherit; color: var(--fg-strong); background: var(--bg);
    border: 1px solid var(--line-2); border-radius: 10px; padding: 0.65rem 0.8rem;
  }
  .field input:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
  .hint { color: var(--muted); font-size: 0.85rem; margin-top: 0.3rem; }
  .check { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 1.1rem; font-size: 0.92rem; }
  .check input { margin-top: 0.3rem; width: 1rem; height: 1rem; accent-color: var(--red); flex: none; }
  .actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 1.4rem; }
  .msg { margin-top: 1rem; border-radius: 10px; padding: 0.75rem 0.95rem; font-size: 0.92rem; border: 1px solid var(--line-2); background: var(--bg-3); }
  .msg[hidden], .btn[hidden] { display: none; }
  .msg.ok { border-left: 3px solid var(--green); }
  .msg.err { border-left: 3px solid var(--red); }
  .badge { display: inline-block; border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.8rem; font-weight: 600; border: 1px solid var(--line-2); }
  .badge.ok { color: var(--green); border-color: var(--green); }
  .badge.warn { color: var(--red-soft); border-color: var(--red-soft); }
  .serial-row { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
  .serial-row:first-of-type { border-top: 0; margin-top: 0.4rem; padding-top: 0.4rem; }
  .serial { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1rem; color: var(--fg-strong); word-break: break-all; }
  .meta { color: var(--muted); font-size: 0.88rem; margin-top: 0.3rem; }
  .muted { color: var(--muted); }
  .linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--fg-strong); text-decoration: underline; cursor: pointer; }
  .links { display: flex; gap: 1.4rem; margin-right: 0.6rem; }
  .links a { text-decoration: none; color: var(--muted); font-size: 0.92rem; font-weight: 500; }
  .links a:hover, .links a[aria-current="page"] { color: var(--fg-strong); }
  @media (max-width: 560px) { .links { gap: 0.8rem; } }

  /* Language switch: links to the same page in the other language. */
  .seg a {
    color: var(--muted); font-family: var(--font-ui); font-weight: 600; font-size: 0.8rem;
    padding: 0.32rem 0.7rem; text-decoration: none; display: inline-flex; align-items: center;
  }
  .seg a[aria-current="true"] { background: var(--red); color: #fff; }

  /* Purchase (Paddle overlay checkout) */
  .tiers { display: grid; gap: 0.8rem; margin-top: 1rem; }
  .tier { border: 1px solid var(--line-2); border-radius: 12px; padding: 1rem 1.1rem; background: var(--bg); }
  .tier h3 { font-size: 1.02rem; margin: 0; }
  .tier .price { font-weight: 700; color: var(--fg-strong); margin-top: 0.3rem; }
  .tier .field { margin-top: 0.7rem; }
  .tier .field input { max-width: 10rem; }
  .tier .actions { margin-top: 0.8rem; }
  form.inline { display: inline; margin: 0; }

  /* PCs of a licence: one row per activated PC, with "Free". The table scrolls inside its box on a narrow screen. */
  .devices { margin-top: 0.9rem; }
  .devices h3 { font-size: 0.95rem; margin: 0 0 0.4rem; }
  .table-wrap { overflow-x: auto; }
  .devices-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
  .devices-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
  .devices-table td { padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
  .devices-table td:first-child { color: var(--fg-strong); word-break: break-word; }
  .devices-table form { margin: 0; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

  /* petabyte brand: "peta" white on dark and black on light, "byte" #FF0000, in Comfortaa. */
  .brandline { color: #ffffff; }
  @media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .brandline { color: #000000; } }
  :root[data-theme="light"] .brandline { color: #000000; }
