/* Shared styles of miaumero.com: the landings (/, /ru/, /pt/, /es/) and the
   Privacy Notice pages. The look follows the app's "graph-paper notebook"
   theme (docs/design/three-worlds.html, concept A): paper, a faint grid,
   blue pen for actions, green pen for "done", a yellow marker. Pixel art
   comes from the app's own sprites: tool/render_site_art.dart. */

:root {
  --paper: #FBFCFE;
  --surface: #FFFFFF;
  --tint: #F1F5FC;
  --grid-line: rgba(31, 79, 184, 0.07);
  --ink: #1C2740;
  --ink-2: #4D5873;
  --ink-3: #6C7690;
  --line: #E1E7F2;
  --pen: #1F4FB8;
  --pen-deep: #173E94;
  --green: #0F7A59;
  --green-tint: #E3F4EC;
  --marker: #FFE150;
  --marker-tint: #FFF6C2;
  --pencil-tint: #EEF0F5;
  --btn-bg: #1C2740;
  --btn-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(28, 39, 64, 0.04), 0 8px 28px -12px rgba(28, 39, 64, 0.18);
  --radius: 18px;
  --display: 'Nunito', ui-rounded, -apple-system, 'Segoe UI', sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1320;
    --surface: #161D2E;
    --tint: #131A2A;
    --grid-line: rgba(143, 176, 255, 0.06);
    --ink: #E9EDF6;
    --ink-2: #AEB7CB;
    --ink-3: #8A94AB;
    --line: #253049;
    --pen: #9DBAFF;
    --pen-deep: #C2D4FF;
    --green: #6FD6AE;
    --green-tint: #14302A;
    --marker: #FFE150;
    --marker-tint: #3A3517;
    --pencil-tint: #20283A;
    --btn-bg: #E9EDF6;
    --btn-ink: #0E1320;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font: 400 17px/1.6 var(--body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: var(--pen); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--pen-deep); }
:focus-visible { outline: 2px solid var(--pen); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 3.45rem); font-weight: 850; line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 850; line-height: 1.15; letter-spacing: -0.015em; }
h3 { font-size: 1.15rem; font-weight: 800; line-height: 1.3; }
p { text-wrap: pretty; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 560px) { .wrap { padding: 0 16px; } }

/* Graph paper: the app's notebook background, kept very faint. */
.paper {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
}

/* Pixel art and icons */
.px { image-rendering: pixelated; }
.i {
  display: inline-block; flex: none; width: 24px; height: 24px;
  background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
}
.i-ban { --i: url(/art/icons/ban.svg); }
.i-calendar { --i: url(/art/icons/calendar.svg); }
.i-chart { --i: url(/art/icons/chart.svg); }
.i-check { --i: url(/art/icons/check.svg); }
.i-clock { --i: url(/art/icons/clock.svg); }
.i-house { --i: url(/art/icons/house.svg); }
.i-lock { --i: url(/art/icons/lock.svg); }
.i-mail { --i: url(/art/icons/mail.svg); }
.i-offline { --i: url(/art/icons/offline.svg); }
.i-paw { --i: url(/art/icons/paw.svg); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo {
  display: flex; align-items: center; gap: 10px;
  font: 850 1.3rem/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
}
.logo:hover { color: var(--ink); }
.logo img { width: 32px; height: 32px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav > a {
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.94rem;
  padding: 8px 12px; border-radius: 10px; white-space: nowrap;
}
.site-nav > a:hover { color: var(--ink); background: var(--tint); }
.langs { display: inline-flex; margin-left: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--surface); }
.langs a {
  color: var(--ink-3); text-decoration: none; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 5px 8px; border-radius: 7px;
}
.langs a:hover { color: var(--ink); }
.langs a[aria-current="page"] { background: var(--tint); color: var(--ink); }
@media (max-width: 900px) { .site-nav > a { display: none; } }

/* Buttons. The App Store button is a placeholder until release: see
   docs/LANDING.md, "Ссылка на App Store". */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 24px; border-radius: 14px;
  background: var(--btn-bg); color: var(--btn-ink);
  font: 700 1.02rem/1.2 var(--body); text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { color: var(--btn-ink); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-soon, .btn-soon:hover {
  background: var(--surface); color: var(--ink);
  border: 1.5px dashed var(--ink-3);
  transform: none; box-shadow: none; cursor: default;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pen);
}
.lead { font-size: clamp(1.05rem, 1.8vw, 1.2rem); color: var(--ink-2); }
.mark { background: linear-gradient(transparent 55%, var(--marker-tint) 55%); padding: 0 2px; }

/* Hero */
.hero { border-bottom: 1px solid var(--line); }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 72px;
}
.hero h1 { margin: 18px 0 20px; }
.hero .lead { max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 32px; }
.cta .note { color: var(--ink-3); font-size: 0.92rem; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 36px; list-style: none; }
.trust li { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 600; font-size: 0.94rem; }
.trust .i { width: 20px; height: 20px; color: var(--pen); }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 48px; padding-top: 48px; padding-bottom: 56px; }
}

/* Phone mockup: an illustration of a practice screen in the notebook theme.
   It has no words, so it is the same on every language page. */
.device {
  justify-self: center; position: relative;
  width: min(320px, 100%); aspect-ratio: 9 / 18.5;
  border-radius: 46px; padding: 11px;
  background: #121725;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset, 0 30px 60px -24px rgba(28, 39, 64, 0.45);
}
.screen {
  position: relative; height: 100%; border-radius: 36px; overflow: hidden;
  display: flex; flex-direction: column; padding: 46px 20px 20px;
  background-color: #FCFDFF; color: #22304F;
  background-image: linear-gradient(#DCE5F4 1px, transparent 1px), linear-gradient(90deg, #DCE5F4 1px, transparent 1px);
  background-size: 14px 14px; background-position: -1px -1px;
  font-family: var(--display);
}
.screen::before { /* the island */
  content: ''; position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 84px; height: 24px; border-radius: 12px; background: #121725;
}
.s-top { display: flex; align-items: center; gap: 10px; }
.s-cells { flex: 1; display: grid; grid-template-columns: repeat(12, 1fr); gap: 0; }
.s-cells i { aspect-ratio: 1; border: 1px solid #C9D6EC; margin-left: -1px; background: #FCFDFF; }
.s-cells i.done { background: repeating-linear-gradient(135deg, #1F4FB8 0 2px, #FCFDFF 2px 5px); }
.s-cells i.cur { outline: 2px solid #1F4FB8; outline-offset: -1px; position: relative; z-index: 1; }
.s-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 4px; border-radius: 10px;
  background: #fff; font: 900 0.95rem/1 var(--display);
  box-shadow: 0 0 0 2px #fff, 0 2px 0 2px rgba(34, 48, 79, 0.12);
}
.s-chip img { width: 24px; height: 24px; }
.s-task {
  margin-top: 13%; display: flex; justify-content: center; align-items: center; gap: 8px;
  font: 900 clamp(2rem, 9vw, 2.6rem)/1 var(--display); letter-spacing: 0.01em;
}
.s-box {
  width: 1.45em; height: 1.7em; border: 3px solid #1F4FB8; border-radius: 6px 9px 5px 8px;
  display: grid; place-items: center; color: #1F4FB8;
}
/* Hint as in the app (lib/ui/session/hint_panel.dart, notebook theme):
   marker-yellow panel, ten frame on white, the rest beside it. No caption:
   the picture has to explain itself. */
.s-hint {
  margin: 12% 0 12px; display: grid; justify-items: center; padding: 14px;
  border-radius: 14px; background: rgba(242, 190, 34, 0.16); border: 2px solid rgba(242, 190, 34, 0.55);
}
.s-row { display: flex; align-items: center; gap: 8px; }
.s-frame { display: grid; grid-template-columns: repeat(5, 21px); gap: 4px; padding: 4px; border-radius: 9px; background: #fff; border: 2px solid #EAF0FA; }
.s-rest { display: grid; grid-template-columns: repeat(3, 21px); gap: 4px; }
.s-frame i, .s-rest i { width: 21px; height: 21px; border-radius: 50%; background: #1F4FB8; }
.s-frame i.l, .s-rest i.l { background: #9DB7E6; }
.s-keys { margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.s-keys b {
  display: grid; place-items: center; height: 46px; border-radius: 10px;
  background: #fff; border: 2px solid #C7D4EC; box-shadow: 0 3px 0 #C7D4EC;
  font: 900 1.4rem/1 var(--display); color: #22304F;
}
.s-keys b.ok { background: #12936B; border-color: #0D7556; box-shadow: 0 3px 0 #0D7556; color: #fff; }
.s-keys b.ok .i { width: 22px; height: 22px; }
.s-keys b.er { color: #8A93A8; font-size: 1.1rem; }
@media (max-width: 560px) { .device { width: 264px; border-radius: 40px; } .screen { border-radius: 30px; padding: 42px 16px 16px; } .s-keys b { height: 40px; } .s-frame, .s-rest { grid-template-columns: repeat(var(--n, 5), 17px); } .s-rest { --n: 3; } .s-frame i, .s-rest i { width: 17px; height: 17px; } .s-hint { margin-top: 9%; padding: 10px; } .s-task { margin-top: 9%; } }

/* Key facts */
.facts { border-bottom: 1px solid var(--line); background: var(--surface); }
.facts dl { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts div { padding: 28px 24px; border-left: 1px solid var(--line); }
.facts div:first-child { border-left: 0; padding-left: 0; }
.facts dt { font: 850 2.3rem/1 var(--display); letter-spacing: -0.02em; color: var(--ink); }
.facts dd { margin-top: 8px; color: var(--ink-2); font-size: 0.95rem; line-height: 1.4; }
@media (max-width: 760px) {
  .facts dl { grid-template-columns: 1fr 1fr; }
  .facts div { padding: 22px 16px; border-left: 0; }
  .facts div:nth-child(odd) { padding-left: 0; }
  .facts div:nth-child(even) { border-left: 1px solid var(--line); }
  .facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Sections */
.section { padding: 96px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section.tinted { background: var(--tint); }
.head { max-width: 46em; margin-bottom: 48px; }
.head h2 { margin: 12px 0 14px; }
@media (max-width: 760px) { .section { padding: 64px 0; } .head { margin-bottom: 32px; } }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid-4 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; box-shadow: var(--shadow);
}
.card h3 { margin: 18px 0 8px; }
.card p { color: var(--ink-2); font-size: 0.98rem; }
.tile {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center;
  background: var(--tint); color: var(--pen);
}
.tinted .tile { background: var(--paper); }
.tile img { width: 48px; height: 48px; }
.tile .i { width: 28px; height: 28px; }

/* Session steps */
.step { position: relative; }
.step .num {
  position: absolute; top: 24px; right: 22px;
  font: 850 0.95rem/1 var(--display); color: var(--ink-3);
}

/* Topics */
.topics { max-width: 720px; }
.topic-list { list-style: none; border-top: 1px solid var(--line); }
.topic-list li {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.topic-list b { font: 800 1.12rem/1.3 var(--display); }
.examples { display: flex; flex-wrap: wrap; gap: 8px; }
.examples span {
  font: 800 1rem/1 var(--display); white-space: nowrap; color: var(--pen);
  padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line);
}

/* Cats */
.collection { overflow: hidden; }
.collection .panel {
  border: 1px solid var(--line); border-radius: 24px; background-color: var(--surface);
  padding: 40px 32px; display: grid; gap: 28px; justify-items: center; box-shadow: var(--shadow);
}
.cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 20px; }
.cats img { width: 80px; height: 80px; }
.locked { /* a cat the child hasn't found yet, like in the app */
  position: relative; isolation: isolate; width: 80px; height: 80px; display: grid; place-items: center;
  font: 850 1.5rem/1 var(--display); color: var(--ink-3); padding-top: 14px;
}
.locked::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--line);
  -webkit-mask: url(/art/cats/locked.svg) center / contain no-repeat;
  mask: url(/art/cats/locked.svg) center / contain no-repeat;
}
.panel .caption { color: var(--ink-3); font-size: 0.92rem; text-align: center; }
@media (max-width: 560px) {
  .collection .panel { padding: 28px 16px; }
  .cats { gap: 10px; }
  .cats img, .locked { width: 56px; height: 56px; }
  .locked { font-size: 1.1rem; padding-top: 10px; }
}

/* Parents */
.parents { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 56px; align-items: start; }
@media (max-width: 900px) { .parents { grid-template-columns: 1fr; gap: 40px; } }
.points { list-style: none; display: grid; gap: 28px; }
.points li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; }
.points h3 { margin-bottom: 4px; }
.points p { color: var(--ink-2); font-size: 0.98rem; }

/* Parent report: an illustration of the app's progress screen. The words
   are the app's own strings in each language. */
.report { padding: 0; overflow: hidden; }
.report header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
  font: 850 1.15rem/1 var(--display);
}
.report header .i { color: var(--ink-3); width: 20px; height: 20px; }
.report section { padding: 18px 22px; border-bottom: 1px solid var(--line); }
.report section:last-child { border-bottom: 0; }
.report h4 { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.week { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.week b { font: 800 1.05rem/1.3 var(--display); white-space: nowrap; }
.days { display: grid; grid-template-columns: repeat(7, 14px); gap: 6px; align-items: end; height: 40px; }
.chart { display: grid; justify-items: center; gap: 4px; }
.dow { display: grid; grid-template-columns: repeat(7, 14px); gap: 6px; text-align: center; font-size: 0.7rem; font-weight: 600; color: var(--ink-3); }
.dow i { font-style: normal; }
.dow .today { color: var(--ink); font-weight: 800; }
.chart small { font-size: 0.75rem; color: var(--ink-3); }
.days i { display: block; border-radius: 4px; background: var(--pen); }
.days i.off { background: var(--line); height: 6px; }
.rows { list-style: none; display: grid; gap: 10px; }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; }
.pill { font-size: 0.82rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.pill.ok { background: var(--green-tint); color: var(--green); }
.pill.go { background: var(--tint); color: var(--pen); }
.pill.hard { background: var(--marker-tint); color: var(--ink); }
.tricky { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.tricky b { font: 850 1.3rem/1 var(--display); }
.tricky span { color: var(--ink-2); font-size: 0.95rem; }
.figure-note { margin-top: 12px; color: var(--ink-3); font-size: 0.85rem; text-align: center; }

/* Price */
.price { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
@media (max-width: 900px) { .price { grid-template-columns: 1fr; gap: 32px; } }
.plans { display: grid; gap: 12px; }
.plan { display: flex; align-items: center; gap: 18px; }
.plan h3 { margin: 0 0 2px; }
.plan p { margin: 0; }
.plan.free { border: 2px solid var(--pen); }
.plan.free .tile { background: var(--pen); color: var(--paper); }
.checks { list-style: none; display: grid; gap: 16px; margin-top: 8px; }
.checks li { display: flex; gap: 12px; color: var(--ink-2); }
.checks .i { color: var(--green); width: 22px; height: 22px; margin-top: 2px; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; }
.about p { color: var(--ink-2); margin-bottom: 16px; font-size: 1.05rem; }
.about .sign { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.about .sign img { width: 64px; height: 64px; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; gap: 12px; } }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; }
@media (max-width: 900px) { .faq { grid-template-columns: 1fr; gap: 12px; } }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font: 800 1.08rem/1.4 var(--display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { color: var(--ink-2); padding: 0 40px 22px 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 48px 0 56px; font-size: 0.94rem; color: var(--ink-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.site-footer .logo { font-size: 1.1rem; }
.site-footer .logo img { width: 28px; height: 28px; }
.site-footer .tag { margin-top: 10px; max-width: 26em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 12px 28px; list-style: none; align-items: start; }
.foot-links a { color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.foot-links a:hover { color: var(--ink); }
.foot-links .i { width: 18px; height: 18px; }
.copy { width: 100%; color: var(--ink-3); font-size: 0.86rem; }

/* Privacy Notice pages */
.doc { max-width: 720px; padding-top: 56px; padding-bottom: 80px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin: 12px 0 10px; }
.doc .date { color: var(--ink-3); font-size: 0.92rem; margin-bottom: 32px; }
.doc h2 { font-size: 1.35rem; margin: 40px 0 12px; }
.doc p, .doc li { margin-bottom: 12px; color: var(--ink-2); }
.doc a { overflow-wrap: anywhere; }
.doc .summary {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px 10px; margin: 24px 0 8px; list-style: none; box-shadow: var(--shadow);
}
.doc .summary li { display: flex; gap: 12px; color: var(--ink); }
.doc .summary .i { color: var(--green); width: 22px; height: 22px; margin-top: 2px; }

/* Section headings outside .head */
.eyebrow + h2 { margin-top: 12px; }
.eyebrow + h2 + .lead { margin-top: 14px; }
.plans + .checks { margin-top: 28px; }
