:root {
  color-scheme: dark;
  --ink: #eaf4f5;
  --muted: #9db2b8;
  --paper: #081116;
  --panel: #0e1b21;
  --panel-2: #13252c;
  --line: #244049;
  --mint: #5fe0bb;
  --mint-dark: #123f35;
  --gold: #f4c978;
  --blue: #8cbcff;
  --danger: #ff9c9c;
  --max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 106.25%; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 85% 0%, #11332f 0, transparent 28rem), var(--paper); line-height: 1.65; }
a { color: var(--mint); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: #a3f4dc; }
img { max-width: 100%; }

.skip-link { position: absolute; left: -999px; top: 1rem; z-index: 10; }
.skip-link:focus { left: 1rem; padding: .7rem 1rem; background: var(--ink); color: var(--paper); border-radius: .5rem; }
.site-header { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid rgba(95,224,187,.16); background: rgba(8,17,22,.94); backdrop-filter: blur(16px); }
.nav-wrap { width: 100%; min-height: 4rem; padding: .5rem clamp(1rem, 3vw, 2.5rem); display: flex; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; font-weight: 780; letter-spacing: -.02em; white-space: nowrap; }
.brand img { width: 1.7rem; height: 1.7rem; object-fit: contain; }
.brand small { display: block; color: var(--muted); font-size: .6rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.nav-toggle { display: none; margin-left: auto; border: 1px solid var(--line); border-radius: .55rem; background: var(--panel); color: var(--ink); padding: .55rem .75rem; font: inherit; }
.site-nav { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem; }
.site-nav a { padding: .5rem .7rem; border-radius: .5rem; color: var(--muted); text-decoration: none; font-size: .92rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: var(--panel-2); }
.language-switch { display: inline-flex; flex: 0 0 auto; padding: .2rem; border: 1px solid var(--line); border-radius: .55rem; background: #071015; }
.language-switch a { min-width: 2.2rem; padding: .25rem .45rem; border-radius: .35rem; color: var(--muted); text-align: center; text-decoration: none; font-size: .76rem; font-weight: 800; }
.language-switch a:hover, .language-switch a[aria-current="true"] { color: var(--paper); background: var(--mint); }
.development-banner { display: flex; align-items: center; justify-content: center; gap: .75rem; min-height: 2.35rem; padding: .35rem 1rem; border-top: 1px solid rgba(244,201,120,.25); background: #2a2418; color: #f4e3bd; font-size: .82rem; text-align: center; }
.development-banner strong { padding: .12rem .45rem; border: 1px solid rgba(244,201,120,.55); border-radius: 999px; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; }

main { min-height: 70vh; }
.hero { max-width: var(--max); margin: auto; padding: 6.5rem 1.25rem 4.5rem; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); gap: 3rem; align-items: center; }
.eyebrow { color: var(--mint); font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.16; letter-spacing: -.025em; }
h1 { margin: .65rem 0 1.1rem; max-width: 14ch; font-size: clamp(2.9rem, 7vw, 6.25rem); }
h2 { margin: 0 0 1rem; font-size: clamp(1.8rem, 4vw, 3.1rem); }
h3 { margin: 1.6rem 0 .55rem; font-size: 1.25rem; }
.lead { max-width: 64ch; color: #c5d6d9; font-size: clamp(1.08rem, 2vw, 1.3rem); }
.hero-mark { justify-self: center; width: min(100%, 360px); filter: drop-shadow(0 2rem 4rem rgba(53,218,170,.19)); }
.home-hero { grid-template-columns: minmax(120px, .3fr) minmax(0, 1.7fr); gap: clamp(2rem, 5vw, 5rem); }
.home-hero .hero-mark { justify-self: start; align-self: start; width: clamp(105px, 13vw, 170px); margin-top: 2.5rem; }
.home-hero h1 { max-width: 15ch; font-size: clamp(2.8rem, 6vw, 5.4rem); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.7rem; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: .75rem 1rem; border: 1px solid var(--mint); border-radius: .65rem; background: var(--mint); color: #04110d; font-weight: 760; text-decoration: none; }
.button.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.button:hover { color: #04110d; background: #92f0d3; }
.button.secondary:hover { color: var(--ink); background: var(--panel-2); }

.band { border-block: 1px solid var(--line); background: rgba(14,27,33,.76); }
.section { max-width: var(--max); margin: auto; padding: 4.5rem 1.25rem; }
.section-intro { max-width: 70ch; color: var(--muted); font-size: 1.08rem; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; margin-top: 2rem; }
.card { padding: 1.3rem; border: 1px solid var(--line); border-radius: .9rem; background: linear-gradient(145deg, rgba(19,37,44,.9), rgba(11,24,29,.9)); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.number { color: var(--mint); font: 750 1.8rem ui-monospace, monospace; }
.pill-row { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.5rem; }
.pill { padding: .35rem .65rem; border: 1px solid var(--line); border-radius: 999px; color: #c4d7da; background: var(--panel); font-size: .85rem; }
.notice { margin: 1.5rem 0; padding: 1rem 1.15rem; border-left: .25rem solid var(--gold); background: #2a2418; color: #f4e3bd; }
.success { border-left-color: var(--mint); background: var(--mint-dark); color: #c8f8e9; }

pre { max-width: 100%; overflow: auto; padding: 1.1rem; border: 1px solid var(--line); border-radius: .75rem; background: #050b0e; color: #dce9eb; line-height: 1.55; tab-size: 2; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: .91em; }
:not(pre) > code { padding: .1em .32em; border: 1px solid #29414a; border-radius: .3rem; background: #0b181d; color: #b9f0df; }
.example-grid { display: grid; grid-template-columns: minmax(0,.72fr) minmax(0,1.28fr); gap: 1.6rem; align-items: start; margin: 2.2rem 0 3.5rem; }
.example-grid h2 { font-size: 2rem; }
.result-box { padding: 1rem; border-radius: .7rem; background: var(--mint-dark); color: #cef5e9; }

.contact-shell { max-width: 920px; margin: auto; padding: 5rem 1.25rem; }
.contact-shell h1 { max-width: 15ch; }
.contact-intro { max-width: 64ch; color: #c5d6d9; font-size: 1.15rem; }
.contact-card { max-width: 680px; margin-top: 2rem; padding: clamp(1.4rem, 4vw, 2.2rem); border: 1px solid var(--line); border-radius: 1rem; background: linear-gradient(145deg, rgba(19,37,44,.94), rgba(11,24,29,.94)); }
.contact-card h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
.contact-address { width: fit-content; margin: 1.2rem 0; padding: .7rem 1rem; border: 1px solid rgba(95,224,187,.5); border-radius: .65rem; background: var(--mint-dark); color: #c8f8e9; font: 750 clamp(1.15rem, 3vw, 1.5rem) "SFMono-Regular", Consolas, monospace; letter-spacing: .02em; }
.contact-note { max-width: 58ch; margin-bottom: 0; color: var(--muted); }

.manual-index { max-width: var(--max); margin: auto; padding: 5rem 1.25rem; }
.manual-index h1 { max-width: 18ch; font-size: clamp(2.7rem, 6vw, 5.2rem); }
.manual-intro { max-width: 72ch; color: var(--muted); }
.privacy-note { display: flex; gap: .75rem; align-items: baseline; max-width: 72ch; margin: 1.25rem 0; padding: .8rem 1rem; border-left: .25rem solid var(--mint); background: var(--mint-dark); color: #c8f8e9; }
.privacy-note strong { flex: 0 0 auto; }
.chapter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.chapter-card { display: flex; min-height: 14rem; flex-direction: column; }
.chapter-card h2 { margin-top: 1rem; font-size: 1.5rem; }
.chapter-link { margin-top: auto; font-weight: 750; }

.manual-shell { width: 100%; max-width: 1320px; margin: auto; padding: 3rem 1.25rem 5rem; display: grid; grid-template-columns: 280px minmax(0, 820px); gap: 3rem; justify-content: center; }
.manual-tools, .manual { min-width: 0; }
.manual-tools { position: sticky; top: 6rem; align-self: start; }
.manual-tools input { width: 100%; padding: .75rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--panel); color: var(--ink); font: inherit; }
.manual-tools nav { max-height: calc(100vh - 12rem); overflow: auto; margin-top: 1rem; }
.manual-tools a { display: block; padding: .3rem 0; color: var(--muted); text-decoration: none; font-size: .88rem; }
.manual-tools a:hover, .manual-tools a[aria-current="page"] { color: var(--mint); }
.manual-tools a[aria-current="page"] { font-weight: 760; }
.manual-overview-link { padding-bottom: .8rem !important; border-bottom: 1px solid var(--line); color: var(--mint) !important; font-weight: 760; }
.manual article { min-width: 0; }
.manual article h1 { max-width: none; font-size: clamp(2.5rem, 5vw, 4.4rem); }
.manual article h2 { margin-top: 3.5rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 2rem; }
.manual article h3 { margin-top: 2.3rem; }
.manual article li { margin: .25rem 0; }
.manual article section.search-hidden { display: none; }
.search-count { min-height: 1.4em; color: var(--muted); font-size: .82rem; }
.chapter-paging { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.chapter-paging a { padding: .9rem; border: 1px solid var(--line); border-radius: .7rem; background: var(--panel); text-decoration: none; }
.chapter-paging a.next { text-align: right; }
.chapter-paging small { display: block; margin-top: .2rem; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: #050b0e; }
.footer-wrap { max-width: var(--max); margin: auto; padding: 2rem 1.25rem; display: flex; justify-content: space-between; gap: 2rem; color: var(--muted); font-size: .88rem; }
.footer-wrap p { margin: 0; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 4rem; }
  .hero-mark { width: 230px; grid-row: 1; }
  .home-hero { grid-template-columns: 1fr; gap: 1.25rem; }
  .home-hero .hero-mark { width: 92px; margin-top: 0; }
  .grid { grid-template-columns: 1fr; }
  .chapter-grid { grid-template-columns: 1fr; }
  .example-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; inset: 4.6rem 0 auto; padding: 1rem; background: #081116; border-bottom: 1px solid var(--line); }
  .site-nav.open { display: grid; }
  .language-switch { order: 2; }
  .development-banner { align-items: flex-start; flex-direction: column; gap: .2rem; padding-block: .55rem; text-align: left; }
  .manual-shell { grid-template-columns: 1fr; }
  .manual-tools { position: static; }
  .manual-tools nav { max-height: 16rem; }
  .footer-wrap { display: block; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .nav-wrap { padding-inline: .75rem; }
  .brand small { display: none; }
  .brand img { width: 1.55rem; height: 1.55rem; }
  .language-switch a { min-width: 1.9rem; padding-inline: .3rem; }
  .privacy-note { align-items: flex-start; flex-direction: column; gap: .2rem; }
}
