/* Every page of the site. The blues are the app's brand blue (Theme.kt), the
   gold the icon's last bar. */

:root {
  --bg: #fbfcfe;
  --surface: #ffffff;
  --tint: #eaf3f9;
  --text: #191c1e;
  --muted: #41484d;
  --rule: #c1c7ce;
  --line: #dfe4ea;
  --accent: #00658f;
  --on-accent: #ffffff;
  --mark: #b08d00;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191c1e;
    --surface: #212529;
    --tint: #1c2a33;
    --text: #e1e2e5;
    --muted: #c1c7ce;
    --rule: #41484d;
    --line: #33393e;
    --accent: #83cfff;
    --on-accent: #00344c;
    --mark: #f8e287;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 16px; }

/* One language at a time once lang.js has chosen; without it, both, Russian
   first, with the header and footer in Russian. */
html[data-lang="ru"] [lang="en"]:not(.to-lang),
html[data-lang="en"] [lang="ru"]:not(.to-lang),
html:not([data-lang]) header [lang="en"]:not(.to-lang),
html:not([data-lang]) footer [lang="en"],
html[data-lang] .switch { display: none; }
.to-lang[lang="ru"], html[data-lang="en"] .to-lang[lang="en"] { display: none; }
html[data-lang="en"] .to-lang[lang="ru"] { display: inline; }

/* Header: the name, the pages, the other language. On a phone the pages take
   a row of their own under the name. */
header.site { border-bottom: 1px solid var(--line); }

.bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 4px 24px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
}
.brand img { border-radius: 7px; }

.bar nav { justify-self: end; display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15px; }
.bar nav a, .to-lang { color: var(--muted); text-decoration: none; padding: 6px 0; }
.bar nav a:hover, .to-lang:hover { color: var(--accent); }
.bar nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.to-lang { font-size: 15px; border: 1px solid var(--rule); border-radius: 999px; padding: 4px 12px; }

@media (max-width: 640px) {
  .bar { grid-template-columns: 1fr auto; padding-top: 10px; padding-bottom: 8px; }
  .bar nav { grid-column: 1 / -1; grid-row: 2; justify-self: start; gap: 4px 16px; }
}

/* A document page: support, privacy, terms. */
main.doc { max-width: 42rem; margin: 0 auto; padding: 0 16px 16px; }

h1 { font-size: 28px; line-height: 1.25; margin: 32px 0 4px; }
h2 { font-size: 20px; line-height: 1.3; margin: 28px 0 8px; }
h3 { font-size: 17px; margin: 20px 0 4px; }

.date, .switch { color: var(--muted); font-size: 15px; }
.switch { margin: 16px 0 0; }

main.doc section + section { border-top: 1px solid var(--rule); margin-top: 48px; }
html[data-lang] main.doc section + section { border-top: 0; margin-top: 0; }

li { margin: 6px 0; }

/* The home page. */
.hero { background: var(--tint); border-bottom: 1px solid var(--line); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 64px;
}
.eyebrow { color: var(--accent); font-weight: 600; font-size: 15px; margin: 0 0 12px; }
.hero h1 { font-size: clamp(32px, 5vw, 46px); line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 16px; }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 34rem; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 16px; }
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  padding: 11px 20px;
}
.button.quiet { background: transparent; color: var(--accent); border: 1px solid var(--rule); }
.soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 14px;
  padding: 11px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 600;
}

/* The example month, laid out as the app's own breakdown. */
.ledger {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 24px 24px;
  box-shadow: 0 12px 32px rgba(0, 52, 76, 0.10);
}
.ledger figcaption { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.ledger dl { margin: 0; font-variant-numeric: tabular-nums; }
.ledger dl div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; }
.ledger dt, .ledger dd { margin: 0; }
.ledger dd { white-space: nowrap; }
.ledger .sub { border-top: 1px solid var(--line); font-weight: 600; margin-top: 4px; padding-top: 11px; }
.ledger .total { border-top: 2px solid var(--text); font-weight: 700; font-size: 20px; margin-top: 6px; padding-top: 12px; }
.ledger .total dd { color: var(--accent); }
.ledger .key { color: var(--muted); font-size: 14px; margin: 14px 0 0; }

.mark::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mark);
  margin-right: 8px;
  vertical-align: 2px;
}

.band { padding-top: 64px; padding-bottom: 8px; }
.band > h2 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.01em; }
.band > .intro { color: var(--muted); margin: 0 0 28px; max-width: 40rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
}
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { counter-increment: step; position: relative; padding-left: 52px; margin: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  display: grid;
  place-items: center;
}
.steps h3 { margin: 4px 0 4px; font-size: 18px; }
.steps p { margin: 0; color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ticks { list-style: none; padding: 0; margin: 12px 0 0; }
.ticks li { padding-left: 28px; position: relative; margin: 8px 0; }
.ticks li::before { content: "✓"; position: absolute; left: 2px; color: var(--accent); font-weight: 700; }
.card.plus { border-color: var(--accent); }
.note { color: var(--muted); font-size: 15px; margin: 16px 0 0; }

.closing {
  margin-top: 64px;
  background: var(--tint);
  border-top: 1px solid var(--line);
}
.closing .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
  padding-top: 40px;
  padding-bottom: 40px;
}
.closing h2 { margin: 0 0 4px; }
.closing p { margin: 0; color: var(--muted); }

@media (max-width: 800px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-grid { padding-top: 40px; padding-bottom: 48px; }
  .cards, .steps { grid-template-columns: 1fr; }
  .ledger { padding: 16px 18px 20px; font-size: 16px; }
}

/* Footer: the pages again, and who KasFlow is not. */
footer.site { border-top: 1px solid var(--line); margin-top: 48px; color: var(--muted); font-size: 15px; }
main.home + footer.site { margin-top: 0; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between; padding-top: 24px; padding-bottom: 40px; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
footer.site a { color: var(--muted); }
footer.site p { margin: 0; }
