/* Crack Attack! presentation site. Dark arcade look: black stage, glossy colored blocks, neon edges. */

:root {
  --bg: #05030b;
  --panel: #0d0919;
  --panel-2: #130d24;
  --line: rgba(160, 140, 255, 0.22);
  --text: #e9e6f5;
  --muted: #a39cc0;
  --purple: #b42fe0;
  --green: #22b84d;
  --yellow: #e4d21a;
  --orange: #ea8c17;
  --blue: #7480e6;
  --gray: #9b9ba2;
  --red: #e2434a;
  --accent: #8a7bff;
  --glow: 0 0 24px rgba(138, 123, 255, 0.45);
  --display: "Arial Rounded MT Bold", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

img { max-width: 100%; display: block; }
a { color: #b8aaff; text-underline-offset: 3px; }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; letter-spacing: 0.01em; margin: 0 0 0.5em; }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); text-align: center; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid #69d8ff; outline-offset: 3px; border-radius: 6px; }

.grad { background: linear-gradient(90deg, #ffe45e, #ff8a1c 55%, #e0309a); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- navigation ---------- */
.nav-wrap { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); background: rgba(5, 3, 11, 0.72); border-bottom: 1px solid var(--line); }
.nav { max-width: 1160px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font: 800 1.1rem var(--display); }
.links { display: flex; flex-wrap: wrap; gap: 4px 6px; justify-content: flex-end; }
.links a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: 0.95rem; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.links a:hover, .links a.active { color: #fff; background: rgba(138, 123, 255, 0.2); }
/* phone: one single row. The links scroll sideways inside their own strip; Download and the language menu stay in view. */
@media (max-width: 900px) {
  .nav { flex-wrap: nowrap; gap: 8px; padding: 4px 10px; }
  .brand span { display: none; }
  .links { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 22px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 10px, #000 calc(100% - 22px), transparent 100%); }
  .links::-webkit-scrollbar { display: none; }
  .links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 0.92rem; }
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: calc(100svh - 52px); display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, rgba(90, 40, 160, 0.38), transparent 62%), radial-gradient(ellipse at 20% 90%, rgba(30, 80, 200, 0.22), transparent 55%), #05030b; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.92;
  /* blocks fade out behind the text so it stays readable */
  -webkit-mask-image: radial-gradient(ellipse 42% 52% at 50% 56%, rgba(0, 0, 0, 0.08) 45%, #000 100%);
  mask-image: radial-gradient(ellipse 42% 52% at 50% 56%, rgba(0, 0, 0, 0.08) 45%, #000 100%); }
.hero-inner { position: relative; z-index: 2; text-align: center; padding: 56px 20px 90px; max-width: 760px; }
.hero-inner::before { content: ""; position: absolute; inset: 22% -12% 4%; z-index: -1; background: radial-gradient(closest-side, rgba(5, 3, 11, 0.86) 40%, rgba(5, 3, 11, 0) 100%); }
.hero-logo { width: min(420px, 78vw); height: auto; margin: 0 auto 8px; filter: drop-shadow(0 12px 40px rgba(180, 60, 255, 0.45)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-9px) rotate(-0.6deg); } }
.tagline { font: 800 clamp(1.8rem, 5vw, 3rem) var(--display); margin: 12px 0 14px; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7); }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: #cfc9ea; max-width: 38em; margin: 0 auto 28px; text-shadow: 0 2px 18px #000; }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; color: var(--muted); font-size: 0.97rem; }
.facts strong { color: #fff; }
.scroll-hint { position: absolute; z-index: 2; bottom: 18px; left: 50%; width: 28px; height: 46px; margin-left: -14px; border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 16px; }
.scroll-hint span { position: absolute; left: 50%; top: 9px; width: 4px; height: 9px; margin-left: -2px; border-radius: 3px; background: #fff; animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(16px); } }

/* ---------- buttons ---------- */
.btn { display: inline-block; font: 700 1rem var(--display); color: #fff; text-decoration: none; padding: 12px 24px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)); border: 1px solid rgba(180, 160, 255, 0.5); cursor: pointer; transition: transform 0.15s, box-shadow 0.2s, background 0.2s; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--glow); color: #fff; }
.btn.primary { background: linear-gradient(135deg, #8a3dff, #3d7bff); border-color: transparent; box-shadow: 0 8px 26px rgba(110, 70, 255, 0.5); }
.btn.small { font-size: 0.9rem; padding: 7px 16px; }
.btn.disabled { opacity: 0.55; cursor: default; pointer-events: none; }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 9vw, 110px) 0; }
.section.alt { background: linear-gradient(180deg, #0a0615, #07040f); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.center { text-align: center; }
.section-lead { text-align: center; color: var(--muted); max-width: 40em; margin: 0 auto 36px; font-size: 1.08rem; }
.fine { color: var(--muted); font-size: 0.9rem; }
.note { max-width: 46em; margin: 0 auto 56px; padding: 14px 20px; border-left: 4px solid var(--accent); background: rgba(138, 123, 255, 0.1); border-radius: 0 12px 12px 0; color: #d6d0f0; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- lessons ---------- */
.lesson { display: grid; grid-template-columns: 1fr minmax(280px, 440px); gap: clamp(24px, 5vw, 64px); align-items: center; margin: 0; }
.lesson.flip { grid-template-columns: minmax(280px, 440px) 1fr; }
.lesson.flip .lesson-text { order: 2; }
.lesson-text .step { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; font: 800 1.5rem var(--display); margin-bottom: 14px;
  background: linear-gradient(145deg, #a43bff, #4a58ff); box-shadow: 0 6px 22px rgba(120, 80, 255, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.35); }
.lesson-text ul { padding-left: 1.2em; }
.lesson-text li { margin-bottom: 0.45em; }
.lesson-text ul.gems { list-style: none; padding-left: 0; }
@media (max-width: 820px) { .lesson, .lesson.flip { grid-template-columns: 1fr; } .lesson.flip .lesson-text { order: 0; } }

.demo-card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 20px; padding: 14px 14px 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05); max-width: 440px; width: 100%; margin: 0 auto; }
.demo-card canvas { display: block; width: 100%; aspect-ratio: var(--ratio, 1); border-radius: 12px; background: #04020a; touch-action: manipulation; }
.demo-card canvas:focus-visible { outline: 3px solid #69d8ff; }
.demo-caption { min-height: 3.4em; margin: 10px 4px 6px; color: #d8d3f0; font-size: 0.97rem; line-height: 1.45; }
.demo-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }


/* little dots: which example of the lesson is playing */
.dots { display: inline-flex; gap: 7px; align-items: center; }
.dots span { width: 9px; height: 9px; border-radius: 50%; background: rgba(160, 140, 255, 0.28); transition: background 0.3s, transform 0.3s; }
.dots span.on { background: #b8aaff; transform: scale(1.3); box-shadow: 0 0 8px rgba(160, 140, 255, 0.7); }

/* garbage "chips": a slab is --w blocks wide and --h rows high */
.sent { min-height: 0; margin: 2px 4px 8px; }
.sent-label { display: block; color: var(--muted); font-size: 0.85rem; margin-bottom: 6px; }
.sent-strip, .calc-strip { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; }
.slab { --u: 22px; display: inline-block; width: calc(var(--u) * var(--w)); height: calc(var(--u) * var(--h)); border-radius: 7px;
  background: linear-gradient(180deg, #f06d73, #c32a33); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 0 rgba(90, 0, 10, 0.4), 0 3px 10px rgba(226, 67, 74, 0.35); }
.slab.gray { background: linear-gradient(180deg, #c7c7ce, #7d7d86); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), inset 0 -3px 0 rgba(30, 30, 40, 0.45); }
.calc-strip { min-height: 70px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.35); border: 1px dashed var(--line); }
.calc-strip.tall { min-height: 150px; align-items: flex-end; }
.calc-strip .slab { --u: 26px; }

/* ---------- gems (little blocks used as bullets) ---------- */
.gem { display: inline-block; width: 22px; height: 22px; border-radius: 6px; vertical-align: -5px; margin-right: 4px; position: relative;
  background: var(--c); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), inset 0 -3px 0 rgba(0, 0, 0, 0.3), 0 0 14px color-mix(in srgb, var(--c) 55%, transparent); }
.gem::after { content: ""; position: absolute; inset: 4px; background:
  linear-gradient(45deg, transparent 47%, rgba(255, 255, 255, 0.35) 48% 52%, transparent 53%),
  linear-gradient(-45deg, transparent 47%, rgba(255, 255, 255, 0.35) 48% 52%, transparent 53%); }
.gem.purple { --c: var(--purple); } .gem.green { --c: var(--green); } .gem.yellow { --c: var(--yellow); }
.gem.orange { --c: var(--orange); } .gem.blue { --c: var(--blue); } .gem.gray { --c: var(--gray); }
.gem.big { width: 54px; height: 54px; border-radius: 14px; margin: 0 0 16px; }
.gem.big::after { inset: 9px; }

/* ---------- calculator ---------- */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 48px); background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 22px; padding: clamp(18px, 3vw, 36px); }
.calc h3 { margin-bottom: 14px; }
.calc label { display: block; color: #d8d3f0; margin-bottom: 6px; }
.calc output { font: 800 1.3rem var(--display); color: #fff; }
.calc input[type=range] { width: 100%; margin: 4px 0 16px; accent-color: #8a7bff; }
.calc-text { margin: 14px 0 6px; font-weight: 600; color: #fff; }
@media (max-width: 760px) { .calc { grid-template-columns: 1fr; } }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.card { background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 20px; padding: 26px; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.card:hover { transform: translateY(-4px); border-color: rgba(160, 140, 255, 0.55); box-shadow: 0 16px 40px rgba(60, 30, 140, 0.35); }
.card h3 { font-size: 1.25rem; }
.card p { color: #cfc9ea; margin: 0; }
.tips .card .gem { margin-bottom: 12px; }

/* ---------- reviews ---------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
.quote { margin: 0; padding: 28px 26px 22px; border-radius: 20px; position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); }
.quote::before { content: "\201C"; position: absolute; top: 2px; left: 16px; font: 800 4.2rem/1 var(--display); color: rgba(138, 123, 255, 0.35); }
.quote p { position: relative; margin: 14px 0 16px; font-size: 1.12rem; line-height: 1.5; color: #f1eefc; }
.quote footer { color: var(--muted); font-size: 0.9rem; }
.quote cite { color: #cfc8f2; font-style: normal; font-weight: 600; }
.quote.big { grid-column: 1 / -1; background: linear-gradient(135deg, #1d1240, #0d0919); border-color: rgba(160, 140, 255, 0.45); }
.quote.big p { font: 800 clamp(1.4rem, 3.2vw, 2rem) var(--display); line-height: 1.3; }
details.orig { margin: -6px 0 14px; font-size: 0.88rem; color: var(--muted); }
details.orig summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; font-weight: 600; list-style: none; }
details.orig summary::-webkit-details-marker { display: none; }
details.orig summary::after { content: "▾"; margin-left: 8px; }
details.orig[open] summary::after { content: "▴"; }
details.orig p { margin: 10px 0 2px; font-size: 1rem; font-style: italic; color: #d8d3f0; }

/* ---------- controls table ---------- */
.controls { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.controls th, .controls td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.controls th { color: var(--muted); font-weight: 600; background: rgba(138, 123, 255, 0.08); }
.controls tr:last-child td { border-bottom: 0; }
kbd { display: inline-block; min-width: 2em; text-align: center; padding: 2px 8px; border-radius: 7px; font: 700 0.9rem var(--display); color: #fff;
  background: linear-gradient(180deg, #2d2358, #1a1334); border: 1px solid rgba(160, 140, 255, 0.5); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.5); }

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.gallery figure { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: transform 0.25s, box-shadow 0.25s; }
.gallery figure:hover { transform: translateY(-4px) scale(1.01); box-shadow: 0 18px 44px rgba(90, 50, 200, 0.4); }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #000; }
.gallery figcaption { padding: 12px 16px 16px; color: #cfc9ea; font-size: 0.93rem; line-height: 1.4; }

/* ---------- footer ---------- */
.footer { padding: 44px 0 56px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; }
.footer p { max-width: 46em; margin: 0 auto 10px; }
.noscript { text-align: center; padding: 20px; color: #ffd27a; }

/* ---------- lesson tabs: one lesson at a time, so the text and the demo are always side by side ---------- */
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 28px 0 26px; }
.tab { display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px 9px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
  color: #cfc9ec; font: 600 0.95rem var(--body, inherit); cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s; }
.tab b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(160, 140, 255, 0.2); font: 800 0.85rem var(--display); }
.tab:hover { border-color: #8a7bff; color: #fff; }
.tab[aria-selected="true"] { background: linear-gradient(145deg, #a43bff, #4a58ff); border-color: transparent; color: #fff; box-shadow: 0 6px 22px rgba(120, 80, 255, 0.45); }
.tab[aria-selected="true"] b { background: rgba(255, 255, 255, 0.25); }
.tab:focus-visible, .tab-nav .btn:focus-visible { outline: 3px solid #69d8ff; outline-offset: 2px; }
.stage { min-height: 660px; display: flex; align-items: center; justify-content: center; }
.tabpanel { width: 100%; }
.tabpanel[hidden] { display: none; }
.tabpanel:not([hidden]) { animation: tabin 0.35s ease; }
@keyframes tabin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tab-nav { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
.tab-nav .btn[disabled] { opacity: 0.35; pointer-events: none; }
.panel-title { text-align: center; margin-bottom: 8px; }
@media (max-width: 820px) { .stage { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .tabpanel:not([hidden]) { animation: none; } }

.tabs { scroll-margin-top: 78px; }
.lesson-text .note { margin-top: 18px; font-size: 0.92rem; }

/* ---------- download ---------- */
.nav-dl { margin-left: 14px; padding: 9px 16px; font-size: 0.92rem; white-space: nowrap; flex: none; }
@media (max-width: 900px) { .nav-dl { margin-left: 0; padding: 0 14px; min-height: 44px; display: inline-flex; align-items: center; font-size: 0.88rem; } }
.btn.big { padding: 15px 30px; font-size: 1.15rem; box-shadow: 0 8px 30px rgba(120, 80, 255, 0.55); }
.dl { background: radial-gradient(ellipse at 50% 0%, rgba(120, 80, 255, 0.28), transparent 70%), #07040f; border-top: 1px solid var(--line); }
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 22px; }
.dl-card { display: flex; flex-direction: column; gap: 6px; padding: 24px 16px; border-radius: 18px; text-decoration: none; color: #fff; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; }
.dl-card:hover, .dl-card:focus-visible { transform: translateY(-4px); border-color: #8a7bff; box-shadow: 0 12px 34px rgba(120, 80, 255, 0.4); outline: none; }
.dl-card strong { font: 800 1.4rem var(--display); }
.dl-card span { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 700px) { .dl-grid { grid-template-columns: 1fr; } }

/* ---------- skip link, language menu ---------- */
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: #fff; color: #000; padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip:focus { top: 8px; }
.lang-menu { position: relative; flex: none; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); color: #d8d3f0; cursor: pointer; font-size: 0.85rem; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { border-color: #8a7bff; color: #fff; }
.lang-menu ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; list-style: none; margin: 0; padding: 6px; min-width: 180px; max-height: min(70vh, 520px); overflow-y: auto;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7); }
.lang-menu li a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; color: #e9e6f5; text-decoration: none; }
.lang-menu li a:hover { background: rgba(138, 123, 255, 0.22); }
.lang-menu li a[aria-current] { background: rgba(138, 123, 255, 0.32); font-weight: 700; }
.lang-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; margin-top: 18px; }
.lang-footer a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--muted); }
.lang-footer a[aria-current] { color: #fff; font-weight: 700; text-decoration: none; }

/* ---------- origin (Tetris Attack / Panel de Pon) ---------- */
.origin { padding: clamp(40px, 7vw, 84px) 0; background: linear-gradient(180deg, #05030b, #0a0615); border-bottom: 1px solid var(--line); }
.origin h2 { font-size: clamp(1.5rem, 3.6vw, 2.2rem); }
.origin p { font-size: clamp(1rem, 2vw, 1.15rem); color: #d6d0f0; margin: 0 auto; max-width: 42em; }
.origin em { color: #fff; font-style: normal; font-weight: 700; }

/* ---------- download: computer game notice ---------- */
.desktop-note { max-width: 36em; margin: 0 auto 18px; padding: 12px 18px; border: 1px solid rgba(255, 200, 120, 0.4); border-radius: 14px; background: rgba(255, 170, 60, 0.08); color: #ffe2b8; }

/* ---------- touch and small screens ---------- */
.btn { min-height: 44px; }
.btn.small { min-height: 44px; }
.tab { min-height: 44px; white-space: nowrap; }
.calc input[type=range] { min-height: 32px; }
.footer a:not(.lang-footer a) { text-underline-offset: 3px; }
h1, h2, h3, p, li { overflow-wrap: break-word; }
@media (max-width: 600px) { .lesson-text, .card { hyphens: auto; } }

@media (max-width: 820px) {
  /* the seven lessons: one swipeable row instead of four wrapped rows */
  .tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; margin: 18px -20px 18px; padding: 2px 20px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; scroll-snap-align: center; }
  .hero-inner { padding: 36px 16px 80px; }
  .cta .btn { flex: 1 1 100%; text-align: center; }
  .cta .btn.big { padding: 15px 20px; }
  .controls th, .controls td { padding: 11px 10px; font-size: 0.93rem; }
  .quote { padding: 26px 18px 18px; }
  .demo-card { padding: 10px 10px 8px; }
}

/* East Asian languages: system fonts with the right glyphs (the title font has no CJK) */
html:lang(ja) { --display: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif; --body: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif; }
html:lang(ko) { --display: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; --body: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
html:lang(zh-Hans) { --display: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; --body: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
html:lang(ja) body, html:lang(ko) body, html:lang(zh-Hans) body { line-height: 1.8; }
html:lang(ja) .lesson-text, html:lang(ko) .lesson-text, html:lang(zh-Hans) .lesson-text, html:lang(ja) .card, html:lang(ko) .card, html:lang(zh-Hans) .card { hyphens: manual; word-break: auto-phrase; }

/* a coloured word must never be cut in two (Japanese breaks anywhere otherwise) */
.tagline .grad { display: inline-block; white-space: nowrap; }
.tagline { text-wrap: balance; }
.quote.big, h1, h2, h3 { hyphens: manual; }

/* images with width/height attributes (they only reserve the space): the height must follow the width */
img { height: auto; }
.gallery img { height: auto; aspect-ratio: 1; }
h2 { text-wrap: balance; }

.controls + .fine { margin-top: 16px; }
.brand { flex: none; }
.brand img { flex: none; width: 40px; height: auto; }
