/* Svidanka website. One stylesheet, no scripts. Colours are the designer's palette
   (navy #1c2848, blue #4f66de, pale #f4f4fa) and the app's splash gradient. */

:root {
  color-scheme: light dark;

  --bg: #f4f4fa;
  --surface: #ffffff;
  --ink: #1c2848;
  --ink-soft: #566079;
  --line: #dadeeb;
  --link: #3d52c4; /* the brand blue darkened until it passes 4.5:1 as text on --bg */
  --splash-top: #598cd8;
  --splash-bottom: #eeeeee;
  --todo-bg: #ffe9a8;
  --todo-ink: #4d3a00;

  --measure: 42rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d202f;
    --surface: #272b3e;
    --ink: #f4f4fa;
    --ink-soft: #b3bad0;
    --line: #383e59;
    --link: #a9b5f7;
    --splash-top: #142952;
    --splash-bottom: #1d202f;
    --todo-bg: #5c4a10;
    --todo-ink: #ffeebd;
  }
}

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

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

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

/* ---- Header and footer, shared by every page but the landing one ---- */

.site-header,
.site-footer {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 1.25rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-header nav,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.site-header nav a,
.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-header nav a:hover,
.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-header nav a[aria-current="page"] {
  color: var(--ink);
}

.site-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.site-footer p {
  margin: 0;
}

/* ---- Landing page: the app's splash, with the way out at the bottom ---- */

.landing {
  background: linear-gradient(to bottom, var(--splash-top), var(--splash-bottom)) no-repeat var(--splash-bottom);
}

.landing main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem var(--gutter) 2rem;
  text-align: center;
}

.landing h1 {
  margin: 0;
  width: min(268px, 68vw);
}

.landing .tagline {
  margin: 1.125rem 0 0;
  font-size: 1.125rem;
  font-weight: 600;
}

.landing .about {
  margin: 2.5rem 0 0;
  color: var(--ink);
  opacity: 0.8;
}

.landing .site-footer {
  border-top: 0;
  justify-content: center;
  text-align: center;
  flex-direction: column;
}

.landing .site-footer nav {
  justify-content: center;
}

.landing .site-footer a {
  color: var(--ink);
}

/* ---- Documents: Terms, Privacy ---- */

.doc {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 4rem;
  overflow-wrap: break-word;
}

.doc h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.doc .updated {
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.doc .lede {
  margin-top: 2rem;
}

.doc h2 {
  margin: 3rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 1.375rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  scroll-margin-top: 1rem;
}

.doc h3 {
  margin: 1.75rem 0 0;
  font-size: 1.0625rem;
  line-height: 1.4;
}

.doc p,
.doc ul,
.doc ol {
  margin: 0.875rem 0 0;
}

.doc ul,
.doc ol {
  padding-left: 1.375rem;
}

.doc li + li {
  margin-top: 0.4rem;
}

.doc li::marker {
  color: var(--ink-soft);
}

.doc strong {
  font-weight: 600;
}

/* Disclaimers and limits the law wants hard to miss. Weight, not capitals: capitals are harder to read. */
.doc .conspicuous {
  font-weight: 600;
}

.doc .draft {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--todo-bg);
  color: var(--todo-ink);
  font-size: 0.875rem;
  font-weight: 600;
}

/* A blank still to be filled in. Loud on purpose, so none is published by accident. */
mark.todo {
  padding: 0.05em 0.3em;
  border-radius: 4px;
  background: var(--todo-bg);
  color: var(--todo-ink);
  font-weight: 600;
}

.doc .summary {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.doc .summary h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.0625rem;
}

.doc .toc {
  margin-top: 2rem;
}

.doc .toc h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.doc .toc ol {
  list-style: none;
  padding: 0;
  columns: 2 16rem;
  column-gap: 2rem;
}

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

.doc .toc a {
  text-decoration: none;
}

.doc .toc a:hover {
  text-decoration: underline;
}

.doc address {
  margin-top: 0.875rem;
  font-style: normal;
}

/* ---- Not found ---- */

.notfound {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media print {
  .site-header nav,
  .site-footer,
  .doc .toc {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .doc h2 {
    break-after: avoid;
  }
}
