:root {
  --ink: #080b10;
  --ink-soft: #10141b;
  --paper: #f1f0ea;
  --paper-deep: #e4e3dc;
  --lime: #c8ff3d;
  --lime-dark: #486300;
  --coral: #ff5c4d;
  --muted: #a5a79f;
  --line: rgba(241, 240, 234, .17);
  --dark-line: rgba(8, 11, 16, .16);
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
body { margin: 0; overflow-x: hidden; background: var(--paper); color: var(--ink); font-family: Manrope, system-ui, sans-serif; line-height: 1.65; }
a { color: inherit; }
::selection { background: var(--lime); color: var(--ink); }

/* Header */
.header { height: 76px; position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid var(--line); background: rgba(8, 11, 16, .97); box-shadow: none; backdrop-filter: blur(16px); }
.header.scrolled { box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.nav { width: 100%; max-width: none; height: 76px; margin: 0; padding: 0 clamp(20px, 4vw, 72px); display: flex; align-items: center; justify-content: space-between; }
.logo { display: inline-flex; align-items: center; gap: 14px; color: var(--paper); font: 500 11px DM Mono, monospace; letter-spacing: .11em; text-decoration: none; }
.logo-mark { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 auto; background: var(--lime); color: var(--ink); font: 700 13px Manrope, sans-serif; letter-spacing: 0; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.portal-link { padding: 10px 13px; border: 1px solid var(--line); color: var(--paper); font: 500 10px DM Mono, monospace; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.portal-link:hover { border-color: var(--lime); color: var(--lime); }
.menu-toggle { width: 40px; height: 40px; padding: 0; display: grid !important; place-items: center; border: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--paper); cursor: pointer; }
.menu-toggle:hover, .menu-toggle:focus-visible { border-color: var(--lime); color: var(--lime); outline: 0; }
.nav-menu { width: min(420px, 100%); height: calc(100svh - 76px); padding: 24px !important; position: fixed !important; top: 76px !important; right: 0 !important; left: auto !important; z-index: 1002; display: none !important; flex-direction: column !important; gap: 0 !important; overflow-y: auto !important; border-left: 1px solid var(--line); background: var(--ink) !important; box-shadow: -18px 0 50px rgba(0, 0, 0, .28) !important; transform: none !important; }
.nav-menu.open { display: flex !important; }
.nav-item { width: 100%; border-bottom: 1px solid var(--line); }
.nav-item a { display: flex; align-items: center; justify-content: space-between; padding: 15px 4px; border-radius: 0; color: #c8cac4; font: 500 12px DM Mono, monospace; text-decoration: none; }
.nav-item a::after { content: "→"; color: var(--lime); }
.nav-item a:hover, .nav-item a:focus-visible { background: transparent; color: var(--lime); }
.overlay { position: fixed; inset: 76px 0 0; z-index: 1001; background: rgba(8, 11, 16, .72); }

/* Hero */
.hero { min-height: 650px; padding: clamp(100px, 12vw, 155px) clamp(24px, 7vw, 110px) 80px; position: relative; display: flex; align-items: flex-end; overflow: hidden; background: var(--ink); color: var(--paper); text-align: left; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 0; opacity: .34; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 6.25vw 6.25vw; }
.hero::after { content: "AI"; position: absolute; right: clamp(15px, 5vw, 72px); bottom: -28px; color: rgba(241, 240, 234, .045); font-size: clamp(220px, 34vw, 510px); font-weight: 800; line-height: .72; letter-spacing: -.1em; }
.hero-content { width: min(100%, var(--max)); max-width: var(--max); margin: 0 auto; position: relative; z-index: 1; }
.hero-kicker { margin: 0 0 26px !important; display: flex; align-items: center; gap: 12px; color: var(--lime) !important; font: 500 11px DM Mono, monospace !important; letter-spacing: .11em; text-transform: uppercase; }
.hero-kicker span { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 6px rgba(255, 92, 77, .13); }
.hero h1 { max-width: 1050px; margin: 0; color: var(--paper); font-size: clamp(58px, 8vw, 116px); font-weight: 700; line-height: .9; letter-spacing: -.06em; }
.hero h1 em { color: var(--lime); font-style: normal; }
.hero-content > p:not(.hero-kicker) { max-width: 720px; margin: 38px 0 0; color: #c2c4bd; font-size: clamp(16px, 1.5vw, 21px); line-height: 1.6; }
.cta-button { min-height: 52px; margin-top: 34px; padding: 0 18px; display: inline-flex; align-items: center; gap: 30px; border: 1px solid var(--lime); border-radius: 0; background: var(--lime); color: var(--ink); box-shadow: none; font: 800 13px Manrope, sans-serif; text-decoration: none; }
.cta-button:hover { background: var(--paper); border-color: var(--paper); box-shadow: none; transform: none; }

/* Content */
.main { max-width: none; margin: 0; padding: 0 clamp(24px, 7vw, 110px); background: var(--paper); counter-reset: guide-section; }
.section { width: min(100%, var(--max)); margin: 0 auto !important; padding: clamp(76px, 9vw, 120px) 0; position: relative; border: 0; border-bottom: 1px solid var(--dark-line); border-radius: 0; background: transparent; box-shadow: none; animation: none; counter-increment: guide-section; }
.section:hover { box-shadow: none; }
.section::before { content: counter(guide-section, decimal-leading-zero); display: block; margin-bottom: 18px; color: var(--lime-dark); font: 500 10px DM Mono, monospace; letter-spacing: .12em; }
.section .section { width: 100%; margin-top: 60px !important; padding: 55px 0 0; border-top: 1px solid var(--dark-line); border-bottom: 0; }
.section h2 { max-width: 1050px; margin: 0 0 38px; display: flex; align-items: flex-start; gap: 18px; color: var(--ink); font-size: clamp(38px, 5vw, 68px); font-weight: 700; line-height: 1; letter-spacing: -.05em; }
.section h2 i { width: 42px; height: 42px; margin-top: 4px; display: grid; place-items: center; flex: 0 0 auto; background: var(--ink); color: var(--lime); font-size: 16px; }
.section h3 { margin: 52px 0 18px; display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: clamp(22px, 2.4vw, 31px); font-weight: 700; line-height: 1.2; letter-spacing: -.035em; }
.section h3 i { color: var(--lime-dark); font-size: 15px; }
.section p, .section li { max-width: 1000px; color: #4f534d; font-size: 16px; line-height: 1.75; }
.section p { margin: 0 0 22px; }
.section ul, .section ol { margin: 20px 0 30px; padding-left: 24px; }
.section li { margin-bottom: 10px; }
.section strong { color: var(--ink); }
.section a { color: var(--lime-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.section a:hover { color: #283700; background: rgba(200, 255, 61, .45); }

.highlight, .text-links { margin: 28px 0; padding: 24px 26px; border: 0; border-left: 4px solid var(--lime); border-radius: 0; background: var(--ink-soft); color: #c8cac4; line-height: 1.8; }
.highlight strong, .text-links strong { color: var(--paper); }
.highlight a, .text-links a { color: var(--lime); }
.highlight a:hover, .text-links a:hover { color: var(--ink); background: var(--lime); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--dark-line); border-left: 1px solid var(--dark-line); }
.card { min-width: 0; padding: 28px; border: 0; border-right: 1px solid var(--dark-line); border-bottom: 1px solid var(--dark-line); border-radius: 0; background: transparent; box-shadow: none; }
.card:hover { box-shadow: none; background: var(--paper-deep); transform: none; }
.card h3 { margin-top: 10px; font-size: 22px; }

.table-container { margin: 30px 0; overflow-x: auto; border: 1px solid var(--dark-line); border-radius: 0; box-shadow: none; }
table { width: 100%; min-width: 700px; border-collapse: collapse; background: transparent; }
th { padding: 16px; border: 0; border-right: 1px solid var(--line); background: var(--ink); color: var(--lime); font: 500 10px DM Mono, monospace; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
td { padding: 16px; border: 0; border-right: 1px solid var(--dark-line); border-bottom: 1px solid var(--dark-line); color: #4f534d; vertical-align: top; }
tr:last-child td { border-bottom: 0; }

pre { margin: 28px 0; padding: 26px; overflow-x: auto; border: 1px solid var(--line); border-radius: 0; background: var(--ink); color: #dfe1da; font: 13px/1.7 DM Mono, monospace; }
code { padding: 2px 5px; border-radius: 0; background: #dfe3d5; color: var(--ink); font-family: DM Mono, monospace; }
pre code { padding: 0; background: transparent; color: inherit; }

/* Quiz */
.quiz { margin-top: 28px; padding: 0; border: 0; background: transparent; }
.quiz-question { margin: 0; padding: 28px 0; border: 0; border-bottom: 1px solid var(--dark-line); border-radius: 0; background: transparent; }
.quiz-question > p { color: var(--ink); font-size: 18px; font-weight: 700; }
.quiz-question label { margin: 8px 0; padding: 13px 15px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--dark-line); color: #4f534d; cursor: pointer; }
.quiz-question label:hover { border-color: var(--lime-dark); background: #e8eadf; }
.quiz-question input { margin-top: 5px; accent-color: var(--lime-dark); }
.quiz-question.correct { padding-left: 18px; border-left: 4px solid #608600; }
.quiz-question.incorrect { padding-left: 18px; border-left: 4px solid var(--coral); }
.feedback { margin-top: 15px; padding: 16px; background: var(--paper-deep); color: var(--ink); }
.quiz-button { width: 100%; min-height: 56px; margin-top: 32px; border: 1px solid var(--ink); border-radius: 0; background: var(--ink); color: var(--paper); font-weight: 800; cursor: pointer; }
.quiz-button:hover { border-color: var(--lime); background: var(--lime); color: var(--ink); transform: none; box-shadow: none; }
.quiz-result { padding: 24px; border-radius: 0; background: var(--lime); color: var(--ink); font-size: 18px; }
.quiz-result:empty { display: none; }

/* Footer */
.footer { margin: 0; padding: clamp(70px, 8vw, 110px) clamp(24px, 7vw, 110px); border: 0; background: var(--ink); color: var(--paper); text-align: left; }
.footer > * { width: min(100%, var(--max)); margin-left: auto; margin-right: auto; }
.footer h3 { margin-bottom: 12px; color: var(--paper); font-size: clamp(34px, 5vw, 64px); letter-spacing: -.05em; }
.footer > p { color: var(--muted); }
.footer-links { margin-top: 35px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.footer-links a { padding: 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #c8cac4; font: 11px/1.5 DM Mono, monospace; text-decoration: none; }
.footer-links a:hover { background: var(--lime); color: var(--ink); }
.footer-counter { margin-top: 35px; padding-top: 24px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.footer-counter img { width: 22px; height: 22px; object-fit: contain; }
.footer-counter p { margin: 0; color: var(--muted); font: 11px DM Mono, monospace; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .header, .nav { height: 66px; }
  .nav { padding: 0 20px; }
  .logo > span:last-child { display: none; }
  .portal-link { display: none; }
  .nav-menu { top: 66px !important; height: calc(100svh - 66px); }
  .overlay { top: 66px; }
  .hero { min-height: 620px; padding: 105px 20px 68px; }
  .hero::after { right: 10px; font-size: 220px; }
  .hero h1 { font-size: clamp(43px, 12.5vw, 52px); letter-spacing: -.045em; }
  .hero-content > p:not(.hero-kicker) { margin-top: 28px; }
  .main { padding: 0 20px; }
  .section { padding: 70px 0; }
  .section h2 { flex-direction: column; gap: 14px; text-align: left; font-size: 38px; }
  .section h3 { align-items: flex-start; }
  .grid { grid-template-columns: 1fr; }
  .highlight, .text-links, pre { padding: 20px; }
  .footer { padding-left: 20px; padding-right: 20px; }
  .footer-links { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; }
}
