/* Trạm Giải Đố IQ & Logic · ntminh.com. Colours from the channel's videos: chalkboard green with a grid, yellow, coral, the gopher's cyan. */
@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --board: #17453a;
  --board-deep: #0f2f27;
  --card: #0d2a22;
  --card-2: #123a30;
  --line: rgba(255, 255, 255, 0.1);
  --ink: #f4f8f5;
  --ink-soft: #c2d6cc;
  --sun: #ffd23f;
  --coral: #ff5c7a;
  --cyan: #4fd9f2;
  --orange: #ff8a3d;
  --leaf: #3ddc84;
  --radius: 22px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--board);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sun); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 900; letter-spacing: -0.01em; }
h2 { font-size: clamp(28px, 4.2vw, 42px); }
h3 { font-size: 21px; font-weight: 800; }
p { margin: 0 0 1em; }
.hl { color: var(--sun); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--sun); color: #1b1b1b; padding: 8px 14px; border-radius: 10px; }

/* ── header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(13, 42, 34, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 14px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 900; font-size: 19px; line-height: 1.15; }
.brand img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--sun); }
.brand small { display: block; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.brand:hover { color: var(--ink); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 750; font-size: 15px; padding: 7px 12px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.lang { text-decoration: none; font-weight: 850; font-size: 14px; color: var(--ink); border: 2px solid var(--line); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.lang:hover { border-color: var(--sun); color: var(--ink); }
@media (max-width: 860px) {
  .top .wrap { gap: 8px 12px; padding-top: 8px; }
  .lang { margin-left: auto; }
  .nav { order: 3; margin: 0 -16px; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; width: calc(100% + 32px); }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { background: rgba(255, 255, 255, 0.07); font-size: 14px; }
}

/* ── hero */
.hero { padding: 48px 0 56px; }
@media (min-width: 900px) { .hero { padding: 72px 0 80px; } }
.hero .wrap { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.2fr 0.8fr; } }
.kicker { display: inline-block; background: var(--coral); color: #fff; font-weight: 900; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.title { font-size: clamp(42px, 7.5vw, 80px); line-height: 1.02; margin: 0 0 16px; font-weight: 1000; letter-spacing: -0.02em; }
.lead { font-size: clamp(18px, 2vw, 20px); color: var(--ink-soft); max-width: 36em; font-weight: 600; }
.hero-art { justify-self: center; max-width: 380px; width: 100%; }
.hero-art img { border-radius: 50%; box-shadow: 0 0 0 6px rgba(79, 217, 242, 0.25), 0 30px 70px rgba(0, 0, 0, 0.45); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 28px; }
.btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 17px; padding: 13px 22px; border-radius: 999px; transition: transform 0.15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-main { background: var(--sun); color: #1d2a24; }
.btn-main:hover { color: #1d2a24; }
.btn-soft { background: rgba(255, 255, 255, 0.1); color: var(--ink); border: 2px solid var(--line); }
.btn-soft:hover { color: var(--ink); }
.btn svg { width: 22px; height: 22px; flex: none; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 640px; padding: 0; margin: 0; list-style: none; }
@media (min-width: 620px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stats li { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--ink-soft); }
.stats b { display: block; font-size: 24px; font-weight: 1000; color: var(--sun); }

/* ── sections */
section { scroll-margin-top: 80px; }
.sec { padding: 64px 0; }
.sec + .sec { padding-top: 16px; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; padding: 5px 12px; border-radius: 999px; margin-bottom: 14px; background: rgba(255, 210, 63, 0.14); color: var(--sun); }
.eyebrow.e-coral { background: rgba(255, 92, 122, 0.16); color: #ff9aae; }
.eyebrow.e-cyan { background: rgba(79, 217, 242, 0.14); color: var(--cyan); }
.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; gap: 48px; } .split.flip > :first-child { order: 2; } }
.intro { font-size: 18px; color: var(--ink-soft); font-weight: 600; }
.shot { border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4); border: 4px solid rgba(255, 210, 63, 0.7); }
.checks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 34px; font-weight: 650; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 900; color: #10251e; background: var(--leaf); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 28px; padding: 28px 20px; margin-top: 40px; }
@media (min-width: 720px) { .panel { padding: 32px; } }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 20px; }
.panel-head h3 { margin: 0; font-size: 24px; font-weight: 900; }
.panel-head p { margin: 0; color: var(--ink-soft); font-weight: 600; font-size: 15px; }

/* puzzle cards: the real question cards, like little phones */
.puzzles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 700px) { .puzzles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.puzzles img { border-radius: 18px; aspect-ratio: 9 / 16; width: 100%; object-fit: cover; border: 2px solid var(--line); background: var(--board-deep); }
.puzzles span { display: block; text-align: center; font-weight: 800; font-size: 15px; margin-top: 8px; }

/* score table of the long video */
.scores { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.scores li { background: var(--card-2); border-radius: 16px; padding: 12px 14px; font-weight: 700; color: var(--ink-soft); font-size: 15px; line-height: 1.35; }
.scores b { display: block; color: var(--ink); font-size: 18px; font-weight: 900; }
.scores li:last-child b { color: var(--sun); }

/* products in the works */
.soonbox { background: linear-gradient(160deg, #0d2a22 0%, #133d33 100%); border: 1px solid var(--line); border-radius: 36px; padding: 40px 20px; }
@media (min-width: 720px) { .soonbox { padding: 52px 44px; } }
.products { display: grid; gap: 16px; grid-template-columns: 1fr; list-style: none; padding: 0; margin: 28px 0 0; }
@media (min-width: 760px) { .products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.products > li { background: var(--card-2); border: 1px solid var(--line); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.products .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; background: rgba(255, 210, 63, 0.14); }
.products h3 { margin: 4px 0 0; }
.products p { margin: 0; font-size: 15px; color: var(--ink-soft); }
.products ul { margin: 0; padding-left: 20px; font-size: 15px; color: var(--ink-soft); }
.products ul li { margin: 3px 0; }
.soon { align-self: flex-start; margin-top: auto; font-size: 13px; font-weight: 900; background: rgba(255, 92, 122, 0.18); color: #ffb3c1; padding: 4px 11px; border-radius: 999px; }
.center { text-align: center; }
.center .intro { max-width: 40em; margin-left: auto; margin-right: auto; }

/* channels */
.channels { display: grid; gap: 16px; grid-template-columns: 1fr; list-style: none; padding: 0; margin: 28px auto 0; max-width: 760px; }
@media (min-width: 640px) { .channels { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.channels a { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; text-decoration: none; color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: 22px; padding: 22px 18px; }
.channels a:hover { border-color: var(--sun); color: var(--ink); }
.channels svg { width: 38px; height: 38px; margin-bottom: 6px; }
.channels strong { font-size: 19px; font-weight: 900; }
.channels span { font-size: 15px; color: var(--ink-soft); font-weight: 650; }
.channels em { font-style: normal; font-size: 15px; font-weight: 850; color: var(--sun); margin-top: auto; padding-top: 6px; }

/* ── footer */
.foot { background: var(--board-deep); color: var(--ink-soft); padding: 48px 0 36px; margin-top: 72px; font-size: 15px; border-top: 1px solid var(--line); }
.foot a { color: var(--ink); }
.foot a:hover { color: var(--sun); }
.foot .cols { display: grid; gap: 28px; }
@media (min-width: 820px) { .foot .cols { grid-template-columns: 1.3fr 1fr 1fr; } }
.foot .brand { margin-bottom: 10px; }
.foot h2 { color: var(--ink); margin: 0 0 10px; font-size: 16px; font-weight: 900; letter-spacing: 0; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.foot .fine { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 20px; font-size: 13px; color: #9db5aa; }
.foot .fine p { margin: 0 0 6px; }

/* ── legal pages */
.doc-hero { background: var(--board-deep); border-bottom: 1px solid var(--line); padding: 44px 0 40px; }
.doc-hero h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 8px; }
.doc-hero p { margin: 0; font-weight: 700; color: var(--ink); }
.doc { max-width: 820px; margin: 0 auto; padding: 36px 16px 0; }
.doc h2 { font-size: 26px; margin-top: 40px; scroll-margin-top: 84px; }
.doc h3 { font-size: 19px; margin-top: 24px; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc .box { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; margin: 18px 0; }
.doc .box p:last-child, .doc .box ul:last-child, .doc .box ol:last-child { margin-bottom: 0; }
.doc .toc { background: var(--card); border-radius: 20px; padding: 16px 20px; border: 1px solid var(--line); }
.doc .toc ol { margin: 6px 0 0; padding-left: 22px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0 18px; background: var(--card); border-radius: 14px; overflow: hidden; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { background: var(--card-2); font-weight: 850; }
.doc td:first-child { width: 36%; }
.doc code { font-size: 0.92em; background: rgba(255, 255, 255, 0.08); padding: 1px 6px; border-radius: 6px; }
.doc td code { white-space: nowrap; display: inline-block; margin: 1px 0; }
.tablewrap { overflow-x: auto; }
.notfound { width: 160px; margin: 0 auto 12px; border-radius: 50%; }
.puzzles.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 460px; width: 100%; justify-self: center; }
