:root {
  --bg:            #0e0a1a;
  --bg-soft:       #16102a;
  --bg-card:       #1b1430;
  --bg-elev:       #241a3d;
  --line:          #322445;
  --text:          #efeaf5;
  --text-soft:     #c4bbd6;
  --muted:         #908799;
  --gold:          #f5c518;
  --gold-soft:     #ffd84d;
  --wine:          #4a1d8a;
  --wine-soft:     #7a45c0;
  --green:         #2ea66b;
  --radius:        12px;
  --radius-sm:     8px;
  --maxw:          1040px;
  --shadow:        0 18px 48px rgba(0,0,0,.5);
  --font-display:  "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:     "Instrument Sans", "Segoe UI", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(245,197,24,.10), transparent 60%),
    radial-gradient(900px 500px at -8% 10%, rgba(74,29,138,.24), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: var(--gold); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,10,26,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { display: block; height: 38px; width: auto; }
.header-actions { display: flex; align-items: center; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: .95rem; letter-spacing: .02em;
  padding: 11px 22px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost { color: var(--text); border-color: var(--line); background: transparent; }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-gold {
  color: #1a1407; background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 8px 22px rgba(245,197,24,.30);
}
.btn-gold:hover { color: #1a1407; box-shadow: 0 12px 30px rgba(245,197,24,.46); }
.btn-lg { padding: 15px 34px; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }

.hero {
  position: relative; overflow: hidden;
  border-radius: var(--radius); margin: 26px auto 0;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(10,8,18,.5), rgba(12,9,22,.84)),
    url('https://keppler.co.nz/img/banner.png') center/cover no-repeat,
    linear-gradient(120deg, var(--wine), #2a1645 60%, #120e22);
  padding: 64px 26px;
  text-align: center;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 4px 4px; opacity: .5; pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow {
  font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600; color: var(--gold-soft); margin-bottom: 6px;
}
.hero .headline {
  font-size: clamp(1.15rem, 2.6vw, 1.7rem); font-weight: 700;
  color: var(--text); margin-bottom: 26px;
}

.entry { padding: 8px 0 40px; }
.entry h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.12;
  margin: 34px 0 14px; letter-spacing: -.01em;
}
.entry h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2;
  margin: 48px 0 16px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.entry h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  margin: 30px 0 12px; color: var(--gold-soft);
}
.entry h4 { font-size: 1.08rem; font-weight: 600; margin: 0; }
.entry p { margin: 0 0 18px; color: var(--text-soft); }
.entry ul, .entry ol { margin: 0 0 20px; padding-left: 6px; list-style: none; }
.entry ol { counter-reset: li; }
.entry ul li, .entry ol li {
  position: relative; padding-left: 30px; margin-bottom: 10px; color: var(--text-soft);
}
.entry ul li::before {
  content: "◆"; position: absolute; left: 4px; top: 0;
  color: var(--gold); font-size: .8rem; line-height: 1.9;
}
.entry ol li { counter-increment: li; }
.entry ol li::before {
  content: counter(li); position: absolute; left: 0; top: 2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--wine); color: #fff; font-size: .78rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.entry strong { color: var(--text); }

.byline {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 18px; padding: 10px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.byline img { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); object-fit: cover; }
.byline .by-meta { font-size: .9rem; color: var(--muted); line-height: 1.45; }
.byline .by-meta strong { color: var(--text); font-weight: 600; }

.toc {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px; margin: 26px 0;
}
.toc-head {
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; user-select: none;
}
.toc-head .toc-title {
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--text);
}
.toc-toggle {
  background: none; border: 1px solid var(--line); color: var(--text-soft);
  border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: .85rem;
}
.toc-body { margin-top: 14px; }
.toc-body.collapsed { display: none; }
.toc-body ol { list-style: none; counter-reset: toc; padding-left: 0; margin: 0; }
.toc-body > ol > li { counter-increment: toc; margin-bottom: 6px; }
.toc-body > ol > li > a::before {
  content: counter(toc) ". "; color: var(--gold); font-variant-numeric: tabular-nums;
}
.toc-body a { color: var(--text-soft); }
.toc-body a:hover { color: var(--gold); }
.toc-body ul { list-style: none; padding-left: 22px; margin: 4px 0 8px; }
.toc-body ul li { margin-bottom: 4px; font-size: .94rem; }
.toc-body ul li::before { content: "– "; color: var(--muted); }

.table-wrap { overflow-x: auto; margin: 22px 0; border-radius: var(--radius); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 460px; background: var(--bg-card); }
thead th {
  background: linear-gradient(135deg, var(--wine), #2c1356);
  color: #fff; text-align: left; font-weight: 600; padding: 14px 16px; font-size: .95rem;
}
tbody td { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--text-soft); font-size: .96rem; }
tbody tr:nth-child(odd) td { background: rgba(255,255,255,.012); }
tbody td:first-child { color: var(--text); font-weight: 500; }

.cta-row { display: flex; justify-content: center; padding: 26px 0; }

.figure { margin: 26px 0; }
.figure a { display: block; }
.figure img {
  width: 100%; height: auto; border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.figure-placeholder {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 220px; border: 1px dashed var(--gold); border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, rgba(245,197,24,.05) 0 12px, transparent 12px 24px),
    var(--bg-soft);
  color: var(--muted); font-size: .9rem; padding: 24px; letter-spacing: .02em;
}
.figure-placeholder span { color: var(--gold-soft); font-weight: 600; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; } }

.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin: 6px 0 10px; }
@media (max-width: 700px) { .proscons { grid-template-columns: 1fr; } }
.proscons .card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 22px 18px; }
.proscons .pros { border-top: 3px solid var(--green); }
.proscons .cons { border-top: 3px solid var(--wine-soft); }
.proscons ul li::before { content: "✓"; color: var(--green); }
.proscons .cons ul li::before { content: "✕"; color: var(--wine-soft); }

.faq { margin: 20px 0; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--bg-card); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  color: var(--text); font-family: var(--font-body); font-size: 1.05rem; font-weight: 600;
  padding: 16px 50px 16px 18px; position: relative;
}
.faq-q::after {
  content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: var(--gold); font-size: 1.4rem; transition: transform .2s ease;
}
.faq-item.open .faq-q::after { content: "–"; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a-inner { padding: 0 18px 16px; color: var(--text-soft); }

.author-box {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; margin: 30px 0;
}
.author-box img { flex: none; width: 84px; height: 84px; border-radius: 50%; border: 1px solid var(--line); object-fit: cover; }
.author-box .author-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--text); margin-bottom: 2px; }
.author-box .author-role { color: var(--gold-soft); font-size: .9rem; margin-bottom: 8px; }
.author-box p { font-size: .92rem; margin: 0; color: var(--text-soft); }

.rg-note {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg-soft); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm); padding: 16px 18px; margin: 24px 0; font-size: .92rem; color: var(--text-soft);
}
.badge18 {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: var(--wine); color: #fff; font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; justify-content: center; border: 1px solid var(--wine-soft);
}

.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); margin-top: 30px; padding: 40px 0 26px; }
.footer-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.footer-logo img { height: 40px; opacity: .9; }
.footer-legal { max-width: 760px; margin: 0 auto 18px; text-align: center; color: var(--muted); font-size: .82rem; line-height: 1.6; }
.footer-rg { text-align: center; color: var(--text-soft); font-size: .88rem; margin-bottom: 16px; }
.footer-rg a { color: var(--gold-soft); }
.footer-copy { text-align: center; color: var(--muted); font-size: .82rem; padding-top: 16px; border-top: 1px solid var(--line); }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--gold);
  background: var(--bg-elev); color: var(--gold); cursor: pointer; font-size: 1.2rem;
  display: none; align-items: center; justify-content: center; box-shadow: var(--shadow);
}
.to-top.show { display: flex; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .btn-ghost { display: none; }
  .hero { padding: 44px 18px; }
}
