/* ═══════════════════════════════════════════════════════════
   Tuxflare — one stylesheet for the whole site.
   Colours live in :root. Mobile-first; desktop tweaks at the end of each block.
   ═══════════════════════════════════════════════════════════ */
:root {
  --bg: #0b0d1a;
  --bg2: #10132a;
  --card: #161a36;
  --card2: #1c2145;
  --line: #2c3366;
  --text: #f4f5ff;
  --muted: #c2c8ec;
  --dim: #8f97c7;
  --red: #ff3d5e;
  --pink: #ff5fa2;
  --cyan: #2de2ff;
  --lime: #7cff6b;
  --amber: #ffc531;
  --violet: #9b7bff;
  --hot: linear-gradient(135deg, #ff3d5e, #ff5fa2 55%, #ff9b52);
  --cool: linear-gradient(135deg, #2de2ff, #9b7bff);
  --radius: 20px;
  --shadow: 0 18px 50px -18px #000c;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--sans);
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Menlo, monospace;
  --wrap: min(1180px, 100% - 32px);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.125rem/1.7 var(--sans); overflow-x: hidden;
  background-image: radial-gradient(1200px 600px at 85% -10%, #2a1a4a55, transparent 60%), radial-gradient(900px 500px at -10% 30%, #0f3a5a40, transparent 60%);
}
@media (min-width: 900px) { body { font-size: 1.1875rem; } }
img, svg, canvas { max-width: 100%; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: #8ff0ff; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; letter-spacing: -.025em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 4.4vw, 2.9rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: .9em; background: #ffffff12; border: 1px solid #ffffff1c; padding: .08em .38em; border-radius: 6px; color: #d9ffd4; overflow-wrap: anywhere; }
kbd { background: #fff; color: #111; border-radius: 6px; padding: .05em .45em; font-size: .85em; box-shadow: 0 2px 0 #999; }
pre { background: #05060f; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; overflow-x: auto; font-size: .95rem; line-height: 1.6; color: #d9ffd4; margin: 0 0 1.3em; }
pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--amber); color: #111; padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }
.center { text-align: center; }
.small { font-size: .95rem; color: var(--dim); }
.hl { background: var(--hot); -webkit-background-clip: text; background-clip: text; color: transparent; }
::selection { background: var(--pink); color: #fff; }

/* ── buttons ─────────────────────────────────────────── */
.btn {
  --b: var(--card2);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.3em; border-radius: 999px; border: 2px solid var(--line);
  background: var(--b); color: var(--text); font: 700 1.02rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s;
}
.btn:hover { transform: translateY(-2px); color: var(--text); border-color: var(--cyan); box-shadow: 0 10px 26px -10px #2de2ff88; }
.btn:active { transform: translateY(0); }
.btn-hot { background: var(--hot); border-color: transparent; color: #fff; box-shadow: 0 10px 30px -12px #ff3d5ecc; }
.btn-hot:hover { border-color: transparent; box-shadow: 0 14px 34px -10px #ff3d5eee; color: #fff; }
.btn-ghost { background: transparent; }
.btn-big { min-height: 58px; padding: .85em 1.7em; font-size: 1.12rem; }
.btn-small { min-height: 40px; padding: .45em 1em; font-size: .95rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; color: var(--cyan); font: inherit; padding: 0; cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 3px; }

/* ── header ──────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px;
  padding: 10px max(16px, (100% - 1240px) / 2); background: #0b0d1acc; backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid #ffffff12;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 1.45rem var(--display); letter-spacing: -.03em; }
.brand img { width: 34px; height: auto; filter: drop-shadow(0 0 10px #ff3d5e66); transition: transform .3s; }
.brand:hover img { transform: rotate(-8deg) scale(1.08); }
.brand b { background: var(--hot); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-toggle { margin-left: auto; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; position: relative; }
.nav-toggle span:first-child, .nav-toggle span:first-child::before, .nav-toggle span:first-child::after { position: absolute; left: 12px; width: 20px; height: 2px; background: var(--text); border-radius: 2px; content: ""; transition: transform .25s, opacity .2s; }
.nav-toggle span:first-child { top: 21px; }
.nav-toggle span:first-child::before { left: 0; top: -7px; } .nav-toggle span:first-child::after { left: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] span:first-child { background: transparent; }
.nav-toggle[aria-expanded="true"] span:first-child::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:first-child::after { transform: translateY(-7px) rotate(-45deg); }
#site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; padding: 10px 16px 18px; background: #0b0d1af5; border-bottom: 1px solid var(--line); }
#site-nav.open { display: flex; }
#site-nav a { color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; padding: 12px 10px; border-radius: 12px; }
#site-nav a:hover, #site-nav a[aria-current="page"] { background: #ffffff10; color: var(--cyan); }
.header-cta { display: none; }
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  #site-nav { display: flex; position: static; flex-direction: row; padding: 0; background: none; border: 0; margin-left: auto; gap: 4px; }
  #site-nav a { font-size: 1rem; padding: 8px 14px; }
  .header-cta { display: inline-flex; }
}

/* ── layout primitives ───────────────────────────────── */
.section { width: var(--wrap); margin: 0 auto; padding: clamp(56px, 9vw, 110px) 0 0; }
.section-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head p:last-child { color: var(--muted); font-size: 1.15rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 700 .85rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.eyebrow .ico { width: 18px; height: 18px; }
.lead { font-size: clamp(1.15rem, 2.2vw, 1.4rem); color: var(--muted); max-width: 720px; }
.split { display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1.15fr; gap: 56px; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.ico { width: 1.2em; height: 1.2em; flex: none; display: inline-block; vertical-align: -.2em; }

/* ── hero ────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(32px, 6vw, 80px) 0 clamp(40px, 6vw, 70px); }
.code-rain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .2; pointer-events: none; mask-image: linear-gradient(#000 40%, transparent); -webkit-mask-image: linear-gradient(#000 40%, transparent); }
.hero-inner { width: var(--wrap); margin: 0 auto; display: grid; gap: 28px; align-items: center; }
@media (min-width: 960px) { .hero-inner { grid-template-columns: 1.15fr .85fr; gap: 40px; } }
.kicker { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; background: #ffffff0d; border: 1px solid #ffffff1f; font-weight: 700; font-size: .95rem; color: var(--muted); margin-bottom: 22px; }
.kicker .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); animation: pulse 2s infinite; }
.hero h1 { font-size: clamp(2.8rem, 8.4vw, 5.6rem); letter-spacing: -.045em; margin-bottom: 22px; }
.glitch { position: relative; display: inline-block; background: var(--hot); -webkit-background-clip: text; background-clip: text; color: transparent; }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; background: inherit; -webkit-background-clip: text; background-clip: text; opacity: 0; }
.glitch::before { text-shadow: none; animation: glitch-a 6s infinite steps(1); background: linear-gradient(var(--cyan), var(--cyan)); -webkit-background-clip: text; background-clip: text; }
.glitch::after { animation: glitch-b 6s infinite steps(1); background: linear-gradient(var(--lime), var(--lime)); -webkit-background-clip: text; background-clip: text; }
@keyframes glitch-a { 0%, 91%, 100% { opacity: 0; transform: none; } 92% { opacity: .8; transform: translate(-4px, 1px); clip-path: inset(10% 0 55% 0); } 94% { opacity: .8; transform: translate(3px, -2px); clip-path: inset(60% 0 8% 0); } }
@keyframes glitch-b { 0%, 92%, 100% { opacity: 0; transform: none; } 93% { opacity: .7; transform: translate(4px, 0); clip-path: inset(40% 0 30% 0); } 95% { opacity: .7; transform: translate(-3px, 2px); clip-path: inset(5% 0 75% 0); } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 30px; }
.hero-term { max-width: 560px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #05060fe6; box-shadow: var(--shadow); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #ffffff0a; border-bottom: 1px solid #ffffff12; font: .8rem var(--mono); color: var(--dim); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; } .term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 8px; }
.typer { margin: 0; border: 0; border-radius: 0; background: none; min-height: 9.6em; font-size: .98rem; white-space: pre-wrap; }
.typer .p { color: var(--lime); } .typer .o { color: var(--muted); }
.cursor { color: var(--lime); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 50% { opacity: .45; } }

/* mascot */
.hero-mascot { position: relative; display: grid; place-items: center; min-height: 360px; }
.mascot-wrap { position: relative; width: min(330px, 70vw); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.mascot-body { position: relative; transform-origin: 50% 92%; animation: float 5s ease-in-out infinite; }
@media (min-width: 960px) { .mascot-wrap { width: min(400px, 100%); } }
.mascot-img { width: 100%; height: auto; filter: drop-shadow(0 26px 30px #000a); user-select: none; -webkit-user-drag: none; }
.mascot-glow { position: absolute; inset: 8% 0 0; border-radius: 50%; background: radial-gradient(circle, #ff3d5e55, #9b7bff22 45%, transparent 70%); filter: blur(10px); z-index: -1; animation: pulse 4s infinite; }
/* laser eyes, positioned on the logo's own eyes */
.laser { position: absolute; top: 30.2%; width: 4.4%; aspect-ratio: 1; border-radius: 50%; translate: -50% -50%; background: radial-gradient(circle, #fff 0 18%, #ff2a45 40%, #ff2a4500 72%); mix-blend-mode: screen; animation: laser 3.2s ease-in-out infinite; pointer-events: none; }
.laser.l { left: 39.6%; } .laser.r { left: 54.1%; }
.laser::after { content: ""; position: absolute; top: 50%; left: 50%; width: 900%; height: 18%; translate: -50% -50%; border-radius: 50%; background: linear-gradient(90deg, transparent, #ff2a45cc, transparent); }
@keyframes laser { 0%, 100% { opacity: .55; scale: .85; } 50% { opacity: 1; scale: 1.25; } }
.mascot-wrap.zap .laser { animation: zap .6s ease-out; }
.mascot-wrap.zap .laser::after { width: 2400%; height: 26%; }
@keyframes zap { 0% { scale: 1; opacity: 1; } 40% { scale: 2.2; opacity: 1; } 100% { scale: 1; opacity: .7; } }
.mascot-wrap.wave .mascot-body { animation: greet 1.1s ease-in-out; }
@keyframes greet { 0%, 100% { rotate: 0deg; translate: 0 0; } 15% { rotate: -9deg; translate: 0 -10px; } 35% { rotate: 8deg; } 55% { rotate: -6deg; translate: 0 -6px; } 75% { rotate: 4deg; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.bubble { position: absolute; background: #fff7e6; color: #1b1630; border: 3px solid #1b1630; border-radius: 22px; padding: 12px 16px; font-weight: 600; font-size: 1rem; line-height: 1.4; box-shadow: 6px 6px 0 #ff3d5e; }
.bubble b { color: #d61f45; }
.hero-bubble { left: 50%; bottom: 100%; translate: -50% 6px; width: min(300px, 82vw); transform-origin: 50% 100%; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.hero-bubble::after { content: ""; position: absolute; left: 50%; bottom: -14px; width: 22px; height: 22px; background: #fff7e6; border-right: 3px solid #1b1630; border-bottom: 3px solid #1b1630; translate: -50% 0; rotate: 45deg; }
@media (min-width: 960px) { .hero-mascot { place-items: end center; padding-top: 170px; } .hero-bubble { left: 22%; bottom: 93%; translate: -50% 0; width: 290px; } .hero-bubble::after { left: 72%; } }
@media (max-width: 959px) {
  .hero-mascot { order: -1; min-height: 0; display: block; padding: 0; }
  .mascot-wrap { width: 100%; display: flex; align-items: center; gap: 14px; }
  .mascot-body { flex: none; width: clamp(110px, 30vw, 170px); }
  .hero-bubble { position: relative; left: auto; bottom: auto; translate: none; width: auto; flex: 1; font-size: .95rem; padding: 10px 12px; box-shadow: 4px 4px 0 #ff3d5e; transform-origin: 0 50%; }
  .hero-bubble::after { left: -13px; top: 50%; bottom: auto; translate: 0 -50%; rotate: 135deg; width: 18px; height: 18px; }
  .sticker { display: none; }
  .kicker { font-size: .85rem; line-height: 1.35; padding: 7px 14px; }
  .code-rain { opacity: .14; }
}
.bubble.pop { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes pop { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }
.sticker { position: absolute; font: 700 .85rem var(--mono); padding: 7px 12px; border-radius: 10px; rotate: -7deg; box-shadow: 4px 4px 0 #0008; pointer-events: none; }
.s1 { background: var(--amber); color: #1b1630; top: 6%; right: 2%; rotate: 6deg; }
.s2 { background: var(--violet); color: #fff; bottom: 18%; right: 0; rotate: 6deg; }
.s3 { background: var(--lime); color: #0b0d1a; bottom: 6%; left: 6%; rotate: 4deg; }


/* ── strip ───────────────────────────────────────────── */
.strip { display: flex; gap: 12px 28px; flex-wrap: wrap; justify-content: center; padding: 18px 16px; background: linear-gradient(90deg, #ff3d5e22, #9b7bff22, #2de2ff22); border-block: 1px solid #ffffff14; font-weight: 700; font-size: 1.02rem; }

/* ── tracks ──────────────────────────────────────────── */
.track-grid { display: grid; gap: 20px; }
@media (min-width: 700px) { .track-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .track-grid { grid-template-columns: repeat(4, 1fr); } }
.track-card { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 22px; overflow: hidden; transition: transform .2s, border-color .2s; }
.track-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--c); box-shadow: 0 0 24px var(--c); }
.track-card:hover { transform: translateY(-4px); border-color: var(--c); }
.track-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); margin-bottom: 16px; }
.track-icon .ico { width: 30px; height: 30px; }
.track-card h3 { font-size: 1.55rem; }
.track-card > p { color: var(--muted); font-size: 1.02rem; }
.track-card ol { margin: 0 0 18px; padding-left: 1.3em; font-size: 1rem; }
.track-card li { margin: 6px 0; }
.track-card li a { color: var(--text); text-decoration-color: color-mix(in srgb, var(--c) 60%, transparent); }
.track-card li a.is-done::after { content: " ✓"; color: var(--lime); font-weight: 700; }
.track-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.track-progress { font: .85rem var(--mono); color: var(--dim); }

/* ── try section / widgets base ──────────────────────── */
.widget { min-width: 0; }

/* ── story ───────────────────────────────────────────── */
.story { width: var(--wrap); margin: clamp(56px, 9vw, 110px) auto 0; padding: clamp(28px, 5vw, 56px); border-radius: 28px; background: linear-gradient(135deg, #2b1640, #13234a); border: 1px solid #ffffff1c; position: relative; overflow: hidden; }
.story::after { content: "“"; position: absolute; right: 20px; top: -40px; font: 700 16rem/1 var(--display); color: #ffffff0d; }
.story blockquote { margin: 0; max-width: 820px; }
.story-lead { font: 700 clamp(1.5rem, 3.4vw, 2.3rem)/1.25 var(--display); letter-spacing: -.02em; }
.story blockquote p:not(.story-lead) { color: var(--muted); }
.story footer { font: 600 1rem var(--mono); color: var(--amber); }

/* ── videos ──────────────────────────────────────────── */
.video-grid { display: grid; gap: 22px; }
@media (min-width: 700px) { .video-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .video-grid { grid-template-columns: repeat(3, 1fr); } }
.video { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.video-play, .video iframe { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; background: #000; cursor: pointer; }
.video-play img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, opacity .3s; opacity: .9; }
.video-play:hover img { transform: scale(1.04); opacity: 1; }
.play-btn { position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; translate: -50% -50%; border-radius: 14px; background: #ff0033; box-shadow: 0 6px 20px #0009; transition: scale .2s; }
.play-btn::after { content: ""; position: absolute; left: 29px; top: 15px; border: 10px solid transparent; border-left: 16px solid #fff; border-right: 0; }
.video-play:hover .play-btn { scale: 1.12; }
.video figcaption { padding: 16px 18px 18px; display: grid; gap: 4px; }
.video figcaption b { font: 700 1.15rem/1.3 var(--display); }
.video figcaption span { color: var(--dim); font-size: .95rem; }
.video-topic { font: 700 .75rem var(--mono) !important; letter-spacing: .12em; text-transform: uppercase; color: var(--amber) !important; }
.video-missing .video-play { display: grid; place-items: center; background: linear-gradient(135deg, #2b1640, #13234a); cursor: default; }
.video-missing .video-play img, .video-missing .play-btn { display: none; }
.video-missing .missing-note { padding: 20px; text-align: center; color: var(--muted); font-size: 1rem; }

/* ── logo tiles ──────────────────────────────────────── */
.logo-tile { --s: 44px; flex: none; display: grid; place-items: center; width: var(--s); height: var(--s); border-radius: calc(var(--s) * .28); background: #fff; box-shadow: 0 6px 16px -6px #0009; }
.logo-tile img { width: 60%; height: 60%; object-fit: contain; }
.logo-tile.letter { background: var(--cool); color: #0b0d1a; font: 700 calc(var(--s) * .34)/1 var(--display); letter-spacing: -.03em; text-align: center; padding: 2px; }
.logo-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.logo-cloud a { display: grid; justify-items: center; gap: 8px; width: 104px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: .92rem; text-align: center; transition: transform .2s; }
.logo-cloud a:hover { transform: translateY(-5px) rotate(-3deg); color: var(--text); }

/* ── ask teaser ──────────────────────────────────────── */
.chat-demo { display: grid; gap: 14px; padding: 22px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.msg { max-width: 88%; padding: 12px 16px; border-radius: 18px; font-size: 1.02rem; line-height: 1.55; }
.msg.me { justify-self: end; background: var(--cool); color: #0b0d1a; font-weight: 600; border-bottom-right-radius: 6px; }
.msg.tux { display: flex; gap: 10px; align-items: flex-start; background: #fff7e6; color: #1b1630; border-bottom-left-radius: 6px; }
.msg.tux img { width: 30px; height: auto; flex: none; }
.msg.tux p { margin: 0; }

/* ── permission card ─────────────────────────────────── */
.permission-card { padding: clamp(26px, 5vw, 52px); border-radius: 28px; background: var(--card); border: 2px dashed #ffc53199; }
.scope { display: grid; gap: 16px; margin: 22px 0; }
@media (min-width: 720px) { .scope { grid-template-columns: 1fr 1fr; } }
.scope > div { padding: 20px 22px; border-radius: 18px; }
.scope .ok { background: #7cff6b14; border: 1px solid #7cff6b55; }
.scope .no { background: #ff3d5e14; border: 1px solid #ff3d5e55; }
.scope ul { margin: 0; padding-left: 1.2em; }

/* ── closing ─────────────────────────────────────────── */
.closing { width: var(--wrap); margin: clamp(56px, 9vw, 110px) auto 0; text-align: center; padding: clamp(36px, 6vw, 70px) 20px; border-radius: 32px; background: radial-gradient(circle at 50% 0, #ff3d5e40, transparent 60%), var(--bg2); border: 1px solid var(--line); }
.closing-tux { width: 130px; margin: -10px auto 18px; animation: float 4s ease-in-out infinite; }
.closing p { color: var(--muted); font-size: 1.2rem; }

/* ── page hero (inner pages) ─────────────────────────── */
.page-hero { width: var(--wrap); margin: 0 auto; padding: clamp(28px, 5vw, 60px) 0 10px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .95rem; color: var(--dim); margin-bottom: 22px; }
.crumbs a { color: var(--dim); }
.crumbs a:hover { color: var(--cyan); }
.overall { font: 700 1rem var(--mono); color: var(--lime); }

/* lesson cards */
.lesson-grid { display: grid; gap: 18px; }
@media (min-width: 700px) { .lesson-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .lesson-grid { grid-template-columns: repeat(3, 1fr); } }
.track-section .section-head .eyebrow { color: var(--c); }
.lesson-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 24px 22px 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: transform .2s, border-color .2s, box-shadow .2s; overflow: hidden; }
.lesson-card:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 16px 40px -20px var(--c); color: var(--text); }
.lesson-num { position: absolute; right: 14px; top: 2px; font: 700 3.6rem/1 var(--display); color: color-mix(in srgb, var(--c) 22%, transparent); }
.lesson-track { display: inline-flex; align-items: center; gap: 6px; font: 700 .8rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--c); }
.lesson-card h3 { margin: 6px 0 2px; font-size: 1.3rem; padding-right: 50px; }
.lesson-card p { color: var(--muted); font-size: 1rem; margin: 0; }
.lesson-meta { margin-top: auto; padding-top: 12px; font: .85rem var(--mono); color: var(--dim); display: flex; gap: 10px; align-items: center; }
.done-badge { display: none; color: #0b0d1a; background: var(--lime); padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.lesson-card.is-done .done-badge { display: inline; }
.coming { padding: 28px; border-radius: var(--radius); background: var(--bg2); border: 1px dashed var(--line); }
.coming ul { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.coming li { padding: 6px 14px; border-radius: 999px; background: #ffffff0d; border: 1px solid var(--line); font-size: .98rem; color: var(--muted); }

/* ── lesson page ─────────────────────────────────────── */
.lesson-hero { width: var(--wrap); margin: 0 auto; padding: clamp(28px, 5vw, 56px) 0 24px; }
.lesson-hero .lesson-track { font-size: .9rem; margin-bottom: 14px; }
.lesson-hero h1 { max-width: 900px; }
.lesson-facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.lesson-facts span { padding: 6px 14px; border-radius: 999px; background: #ffffff0d; border: 1px solid #ffffff1c; font-size: .95rem; font-weight: 600; }
.lesson-layout { width: var(--wrap); margin: 0 auto; display: grid; gap: 32px; }
@media (min-width: 1040px) { .lesson-layout { grid-template-columns: 250px minmax(0, 1fr); gap: 56px; } }
.lesson-side { display: none; }
@media (min-width: 1040px) {
  .lesson-side { display: block; position: sticky; top: 90px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; }
}
.toc { display: grid; gap: 2px; margin-bottom: 18px; }
.toc h2 { font: 700 .8rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.toc a { color: var(--muted); text-decoration: none; font-size: .95rem; padding: 6px 10px; border-left: 2px solid var(--line); line-height: 1.35; }
.toc a:hover, .toc a.active { color: var(--text); border-color: var(--c); background: #ffffff08; }
.lesson-main { min-width: 0; max-width: 820px; }
.goals { display: grid; gap: 18px; margin-bottom: 40px; }
@media (min-width: 760px) { .goals { grid-template-columns: 1fr 1fr; } }
.goals h2 { font-size: 1.25rem; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 32px; margin: 10px 0; line-height: 1.5; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: var(--lime); color: #0b0d1a; font-weight: 800; font-size: .85rem; }
.terms dl { margin: 0; display: grid; gap: 10px; }
.terms dt { font-weight: 700; color: var(--c); }
.terms dd { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.5; }
.objectives { border-top: 4px solid var(--lime); } .terms { border-top: 4px solid var(--c); }

/* prose */
.prose h2 { margin-top: 1.8em; padding-top: .2em; scroll-margin-top: 90px; }
.prose h2::before { content: "# "; color: var(--c, var(--pink)); font-family: var(--mono); font-size: .8em; }
.prose h3 { margin-top: 1.5em; color: #ffe7a6; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin: .45em 0; }
.prose li::marker { color: var(--c, var(--pink)); font-weight: 700; }
.prose strong { color: #fff; }
.prose details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin: 0 0 1.4em; }
.prose summary { cursor: pointer; font-weight: 700; color: var(--amber); }
.prose details[open] summary { margin-bottom: 8px; }
.narrow { max-width: 820px; }
.sample-label { font: 700 .82rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin: 0 0 6px; }
.compare { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 1rem; display: block; overflow-x: auto; }
.compare th, .compare td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare th { font: 700 .82rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--amber); background: #ffffff06; }
.compare tr:hover td { background: #ffffff05; }
.callout { margin: 1.6em 0; padding: 20px 22px; border-radius: 18px; background: #2de2ff10; border: 1px solid #2de2ff55; }
.callout b { display: block; font-family: var(--display); font-size: 1.15rem; margin-bottom: 6px; color: var(--cyan); }
.callout p { margin: 0; }
.callout.permission { background: #ffc53112; border-color: #ffc53177; }
.callout.permission b { color: var(--amber); }
.callout.permission b::before { content: "⚖️ "; }
.triad { display: grid; gap: 14px; margin: 0 0 1.4em; }
@media (min-width: 700px) { .triad { grid-template-columns: repeat(3, 1fr); } }
.triad-item { padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 4px; }
.triad-item b { font: 700 1.2rem var(--display); }
.triad-item small { color: var(--dim); font-size: .95rem; line-height: 1.45; }
.triad-item.c b { color: var(--cyan); } .triad-item.i b { color: var(--lime); } .triad-item.a b { color: var(--amber); }
.url-anatomy { padding: 18px; border-radius: 16px; background: #05060f; border: 1px solid var(--line); margin-bottom: 1.2em; }
.url-anatomy code { display: block; background: none; border: 0; font-size: 1.05rem; padding: 0 0 10px; }
.u-scheme { color: var(--dim); } .u-sub { color: var(--muted); } .u-domain { color: #0b0d1a; background: var(--amber); border-radius: 4px; padding: 0 4px; } .u-path { color: var(--cyan); }
.url-anatomy p { margin: 0; font-size: 1rem; color: var(--muted); }
.perm-breakdown { display: inline-grid; grid-template-columns: repeat(4, auto); gap: 4px 6px; padding: 14px 18px; border-radius: 14px; background: #05060f; border: 1px solid var(--line); font: 700 1.6rem var(--mono); margin-bottom: 1em; }
.perm-breakdown small { grid-column: 1 / -1; font: 500 .9rem var(--sans); color: var(--dim); }
.p-type { color: var(--dim); } .p-u { color: var(--lime); } .p-g { color: var(--cyan); } .p-o { color: var(--pink); }

/* practice / quiz / links */
.practice-block, .video-block, .quiz-block, .links-block { margin-top: 56px; scroll-margin-top: 90px; }
.practice-block > p { color: var(--muted); }
.video-big figcaption { display: none; }
.quiz { display: grid; gap: 16px; }
.q { margin: 0; padding: 20px 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.q legend { float: left; width: 100%; padding: 0; margin-bottom: 14px; font-weight: 700; font-size: 1.1rem; line-height: 1.45; }
.q legend span { color: var(--c, var(--pink)); font-family: var(--mono); }
.opts { clear: both; display: grid; gap: 10px; }
.opt { text-align: left; min-height: 50px; padding: 12px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg2); color: var(--text); font: 600 1.02rem var(--sans); cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
.opt:hover:not(:disabled) { border-color: var(--cyan); transform: translateX(3px); }
.opt.right { border-color: var(--lime); background: #7cff6b1c; }
.opt.right::before { content: "✓ "; color: var(--lime); }
.opt.wrong { border-color: var(--red); background: #ff3d5e1c; }
.opt.wrong::before { content: "✗ "; color: var(--red); }
.opt:disabled { cursor: default; }
.why { margin: 14px 0 0; padding: 12px 16px; border-radius: 12px; background: #ffffff0a; color: var(--muted); font-size: 1rem; }
.quiz-score { font: 700 1.1rem var(--display); color: var(--lime); min-height: 1.5em; margin: 0; }
.link-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.link-list li { padding: 16px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); display: grid; gap: 2px; }
.link-list a { font-weight: 700; font-size: 1.08rem; }
.link-list span { color: var(--dim); font-size: .98rem; }
.finish { display: flex; flex-wrap: wrap; gap: 12px; margin: 48px 0 32px; }
[data-complete].done { background: var(--lime); color: #0b0d1a; box-shadow: none; }
.pager { display: grid; gap: 14px; margin-bottom: 20px; }
@media (min-width: 700px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a { display: grid; gap: 4px; padding: 18px 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 700; font-family: var(--display); font-size: 1.12rem; }
.pager a:hover { border-color: var(--cyan); }
.pager small { font: 600 .85rem var(--mono); color: var(--dim); }
.pager .next { text-align: right; }

/* ── practice page ───────────────────────────────────── */
.lab-grid { width: var(--wrap); margin: 20px auto 0; display: grid; gap: 22px; }
@media (min-width: 1000px) { .lab-grid { grid-template-columns: 1fr 1fr; } }
.lab-card { min-width: 0; padding: 24px; border-radius: var(--radius); background: var(--bg2); border: 1px solid var(--line); }
.lab-card h2 { font-size: 1.45rem; }
.lab-card > p { color: var(--muted); font-size: 1.02rem; }

/* ── tools & resources ───────────────────────────────── */
.tool-grid, .res-grid { width: var(--wrap); margin: 20px auto 0; display: grid; gap: 20px; }
.res-grid { width: auto; margin: 0; }
@media (min-width: 760px) { .tool-grid, .res-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } .res-grid { grid-template-columns: repeat(3, 1fr); } }
.tool-card { display: flex; flex-direction: column; padding: 24px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); scroll-margin-top: 90px; transition: border-color .2s; }
.tool-card:target { border-color: var(--amber); box-shadow: 0 0 0 3px #ffc53144; }
.tool-card header { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.tool-card h2 { font-size: 1.5rem; margin: 0 0 2px; }
.tag { font: 700 .75rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--amber); }
.tool-card > p { color: var(--muted); font-size: 1.02rem; }
.first-step { padding: 14px 16px; border-radius: 14px; background: #7cff6b10; border: 1px solid #7cff6b44; margin-bottom: 16px; }
.first-step b { color: var(--lime); font-size: .95rem; }
.first-step p { margin: 4px 0 0; font-size: 1rem; }
.tool-links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px 16px; font-weight: 700; font-size: .98rem; margin-bottom: 0; }
.tool-lesson { color: var(--amber); }
.res-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: transform .2s, border-color .2s; }
.res-card:hover { transform: translateY(-3px); border-color: var(--cyan); color: var(--text); }
.res-card span { display: grid; gap: 4px; }
.res-card b { font-size: 1.08rem; }
.res-card small { color: var(--dim); font-size: .97rem; line-height: 1.45; }

/* ── ask tux ─────────────────────────────────────────── */
.ask-grid { display: grid; gap: 30px; align-items: start; }
@media (min-width: 1000px) { .ask-grid { grid-template-columns: .8fr 1.2fr; gap: 50px; } }
.small-list li { font-size: 1.05rem; }
.chat { display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); min-height: 0; }
.chat-host .chat { height: min(680px, 78vh); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: linear-gradient(90deg, #ff3d5e26, #9b7bff26); border-bottom: 1px solid var(--line); }
.chat-head img { width: 34px; height: auto; }
.chat-head b { font-family: var(--display); font-size: 1.15rem; display: block; line-height: 1.1; }
.chat-head small { color: var(--dim); font-size: .85rem; display: flex; align-items: center; gap: 6px; }
.chat-head small i { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.chat-head small.on i { background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.chat-head small.off i { background: var(--amber); }
.chat-head .chat-actions { margin-left: auto; display: flex; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; font-size: 1.1rem; display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--cyan); }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.chat-log .msg { max-width: 92%; }
.chat-log .msg.tux { display: block; }
.chat-log .msg.tux p { margin: 0 0 .6em; } .chat-log .msg.tux p:last-child { margin: 0; }
.chat-log .msg.tux ul, .chat-log .msg.tux ol { margin: 0 0 .6em; padding-left: 1.2em; }
.chat-log .msg.tux code { background: #1b163014; border-color: #1b163024; color: #6b1230; }
.chat-log .msg.tux pre { background: #1b1630; color: #d9ffd4; font-size: .88rem; padding: 12px; margin: 0 0 .6em; }
.chat-log .msg.tux a { color: #c0143c; }
.chat-log .msg.note { align-self: center; max-width: 100%; background: none; color: var(--dim); font-size: .9rem; text-align: center; padding: 0; }
.chat-log .msg.error { background: #ff3d5e1f; color: var(--text); border: 1px solid #ff3d5e66; }
.typing { display: inline-flex; gap: 5px; padding: 4px 2px; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: #1b1630; animation: bounce 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 0%, 60%, 100% { translate: 0 0; opacity: .5; } 30% { translate: 0 -6px; opacity: 1; } }
.chat-chips { display: flex; gap: 8px; padding: 0 18px 12px; overflow-x: auto; scrollbar-width: none; }
.chip { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: 600 .92rem var(--sans); cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--pink); }
.chat-form { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--line); background: var(--card); }
.chat-form textarea { flex: 1; resize: none; min-height: 50px; max-height: 140px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg); color: var(--text); font: 1rem/1.4 var(--sans); }
.chat-form textarea:focus { outline: none; border-color: var(--cyan); }
.chat-form button { flex: none; width: 52px; border-radius: 14px; border: 0; background: var(--hot); color: #fff; font-size: 1.3rem; cursor: pointer; }
.chat-form button:disabled { opacity: .5; cursor: wait; }
.chat-context { margin: 0; padding: 8px 18px; font-size: .85rem; color: var(--dim); border-bottom: 1px solid var(--line); background: #ffffff05; }
.chat-context b { color: var(--amber); }
.chat-foot { margin: 0; padding: 6px 14px 10px; font-size: .78rem; color: var(--dim); background: var(--card); text-align: center; }

/* drawer */
.tux-fab { position: fixed; right: 16px; bottom: 16px; z-index: 45; display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: 999px; border: 2px solid #ffffff2a; background: #161a36f2; color: var(--text); font: 700 1rem var(--sans); cursor: pointer; box-shadow: 0 12px 30px -8px #000c, 0 0 0 4px #ff3d5e22; backdrop-filter: blur(8px); transition: transform .2s; }
.tux-fab:hover { transform: translateY(-3px) scale(1.03); }
.tux-fab img { width: 40px; height: 40px; object-fit: cover; object-position: 50% 8%; border-radius: 50%; background: #2b1640; }
.tux-fab small { display: block; font-weight: 500; font-size: .8rem; color: var(--dim); }
@media (max-width: 600px) { .tux-fab span { display: none; } .tux-fab { padding: 6px; } .tux-fab img { width: 48px; height: 48px; } }
.drawer { position: fixed; z-index: 60; inset: auto 0 0 0; height: min(86vh, 720px); transform: translateY(105%); transition: transform .35s cubic-bezier(.2, .9, .3, 1); padding: 0; }
.drawer.open { transform: none; }
.drawer .chat { height: 100%; border-radius: 24px 24px 0 0; border-bottom: 0; }
@media (min-width: 760px) { .drawer { inset: auto 20px 20px auto; width: 440px; height: min(720px, calc(100vh - 40px)); transform: translateX(calc(100% + 40px)); } .drawer .chat { border-radius: 24px; border-bottom: 1px solid var(--line); } }
.scrim { position: fixed; inset: 0; z-index: 55; background: #0008; opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.open { opacity: 1; pointer-events: auto; }
@media (min-width: 760px) { .scrim { display: none; } }

/* ── peeking Tux ─────────────────────────────────────── */
.peek { position: fixed; z-index: 44; bottom: 96px; left: 0; display: flex; align-items: flex-end; gap: 0; pointer-events: none; max-width: calc(100vw - 12px); }
.peek.right { left: auto; right: 0; flex-direction: row-reverse; }
.peek-tux { width: 120px; flex: none; transform: translateX(-115%) rotate(18deg); transform-origin: 50% 100%; transition: transform .6s cubic-bezier(.2, 1.3, .4, 1); pointer-events: auto; cursor: pointer; filter: drop-shadow(0 10px 14px #000b); margin-left: -18px; }
.peek.right .peek-tux { transform: translateX(115%) rotate(-18deg); margin-left: 0; margin-right: -18px; }
.peek.show .peek-tux { transform: translateX(0) rotate(8deg); }
.peek.right.show .peek-tux { transform: translateX(0) rotate(-8deg); }
.peek.show.wiggle .peek-tux { animation: wiggle 1.2s ease-in-out .5s 1; }
.peek.right.show.wiggle .peek-tux { animation-name: wiggle-r; }
@keyframes wiggle { 0%, 100% { rotate: 0deg; } 20% { rotate: -10deg; } 40% { rotate: 7deg; } 60% { rotate: -7deg; } 80% { rotate: 4deg; } }
@keyframes wiggle-r { 0%, 100% { rotate: 0deg; } 20% { rotate: 10deg; } 40% { rotate: -7deg; } 60% { rotate: 7deg; } 80% { rotate: -4deg; } }
.peek-tux img { width: 100%; height: auto; }
.peek .laser { top: 30.2%; width: 6%; }
.peek-bubble { position: relative; margin: 0 0 120px 4px; width: min(320px, calc(100vw - 130px)); pointer-events: auto; opacity: 0; scale: .7; transform-origin: 0 100%; transition: opacity .25s .25s, scale .35s .25s cubic-bezier(.2, 1.4, .4, 1); padding: 14px 40px 14px 16px; font-size: 1rem; }
.peek.right .peek-bubble { margin: 0 4px 120px 0; transform-origin: 100% 100%; box-shadow: -6px 6px 0 #2de2ff; }
.peek.show .peek-bubble { opacity: 1; scale: 1; }
.peek-bubble small { display: block; font: 700 .72rem var(--mono); letter-spacing: .12em; color: #d61f45; margin-bottom: 4px; }
.peek-bubble p { margin: 0; }
.peek-close { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #1b163014; color: #1b1630; font-size: 1.2rem; cursor: pointer; line-height: 1; }
.peek-close:hover { background: #1b163026; }
.peek-reveal { margin-top: 8px; border: 2px solid #1b1630; background: var(--amber); color: #1b1630; font: 700 .9rem var(--sans); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.peek-answer { margin-top: 8px !important; padding: 8px 10px; border-radius: 10px; background: #7cff6b44; font-weight: 700; }
@media (max-width: 600px) { .peek { bottom: 84px; } .peek-tux { width: 92px; } .peek-bubble { margin-bottom: 92px; font-size: .95rem; } }

/* ── footer ──────────────────────────────────────────── */
.site-footer { width: var(--wrap); margin: clamp(60px, 9vw, 110px) auto 0; padding: 40px 0 110px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid h2 { font: 700 .85rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.footer-grid > div:not(.footer-brand) { display: grid; gap: 8px; align-content: start; }
.footer-grid a:not(.brand) { color: var(--muted); text-decoration: none; }
.footer-grid a:not(.brand):hover { color: var(--cyan); }
.footer-grid .link-btn { color: var(--muted); text-decoration: none; }
.footer-brand p { color: var(--muted); font-size: 1rem; margin-top: 12px; }
.footer-legal b { color: var(--amber); }
.credits { margin-top: 28px; font-size: .88rem; color: var(--dim); }
.credits a { color: var(--dim); }

/* ── about / 404 ─────────────────────────────────────── */
.about-tux { float: right; width: 160px; margin: 0 0 16px 24px; shape-outside: margin-box; }
@media (max-width: 600px) { .about-tux { width: 110px; } }
.notfound { width: var(--wrap); margin: 0 auto; padding: 60px 0; text-align: center; display: grid; justify-items: center; }
.nf-tux { width: 170px; rotate: -10deg; animation: float 4s ease-in-out infinite; margin-bottom: 20px; }
.nf-term { text-align: left; max-width: 100%; }

/* ── scroll reveal (only when JS is on) ─────────────── */
.reveal { opacity: 0; translate: 0 26px; transition: opacity .7s ease, translate .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; translate: 0 0; }

/* ═══ widgets (practice.js) ══════════════════════════════ */
.w-box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.w-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.w-btn { min-height: 44px; padding: 8px 16px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg2); color: var(--text); font: 700 1rem var(--sans); cursor: pointer; transition: border-color .15s, transform .1s; }
.w-btn:hover { border-color: var(--cyan); }
.w-btn.primary { background: var(--hot); border-color: transparent; color: #fff; }
.w-btn.sel { border-color: var(--amber); background: #ffc5311c; }
.w-input { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--text); font: 1rem var(--mono); }
.w-input:focus { outline: none; border-color: var(--cyan); }
.w-feedback { margin-top: 14px; padding: 12px 16px; border-radius: 12px; background: #ffffff0a; font-size: 1rem; min-height: 1em; }
.w-feedback:empty { display: none; }
.w-feedback.good { background: #7cff6b18; border: 1px solid #7cff6b55; }
.w-feedback.bad { background: #ff3d5e18; border: 1px solid #ff3d5e55; }
.w-score { font: 700 .95rem var(--mono); color: var(--lime); }
.w-label { font: 700 .8rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); display: block; margin-bottom: 6px; }

/* terminal */
.term { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #05060f; box-shadow: var(--shadow); }
.term-screen { height: 330px; overflow-y: auto; padding: 14px 16px; font: .95rem/1.55 var(--mono); color: #d9ffd4; cursor: text; white-space: pre-wrap; word-break: break-word; }
.term-screen .ln-cmd { color: var(--text); } .term-screen .pr { color: var(--lime); } .term-screen .path { color: var(--cyan); }
.term-screen .err { color: #ff8095; } .term-screen .dir { color: #6ab7ff; font-weight: 600; } .term-screen .exe { color: var(--lime); font-weight: 600; } .term-screen .hint { color: var(--amber); } .term-screen .flag { color: #0b0d1a; background: var(--lime); padding: 0 4px; border-radius: 4px; }
.term-input-row { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid #ffffff14; background: #ffffff05; font: .95rem var(--mono); }
.term-input-row .pr { color: var(--lime); white-space: nowrap; }
.term-input-row input { flex: 1; min-width: 0; background: none; border: 0; color: var(--text); font: inherit; caret-color: var(--lime); }
.term-input-row input:focus { outline: none; }
.missions { margin-top: 14px; padding: 16px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.missions h3 { font-size: 1.05rem; margin-bottom: 8px; display: flex; justify-content: space-between; gap: 10px; }
.missions ol { margin: 0; padding-left: 1.4em; font-size: .98rem; }
.missions li { margin: 6px 0; color: var(--dim); }
.missions li.current { color: var(--text); font-weight: 600; }
.missions li.current::marker { color: var(--amber); }
.missions li.done { color: var(--lime); text-decoration: line-through; text-decoration-color: #7cff6b88; }
.missions li.done::marker { content: "✓ "; }
.term-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.term-tools .w-btn { min-height: 36px; padding: 4px 12px; font-size: .88rem; }

/* chmod */
.chmod-grid { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 8px; align-items: center; text-align: center; margin-bottom: 14px; }
.chmod-grid .hd { font: 700 .8rem var(--mono); color: var(--dim); text-transform: uppercase; }
.chmod-grid .who { text-align: left; font-weight: 700; }
.chmod-grid label { display: grid; place-items: center; min-height: 46px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg2); cursor: pointer; font: 700 1.1rem var(--mono); }
.chmod-grid input { position: absolute; opacity: 0; pointer-events: none; }
.chmod-grid label:has(input:checked) { border-color: var(--lime); background: #7cff6b22; color: var(--lime); }
.chmod-grid label:has(input:focus-visible) { outline: 3px solid var(--amber); }
.chmod-out { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.chmod-out .w-input { width: 110px; font-size: 1.4rem; text-align: center; }
.chmod-out .sym { font: 700 1.5rem var(--mono); color: var(--lime); }

/* hash */
.hash-out { margin-top: 12px; padding: 14px; border-radius: 12px; background: #05060f; border: 1px solid var(--line); font: .95rem/1.5 var(--mono); word-break: break-all; color: var(--lime); }
.hash-out .diff { color: #0b0d1a; background: var(--amber); border-radius: 3px; }

/* phish email */
.email { background: #fff; color: #222; border-radius: 14px; overflow: hidden; font-size: 1rem; }
.email-head { padding: 14px 18px; background: #f2f3f7; border-bottom: 1px solid #ddd; display: grid; gap: 4px; font-size: .95rem; }
.email-body { padding: 18px; line-height: 1.6; }
.email-body p { margin: 0 0 .8em; }
.email .flag-spot { cursor: pointer; border-radius: 4px; transition: background .15s; outline: 2px dashed transparent; }
.email .flag-spot:hover { outline-color: #ff3d5e66; }
.email .flag-spot.found { background: #ff3d5e33; outline: 2px solid #ff3d5e; }
.email .fake-btn { display: inline-block; padding: 10px 18px; background: #1a73e8; color: #fff; border-radius: 6px; font-weight: 700; }
.email .fake-btn.found { background: #b3122e; color: #fff; }

/* url parts */
.urlparts-out { margin-top: 12px; display: grid; gap: 8px; }
.urlparts-out div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #ffffff08; font-size: .98rem; }
.urlparts-out div b { font: 700 .82rem var(--mono); text-transform: uppercase; color: var(--dim); padding-top: 3px; }
.urlparts-out .owner { background: #ffc5311c; border: 1px solid #ffc53166; }
.urlparts-out .owner span { font: 700 1.1rem var(--mono); color: var(--amber); }
@media (max-width: 520px) { .urlparts-out div { grid-template-columns: 1fr; gap: 2px; } }

/* dns */
.dns-steps { display: grid; gap: 8px; margin-top: 14px; font: .95rem var(--mono); }
.dns-steps div { padding: 10px 12px; border-radius: 10px; background: #05060f; border: 1px solid var(--line); animation: pop .35s both; }
.dns-steps .ans { border-color: var(--lime); color: var(--lime); }
.dns-steps .blk { border-color: var(--red); color: #ff8095; }

/* journey */
.journey-track { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 6px 0 16px; position: relative; }
.journey-stop { display: grid; justify-items: center; gap: 6px; text-align: center; font: 700 .78rem var(--sans); color: var(--dim); }
.journey-stop span { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--bg2); border: 2px solid var(--line); font-size: 1.35rem; transition: all .3s; }
.journey-stop.active span { border-color: var(--cyan); background: #2de2ff22; box-shadow: 0 0 18px #2de2ff66; scale: 1.12; }
.journey-stop.active { color: var(--text); }
.journey-stop.past span { border-color: var(--lime); }
.journey-text { min-height: 120px; }
.journey-text h4 { margin: 0 0 6px; font: 700 1.15rem var(--display); color: var(--cyan); }
.journey-text p { margin: 0; color: var(--muted); font-size: 1.02rem; }
@media (max-width: 520px) { .journey-stop { font-size: .65rem; } .journey-stop span { width: 38px; height: 38px; font-size: 1.1rem; } }

/* pcap */
.pcap-table { width: 100%; border-collapse: collapse; font: .85rem var(--mono); }
.pcap-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); background: #05060f; max-height: 300px; }
.pcap-table th { position: sticky; top: 0; background: #1c2145; text-align: left; padding: 8px 10px; color: var(--dim); font-weight: 600; }
.pcap-table td { padding: 7px 10px; border-top: 1px solid #ffffff0d; white-space: nowrap; }
.pcap-table tr { cursor: pointer; }
.pcap-table tbody tr:hover td { background: #ffffff0a; }
.pcap-table tr.sel td { background: #2de2ff2a; }
.pcap-table .p-DNS td { color: #9fd8ff; } .pcap-table .p-TCP td { color: #c9c9ff; } .pcap-table .p-TLS td { color: #d9ffd4; } .pcap-table .p-HTTP td { color: #a8ffbf; } .pcap-table .p-ARP td { color: #ffe08a; }
.pcap-detail { margin-top: 10px; padding: 12px 14px; border-radius: 12px; background: #05060f; border: 1px solid var(--line); font: .88rem/1.6 var(--mono); white-space: pre-wrap; color: var(--muted); min-height: 60px; }
.pcap-filter { display: flex; gap: 8px; margin-bottom: 10px; }
.pcap-filter .w-input.valid { border-color: var(--lime); } .pcap-filter .w-input.invalid { border-color: var(--red); }
.w-questions { margin-top: 16px; display: grid; gap: 12px; }
.w-q { padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.w-q p { margin: 0 0 8px; font-weight: 600; font-size: 1rem; }
.w-q .w-row .w-btn { font-size: .92rem; min-height: 40px; }
.w-q .res { margin: 8px 0 0; font-size: .95rem; }

/* ip / ports / cia */
.big-ip { font: 700 clamp(1.6rem, 5vw, 2.4rem) var(--mono); text-align: center; padding: 18px; border-radius: 14px; background: #05060f; border: 1px solid var(--line); margin-bottom: 14px; color: var(--cyan); }
.ports-grid { display: grid; gap: 10px; }
.ports-grid div { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: center; }
.ports-grid b { font: 700 1.2rem var(--mono); color: var(--amber); }
.ports-grid select { min-height: 46px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--text); font: 1rem var(--sans); padding: 0 10px; }
.ports-grid select.ok { border-color: var(--lime); } .ports-grid select.no { border-color: var(--red); }
.cia-card { padding: 18px; border-radius: 14px; background: #05060f; border: 1px solid var(--line); margin-bottom: 14px; font-size: 1.08rem; min-height: 84px; }

/* password */
.pw-meter { height: 12px; border-radius: 999px; background: #ffffff12; overflow: hidden; margin: 14px 0 10px; }
.pw-meter i { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .3s, background .3s; }
.pw-tips { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 1rem; }
.pw-tips li::before { content: "• "; }
.pw-tips .good::before { content: "✓ "; color: var(--lime); } .pw-tips .bad::before { content: "✗ "; color: var(--red); }

/* checklist */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist label { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); cursor: pointer; font-size: 1.02rem; }
.checklist input { width: 22px; height: 22px; accent-color: var(--lime); flex: none; margin-top: 3px; }
.checklist label:has(input:checked) { border-color: #7cff6b66; color: var(--muted); }

/* scan */
.scan-out { margin-bottom: 14px; }

/* ── motion safety ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; translate: none; }
  .code-rain { display: none; }
}
@media print {
  .site-header, .tux-fab, .peek, .drawer, .code-rain, .site-footer, .lesson-side, .finish, .pager { display: none !important; }
  body { background: #fff; color: #000; }
}
