/* Đo Độ Ngu · Ngu Meter — same sticker look as the app: cream, ink outlines, hard shadows. */
:root {
  --cream: #FFF7E8;
  --ink: #222222;
  --lemon: #FFE45C;
  --pink: #FF8FB1;
  --pink-soft: #FFD3E1;
  --purple: #A78BFA;
  --purple-soft: #E4DAFF;
  --muted: #5F5F5F;
  --surface: #FFFFFF;
  --display: "Baloo 2", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --body: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font: 17px/1.65 var(--body);
  /* The app's brain-and-sock pattern, washed out so text stays readable. */
  background:
    linear-gradient(rgba(255, 247, 232, .86), rgba(255, 247, 232, .86)),
    url("pattern.jpg") repeat;
  background-size: auto, 300px 300px;
  overflow-x: hidden;
}

img { max-width: 100%; }

a { color: var(--ink); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { background: var(--lemon); }

h1, h2, h3, .display { font-family: var(--display); line-height: 1.15; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 40px 16px 8px;
  max-width: 760px;
  margin: 0 auto;
}
.hero .icon {
  width: 104px; height: 104px;
  border-radius: 24px;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-4deg);
}
.hero h1 {
  margin: 18px 0 2px;
  font-size: clamp(30px, 7vw, 46px);
  font-weight: 800;
}
.hero .sub { margin: 0; color: var(--muted); font-weight: 700; }
.hero .date { margin-top: 4px; font-size: 14px; color: var(--muted); }
.hero .mascot { width: min(230px, 58vw); margin: 10px auto 0; display: block; }

.wordmark {
  display: inline-block;
  margin: 18px 0 4px;
  padding: 2px 22px 0;
  font-family: var(--display);
  font-size: clamp(34px, 9vw, 56px);
  font-weight: 800;
  background: var(--pink);
  border: 4px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 6px 0 var(--ink);
  transform: rotate(-3deg);
}

/* Floating doodle stickers around the hero (decorative). */
.doodle { position: absolute; width: 46px; pointer-events: none; }
.doodle.d1 { top: 26px; left: 6%; transform: rotate(-14deg); }
.doodle.d2 { top: 60px; right: 7%; transform: rotate(12deg); width: 40px; }
.doodle.d3 { top: 190px; left: 3%; transform: rotate(8deg); width: 38px; }
.doodle.d4 { top: 210px; right: 4%; transform: rotate(-10deg); width: 44px; }
@media (prefers-reduced-motion: no-preference) {
  .doodle { animation: bob 3.2s ease-in-out infinite alternate; }
  .doodle.d2, .doodle.d4 { animation-delay: -1.6s; }
  @keyframes bob { to { translate: 0 -8px; } }
}

/* Language switch as two sticker pills. */
.lang { display: flex; gap: 10px; justify-content: center; margin: 18px 0 0; }
.lang a {
  padding: 4px 16px;
  background: var(--surface);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--ink);
  text-decoration: none;
  font-size: 15px;
}
.lang a:hover { background: var(--lemon); }

/* ---------- Layout ---------- */
.wrap { max-width: 760px; margin: 0 auto; padding: 8px 16px 40px; }

.card {
  position: relative;
  background: var(--surface);
  border: 3px solid var(--ink);
  border-radius: 24px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 20px 22px;
  margin: 14px 0 30px;
}
.card h2 { margin: 0 0 6px; font-size: 24px; font-weight: 800; }
.card h3 { margin: 20px 0 2px; font-size: 19px; font-weight: 800; }
.card h3:first-child { margin-top: 0; }
.card ul { padding-left: 22px; margin: 8px 0; }
.card li { margin: 4px 0; }
.card li::marker { color: var(--pink); }
.card p { margin: 8px 0; }

/* Section titles = tilted sticker labels, cycling the app's accent colours. */
.label {
  display: inline-block;
  margin: 26px 0 0;
  padding: 2px 16px 0;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 800;
  background: var(--lemon);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--ink);
  transform: rotate(-2deg);
}
.label.pink { background: var(--pink); transform: rotate(1.5deg); }
.label.purple { background: var(--purple); transform: rotate(-1deg); }

/* Three summary tiles. */
.summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin: 26px 0 8px;
}
.summary div {
  background: var(--lemon);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 14px 16px;
  font-size: 15px;
  transform: rotate(-1deg);
}
.summary div:nth-child(2) { background: var(--pink-soft); transform: rotate(1deg); }
.summary div:nth-child(3) { background: var(--purple-soft); transform: rotate(-.5deg); }
.summary b { display: block; font-family: var(--display); font-size: 20px; line-height: 1.2; margin-bottom: 4px; }

.divider {
  display: flex; align-items: center; gap: 14px;
  margin: 46px 0 10px;
}
.divider::before, .divider::after {
  content: ""; flex: 1;
  border-top: 3px dashed var(--ink);
  opacity: .3;
}
.divider img { width: 64px; }

/* ---------- Landing ---------- */
.tagline { font-family: var(--display); font-size: clamp(24px, 6vw, 34px); font-weight: 800; margin: 6px 0 0; }
.tagline small { display: block; font-size: .6em; color: var(--muted); font-weight: 700; }

.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0 6px;
}
.tiers figure {
  margin: 0;
  background: var(--surface);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 10px 8px 8px;
  text-align: center;
}
.tiers figure:nth-child(odd) { transform: rotate(-1.5deg); }
.tiers figure:nth-child(even) { transform: rotate(1.5deg); }
.tiers img { width: 100%; max-width: 120px; aspect-ratio: 1; object-fit: contain; }
.tiers figcaption { font-family: var(--display); font-weight: 800; font-size: 15px; line-height: 1.2; }
.tiers .score { display: inline-block; margin-top: 4px; padding: 0 10px; background: var(--lemon); border: 2px solid var(--ink); border-radius: 999px; font-size: 13px; font-weight: 800; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 18px 0; }
.features div {
  background: var(--surface);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 14px 16px;
}
.features img { width: 40px; height: 40px; object-fit: contain; float: right; margin-left: 8px; }
.features b { display: block; font-family: var(--display); font-size: 20px; line-height: 1.2; }

.buttons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 26px 0; }
.button {
  display: inline-block;
  padding: 12px 24px;
  background: var(--lemon);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 0 5px 0 var(--ink);
  font-family: var(--display);
  font-size: 19px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .08s, box-shadow .08s;
}
.button.secondary { background: var(--surface); }
.button:hover { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); background: var(--lemon); }
.button.secondary:hover { background: var(--surface); }

.soon {
  text-align: center;
  font-weight: 700;
  color: var(--muted);
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 10px 16px 44px;
}
footer .disclaimer {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 14px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .card { padding: 16px; border-radius: 20px; box-shadow: 4px 4px 0 var(--ink); }
  .doodle { width: 34px; }
  .doodle.d3, .doodle.d4 { display: none; }
  .tiers { grid-template-columns: repeat(2, 1fr); }
}

/* =====================================================================
   Landing page (index.html, en/index.html). Scoped to body.landing so the
   privacy and support pages keep their own layout.
   ===================================================================== */
.skip {
  position: absolute; left: -999px; top: 8px; z-index: 50;
  padding: 8px 14px; background: var(--lemon); border: 3px solid var(--ink); border-radius: 12px;
}
.skip:focus { left: 8px; }
.landing :focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 8px; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 247, 232, .92);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--ink);
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-size: 22px; font-weight: 800; }
.brand img { border-radius: 10px; border: 2px solid var(--ink); }
.brand:hover { background: none; }
.topbar nav { display: flex; gap: 18px; margin-left: auto; }
.topbar nav a { text-decoration: none; font-weight: 800; }
.lang-switch {
  padding: 4px 14px; border: 3px solid var(--ink); border-radius: 999px; background: var(--surface);
  box-shadow: 0 3px 0 var(--ink); text-decoration: none; font-weight: 800; font-size: 15px;
}
@media (max-width: 720px) { .topbar nav { display: none; } .lang-switch { margin-left: auto; } }

.landing .hero {
  max-width: 1120px; margin: 0 auto; padding: 48px 16px 24px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; text-align: left;
}
.landing .hero .doodle.d1 { top: 30px; left: 2%; }
.landing .hero .doodle.d2 { top: 70px; right: 4%; }
.landing .hero .doodle.d3 { top: auto; bottom: 40px; left: 46%; }
.landing .hero .doodle.d4 { top: 40%; right: 1%; }
.eyebrow { margin: 0 0 10px; font-weight: 800; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wordmark-sm {
  display: inline-block; padding: 0 14px; font-family: var(--display); font-size: 20px; color: var(--ink);
  background: var(--pink); border: 3px solid var(--ink); border-radius: 999px; box-shadow: 0 3px 0 var(--ink); transform: rotate(-3deg);
}
.landing h1 { font-size: clamp(40px, 6.4vw, 72px); line-height: 1.05; margin: 0 0 16px; font-weight: 800; text-wrap: balance; }
.landing h1 mark {
  background: linear-gradient(transparent 62%, var(--lemon) 62%, var(--lemon) 92%, transparent 92%);
  color: inherit; padding: 0 2px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
/* Anchor jumps land below the sticky top bar. */
.landing section[id] { scroll-margin-top: 84px; }
.lead { font-size: clamp(17px, 2.1vw, 20px); color: #3a3a3a; max-width: 34em; margin: 0 0 22px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.button.app-store { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--cream); box-shadow: 0 5px 0 #000; }
.button.app-store:hover { background: var(--ink); box-shadow: 0 2px 0 #000; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 2px 12px; background: var(--surface); border: 2px solid var(--ink); border-radius: 999px; font-weight: 800; font-size: 14px; }

.hero-art { position: relative; justify-self: center; width: min(320px, 78vw); }
.phone {
  border: 6px solid var(--ink); border-radius: 38px; overflow: hidden; background: var(--cream);
  box-shadow: 10px 10px 0 var(--ink); line-height: 0;
}
.phone img { width: 100%; height: auto; display: block; }
.phone-hero { transform: rotate(3deg); }
.phone-card { border-radius: 26px; }
.hero-mascot { position: absolute; left: -96px; bottom: -18px; width: 190px; height: auto; filter: drop-shadow(4px 6px 0 rgba(0,0,0,.12)); }
@media (prefers-reduced-motion: no-preference) {
  .hero-mascot { animation: bob 3.4s ease-in-out infinite alternate; }
}
@media (max-width: 860px) {
  .landing .hero { grid-template-columns: 1fr; text-align: center; padding-top: 28px; }
  .eyebrow, .cta-row, .chips { justify-content: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-mascot { left: -40px; width: 130px; }
}

.landing .block { max-width: 1120px; margin: 0 auto; padding: 40px 16px; }
.landing .block > .label { margin-top: 0; }
.block-lead { font-size: 18px; color: #3a3a3a; margin: 12px 0 26px; max-width: 40em; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step { position: relative; background: var(--surface); border: 3px solid var(--ink); border-radius: 26px; box-shadow: 6px 6px 0 var(--ink); padding: 22px 20px; }
.step .phone { width: 72%; margin: 0 auto 16px; box-shadow: 6px 6px 0 var(--ink); }
/* Every step shows the same phone; the 9:16 share card sits in it like a story viewed full screen. */
.step .phone { aspect-ratio: 560 / 1217; }
.step .phone-card { border-radius: 38px; background: #1B1B1B; display: flex; align-items: center; }
.step h3 { font-size: 22px; margin: 0 0 4px; }
.step p { margin: 0; color: #3a3a3a; }
.step-num {
  position: absolute; top: -18px; left: -12px; width: 46px; height: 46px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 24px; background: var(--lemon);
  border: 3px solid var(--ink); border-radius: 50%; box-shadow: 0 3px 0 var(--ink);
}
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } }

.landing .features { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 5px 5px 0 var(--ink); padding: 18px; }
.feature:nth-child(4n+2) { background: var(--pink-soft); }
.feature:nth-child(4n+3) { background: #FFF3B3; }
.feature:nth-child(4n+4) { background: var(--purple-soft); }
.feature img { width: 52px; height: 52px; object-fit: contain; }
.feature h3 { font-size: 20px; margin: 8px 0 4px; }
.feature p { margin: 0; font-size: 15px; color: #3a3a3a; }
@media (max-width: 960px) { .landing .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .landing .features { grid-template-columns: 1fr; } }

.showcase { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; align-items: center; }
.showcase-phones { display: flex; gap: 22px; justify-content: center; }
.showcase-phones figure { margin: 0; width: min(240px, 42vw); text-align: center; }
.showcase-phones figure:first-child { transform: rotate(-3deg); }
.showcase-phones figure:last-child { transform: rotate(3deg) translateY(28px); }
.showcase-phones figcaption { margin-top: 14px; font-weight: 800; font-family: var(--display); font-size: 17px; line-height: 1.2; }
.showcase .block-lead { font-size: 20px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface);
  border: 3px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); font-weight: 800;
}
.checks li::before {
  content: "✓"; flex: none; display: grid; place-items: center; width: 28px; height: 28px;
  background: var(--lemon); border: 2px solid var(--ink); border-radius: 50%; font-size: 16px;
}
@media (max-width: 860px) { .showcase { grid-template-columns: 1fr; } }

.landing .tiers { grid-template-columns: repeat(6, 1fr); margin-top: 22px; }
@media (max-width: 960px) { .landing .tiers { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .landing .tiers { grid-template-columns: repeat(2, 1fr); } }

.badge-strip { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; }
.badge-strip li { text-align: center; font-family: var(--display); font-weight: 800; font-size: 14px; line-height: 1.2; }
.badge-strip img { width: 100%; max-width: 96px; height: auto; display: block; margin: 0 auto 6px; }
.badge-strip li:nth-child(odd) img { transform: rotate(-5deg); }
.badge-strip li:nth-child(even) img { transform: rotate(4deg); }
@media (max-width: 860px) { .badge-strip { grid-template-columns: repeat(4, 1fr); } }

.faq { margin-top: 22px; display: grid; gap: 12px; max-width: 820px; }
@media (min-width: 861px) { .landing .faq { grid-template-columns: 1fr 1fr; align-items: start; max-width: none; } }
.faq details { background: var(--surface); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 4px 4px 0 var(--ink); padding: 4px 18px; }
.faq summary { cursor: pointer; font-family: var(--display); font-weight: 800; font-size: 19px; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 26px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 14px; color: #3a3a3a; }

.final { text-align: center; }
.final h2 { font-size: clamp(30px, 4.5vw, 44px); margin: 10px 0; }
.final p { max-width: 36em; margin: 0 auto 22px; color: #3a3a3a; font-size: 18px; }
.final > img { width: 150px; height: auto; }
.final-cta { justify-content: center; }

/* ---------- "Try it" quiz ---------- */
.demo { display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; align-items: start; }
.demo-intro .block-lead { font-size: 20px; }
.demo-mascot { width: 150px; height: auto; transform: rotate(-4deg); }
.demo-play { max-width: 600px; width: 100%; justify-self: center; }
.demo-card {
  display: none; background: var(--surface); border: 3px solid var(--ink); border-radius: 26px;
  box-shadow: 8px 8px 0 var(--ink); padding: 20px 22px 22px;
}
.demo.is-live .demo-card { display: block; }
.demo.is-live .demo-static { display: none; }
.demo-top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
.demo-flames { font-size: 14px; padding: 0 10px; border: 2px solid var(--ink); border-radius: 999px; }
.demo-bar { height: 8px; margin: 10px 0 16px; border-radius: 999px; background: #eee3cc; overflow: hidden; }
.demo-bar::before { content: ""; display: block; height: 100%; width: var(--done, 0); background: var(--pink); }
.demo-q { font-family: var(--display); font-weight: 800; font-size: clamp(21px, 2.4vw, 25px); line-height: 1.25; margin: 0 0 16px; }
.demo-q:focus, .demo-score:focus { outline: none; }
.demo-answers { display: grid; gap: 10px; }
.demo-answer {
  font: 700 17px/1.3 var(--body); color: var(--ink); text-align: left; padding: 13px 16px; cursor: pointer;
  background: var(--surface); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink);
  transition: transform .08s, box-shadow .08s, background .15s;
}
.demo-answer:hover:not(:disabled) { background: #FFF3B3; transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.demo-answer:disabled { cursor: default; }
.demo-answer.is-correct { background: #D9F5E3; }
.demo-answer.is-correct::after { content: " ✓"; }
.demo-answer.is-wrong { background: #FFE0E6; }
.demo-answer.is-wrong::after { content: " ✗"; }
.demo-answer.is-dim { opacity: .5; box-shadow: none; }
.demo-feedback { margin-top: 16px; }
.demo-reaction { text-align: center; font-weight: 800; margin: 0 0 10px; }
.demo-why { background: #FFF3B3; border: 3px solid var(--ink); border-radius: 16px; padding: 10px 14px; margin-bottom: 16px; }
.demo-why p { margin: 4px 0 0; }
.demo-next { display: block; width: 100%; cursor: pointer; font-family: var(--display); }
.demo-result { text-align: center; }
.demo-result img { width: 140px; height: auto; }
.demo-score-label { margin: 6px 0 0; font-weight: 800; color: var(--muted); }
.demo-score { font-family: var(--display); font-weight: 800; font-size: 72px; line-height: 1; margin: 0; }
.demo-tier {
  display: inline-block; margin: 8px 0 4px; padding: 2px 16px; font-family: var(--display); font-weight: 800; font-size: 22px;
  background: var(--lemon); border: 3px solid var(--ink); border-radius: 999px; transform: rotate(-2deg);
}
.demo-count { margin: 4px 0; font-weight: 700; }
.demo-more { color: #3a3a3a; margin: 8px auto 16px; max-width: 30em; }
.demo-again { cursor: pointer; font-family: var(--display); }
.demo-static ol { padding-left: 22px; }
.demo-static li > p { font-weight: 800; margin-bottom: 4px; }
@media (max-width: 860px) {
  .demo { grid-template-columns: 1fr; }
  .demo-intro { text-align: center; }
  .demo-intro .block-lead { margin-left: auto; margin-right: auto; }
  .demo-mascot { display: none; }
  .demo-card { padding: 16px; box-shadow: 5px 5px 0 var(--ink); }
}
@media (prefers-reduced-motion: reduce) { .demo-answer { transition: none; } }
