/* Kepi legal + support site. Visual language mirrors the iOS app: ink outlines, chunky offset cards, peach brand. */
:root {
  --ink: #16213E;
  --peach: #FFC4A8;
  --cream: #FFF7E8;
  --yellow: #FFD23F;
  --pink: #FF5CA8;
  --mint: #2ED9A3;
  --mint-soft: #D7FBEF;
  --mint-ink: #085041;
  --sky-soft: #D5F1FF;
  --pink-soft: #FFE0EF;
  --yellow-soft: #FFF4C7;
  --muted: #4D5671;
  --line: #E4E9F4;
  --radius: 20px;
  --t: 'Rubik', 'Golos Text', system-ui, sans-serif;
  --b: 'Golos Text', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--b); font-size: 17px; line-height: 1.6; }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--pink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--t); font-weight: 800; letter-spacing: -0.2px; line-height: 1.15; margin: 0; }

/* Language: both versions live in the page; the <html data-lang> attribute shows one. */
html[data-lang="uk"] [lang="en"]:not(html), html[data-lang="en"] [lang="uk"]:not(html) { display: none !important; }

/* ---------- Header ---------- */
.top { background: var(--peach); border-bottom: 3px solid var(--ink); }
.top-in { max-width: 1080px; margin: 0 auto; padding: 18px 20px 26px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.word { font-family: var(--t); font-weight: 900; font-size: 34px; line-height: 1; color: #fff; letter-spacing: 1px;
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 4px 0 var(--ink); }
.nav { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { font-family: var(--t); font-weight: 700; font-size: 15px; text-decoration: none; color: var(--ink); background: #fff;
  border: 3px solid var(--ink); border-radius: 999px; padding: 6px 14px; box-shadow: 0 3px 0 var(--ink); transition: transform .08s; }
.pill:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.pill[aria-current="page"] { background: var(--yellow); }
.lang { display: inline-flex; border: 3px solid var(--ink); border-radius: 999px; overflow: hidden; background: #fff; box-shadow: 0 3px 0 var(--ink); }
.lang button { font: 700 14px var(--t); color: var(--ink); background: transparent; border: 0; padding: 6px 11px; cursor: pointer; }
html[data-lang="uk"] .lang [data-set="uk"], html[data-lang="en"] .lang [data-set="en"] { background: var(--ink); color: #fff; }
.hero { display: flex; align-items: center; gap: 18px; margin-top: 22px; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); }
.hero p { margin: 6px 0 0; font-weight: 600; }
.mascot { flex-shrink: 0; width: 70px; height: auto; }

/* ---------- Layout ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 20px 56px; }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.toc { position: sticky; top: 18px; font-size: 15px; }
.toc p { font-family: var(--t); font-weight: 800; margin: 0 0 8px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--ink); }
.toc a { display: block; padding: 4px 0 4px 12px; text-decoration: none; color: var(--muted); font-weight: 600; }
.toc a:hover { color: var(--ink); }
@media (max-width: 820px) { .doc { grid-template-columns: 1fr; } .toc { display: none; } }

/* ---------- Cards ---------- */
.card { background: #fff; border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 0 5px 0 var(--ink); padding: 22px 24px; margin-bottom: 22px; scroll-margin-top: 16px; }
.card h2 { font-size: 24px; margin-bottom: 10px; }
.card h3 { font-size: 18px; margin: 18px 0 6px; }
.card p { margin: 8px 0; }
.card ul { margin: 8px 0; padding-left: 22px; }
.card li { margin: 4px 0; }
.card > :last-child { margin-bottom: 0; }
.summary { background: var(--mint-soft); }
.summary h2 { color: var(--mint-ink); }
.facts { list-style: none; padding: 0 !important; display: grid; gap: 10px; }
.facts li { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.facts svg { flex-shrink: 0; margin-top: 2px; }
.note { background: var(--yellow-soft); border: 3px dashed var(--ink); border-radius: 16px; padding: 12px 16px; font-weight: 600; }
.meta { color: var(--muted); font-weight: 600; font-size: 15px; }
.fill { background: var(--yellow); border-radius: 6px; padding: 0 5px; font-weight: 700; }
table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 2px solid var(--line); }
th { font-family: var(--t); font-weight: 800; }
.tbl { overflow-x: auto; }

/* ---------- Support ---------- */
.contact { display: flex; gap: 20px; align-items: center; background: var(--yellow); }
.contact .btn { margin-top: 12px; }
.btn { display: inline-block; font: 800 17px var(--t); color: var(--ink); text-decoration: none; background: #fff;
  border: 3px solid var(--ink); border-radius: 18px; padding: 12px 20px; box-shadow: 0 5px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 30px; }
.tile { display: block; text-decoration: none; background: #fff; border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: 0 5px 0 var(--ink); padding: 18px; transition: transform .08s; }
.tile:hover { transform: translateY(-2px); }
.tile:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.tile .ic { width: 46px; height: 46px; border: 3px solid var(--ink); border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.tile b { display: block; font-family: var(--t); font-size: 18px; }
.tile span { color: var(--muted); font-size: 15px; }
.section-title { font-size: 28px; margin: 6px 0 14px; }
details { background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); margin-bottom: 14px; scroll-margin-top: 16px; }
summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 18px; font-family: var(--t); font-weight: 800; font-size: 18px; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border: 3px solid var(--ink); border-radius: 9px;
  display: flex; align-items: center; justify-content: center; font-size: 20px; line-height: 1; background: var(--yellow); }
details[open] summary::after { content: '–'; }
details .ans { padding: 0 18px 16px; }
details .ans p, details .ans ol, details .ans ul { margin: 6px 0; }

/* ---------- Footer ---------- */
.foot { border-top: 3px solid var(--ink); background: #fff; }
.foot-in { max-width: 1080px; margin: 0 auto; padding: 22px 20px 30px; display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: 15px; }
.foot nav { display: flex; gap: 16px; flex-wrap: wrap; font-weight: 700; }
.foot p { margin: 0; color: var(--muted); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .word { font-size: 28px; }
  .card { padding: 18px; }
  .contact { flex-direction: column; align-items: flex-start; }
  .mascot { width: 54px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
