:root {
  color-scheme: dark;
  --bg: #0c0f15;
  --panel: #121720;
  --raised: #1a202b;
  --line: #2a313e;
  --ink: #f0f2f6;
  --muted: #a6afbf;
  --gold: #f4bf5c;
  --gold-hover: #ffda8a;
  --radius: 8px;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --shell: min(1152px, calc(100% - 64px));
  font-family: "Geist", "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; line-height: 1.6; font-size: .95rem; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .22em; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, p, figure, dl { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { color: var(--bg); background: var(--gold); }

.wrap { width: var(--shell); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; z-index: 2; inset: 8px auto auto 8px; padding: .6rem 1rem; background: var(--bg); transform: translateY(-160%); }
.skip:focus { transform: none; }
.page-main { flex: 1; padding-block: 28px 45px; }
section[id] { scroll-margin-top: 20px; }

.masthead { border-bottom: 1px solid var(--line); background: #0e1118; }
.nav { display: flex; min-height: 60px; align-items: center; gap: 39px; }
.nav a, .footer-row a { text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 1.04rem; font-weight: 850; letter-spacing: .04em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 30px;
  border: 1px solid #644d2c;
  border-radius: 5px;
  color: var(--gold);
  background: #251f19;
  font: 700 .9rem var(--mono);
  letter-spacing: -.09em;
}
.nav nav { display: flex; align-self: stretch; gap: 27px; color: var(--muted); font-size: .87rem; }
.nav nav a { position: relative; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.nav nav a[aria-current], .nav nav .parent-link, .nav nav a:hover, .site-footer a:hover { color: var(--gold); }
.nav nav a[aria-current]::after, .nav nav .parent-link::after {
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  content: "";
  background: var(--gold);
}
.nav nav span { font: .78rem var(--mono); }
.language {
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 11px;
  color: var(--muted);
  font-size: .8rem;
  white-space: nowrap;
}
.language:hover { color: var(--gold); border-color: #644d2c; }

.home-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr);
  align-items: end;
  overflow: hidden;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #10141c;
}
.hero-art { position: absolute; z-index: -1; inset: 0 0 0 29%; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 53%; }
.hero-art::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, #10141c, #10141ce0 15%, #10141c00 55%),
              linear-gradient(0deg, #0c1017b8, transparent 40%);
}
.home-intro { align-self: center; padding: 34px 0 36px 37px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--gold);
  font: 500 .77rem/1.5 var(--mono);
}
.eyebrow::before { width: 14px; height: 1px; background: currentColor; content: ""; }
.home h1 {
  margin-top: 8px;
  font-size: clamp(3.5rem, 6vw, 5.4rem);
  letter-spacing: -.07em;
  font-weight: 825;
}
.home h1::after {
  display: inline-block;
  width: .12em;
  height: .12em;
  margin-left: .12em;
  background: var(--gold);
  content: "";
}
.intro-copy { max-width: 440px; margin-top: 12px; color: var(--muted); }
.home-search {
  display: flex;
  gap: 6px;
  max-width: 446px;
  margin-top: 21px;
  padding: 4px;
  border: 1px solid #424b5c;
  border-radius: var(--radius);
  background: #0c0f15;
}
.home-search:focus-within { border-color: var(--gold); }
.search-field { position: relative; flex: 1; min-width: 0; }
.search-field::before, .search-field::after {
  position: absolute;
  pointer-events: none;
  content: "";
}
.search-field::before { top: 12px; left: 12px; width: 10px; height: 10px; border: 1.5px solid var(--muted); border-radius: 50%; }
.search-field::after { top: 23px; left: 22px; width: 5px; height: 1.5px; background: var(--muted); transform: rotate(47deg); }
.home-search input { width: 100%; height: 100%; min-height: 39px; padding: 6px 8px 6px 33px; border: 0; border-radius: 4px; outline: none; background: transparent; color: var(--ink); }
.home-search input::placeholder { color: var(--muted); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 8px 13px;
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
}
button.button { cursor: pointer; }
.primary { background: var(--gold); color: #161007; }
.primary:hover { background: var(--gold-hover); }
.secondary { border-color: #424b5c; color: var(--ink); background: #121720; }
.secondary:hover { border-color: var(--gold); color: var(--gold); }
.quick-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 13px; margin-top: 10px; color: var(--muted); font-size: .78rem; }
.quick-links a:hover { color: var(--gold); }
.catalog-stats {
  justify-self: end;
  display: flex;
  margin: 0 20px 19px 8px;
  border: 1px solid #3d4450;
  border-radius: 6px;
  background: #0b1018;
}
.catalog-stats a { display: flex; align-items: center; gap: 7px; padding: 6px 12px; color: var(--muted); font: .75rem var(--mono); text-decoration: none; }
.catalog-stats a + a { border-left: 1px solid #3d4450; }
.catalog-stats a:hover { color: var(--gold); }
.catalog-stats strong { color: var(--gold); font-size: 1rem; font-weight: 650; }

.home-tools, .home-updates { margin-top: 25px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.section-heading h2 { font-size: 1.1rem; }
.section-heading a { color: var(--muted); font-size: .79rem; text-decoration: none; }
.section-heading a:hover { color: var(--gold); }
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tool-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  text-decoration: none;
}
.tool-card:hover, .addon-card:hover { border-color: #735832; background: #171b24; }
.tool-card h3 { font-size: .98rem; }
.tool-card p, .addon-copy p { margin-top: 5px; color: var(--muted); font-size: .82rem; }
.tool-arrow { color: var(--gold); font: 1rem var(--mono); }
.tool-icon { position: relative; display: block; width: 31px; height: 31px; border: 1px solid #4a3926; border-radius: 5px; color: var(--gold); background: #221c17; }
.tool-icon::before, .tool-icon::after { position: absolute; content: ""; }
.icon-lookup::before { top: 7px; left: 9px; width: 9px; height: 9px; border: 1.5px solid currentColor; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.icon-lookup::after { top: 11px; left: 13px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.icon-cooking::before { top: 8px; left: 8px; width: 13px; height: 2px; background: currentColor; box-shadow: 0 5px currentColor, 0 10px currentColor; }
.icon-submit::before { top: 7px; left: 9px; width: 9px; height: 13px; border: 1.5px solid currentColor; border-radius: 2px; }
.icon-submit::after { top: 12px; left: 12px; width: 6px; height: 1.5px; background: currentColor; box-shadow: 0 4px currentColor; }

.home-updates { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr); gap: 18px; }
.addon-card {
  display: grid;
  grid-template-columns: minmax(0, .56fr) minmax(0, 1fr);
  min-height: 135px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  text-decoration: none;
}
.addon-card img { width: 100%; height: 100%; object-fit: cover; }
.addon-copy { align-self: center; padding: 15px 18px; }
.addon-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 10px; }
.addon-title h3 { font-size: 1.16rem; }
.version-tag {
  color: var(--gold);
  border: 1px solid #594428;
  background: #201c17;
  border-radius: 4px;
  padding: 2px 5px;
  font: .72rem var(--mono);
  white-space: nowrap;
}
.text-action { display: inline-block; margin-top: 8px; color: var(--gold); font-size: .81rem; font-weight: 700; }
.forum-links {
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  list-style: none;
}
.forum-links li + li { border-top: 1px solid var(--line); }
.forum-links a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; font-size: .86rem; text-decoration: none; }
.forum-links a:hover, .forum-links a span { color: var(--gold); }
.forum-links a:focus-visible { outline-offset: -2px; }

.page-intro { padding-block: 10px 23px; }
.page-intro h1, .detail h1 { font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 800; letter-spacing: -.055em; }
.page-intro p { margin-top: 8px; color: var(--muted); }
.section-nav { display: flex; flex-wrap: wrap; gap: 4px 17px; border-bottom: 1px solid var(--line); }
.section-nav a { padding: 8px 2px; color: var(--muted); font-size: .85rem; text-decoration: none; }
.section-nav a:hover { color: var(--gold); }

.detail-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 18px; color: var(--muted); font: .77rem/1.5 var(--mono); }
.detail-breadcrumb a:hover { color: var(--gold); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.13fr);
  align-items: center;
  gap: 30px;
  padding-block: 23px 24px;
}
.detail h1 { margin-top: 8px; }
.subtitle { margin-top: 5px; color: var(--gold); font-size: 1.16rem; font-weight: 650; }
.lead { max-width: 35rem; margin-top: 12px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 7px; margin-block: 15px 8px; }
.version { color: var(--muted); font: .75rem/1.65 var(--mono); }
.preview { border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; background: var(--panel); }
.preview a { display: block; border-radius: 4px; overflow: hidden; }
.preview figcaption { padding: 6px 3px 2px; color: var(--muted); font-size: .75rem; }
.section { padding-block: 28px; }
.section h2 { font-size: clamp(1.35rem, 2.5vw, 1.8rem); letter-spacing: -.023em; }
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; margin-top: 14px; }
.features article, .commands {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.features h3, .steps h3, .commands h3 { margin-bottom: 6px; font-size: 1rem; }
.features p, .steps p, .boundary p, .commands dd { color: var(--muted); font-size: .86rem; }
.setup { border-block: 1px solid var(--line); background: #0e121a; }
.setup-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.steps { margin: 13px 0 0; padding-left: 20px; }
.steps li { padding-left: 4px; }
.steps li + li { margin-top: 12px; }
.steps li::marker { color: var(--gold); font-family: var(--mono); }
code { border-radius: 3px; padding: .13em .3em; color: var(--gold-hover); background: #232731; font: .87em var(--mono); overflow-wrap: anywhere; }
.commands dl div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 6px 0; }
.commands dl div + div { border-top: 1px solid var(--line); }
.commands dd { margin: 0; }
.boundary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 12px; }
.links { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 8px; }
.links a { color: var(--gold); }

.site-footer { margin-top: auto; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 18px; padding-block: 15px; }
.footer-brand { font: 700 .81rem var(--mono); color: var(--gold); white-space: nowrap; }
.footer-brand span { margin-left: 4px; font-weight: 400; color: var(--muted); }
.footer-row > a:last-child { margin-left: auto; }

@media (max-width: 880px) {
  :root { --shell: calc(100% - 44px); }
  .hero-grid { gap: 19px; }
  .tool-card { column-gap: 8px; padding: 11px; }
  .tool-icon { display: none; }
  .tool-card { grid-template-columns: minmax(0, 1fr) auto; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-grid { gap: 22px; }
}
@media (max-width: 670px) {
  :root { --shell: calc(100% - 32px); }
  .nav { min-height: 52px; gap: 17px; }
  .nav nav { gap: 12px; }
  .page-main { padding-block: 16px 29px; }
  .home-hero { display: block; min-height: 0; }
  .home-intro { padding: 27px 19px 12px; }
  .hero-art { inset: 0; }
  .hero-art::after { background: linear-gradient(90deg, #10141cfa, #10141c8c), linear-gradient(0deg, #10141cd9, transparent); }
  .catalog-stats { width: fit-content; margin: 1px 19px 17px; }
  .home-tools, .home-updates { margin-top: 19px; }
  .tool-grid, .home-updates { grid-template-columns: 1fr; gap: 8px; }
  .home-updates { gap: 18px; }
  .tool-card { grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; }
  .tool-icon { display: block; }
  .hero-grid, .setup-grid, .boundary { grid-template-columns: 1fr; }
  .footer-row p { order: 1; flex-basis: 100%; }
}
@media (max-width: 500px) {
  .nav { display: grid; grid-template-columns: 1fr auto; row-gap: 0; padding-top: 9px; }
  .nav nav { grid-column: 1 / -1; grid-row: 2; min-height: 39px; gap: 23px; }
  .language { justify-self: end; }
}
@media (max-width: 380px) {
  .home-search .primary span { display: none; }
  .search-field::before, .search-field::after { display: none; }
  .home-search input { padding-left: 8px; }
  .features { grid-template-columns: 1fr; }
}
