:root {
  --bg: #14110f;
  --bg-soft: #1b1714;
  --panel: #211c18;
  --panel-2: #2a231e;
  --panel-3: #332a23;
  --border: #40352d;
  --border-soft: #312923;
  --text: #f4eee7;
  --muted: #b9aa9e;
  --faint: #7f7167;
  --accent: #d89b5c;
  --accent-strong: #f0b979;
  --accent-soft: rgba(216, 155, 92, 0.13);
  --green: #77b883;
  --green-soft: rgba(119, 184, 131, 0.12);
  --blue: #7ba7c7;
  --blue-soft: rgba(123, 167, 199, 0.12);
  --yellow: #d3b869;
  --yellow-soft: rgba(211, 184, 105, 0.12);
  --danger: #d47d70;
  --code-bg: #100e0d;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  --sidebar-width: 260px;
  --topbar-height: 72px;
  --content-width: 1120px;
  --radius: 14px;
  --radius-sm: 9px;
  --transition: 180ms ease;
  color-scheme: dark;
}

body.light {
  --bg: #eee8df;
  --bg-soft: #e7ded2;
  --panel: #f8f4ed;
  --panel-2: #f0e9df;
  --panel-3: #e5d9ca;
  --border: #cab9a8;
  --border-soft: #d8cbbd;
  --text: #2b241f;
  --muted: #6e6259;
  --faint: #91847a;
  --accent: #a96731;
  --accent-strong: #8c4f21;
  --accent-soft: rgba(169, 103, 49, 0.1);
  --green: #4e8b5a;
  --green-soft: rgba(78, 139, 90, 0.1);
  --blue: #567d9b;
  --blue-soft: rgba(86, 125, 155, 0.1);
  --yellow: #967b2f;
  --yellow-soft: rgba(150, 123, 47, 0.1);
  --code-bg: #24201d;
  --shadow: 0 20px 50px rgba(83, 63, 44, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-height) + 24px);
}

body {
  margin: 0;
  background: radial-gradient(
      circle at 70% 0%,
      rgba(216, 155, 92, 0.06),
      transparent 30%
    ),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

code,
pre,
kbd {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

::selection {
  background: rgba(216, 155, 92, 0.34);
  color: var(--text);
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--topbar-height);
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr auto;
  align-items: center;
  gap: 26px;
  padding: 0 26px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(18px);
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  transform: rotate(45deg);
}

.brand-mark span {
  background: var(--accent);
  border-radius: 2px;
}

.brand-mark span:nth-child(2),
.brand-mark span:nth-child(3) {
  opacity: 0.68;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}

.topnav {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.topnav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  transition: color var(--transition);
}

.topnav a:hover {
  color: var(--text);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.icon-button,
.theme-button,
.menu-button {
  min-height: 38px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 9px;
  cursor: pointer;
  transition: border var(--transition), background var(--transition),
    transform var(--transition);
}

.icon-button:hover,
.theme-button:hover,
.menu-button:hover {
  border-color: var(--accent);
  background: var(--panel-2);
}

.icon-button:active,
.theme-button:active,
.menu-button:active {
  transform: translateY(1px);
}

.icon-button {
  width: 38px;
  display: grid;
  place-items: center;
}

.search-icon {
  width: 14px;
  height: 14px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  position: relative;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 2px;
  background: var(--muted);
  right: -5px;
  bottom: -2px;
  transform: rotate(45deg);
  border-radius: 2px;
}

.theme-button {
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.theme-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.menu-button {
  display: none;
  width: 38px;
  padding: 9px;
  flex-direction: column;
  gap: 4px;
}

.menu-button span {
  width: 100%;
  height: 2px;
  background: var(--muted);
  border-radius: 2px;
}

.search-panel {
  position: fixed;
  top: calc(var(--topbar-height) + 12px);
  right: 22px;
  width: min(520px, calc(100vw - 44px));
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow);
  z-index: 150;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box input {
  flex: 1;
  height: 42px;
  border: 1px solid var(--border);
  outline: none;
  background: var(--bg);
  color: var(--text);
  border-radius: 9px;
  padding: 0 13px;
}

.search-box input:focus {
  border-color: var(--accent);
}

.search-box kbd {
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  color: var(--faint);
  border-radius: 5px;
  font-size: 10px;
}

.search-results {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  max-height: 330px;
  overflow-y: auto;
}

.search-result {
  padding: 10px 11px;
  border-radius: 8px;
  background: var(--bg-soft);
  border: 1px solid transparent;
}

.search-result:hover {
  border-color: var(--border);
}

.search-result strong {
  display: block;
  font-size: 13px;
}

.search-result span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 2px;
}

.sidebar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  padding: 28px 18px 24px 20px;
  border-right: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--bg) 95%, transparent);
  z-index: 80;
  overflow-y: auto;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
}

.sidebar-label {
  color: var(--faint);
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 10px 10px;
}

.sidebar-link {
  position: relative;
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 620;
  transition: background var(--transition), color var(--transition);
}

.sidebar-link:hover {
  background: var(--panel);
  color: var(--text);
}

.sidebar-link.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.sidebar-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.sidebar-link.nested {
  padding-left: 24px;
  font-size: 12px;
}

.sidebar-card {
  margin-top: 30px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: linear-gradient(145deg, var(--panel), var(--bg-soft));
}

.sidebar-card strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
}

.sidebar-card p {
  color: var(--muted);
  font-size: 11px;
  margin: 7px 0 0;
  line-height: 1.5;
}

.content {
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
}

.hero,
.section,
.cta-section,
.footer {
  width: min(var(--content-width), calc(100% - 64px));
  margin-left: auto;
  margin-right: auto;
}

.hero {
  min-height: 680px;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: 58px;
  padding: 82px 0 72px;
  border-bottom: 1px solid var(--border-soft);
}

.eyebrow {
  display: inline-flex;
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 12px 0 20px;
  font-size: clamp(44px, 5.4vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  max-width: 760px;
}

.hero h1 span {
  color: var(--accent);
}

.hero-lead {
  max-width: 650px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
  margin: 0;
}

.hero-actions {
  display: flex;
  gap: 11px;
  margin-top: 30px;
}

.button {
  min-height: 43px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform var(--transition), background var(--transition),
    border var(--transition);
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--accent);
  color: #1c140d;
  border-color: var(--accent);
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.secondary {
  background: var(--panel);
  color: var(--text);
}

.button.secondary:hover {
  border-color: var(--accent);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 45px;
}

.hero-meta div {
  display: flex;
  flex-direction: column;
}

.hero-meta strong {
  font-size: 13px;
}

.hero-meta span {
  color: var(--faint);
  font-size: 10px;
  margin-top: 2px;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.workbench-window {
  width: min(100%, 500px);
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(216, 155, 92, 0.03), transparent 38%),
    var(--panel);
  box-shadow: var(--shadow);
}

.window-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 4px 13px;
}

.window-status {
  color: var(--accent);
}

.workbench-layout {
  position: relative;
  min-height: 290px;
  display: grid;
  grid-template-columns: 62px 1fr 54px 70px;
  align-items: center;
  gap: 18px;
  padding: 34px 30px;
  background: linear-gradient(
      90deg,
      transparent 49.5%,
      rgba(255, 255, 255, 0.02) 50%,
      transparent 50.5%
    ),
    var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 13px;
}

.left-slots {
  display: flex;
  height: 184px;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.slot {
  width: 48px;
  height: 48px;
  border: 2px solid #67584d;
  border-top-color: #2f2722;
  border-left-color: #2f2722;
  background: #453a32;
  box-shadow: inset 0 0 0 2px #1d1916;
  position: relative;
}

.special-slot {
  display: grid;
  place-items: center;
}

.special-slot small {
  position: absolute;
  top: calc(100% + 7px);
  color: var(--faint);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.craft-grid {
  width: 164px;
  display: grid;
  grid-template-columns: repeat(3, 48px);
  grid-template-rows: repeat(3, 48px);
  gap: 10px;
  justify-self: center;
}

.slot.wood::after,
.slot.wood-dark::after,
.slot.stick::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 2px solid rgba(0, 0, 0, 0.32);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.slot.wood::after {
  background: #b06d39;
}

.slot.wood-dark::after {
  background: #80512f;
}

.slot.stick::after {
  inset: 7px 17px;
  background: #87603a;
}

.slot.empty {
  opacity: 0.75;
}

.craft-arrow {
  height: 22px;
  position: relative;
}

.craft-arrow span {
  position: absolute;
  left: 0;
  top: 9px;
  width: 38px;
  height: 4px;
  background: var(--accent);
}

.craft-arrow span::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -7px;
  width: 14px;
  height: 14px;
  border-top: 4px solid var(--accent);
  border-right: 4px solid var(--accent);
  transform: rotate(45deg);
}

.output-slot {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
}

.chair-icon {
  width: 28px;
  height: 31px;
  border: 5px solid #a5673b;
  border-bottom: 0;
  position: relative;
}

.chair-icon::before {
  content: "";
  position: absolute;
  left: -5px;
  right: -5px;
  top: 14px;
  height: 8px;
  background: #c17b45;
  border: 2px solid rgba(0, 0, 0, 0.28);
}

.chair-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 21px;
  height: 15px;
  border-left: 4px solid #8d5834;
  border-right: 4px solid #8d5834;
}

.pixel-icon {
  position: relative;
  display: block;
}

.nail-icon {
  width: 7px;
  height: 25px;
  background: #a8adb2;
  transform: rotate(35deg);
  border-radius: 1px;
}

.nail-icon::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 5px;
  background: #c7ccd0;
  left: -5px;
  top: -2px;
}

.hammer-icon {
  width: 7px;
  height: 27px;
  background: #8c5b35;
  transform: rotate(35deg);
}

.hammer-icon::before {
  content: "";
  position: absolute;
  width: 25px;
  height: 9px;
  background: #a8adb2;
  left: -9px;
  top: -4px;
  border-radius: 2px;
}

.window-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  color: var(--faint);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 9px;
  padding: 12px 0 1px;
}

.section {
  padding: 86px 0;
  border-bottom: 1px solid var(--border-soft);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 30px;
}

.section-number {
  color: var(--faint);
  font-size: 11px;
  font-family: "SFMono-Regular", Consolas, monospace;
  margin-top: 7px;
}

.section-heading h2 {
  margin: 5px 0 0;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section-intro {
  max-width: 770px;
  color: var(--muted);
  margin: -6px 0 30px 36px;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.doc-card {
  position: relative;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.doc-card.wide {
  margin-top: 16px;
}

.card-kicker,
.code-label {
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 9px;
  font-weight: 850;
}

.doc-card h3 {
  margin: 5px 0 14px;
  font-size: 17px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-block {
  position: relative;
  overflow-x: auto;
  margin: 0;
  padding: 17px 18px;
  border-radius: 10px;
  border: 1px solid #302a26;
  background: var(--code-bg);
  color: #e8dfd6;
  font-size: 11.5px;
  line-height: 1.65;
  tab-size: 2;
}

.copy-button {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  min-width: 56px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #413a35;
  border-radius: 6px;
  background: #201c19;
  color: #bdb3aa;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.copy-button:hover {
  color: #fff;
  border-color: #7d6959;
}

.callout {
  display: flex;
  gap: 13px;
  padding: 15px 17px;
  border: 1px solid;
  border-radius: 11px;
  margin: 0 0 20px;
}

.callout.success {
  border-color: color-mix(in srgb, var(--green) 40%, var(--border));
  background: var(--green-soft);
}

.callout.info {
  border-color: color-mix(in srgb, var(--blue) 40%, var(--border));
  background: var(--blue-soft);
  margin-top: 18px;
}

.callout.warning {
  border-color: color-mix(in srgb, var(--yellow) 40%, var(--border));
  background: var(--yellow-soft);
  margin-top: 20px;
}

.callout-icon {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-weight: 850;
  font-size: 11px;
}

.callout.success .callout-icon {
  color: var(--green);
}

.callout.info .callout-icon {
  color: var(--blue);
}

.callout.warning .callout-icon {
  color: var(--yellow);
}

.callout strong {
  display: block;
  font-size: 12.5px;
}

.callout p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.api-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.api-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: var(--panel);
}

.api-table th,
.api-table td {
  padding: 13px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}

.api-table th {
  color: var(--faint);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--bg-soft);
}

.api-table td {
  color: var(--muted);
  font-size: 11.5px;
}

.api-table td:first-child,
.api-table td:nth-child(2) {
  color: var(--text);
}

.api-table tbody tr:last-child td {
  border-bottom: 0;
}

.api-table code,
.tag-card code,
.rule code,
p code,
.callout code {
  color: var(--accent-strong);
  background: var(--accent-soft);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.92em;
}

.badge {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge.required {
  color: var(--green);
  background: var(--green-soft);
}

.badge.recommended {
  color: var(--yellow);
  background: var(--yellow-soft);
}

.subsection {
  margin-top: 54px;
  padding-top: 4px;
}

.subsection-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 10px;
}

.subsection-title h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.pill {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--faint);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.subsection > p {
  color: var(--muted);
  max-width: 850px;
}

.mini-grid-demo {
  width: 174px;
  display: grid;
  grid-template-columns: repeat(3, 50px);
  gap: 8px;
  margin: 24px 0;
}

.mini-grid-demo div {
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
}

.mini-grid-demo span {
  color: var(--faint);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.code-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.code-label {
  display: block;
  margin-bottom: 7px;
}

.tag-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 16px;
}

.tag-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.tag-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--border-soft);
}

.tag-card-head strong {
  display: block;
  font-size: 14px;
}

.tag-card-head code {
  display: inline-block;
  margin-top: 5px;
  font-size: 9.5px;
}

.tag-icon {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  position: relative;
}

.tag-icon.material::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
  transform: rotate(45deg);
}

.tag-icon.tool::after {
  content: "";
  width: 18px;
  height: 5px;
  background: var(--accent);
  transform: rotate(-45deg);
  border-radius: 1px;
}

.tag-list {
  display: grid;
}

.tag-list div {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 1fr;
  gap: 14px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.tag-list div:last-child {
  border-bottom: 0;
}

.tag-list span {
  color: var(--muted);
  font-size: 10.5px;
  align-self: center;
}

.tag-note {
  padding: 14px 18px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 10.5px;
}

.steps {
  display: grid;
  gap: 12px;
}

.step-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 17px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 11px;
}

.step-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.step-card h3 {
  margin: 0 0 5px;
  font-size: 14px;
}

.step-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11.5px;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.feature-card {
  position: relative;
  min-height: 170px;
  padding: 20px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
}

.feature-index {
  display: block;
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  margin-bottom: 30px;
}

.feature-card h3 {
  margin: 0;
  font-size: 16px;
}

.feature-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11.5px;
}

.feature-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 110px;
  height: 110px;
  border: 1px solid var(--border-soft);
  transform: rotate(45deg);
  opacity: 0.65;
}

.example-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.example-tab {
  padding: 8px 11px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  border-radius: 7px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.example-tab.active {
  color: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: var(--accent-soft);
}

.example-panel {
  display: none;
}

.example-panel.active {
  display: block;
}

.rules-list {
  display: grid;
}

.rule {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 16px;
  padding: 17px 0;
  border-bottom: 1px solid var(--border-soft);
}

.rule:last-child {
  border-bottom: 0;
}

.rule > span {
  color: var(--faint);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  margin-top: 2px;
}

.rule strong {
  font-size: 13px;
}

.rule p {
  color: var(--muted);
  font-size: 11.5px;
  margin: 4px 0 0;
}

.cta-section {
  margin-top: 76px;
  margin-bottom: 76px;
  padding: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  border-radius: 16px;
  background: linear-gradient(120deg, var(--accent-soft), transparent 48%),
    var(--panel);
}

.cta-section h2 {
  margin: 6px 0 9px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.cta-section p {
  max-width: 720px;
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.footer {
  min-height: 150px;
  padding: 28px 0 50px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--border-soft);
}

.footer strong {
  font-size: 13px;
}

.footer p {
  color: var(--faint);
  font-size: 10.5px;
  margin: 5px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  font-size: 10.5px;
}

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

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 10px;
  font-weight: 700;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 300;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1050px) {
  :root {
    --sidebar-width: 230px;
  }

  .topbar {
    grid-template-columns: var(--sidebar-width) 1fr auto;
  }

  .topnav {
    gap: 17px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: auto;
  }

  .hero-visual {
    justify-content: flex-start;
  }

  .tag-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --topbar-height: 64px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 16px;
  }

  .topnav {
    display: none;
  }

  .theme-button {
    display: none;
  }

  .menu-button {
    display: flex;
  }

  .sidebar {
    transform: translateX(-105%);
    width: min(290px, 82vw);
    transition: transform var(--transition);
    box-shadow: var(--shadow);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .content {
    margin-left: 0;
  }

  .hero,
  .section,
  .cta-section,
  .footer {
    width: min(100% - 34px, var(--content-width));
  }

  .hero {
    padding-top: 54px;
  }

  .two-column,
  .feature-grid,
  .code-pair {
    grid-template-columns: 1fr;
  }

  .workbench-window {
    width: 100%;
  }

  .workbench-layout {
    grid-template-columns: 55px 1fr 42px 56px;
    gap: 10px;
    padding: 26px 14px;
  }

  .craft-grid {
    width: 140px;
    grid-template-columns: repeat(3, 42px);
    grid-template-rows: repeat(3, 42px);
    gap: 7px;
  }

  .slot {
    width: 42px;
    height: 42px;
  }

  .output-slot {
    width: 52px;
    height: 52px;
  }

  .cta-section {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-intro {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .brand-copy small {
    display: none;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-lead {
    font-size: 14px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-meta {
    gap: 18px;
  }

  .hero-visual {
    overflow: hidden;
  }

  .workbench-window {
    min-width: 0;
  }

  .workbench-layout {
    min-height: 230px;
    grid-template-columns: 42px 118px 31px 45px;
    gap: 7px;
    padding: 20px 8px;
  }

  .left-slots {
    height: 140px;
  }

  .craft-grid {
    width: 118px;
    grid-template-columns: repeat(3, 36px);
    grid-template-rows: repeat(3, 36px);
    gap: 5px;
  }

  .slot {
    width: 36px;
    height: 36px;
  }

  .output-slot {
    width: 44px;
    height: 44px;
  }

  .craft-arrow span {
    width: 24px;
  }

  .window-footer {
    font-size: 8px;
    gap: 6px;
  }

  .tag-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .step-card {
    grid-template-columns: 1fr;
  }

  .step-number {
    margin-bottom: 3px;
  }

  .footer {
    flex-direction: column;
  }
}
