/*
 * The site of the app in «Ночь с фонарём»: the colours, radii and steps are
 * those of src/theme (colors.ts, tokens.ts), copied by hand because the site
 * has no build. «Рассвет» by default, «Ночь» when the system is dark.
 */
:root {
  color-scheme: light dark;
  --background-top: #fdf3e3;
  --background-bottom: #e9f0ec;
  --sheet: #fffcf6;
  --sheet-inset: #f4eee3;
  --edge: #e6dfd2;
  --ink: #152535;
  --ink-secondary: #4e5e6c;
  --link: #7e540c;
  --focus: #a26c10;
  --icon-shade: rgba(21, 37, 53, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-top: #0a1220;
    --background-bottom: #0e2230;
    --sheet: #1a2d3f;
    --sheet-inset: #23384d;
    --edge: #364d63;
    --ink: #f3ecdc;
    --ink-secondary: #aeb9c4;
    --link: #f2c46d;
    --focus: #f2c46d;
    --icon-shade: rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--background-bottom);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 16px 48px;
  font: 1.0625rem/1.55 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: linear-gradient(var(--background-top), var(--background-bottom));
  background-attachment: fixed;
}

.page {
  margin: 0 auto;
  max-width: 560px;
}

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

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

h1,
h2,
p,
ol {
  margin: 0;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  margin: 0 0 8px 4px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

/* The way back to the first page: the icon and the name of the app. */
.home {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.home img {
  width: 36px;
  height: 36px;
  border-radius: 22.5%;
}

.title {
  margin: 24px 0 24px 4px;
}

section + section {
  margin-top: 24px;
}

.sheet {
  padding: 16px 20px;
  border: 1px solid var(--edge);
  border-radius: 24px;
  background: var(--sheet);
}

.sheet > * + * {
  margin-top: 8px;
}

.sheet ol {
  padding-left: 1.4em;
}

.sheet li + li {
  margin-top: 4px;
}

/* The first page: the icon, the name and one line about the app. */
.hero {
  padding: 32px 0 32px;
  text-align: center;
}

.hero img {
  display: block;
  margin: 0 auto 20px;
  width: 128px;
  height: 128px;
  border-radius: 22.5%;
  box-shadow: 0 12px 28px var(--icon-shade);
}

.hero p {
  margin: 12px auto 0;
  max-width: 26em;
  color: var(--ink-secondary);
  text-wrap: pretty;
}

/* Official store badges (the artwork is the stores', not to be restyled). */
.stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  margin: 0 0 24px;
}

.stores a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
}

.stores img {
  display: block;
  height: 50px;
  width: auto;
}

/* Rows of a list: a whole row is the link, 48 high at the least. */
.rows {
  padding: 4px 0;
  overflow: hidden;
}

.rows > * + * {
  margin-top: 0;
  border-top: 1px solid var(--edge);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 8px 20px;
  color: var(--ink);
  text-decoration: none;
}

.row:hover,
.row:active {
  background: var(--sheet-inset);
}

.row:focus-visible {
  outline-offset: -3px;
  border-radius: 20px;
}

.row span + span {
  color: var(--ink-secondary);
  overflow-wrap: anywhere;
  text-align: right;
}

.row.next::after {
  content: '›';
  font-size: 1.375rem;
  line-height: 1;
  color: var(--ink-secondary);
}

footer {
  margin: 32px 4px 0;
  font-size: 0.875rem;
  color: var(--ink-secondary);
}

footer a {
  display: inline-block;
  padding: 12px 0;
  color: inherit;
}

footer a + a {
  margin-left: 20px;
}
