/* EssenceInfo — public site styles */
:root {
  --bg: #0d0e12;
  --bg-2: #111318;
  --surface: #161920;
  --surface-2: #1c2029;
  --border: #272c38;
  --border-2: #353b4a;
  --text: #e8e4d8;
  --text-2: #b9b3a3;
  --muted: #8a8578;
  --gold: #d6a84e;
  --gold-2: #f2cf7c;
  --gold-dim: rgba(214, 168, 78, .14);
  --active: #7cc57f;
  --passive: #6aa6e0;
  --toggle: #c08ae0;
  --danger: #e06a5a;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-title: "Cinzel", Georgia, "Times New Roman", serif;
  --wrap: 1240px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--font);
  background-image: radial-gradient(1200px 500px at 50% -200px, rgba(214, 168, 78, .08), transparent 70%);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { color: #fff; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-family: var(--font-title); font-size: clamp(26px, 4vw, 38px); letter-spacing: .02em; color: #fff; }
small { color: var(--muted); }
.muted { color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 860px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 10px; top: 10px; z-index: 100; background: var(--gold); color: #000; padding: 6px 10px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 14, 18, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: 62px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-title); font-size: 20px; color: #fff; font-weight: 700; white-space: nowrap; }
.logo:hover { color: var(--gold-2); }
.site-nav { display: flex; align-items: center; gap: 18px; flex: 1; }
.site-nav > ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav > ul > li { position: relative; }
.site-nav > ul > li > a {
  display: block; padding: 8px 14px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500;
}
.site-nav > ul > li > a:hover { color: #fff; background: var(--surface); }
.site-nav > ul > li > a.active { color: var(--gold-2); background: var(--gold-dim); }
.site-nav .sub {
  position: absolute; top: 100%; left: 0; min-width: 200px; list-style: none; margin: 6px 0 0; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: .15s;
}
.site-nav .has-sub:hover .sub, .site-nav .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.site-nav .sub a { display: block; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--text-2); }
.site-nav .sub a:hover { background: var(--surface-2); color: #fff; }
.search { position: relative; margin-left: auto; }
.search input {
  width: 240px; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 999px; padding: 8px 14px 8px 34px; font: inherit; font-size: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a8578' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 12px center; transition: width .2s, border-color .2s;
}
.search input:focus { border-color: var(--gold); width: 300px; outline: none; }
.ac-list {
  position: absolute; right: 0; top: calc(100% + 6px); width: 340px; max-height: 70vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px;
}
.ac-list a { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--text); }
.ac-list a:hover, .ac-list a.sel { background: var(--surface-2); }
.ac-list img { width: 28px; height: 28px; border-radius: 4px; }
.ac-list small { display: block; font-size: 12px; }
.lang-switch { display: flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.lang-switch a { padding: 5px 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.lang-switch a.active { background: var(--gold-dim); color: var(--gold-2); }
.admin-link { font-size: 13px; color: var(--muted); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: .2s; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 62px 0 auto 0; flex-direction: column; align-items: stretch; gap: 12px;
    background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 16px 20px 20px;
    display: none; max-height: calc(100vh - 62px); overflow: auto;
  }
  .site-nav.open { display: flex; }
  .site-nav > ul { flex-direction: column; }
  .site-nav .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: none; padding-left: 12px; }
  .search { margin: 0; }
  .search input, .search input:focus { width: 100%; }
  .ac-list { width: 100%; }
  .lang-switch { align-self: flex-start; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: var(--radius-sm);
  font-weight: 600; border: 1px solid transparent; cursor: pointer; font: inherit; font-weight: 600; transition: .15s;
}
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1b1407; }
.btn-gold:hover { filter: brightness(1.08); color: #000; }
.btn-ghost { border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 80px 0 60px; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 300px at 80% 20%, rgba(106, 166, 224, .10), transparent 70%),
    radial-gradient(700px 400px at 10% 90%, rgba(214, 168, 78, .10), transparent 70%);
}
.hero-inner { max-width: 820px; text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: 12px; color: var(--gold); font-weight: 600; margin: 0 0 12px; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); }
.lead { color: var(--text-2); font-size: 17px; max-width: 680px; margin: 0 auto 1.2em; }
.page-head .lead { margin: 0; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.hero-stats { display: flex; justify-content: center; gap: 48px; margin: 44px 0 0; flex-wrap: wrap; }
.hero-stats dt { font-family: var(--font-title); font-size: 30px; color: var(--gold-2); }
.hero-stats dd { margin: 0; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; }

/* ---------- Sections ---------- */
.section { padding-block: 40px; }
.section-title { font-family: var(--font-title); font-size: 22px; color: #fff; letter-spacing: .03em; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.page-head { padding: 36px 0 28px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, rgba(214,168,78,.04), transparent); }
.page-head.compact { padding: 18px 0 14px; }
.page-head .meta { color: var(--muted); font-size: 13px; margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--gold-2); }
.empty { color: var(--muted); padding: 30px 0; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 16px; }

/* ---------- Race cards ---------- */
.race-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.race-card {
  --rc: var(--gold);
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px 18px; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--border); overflow: hidden; transition: .2s;
}
.race-card::after { content: ""; position: absolute; inset: auto -40px -60px auto; width: 140px; height: 140px; border-radius: 50%; background: var(--rc); opacity: .08; transition: .2s; }
.race-card:hover { border-color: var(--rc); transform: translateY(-2px); }
.race-card:hover::after { opacity: .18; }
.race-emblem { font-family: var(--font-title); font-size: 26px; color: var(--rc); line-height: 1; }
.race-name { font-weight: 700; color: #fff; font-size: 17px; }
.race-bases { font-size: 13px; color: var(--muted); }
.race-human { --rc: #d6a84e; } .race-elf { --rc: #7cc57f; } .race-dark-elf { --rc: #b07ad8; }
.race-orc { --rc: #e06a5a; } .race-dwarf { --rc: #e0a15a; } .race-kamael { --rc: #9aa7b8; }
.race-sylph { --rc: #6ad3c8; } .race-ertheia { --rc: #e08ac0; }

/* ---------- Article cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.acard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: .2s; }
.acard:hover { border-color: var(--border-2); transform: translateY(-2px); }
.acard-link { display: flex; flex-direction: column; height: 100%; color: inherit; }
.acard-cover { aspect-ratio: 16 / 8; overflow: hidden; background: var(--surface-2); }
.acard-cover img { width: 100%; height: 100%; object-fit: cover; }
.acard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.acard h3 { font-size: 17px; color: #fff; margin: 0; }
.acard p { margin: 0; color: var(--text-2); font-size: 14px; }
.acard time { margin-top: auto; font-size: 12px; color: var(--muted); }
.badge { align-self: flex-start; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--gold-dim); color: var(--gold-2); }
.badge-warn { background: rgba(224, 106, 90, .15); color: var(--danger); }

/* ---------- Wiki layout ---------- */
.wiki-layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding-block: 32px; }
.side-title { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 10px; }
.side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 80px; }
.side-list a { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--text-2); }
.side-list a:hover { background: var(--surface); color: #fff; }
.side-list a.active { background: var(--gold-dim); color: var(--gold-2); }
.side-feature { font-weight: 600; color: var(--gold-2) !important; }
.feature-card {
  display: flex; justify-content: space-between; gap: 24px; align-items: center; flex-wrap: wrap;
  padding: 26px 28px; margin-bottom: 26px; border-radius: var(--radius); border: 1px solid rgba(214,168,78,.35);
  background: linear-gradient(120deg, rgba(214,168,78,.14), rgba(106,166,224,.06)); color: inherit;
}
.feature-card:hover { border-color: var(--gold); }
.feature-card h2 { font-family: var(--font-title); color: #fff; margin: 0 0 4px; }
.feature-card p { margin: 0; color: var(--text-2); }
.feature-races { display: flex; flex-wrap: wrap; gap: 6px; }
.feature-races span { font-size: 12px; padding: 4px 10px; border: 1px solid var(--border-2); border-radius: 999px; color: var(--text-2); }
@media (max-width: 820px) {
  .wiki-layout { grid-template-columns: 1fr; }
  .side-list { position: static; flex-direction: row; flex-wrap: wrap; }
}

/* ---------- Article ---------- */
.article-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 40px; padding-block: 32px; }
.article-layout.no-toc { grid-template-columns: minmax(0, 860px); justify-content: center; }
.toc ol { list-style: none; margin: 0; padding: 0; position: sticky; top: 80px; border-left: 1px solid var(--border); }
.toc a { display: block; padding: 4px 12px; color: var(--text-2); font-size: 14px; border-left: 2px solid transparent; margin-left: -1px; }
.toc a:hover, .toc a.active { color: var(--gold-2); border-left-color: var(--gold); }
.toc .toc-l3 a { padding-left: 24px; font-size: 13px; }
@media (max-width: 900px) { .article-layout { grid-template-columns: 1fr; } .toc ol { position: static; } }

.prose { font-size: 16px; line-height: 1.75; color: var(--text); min-width: 0; }
.prose h2 { font-family: var(--font-title); font-size: 24px; color: #fff; margin: 1.6em 0 .6em; padding-bottom: .3em; border-bottom: 1px solid var(--border); }
.prose h3 { font-size: 19px; color: var(--gold-2); margin: 1.4em 0 .5em; }
.prose h4 { font-size: 16px; color: #fff; }
.prose p { margin: 0 0 1em; }
.prose img { border-radius: var(--radius-sm); }
.prose img.cover { width: 100%; margin-bottom: 24px; }
.prose blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 3px solid var(--gold); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-2); }
.prose pre { background: #0a0b0e; border: 1px solid var(--border); padding: 14px; border-radius: var(--radius-sm); overflow-x: auto; font-size: 14px; }
.prose code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.prose pre code { background: none; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 14px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.prose th { background: var(--surface-2); color: #fff; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius-sm); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.prose .ql-align-center { text-align: center; } .prose .ql-align-right { text-align: right; }
.skill-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px 1px 2px; border-radius: 4px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--gold-2); font-size: .92em; vertical-align: baseline; white-space: nowrap;
}
.skill-chip img { border-radius: 3px; }
.skill-chip small { color: var(--muted); }
.class-chip { border-bottom: 1px dashed var(--gold); }
.skill-grid { display: flex; flex-wrap: wrap; gap: 6px; margin: 1em 0; }

/* ---------- Race tabs & class tree ---------- */
.race-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.race-tab {
  --rc: var(--gold);
  font: inherit; font-weight: 600; cursor: pointer; padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); transition: .15s;
}
.race-tab:hover { color: #fff; border-color: var(--border-2); }
.race-tab[aria-selected="true"] { color: #fff; border-color: var(--rc); background: color-mix(in srgb, var(--rc) 18%, var(--surface)); }
.race-tabs.small { margin: 0; }
.race-tabs.small .race-tab { padding: 5px 12px; font-size: 13px; }

.race-tree { display: grid; gap: 18px; }
.branch { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.branch-head {
  padding: 10px 16px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  border-bottom: 1px solid var(--border); color: var(--muted); background: var(--bg-2);
}
.branch.fighter .branch-head { color: #e0a15a; }
.branch.mystic .branch-head { color: var(--passive); }
.tree-scroll { overflow-x: auto; padding: 18px 16px; }
.ctree, .cchildren { list-style: none; margin: 0; padding: 0; }
.cnode { display: flex; align-items: center; position: relative; }
.cchildren { display: flex; flex-direction: column; margin-left: 22px; position: relative; }
.cchildren::before { content: ""; position: absolute; left: -22px; top: 50%; width: 22px; border-top: 1px solid var(--border-2); }
.cchildren > .cnode { padding: 4px 0 4px 22px; }
.cchildren > .cnode::before { content: ""; position: absolute; left: 0; top: 50%; width: 22px; border-top: 1px solid var(--border-2); }
.cchildren > .cnode::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1px solid var(--border-2); }
.cchildren > .cnode:first-child::after { top: 50%; }
.cchildren > .cnode:last-child::after { bottom: 50%; }
.cchildren > .cnode:first-child:last-child::after { display: none; }
.cbtn {
  display: flex; align-items: center; gap: 10px; min-width: 190px; padding: 7px 14px 7px 7px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text); white-space: nowrap; transition: .15s; position: relative; z-index: 1;
}
.cbtn:hover { border-color: var(--gold); color: #fff; background: #222734; }
.cbtn.in-chain { border-color: rgba(214,168,78,.45); }
.cbtn.is-active { border-color: var(--gold); background: linear-gradient(180deg, rgba(242,207,124,.22), rgba(214,168,78,.10)); color: #fff; box-shadow: 0 0 0 1px var(--gold), 0 0 18px rgba(214,168,78,.25); }
.tier-0 > .cbtn { font-weight: 700; }
.tier-3 > .cbtn .cname { color: var(--gold-2); }
.cname { font-size: 14px; }
.cicon { width: 32px; height: 32px; border-radius: 6px; flex: none; }
.cicon.mono {
  display: inline-grid; place-items: center; font-family: var(--font-title); font-weight: 700; font-size: 15px;
  background: #2a2f3c; color: var(--gold-2); border: 1px solid var(--border-2);
}
.cicon.mono.mystic { color: var(--passive); }
.tree-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin: 18px 0; }
.tree-box > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; color: var(--text-2); list-style: none; display: flex; align-items: center; gap: 8px; }
.tree-box > summary::before { content: "▸"; color: var(--gold); transition: .15s; }
.tree-box[open] > summary::before { transform: rotate(90deg); }
.tree-box .race-tree { padding: 0 12px 12px; }
.tree-box .branch { background: var(--bg-2); }

/* ---------- Class header ---------- */
.class-head { display: flex; gap: 18px; align-items: flex-start; margin: 26px 0 18px; }
.class-head > .cicon { width: 64px; height: 64px; font-size: 28px; border-radius: 10px; }
.class-head h1 { margin: 0 0 6px; }
.class-head .eyebrow { margin-bottom: 4px; }
.chain { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: 13px; }
.chain li { display: flex; align-items: center; gap: 6px; }
.chain li + li::before { content: "›"; color: var(--muted); }
.chain a { color: var(--text-2); }
.chain a[aria-current] { color: var(--gold-2); font-weight: 600; }
.class-desc { color: var(--text-2); max-width: 760px; }

/* ---------- Skill toolbar ---------- */
.skill-toolbar {
  position: sticky; top: 62px; z-index: 20; display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 10px 0; background: rgba(13,14,18,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); margin-bottom: 8px;
}
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { font: inherit; font-size: 13px; font-weight: 500; padding: 7px 12px; background: var(--surface); border: 0; color: var(--text-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button[aria-pressed="true"] { background: var(--gold-dim); color: var(--gold-2); }
.seg button small { color: inherit; opacity: .65; }
.view-seg { margin-left: auto; }
.filter-input { font: inherit; font-size: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); padding: 7px 12px; min-width: 200px; flex: 1; max-width: 280px; }
.filter-input:focus { outline: none; border-color: var(--gold); }
.switch { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.switch input { accent-color: var(--gold); width: 16px; height: 16px; }
@media (max-width: 720px) { .view-seg { margin-left: 0; } .filter-input { max-width: none; } .skill-toolbar { top: 62px; } }

/* ---------- Skill tables ---------- */
.lvl-group { margin: 18px 0 26px; }
.lvl-title { display: flex; align-items: center; gap: 12px; font-family: var(--font-title); font-size: 17px; color: var(--gold-2); margin-bottom: 10px; }
.lvl-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border-2), transparent); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.skill-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.skill-table th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 9px 12px; background: var(--bg-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.skill-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.skill-table tr:last-child td { border-bottom: 0; }
.skill-table tbody tr:hover { background: rgba(255,255,255,.02); }
.skill-table tr.is-current { background: var(--gold-dim); }
.c-icon { width: 52px; }
.c-num { text-align: right !important; white-space: nowrap; font-variant-numeric: tabular-nums; width: 1%; }
.c-req { width: 22%; }
.sname { font-weight: 600; color: #fff; }
.sname:hover { color: var(--gold-2); }
.sdesc { margin: 4px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sdesc.full, .levels-table .sdesc { -webkit-line-clamp: unset; display: block; }
.kind { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 2px; }
.kind.k-active { color: var(--active); background: rgba(124,197,127,.12); }
.kind.k-passive { color: var(--passive); background: rgba(106,166,224,.12); }
.kind.k-toggle { color: var(--toggle); background: rgba(192,138,224,.12); }
.kind.k-other { color: var(--muted); background: var(--surface-2); }
.from { display: inline-block; font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 0 6px; margin-left: 6px; }
.req-item { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); background: var(--surface-2); border-radius: 4px; padding: 1px 6px; margin: 1px 0; }
.sicon { display: inline-block; position: relative; line-height: 0; border-radius: 5px; padding: 1px; background: linear-gradient(180deg, #4a4f5e, #23262f); }
.sicon img { border-radius: 4px; display: block; }
.sicon.k-passive { background: linear-gradient(180deg, #3f5d80, #1d2838); }
.sicon.k-toggle { background: linear-gradient(180deg, #6a4c80, #2a1f33); }
.sicon.big img { width: 64px; height: 64px; }
[data-skill] { cursor: help; }
a[data-skill] { cursor: pointer; }
.is-hidden { display: none !important; }

/* ---------- Skill cards (list view) ---------- */
.skill-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 10px; margin: 16px 0 40px; }
.scard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.scard[open] { border-color: var(--border-2); }
.scard > summary { display: flex; gap: 12px; align-items: center; padding: 10px 12px; cursor: pointer; list-style: none; }
.scard > summary::-webkit-details-marker { display: none; }
.scard-main { display: flex; flex-direction: column; min-width: 0; }
.scard-main strong { color: #fff; }
.scard-main small .kind { margin-left: 0; margin-right: 4px; }
.scard-body { padding: 0 14px 14px; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 10px; }
.mini-table th, .mini-table td { padding: 4px 8px; border-bottom: 1px solid var(--border); text-align: right; }
.mini-table th:first-child, .mini-table td:first-child { text-align: left; }
.mini-table th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; }
.more { display: inline-block; margin-top: 10px; font-size: 13px; }
@media (max-width: 480px) { .skill-cards { grid-template-columns: 1fr; } }

/* ---------- Skill page ---------- */
.skill-page { padding-block: 24px 50px; }
.skill-head { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.skill-head h1 { margin: 0 0 6px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; align-items: center; }
.skill-tags .kind { margin: 0; font-size: 11px; padding: 3px 8px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 4px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.skill-grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 18px; }
@media (max-width: 860px) { .skill-grid-2 { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.panel-title { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 12px; }
.lvl-picker { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.lvl-picker label { white-space: nowrap; font-size: 14px; color: var(--text-2); }
.lvl-picker output { display: inline-block; min-width: 2ch; color: var(--gold-2); font-weight: 700; }
.lvl-picker input { flex: 1; accent-color: var(--gold); }
#skill-desc { font-size: 15px; color: var(--text); }
.stat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 16px 0 0; }
.stat-list > div { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px; }
.stat-list dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.stat-list dd { margin: 0; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.note { margin-top: 14px; padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--bg-2); color: var(--text-2); font-size: 14px; }
.learners { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.learners li { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.learners a { display: flex; align-items: center; gap: 10px; color: var(--text); }
.learners a:hover { color: var(--gold-2); }
.learners .cicon { width: 26px; height: 26px; font-size: 12px; }

/* ---------- Tooltip ---------- */
.tooltip {
  position: fixed; z-index: 200; width: 340px; max-width: calc(100vw - 20px); pointer-events: none;
  background: rgba(16, 18, 24, .97); border: 1px solid #4b4535; border-radius: 8px; box-shadow: var(--shadow);
  padding: 12px 14px; font-size: 13px; line-height: 1.5;
}
.tooltip .tt-head { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.tooltip .tt-head img { width: 36px; height: 36px; border-radius: 4px; }
.tooltip .tt-name { font-weight: 700; color: #fff; font-size: 14px; }
.tooltip .tt-sub { font-size: 12px; color: var(--muted); }
.tooltip .tt-desc { color: var(--text-2); }
.tooltip .tt-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 12px; }
.tooltip .tt-stats span { color: var(--muted); }
.tooltip .tt-stats b { color: var(--text); font-weight: 600; }

/* ---------- Search ---------- */
.search-big { display: flex; gap: 10px; max-width: 640px; }
.search-big input { flex: 1; font: inherit; background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius-sm); padding: 11px 14px; }
.result-list { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 6px; }
.result-list a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.result-list a:hover { border-color: var(--gold); }
.result-list span { display: flex; flex-direction: column; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 26px; }
.pagination a, .pagination span { padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); color: var(--text-2); font-size: 14px; }
.pagination .current { background: var(--gold-dim); color: var(--gold-2); border-color: var(--gold); }
.pagination .gap { border: 0; }

/* ---------- Error / Footer ---------- */
.error-page { text-align: center; padding: 100px 20px; }
.error-code { font-family: var(--font-title); font-size: 96px; color: var(--gold); margin: 0; line-height: 1; }
.site-footer { border-top: 1px solid var(--border); padding: 26px 0; margin-top: 40px; color: var(--muted); font-size: 14px; background: var(--bg-2); }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-row strong { color: var(--text); }
.footer-row nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-row nav a { color: var(--text-2); }
.edit-link { font-size: .6em; }
