/*
 * Квизић — the public site, kvizic.ntole.com. One stylesheet for every page, no build step,
 * nothing loaded from another host. Colours are the Buzzers skin's (BuzzersTokens.kt): the stage at night
 * in dark mode, its cream by day, amber the accent in both.
 */

:root {
  color-scheme: light dark;

  --amber: #f2a93b;
  --on-amber: #15121b;

  /* Light: the cream plate, ink words, amber darkened for AA on cream. */
  --bg: #f7f0e5;
  --surface: #fffaf2;
  --text: #15121b;
  --accent: #8a5410;
  --pill-text: #6e430c;
  --pill-bg: #f6e2bf;
  --muted: #5b5148;
  --line: #e6d8c2;

  --radius: 16px;
  --gutter: 16px;
  --measure: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15121b;
    --surface: #221d29;
    --text: #f4ebdd;
    --accent: #f2a93b;
    --pill-text: #ffdfa8;
    --pill-bg: #3a3340;
    --muted: #c2b8ad;
    --line: #2b2530;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial,
    sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--pill-bg);
  padding: 0.05em 0.35em;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  background: var(--surface);
  color: var(--accent);
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  z-index: 10;
}

.skip:focus {
  top: 0.5rem;
}

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.85rem;
  padding-bottom: 0.4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
}

/* The icon's К on its amber, small: the ring of bulbs is the app's alone. */
.mark {
  width: 1.7rem;
  height: 1.7rem;
  flex: none;
  border-radius: 50%;
  background: var(--amber);
  color: var(--on-amber);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--amber);
}

.lang {
  flex: none;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--pill-text);
  background: var(--pill-bg);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}

.lang:hover {
  text-decoration: underline;
}

nav.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.1rem;
  padding-bottom: 0.7rem;
  font-size: 0.98rem;
}

nav.links a {
  text-decoration: none;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}

nav.links a:hover,
nav.links a[aria-current="page"] {
  border-bottom-color: currentColor;
}

nav.links a[aria-current="page"] {
  font-weight: 700;
}

main {
  padding-top: 1.75rem;
  padding-bottom: 3rem;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0;
}

h1 {
  color: var(--accent);
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}

h2 {
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 800;
  margin-top: 2.4rem;
  margin-bottom: 0.6rem;
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 1.6rem;
  margin-bottom: 0.35rem;
}

p,
ul,
ol,
dl {
  margin: 0.6rem 0;
}

ul,
ol {
  padding-left: 1.3rem;
}

li {
  margin: 0.35rem 0;
}

li::marker {
  color: var(--accent);
}

.meta {
  margin-top: 0.4rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.lead {
  font-size: 1.15rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem 1.2rem;
  margin: 1.25rem 0;
}

.card > h2:first-child {
  margin-top: 0.8rem;
}

.address {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  line-height: 1.8;
}

nav.toc {
  margin: 1.5rem 0 0.5rem;
}

nav.toc h2 {
  margin-top: 0;
  font-size: 1.05rem;
  color: var(--text);
}

nav.toc ol {
  columns: 2 16rem;
  column-gap: 2rem;
}

nav.toc li {
  margin: 0.2rem 0;
  break-inside: avoid;
}

dl.providers dt {
  font-weight: 700;
  margin-top: 0.9rem;
}

dl.providers dd {
  margin: 0.15rem 0 0;
}

ol.steps {
  list-style: none;
  counter-reset: step;
  padding-left: 0;
}

ol.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  min-height: 2rem;
  margin: 0.8rem 0;
}

ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--amber);
  color: var(--on-amber);
  font-weight: 800;
  display: grid;
  place-items: center;
}

.hero h1 {
  font-size: clamp(2.1rem, 1.4rem + 3.5vw, 3.2rem);
}

.features {
  list-style: none;
  padding-left: 0;
}

.features li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 0.6rem 0;
}

.docs {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 0.6rem;
}

.docs a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-weight: 700;
  text-decoration: none;
}

.docs a:hover {
  border-color: var(--accent);
}

@media (min-width: 36rem) {
  .docs {
    grid-template-columns: 1fr 1fr;
  }
}

footer.site {
  border-top: 1px solid var(--line);
  padding: 1.2rem 0 2rem;
  font-size: 0.95rem;
}

footer.site p {
  margin: 0.3rem 0;
}
