/* DraxionMC public site. House style of the store covers: violet to night-blue gradient with soft glows, gold condensed
   titles, spaced small caps, thin gold corner brackets and dark framed cards. Fonts are self-hosted (SIL OFL):
   Barlow Condensed stands in for Bahnschrift, Inter for text, Cascadia Mono for code. */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/fonts/inter-latin-wght.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 500; font-display: swap; src: url('/assets/fonts/barlow-condensed-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url('/assets/fonts/barlow-condensed-latin-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url('/assets/fonts/barlow-condensed-latin-700.woff2') format('woff2'); }
@font-face { font-family: 'Cascadia Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/assets/fonts/cascadia-mono-latin-400.woff2') format('woff2'); }

:root {
  --bg: #0c0b19;
  --card-top: rgba(23, 18, 48, 0.92);
  --card-bottom: rgba(13, 11, 28, 0.92);
  --card-solid: #141024;
  --line: #2c2547;
  --line-2: #3b2f64;
  --line-gold: rgba(230, 187, 120, 0.33);
  --gold: #e6bb78;
  --gold-soft: #c9a46a;
  --cream: #fbf3e1;
  --white: #f4f1fa;
  --text: #d6d0e6;
  --muted: #a9a2bf;
  --dim: #6d6688;
  --violet: #8b5cf6;
  --violet-l: #b794ff;
  --teal: #2dd4bf;
  --gold-grad: linear-gradient(178deg, #fff1c4 0%, #efd49c 38%, #bf8c4b 67%, #f8d999 100%);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-title: 'Barlow Condensed', 'Bahnschrift', 'Arial Narrow', sans-serif;
  --mono: 'Cascadia Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  --radius: 10px;
  --wrap: 1200px;
  --gutter: 24px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* the cover background, anchored to the page (not the viewport) so it reads the same on any page length: a violet glow
   top left, teal glows on the right, an ember glow at the foot, the diagonal gradient darkening down the page, a fine
   diagonal texture */
body { position: relative; }
body::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1200px 820px at 0% 0%, rgba(122, 60, 255, 0.30), transparent 70%),
    radial-gradient(900px 800px at 100% 700px, rgba(31, 138, 160, 0.16), transparent 70%),
    radial-gradient(1100px 700px at 100% 100%, rgba(31, 138, 160, 0.14), transparent 70%),
    radial-gradient(1000px 420px at 50% 100%, rgba(255, 122, 47, 0.08), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.016) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, rgba(11, 11, 26, 0) 0, rgba(11, 11, 26, 0) 600px, rgba(11, 11, 26, 0.88) 1500px),
    linear-gradient(115deg, #1e0c2c 0%, #121633 42%, #07141f 100%);
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--violet-l); text-decoration: none; }
a:hover { color: var(--cream); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.icon { flex: none; vertical-align: -0.15em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.gold-soft { color: var(--gold-soft); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--gold); color: #1a1208; padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ---- type ---- */
.title { font-family: var(--font-title); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; line-height: 0.95; margin: 0; font-size: clamp(2.1rem, 4.2vw, 3.3rem); }
.title-xl { font-size: clamp(2.6rem, 6vw, 4.4rem); }
.cream { color: var(--cream); }
.gold { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker { margin: 0 0 14px; color: var(--gold); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.26em; text-transform: uppercase; display: flex; align-items: center; gap: 14px; }
.kicker-line::after { content: ''; width: 72px; height: 1px; background: var(--gold); opacity: 0.5; }
.lead { color: var(--text); font-size: 1.08rem; max-width: 60ch; margin: 16px 0 0; }
.mini-head { margin: 0 0 10px; font-size: 0.75rem; font-weight: 700; color: var(--gold); letter-spacing: 0.18em; text-transform: uppercase; display: flex; gap: 8px; align-items: center; }

/* ---- buttons, tags, chips ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 20px; border-radius: 8px; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em; border: 1px solid transparent; transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, background-color 0.15s; cursor: pointer; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: linear-gradient(180deg, #f6dca4, #d9a85f); color: #1b1206; box-shadow: 0 8px 24px -10px rgba(230, 187, 120, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn-gold:hover { color: #1b1206; box-shadow: 0 10px 30px -10px rgba(230, 187, 120, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn-ghost { background: rgba(22, 17, 36, 0.7); color: var(--cream); border-color: var(--line-gold); }
.btn-ghost:hover { border-color: var(--gold); color: var(--cream); }
.btn-violet { background: var(--violet); color: #fff; border-color: var(--violet-l); }
.btn-violet:hover { color: #fff; background: #9a70ff; }
.btn-sm { padding: 8px 14px; font-size: 0.875rem; }
.btn-block { width: 100%; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); background: #1a1433; border: 1px solid rgba(230, 187, 120, 0.45); }
a.tag:hover { color: var(--cream); border-color: var(--gold); }
.tag-violet { color: var(--violet-l); border-color: #4b3a78; }
.tag-teal { color: var(--teal); border-color: rgba(45, 212, 191, 0.4); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { padding: 5px 11px; border-radius: 8px; font-size: 0.8rem; font-weight: 600; color: var(--text); background: #161124; border: 1px solid #4b3a78; }

/* ---- cards ---- */
.card { position: relative; display: block; background: linear-gradient(180deg, var(--card-top), var(--card-bottom)); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); }
a.card { transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
a.card:hover { border-color: rgba(230, 187, 120, 0.55); transform: translateY(-2px); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.9); color: var(--text); }
.empty { padding: 40px; text-align: center; color: var(--muted); }

/* thin gold corner brackets, as on the covers */
.brackets { position: relative; }
.brackets::before {
  content: '';
  position: absolute;
  inset: 18px;
  pointer-events: none;
  --c: rgba(230, 187, 120, 0.6);
  --a: 64px;
  --w: 1.5px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--a) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) top left / var(--w) var(--a) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--a) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) top right / var(--w) var(--a) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--a) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / var(--w) var(--a) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--a) var(--w) no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / var(--w) var(--a) no-repeat;
}

/* ---- header ---- */
.announce { background: linear-gradient(90deg, #2a1650, #172041); border-bottom: 1px solid var(--line-gold); text-align: center; font-size: 0.875rem; padding: 7px 16px; }
.announce a, .announce span { color: var(--cream); }
.preview-bar { background: var(--gold); color: #1b1206; text-align: center; font-weight: 700; padding: 8px 16px; font-size: 0.875rem; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(13, 11, 27, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(230, 187, 120, 0.14); }
.header-row { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--white); }
.brand:hover { color: var(--white); }
.brand img { filter: drop-shadow(0 4px 10px rgba(122, 60, 255, 0.45)); }
.brand-word { font-weight: 700; letter-spacing: 0.22em; font-size: 1.05rem; }
.main-nav { display: flex; gap: 4px; margin-left: 8px; }
.main-nav a { color: var(--muted); font-weight: 600; font-size: 0.92rem; padding: 8px 12px; border-radius: 6px; }
.main-nav a:hover { color: var(--cream); background: rgba(255, 255, 255, 0.04); }
.main-nav a.active { color: var(--gold); }
.header-actions { margin-left: auto; display: flex; gap: 10px; }
.mobile-nav { display: none; margin-left: auto; position: relative; }
.mobile-nav summary { list-style: none; cursor: pointer; color: var(--cream); padding: 8px; border: 1px solid var(--line-2); border-radius: 8px; display: flex; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(280px, calc(100vw - 32px)); background: #120f24; border: 1px solid var(--line-2); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.8); }
.mobile-panel a { color: var(--text); padding: 11px 12px; border-radius: 6px; font-weight: 600; }
.mobile-panel a.active { color: var(--gold); }
.mobile-panel a:hover { background: rgba(255, 255, 255, 0.05); }

/* ---- hero ---- */
.hero { padding: 72px 0 64px; }
.hero::before { inset: 22px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 40px; align-items: center; }
.hero-title { font-family: var(--font-title); font-weight: 700; text-transform: uppercase; font-size: clamp(3.6rem, 10vw, 8.4rem); line-height: 0.88; letter-spacing: 0.015em; margin: 0; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.5)); }
.hero-text { font-size: 1.15rem; color: var(--text); max-width: 54ch; margin: 22px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art img { position: relative; width: min(100%, 300px); filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.6)); }
.hero-glow { position: absolute; inset: 10% 15%; background: radial-gradient(circle, rgba(139, 92, 246, 0.45), transparent 65%); filter: blur(20px); }

/* ---- page head ---- */
.page-head { padding: 56px 0 44px; }
.page-head .title { font-size: clamp(2.6rem, 6vw, 4.2rem); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line-2); background: rgba(22, 17, 36, 0.7); color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.tabs a:hover { color: var(--cream); border-color: var(--line-gold); }
.tabs a.active { color: var(--gold); border-color: rgba(230, 187, 120, 0.6); background: #1a1433; }
.crumbs { margin: 26px 0 0; font-size: 0.875rem; color: var(--muted); display: flex; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--cream); }
.crumbs .sep { margin: 0 9px; color: var(--dim); }

/* ---- sections ---- */
.section { padding: 26px var(--gutter) 34px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--gold); white-space: nowrap; }
.link-more:hover { color: var(--cream); }

/* ---- categories ---- */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cat-card { display: flex; align-items: center; gap: 14px; padding: 18px; }
.cat-icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex: none; border-radius: 10px; background: #1f1838; border: 1px solid var(--line-2); color: var(--gold); }
.cat-card:nth-child(even) .cat-icon { color: var(--violet-l); }
.cat-text { display: flex; flex-direction: column; min-width: 0; }
.cat-name { color: var(--white); font-weight: 700; font-size: 1.05rem; }
.cat-blurb { color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.cat-count { margin-left: auto; font-family: var(--font-title); font-weight: 700; font-size: 2rem; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- product cards ---- */
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.product-card { display: flex; flex-direction: column; overflow: hidden; }
.product-cover { aspect-ratio: 2 / 1; background: #0a0814; border-bottom: 1px solid var(--line); overflow: hidden; }
.product-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.product-card:hover .product-cover img { transform: scale(1.03); }
.cover-fallback { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: radial-gradient(circle at 50% 40%, rgba(139, 92, 246, 0.3), transparent 60%), #120f24; }
.product-cover .cover-fallback img, .product-hero .cover-fallback img, .spotlight-media .cover-fallback img { width: 56px; height: 56px; object-fit: contain; }
.cover-fallback span { font-family: var(--font-title); font-weight: 700; text-transform: uppercase; color: var(--cream); font-size: 1.3rem; letter-spacing: 0.04em; padding: 0 16px; text-align: center; }
.product-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; flex: 1; }
.product-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.product-title { margin: 2px 0 0; color: var(--white); font-size: 1.2rem; font-weight: 800; letter-spacing: 0.01em; }
.product-tagline { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-foot { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.price { font-weight: 800; color: var(--cream); font-size: 1.05rem; }
.price s { font-weight: 500; font-size: 0.85rem; }
.more { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); font-weight: 600; font-size: 0.9rem; }

/* ---- product page ---- */
.product-top { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 28px; padding-top: 20px; padding-bottom: 12px; align-items: start; }
.product-hero { border-radius: var(--radius); overflow: hidden; border: 1.5px solid #4b3d78; background: #05040a; box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.9); aspect-ratio: 2 / 1; }
.product-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 14px; }
.gallery-item { display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line-2); aspect-ratio: 16 / 9; background: #05040a; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.gallery-item:hover { border-color: var(--gold); }
.gallery-item:hover img { transform: scale(1.04); }
.product-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 92px; }
.buy-box { padding: 24px; }
.buy-box::after { content: ''; position: absolute; left: 24px; right: 24px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(230, 187, 120, 0.7), transparent); }
.product-name { font-size: clamp(2.2rem, 4vw, 3.1rem); margin-top: 14px; }
.buy-box .lead { font-size: 1rem; margin-top: 12px; }
.big-price { margin: 18px 0 0; font-family: var(--font-title); font-weight: 700; font-size: 2.4rem; color: var(--cream); line-height: 1; }
.big-price s { font-size: 1.4rem; color: var(--dim); margin-right: 6px; }
.buy-actions { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 10px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.facts div { min-width: 0; }
.facts dt { color: var(--dim); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700; }
.facts dd { margin: 2px 0 0; color: var(--white); font-weight: 600; overflow-wrap: anywhere; }
.compat { margin-top: 18px; }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.check-list li { display: flex; gap: 9px; align-items: flex-start; color: var(--text); font-size: 0.92rem; }
.check-list .icon { color: var(--gold); margin-top: 3px; }
.side-card { padding: 20px 22px; }
.doc-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.doc-links li { display: flex; flex-direction: column; }
.doc-links a { font-weight: 600; padding: 3px 0; }
.prose-card { padding: clamp(20px, 4vw, 44px); }

/* ---- spotlight (first featured product on the home page) ---- */
.spotlight { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); overflow: hidden; }
.spotlight::after { content: ''; position: absolute; left: 32px; right: 32px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(230, 187, 120, 0.7), transparent); }
.spotlight-media { display: block; aspect-ratio: 2 / 1; background: #05040a; border-right: 1px solid var(--line); overflow: hidden; }
.spotlight-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s; }
.spotlight:hover .spotlight-media img { transform: scale(1.02); }
.spotlight-body { padding: clamp(22px, 3vw, 40px); display: flex; flex-direction: column; justify-content: center; }
.spotlight-title { font-size: clamp(2.4rem, 4.6vw, 3.8rem); }
.spotlight-title a:hover { opacity: 0.9; }
.spotlight-price { margin: 18px 0 0; display: flex; align-items: center; gap: 12px; font-family: var(--font-title); font-weight: 700; font-size: 2rem; color: var(--cream); }
.spotlight-price s { color: var(--dim); font-size: 1.3rem; }
.spotlight-price .tag { font-family: var(--font); }
.spotlight .hero-actions { margin-top: 22px; }

/* ---- posts ---- */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-card { padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.post-card h3 { margin: 6px 0 0; color: var(--white); font-size: 1.12rem; }
.post-card p { margin: 0; font-size: 0.92rem; }
.post-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 0.85rem; color: var(--muted); }
.post-cover { margin: 22px 0 6px; border-radius: var(--radius); border: 1px solid var(--line-2); }

/* ---- help strip, support ---- */
.help-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.help-card { display: flex; gap: 14px; align-items: flex-start; padding: 20px; }
.help-card .icon { color: var(--gold); margin-top: 2px; }
.help-card > span { display: flex; flex-direction: column; }
.help-card strong { color: var(--white); }
.support-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.support-card { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.support-card strong { color: var(--white); font-size: 1.08rem; }
.support-card .muted { font-size: 0.92rem; overflow-wrap: anywhere; }

/* ---- docs ---- */
.docs-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.docs-group { padding: 20px 22px; }
.docs-group-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; color: var(--white); }
.docs-thumb { width: 96px; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 6px; border: 1px solid var(--line-2); }
.docs-group-head > span { display: flex; flex-direction: column; }
.docs-product { font-family: var(--font-title); font-weight: 700; text-transform: uppercase; font-size: 1.6rem; letter-spacing: 0.02em; line-height: 1; }
.docs-group .doc-links li { padding: 6px 0; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.guide-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.guide-card { display: flex; gap: 14px; padding: 18px 20px; align-items: flex-start; }
.guide-card .icon { color: var(--gold); margin-top: 3px; }
.guide-card > span { display: flex; flex-direction: column; gap: 4px; }
.guide-card strong { color: var(--white); }
.guide-card .muted { font-size: 0.9rem; }
.doc-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 36px; padding-top: 22px; padding-bottom: 40px; align-items: start; }
.doc-side { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.doc-nav { background: linear-gradient(180deg, var(--card-top), var(--card-bottom)); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.doc-nav summary { cursor: pointer; color: var(--gold); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; }
.doc-nav ul { list-style: none; margin: 10px 0 0; padding: 0; }
.doc-nav li a { display: block; padding: 5px 8px; border-radius: 6px; color: var(--muted); font-size: 0.9rem; line-height: 1.35; }
.doc-nav li a:hover { color: var(--cream); background: rgba(255, 255, 255, 0.04); }
.doc-nav li a.active { color: var(--gold); background: #1a1433; }
.doc-nav li.sub a { padding-left: 20px; font-size: 0.84rem; }
.doc-main { min-width: 0; }
.doc-title { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 6px; }

/* ---- Markdown ---- */
.prose { color: var(--text); font-size: 1rem; line-height: 1.72; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2 { font-family: var(--font-title); font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; color: var(--cream); line-height: 1.05; }
.prose h1 { font-size: 2.2rem; margin: 1.6em 0 0.5em; }
.prose h2 { font-size: 1.85rem; margin: 1.8em 0 0.5em; padding-bottom: 8px; border-bottom: 1px solid rgba(230, 187, 120, 0.22); }
.prose h3 { color: var(--white); font-size: 1.2rem; margin: 1.6em 0 0.4em; }
.prose h4 { color: var(--white); font-size: 1.02rem; margin: 1.4em 0 0.4em; }
.prose p, .prose ul, .prose ol { margin: 0.8em 0; }
.prose li { margin: 0.25em 0; }
.prose li::marker { color: var(--gold-soft); }
.prose strong { color: var(--white); }
.prose a { color: var(--violet-l); text-decoration: underline; text-decoration-color: rgba(183, 148, 255, 0.4); text-underline-offset: 3px; }
.prose a:hover { color: var(--cream); }
.prose img { border-radius: 8px; border: 1px solid var(--line-2); margin: 10px 0; display: block; }
.prose hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(230, 187, 120, 0.6), transparent); margin: 2em 0; }
.prose blockquote { margin: 1.2em 0; padding: 10px 18px; border-left: 3px solid var(--gold); background: rgba(230, 187, 120, 0.06); border-radius: 0 8px 8px 0; color: var(--text); }
.prose code { font-family: var(--mono); font-size: 0.86em; background: #1a1530; border: 1px solid #2f2750; padding: 0.1em 0.38em; border-radius: 5px; color: #e9e4f7; }
.prose pre { background: #0b0915; border: 1px solid var(--line-2); border-radius: 10px; padding: 16px 18px; overflow-x: auto; line-height: 1.55; }
.prose pre code { background: none; border: 0; padding: 0; font-size: 0.85rem; color: #e9e4f7; }
.table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: 10px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.prose th, .prose td { padding: 9px 12px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.06); vertical-align: top; }
.prose th { color: var(--gold); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; background: #151129; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.015); }

/* ---- footer ---- */
.site-footer { margin-top: 48px; border-top: 1px solid rgba(230, 187, 120, 0.18); background: rgba(8, 7, 16, 0.6); padding: 44px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer-brand p { max-width: 34ch; }
.footer-head { margin: 4px 0 12px; color: var(--gold); font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 700; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.footer-links a { color: var(--muted); font-size: 0.92rem; display: inline-flex; gap: 6px; align-items: center; }
.footer-links a:hover { color: var(--cream); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.05); color: var(--dim); font-size: 0.8rem; }
.not-found { padding: 90px 0; }

/* ---- smaller screens ---- */
@media (max-width: 1040px) {
  .main-nav a { padding: 8px 8px; }
  .header-actions .btn-ghost { display: none; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid, .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-top { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  /* one column: cover, then the buy box, then the gallery, so the price and button come early */
  .product-media { display: contents; }
  .product-hero { order: 1; }
  .product-side { order: 2; }
  .gallery { order: 3; margin-top: 0; }
  .spotlight { grid-template-columns: minmax(0, 1fr); }
  .spotlight-media { border-right: 0; border-bottom: 1px solid var(--line); }
  .product-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .main-nav, .header-actions { display: none; }
  .mobile-nav { display: block; }
  .hero { padding: 48px 0 40px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { display: none; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .doc-side { position: static; max-height: none; }
  .doc-toc { display: none; }
  .docs-groups, .guide-list, .help-strip { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .header-row { height: 62px; gap: 12px; }
  .brand-word { font-size: 0.95rem; letter-spacing: 0.18em; }
  .brand img { width: 38px; height: 38px; }
  .brackets::before { inset: 8px; --a: 36px; }
  .cat-grid, .product-grid, .post-grid { grid-template-columns: minmax(0, 1fr); }
  .section-head { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { flex: 1 1 100%; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .page-head { padding: 40px 0 30px; }
  .buy-box { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
