/* Clicset web. Colours from apps/mobile/src/ui/theme.ts (ds). Lime only on navy or as the ball. */
:root {
  --navy: #0B1F3A;
  --navy2: #1E3A5F;
  --blue: #1F56D6;
  --blue700: #1846B0;
  --lime: #C6F432;
  --lime-soft: #EEFBC4;
  --white: #FFFFFF;
  --surface: #F1F5F9;
  --line: #E2E8F0;
  --ink: #0B1F3A;
  --ink2: #475569;
  --on-navy2: #CBD5E1;
  --warn-bg: #FEF3C7;
  --warn-ink: #78350F;
  --warn-line: #F59E0B;
  --radius: 14px;
  --measure: 46rem;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

a { color: var(--blue); text-underline-offset: 0.15em; }
a:hover { color: var(--blue700); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -100px;
  background: var(--white); color: var(--navy); padding: 8px 12px; border-radius: 8px; z-index: 10;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 16px; }

/* Header bar (inner pages) */
.bar { background: var(--navy); color: var(--white); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--white); }
.brand img { width: 36px; height: 36px; border-radius: 50%; background: var(--white); }
.bar nav { display: flex; gap: 4px 16px; flex-wrap: wrap; }
.bar nav a { color: var(--on-navy2); text-decoration: none; font-size: 0.95rem; padding: 10px 0; }
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--lime); }

main { padding: 32px 0 48px; }

/* Content pages */
h1 { font-size: clamp(1.9rem, 6vw, 2.5rem); line-height: 1.15; margin: 8px 0 12px; letter-spacing: -0.015em; }
h2 { font-size: 1.4rem; line-height: 1.25; margin: 40px 0 12px; letter-spacing: -0.01em; scroll-margin-top: 16px; }
h3 { font-size: 1.1rem; margin: 24px 0 8px; }
p, ul, ol { margin: 0 0 14px; }
li { margin-bottom: 6px; }
.intro { color: var(--ink2); font-size: 1.1rem; }
.meta { color: var(--ink2); font-size: 0.95rem; }

.toc { background: var(--surface); border-radius: var(--radius); padding: 16px 20px; margin: 20px 0; }
.toc p { margin: 0 0 6px; font-weight: 700; }
.toc ol { margin: 0; padding-left: 1.3rem; }

.card { background: var(--surface); border-radius: var(--radius); padding: 16px 20px; margin: 16px 0; }
.card > :last-child { margin-bottom: 0; }

.callout { border-left: 4px solid var(--blue); background: #EEF3FD; padding: 12px 16px; border-radius: 0 10px 10px 0; margin: 16px 0; }
.callout > :last-child { margin-bottom: 0; }

.draft { background: var(--warn-bg); color: var(--warn-ink); border: 2px solid var(--warn-line); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 24px; font-weight: 600; }
.draft p { margin: 0; }
.draft p + p { margin-top: 6px; font-weight: 400; }

.todo { background: var(--warn-bg); color: var(--warn-ink); padding: 0 4px; border-radius: 4px; font-weight: 600; }

table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: 1rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface); }
.gestures td:first-child { white-space: nowrap; font-weight: 700; }

kbd { font-family: inherit; font-weight: 700; background: var(--white); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; }

.lang-switch { display: inline-block; margin: 0 0 8px; font-weight: 600; }
.lang-section { border-top: 2px solid var(--line); margin-top: 48px; padding-top: 8px; }

footer { background: var(--navy); color: var(--on-navy2); padding: 28px 0; font-size: 0.95rem; }
footer a { color: var(--white); }
footer a:hover { color: var(--lime); }
footer p { margin: 0 0 6px; }

@media (max-width: 480px) {
  body { font-size: 1rem; }
  th, td { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

@media print {
  .bar, footer, .skip { display: none; }
  .draft { border-color: #000; }
}
