/* DARO site v2 — mockup B "Celestial night" */
:root {
  --bg: #070b16;
  --bg-2: #0b1222;
  --surface: #0f1729;
  --raised: #152038;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #e9edf6;
  --muted: #8e9ab6;
  --faint: #5f6a85;
  --gold: #e8c16d;
  --gold-2: #f6dc9c;
  --aqua: #6ee0ee;
  --violet: #a08cff;
  --radius: 16px;
  --title: "Marcellus", Georgia, serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--body); color: var(--text); line-height: 1.6; background: var(--bg);
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 8%, rgba(255,255,255,.45) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 40% 62%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 44%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 82%, rgba(255,255,255,.4) 50%, transparent 51%),
    radial-gradient(900px 500px at 85% -10%, rgba(160, 140, 255, .14), transparent 70%),
    radial-gradient(800px 500px at 0% 30%, rgba(110, 224, 238, .08), transparent 70%);
  background-size: 420px 420px, 380px 380px, 520px 520px, 300px 300px, 460px 460px, auto, auto;
}
img { max-width: 100%; display: block; }
a { color: var(--aqua); text-decoration: none; }
a:hover { color: #fff; }
.wrap { width: min(1440px, 100% - 48px); margin-inline: auto; }

/* --- Top bar --- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(7, 11, 22, .72); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 30px; height: 68px; }
.brand img { height: 42px; width: auto; }
.nav { display: flex; gap: 6px; font-size: 14.5px; font-weight: 600; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 10px; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.nav a.on { color: #fff; background: rgba(255, 255, 255, .07); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; }
.kbd-search { display: flex; align-items: center; gap: 10px; color: var(--faint); border: 1px solid var(--line-strong); border-radius: 10px; padding: 7px 10px 7px 12px; min-width: 210px; }
.kbd-search kbd { margin-left: auto; font: 600 11px var(--body); border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 6px; color: var(--muted); }
.lang { background: transparent; color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; padding: 7px 8px; font: inherit; }
.lang option { color: #111; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 20px; border-radius: 12px; font-weight: 700; font-size: 15px; border: 0; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s; font-family: var(--body); }
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #2a1a00; box-shadow: 0 0 0 1px rgba(255, 220, 150, .5) inset, 0 10px 30px -10px rgba(232, 193, 109, .8); }
.btn-gold:hover { color: #2a1a00; box-shadow: 0 0 0 1px rgba(255, 220, 150, .7) inset, 0 12px 36px -8px rgba(232, 193, 109, .95); }
.btn-line { background: rgba(255, 255, 255, .04); color: var(--text); border: 1px solid var(--line-strong); }
.btn-line:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.btn-small { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-ghost { background: rgba(255, 255, 255, .04); color: var(--text); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px #4ade80; }
.burger { display: none; background: transparent; border: 0; color: #fff; font-size: 24px; }

/* --- Hero --- */
/* Hero leaves room for the pulse strip so it shows without scrolling. */
.hero { position: relative; min-height: min(calc(100svh - 68px - 120px), 820px); display: grid; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: url("assets/sky.jpg") center / cover; filter: saturate(1.1); opacity: .45; mask-image: linear-gradient(180deg, #000 30%, transparent 100%); }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 70% at 50% 40%, rgba(7, 11, 22, .1), rgba(7, 11, 22, .85)); z-index: 1; }
.hero .art { position: absolute; z-index: 2; right: max(2vw, calc(50% - 640px)); bottom: -20px; height: 92%; max-height: 820px; width: auto; filter: drop-shadow(0 0 60px rgba(110, 224, 238, .25)); }
.hero .content { position: relative; z-index: 3; padding: 28px 0 96px; max-width: 640px; }
.hero .logo { width: 240px; margin-bottom: 10px; filter: drop-shadow(0 0 30px rgba(160, 140, 255, .45)); }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); }
.kicker::before { content: ""; width: 26px; height: 1px; background: var(--gold); }
.hero h1 { font-family: var(--title); font-weight: 400; font-size: clamp(40px, 6vw, 76px); line-height: 1.02; margin: 14px 0 18px; letter-spacing: -.5px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--gold-2), var(--aqua)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 19px; color: #c5cee3; margin: 0 0 30px; max-width: 540px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.play-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); font-size: 10px; }

/* --- Pulse strip --- */
.pulse { position: relative; z-index: 4; margin-top: -64px; }
.pulse-inner { display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(15, 23, 41, .85); backdrop-filter: blur(12px); border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.pulse-item { padding: 20px 24px; border-right: 1px solid var(--line); }
.pulse-item:last-child { border-right: 0; }
.pulse-item small { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--faint); font-weight: 700; }
.pulse-item b { font-family: var(--title); font-weight: 400; font-size: 26px; color: #fff; }
.pulse-item .live { color: #4ade80; font-size: 13px; font-weight: 700; margin-left: 6px; }
.pulse-item .live::before { content: "● "; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* --- Sections --- */
section { padding: 96px 0 0; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 12px 20px; margin-bottom: 30px; flex-wrap: wrap; }
.head h2 { font-family: var(--title); font-weight: 400; font-size: clamp(30px, 3.6vw, 44px); margin: 8px 0 0; line-height: 1.1; }
.head p { color: var(--muted); margin: 8px 0 0; max-width: 560px; }
.more { font-weight: 700; font-size: 14.5px; white-space: nowrap; }

/* Path chooser */
.paths { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
.tabs { display: grid; gap: 6px; align-content: start; }
.tab { all: unset; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 12px; color: var(--muted); font-weight: 700; border: 1px solid transparent; }
.tab small { color: var(--faint); font-weight: 600; }
.tab:hover { color: #fff; background: rgba(255, 255, 255, .03); }
.tab[aria-selected="true"] { color: #fff; background: linear-gradient(90deg, rgba(232, 193, 109, .14), rgba(232, 193, 109, 0)); border-color: rgba(232, 193, 109, .35); }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.spec { background: linear-gradient(180deg, var(--raised), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; color: var(--text); position: relative; overflow: hidden; transition: border-color .2s, transform .2s; }
.spec::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 220px; height: 220px; background: radial-gradient(circle, rgba(110, 224, 238, .18), transparent 70%); }
.spec:hover { border-color: rgba(110, 224, 238, .45); transform: translateY(-3px); color: var(--text); }
.spec .ico { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); border: 1px solid var(--line-strong); margin-bottom: 18px; }
.spec .ico img { width: 36px; height: 36px; image-rendering: pixelated; }
.spec h3 { font-family: var(--title); font-weight: 400; font-size: 24px; margin: 0 0 8px; }
.spec p { color: var(--muted); font-size: 15px; margin: 0 0 18px; min-height: 72px; }
.spec .go { font-weight: 700; font-size: 14px; color: var(--aqua); }
.paths-note { margin-top: 16px; color: var(--faint); font-size: 14px; }

/* Bento news */
.bento { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 18px; }
.tile { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface) center / cover; color: #fff; display: flex; align-items: end; }
.tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 11, 22, 0) 30%, rgba(7, 11, 22, .92)); }
.tile:hover { color: #fff; border-color: var(--line-strong); }
.tile:hover::before { background: linear-gradient(180deg, rgba(7, 11, 22, 0) 10%, rgba(7, 11, 22, .95)); }
.tile .in { position: relative; padding: 20px 22px; }
.tile.big { grid-row: span 2; }
.tile.big h3 { font-size: 30px; }
.tile h3 { font-family: var(--title); font-weight: 400; margin: 6px 0 4px; font-size: 21px; line-height: 1.15; }
.tile p { margin: 0; color: #c2cbe0; font-size: 14.5px; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; background: rgba(232, 193, 109, .18); color: var(--gold-2); border: 1px solid rgba(232, 193, 109, .35); }
.pill.aqua { background: rgba(110, 224, 238, .12); color: var(--aqua); border-color: rgba(110, 224, 238, .3); }
.tile.plain { background: linear-gradient(160deg, #1b2747, #0f1729); align-items: center; }
.tile.plain::before { display: none; }

/* Codex teaser */
.codex { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; background: linear-gradient(135deg, rgba(160, 140, 255, .1), rgba(110, 224, 238, .06)); border: 1px solid var(--line-strong); border-radius: 24px; padding: 48px; }
.codex h2 { font-family: var(--title); font-weight: 400; font-size: clamp(28px, 3vw, 40px); margin: 10px 0 12px; line-height: 1.1; }
.codex p { color: var(--muted); }
.codex .stats { display: flex; gap: 28px; margin-top: 22px; flex-wrap: wrap; }
.codex .stats b { display: block; font-family: var(--title); font-weight: 400; font-size: 30px; color: #fff; }
.codex .stats span { font-size: 13px; color: var(--faint); }
.mock-search { background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); overflow: hidden; }
.mock-search .bar { display: flex; gap: 10px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); color: #fff; font-size: 16px; }
.mock-search .bar .caret { width: 2px; height: 20px; background: var(--aqua); animation: blink 1s infinite; }
.mock-search .group { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); }
.mock-search .row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; margin: 0 6px; border-radius: 10px; color: var(--text); font-size: 15px; }
.mock-search .row:hover, .mock-search .row.sel { background: rgba(110, 224, 238, .08); color: #fff; }
.mock-search .row img { width: 24px; height: 24px; image-rendering: pixelated; }
.mock-search .row small { margin-left: auto; color: var(--faint); font-size: 13px; }
.mock-search .foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); margin-top: 8px; }

/* Start */
.start { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.start .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.start .num { font-family: var(--title); font-size: 46px; line-height: 1; background: linear-gradient(180deg, var(--gold-2), rgba(232, 193, 109, .2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.start h3 { margin: 14px 0 6px; font-size: 19px; }
.start p { color: var(--muted); margin: 0 0 18px; font-size: 15px; }

footer { margin-top: 110px; border-top: 1px solid var(--line); padding: 44px 0 50px; color: var(--faint); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
footer .cols { display: flex; gap: 56px; flex-wrap: wrap; }
footer h4 { color: var(--text); margin: 0 0 10px; font-size: 14px; }
footer ul { list-style: none; padding: 0; margin: 0; line-height: 2; }
footer a { color: var(--muted); }

/* --- Database page (fiche) --- */
.crumbs { font-size: 14px; color: var(--faint); padding: 26px 0 0; }
.crumbs a { color: var(--muted); }
.page-head { display: flex; gap: 22px; align-items: center; padding: 22px 0 30px; flex-wrap: wrap; }
.page-head .big-ico { width: 84px; height: 84px; border-radius: 20px; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, rgba(110, 224, 238, .25), rgba(160, 140, 255, .12)); border: 1px solid var(--line-strong); box-shadow: 0 0 40px -10px rgba(110, 224, 238, .5); }
.page-head .big-ico img { width: 52px; height: 52px; image-rendering: pixelated; }
.page-head h1 { font-family: var(--title); font-weight: 400; margin: 0; font-size: clamp(32px, 4.4vw, 48px); line-height: 1.05; }
.page-head p { margin: 8px 0 0; color: var(--muted); }
.lvl-picker { margin-left: auto; display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 6px; }
.lvl-picker span { font-size: 12px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); padding: 0 8px; }
.lvl-picker button { all: unset; cursor: pointer; width: 34px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-weight: 800; color: var(--muted); font-size: 14px; }
.lvl-picker button:hover { color: #fff; }
.lvl-picker button.on { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #2a1a00; }
.layout { display: grid; grid-template-columns: 290px 1fr; gap: 40px; align-items: start; }
.layout > *, .paths > *, .codex > * { min-width: 0; }
.levels td { overflow-wrap: anywhere; }
.side { position: sticky; top: 88px; display: grid; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.side h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--faint); }
.side ul { list-style: none; padding: 0; margin: 0; font-size: 15px; line-height: 2.1; }
.side li a { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.side li a img { width: 22px; height: 22px; image-rendering: pixelated; }
.side li a.on { color: #fff; font-weight: 700; }
.side li a.on::after { content: "●"; color: var(--gold); margin-left: auto; font-size: 10px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; margin: 0; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; font-weight: 700; }
.note { font-size: 14px; color: #d9cfae; background: rgba(232, 193, 109, .07); border: 1px solid rgba(232, 193, 109, .25); border-radius: var(--radius); padding: 16px 18px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.toc a { font-size: 13.5px; font-weight: 600; padding: 7px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); display: inline-flex; gap: 7px; align-items: center; }
.toc a:hover { color: #fff; border-color: var(--line-strong); }
.toc a img { width: 18px; height: 18px; image-rendering: pixelated; }
.skill { background: linear-gradient(180deg, var(--raised), var(--surface) 140px); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; margin-bottom: 16px; scroll-margin-top: 90px; }
.skill:target { border-color: rgba(232, 193, 109, .5); }
.skill-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.skill-head img { width: 40px; height: 40px; image-rendering: pixelated; padding: 4px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line-strong); }
.skill-head h3 { margin: 0; font-size: 20px; font-family: var(--title); font-weight: 400; }
.skill-head .id { font-size: 12.5px; color: var(--faint); }
.badges { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 8px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line-strong); color: var(--muted); }
.badge.passive { color: #c7bcff; border-color: rgba(160, 140, 255, .4); background: rgba(160, 140, 255, .1); }
.badge.active { color: #86f0c0; border-color: rgba(74, 222, 128, .35); background: rgba(74, 222, 128, .08); }
.skill p { margin: 14px 0 0; color: #bcc6dc; }
.callout { margin-top: 14px; font-size: 14px; border-left: 2px solid var(--gold); background: rgba(232, 193, 109, .06); padding: 10px 14px; border-radius: 0 10px 10px 0; color: #e6d6a8; }
.levels { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 18px; font-size: 14.5px; }
.levels th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--faint); font-weight: 800; padding: 6px 12px; }
.levels td { padding: 9px 12px; border-top: 1px solid var(--line); color: #cfd6e6; transition: background .2s, color .2s; }
.levels td:first-child { width: 70px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.levels tr.hl td { background: rgba(232, 193, 109, .1); color: #fff; }
.levels tr.hl td:first-child { color: var(--gold-2); border-radius: 10px 0 0 10px; }
.levels tr.hl td:last-child { border-radius: 0 10px 10px 0; }
.generated { font-size: 13px; color: var(--faint); margin-top: 26px; }
.generated::before { content: "⚙ "; }

/* --- Responsive --- */
@media (max-width: 1020px) {
  .nav, .kbd-search { display: none; }
  .burger { display: inline-flex; }
  .hero .art { opacity: .35; right: -120px; }
  .pulse-inner { grid-template-columns: repeat(2, 1fr); }
  .pulse-item:nth-child(2) { border-right: 0; }
  .pulse-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .paths, .codex, .layout { grid-template-columns: 1fr; }
  .tabs { grid-auto-flow: column; overflow-x: auto; grid-auto-columns: max-content; }
  .specs, .start { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: 260px 200px 200px; }
  .tile.big { grid-column: span 2; grid-row: auto; }
  .side { position: static; order: 2; }
  .lvl-picker { margin-left: 0; }
}
@media (max-width: 560px) {
  .top-right .btn, .lang { display: none; }
  .hero .content { padding: 40px 0 110px; }
  .hero .logo { width: 200px; }
  .bento { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: 220px; }
  .tile.big { grid-column: auto; }
  .codex { padding: 28px; }
  .skill { padding: 18px; }
  .badges { margin-left: 0; width: 100%; }
}

/* --- Site v2 additions (built pages) --- */
button.kbd-search { font: inherit; font-size: 14px; background: transparent; cursor: pointer; }
button.kbd-search:hover { color: var(--text); border-color: var(--muted); }
button.mock-search { all: unset; display: block; cursor: pointer; width: 100%; box-sizing: border-box; background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); overflow: hidden; }
button.mock-search:hover { border-color: rgba(110, 224, 238, .45); }

.search-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(4, 7, 15, .7); backdrop-filter: blur(6px); display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; }
.search-overlay[hidden], .specs[hidden] { display: none; }
.search-box { width: min(640px, 100%); background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 40px 80px -30px #000; overflow: hidden; }
.search-box .bar { display: flex; gap: 10px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.search-box input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: #fff; font: 500 17px var(--body); }
.search-box .results { max-height: 52vh; overflow-y: auto; padding: 6px; }
.search-box .row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--text); font-size: 15px; }
.search-box .row img { width: 24px; height: 24px; image-rendering: pixelated; }
.search-box .row small { margin-left: auto; color: var(--faint); font-size: 13px; text-align: right; }
.search-box .row.sel, .search-box .row:hover { background: rgba(110, 224, 238, .09); color: #fff; }
.search-box .empty { padding: 18px; color: var(--faint); }
.search-box .foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); }

.codex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 20px; }
.spec.soon { opacity: .45; }
.spec.soon p { min-height: 0; }

.tier-title { font-family: var(--title); font-weight: 400; font-size: 26px; margin: 34px 0 16px; color: var(--gold-2); }
.families { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.family { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 12px; }
.family-head { display: flex; align-items: center; gap: 10px; font-weight: 800; margin-bottom: 8px; }
.family-head img { width: 26px; height: 26px; object-fit: contain; }
.family ul { list-style: none; margin: 0; padding: 0; }
.family li a, .family li.planned { display: flex; align-items: center; gap: 10px; padding: 6px 8px; margin: 0 -8px; border-radius: 10px; color: var(--text); font-size: 15px; }
.family li a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.family li img { width: 22px; height: 22px; image-rendering: pixelated; }
.family li small { margin-left: auto; color: var(--faint); font-size: 12.5px; }
.family li.planned { color: var(--faint); padding-left: 40px; }
.side li.planned span { color: var(--faint); padding-left: 32px; font-size: 14px; }

@media (max-width: 1020px) {
  .codex-grid { grid-template-columns: 1fr; }
  .burger { font-size: 20px; }
}

/* --- New player journey --- */
.journey-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding: 22px 0 34px; flex-wrap: wrap; }
.journey-head h1 { font-family: var(--title); font-weight: 400; font-size: clamp(34px, 4.6vw, 52px); margin: 8px 0 6px; line-height: 1.05; }
.journey-head p { color: var(--muted); margin: 0; max-width: 620px; font-size: 17px; }
.journey-progress { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px 18px; }
.journey-progress .resume { display: block; font-size: 14px; font-weight: 800; max-width: 220px; color: #fff; }
.journey-progress .resume::after { content: " →"; color: var(--aqua); }
.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; align-content: center; background: radial-gradient(closest-side, var(--surface) 78%, transparent 80% 100%), conic-gradient(var(--gold) calc(var(--p) * 1%), rgba(255, 255, 255, .08) 0); }
.ring span { font-family: var(--title); font-size: 22px; line-height: 1; }
.ring small { font-size: 11px; color: var(--faint); }
.link-btn { all: unset; cursor: pointer; font-size: 12.5px; color: var(--faint); margin-top: 4px; display: inline-block; }
.link-btn:hover { color: var(--aqua); }

.journey-layout { display: grid; grid-template-columns: 290px 1fr; gap: 34px; align-items: start; }
.journey-layout > * { min-width: 0; }
.constellation { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 6px; }
.chapter { margin-bottom: 18px; }
.chapter-title { display: flex; align-items: baseline; gap: 10px; font-weight: 800; font-size: 14px; color: var(--text); margin-bottom: 6px; flex-wrap: wrap; }
.chapter-title span { font-family: var(--title); font-weight: 400; color: var(--gold); font-size: 18px; }
.chapter-title small { width: 100%; font-weight: 600; color: var(--faint); font-size: 12px; padding-left: 26px; }
.constellation ol { list-style: none; margin: 0; padding: 0 0 0 7px; border-left: 1px dashed rgba(232, 193, 109, .25); }
.constellation li a { display: flex; align-items: center; gap: 12px; padding: 6px 0 6px 0; margin-left: -7px; color: var(--muted); font-size: 14.5px; }
.constellation li a i { flex: none; width: 13px; height: 13px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--faint); transition: all .25s; }
.constellation li a:hover { color: #fff; }
.constellation li a.done { color: var(--faint); }
.constellation li a.done i { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 10px rgba(232, 193, 109, .6); }
.constellation li a.current { color: #fff; font-weight: 700; }
.constellation li a.current i { border-color: var(--aqua); background: var(--aqua); box-shadow: 0 0 0 4px rgba(110, 224, 238, .18), 0 0 16px rgba(110, 224, 238, .8); }

.step { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px; margin-bottom: 18px; scroll-margin-top: 90px; transition: border-color .3s, opacity .3s; }
.step.current { border-color: rgba(110, 224, 238, .45); background: linear-gradient(180deg, rgba(110, 224, 238, .06), var(--surface) 160px); box-shadow: 0 30px 60px -40px rgba(110, 224, 238, .5); }
.step:not(.current):not(.done) { opacity: .62; }
.step.done { opacity: .5; }
.step.done .how, .step.done .why, .step.done .tip, .step.done .more-box { display: none; }
.step-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); flex-wrap: wrap; }
.step.current .step-num { color: var(--aqua); }
.step h2 { font-family: var(--title); font-weight: 400; font-size: 28px; margin: 8px 0 10px; line-height: 1.15; }
.step .goal { font-size: 17px; color: #fff; margin: 0 0 8px; }
.step .goal b { color: var(--gold-2); font-weight: 800; margin-right: 4px; }
.step .why { color: var(--muted); margin: 0 0 12px; }
.step .how { margin: 0 0 12px; padding-left: 22px; color: #cfd6e6; }
.step .how li { margin: 4px 0; }
.step .how li::marker { color: var(--aqua); font-weight: 800; }
.step .tip { font-size: 14.5px; border-left: 2px solid var(--aqua); background: rgba(110, 224, 238, .06); padding: 10px 14px; border-radius: 0 10px 10px 0; color: #cdeff3; margin-bottom: 12px; }
.step .tip b { color: var(--aqua); margin-right: 4px; }
.step-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.step-foot .btn { margin-left: auto; }
.reward { font-size: 14px; color: var(--gold-2); background: rgba(232, 193, 109, .08); border: 1px solid rgba(232, 193, 109, .25); padding: 5px 12px; border-radius: 999px; }
.more-box summary { cursor: pointer; font-size: 14px; color: var(--aqua); font-weight: 700; }
.more-box ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.journey-end { text-align: center; padding: 40px 20px 10px; }
.journey-end h2 { font-family: var(--title); font-weight: 400; font-size: 32px; margin: 0 0 8px; }
.journey-end p { color: var(--muted); max-width: 520px; margin: 0 auto 18px; }

@media (max-width: 1020px) {
  .journey-layout { grid-template-columns: 1fr; }
  .constellation { position: static; max-height: none; display: none; }
  .step { padding: 20px; }
  .step-foot .btn { margin-left: 0; width: 100%; }
}

/* --- Jobs --- */
.job-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.job-card { text-align: center; justify-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--text); display: grid; gap: 4px; transition: border-color .2s, transform .2s; }
.job-card:hover { border-color: rgba(110, 224, 238, .45); transform: translateY(-2px); color: #fff; }
.job-card b { font-family: var(--title); font-weight: 400; font-size: 20px; }
.job-card small { color: var(--faint); font-size: 13px; }
.job-icons { display: flex; gap: 6px; margin-bottom: 6px; min-height: 24px; }
.job-icons img { width: 24px; height: 24px; image-rendering: pixelated; }
.no-icon { display: inline-block; width: 24px; height: 24px; border-radius: 6px; background: rgba(255, 255, 255, .06); flex: none; }
.skill-head .no-icon { width: 40px; height: 40px; border-radius: 10px; }
.skill p.missing { color: var(--faint); font-style: italic; }

.job-sprite { image-rendering: pixelated; width: 118px; height: auto; margin: 2px 0 6px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.job-sprite.big { width: 150px; margin: 0; filter: drop-shadow(0 0 24px rgba(110, 224, 238, .25)); }
.job-card:hover .job-sprite { filter: drop-shadow(0 0 14px rgba(110, 224, 238, .45)); }

.demo { margin-top: 14px; }
.demo summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--aqua); padding: 6px 12px; border-radius: 10px; border: 1px solid rgba(110, 224, 238, .3); background: rgba(110, 224, 238, .06); list-style: none; }
.demo summary::-webkit-details-marker { display: none; }
.demo[open] summary { color: #fff; }
.demo img { margin-top: 12px; border-radius: 12px; border: 1px solid var(--line-strong); width: 320px; max-width: 100%; height: auto; image-rendering: pixelated; }

/* --- Items --- */
.sub-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--text); display: grid; gap: 4px; }
.sub-card:hover { border-color: rgba(110, 224, 238, .45); color: #fff; }
.sub-card b { font-weight: 800; }
.sub-card small { color: var(--faint); }
.sub-icons { display: flex; gap: 4px; min-height: 24px; margin-bottom: 4px; }
.sub-icons img { width: 24px; height: 24px; image-rendering: pixelated; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.pager a { min-width: 34px; text-align: center; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 700; font-size: 14px; }
.pager a.on { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #2a1a00; border-color: transparent; }
.item-list { display: grid; gap: 8px; margin-bottom: 18px; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; scroll-margin-top: 90px; }
.item[open] { border-color: rgba(110, 224, 238, .4); }
.item summary { display: flex; align-items: center; gap: 12px; padding: 9px 14px; cursor: pointer; list-style: none; }
.item summary::-webkit-details-marker { display: none; }
.item summary img { width: 24px; height: 24px; image-rendering: pixelated; flex: none; }
.item-name { font-weight: 700; color: #fff; }
.item-name em { font-style: normal; color: var(--gold-2); font-weight: 800; }
.tag-daro { font-size: 10.5px; font-weight: 800; letter-spacing: .8px; padding: 1px 6px; border-radius: 6px; background: rgba(160, 140, 255, .15); color: #c7bcff; vertical-align: 2px; }
.item-facts { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; font-size: 13.5px; color: #cfd6e6; }
.item-facts small { color: var(--faint); font-size: 11.5px; font-weight: 700; }
.item-id { color: var(--faint); font-size: 12.5px; min-width: 52px; text-align: right; }
.item-desc { padding: 4px 16px 14px 50px; color: #cfd6e6; font-size: 14.5px; }
.item-desc p { margin: 2px 0; }
@media (max-width: 700px) {
  .item summary { flex-wrap: wrap; }
  .item-facts { margin-left: 36px; justify-content: flex-start; width: 100%; }
  .item-id { display: none; }
  .item-desc { padding-left: 16px; }
}

/* --- Monsters --- */
.mob-thumbs { display: flex; align-items: flex-end; gap: 6px; min-height: 48px; margin-bottom: 6px; }
.mob-thumbs img { max-height: 48px; max-width: 48px; image-rendering: pixelated; }
.item.mob summary { min-height: 58px; }
.mob-sprite { width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; flex: none; }
.item summary img.mob-sprite { width: 48px; height: 48px; }
.mob-sub { display: block; font-weight: 600; color: var(--faint); font-size: 12.5px; }
.tag-mvp { font-size: 10.5px; font-weight: 800; letter-spacing: .8px; padding: 1px 6px; border-radius: 6px; background: rgba(232, 193, 109, .18); color: var(--gold-2); vertical-align: 2px; }
.mob-body { padding: 4px 16px 16px 72px; }
.mob-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.mob-stats div { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; display: flex; gap: 6px; font-size: 13.5px; }
.mob-stats dt { color: var(--faint); font-weight: 800; font-size: 11.5px; align-self: center; }
.mob-stats dd { margin: 0; color: #fff; font-weight: 700; }
.mob-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.mob-cols h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 1.3px; color: var(--faint); }
.mob-cols .elite h4 { color: #c7bcff; }
.drops, .spawns { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.drops li, .spawns li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid var(--line); }
.drops a { display: flex; align-items: center; gap: 8px; color: var(--text); min-width: 0; }
.drops a:hover { color: var(--aqua); }
.drops img { width: 24px; height: 24px; image-rendering: pixelated; flex: none; }
.drops .rate, .spawns .rate { margin-left: auto; color: var(--gold-2); font-weight: 700; font-size: 13px; white-space: nowrap; }
.spawns small { color: var(--faint); }
.dropped-by { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dropped-by b { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; margin-right: 4px; }
.dropped-by a { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: var(--text); font-size: 13.5px; }
.dropped-by a:hover { border-color: rgba(110, 224, 238, .4); color: #fff; }
.dropped-by img { width: 26px; height: 26px; object-fit: contain; image-rendering: pixelated; }
.dropped-by small { color: var(--gold-2); font-weight: 700; }
.more-count { color: var(--faint); font-size: 13px; }
@media (max-width: 700px) { .mob-body { padding-left: 16px; } }

/* --- Quests --- */
.quest-mark { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-family: var(--title); color: var(--gold-2); background: rgba(232, 193, 109, .08); border: 1px solid rgba(232, 193, 109, .25); font-size: 15px; }
.quest-body { padding: 4px 16px 16px 62px; color: #cfd6e6; font-size: 14.5px; }
.quest-body > p { margin: 2px 0 10px; }
.quest-body section p { margin: 0; font-size: 14px; }
.mission-desc { color: var(--muted); font-size: 13.5px; margin: 6px 0; }
@media (max-width: 700px) { .quest-body { padding-left: 16px; } }

/* --- Guides --- */
.start-banner { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 22px; border-radius: var(--radius); background: linear-gradient(90deg, rgba(232, 193, 109, .14), rgba(110, 224, 238, .08)); border: 1px solid rgba(232, 193, 109, .35); color: #fff; margin-bottom: 10px; }
.start-banner span { color: var(--aqua); font-weight: 700; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.guide-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; color: var(--text); display: grid; gap: 6px; }
.guide-card:hover { border-color: rgba(110, 224, 238, .45); color: #fff; }
.guide-card b { font-weight: 800; }
.guide-card small { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.guide-toc ul, .guide-siblings { list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.5; }
.guide-toc li { padding: 3px 0; }
.guide-toc li.lvl3 { padding-left: 14px; font-size: 13px; }
.guide-toc a, .guide-siblings a { color: var(--muted); }
.guide-toc a:hover, .guide-siblings a:hover, .guide-siblings a.on { color: #fff; }
.guide-siblings li { padding: 3px 0; }
.side .guide-toc, .side .panel:has(.guide-siblings) { max-height: 46vh; overflow-y: auto; }
.guide-body { min-width: 0; color: #d3dae9; font-size: 15.5px; line-height: 1.7; }
.guide-body h2, .guide-body h3, .guide-body h4 { font-family: var(--title); font-weight: 400; color: #fff; scroll-margin-top: 90px; }
.guide-body h2 { font-size: 28px; margin: 34px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.guide-body h3 { font-size: 21px; margin: 24px 0 8px; color: var(--gold-2); }
.guide-body h4 { font-size: 17px; margin: 18px 0 6px; }
.guide-body a { color: var(--aqua); }
.guide-body img { display: inline-block; vertical-align: middle; max-width: 100%; height: auto; }
.guide-body ul, .guide-body ol { padding-left: 22px; }
.guide-body dl dd { margin-left: 18px; }
.guide-body table.guide-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; display: block; overflow-x: auto; }
.guide-body table.guide-table th, .guide-body table.guide-table td { border: 1px solid var(--line-strong); padding: 7px 10px; text-align: left; vertical-align: middle; }
.guide-body table.guide-table th { background: rgba(255, 255, 255, .05); color: #fff; font-weight: 800; }
.guide-body table.guide-table tr:nth-child(even) td { background: rgba(255, 255, 255, .02); }
.guide-body hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.review-note { font-size: 13.5px; color: #d9cfae; background: rgba(232, 193, 109, .07); border: 1px solid rgba(232, 193, 109, .25); border-radius: 12px; padding: 10px 14px; margin: 0 0 18px; }
.guide-body pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 15px; background: rgba(110, 224, 238, .05); border: 1px solid rgba(110, 224, 238, .2); border-radius: 12px; padding: 12px 16px; color: #d3dae9; }
.guide-body td, .guide-body th, .guide-body li, .guide-body p { overflow-wrap: anywhere; }

/* News page */
.news-list { display: grid; gap: 22px; padding-bottom: 60px; max-width: 860px; }
.news-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; scroll-margin-top: 90px; }
.news-item h2 { font-family: var(--title); font-weight: 400; margin: 10px 0 6px; font-size: 26px; }
.news-meta { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: var(--faint); }
.news-item .guide-body { padding: 0; }
.vote-note { color: var(--faint); font-size: 14px; padding: 18px 0 60px; }

/* Guide category icons (animated, from the old wiki menu) */
.guide-cat { display: flex; align-items: center; gap: 12px; }
.guide-cat img { width: 24px; height: 24px; }  /* native size: the wiki GIFs are 24x24, any other size blurs them */
.guide-body li img { max-height: 56px; width: auto; }  /* wiki grade icons inside lists */

/* Guides index: one compact column per category, like the old wiki menu */
.guide-menu { columns: 3 320px; column-gap: 22px; padding-bottom: 60px; }
.guide-col { break-inside: avoid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 22px; }
.guide-col h2 { font-family: var(--title); font-weight: 400; font-size: 22px; color: var(--gold-2); margin: 0 0 10px; }
.guide-col ul { list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 1.5; }
.guide-col li { padding: 4px 0; border-top: 1px solid var(--line); }
.guide-col li:first-child { border-top: 0; }
.guide-col a { color: var(--text); }
.guide-col a:hover { color: var(--aqua); }
