/* Shared styling for the legal pages (terms / privacy / refunds, EN + /pl/).
 *
 * A separate stylesheet rather than inlined <style> in each of six pages: the
 * token layer would otherwise be copy-pasted six times and drift the first time
 * the palette changes. It is same-origin and tiny, so the "no external
 * requests" rule the marketing page holds itself to is not broken — that rule is
 * about third-party CDNs and webfonts, which cost a DNS lookup and a privacy
 * disclosure. Do NOT add either here.
 *
 * Tokens are copied from index.html deliberately. index.html stays one
 * self-contained file (it is the page that has to render standalone in an
 * artifact host), so this is the one duplication we accept — keep the two in
 * step when the palette changes.
 */

:root {
  --paper: #0E1113;
  --paper-raise: #171B20;
  --ink: #ECF1F5;
  --ink-soft: #93A0AC;
  --line: #252C33;
  --accent: #FF6B3D;
  --green: #5CE1A6;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
/* Dark-only, like the marketing page: both theme hooks resolve to the same
   values so a light-asking client still gets a coherent document. */
:root[data-theme="light"], :root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ————— Chrome ————— */
.doc-nav {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.doc-nav .row {
  width: min(760px, calc(100% - 40px)); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 0;
}
.doc-nav .brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--serif); font-weight: 700; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; font-size: 17px;
}
.doc-nav .brand svg { flex: none; }
.doc-nav .back { color: var(--ink-soft); text-decoration: none; font-size: 14px; }
.doc-nav .back:hover { color: var(--ink); text-decoration: underline; }

/* ————— Document ————— */
main { width: min(760px, calc(100% - 40px)); margin: 0 auto; padding: 44px 0 72px; }

.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--green); margin: 0 0 10px;
}
h1 {
  font-family: var(--serif); font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.12; letter-spacing: -0.022em; margin: 0 0 14px;
}
.updated { color: var(--ink-soft); font-size: 14px; margin: 0 0 8px; }
.lede { color: var(--ink-soft); font-size: 17px; margin: 0 0 4px; }

h2 {
  font-family: var(--serif); font-size: 1.32rem; letter-spacing: -0.014em;
  margin: 44px 0 12px; padding-top: 20px; border-top: 1px solid var(--line);
}
h3 { font-family: var(--serif); font-size: 1.05rem; margin: 26px 0 8px; }
p, li { color: #C9D3DC; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 22px; }
li { margin-bottom: 7px; }
strong, b { color: var(--ink); font-weight: 600; }
a { color: var(--green); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--green) 40%, transparent); }
a:hover { border-bottom-color: var(--green); }
code { font-family: var(--mono); font-size: .88em; color: var(--ink); background: var(--paper-raise); padding: 1px 5px; border-radius: 4px; }

/* Panels: the identity block, and the "what we can't promise" style callout. */
.panel {
  background: var(--paper-raise); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px 20px; margin: 0 0 22px;
}
.panel p:last-child, .panel ul:last-child { margin-bottom: 0; }
.panel.accent { border-left: 3px solid var(--accent); }
.panel.live { border-left: 3px solid var(--green); }

dl.identity { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; }
dl.identity dt { color: var(--ink-soft); font-size: 14px; }
dl.identity dd { margin: 0; color: var(--ink); }

/* Data table — the privacy page's "what we store" grid. Scrolls in its own
   container so the document body never scrolls sideways on a phone. */
.tw { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink); font-weight: 600; background: var(--paper-raise); font-size: 13.5px; }
tr:last-child td { border-bottom: none; }
td { color: #C9D3DC; }

/* ————— Footer ————— */
.doc-foot {
  border-top: 1px solid var(--line); margin-top: 8px;
  padding: 26px 0 40px; color: var(--ink-soft); font-size: 14px;
}
.doc-foot .row { width: min(760px, calc(100% - 40px)); margin-inline: auto; }
.doc-foot .links { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; }
.doc-foot a { color: var(--ink-soft); border-bottom-color: transparent; }
.doc-foot a:hover { color: var(--ink); border-bottom-color: var(--ink-soft); }
.langsw { margin-left: auto; font-size: 14px; color: var(--ink-soft); }
.langsw a { color: var(--ink-soft); border-bottom-color: transparent; }
.langsw a[aria-current="true"] { color: var(--green); }

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