
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin:0; min-height:100vh; text-rendering:optimizeLegibility; -webkit-font-smoothing:antialiased; }
a { color:inherit; }
button,a { -webkit-tap-highlight-color:transparent; }
:focus-visible { outline:3px solid var(--accent); outline-offset:4px; }
.skip-link { position:absolute; left:12px; top:-60px; z-index:60; padding:10px 14px; background:var(--text); color:var(--bg); text-decoration:none; border-radius:3px; }
.skip-link:focus { top:12px; }
.site-header { max-width:1200px; margin:0 auto; padding:22px 28px 14px; display:grid; grid-template-columns:auto 1fr; column-gap:32px; row-gap:10px; align-items:center; position:relative; z-index:20; border-bottom:1px solid var(--line); }
.brand { text-decoration:none; display:flex; flex-direction:column; grid-row:1 / span 2; align-self:center; }
.brand-main { font-family:var(--brand-font); letter-spacing:.12em; font-weight:800; font-size:1rem; }
.dot { color:var(--accent); }
.brand-sub { color:var(--muted); font-size:.78rem; margin-top:3px; letter-spacing:.08em; }
.header-actions { grid-column:2; display:flex; justify-content:flex-end; align-items:center; gap:18px; min-height:34px; }
.site-nav { grid-column:2; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:18px; border-top:1px solid var(--line); padding-top:11px; margin-top:2px; }
.site-nav a, .footer-links a, .theme-toggle { color:var(--muted); font-size:1.03rem; font-weight:650; line-height:1.4; text-decoration:none; }
.site-nav a:hover,.footer-links a:hover,.theme-toggle:hover { color:var(--text); text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:5px; }
.site-nav a[aria-current="page"] { color:var(--text); }
.menu-toggle { display:none; background:var(--surface); color:var(--text); border:1px solid var(--line); padding:8px 13px; font:inherit; font-weight:700; cursor:pointer; text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:5px; }
.theme-picker { position:relative; }
.theme-toggle { appearance:none; border:0; background:transparent; padding:0; cursor:pointer; font:inherit; }
.theme-menu { position:absolute; min-width:190px; right:0; top:calc(100% + 10px); z-index:50; padding:8px; background:var(--surface2); border:1px solid var(--line); box-shadow:0 18px 42px rgba(0,0,0,.32); }
.theme-menu[hidden] { display:none; }
.theme-menu a { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:10px 11px; color:var(--text); text-decoration:none; font-weight:700; }
.theme-menu a::after { content:""; width:7px; height:7px; flex:0 0 7px; border-radius:50%; background:var(--line); }
.theme-menu a:nth-child(1)::after { background:var(--midnight-dot); box-shadow:0 0 8px var(--midnight-dot); }
.theme-menu a:nth-child(2)::after { background:var(--cyber-dot); box-shadow:0 0 8px var(--cyber-dot); }
.theme-menu a:nth-child(3)::after { background:var(--literary-dot); box-shadow:0 0 8px var(--literary-dot); }
.theme-menu a:hover,.theme-menu a[aria-current="page"] { color:var(--accent); background:var(--surface); }
main { position:relative; z-index:1; }
.site-main { max-width:1120px; margin:0 auto; }
.home-page,.page { min-height:72vh; }
.hero,.page { padding:112px 28px 100px; }
.hero { min-height:72vh; display:flex; flex-direction:column; justify-content:center; }
.eyebrow { font-family:var(--mono-font); text-transform:uppercase; letter-spacing:.16em; font-size:.76rem; font-weight:750; color:var(--accent); margin:0 0 18px; }
h1,h2 { line-height:1.11; letter-spacing:-.025em; }
h1 { font-size:clamp(3rem,8vw,6.6rem); margin:0 0 25px; max-width:920px; }
h1 em { font-family:var(--display-soft); font-weight:400; color:var(--muted); }
h2 { font-size:clamp(1.75rem,3vw,2.65rem); }
.hero-copy,.lead { max-width:680px; color:var(--muted); font-size:1.13rem; }
.hero-actions { display:flex; position:relative; z-index:3; gap:12px; margin-top:30px; flex-wrap:wrap; }
.button { display:inline-flex; align-items:center; gap:8px; padding:12px 18px; text-decoration:none; border:1px solid var(--line); font-weight:700; transition:transform .18s,background .18s,color .18s,border-color .18s,box-shadow .18s; }
.button.primary { background:var(--text); color:var(--bg); border-color:var(--text); }
.button.ghost { color:var(--text); }
.button.locked { border-color:var(--accent); }
.button.locked::before { content:"🔒"; font-size:.92em; line-height:1; }
.button.locked::after { content:"🔑"; font-size:.86em; line-height:1; opacity:.8; }
.button:hover { transform:translateY(-2px); }
.section-grid { max-width:1120px; margin:0 auto; padding:0 28px 100px; display:grid; grid-template-columns:repeat(2,1fr); gap:18px; }
.feature-card { padding:38px; position:relative; overflow:hidden; text-decoration:none; min-height:210px; border:1px solid var(--line); transition:transform .18s,background .18s,border-color .18s,box-shadow .18s; }
.feature-card:hover { transform:translateY(-2px); }
.feature-card span { font:.72rem var(--mono-font); color:var(--accent); }
.feature-card h2 { margin:30px 0 8px; }
.feature-card p { margin:0; color:var(--muted); }
.latest { max-width:1120px; margin:auto; padding:70px 28px 110px; border-top:1px solid var(--line); display:flex; justify-content:space-between; gap:40px; align-items:end; }
.latest h2 { margin:0 0 10px; }
.latest p { color:var(--muted); }
.text-link { color:var(--accent); text-decoration:none; white-space:nowrap; font-weight:700; }
.text-link:hover { text-decoration:underline; text-underline-offset:4px; }
.prose { max-width:720px; margin-top:55px; }
.prose h2 { margin-top:55px; }
.prose p,.prose li { color:var(--muted); }
.prose a { color:var(--accent); }
.empty-state { margin-top:55px; border:1px dashed var(--line); padding:45px; color:var(--muted); font-family:var(--mono-font); }
.terminal { max-width:720px; margin-top:55px; padding:28px; background:var(--terminal-bg); border:1px solid var(--line); font:.92rem/1.85 var(--mono-font); color:var(--terminal-text); }
.restricted-door { max-width:720px; margin-top:55px; padding:32px; border:1px solid var(--accent); background:var(--surface); box-shadow:0 0 40px var(--glow); }
.restricted-door .lockline { display:flex; align-items:center; gap:12px; margin:0 0 18px; color:var(--accent); font-family:var(--mono-font); font-size:.9rem; text-transform:uppercase; letter-spacing:.1em; }
.restricted-door p { color:var(--muted); }
.site-footer { max-width:1200px; margin:auto; padding:26px 28px 35px; border-top:1px solid var(--line); display:flex; justify-content:space-between; gap:20px; color:var(--muted); font:.76rem var(--mono-font); position:relative; z-index:20; }
.status-dot { display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--accent); margin-right:8px; box-shadow:0 0 12px var(--accent); }
.footer-links { display:flex; gap:20px; align-items:center; flex-wrap:wrap; }
.theme-picker-bottom .theme-menu { top:auto; bottom:calc(100% + 10px); }
@media (max-width:760px) {
  .site-header { grid-template-columns:minmax(0,1fr) auto; padding:18px 20px 14px; row-gap:10px; }
  .brand { grid-row:1; grid-column:1; min-width:0; }
  .header-actions { grid-column:2; grid-row:1; gap:14px; }
  .menu-toggle { display:block; font-size:1.04rem; }
  .theme-picker-top { position:absolute; left:20px; bottom:-48px; z-index:52; }
  .theme-picker-top .theme-menu { left:0; right:auto; min-width:200px; }
  .site-nav { grid-column:1 / -1; grid-row:2; display:none; justify-content:flex-start; flex-direction:column; gap:9px; padding:13px 4px 4px; margin-top:0; }
  .site-nav.open { display:flex; }
  .site-nav a { font-size:1.08rem; padding:2px 0; }
  .theme-menu { min-width:200px; }
  .hero,.page { padding:92px 20px 70px; }
  .section-grid { grid-template-columns:1fr; padding:0 20px 70px; gap:14px; }
  .latest { padding:55px 20px 80px; display:block; }
  .latest .text-link { display:inline-block; margin-top:20px; }
  .site-footer { margin:0 20px; padding-left:0; padding-right:0; flex-direction:column; }
  .footer-links { row-gap:10px; }
  .theme-picker-bottom { align-self:flex-start; }
  .theme-picker-bottom .theme-menu { left:0; right:auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation-duration:.01ms !important; transition-duration:.01ms !important; }
}

:root { --bg:#010208; --surface:#070a12; --surface2:#0b0e18; --text:#f5f7ff; --muted:#c6ccda; --accent:#b9c6ff; --line:#283144; --glow:rgba(155,171,255,.09); --brand-font:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace; --mono-font:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace; --display-soft:Georgia,"Times New Roman",serif; --terminal-bg:#05070d; --terminal-text:#c4d2ff; --midnight-dot:#b9c6ff; --cyber-dot:#ff57d6; --literary-dot:#8b6aa5; }
body { background:radial-gradient(ellipse at 50% -8%,rgba(118,132,206,.08),transparent 29%),radial-gradient(ellipse at 8% 55%,rgba(72,95,170,.035),transparent 24%),radial-gradient(ellipse at 92% 78%,rgba(112,72,173,.035),transparent 26%),var(--bg); color:var(--text); font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif; font-size:1.05rem; line-height:1.78; }
.site-header { background:rgba(2,3,10,.94); box-shadow:0 16px 50px rgba(0,0,0,.22); }
.brand-main,h1,h2 { font-family:var(--display-soft); }
.brand-main { font-family:var(--brand-font); }
.hero h1 { text-shadow:0 0 30px rgba(135,151,255,.07); }
.hero h1 em { color:#d8dcf5; text-shadow:0 0 22px rgba(139,151,220,.10); }
.button { border-radius:4px; }
.button.ghost { border-color:#30384b; }
.feature-card { background:rgba(5,8,15,.90); border-color:#252e40; box-shadow:inset 0 0 0 1px rgba(180,192,255,.018); }
.feature-card:hover { background:#090d16; border-color:#3a4660; box-shadow:0 15px 35px rgba(0,0,0,.24); }
.latest { background:linear-gradient(180deg,rgba(12,14,25,.20),transparent 58%); }
.restricted-door { background:rgba(7,10,17,.92); }


/* v3 theme-picker corrections */
.theme-menu {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  min-width: 210px;
  max-height: none;
  overflow: visible;
}
.theme-menu a {
  min-height: 44px;
  line-height: 1.35;
  border: 1px solid transparent;
}
.theme-menu a:hover,
.theme-menu a[aria-current="page"] {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.theme-picker-top,
.theme-picker-bottom {
  z-index: 55;
}
@media (max-width:760px) {
  .theme-picker-top .theme-menu,
  .theme-picker-bottom .theme-menu {
    min-width: 210px;
    width: min(240px, calc(100vw - 40px));
  }
}


/* v4 stacking fix: header/footer controls must sit above the page content. */
.site-header, .site-footer {
  isolation: isolate;
  overflow: visible;
}
.site-header { z-index: 100; }
.site-footer { z-index: 100; }
.header-actions { position: relative; z-index: 120; }
.site-nav { position: relative; z-index: 115; }
.theme-picker, .theme-menu { pointer-events: auto; }
.theme-menu { z-index: 250; }
main { z-index: 0; }


.theme-menu {
  padding: 9px;
  width: 220px;
}
.theme-menu a {
  min-height: 46px;
  padding: 11px 12px;
  border-radius: 2px;
}
@media (max-width:760px) {
  .theme-menu { width: min(240px, calc(100vw - 40px)); }
}


/* v5 mobile picker anchor correction */
.header-actions {
  position: static;
  z-index: 120;
}
.theme-picker {
  z-index: 121;
}
@media (max-width:760px) {
  .theme-picker-top {
    left: 20px;
    right: auto;
  }
  .theme-picker-top .theme-menu {
    left: 0;
    right: auto;
  }
}

/* Source architecture layer: Midnight remains deliberately quiet. */
