:root {
  color-scheme: light;
  --bg: #f2f0eb;
  --paper: #fffefa;
  --ink: #161412;
  --muted: #66635d;
  --line: rgba(22, 20, 18, .13);
  --accent: #9a7a3f;
  --blue: #0a1626;
  --green: #0e8c7b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.hub-home {
  background:
    linear-gradient(180deg, rgba(255, 254, 250, .92), rgba(242, 240, 235, .98) 42%),
    var(--bg);
}
a { color: inherit; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 254, 250, .82);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { font-weight: 750; text-decoration: none; letter-spacing: 0; }
.topbar-search {
  flex: 1 1 420px;
  max-width: 520px;
  position: relative;
}
.topbar-search input {
  width: 100%;
  min-height: 38px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 254, 250, .92), rgba(255, 254, 250, .72)),
    var(--paper);
  border-color: color-mix(in srgb, var(--line) 82%, var(--blue));
  padding: 0 16px;
  font-size: 14px;
}
.topbar-search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(10, 22, 38, .08);
}
nav { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 14px; }
nav a { text-decoration: none; }
nav a:hover { color: var(--ink); }
.hub-home .icon-nav {
  gap: 8px;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
  border-radius: 999px;
  background: rgba(255, 254, 250, .64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
}
.nav-icon {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: color-mix(in srgb, var(--ink) 70%, var(--muted));
  display: inline-grid;
  place-items: center;
  position: relative;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.nav-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-icon:hover,
.nav-icon:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}
.nav-icon::after {
  content: attr(data-tip);
  position: absolute;
  right: 50%;
  top: calc(100% + 9px);
  transform: translateX(50%);
  padding: 5px 7px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease;
  z-index: 40;
}
.nav-icon:hover::after,
.nav-icon:focus-visible::after { opacity: 1; }
.nav-icon#apiConnectButton {
  color: #0E8C7B;
  background: rgba(14, 140, 123, .08);
  border-color: rgba(14, 140, 123, .18);
}
.nav-icon#apiConnectButton:hover,
.nav-icon#apiConnectButton:focus-visible,
.nav-icon#apiConnectButton.api-connected {
  background: #0E8C7B;
  border-color: #0E8C7B;
  color: white;
}
.api-pulse {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #0E8C7B;
  box-shadow: 0 0 0 4px rgba(14, 140, 123, .13);
}
.lang-toggle {
  min-height: 0;
  font: inherit;
  font-weight: 750;
}
.lang-toggle .lang-code {
  position: absolute;
  right: 4px;
  bottom: 3px;
  color: inherit;
  font-size: 8px;
  font-weight: 860;
  letter-spacing: 0;
  opacity: 0;
}
.lang-toggle .lang-code.is-active { opacity: 1; }
.api-connect-panel {
  position: fixed;
  right: clamp(14px, 4vw, 48px);
  top: 74px;
  z-index: 30;
  width: min(330px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--green) 18%, var(--line));
  border-radius: 18px;
  background: rgba(255, 254, 250, .92);
  box-shadow: 0 18px 56px rgba(22, 20, 18, .12);
  backdrop-filter: blur(22px);
}
.api-connect-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.api-connect-head .eyebrow { display: none; }
.api-connect-head h2 {
  font-size: 13px;
  line-height: 1;
  margin: 0;
  letter-spacing: 0;
}
.api-connect-panel.is-connected #apiConnectStatus { display: none; }
.api-connect-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  margin-top: 10px;
}
.api-connect-form label {
  margin: 0;
  gap: 5px;
}
.api-connect-form label span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.api-connect-form input {
  min-height: 34px;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  background: rgba(255, 255, 255, .72);
}
.api-connect-form .portal-action {
  min-height: 34px;
  margin: 0;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
}
.api-ops {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.connected-pill {
  justify-self: start;
  border: 1px solid rgba(14, 140, 123, .24);
  border-radius: 999px;
  padding: 5px 9px;
  color: #0E8C7B;
  background: rgba(14, 140, 123, .08);
  font-size: 11px;
}
.api-ops .muted {
  margin: 0;
  font-size: 11px;
  line-height: 1.3;
}
.api-ops .portal-links {
  gap: 6px;
  margin-top: 2px;
}
.api-ops .portal-links a,
.api-ops .api-copy {
  padding: 5px 8px;
  font-size: 11px;
}
.api-copy {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  padding: 7px 10px;
  background: rgba(255, 254, 250, .7);
}
.api-copy:hover { border-color: var(--green); color: var(--green); }
main { width: min(1180px, calc(100vw - 36px)); margin: 0 auto; }
.hub-hero {
  min-height: 54vh;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(340px, .78fr);
  gap: clamp(24px, 4vw, 42px);
  align-items: center;
  padding: clamp(34px, 6vw, 72px) 0 24px;
}
.hero-copy { max-width: 760px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 760; text-transform: uppercase; letter-spacing: .18em; }
h1 { font-size: clamp(54px, 7.2vw, 74px); line-height: .96; margin: 8px 0 16px; letter-spacing: 0; max-width: 980px; }
h2 { font-size: clamp(26px, 3.5vw, 34px); line-height: 1.08; margin: 0 0 8px; letter-spacing: 0; }
h3 { margin: 0 0 8px; }
p { line-height: 1.65; }
.hub-hero p:not(.eyebrow), .muted { color: var(--muted); font-size: 16px; max-width: 640px; }
.hero-index {
  display: grid;
  gap: 8px;
  align-self: center;
  max-height: min(520px, 58vh);
  overflow: auto;
  padding: 2px 10px 2px 0;
  border-top: 0;
  perspective: 1200px;
  mask-image: linear-gradient(to bottom, transparent, #000 24px, #000 calc(100% - 24px), transparent);
  scrollbar-width: none;
}
.hero-index::-webkit-scrollbar { display: none; }
.hero-index-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--brand-primary, var(--blue)) 16%, transparent);
  border-radius: 999px;
  color: var(--brand-primary);
  padding: 8px 8px 8px 14px;
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--brand-primary, var(--blue)) 7%, transparent), rgba(255, 254, 250, .42) 54%, transparent),
    rgba(255, 254, 250, .32);
  box-shadow: 0 10px 34px rgba(22, 20, 18, .045);
  transform: translate3d(calc((var(--row-index, 0) % 2) * 10px), 10px, 0);
  opacity: 0;
  animation: row-flow .64s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: calc(var(--row-index, 0) * 32ms);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.hero-index-link {
  color: inherit;
  min-width: 0;
  text-decoration: none;
}
.hero-index-row:hover {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--brand-primary, var(--blue)) 14%, transparent), rgba(255, 254, 250, .68) 62%, transparent),
    rgba(255, 254, 250, .56);
  box-shadow: 0 14px 42px rgba(22, 20, 18, .08);
  transform: translate3d(6px, -1px, 0);
}
.hero-index-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-index-colors { display: flex; gap: 5px; }
.color-dot {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 999px;
  background: var(--dot);
  cursor: pointer;
  position: relative;
}
.color-dot.copied { outline: 2px solid var(--brand-primary, var(--blue)); outline-offset: 2px; }
.color-dot::after {
  content: attr(data-color-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  width: max-content;
  max-width: 220px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity .14s ease;
  z-index: 20;
}
.color-dot:hover::after,
.color-dot:focus-visible::after { opacity: 1; }
.icon-copy {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 999px;
  border-color: var(--brand-line, var(--line));
  background: color-mix(in srgb, var(--brand-paper, white) 88%, var(--brand-primary, var(--blue)));
  color: var(--brand-primary, var(--blue));
  display: grid;
  place-items: center;
}
.icon-copy svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; }
.icon-copy:hover,
.icon-copy.copied { background: var(--brand-primary, var(--blue)); color: var(--brand-button-text, white); }
.icon-copy.copied {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-primary, var(--blue)) 16%, transparent);
}
@keyframes row-rise {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes row-flow {
  to { opacity: 1; transform: translate3d(calc((var(--row-index, 0) % 2) * 6px), 0, 0); }
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  padding: 10px 0 18px;
  border-top: 1px solid var(--line);
}
.entry-portals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 20px);
  padding: 8px 0 34px;
}
.portal {
  border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  padding: 14px 0 0;
  min-height: 136px;
  display: grid;
  align-content: start;
}
.portal h3 {
  font-size: 21px;
  line-height: 1.1;
  margin: 8px 0 6px;
}
.portal p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
}
.portal-action {
  justify-self: start;
  margin-top: 16px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  min-height: 38px;
  padding: 9px 14px;
}
.portal-action:hover,
.portal-action.copied {
  background: var(--blue);
  border-color: var(--blue);
}
.portal-status {
  min-height: 18px;
  margin-top: 8px !important;
  color: var(--ink) !important;
  font-size: 12px !important;
  font-weight: 720;
}
.portal-points {
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.portal-points li::before {
  content: "+";
  margin-right: 6px;
  color: var(--blue);
  font-weight: 900;
}
.collab-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 14px;
  align-items: end;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 254, 250, .72);
}
.collab-mail {
  color: var(--ink);
  font-size: 17px;
  font-weight: 860;
  text-decoration: none;
}
.collab-mail:hover { color: var(--blue); }
.collab-card img {
  width: 108px;
  height: 108px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}
.portal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.portal-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  padding: 7px 10px;
  text-decoration: none;
  background: rgba(255, 254, 250, .7);
}
.portal-links a:hover { border-color: var(--blue); }
.history-panel {
  display: grid;
  grid-template-columns: minmax(220px, .44fr) minmax(0, 1fr);
  gap: 28px;
  padding: 4px 0 42px;
}
.version-list {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
}
.version-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.version-item strong { color: var(--ink); }
.version-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.section-head h2 { max-width: 560px; }
.count-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 11px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  background: rgba(255, 254, 250, .72);
}
.global-results {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(560px, calc(100vw - 36px));
  max-height: 420px;
  overflow: auto;
  display: none;
  z-index: 8;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 254, 250, .96);
  box-shadow: 0 18px 60px rgba(22, 20, 18, .14);
}
.global-results.is-open { display: grid; }
.global-result {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.global-result:last-child { border-bottom: 0; }
.global-result strong { color: var(--ink); }
.global-result small { color: var(--accent); font-weight: 760; }
.global-result span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button, button {
  appearance: none;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: white;
  text-decoration: none;
  padding: 11px 15px;
  min-height: 42px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}
.button.ghost { background: transparent; color: var(--blue); }
.lang-toggle {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
}
.ip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 14px 0 88px;
}
.empty-state {
  grid-column: 1 / -1;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.card, .panel, .guide, .resource {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.ip-card {
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 330px;
  background: var(--brand-paper, var(--paper));
  border-color: var(--brand-line, var(--line));
  color: var(--brand-ink, var(--ink));
  position: relative;
  border: 1px solid var(--brand-line, var(--line));
  border-radius: 8px;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.ip-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--brand-primary, var(--accent));
  z-index: 2;
}
.ip-card:hover { transform: translateY(-5px); border-color: var(--brand-primary, var(--line)); box-shadow: 0 22px 60px rgba(22, 20, 18, .12); }
.ip-card.theme-dark { background: var(--brand-paper); color: var(--brand-ink); }
.ip-card-link {
  color: inherit;
  display: flex;
  flex: 1;
  min-height: 100%;
  text-decoration: none;
}
.ip-card[data-brand="sidera"],
.ip-card[data-brand="manaendless"] { background: var(--brand-paper); }
.ip-card[data-brand="fengzhi"] { border-radius: 0; }
.ip-card[data-brand="kind"] { border-radius: 18px; }
.ip-card[data-brand="vanahom"]::before { width: 3px; }
.brand-sigil {
  align-self: flex-end;
  min-width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--brand-line);
  background: color-mix(in srgb, var(--brand-paper) 88%, transparent);
  color: var(--brand-primary);
  font-weight: 800;
}
.ip-card[data-brand="sidera"] .brand-sigil { background: var(--brand-secondary); color: var(--brand-ink); }
.ip-card[data-brand="kind"] .brand-sigil { border-radius: 999px; }
.ip-card[data-brand="fengzhi"] .brand-sigil { border-radius: 0; }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; min-height: 100%; }
.card-art {
  min-height: 150px;
  border: 1px solid var(--brand-line, var(--line));
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 22%, color-mix(in srgb, var(--brand-accent) 78%, transparent) 0 10%, transparent 28%),
    linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 24%, var(--brand-paper)) 0%, var(--brand-paper) 48%, color-mix(in srgb, var(--brand-secondary) 25%, var(--brand-paper)) 100%);
}
.card-art::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 38%, transparent);
  border-radius: 999px 999px 6px 6px;
  transform: rotate(-8deg);
}
.card-art::after {
  content: "";
  position: absolute;
  inset: auto 14px 14px auto;
  width: 44%;
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--brand-accent) 50%, transparent);
  background:
    linear-gradient(90deg, transparent 49%, color-mix(in srgb, var(--brand-primary) 30%, transparent) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, color-mix(in srgb, var(--brand-primary) 30%, transparent) 50%, transparent 51%);
  opacity: .72;
}
.ip-card[data-brand="tableai"] .card-art {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--brand-primary) 18%, transparent) 1px, transparent 1px),
    linear-gradient(0deg, color-mix(in srgb, var(--brand-primary) 12%, transparent) 1px, transparent 1px),
    linear-gradient(135deg, var(--brand-paper), color-mix(in srgb, var(--brand-accent) 24%, var(--brand-paper)));
  background-size: 26px 26px, 26px 26px, auto;
}
.ip-card[data-brand="vanahom"] .card-art::before { border-radius: 6px; transform: rotate(0); inset: 20px 42px; }
.ip-card[data-brand="kind"] .card-art::before { border-radius: 999px; inset: 18px 44px 16px 18px; }
.ip-card[data-brand="apha"] .card-art::before { border-radius: 60% 40% 50% 50%; transform: rotate(14deg); }
.ip-card[data-brand="manaendless"] .card-art,
.ip-card[data-brand="sidera"] .card-art,
.ip-card[data-brand="rgd"] .card-art {
  background:
    radial-gradient(circle at 70% 18%, color-mix(in srgb, var(--brand-accent) 62%, transparent) 0 9%, transparent 24%),
    linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 26%, var(--brand-paper)), var(--brand-paper));
}
.ip-card[data-brand="fengzhi"] .card-art::before { border-radius: 0; transform: rotate(0); inset: 22px; }
.ip-card[data-brand="axisee"] .card-art::after { width: 34%; border-radius: 999px; }
.ip-card[data-brand="boya"] .card-art::before { border-radius: 6px 999px 999px 6px; transform: rotate(-16deg); }
.art-code {
  position: absolute;
  left: 14px;
  bottom: 12px;
  color: var(--brand-primary);
  font-weight: 840;
  font-size: 13px;
}
.art-metric {
  position: absolute;
  right: 14px;
  top: 12px;
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 760;
}
.mini-palette { display: flex; gap: 6px; margin-top: 2px; }
.mini-swatch {
  width: 24px;
  height: 8px;
  border-radius: 999px;
  background: var(--dot);
  border: 1px solid rgba(0, 0, 0, .1);
}
.card-body .eyebrow { color: var(--brand-primary, var(--accent)); }
.card-body .muted, .card-body p { color: var(--brand-muted, var(--muted)); }
.card-body h2 { color: var(--brand-ink, var(--ink)); font-size: 30px; line-height: 1.02; margin: 2px 0 0; padding-right: 48px; }
.alt-name {
  min-height: 20px;
  font-size: 13px;
  letter-spacing: .02em;
}
.card-intro {
  font-size: 13px;
  line-height: 1.45;
  color: var(--brand-muted, var(--muted));
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}
.card-profile {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--brand-muted, var(--muted));
}
.card-profile span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copy-reference {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 3;
  min-height: 32px;
  max-width: 72px;
  padding: 7px 9px;
  border-radius: 999px;
  border-color: var(--brand-line, var(--line));
  background: color-mix(in srgb, var(--brand-paper, white) 86%, var(--brand-primary, var(--blue)));
  color: var(--brand-ink, var(--ink));
  font-size: 12px;
  line-height: 1;
}
.copy-reference:hover,
.copy-reference.copied {
  background: var(--brand-primary, var(--blue));
  border-color: var(--brand-primary, var(--blue));
  color: var(--brand-button-text, white);
}
.copy-manual {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: min(420px, calc(100vw - 36px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 18px 60px rgba(22, 20, 18, .18);
}
.copy-manual textarea {
  min-height: 120px;
  margin: 0;
  font-size: 12px;
}
.copy-manual button {
  width: 34px;
  min-height: 34px;
  padding: 0;
}
.toast-stack {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  display: grid;
  gap: 10px;
  z-index: 50;
  pointer-events: none;
}
.toast {
  max-width: min(360px, calc(100vw - 32px));
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 8px;
  background: rgba(10, 22, 38, .92);
  color: white;
  box-shadow: 0 16px 42px rgba(10, 22, 38, .22);
  backdrop-filter: blur(14px);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(8px);
  animation: toast-in .18s ease forwards;
}
.toast.is-leaving { animation: toast-out .18s ease forwards; }
@keyframes toast-in {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px); }
}
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; color: var(--muted); font-size: 13px; }
.pill {
  border: 1px solid var(--brand-line, var(--line));
  border-radius: 999px;
  padding: 4px 8px;
  background: color-mix(in srgb, var(--brand-primary, var(--blue)) 7%, var(--brand-paper, white));
  color: var(--brand-ink, var(--ink));
}
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.swatch {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}
.swatch-label { font-size: 12px; color: var(--brand-muted, var(--muted)); }
.brand-page { padding: 36px 0 90px; }
.brand-shell {
  margin: -36px calc((100vw - min(1180px, calc(100vw - 36px))) / -2) -90px;
  padding: 42px max(18px, calc((100vw - 1180px) / 2)) 90px;
  background: var(--brand-surface, var(--bg));
  color: var(--brand-ink, var(--ink));
  min-height: calc(100vh - 76px);
}
.brand-shell.theme-dark .top-note,
.brand-shell.theme-dark p,
.brand-shell.theme-dark .muted { color: var(--brand-muted); }
.brand-shell .eyebrow { color: var(--brand-primary, var(--accent)); }
.brand-shell h1, .brand-shell h2, .brand-shell h3 { color: var(--brand-ink, var(--ink)); }
.brand-shell .button {
  background: var(--brand-primary, var(--blue));
  border-color: var(--brand-primary, var(--blue));
  color: var(--brand-button-text, white);
}
.brand-shell .button.ghost {
  background: transparent;
  color: var(--brand-primary, var(--blue));
  border-color: var(--brand-primary, var(--blue));
}
.brand-shell.theme-dark .button.ghost { color: var(--brand-ink); border-color: var(--brand-line); }
.brand-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr); gap: clamp(22px, 4vw, 48px); align-items: center; margin-bottom: 36px; }
.brand-hero img { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.resource-list { display: grid; gap: 14px; margin: 24px 0; }
.resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.resource, .guide {
  background: var(--brand-paper, var(--paper));
  color: var(--brand-ink, var(--ink));
  border-color: var(--brand-line, var(--line));
}
.resource { padding: 18px; }
.guide { margin: 18px 0; padding: 22px; }
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--brand-ink, #262626);
  background: color-mix(in srgb, var(--brand-surface, #f5f3ee) 82%, var(--brand-paper, white));
  padding: 18px;
  border-radius: 6px;
  border: 1px solid var(--brand-line, var(--line));
  max-height: 560px;
  overflow: auto;
}
.admin { max-width: 980px; padding: 42px 0 90px; }
.panel { padding: 24px; margin-bottom: 18px; }
.hidden { display: none; }
label { display: grid; gap: 8px; font-size: 14px; font-weight: 700; margin: 12px 0; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
  background: white;
  color: var(--ink);
}
textarea { min-height: 520px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.notice { color: var(--green); font-weight: 700; }
@media (max-width: 760px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar-search { flex: 1 1 auto; width: 100%; max-width: none; order: 3; }
  nav { width: 100%; justify-content: space-between; gap: 10px; }
  .hub-hero, .brand-hero, .form-grid { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: 1fr; }
  .hub-hero { min-height: auto; padding-top: 36px; }
  .hero-index { align-self: stretch; }
  .hero-index-row { grid-template-columns: minmax(0, 1fr) auto; }
  .hero-index-colors { display: none; }
  .entry-portals { grid-template-columns: 1fr; }
  .collab-card { grid-template-columns: 1fr; align-items: start; }
  .history-panel { grid-template-columns: 1fr; }
  .version-item { grid-template-columns: 70px minmax(0, 1fr); }
  .version-item time { display: none; }
  .section-head { display: grid; align-items: start; }
  .ip-grid { grid-template-columns: 1fr; }
  .ip-card { min-height: 320px; }
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .card-body h2 { font-size: 24px; }
}
@media (min-width: 761px) and (max-width: 1080px) {
  .hub-hero { grid-template-columns: 1fr; min-height: auto; }
  .ip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}