/* Idiomiko home page */
:root {
  --bg: #ffffff;
  --bg-tint: #f3f7fb;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --fg: #14212d;
  --muted: #566573;
  --line: #e2e8ef;
  --primary: #1f5f8b;
  --primary-strong: #174b6f;
  --primary-soft: #e3eef7;
  --on-primary: #ffffff;
  --green: #2e9e5b;
  --hero-a: #e8f1fa;
  --hero-b: #f1f8f3;
  --shadow: 0 1px 2px rgba(16, 35, 54, .06), 0 10px 30px -12px rgba(16, 35, 54, .18);
  --shadow-lg: 0 2px 6px rgba(16, 35, 54, .06), 0 30px 60px -20px rgba(16, 35, 54, .30);
  /* word highlights, as in the app */
  --w-new: #cde0fb;
  --w-learn: 250, 227, 158;
  --w-ink: #1b1f24;
  --radius: 18px;
  color-scheme: light;
}
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #152130;
    --bg-tint: #1a2838;
    --surface: #1d2d3e;
    --surface-2: #233649;
    --fg: #edf2f7;
    --muted: #aebdcc;
    --line: #2e4256;
    --primary: #86bbe6;
    --primary-strong: #a9d0f0;
    --primary-soft: #223e57;
    --on-primary: #0e1b28;
    --green: #66d093;
    --hero-a: #1d3a57;
    --hero-b: #173329;
    --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 30px -12px rgba(0, 0, 0, .45);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .25), 0 30px 60px -20px rgba(0, 0, 0, .6);
    --w-new: #3b5480;
    --w-learn: 132, 110, 56;
    --w-ink: #f1f4f8;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #152130;
  --bg-tint: #1a2838;
  --surface: #1d2d3e;
  --surface-2: #233649;
  --fg: #edf2f7;
  --muted: #aebdcc;
  --line: #2e4256;
  --primary: #86bbe6;
  --primary-strong: #a9d0f0;
  --primary-soft: #223e57;
  --on-primary: #0e1b28;
  --green: #66d093;
  --hero-a: #1d3a57;
  --hero-b: #173329;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 30px -12px rgba(0, 0, 0, .45);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .25), 0 30px 60px -20px rgba(0, 0, 0, .6);
  --w-new: #3b5480;
  --w-learn: 132, 110, 56;
  --w-ink: #f1f4f8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; color: var(--fg); }
h1, h2 { font-family: ui-serif, "New York", "Iowan Old Style", Charter, "Palatino Linotype", Palatino, Georgia, serif; font-weight: 700; letter-spacing: -.015em; text-wrap: balance; }
h3 { font-size: 1.08rem; line-height: 1.35; font-weight: 700; }
p { margin: 0; }
.ico { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 600 16px/1 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding: 15px 22px; border-radius: 12px; text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 50%, transparent); outline-offset: 2px; }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--primary) 70%, transparent); }
.btn-primary:hover { background: var(--primary-strong); }
.btn-ghost { color: var(--primary); background: transparent; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--primary) 55%, transparent); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-small { padding: 10px 14px; font-size: 14.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-light { background: #fff; color: #163a55; }
.btn-light:hover { background: #eaf2f9; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.header-row { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font: 700 19px/1 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; letter-spacing: -.01em; }
.brand img { width: 36px; height: 36px; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--fg); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px; border: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--fg);
  background: transparent; box-shadow: inset 0 0 0 1.5px var(--line);
  transition: background-color .15s ease;
}
.theme-toggle:hover { background: var(--surface-2); }
.theme-toggle:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 50%, transparent); outline-offset: 2px; }
.theme-toggle .ico { width: 20px; height: 20px; grid-area: 1 / 1; }
.theme-toggle .ico-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ico-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .ico-moon { display: none; }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand img { background: #e8f0f7; border-radius: 50%; padding: 3px; }
}
:root[data-theme="dark"] .brand img { background: #e8f0f7; border-radius: 50%; padding: 3px; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% 10%, var(--hero-a), transparent 70%),
    radial-gradient(700px 460px at 0% 45%, var(--hero-b), transparent 70%);
  padding: 72px 0 120px;
}
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--primary);
  background: var(--primary-soft); padding: 7px 13px; border-radius: 999px; margin-bottom: 22px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
.hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.1rem); line-height: 1.04; margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: var(--primary); }
.lead { font-size: 1.2rem; line-height: 1.6; color: var(--muted); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.platforms { margin-top: 18px; font-size: 14.5px; color: var(--muted); }

.hero-visual { position: relative; padding: 0 0 96px 0; }
.reader {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.2deg);
}
.reader-bar { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.lights { display: inline-flex; gap: 6px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.reader-title { font-size: 13.5px; font-weight: 600; color: var(--muted); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip { font: 700 11.5px/1 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; padding: 5px 8px; border-radius: 6px; }
.chip-lang { background: #2e9e5b; color: #fff; letter-spacing: .04em; }
.reader-body { padding: 22px 26px 30px; font: 19px/1.75 Charter, "Iowan Old Style", Georgia, serif; }
.r-line { position: relative; padding-left: 26px; }
.r-line + .r-tr, .r-tr + .r-line { margin-top: 2px; }
.r-tr { padding-left: 26px; font: 14.5px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--muted); margin-bottom: 14px; }
.play { position: absolute; left: 0; top: .5em; font: 9px/1 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--primary); width: 17px; height: 17px; border-radius: 50%; background: var(--primary-soft); display: grid; place-items: center; padding-left: 1px; }

w { border-radius: 5px; padding: 0 3px; margin: 0 -1px; color: var(--w-ink); }
w.u { background: var(--w-new); }
w.l1 { background: rgba(var(--w-learn), 1); }
w.l2 { background: rgba(var(--w-learn), .85); }
w.l3 { background: rgba(var(--w-learn), .65); }
w.l4 { background: rgba(var(--w-learn), .45); }
w.l5 { background: rgba(var(--w-learn), .28); }
w.k { background: transparent; color: var(--fg); }
w.sel { box-shadow: 0 0 0 2px var(--primary); }
w.expr { border-bottom: 2px dotted color-mix(in srgb, var(--w-ink) 35%, transparent); }

.popover {
  position: absolute; right: -22px; bottom: -78px; width: 232px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 14px 16px 16px;
  transform: rotate(1.2deg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.pop-head { display: flex; align-items: center; justify-content: space-between; font-size: 17px; }
.pop-speaker { color: var(--primary); display: inline-flex; }
.pop-meaning { font-size: 15px; font-weight: 600; margin-top: 4px; }
.pop-note { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.levels { display: flex; gap: 5px; margin-top: 12px; }
.levels span { flex: 1; text-align: center; font-size: 12px; font-weight: 700; padding: 6px 0; border-radius: 7px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.levels span:first-child { background: rgba(var(--w-learn), 1); color: var(--w-ink); border-color: transparent; }
.levels .wk { color: var(--green); }

.hero-mascot { position: absolute; left: -30px; bottom: -40px; width: 170px; filter: drop-shadow(0 14px 24px rgba(16, 35, 54, .18)); }

/* Highlights */
.highlights { position: relative; z-index: 1; margin-top: -40px; padding-bottom: 64px; }
.highlights-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hl {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow); padding: 28px 28px 30px;
  display: flex; flex-direction: column; gap: 12px;
}
.hl::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--hl); }
.hl-oss { --hl: #1f5f8b; }
.hl-data { --hl: #2e9e5b; }
.hl-offline { --hl: #ea7a1b; }
.hl-ico {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  color: var(--hl); background: color-mix(in srgb, var(--hl) 13%, transparent);
}
.hl-ico .ico { width: 25px; height: 25px; }
.hl-title { font-family: ui-serif, "New York", "Iowan Old Style", Charter, "Palatino Linotype", Palatino, Georgia, serif; font-size: 1.6rem; line-height: 1.15; }
.hl p { color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.hl-link, .hl-tags { margin-top: auto; padding-top: 6px; }
.hl-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; text-decoration: none; }
.hl-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hl-tags li {
  font-size: 13.5px; font-weight: 600; padding: 6px 11px; border-radius: 999px;
  color: var(--fg); background: color-mix(in srgb, var(--hl) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--hl) 25%, transparent);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hl-oss { --hl: #86bbe6; }
  :root:not([data-theme="light"]) .hl-data { --hl: #66d093; }
  :root:not([data-theme="light"]) .hl-offline { --hl: #f59a4f; }
}
:root[data-theme="dark"] .hl-oss { --hl: #86bbe6; }
:root[data-theme="dark"] .hl-data { --hl: #66d093; }
:root[data-theme="dark"] .hl-offline { --hl: #f59a4f; }

/* Numbers strip */
.numbers { border-block: 1px solid var(--line); background: var(--bg-tint); }
.numbers-row { display: grid; grid-template-columns: repeat(4, 1fr); }
.numbers-row div { padding: 26px 12px; text-align: center; display: grid; gap: 4px; }
.numbers-row div + div { border-left: 1px solid var(--line); }
.numbers strong { font: 700 2.1rem/1 ui-serif, "New York", "Iowan Old Style", Charter, "Palatino Linotype", Palatino, Georgia, serif; color: var(--primary); }
.numbers span { font-size: 14px; color: var(--muted); line-height: 1.35; }

/* Sections */
.section { padding: 104px 0; }
.section-tint { background: var(--bg-tint); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.kicker { font-size: 13.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--green); margin-bottom: 12px; }
.section h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.1; }
.sub { font-size: 1.1rem; color: var(--muted); margin-top: 16px; max-width: 38em; }

.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }

.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 34px; color: var(--muted); }
.checks li b { color: var(--fg); font-weight: 700; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: color-mix(in srgb, var(--green) 16%, transparent);
}
.checks li::after {
  content: ""; position: absolute; left: 7.5px; top: 8px; width: 5px; height: 9px;
  border: solid var(--green); border-width: 0 2.2px 2.2px 0; transform: rotate(45deg);
}

.legend-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 28px 30px; }
.legend-title { font-weight: 700; margin-bottom: 18px; }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.legend li { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 14px; font-size: 15px; color: var(--muted); }
.legend w { font: 19px/1.6 Charter, "Iowan Old Style", Georgia, serif; justify-self: start; padding: 0 7px; }
.legend-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--muted); }

/* Courses */
.split-courses { grid-template-columns: 1.25fr .75fr; }
.courses-mascot { width: 100%; max-width: 360px; justify-self: center; }
.stages-title { margin: 56px 0 22px; font-size: 1.15rem; }
.stages { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.stages li {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 20px;
  display: grid; gap: 6px; align-content: start; position: relative;
}
.stages .n {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; background: var(--primary); color: var(--on-primary); margin-bottom: 6px;
}
.stages b { font-weight: 700; }
.stages li > span:last-child { font-size: 14.5px; color: var(--muted); line-height: 1.5; }

/* Feature bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px 28px; display: grid; gap: 10px; align-content: start;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card p { font-size: 15.5px; color: var(--muted); line-height: 1.55; }
.card-wide { grid-column: span 2; grid-template-columns: 1fr auto; align-items: center; gap: 24px; }
.card-span { grid-column: span 2; }
.card-text { display: grid; gap: 10px; }
.card-flash { background: linear-gradient(135deg, color-mix(in srgb, var(--green) 9%, var(--surface)), var(--surface) 70%); }
.card-flash img { width: 190px; margin: -8px 0 -18px; }
.card-ext { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--surface)), var(--surface) 70%); }
.badge-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 6px; }
.badge-ico .ico { width: 23px; height: 23px; }
.c-green  { color: #2e9d57; background: color-mix(in srgb, #2e9d57 14%, transparent); }
.c-purple { color: #7c4ddb; background: color-mix(in srgb, #7c4ddb 14%, transparent); }
.c-teal   { color: #1f8a8a; background: color-mix(in srgb, #1f8a8a 14%, transparent); }
.c-orange { color: #ea7a1b; background: color-mix(in srgb, #ea7a1b 14%, transparent); }
.c-red    { color: #d64545; background: color-mix(in srgb, #d64545 14%, transparent); }
.c-pink   { color: #d9488b; background: color-mix(in srgb, #d9488b 14%, transparent); }
.c-blue   { color: #3b6fe0; background: color-mix(in srgb, #3b6fe0 14%, transparent); }
.c-amber  { color: #d68a00; background: color-mix(in srgb, #d68a00 14%, transparent); }
.c-brown  { color: #8c564b; background: color-mix(in srgb, #8c564b 14%, transparent); }
.c-gray   { color: #6b7380; background: color-mix(in srgb, #8a8f98 16%, transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .c-purple { color: #b496f2; } :root:not([data-theme="light"]) .c-red { color: #f08a8a; } :root:not([data-theme="light"]) .c-blue { color: #8fb0f5; } :root:not([data-theme="light"]) .c-brown { color: #d0a294; }
  :root:not([data-theme="light"]) .c-gray { color: #b3bac4; } :root:not([data-theme="light"]) .c-teal { color: #5cc9c9; } :root:not([data-theme="light"]) .c-green { color: #66d093; } :root:not([data-theme="light"]) .c-amber { color: #f0b440; }
  :root:not([data-theme="light"]) .c-orange { color: #f59a4f; } :root:not([data-theme="light"]) .c-pink { color: #ee7fb2; }
}
:root[data-theme="dark"] .c-purple { color: #b496f2; } :root[data-theme="dark"] .c-red { color: #f08a8a; } :root[data-theme="dark"] .c-blue { color: #8fb0f5; } :root[data-theme="dark"] .c-brown { color: #d0a294; }
:root[data-theme="dark"] .c-gray { color: #b3bac4; } :root[data-theme="dark"] .c-teal { color: #5cc9c9; } :root[data-theme="dark"] .c-green { color: #66d093; } :root[data-theme="dark"] .c-amber { color: #f0b440; }
:root[data-theme="dark"] .c-orange { color: #f59a4f; } :root[data-theme="dark"] .c-pink { color: #ee7fb2; }

.yt { width: 260px; display: grid; gap: 0; }
.yt-screen {
  aspect-ratio: 16 / 9; border-radius: 12px 12px 0 0;
  background: linear-gradient(135deg, #3a4d63, #1d2a38);
  display: grid; place-items: center;
}
.yt-play { width: 46px; height: 32px; border-radius: 9px; background: #e33; position: relative; }
.yt-play::after { content: ""; position: absolute; left: 19px; top: 9px; border-left: 11px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.yt-sub {
  background: #0d141b; color: #f4f6f8; border-radius: 0 0 12px 12px;
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; padding: 10px 12px; text-align: center;
}
.card .yt-sub { color: #f4f6f8; }
.yt-sub w.u { background: #cde0fb; color: #1b1f24; }
.yt-sub w.l2 { background: rgba(250, 227, 158, .9); color: #1b1f24; }

.more { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.more li {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line); padding: 9px 14px; border-radius: 999px;
}
.more .ico { color: var(--primary); }

/* Library & privacy */
.split-privacy { grid-template-columns: .8fr 1.2fr; }
.privacy-mascot { width: 100%; max-width: 420px; justify-self: center; }
.facts { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.facts li { display: flex; gap: 14px; align-items: flex-start; color: var(--muted); }
.facts li b { color: var(--fg); font-weight: 700; }
.facts .ico { width: 40px; height: 40px; padding: 9px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); stroke-width: 1.7; }
.links-row { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px; font-weight: 600; }

/* Downloads */
.downloads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dl {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column; gap: 8px;
}
.dl-ico { width: 34px; height: 34px; fill: none; stroke: var(--fg); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.dl h3 { font-size: 1.2rem; }
.dl-note { font-size: 15px; color: var(--muted); flex: 1; margin-bottom: 10px; }
.dl-meta { font-size: 13.5px; color: var(--muted); text-align: center; min-height: 1.5em; }
.dl-meta a { font-weight: 600; }
.yours {
  display: none; position: absolute; top: 18px; right: 18px;
  font-size: 12px; font-weight: 700; color: var(--green);
  background: color-mix(in srgb, var(--green) 14%, transparent); padding: 4px 10px; border-radius: 999px;
}
.dl.is-yours { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent), var(--shadow); }
.dl.is-yours .yours { display: inline-block; }
.dl:not(.is-yours) .btn-primary { background: var(--surface-2); color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--line); }
.dl:not(.is-yours) .btn-primary:hover { background: var(--primary-soft); }
.all-releases { margin-top: 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; }
.all-releases a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }

/* Open source band */
.oss-section { padding-top: 0; }
.oss {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  background: linear-gradient(135deg, #1f5f8b, #24406b);
  color: #e6eff7; border-radius: 26px; padding: 52px 56px;
  box-shadow: var(--shadow-lg);
}
.oss h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 14px; }
.oss p { max-width: 44em; color: #c9dbea; }
.kicker-light { color: #8fe0b0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 44px; font-size: 14.5px; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.brand-small { font-size: 16px; }
.brand-small img { width: 28px; height: 28px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--fg); }
.contact { margin-left: auto; }

/* Responsive */
@media (max-width: 1080px) {
  .nav { gap: 18px; }
  .hero-grid { gap: 40px; }
  .popover { right: -8px; }
  .hero-mascot { left: -10px; }
  .stages { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  .nav { display: none; }
  .header-row { justify-content: space-between; }
  .hero { padding: 48px 0 96px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; margin: 8px auto 0; width: 100%; }
  .numbers-row { grid-template-columns: repeat(2, 1fr); }
  .numbers-row div:nth-child(3) { border-left: 0; }
  .numbers-row div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .split, .split-courses, .split-privacy { grid-template-columns: 1fr; gap: 40px; }
  .courses-mascot { max-width: 280px; order: -1; }
  .privacy-mascot { max-width: 300px; }
  .bento, .downloads { grid-template-columns: repeat(2, 1fr); }
  .card-wide { grid-column: span 2; }
  .highlights-grid { grid-template-columns: 1fr; }
  .hl { padding: 24px; }
  .oss { flex-direction: column; align-items: flex-start; padding: 40px 36px; }
  .section { padding: 80px 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .header-row { height: 60px; gap: 12px; }
  .brand { font-size: 17px; }
  .brand img { width: 32px; height: 32px; }
  .btn-small { padding: 9px 12px; font-size: 13.5px; }
  .hero { padding: 32px 0 72px; }
  .highlights { padding-bottom: 48px; }
  .hl-title { font-size: 1.4rem; }
  .theme-toggle { width: 36px; height: 36px; }
  .header-actions { gap: 8px; }
  .eyebrow { font-size: 12.5px; margin-bottom: 18px; }
  .lead { font-size: 1.08rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .reader { transform: none; }
  .reader-body { padding: 18px 18px 22px; font-size: 17px; }
  .popover { position: relative; right: auto; bottom: auto; width: auto; margin: -6px 14px 16px 92px; transform: none; }
  .hero-visual { padding-bottom: 0; }
  .hero-mascot { left: -4px; bottom: 6px; width: 96px; }
  .numbers-row { grid-template-columns: repeat(2, 1fr); }
  .numbers-row div { padding: 20px 8px; }
  .numbers-row div:nth-child(n) { border-left: 0; border-top: 0; }
  .numbers-row div:nth-child(even) { border-left: 1px solid var(--line); }
  .numbers-row div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .numbers strong { font-size: 1.8rem; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .legend-card { padding: 22px 20px; }
  .legend li { grid-template-columns: 96px 1fr; gap: 10px; font-size: 14px; }
  .stages { grid-template-columns: 1fr; gap: 10px; }
  .stages li { grid-template-columns: 30px 1fr; column-gap: 14px; row-gap: 2px; padding: 14px 16px; }
  .stages .n { grid-row: span 2; margin: 0; }
  .bento, .downloads { grid-template-columns: 1fr; }
  .card-wide { grid-column: auto; grid-template-columns: 1fr; }
  .card-span { grid-column: auto; }
  .card { padding: 20px; }
  .card:not(.card-wide) { grid-template-columns: 40px 1fr; column-gap: 14px; row-gap: 4px; }
  .card:not(.card-wide) .badge-ico { grid-row: span 2; margin: 0; width: 40px; height: 40px; }
  .dl { padding: 22px; }
  .dl-ico { width: 28px; height: 28px; margin-bottom: 0; }
  .card-flash img { width: 150px; margin: 0 auto -10px; }
  .yt { width: 100%; }
  .oss { padding: 32px 24px; border-radius: 20px; }
  .oss .btn { width: 100%; }
  .contact { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
  .btn:hover, .card:hover { transform: none; }
}

/* Trademark */
.tm { font-size: .6em; vertical-align: super; line-height: 0; margin-left: .05em; font-weight: 600; }
.tm-notice { margin: 0; padding-top: 18px; font-size: 13px; color: var(--muted); }

/* Account page */
[hidden] { display: none !important; }
.account-page .header-actions { margin-left: auto; }
.account-page { --danger: #b42318; --danger-soft: #fdecea; --warn: #9a5b00; --warn-soft: #fdf1dc; min-height: 100vh; display: flex; flex-direction: column; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .account-page { --danger: #f59389; --danger-soft: #3b2224; --warn: #f0c070; --warn-soft: #3a2f1c; }
}
:root[data-theme="dark"] .account-page { --danger: #f59389; --danger-soft: #3b2224; --warn: #f0c070; --warn-soft: #3a2f1c; }

.acct {
  flex: 1;
  background:
    radial-gradient(900px 520px at 90% 0%, var(--hero-a), transparent 70%),
    radial-gradient(700px 480px at 0% 70%, var(--hero-b), transparent 70%);
  padding: 64px 0 96px;
}
.acct-grid { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 72px; align-items: start; }
.acct-main { min-width: 0; }
.acct h1 { font-size: clamp(2.1rem, 3.6vw, 2.8rem); line-height: 1.08; }
.acct .sub { margin-top: 12px; }

.acct-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px; margin-top: 28px;
}
.acct-loading { display: flex; align-items: center; gap: 14px; color: var(--muted); margin-top: 0; }
.spinner {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 2.5px solid var(--primary-soft); border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.google-slot { display: flex; justify-content: center; min-height: 44px; }
.google-slot:empty { display: none; }
.or { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--muted); font-size: 13.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.acct-form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field > span:first-child { font-size: 14px; font-weight: 600; color: var(--fg); }
.field input {
  width: 100%; font: 16px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--fg);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.field input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
.field input:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.password { position: relative; display: block; }
.password input { padding-right: 48px; }
.reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--muted);
  display: grid; place-items: center; cursor: pointer;
}
.reveal:hover, .reveal[aria-pressed="true"] { color: var(--primary); background: var(--primary-soft); }
.reveal .ico { width: 20px; height: 20px; }
.acct-form .btn { border: 0; cursor: pointer; margin-top: 4px; }
.acct-form .btn[disabled] { opacity: .65; cursor: progress; transform: none; }
.form-error {
  font-size: 14.5px; color: var(--danger); background: var(--danger-soft);
  border-radius: 10px; padding: 10px 13px;
}
.fine { margin-top: 20px; font-size: 14.5px; color: var(--muted); max-width: 34em; }

.profile { display: flex; align-items: center; gap: 16px; }
.avatar-wrap { flex: none; }
.avatar-button { position: relative; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.avatar-button:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 50%, transparent); outline-offset: 3px; }
.avatar-badge {
  position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface); color: var(--primary); box-shadow: 0 0 0 1.5px var(--line);
}
.avatar-badge .ico { width: 15px; height: 15px; }
.avatar-button:hover .avatar-badge { background: var(--primary-soft); }
.picture-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; }
.link-button { padding: 0; border: 0; background: none; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--primary); cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.link-button[disabled] { opacity: .6; cursor: progress; text-decoration: none; }
.profile-text .form-error { margin-top: 8px; }
.crop {
  margin: auto; width: min(400px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: var(--radius);
  background: var(--surface); color: var(--fg); box-shadow: var(--shadow-lg);
}
.crop::backdrop { background: rgba(10, 20, 30, .5); }
.crop h2 { font: 700 1.25rem/1.2 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; letter-spacing: 0; }
.crop-hint { margin-top: 6px; color: var(--muted); font-size: 14.5px; }
.crop-canvas {
  display: block; width: 100%; max-width: 320px; aspect-ratio: 1; margin: 18px auto 0; border-radius: 14px;
  background: var(--surface-2); touch-action: none; cursor: grab;
}
.crop-canvas.dragging { cursor: grabbing; }
.crop-zoom { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 14.5px; color: var(--muted); }
.crop-zoom input { flex: 1; accent-color: var(--primary); }
.crop .form-error { margin-top: 14px; }
.crop-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.crop-actions .btn { border: 0; cursor: pointer; }
.crop-actions .btn[disabled] { opacity: .65; cursor: progress; transform: none; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; display: block; }
.avatar-initial {
  display: grid; place-items: center; background: var(--primary-soft); color: var(--primary);
  font: 700 24px/1 ui-serif, "New York", "Iowan Old Style", Charter, Georgia, serif;
}
.profile-text { min-width: 0; flex: 1; }
.profile-name { font-weight: 700; font-size: 1.12rem; overflow-wrap: anywhere; }
.profile-email { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill:empty { display: none; }
.pill-ok { background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--green); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }

.sync { margin-top: 16px; }
.sync-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.sync-head h2 { font: 700 1.2rem/1.2 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; letter-spacing: 0; flex: 1; }
.sync .badge-ico { margin: 0; background: var(--primary-soft); color: var(--primary); }
.sync > p { color: var(--muted); }
.sync-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.acct-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.acct-actions .btn .ico { width: 18px; height: 18px; }
.btn-quiet { background: transparent; border: 0; cursor: pointer; color: var(--muted); padding-inline: 14px; }
.btn-quiet:hover { color: var(--danger); background: var(--danger-soft); }

.acct-aside { padding-top: 12px; }
.acct-aside img { width: min(100%, 380px); margin: 0 auto 8px; filter: drop-shadow(0 24px 40px rgba(16, 35, 54, .14)); }
.acct-aside .facts { margin-top: 8px; max-width: 30em; margin-inline: auto; }

@media (max-width: 920px) {
  .acct { padding: 40px 0 72px; }
  .acct-grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .acct-main { max-width: 520px; width: 100%; margin: 0 auto; }
  .acct-aside { max-width: 520px; width: 100%; margin: 0 auto; padding-top: 0; }
  .acct-aside img { width: 220px; }
}
@media (max-width: 640px) {
  .acct { padding: 28px 0 56px; }
  .acct-card { padding: 22px 18px; margin-top: 22px; }
  .acct-loading { margin-top: 0; }
  .profile { gap: 14px; }
  .profile .pill { display: none; }
  .avatar { width: 48px; height: 48px; }
  .avatar-initial { font-size: 21px; }
  .acct-actions .btn { width: 100%; }
  .sync-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.4s; }
}

/* The language switch: a globe and the language's code, over a native select that lists the names. */
.i18n-pending body { visibility: hidden; }
.lang-switch {
  position: relative; height: 40px; padding: 0 10px; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 6px; color: var(--fg); cursor: pointer;
  box-shadow: inset 0 0 0 1.5px var(--line); transition: background-color .15s ease;
  font: 600 13.5px/1 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; letter-spacing: .03em;
}
.lang-switch:hover { background: var(--surface-2); }
.lang-switch:focus-within { outline: 3px solid color-mix(in srgb, var(--primary) 50%, transparent); outline-offset: 2px; }
.lang-switch .ico { width: 18px; height: 18px; }
.lang-switch select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
@media (max-width: 640px) {
  .lang-switch { height: 36px; padding: 0 8px; }
  /* Beside the theme and language buttons there is no room on a phone; the page repeats it just below. */
  .header-actions .btn-small { display: none; }
  .header-row { justify-content: space-between; }
}
