/* ============================================================
   Five Directory — documentation styles
   Hero, search dropdown, native search list, native detail
   page, language tabs, code blocks, syntax highlighting,
   parameter tables.
   ============================================================ */

/* ============================================================
   Homepage hero (compact — no oversized landing section)
   ============================================================ */
.hero {
  padding: 64px 0 40px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: 40px;
  font-weight: 720;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.hero .sub {
  margin: 0 auto 28px;
  max-width: 52ch;
  color: var(--text-secondary);
  font-size: 17px;
}
.hero-search {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* ============================================================
   Search field with leading icon
   ============================================================ */
.search-field {
  position: relative;
  display: flex;
  align-items: center;
}
.search-field svg {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-field .input {
  height: 48px;
  padding-left: 42px;
  font-size: 15px;
}
.search-field.compact .input {
  height: 40px;
}

/* ============================================================
   Search dropdown (homepage + global modal)
   ============================================================ */
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 50;
  display: none;
  text-align: left;
}
.search-results.show {
  display: block;
  animation: fadeIn 0.15s var(--ease);
}
.sr-group-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 14px 6px;
}
.sr-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  cursor: pointer;
  border-left: 2px solid transparent;
}
.sr-item:hover,
.sr-item.active {
  background: var(--card);
  border-left-color: var(--primary);
}
.sr-name {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sr-name .match {
  color: var(--primary);
  font-weight: 700;
}
.sr-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.sr-hash {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}
.sr-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}
.sr-foot kbd {
  font-family: var(--mono);
  font-size: 10px;
  padding: 1px 5px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  margin: 0 2px;
}
.sr-empty {
  padding: 24px 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ============================================================
   Natives page — list + filters
   ============================================================ */
.natives-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.ns-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
  max-height: calc(100vh - var(--nav-h) - 60px);
  display: flex;
  flex-direction: column;
}
.ns-sidebar-head {
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.ns-list {
  overflow-y: auto;
  padding: 6px;
}
.ns-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.12s var(--ease), color 0.12s var(--ease);
}
.ns-item:hover {
  background: var(--card-hover);
  color: var(--text);
}
.ns-item.active {
  background: var(--primary-dim);
  color: var(--primary);
}
.ns-item .count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}
.ns-item.active .count {
  color: var(--primary);
}

.native-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  margin-bottom: 8px;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.native-row:hover {
  border-color: var(--border-strong);
  background: var(--card-hover);
}
.native-row .nr-main {
  min-width: 0;
  flex: 1;
}
.native-row .nr-name {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.native-row .nr-sig {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.native-row .nr-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nr-hash {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
}
@media (max-width: 820px) {
  .natives-layout {
    grid-template-columns: 1fr;
  }
  .ns-sidebar {
    position: static;
    max-height: none;
  }
  .ns-list {
    display: flex;
    flex-wrap: wrap;
    max-height: 180px;
  }
  .ns-item {
    flex: 0 0 auto;
  }
  .native-row .nr-hash {
    display: none;
  }
}

/* ============================================================
   Native detail page
   ============================================================ */
.native-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.native-head h1 {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  word-break: break-word;
}
.native-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}
.native-hashes {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 14px 0 26px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.hash-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hash-item .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hash-item .v {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--primary);
}
.hash-item .v.copyable {
  cursor: pointer;
}
.hash-item .v.copyable:hover {
  text-decoration: underline;
}

.native-section {
  margin-bottom: 36px;
}
.native-section > h2 {
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.native-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}
.native-desc p {
  margin: 0 0 12px;
}

/* Language tabs + apiset selector toolbar */
.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tabs {
  display: inline-flex;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}
.tab {
  padding: 5px 13px;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.tab:hover {
  color: var(--text);
}
.tab.active {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.apiset-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.apiset-toggle .label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* ============================================================
   Code blocks + syntax highlighting
   ============================================================ */
.code {
  position: relative;
  background: #0c0e12;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.code-lang {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-secondary);
  font-size: 12px;
  transition: all 0.15s var(--ease);
}
.copy-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.copy-btn.done {
  color: var(--green);
  border-color: rgba(63, 185, 80, 0.4);
}
.copy-btn svg {
  width: 13px;
  height: 13px;
}
.code pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.65;
  color: #c9d1d9;
  tab-size: 2;
}
.code pre code {
  font-family: inherit;
}
/* token colors */
.tok-kw {
  color: #ff7b72;
}
.tok-type {
  color: #79c0ff;
}
.tok-fn {
  color: #d2a8ff;
}
.tok-str {
  color: #a5d6ff;
}
.tok-num {
  color: #79c0ff;
}
.tok-com {
  color: #6b7280;
  font-style: italic;
}
.tok-punc {
  color: #8b949e;
}
.tok-var {
  color: #ffa657;
}

/* ============================================================
   Parameters + tables
   ============================================================ */
.tbl-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 420px;
}
table.doc-table th {
  text-align: left;
  padding: 10px 14px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 500;
}
table.doc-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}
table.doc-table tr:last-child td {
  border-bottom: none;
}
table.doc-table .p-name {
  font-family: var(--mono);
  color: var(--text);
  font-weight: 500;
}
table.doc-table .p-type {
  font-family: var(--mono);
  color: var(--primary);
  font-size: 13px;
}

/* Related natives */
.related-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.related-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  font-family: var(--mono);
  font-size: 13px;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.related-item:hover {
  border-color: var(--border-strong);
  background: var(--card-hover);
}
.related-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.related-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--text-muted);
}

/* ============================================================
   Global search modal (Cmd/Ctrl-K)
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
}
.modal-overlay.show {
  display: flex;
  animation: fadeIn 0.15s var(--ease);
}
.search-modal {
  width: 100%;
  max-width: 560px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.search-modal .search-field {
  border-bottom: 1px solid var(--border);
}
.search-modal .search-field .input {
  border: none;
  border-radius: 0;
  background: transparent;
  height: 52px;
}
.search-modal .search-field .input:focus {
  box-shadow: none;
}
.search-modal .modal-results {
  max-height: 50vh;
  overflow-y: auto;
}

@media (max-width: 540px) {
  .hero h1 {
    font-size: 32px;
  }
  .hero .sub {
    font-size: 15px;
  }
  .native-hashes {
    flex-direction: column;
    gap: 10px;
  }
}

/* ============================================================
   Models page — tabs, category chips, image grid
   ============================================================ */
.model-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
  overflow-x: auto;
}
.model-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 550;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.model-tab:hover {
  color: var(--text);
}
.model-tab.active {
  color: var(--text);
  border-bottom-color: var(--primary);
}
.model-tab svg {
  width: 16px;
  height: 16px;
}
.model-tab .count {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1px 7px;
}
.model-tab.active .count {
  color: var(--primary);
  border-color: var(--primary-border);
  background: var(--primary-dim);
}

.chip-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 2px;
}
.chip.active .chip-count {
  color: var(--primary);
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.model-grid .span-grid {
  grid-column: 1 / -1;
}

.model-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease),
    background 0.15s var(--ease);
}
.model-card:hover {
  border-color: var(--border-strong);
  background: var(--card-hover);
  transform: translateY(-2px);
}
.model-card:active {
  transform: translateY(0);
}

.model-thumb {
  position: relative;
  aspect-ratio: 16 / 11;
  background: radial-gradient(
    circle at 50% 40%,
    var(--bg-elevated) 0%,
    var(--bg) 100%
  );
  display: grid;
  place-items: center;
  overflow: hidden;
}
.model-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  transition: transform 0.2s var(--ease);
}
.model-card:hover .model-thumb img {
  transform: scale(1.04);
}
/* fallback when the image is missing / fails to load */
.model-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.model-thumb.no-img img {
  display: none;
}
.model-thumb.no-img .model-fallback {
  display: grid;
}
/* "Copied" overlay */
.model-copied {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(15, 17, 21, 0.86);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s var(--ease);
}
.model-copied svg {
  width: 16px;
  height: 16px;
}
.model-card.copied .model-copied {
  opacity: 1;
}

.model-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border);
}
.model-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.model-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-model-more] {
  display: block;
  margin: 24px auto 0;
}

@media (max-width: 520px) {
  .model-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
}

/* ============================================================
   Model detail page
   ============================================================ */
.model-card {
  text-decoration: none;
  color: inherit;
}

.md-head {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin: 18px 0 8px;
}
.md-art {
  position: relative;
  aspect-ratio: 16 / 11;
  background: radial-gradient(circle at 50% 38%, var(--bg-elevated) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.md-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 18px;
}
.md-art-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  font-family: var(--mono);
  font-size: 44px;
  font-weight: 700;
  color: var(--text-muted);
}
.md-art.no-img img { display: none; }
.md-art.no-img .md-art-fallback { display: grid; }

.md-identity h1 {
  font-family: var(--mono);
  font-size: 34px;
  margin: 12px 0 6px;
  word-break: break-word;
}
.md-sub {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 16px;
}
.md-blurb {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
  max-width: 62ch;
}

/* details table */
.md-table {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.md-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.md-row:last-child { border-bottom: 0; }
.md-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.md-value {
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.md-dim { color: var(--text-muted); font-family: var(--mono); font-size: 12px; }
.md-desc { margin: 0; color: var(--text-secondary); line-height: 1.7; max-width: 70ch; }

/* copyable value chip */
.cp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px 4px 3px 9px;
}
.cp.mono .cp-val { font-family: var(--mono); font-size: 13px; }
.cp-btn {
  display: grid;
  place-items: center;
  width: 24px;
  height: 22px;
  border: 0;
  background: none;
  border-radius: 4px;
  color: var(--text-muted);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.cp-btn:hover { color: var(--text); background: var(--card); }
.cp-btn.done { color: var(--green); }
.cp-btn svg { width: 14px; height: 14px; }

/* weapon components / tints */
.md-chiplist { display: flex; flex-wrap: wrap; gap: 8px; }
.md-comp {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
}
.md-comp strong { font-size: 12px; color: var(--text); }
.md-comp code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}

@media (max-width: 760px) {
  .md-head { grid-template-columns: 1fr; gap: 18px; }
  .md-art { max-width: 360px; }
  .md-row { grid-template-columns: 130px 1fr; gap: 10px; }
}

/* ============================================================
   Home page — hero redesign + directory cards
   ============================================================ */
.hero {
  position: relative;
  padding: 76px 0 52px;
}
.hero .hero-glow {
  position: absolute;
  left: 50%;
  top: -30px;
  transform: translateX(-50%);
  width: min(760px, 94%);
  height: 380px;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(58% 58% at 50% 38%, rgba(79, 140, 255, 0.20), transparent 72%);
}
.hero > * {
  position: relative;
  z-index: 1;
}
.hero-logo {
  height: 74px;
  width: auto;
  display: block;
  margin: 0 auto 22px;
  filter: drop-shadow(0 8px 26px rgba(79, 140, 255, 0.38));
}
.hero h1 {
  font-size: clamp(34px, 5.2vw, 52px);
  line-height: 1.04;
}
.hero-grad {
  background: linear-gradient(92deg, #a6c6ff, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 36px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 30px;
  position: relative;
  color: inherit;
  transition: transform 0.15s var(--ease);
}
.stat + .stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 32px;
  background: var(--border);
}
a.stat:hover {
  transform: translateY(-2px);
}
a.stat:hover .stat-num {
  color: var(--primary);
}
.stat-num {
  font-size: 27px;
  font-weight: 720;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: color 0.15s var(--ease);
}
.stat-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-top: 5px;
}

.home-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 12px;
}
.home-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease),
    transform 0.15s var(--ease);
}
.home-card:hover {
  border-color: var(--primary-border);
  background: var(--card-hover);
  transform: translateY(-3px);
}
.home-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  background: var(--primary-dim);
  color: var(--primary);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.home-card-icon svg {
  width: 21px;
  height: 21px;
}
.home-card:hover .home-card-icon {
  background: var(--primary);
  color: #fff;
}
.home-card-title {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.home-card-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 860px) {
  .home-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .hero {
    padding: 56px 0 40px;
  }
  .hero-logo {
    height: 60px;
  }
  .home-cards {
    grid-template-columns: 1fr;
  }
  .stat {
    padding: 4px 18px;
  }
  .stat-num {
    font-size: 23px;
  }
}

/* ============================================================
   Frameworks (developer guide) page
   ============================================================ */
.fw-intro {
  padding: 40px 0 22px;
  max-width: 780px;
}
.fw-intro h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 720;
  letter-spacing: -0.025em;
}
.fw-intro .sub {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.fw-intro .sub strong {
  color: var(--text);
  font-weight: 650;
}
.fw-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 26px;
}
.fw-tab {
  padding: 8px 22px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.fw-tab:hover {
  color: var(--text);
}
.fw-tab.active {
  background: var(--primary);
  color: #fff;
}
.fw-panel-head {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: 22px;
  margin-bottom: 26px;
}
.fw-panel-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.fw-panel-title h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.fw-resource {
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--primary-dim);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}
.fw-blurb {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 72ch;
}
.fw-docs-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}
.fw-docs-link:hover {
  text-decoration: underline;
}
.fw-section {
  margin-bottom: 26px;
}
.fw-section-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.fw-section-note {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 74ch;
}
.fw-foot-note {
  margin: 8px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}
.fw-foot-note a {
  color: var(--primary);
}
.fw-foot-note a:hover {
  text-decoration: underline;
}
@media (max-width: 520px) {
  .fw-tabs {
    display: flex;
    width: 100%;
  }
  .fw-tab {
    flex: 1;
    padding: 8px 0;
  }
}
