/* ===================================================
   ai/in practice — main stylesheet
   =================================================== */

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* === Design tokens === */
:root {
  --bg-base:     #09090f;
  --bg-surface:  #0f1018;
  --bg-elevated: #161825;
  --border-dim:  #1d2035;
  --border:      #262a40;
  --border-lit:  #363b58;

  --text-1: #e8eaf2;
  --text-2: #868ea8;
  --text-3: #454d6a;

  --green:  #00d97e;
  --blue:   #4f8ef7;
  --purple: #8b5cf6;
  --cyan:   #22d3ee;
  --orange: #fb923c;
  --red:    #f87171;

  --font-mono: 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', ui-monospace, monospace;
  --font-sans: system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --shadow-card:  0 1px 3px rgba(0,0,0,.5), 0 4px 20px rgba(0,0,0,.35);
  --shadow-hover: 0 4px 12px rgba(0,0,0,.6), 0 10px 40px rgba(0,0,0,.45);

  --ease: 200ms cubic-bezier(.4,0,.2,1);
}

/* === Base === */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-1);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}


a { color: inherit; }

/* === Layout === */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ====================================================
   HEADER / NAV
   ==================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9,9,15,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-dim);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}

.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }

.nav-links a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-2);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--ease), background var(--ease);
}

.nav-links a:hover { color: var(--text-1); background: var(--bg-elevated); }

.nav-links .nav-cta {
  color: var(--green);
  border: 1px solid rgba(0,217,126,.35);
}

.nav-links .nav-cta:hover {
  background: rgba(0,217,126,.08);
  color: var(--green);
}

.theme-toggle,
.print-btn {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #717ca3;
  background: none;
  border: 1px solid #4c5480;
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  cursor: pointer;
  touch-action: manipulation;
  transition: color var(--ease), border-color var(--ease);
  margin-left: 8px;
  white-space: nowrap;
}
.theme-toggle:hover,
.print-btn:hover { color: var(--text-2); border-color: var(--border-lit); }

html.theme-classic .theme-toggle,
html.theme-classic .print-btn { color: var(--text-3); border-color: var(--border); }
html.theme-classic .theme-toggle:hover,
html.theme-classic .print-btn:hover { color: var(--text-2); border-color: var(--border-lit); }
html.theme-classic .site-header { background: rgba(219,204,183,.92); }

.page-meta-bar {
  padding: 5px 0;
}
.page-meta-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
}

.logo-classic { display: none; }
html.theme-classic .logo-modern  { display: none; }
html.theme-classic .logo-classic { display: inline; }

/* ====================================================
   HERO
   ==================================================== */
.hero {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 58px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* ambient glows */
.hero::before {
  content: '';
  position: absolute;
  top: -180px; right: -150px;
  width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(139,92,246,.13) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -100px;
  width: 460px; height: 460px;
  background: radial-gradient(circle, rgba(0,217,126,.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 80px 0;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--green);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero-eyebrow::before { content: '// '; opacity: .5; }

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(30px, 3.8vw, 54px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 24px;
}

.hero-title .acc-green  { color: var(--green); }

/* typing cursor */
#typed-cursor {
  display: inline-block;
  width: 3px;
  height: .9em;
  background: var(--green);
  vertical-align: baseline;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

.hero-desc {
  font-size: 16.5px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 38px;
  max-width: 500px;
}

.hero-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #09090f;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: opacity var(--ease), transform var(--ease);
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }

.btn-ghost {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--ease);
}
.btn-ghost:hover { color: var(--text-1); }
.btn-ghost::before { content: '→ '; }

/* --- Terminal mockup --- */
.hero-visual { position: relative; }

.terminal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-dim);
}

.tbar-dot { width: 11px; height: 11px; border-radius: 50%; }
.tbar-dot.r { background: #ff5f57; }
.tbar-dot.y { background: #febc2e; }
.tbar-dot.g { background: #28c840; }

.tbar-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
  margin-left: 6px;
}

.terminal-body {
  padding: 18px 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.85;
}

.tl { display: block; }
.t-prompt { color: var(--green); }
.t-path   { color: var(--blue); }
.t-dim    { color: var(--text-3); }
.t-str    { color: var(--orange); }
.t-kw     { color: var(--purple); }
.t-err    { color: var(--red); }

.ai-block {
  margin: 10px -20px;
  padding: 12px 20px;
  background: rgba(139,92,246,.07);
  border-left: 2px solid var(--purple);
}

.ai-label {
  font-size: 10.5px;
  color: var(--purple);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}


/* ====================================================
   TOPICS SECTION
   ==================================================== */
.topics-section {
  position: relative;
  z-index: 1;
  padding: 96px 0;
}

.section-header { margin-bottom: 52px; }

.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 14px;
}
.section-tag::before { content: '// '; opacity: .5; }

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(22px, 2.8vw, 38px);
  font-weight: 700;
  letter-spacing: -.025em;
  margin-bottom: 14px;
}

.section-sub {
  font-size: 15.5px;
  color: var(--text-2);
  max-width: 540px;
  line-height: 1.7;
}

/* Topic cards grid */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}

.topic-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius-lg);
  padding: 26px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition:
    border-color var(--ease),
    transform var(--ease),
    box-shadow var(--ease);
}

/* per-card glow on hover via CSS variable */
.topic-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% -10%, var(--card-glow, transparent) 0%, transparent 65%);
  opacity: 0;
  transition: opacity var(--ease);
  pointer-events: none;
}

.topic-card:hover { border-color: var(--border-lit); transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.topic-card:hover::before { opacity: 1; }

.topic-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}


.topic-number {
  position: absolute;
  top: 20px; right: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

.topic-name {
  font-family: var(--font-mono);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-1);
}

.topic-desc {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.65;
  flex: 1;
}

.topic-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  transition: color var(--ease), transform var(--ease);
  display: inline-block;
  align-self: flex-start;
}
.topic-card:hover .topic-link { color: var(--green); transform: translateX(4px); }

.topic-pill {
  position: absolute;
  bottom: 20px; right: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0,217,126,.08);
  color: var(--green);
  border: 1px solid rgba(0,217,126,.18);
}

/* ====================================================
   ABOUT / MANIFESTO
   ==================================================== */
.about-section {
  position: relative;
  z-index: 1;
  padding: 80px 0;
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text h2 {
  font-family: var(--font-mono);
  font-size: clamp(20px, 2.4vw, 32px);
  font-weight: 700;
  letter-spacing: -.025em;
  margin-bottom: 20px;
}

.about-text p {
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: 15px;
}

.about-text p strong { color: var(--text-1); font-weight: 600; }

/* Code block decoration */
.code-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.code-card-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-dim);
}

.code-card-bar span { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); margin-left: 4px; }

.code-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.9;
}

.cl { display: block; }
.c-cm  { color: var(--text-3); }
.c-kw  { color: var(--purple); }
.c-fn  { color: var(--blue); }
.c-str { color: var(--orange); }
.c-var { color: var(--cyan); }
.c-num { color: var(--green); }
.c-txt { color: var(--text-1); }

/* ====================================================
   FOOTER
   ==================================================== */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-dim);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-3);
}

.footer-links { display: flex; gap: 24px; list-style: none; }

.footer-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--ease);
}

.footer-links a:hover { color: var(--text-2); }

.footer-copy { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-3); }

/* ====================================================
   TOPIC PAGE
   ==================================================== */
.topic-hero {
  position: relative;
  z-index: 1;
  padding: 70px 0 60px;
}

.topic-back {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-3);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  transition: color var(--ease);
}
.topic-back:hover { color: var(--green); }
.topic-back::before { content: '← '; }

.topic-page-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--green);
  margin-bottom: 16px;
}
.topic-page-tag::before { content: '// '; opacity: .5; }

.topic-page-title {
  font-family: var(--font-mono);
  font-size: clamp(26px, 4vw, 52px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: 20px;
  max-width: 700px;
}

.topic-page-sub {
  font-size: 17px;
  color: var(--text-2);
  max-width: 620px;
  line-height: 1.75;
}


.tldr-btn {
  display: inline-block;
  margin-top: 20px;
  padding: .4rem 1.1rem;
  border: 1.5px solid var(--green);
  border-radius: 6px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-decoration: none;
  transition: background var(--ease), color var(--ease);
}
.tldr-btn:hover {
  background: var(--green);
  color: var(--bg-base);
}

.to-top-wrap {
  text-align: center;
  padding-top: 1.75rem;
}
.to-top-btn {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-3);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color var(--ease);
}
.to-top-btn::before { content: '↑ '; }
.to-top-btn:hover { color: var(--green); }

.topic-content {
  position: relative;
  z-index: 1;
  padding: 72px 0;
}

.prose {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-2);
}

.prose h2 {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -.02em;
  margin: 48px 0 16px;
}

.prose h3 {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  margin: 32px 0 12px;
}

.prose p { margin-bottom: 18px; }
.prose strong { color: var(--text-1); font-weight: 600; }

.prose code {
  font-family: var(--font-mono);
  font-size: .875em;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--orange);
}

.prose pre {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-1);
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-3);
  cursor: pointer;
  opacity: 0;
  transition: opacity 150ms ease, color 150ms ease, border-color 150ms ease;
}

.prose pre:hover .copy-btn { opacity: 1; }

.copy-btn:hover {
  color: var(--text-1);
  border-color: var(--border-dim);
}

.copy-btn.copied {
  color: var(--green);
  border-color: var(--green);
  opacity: 1;
}

.cl-item--link {
  cursor: pointer;
  border-radius: 3px;
  transition: background 100ms ease;
}
.cl-item--link:hover { background: rgba(255,255,255,.07); }

.prose blockquote {
  border-left: 2px solid var(--green);
  padding: 12px 20px;
  background: rgba(0,217,126,.04);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 24px 0;
  color: var(--text-2);
  font-style: italic;
}

/* ====================================================
   FIGURES / DIAGRAMS
   ==================================================== */
.prose figure {
  margin: 28px 0;
}
.prose figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  cursor: zoom-in;
  transition: opacity 150ms ease;
}
.prose figure:hover img { opacity: .88; }
.prose figcaption {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 8px;
  text-align: center;
  font-style: italic;
}
html.theme-classic .prose figure img {
  filter: invert(1) hue-rotate(180deg) brightness(.90) sepia(.25) contrast(1.2);
}

/* ====================================================
   LIGHTBOX
   ==================================================== */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, .87);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 24px;
  animation: lb-fade-in 160ms ease;
}

@keyframes lb-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-img {
  max-width:  90vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 80px rgba(0, 0, 0, .8);
  pointer-events: none;
}
.lightbox-caption {
  max-width: min(90vw, 860px);
  margin: 14px auto 0;
  font-size: 13px;
  color: rgba(255, 255, 255, .65);
  text-align: center;
  font-style: italic;
  line-height: 1.5;
  pointer-events: none;
}

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 900px) {
  .hero-inner       { display: block; }
  .hero-visual      { max-width: 520px; margin-top: 40px; }
  .hero-desc        { max-width: 100%; }
  .about-inner      { grid-template-columns: 1fr; }
}

/* Hamburger button — hidden on desktop */
.nav-hamburger {
  -webkit-appearance: none;
  appearance: none;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 8px;
  color: var(--text-1);
  margin-right: 6px;
  min-width: 36px;
  min-height: 36px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}
.nav-open .nav-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-open .nav-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 640px) {
  .nav-links        { display: none; }
  .nav-hamburger    { display: flex; }
  .topics-grid      { grid-template-columns: 1fr; }
  .footer-links     { display: none; }
  .hero             { min-height: auto; }
  .hero-inner       { padding: 56px 0; }

  /* When open: nav wraps, links appear below the logo row */
  .nav-open .nav {
    flex-wrap: wrap;
    height: auto;
    padding-bottom: 8px;
  }
  .nav-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    order: 10;
    width: 100%;
    border-top: 1px solid var(--border-dim);
    margin-top: 4px;
    padding: 10px 12px 14px;
    gap: 8px;
  }
  .nav-open .nav-links li {
    display: block;
  }
  .nav-open .nav-links a {
    display: block;
    padding: 12px 16px;
    font-size: 15px;
    border-radius: var(--radius-sm);
  }
}

/* ====================================================
   NAV — SIGN-IN / MEMBER LINKS
   ==================================================== */
.nav-links .nav-signin {
  color: var(--blue);
  border: 1px solid rgba(79,142,247,.35);
}
.nav-links .nav-signin:hover {
  background: rgba(79,142,247,.08);
  color: var(--blue);
}
.nav-links .nav-signout {
  color: var(--blue);
  border: 1px solid rgba(79,142,247,.35);
}
.nav-links .nav-signout:hover {
  background: rgba(79,142,247,.08);
  color: var(--blue);
}

.nav-links .nav-admin {
  color: var(--orange);
  border: 1px solid rgba(251,146,60,.35);
  font-weight: 600;
}
.nav-links .nav-admin:hover {
  background: rgba(251,146,60,.08);
  color: var(--orange);
}

.nav-links .nav-topics {
  color: var(--green);
  border: 1px solid rgba(0,217,126,.35);
  font-weight: 600;
}
.nav-links .nav-topics:hover {
  background: rgba(0,217,126,.08);
  color: var(--green);
}

/* ====================================================
   SIGN-IN PAGE
   ==================================================== */
.signin-section {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 58px);
  display: flex;
  align-items: center;
  padding: 60px 0;
}

.signin-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 52px 44px;
  box-shadow: var(--shadow-card);
}

.signin-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--blue);
  letter-spacing: .1em;
  margin-bottom: 16px;
}

.signin-title {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -.02em;
  margin-bottom: 14px;
}

.signin-sub {
  font-size: 14.5px;
  color: var(--text-2);
  margin-bottom: 40px;
}

.signin-error {
  background: rgba(248,113,113,.10);
  border: 1px solid rgba(248,113,113,.30);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--red);
  margin-bottom: 32px;
}

.signin-form { display: flex; flex-direction: column; gap: 28px; }

.form-group { display: flex; flex-direction: column; gap: 10px; }

.form-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.form-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-1);
  transition: border-color var(--ease), box-shadow var(--ease);
  outline: none;
  width: 100%;
}
.form-input::placeholder { color: var(--text-3); }
.form-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(79,142,247,.12);
}

html.theme-classic .form-input { background: var(--bg-base); }

.signin-submit { margin-top: 12px; justify-content: center; width: 100%; }

.signin-privacy {
  margin-top: 40px;
  padding: 20px 18px;
  background: rgba(79,142,247,.05);
  border: 1px solid rgba(79,142,247,.18);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
}

.signin-privacy-head {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--blue);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.signin-back {
  margin-top: 36px;
  text-align: center;
}

/* ====================================================
   MEMBER BANNER
   ==================================================== */
.member-banner {
  position: relative;
  z-index: 1;
  background: rgba(34,211,238,.06);
  border-bottom: 1px solid rgba(34,211,238,.18);
  padding: 10px 0;
}

.member-banner .container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.member-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cyan);
  letter-spacing: .08em;
}

.member-email {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  flex: 1;
}

.member-signout {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--ease);
}
.member-signout:hover { color: var(--red); }

/* ====================================================
   COMING SOON CARDS
   ==================================================== */
.coming-soon-section { padding-top: 0; }

.topic-card--soon {
  opacity: .6;
  cursor: default;
  pointer-events: none;
}

.topic-tag-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 4px;
  display: block;
}

.topic-pill--soon {
  background: rgba(134,142,168,.12);
  color: var(--text-3);
  border-color: rgba(134,142,168,.2);
}

.topic-pill--member {
  background: rgba(79,142,247,.10);
  color: var(--blue);
  border-color: rgba(79,142,247,.25);
}

/* member-topics section — padding-top: 0 so gap above matches gap above coming-soon-section */
.member-topics-section { padding-top: 0; }

/* sign-in nudge below public topic grid */
.member-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 72px;
  margin-bottom: 48px;
  padding: 22px 28px;
  background: rgba(79,142,247,.05);
  border: 1px solid rgba(79,142,247,.18);
  border-radius: var(--radius-lg);
}

.member-nudge-text {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-2);
}

.sitemap-caption {
  display: flex;
  justify-content: center;
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-2);
  text-align: center;
}
.sitemap-caption > p {
  max-width: 700px;
  margin: 0;
}

/* ====================================================
   DOWNLOADS LIST
   ==================================================== */
.dl-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 760px;
  margin: 0 auto;
}

.dl-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 150ms ease;
}

.dl-row:hover { border-color: var(--border-lit); }

.dl-name {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-1);
  word-break: break-all;
}

.dl-size {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
}

.dl-btn {
  padding: 6px 16px;
  background: rgba(52,211,153,.12);
  border: 1px solid rgba(52,211,153,.3);
  border-radius: var(--radius-sm);
  color: #34d399;
  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease;
}

.dl-btn:hover {
  background: rgba(52,211,153,.22);
  border-color: rgba(52,211,153,.5);
}

/* ====================================================
   PRINT
   ==================================================== */
@media print {
  .site-header,
  .site-footer,
  .nav-hamburger,
  .theme-toggle,
  .print-btn,
  .tldr-btn,
  .copy-btn,
  .lightbox-overlay,
  .to-top-wrap,
  .topic-back { display: none !important; }

  html, body,
  html.theme-classic, html.theme-classic body { background: #fff !important; color: #111 !important; }

  .topic-content { padding: 0 !important; }

  .topic-hero {
    padding: 0 0 18px !important;
    background: #fff !important;
    border-bottom: 1px solid #ccc;
    margin-bottom: 24px;
  }
  .topic-page-tag   { color: #555 !important; }
  .topic-page-title { color: #000 !important; }
  .topic-page-sub   { color: #222 !important; }

  .prose { max-width: 100% !important; color: #111 !important; }
  .prose h2, .prose h3, .prose strong { color: #000 !important; }
  .prose blockquote {
    background: #f5f5f5 !important;
    color: #222 !important;
    border-left: 2px solid #888 !important;
  }
  .prose code {
    background: #f0f0f0 !important;
    color: #b34a00 !important;
    border: 1px solid #ddd !important;
  }
  .prose pre {
    background: #f7f7f7 !important;
    color: #111 !important;
    border: 1px solid #ccc !important;
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    page-break-inside: avoid;
  }

  .c-cm  { color: #6a737d !important; }
  .c-kw  { color: #6f42c1 !important; }
  .c-fn  { color: #005cc5 !important; }
  .c-str { color: #b15c00 !important; }
  .c-var { color: #032f62 !important; }
  .c-num { color: #22863a !important; }
  .c-txt { color: #111 !important; }

  h2, h3 { page-break-after: avoid; }
  pre, blockquote, ul, ol { page-break-inside: avoid; }
}
