.page-hero {
  padding: 56px 0 28px;
}

.lead-tight {
  padding: 28px 0 48px;
}

.lead-tight h1 {
  margin: 0 0 16px;
}

.form-compact textarea {
  min-height: 72px;
}

.media-frame {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.media-frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: start;
}

.sticky-aside {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}

.toc a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
  font-size: 0.9rem;
}

.article {
  max-width: 760px;
}

.article h2,
.article h3 {
  margin-top: 1.4em;
}


.article ul,
.article ol {
  color: var(--muted);
  padding-left: 1.2em;
}

.article li {
  margin: 0.35em 0;
}

.article li strong {
  color: var(--text);
}

.legal-toc {
  margin: 0 0 1.6em;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
}

.legal-toc a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
  font-size: 0.9rem;
}

.legal-toc a:hover {
  color: var(--accent-hot);
}

.note {
  border-left: 3px solid var(--accent);
  padding: 12px 14px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 0 12px 12px 0;
}

.compare-yes {
  color: var(--ok);
  font-weight: 700;
}

.compare-no {
  color: var(--bad);
}

.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.media-frame {
  transition: transform 500ms var(--ease), box-shadow 500ms var(--ease);
}

.media-frame:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px var(--accent-glow);
}

.media-frame img {
  transition: transform 900ms var(--ease);
}

.media-frame:hover img {
  transform: scale(1.03);
}

.feat {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.feat li {
  position: relative;
  padding: 7px 0 7px 16px;
  color: var(--text);
  font-size: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.feat li:last-child {
  border-bottom: 0;
}

.feat li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.notice {
  border: 1px solid var(--line);
  background: var(--bg-3);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 0.94rem;
  color: var(--muted);
}

.notice p {
  margin: 0 0 10px;
}

.notice p:last-child {
  margin: 0;
}

.expand-bar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 8px;
}

.text-btn,
.more {
  margin-top: 14px;
  font-size: 0.86rem;
  color: var(--accent-hot);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  font-weight: 650;
}

.expand-bar .text-btn {
  margin: 0;
  color: var(--muted);
}

.text-btn:hover,
.more:hover,
.expand-bar .text-btn:hover {
  color: var(--accent);
}

.expand-body {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 280ms var(--ease), opacity 200ms var(--ease), margin 200ms, padding 200ms;
  overflow: hidden;
}

.expand-inner {
  overflow: hidden;
  min-height: 0;
}

.expand-inner p {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: var(--muted);
}

.expand-inner p:last-child {
  margin-bottom: 0;
}

.tile.open,
.card.open {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--card) 88%, var(--accent-dim));
}

.tile.open .expand-body,
.card.open .expand-body {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.tile .num,
.card .num {
  font-family: var(--font-mono);
  color: var(--accent-hot);
  font-size: 12px;
  margin-bottom: 10px;
}

.live-feed {
  display: grid;
  gap: 8px;
}

.feed-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  font-size: 0.86rem;
  animation: feed-in 420ms var(--ease);
}

@keyframes feed-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.pill {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.pill.block {
  background: color-mix(in srgb, var(--bad) 16%, transparent);
  color: var(--bad);
}

.pill.flag {
  background: color-mix(in srgb, var(--warn) 16%, transparent);
  color: var(--warn);
}

.pill.clear {
  background: var(--accent-dim);
  color: var(--accent-hot);
}

.inspector {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: start;
}

.inspector:not(:has(aside)) {
  grid-template-columns: 1fr;
}

.plat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.plat-btn {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  min-height: 64px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  transition: 160ms var(--ease);
}

.plat-btn img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: contain;
  background: #0b1018;
}

.plat-btn span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.plat-btn small {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plat-btn.on,
.plat-btn:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.plat-btn.on {
  box-shadow: inset 3px 0 0 var(--accent);
}

.plat-detail {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  min-height: 280px;
}

.spec-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.spec-head h3 {
  margin: 0;
}

.spec-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: contain;
  background: #0b1018;
}

.spec-watch {
  margin: 14px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 0 12px 12px 0;
}

.mod-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mega.has-preview {
  min-width: 860px;
  align-items: stretch;
}

.nav-item:hover .mega.has-preview,
.nav-item:focus-within .mega.has-preview {
  display: flex;
  flex-wrap: wrap;
}

.mega.has-preview > div:not(.mega-preview) {
  flex: 1;
  min-width: 0;
}

.mega-preview {
  flex: 0 0 300px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
  max-height: min(70vh, 520px);
  overflow: auto;
  order: 10;
}

.mega-preview .feat {
  margin-top: 8px;
}

.mega-preview .spec-watch {
  font-size: 0.8rem;
}

.mega-preview h3 {
  font-size: 1.05rem;
}

.plat-detail h3 {
  margin-bottom: 8px;
}

.plat-detail p {
  font-size: 0.94rem;
  color: var(--muted);
}

.kv {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.kv div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.kv b {
  color: var(--text);
  font-weight: 650;
}

.kv span {
  color: var(--muted);
  text-align: right;
}

.rule-lab {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
  align-items: start;
}

.rule-lab .lab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rule-lab label {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--faint);
}

.rule-lab input,
.rule-lab select {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 8px 10px;
  color: var(--text);
}

.pack-lab {
  align-items: stretch;
}

.price-card {
  display: flex;
  flex-direction: column;
}

.price-card .checks {
  flex: 1;
  margin: 12px 0 18px;
}

.price-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

.path-grid .tile p + p {
  margin-top: 12px;
}

.pack-group + .pack-group {
  margin-top: 4px;
}

.pack-label {
  margin: 16px 0 8px;
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pack-mods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pack-mod {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}

.pack-mod-text {
  min-width: 0;
}

.pack-mod-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.pack-tag {
  display: inline-block;
  flex: none;
  margin-left: 0;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}

.pack-mod input {
  margin-top: 3px;
  min-height: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.pack-mod small {
  display: block;
  margin-top: 4px;
  font-weight: 450;
  color: var(--muted);
}

.pack-mod.on,
.pack-mod:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.pack-mod.is-core {
  cursor: default;
}

.pack-mod.is-core {
  opacity: 0.92;
}

.pack-mod.is-bundled small::after {
  content: " · included";
  color: var(--accent);
}

.lab-out {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--accent-hot);
  background: var(--bg);
  border-radius: 12px;
  padding: 16px;
  margin: 0;
  white-space: pre-wrap;
  min-height: 100%;
}

.tab-panels {
  min-height: 12rem;
}

.jump-row {
  margin-top: 8px;
}

a.chip {
  text-decoration: none;
  color: var(--muted);
}

a.chip:hover {
  color: var(--accent-hot);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.spec-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.spec-modal[hidden] {
  display: none;
}

.spec-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: color-mix(in srgb, #050814 72%, transparent);
  cursor: pointer;
}

.spec-modal-panel {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  max-height: min(86vh, 740px);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 24px 24px;
  box-shadow: var(--shadow);
}

.spec-modal-x {
  position: absolute;
  top: 12px;
  right: 12px;
}

.lead-thanks .spec-modal-panel {
  width: min(420px, 100%);
  text-align: center;
  padding: 36px 28px 32px;
}

.lead-thanks h2 {
  margin: 8px 0 0;
  font-size: 1.35rem;
  line-height: 1.35;
}

#layers,
#pipeline,
#classes,
#library,
#monitor {
  scroll-margin-top: calc(var(--nav-h) + 12px);
}

.rule-grid {
  max-height: min(70vh, 640px);
  overflow: auto;
  padding-right: 4px;
}

.page-board {
  display: grid;
  gap: 8px;
}

.page-board .od-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.page-board .od-row.on,
.page-board .od-row:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.od-n {
  font-family: var(--font-mono);
  font-size: 0.86rem;
}

.od-n.up {
  color: var(--ok);
}

.od-tag {
  font-size: 11px;
  font-weight: 650;
  color: var(--faint);
  flex-shrink: 0;
}

.od-tag.ok {
  color: var(--ok);
}

.heat-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.heat-grid button {
  aspect-ratio: 1;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  background: var(--bg-3);
}

.heat-grid button.g { background: color-mix(in srgb, var(--ok) 55%, var(--bg-3)); }
.heat-grid button.m { background: color-mix(in srgb, var(--accent) 45%, var(--bg-3)); }
.heat-grid button.l { background: color-mix(in srgb, var(--bad) 40%, var(--bg-3)); }
.heat-grid button.on { outline: 2px solid var(--accent); }

.flow-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.flow-preview .od-node {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: inherit;
  font: inherit;
  border-radius: 12px;
  padding: 10px 14px;
  text-align: left;
}

.flow-preview .od-node small {
  display: block;
  color: var(--faint);
  font-size: 11px;
  margin-bottom: 2px;
}

.flow-preview .od-node.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.od-wire {
  width: 28px;
  height: 2px;
  background: var(--line);
  flex-shrink: 0;
}

.faq-filter {
  width: 100%;
  max-width: 420px;
  margin-bottom: 18px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
  .sticky-aside,
  .plat-detail {
    position: static;
  }
  .stats-bar,
  .inspector,
  .rule-lab,
  .rule-lab .lab-grid,
  .pack-mods {
    grid-template-columns: 1fr;
  }
  .mod-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mega.has-preview {
    flex-direction: column;
    min-width: 0;
  }
  .mega-preview {
    flex: none;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 16px;
    max-height: none;
  }
  .mega-logos {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .plat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .plat-grid,
  .mod-grid {
    grid-template-columns: 1fr;
  }
  .fc-1,
  .fc-2 {
    display: none;
  }
}
