:root {
  --ink: #10243a;
  --ink-2: #17304c;
  --ink-3: #26395e;
  --gold: #e8b44a;
  --gold-2: #ffd166;
  --blue: #3a86ff;
  --green: #2a9d8f;
  --red: #d1495b;
  --paper: #f4f8fc;
  --card: #ffffff;
  --text: #16283d;
  --muted: #5b6e84;
  --line: #d9e3ee;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(16, 36, 58, 0.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif; color: var(--text); background: var(--paper); line-height: 1.6; }
a { color: var(--blue); }
img { max-width: 100%; display: block; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 28px; border-radius: 14px; border: 3px solid var(--ink); font: 800 18px/1 'Segoe UI', Arial, sans-serif; text-decoration: none; color: #fff; cursor: pointer; box-shadow: 0 5px 0 rgba(16, 36, 58, 0.55); transition: transform 0.08s, box-shadow 0.08s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(16, 36, 58, 0.55); }
.btn-play { background: linear-gradient(#34c3b0, #1f8a7d); }
.btn-site { background: linear-gradient(#5b9bff, #2c63c9); }
.btn-gold { background: linear-gradient(#ffd166, #e09a1f); color: var(--ink); }
.btn-small { white-space: nowrap; padding: 10px 18px; font-size: 15px; border-width: 2px; box-shadow: 0 3px 0 rgba(16, 36, 58, 0.5); }

/* ---------- start screen ---------- */
.start { min-height: 100vh; display: flex; flex-direction: column; color: #fff; background: radial-gradient(1200px 600px at 70% 10%, #2a4a78 0%, rgba(16, 36, 58, 0) 60%), linear-gradient(160deg, #0b1830 0%, #14304f 55%, #1d4a6e 100%); position: relative; overflow: hidden; }
.start::before { content: ''; position: absolute; inset: 0; background: url('assets/banner.png') 72% 30% / auto 150% no-repeat; opacity: 0.4; -webkit-mask-image: linear-gradient(to left, #000 0%, #000 35%, transparent 85%); mask-image: linear-gradient(to left, #000 0%, #000 35%, transparent 85%); }
.start::after { content: ''; position: absolute; inset: 0; background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.04) 0 26px, transparent 26px 56px); }
.start > * { position: relative; z-index: 1; }
.start-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.start-logo { width: 112px; height: 112px; border-radius: 50%; border: 5px solid var(--gold); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45); margin-bottom: 22px; }
.start h1 { margin: 0; font: 900 clamp(46px, 9vw, 104px)/1 'Segoe UI', Arial, sans-serif; letter-spacing: 2px; text-shadow: 0 5px 0 var(--ink), 0 10px 30px rgba(0, 0, 0, 0.5); }
.start h1 span { color: var(--gold-2); }
.start .tag { margin: 14px 0 6px; font-size: clamp(18px, 2.6vw, 26px); font-weight: 700; color: var(--gold-2); }
.start .lead { max-width: 640px; margin: 0 auto 34px; font-size: clamp(15px, 2vw, 18px); opacity: 0.92; }
.start-actions { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.start-actions .btn { min-width: 260px; font-size: 21px; padding: 18px 30px; }
.start-hint { margin-top: 18px; font-size: 14px; opacity: 0.75; }
.start-foot { padding: 18px 20px 26px; text-align: center; font-size: 13px; opacity: 0.7; }
.start-foot a { color: #fff; }

/* ---------- playbook ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff; border-bottom: 3px solid var(--gold); }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 10px 18px; display: flex; align-items: center; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 900 20px/1 'Segoe UI', Arial, sans-serif; letter-spacing: 0.5px; }
.brand img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--gold); }
.brand small { display: block; font: 700 11px/1.2 'Segoe UI', Arial, sans-serif; color: var(--gold-2); letter-spacing: 1.5px; text-transform: uppercase; }
.topbar .grow { flex: 1; }
.topbar a.link { color: #cfe1f5; text-decoration: none; font-weight: 700; font-size: 14px; }
.topbar a.link:hover { color: #fff; }

.layout { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 270px 1fr; gap: 28px; padding: 26px 18px 60px; align-items: start; }
.side { position: sticky; top: 76px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.side h2 { margin: 6px 10px 10px; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
.side a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; }
.side a .n { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--muted); }
.side a:hover { background: #eef4fb; }
.side a[aria-current='page'] { background: var(--ink); color: #fff; }
.side a[aria-current='page'] .n { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.side .play { margin-top: 12px; display: flex; }
.side .play .btn { width: 100%; }

.content, .side { min-width: 0; }
body { overflow-x: hidden; }
.chapter { display: none; }
.chapter.on { display: block; animation: fade 0.2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.chapter-head { background: linear-gradient(135deg, var(--ink) 0%, var(--ink-3) 100%); color: #fff; border-radius: var(--radius); padding: 26px 28px; margin-bottom: 22px; box-shadow: var(--shadow); }
.chapter-head .kicker { color: var(--gold-2); font: 800 12px/1 'Segoe UI', Arial, sans-serif; letter-spacing: 2px; text-transform: uppercase; }
.chapter-head h1 { margin: 8px 0 6px; font-size: clamp(26px, 4vw, 38px); line-height: 1.15; }
.chapter-head p { margin: 0; color: #cfe1f5; max-width: 720px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.chips a { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 700; text-decoration: none; }
.chips a:hover { border-color: var(--blue); color: var(--blue); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px; box-shadow: 0 2px 10px rgba(16, 36, 58, 0.05); }
.card h2 { margin: 0 0 8px; font-size: 22px; scroll-margin-top: 150px; }
.card h3 { margin: 18px 0 6px; font-size: 16px; }
.card p { margin: 8px 0; }
.card ul, .card ol { padding-left: 22px; margin: 8px 0; }
.card li { margin: 4px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.tile b { display: block; margin-bottom: 4px; }
.note, .tip, .warn { border-radius: 12px; padding: 12px 16px; margin: 14px 0; font-size: 15px; border-left: 5px solid; }
.note { background: #eaf3ff; border-color: var(--blue); }
.tip { background: #e8f7f2; border-color: var(--green); }
.warn { background: #fff3e0; border-color: #f0a830; }
.note b, .tip b, .warn b { margin-right: 4px; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 10px 14px 10px 54px; margin: 8px 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.steps li::before { content: counter(s); position: absolute; left: 12px; top: 9px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--gold-2); display: grid; place-items: center; font-weight: 800; }
.table-wrap { overflow-x: auto; margin: 10px 0; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; background: #fff; }
th { background: var(--ink); color: #fff; text-align: left; padding: 10px 12px; font-size: 13px; letter-spacing: 0.4px; white-space: nowrap; }
td { padding: 9px 12px; border-top: 1px solid var(--line); vertical-align: top; }
tr:nth-child(even) td { background: #f8fbfe; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--ink); color: var(--gold-2); font-size: 12px; font-weight: 800; white-space: nowrap; }
.pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.pager a { flex: 1 1 220px; display: block; padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); font-weight: 700; }
.pager a small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.pager a:hover { border-color: var(--blue); }
.pager a.next { text-align: right; }
.cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: space-between; background: linear-gradient(135deg, #123a52, #1f6a63); color: #fff; border-radius: var(--radius); padding: 20px 24px; margin-top: 22px; }
.cta b { font-size: 19px; }
.cta p { margin: 4px 0 0; opacity: 0.9; }
footer { text-align: center; color: var(--muted); font-size: 13px; padding: 10px 18px 40px; }

@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; gap: 16px; padding-top: 14px; }
  .side { position: sticky; top: 62px; z-index: 20; padding: 8px; }
  .side h2, .side .play { display: none; }
  .side nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .side nav::-webkit-scrollbar { display: none; }
  .side a { flex: none; padding: 8px 12px; background: var(--paper); border: 1px solid var(--line); }
  .side a .n { display: none; }
  .topbar a.link { display: none; }
  .topbar-in { padding: 8px 12px; gap: 8px; }
  .brand { font-size: 17px; }
  .brand small { display: none; }
  .brand img { width: 32px; height: 32px; }
  .btn-small { padding: 9px 14px; white-space: nowrap; }
  .side { top: 54px; }
}

/* ---------- the style switch ---------- */
.switch { display: inline-flex; border: 2px solid rgba(255, 255, 255, 0.35); border-radius: 999px; overflow: hidden; background: rgba(0, 0, 0, 0.25); }
.switch button { appearance: none; border: 0; background: transparent; color: #cfe1f5; font: 700 12px/1 'Segoe UI', Arial, sans-serif; padding: 8px 12px; cursor: pointer; white-space: nowrap; }
.switch button[aria-pressed='true'] { background: var(--gold-2); color: var(--ink); }
.start-tools { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* ---------- the Lex style (like lexthehusky.com) ---------- */
html[data-theme='lex'] {
  --ink: #0b1622;
  --ink-2: #10202e;
  --ink-3: #162b3f;
  --gold: #4c8fbd;
  --gold-2: #7fb6dc;
  --blue: #4c8fbd;
  --green: #4c8fbd;
  --paper: #0b1622;
  --card: rgba(244, 247, 249, 0.05);
  --text: #f4f7f9;
  --muted: rgba(244, 247, 249, 0.72);
  --line: rgba(244, 247, 249, 0.12);
  --radius: 20px;
  --shadow: none;
}
html[data-theme='lex'] body { font-family: 'Public Sans', 'Segoe UI', system-ui, sans-serif; background: #0b1622; color: #f4f7f9; }
html[data-theme='lex'] h1, html[data-theme='lex'] h2, html[data-theme='lex'] h3, html[data-theme='lex'] .brand, html[data-theme='lex'] .kicker { font-family: 'Space Grotesk', 'Segoe UI', sans-serif; font-weight: 600; letter-spacing: 0; }
html[data-theme='lex'] .btn { border: 0; border-radius: 999px; box-shadow: none; font-family: 'Public Sans', 'Segoe UI', sans-serif; font-weight: 600; padding: 12px 24px; font-size: 16px; }
html[data-theme='lex'] .btn:hover { transform: none; filter: brightness(1.08); }
html[data-theme='lex'] .btn:active { transform: none; }
html[data-theme='lex'] .btn-play, html[data-theme='lex'] .btn-gold { background: #4c8fbd; color: #0b1622; }
html[data-theme='lex'] .btn-site { background: transparent; color: #f4f7f9; border: 1px solid rgba(244, 247, 249, 0.5); }
html[data-theme='lex'] .btn-small { padding: 9px 18px; font-size: 14px; }
html[data-theme='lex'] .switch { border-color: rgba(244, 247, 249, 0.3); }
html[data-theme='lex'] .switch button { font-family: 'Public Sans', sans-serif; color: rgba(244, 247, 249, 0.8); }
html[data-theme='lex'] .switch button[aria-pressed='true'] { background: #4c8fbd; color: #0b1622; }

html[data-theme='lex'] .start { background: radial-gradient(900px 500px at 50% 0%, #1b3a56 0%, rgba(11, 22, 34, 0) 70%), #0b1622; }
html[data-theme='lex'] .start::before { opacity: 0.16; }
html[data-theme='lex'] .start::after { background: none; }
html[data-theme='lex'] .start h1 { text-shadow: none; font-size: clamp(42px, 8vw, 92px); }
html[data-theme='lex'] .start h1 span { color: #7fb6dc; }
html[data-theme='lex'] .start-logo { border: 2px solid rgba(244, 247, 249, 0.3); box-shadow: none; }

html[data-theme='lex'] .topbar { background: rgba(16, 32, 46, 0.85); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(244, 247, 249, 0.12); }
html[data-theme='lex'] .brand img { border: 1px solid rgba(244, 247, 249, 0.3); }
html[data-theme='lex'] .brand small { color: #7fb6dc; }
html[data-theme='lex'] .topbar a.link { color: rgba(244, 247, 249, 0.8); }

html[data-theme='lex'] .side { background: rgba(244, 247, 249, 0.05); border-color: rgba(244, 247, 249, 0.12); }
html[data-theme='lex'] .side a { color: #f4f7f9; }
html[data-theme='lex'] .side a .n { background: rgba(244, 247, 249, 0.06); border-color: rgba(244, 247, 249, 0.15); color: rgba(244, 247, 249, 0.7); }
html[data-theme='lex'] .side a:hover { background: rgba(244, 247, 249, 0.08); }
html[data-theme='lex'] .side a[aria-current='page'] { background: #4c8fbd; color: #0b1622; }
html[data-theme='lex'] .side a[aria-current='page'] .n { background: #0b1622; border-color: #0b1622; color: #7fb6dc; }

html[data-theme='lex'] .chapter-head { background: linear-gradient(135deg, #12283b 0%, #0f1f2f 100%); border: 1px solid rgba(244, 247, 249, 0.12); }
html[data-theme='lex'] .chapter-head .kicker { color: #7fb6dc; }
html[data-theme='lex'] .chapter-head p { color: rgba(244, 247, 249, 0.78); }
html[data-theme='lex'] .chips a { background: rgba(244, 247, 249, 0.05); border-color: rgba(244, 247, 249, 0.15); color: #f4f7f9; }
html[data-theme='lex'] .chips a:hover { border-color: #4c8fbd; color: #7fb6dc; }
html[data-theme='lex'] .card { background: rgba(244, 247, 249, 0.05); border-color: rgba(244, 247, 249, 0.12); box-shadow: none; }
html[data-theme='lex'] .tile { background: rgba(244, 247, 249, 0.05); border-color: rgba(244, 247, 249, 0.12); }
html[data-theme='lex'] .note { background: rgba(76, 143, 189, 0.14); border-color: #4c8fbd; }
html[data-theme='lex'] .tip { background: rgba(76, 189, 160, 0.12); border-color: #4cbda0; }
html[data-theme='lex'] .warn { background: rgba(240, 168, 48, 0.12); border-color: #f0a830; }
html[data-theme='lex'] .steps li { background: rgba(244, 247, 249, 0.05); border-color: rgba(244, 247, 249, 0.12); }
html[data-theme='lex'] .steps li::before { background: #4c8fbd; color: #0b1622; }
html[data-theme='lex'] .table-wrap { border-color: rgba(244, 247, 249, 0.12); }
html[data-theme='lex'] table { background: transparent; }
html[data-theme='lex'] th { background: #162b3f; color: #f4f7f9; }
html[data-theme='lex'] td { border-top-color: rgba(244, 247, 249, 0.1); }
html[data-theme='lex'] tr:nth-child(even) td { background: rgba(244, 247, 249, 0.03); }
html[data-theme='lex'] .pill { background: rgba(76, 143, 189, 0.22); color: #9ccbea; }
html[data-theme='lex'] .pager a { background: rgba(244, 247, 249, 0.05); border-color: rgba(244, 247, 249, 0.12); color: #f4f7f9; }
html[data-theme='lex'] .pager a:hover { border-color: #4c8fbd; }
html[data-theme='lex'] .cta { background: linear-gradient(135deg, #12283b, #14405a); border: 1px solid rgba(244, 247, 249, 0.12); }
html[data-theme='lex'] a { color: #7fb6dc; }
html[data-theme='lex'] footer { color: rgba(244, 247, 249, 0.6); }
html[data-theme='lex'] figure.shot img { border-color: rgba(244, 247, 249, 0.18); }
html[data-theme='lex'] figure.shot figcaption { color: rgba(244, 247, 249, 0.7); }

@media (max-width: 880px) { .topbar .switch button { padding: 7px 9px; font-size: 11px; } .topbar .btn-small { padding: 8px 11px; font-size: 13px; } }
@media (max-width: 520px) { .brand span { display: none; } }

.switch .s { display: none; }
@media (max-width: 520px) { .switch .l { display: none; } .switch .s { display: inline; } }

/* ---------- screenshots ---------- */
figure.shot { float: right; width: 230px; margin: 0 0 14px 24px; }
figure.shot img { width: 100%; height: auto; border-radius: 16px; border: 3px solid var(--line); box-shadow: 0 8px 22px rgba(16, 36, 58, 0.18); background: #10243a; }
figure.shot figcaption { margin-top: 8px; font-size: 12.5px; line-height: 1.4; color: var(--muted); text-align: center; }
.card::after { content: ''; display: block; clear: both; }
.card h2, .card h3 { clear: none; }
.table-wrap, .grid { clear: none; }
@media (max-width: 720px) { figure.shot { float: none; width: min(260px, 100%); margin: 10px auto 16px; } }

/* ---------- language picker ---------- */
.lang select { appearance: none; border: 2px solid rgba(255, 255, 255, 0.35); background: rgba(0, 0, 0, 0.25) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23cfe1f5'/%3E%3C/svg%3E") no-repeat right 10px center; color: #cfe1f5; font: 700 12px/1 'Segoe UI', Arial, sans-serif; padding: 8px 28px 8px 12px; border-radius: 999px; cursor: pointer; }
.lang select option { color: #10243a; background: #fff; }
html[data-theme='lex'] .lang select { border-color: rgba(244, 247, 249, 0.3); font-family: 'Public Sans', sans-serif; color: rgba(244, 247, 249, 0.85); }
@media (max-width: 520px) { .lang select { padding: 7px 24px 7px 9px; font-size: 11px; } }

/* ---------- numbers: details, small print, dim cells ---------- */
details.more { border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; background: rgba(255, 255, 255, 0.5); }
details.more > summary { cursor: pointer; padding: 11px 14px; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '\25B8'; color: var(--blue); transition: transform 0.15s; }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more > :not(summary) { margin-left: 14px; margin-right: 14px; }
details.more > :last-child { margin-bottom: 14px; }
.small { font-size: 13px; color: var(--muted); }
td.dim { color: var(--muted); opacity: 0.55; }
td.num, th.num { text-align: right; }
.table-wrap table.nums td, .table-wrap table.nums th { white-space: nowrap; }
.stats-note { margin: 10px 0 0; }
html[data-theme='lex'] details.more { background: rgba(244, 247, 249, 0.04); border-color: rgba(244, 247, 249, 0.15); }
html[data-theme='lex'] details.more > summary::before { color: #7fb6dc; }
.shots { display: flex; gap: 14px; flex-wrap: wrap; margin: 14px 0; clear: both; }
.shots figure.shot { float: none; width: 200px; margin: 0; }

/* ---------- contact link for billboards ---------- */
.billboard-link { display: inline-block; margin-bottom: 8px; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; color: #fff; font-weight: 700; font-size: 13px; text-decoration: none; }
.billboard-link:hover { background: rgba(255, 255, 255, 0.12); }

/* the HuskyWorld logo (a rounded square, the app icon) and the Lex The Husky token (a circle) */
.brand img.hw-logo { border-radius: 10px; border: 2px solid var(--gold); }
.token-link { display: inline-flex; }
.token-link img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--gold); }
.logos { display: flex; justify-content: center; align-items: center; gap: 22px; margin: 34px 0 6px; }
.logos img { width: 84px; height: 84px; }
.logos img.hw-logo { border-radius: 20px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
.logos img.token { border-radius: 50%; border: 4px solid var(--gold); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }
html[data-theme='lex'] .token-link img { border: 1px solid rgba(244, 247, 249, 0.3); }
@media (max-width: 700px) { .token-link { display: none; } }
