/* Estland 2 public portal — professional dark UI v3
   Compact, content-first and future-proof. */
:root {
  --portal-language-height: 30px;
  --portal-header-height: 60px;
  --portal-max: 1280px;
  --portal-bg: #070d16;
  --portal-bg-2: #0a121e;
  --portal-surface: #101a28;
  --portal-surface-strong: #142131;
  --portal-surface-soft: #0c1522;
  --portal-line: #243246;
  --portal-line-soft: rgba(151, 168, 193, 0.13);
  --portal-line-strong: #34465f;
  --portal-text: #f3f5f8;
  --portal-soft: #c8d0db;
  --portal-muted: #8996a8;
  --portal-accent: #d5a44d;
  --portal-accent-strong: #f0c56f;
  --portal-accent-soft: rgba(213, 164, 77, 0.12);
  --portal-gold: #d5a44d;
  --portal-green: #69c88d;
  --portal-red: #e07878;
  --portal-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  --portal-radius: 10px;
  --portal-radius-small: 7px;
  --shell: var(--portal-max);
  --header-height: calc(var(--portal-language-height) + var(--portal-header-height));
  /* Override legacy theme tokens so old components also stay navy/gold. */
  --bg: #070d16;
  --bg-soft: #0a121e;
  --bg-elevated: #101a28;
  --surface: #101a28;
  --surface-strong: #142131;
  --surface-soft: rgba(255,255,255,.025);
  --surface-bright: rgba(255,255,255,.045);
  --line: #243246;
  --line-strong: #34465f;
  --line-gold: rgba(213,164,77,.34);
  --text: #f3f5f8;
  --text-soft: #c8d0db;
  --muted: #8996a8;
  --muted-2: #69778b;
  --gold: #d5a44d;
  --gold-2: #efc36e;
  --gold-deep: #9b7131;
  --cyan: #8da4bb;
  --blue: #8299b2;
  --purple: #d5a44d;
}

html {
  scroll-padding-top: calc(var(--header-height) + 14px);
  background: var(--portal-bg);
}

body {
  color: var(--portal-text);
  background: var(--portal-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.018), transparent 180px),
    linear-gradient(90deg, transparent, rgba(255,255,255,.01) 50%, transparent);
}

.ambient-stage,
.ambient-aura,
.ambient-orb,
.ambient-grid,
.ambient-noise {
  display: none !important;
}

.shell {
  width: min(var(--portal-max), calc(100% - 32px));
}

/* Utility language bar */
.site-language-bar {
  height: var(--portal-language-height);
  border-bottom: 1px solid #182436;
  background: #060b12;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-language-inner {
  justify-content: flex-end;
  gap: 9px;
}

.site-language-inner > span {
  font-size: .64rem;
  color: #738096;
  letter-spacing: .1em;
}

.site-language-options {
  height: 24px;
  gap: 1px;
  padding: 2px;
  border: 1px solid #1a2638;
  border-radius: 6px;
  background: #0a111c;
}

.site-language-options button {
  min-width: 32px;
  height: 18px;
  padding: 0 7px;
  border-radius: 4px;
  color: #7e8a9e;
  font-size: .64rem;
}

.site-language-options button:hover,
.site-language-options button:focus-visible {
  color: #f6f7f9;
  background: #182436;
}

.site-language-options button.is-active {
  color: #101419;
  background: var(--portal-accent-strong);
  box-shadow: none;
}

/* Header */
.site-header.portal-header {
  height: var(--portal-header-height);
  border-bottom: 1px solid #202d40;
  background: rgba(9, 16, 27, .98);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.portal-header-inner {
  min-height: var(--portal-header-height);
  gap: 28px;
}

.portal-brand {
  gap: 9px;
}

.portal-brand-mark {
  width: 36px;
  height: 36px;
  padding: 5px;
  border: 1px solid #2b3a50;
  border-radius: 8px;
  background: #101a28;
  box-shadow: none;
}

.portal-brand strong {
  font-size: .93rem;
  letter-spacing: -.01em;
}

.portal-brand em {
  color: #7d899b;
  font-size: .66rem;
}

.portal-primary-nav {
  justify-content: flex-start;
  gap: 3px;
}

.portal-primary-nav a,
.portal-more-button {
  position: relative;
  min-height: 59px;
  padding: 0 13px;
  border: 0;
  border-radius: 0;
  color: #aeb8c7;
  background: transparent;
  font-size: .8rem;
  font-weight: 720;
}

.portal-primary-nav a::after,
.portal-more-button::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 0;
  height: 2px;
  background: transparent;
}

.portal-primary-nav a:hover,
.portal-primary-nav a:focus-visible,
.portal-primary-nav a.is-active,
.portal-more-button:hover,
.portal-more-button:focus-visible,
.portal-more-button[aria-expanded="true"] {
  color: #fff;
  border-color: transparent;
  background: #0e1826;
}

.portal-primary-nav a.is-active::after,
.portal-more-button[aria-expanded="true"]::after {
  background: var(--portal-accent);
}

.portal-header-actions {
  gap: 7px;
}

.portal-more-button {
  min-height: 42px;
  border-radius: 6px;
}

.portal-more-button::after {
  display: none;
}

.portal-play-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #e1b35c;
  border-radius: 7px;
  color: #17130c;
  background: #d8aa54;
  font-size: .8rem;
  box-shadow: none;
}

.portal-play-button:hover,
.portal-play-button:focus-visible {
  transform: none;
  background: #e8bb65;
  box-shadow: none;
}

.portal-mobile-menu-button {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  border-color: #2b3a50;
  background: #111b29;
}

/* Menus */
.portal-more-menu {
  top: calc(100% + 7px);
  width: min(470px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid #2b3b51;
  border-radius: 9px;
  background: #0d1724;
  box-shadow: 0 18px 46px rgba(0,0,0,.38);
  backdrop-filter: none;
}

.portal-more-grid {
  gap: 4px;
}

.portal-more-grid a {
  min-height: 50px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #101b2a;
}

.portal-more-grid a:hover,
.portal-more-grid a:focus-visible,
.portal-more-grid a.is-active {
  color: #fff;
  border-color: #5b4827;
  background: #181b1c;
}

.portal-menu-icon {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  color: #e5bd70;
  background: rgba(213,164,77,.1);
}

.portal-drawer-backdrop {
  background: rgba(2, 6, 11, .78);
}

.portal-mobile-drawer {
  width: min(390px, calc(100vw - 28px));
  padding: 14px;
  border-left: 1px solid #2b3a50;
  background: #0a121e;
  box-shadow: -22px 0 50px rgba(0,0,0,.42);
}

.portal-drawer-head {
  padding-bottom: 12px;
  border-bottom: 1px solid #213047;
}

.portal-drawer-links {
  gap: 5px;
}

.portal-drawer-links a {
  min-height: 50px;
  border-radius: 7px;
  border-color: #1d2a3d;
  background: #0f1927;
}

.portal-drawer-links a.is-active {
  border-color: #755d31;
  background: rgba(213,164,77,.1);
}

.portal-drawer-play {
  min-height: 46px;
  border-radius: 7px;
  color: #17130c;
  background: #d8aa54;
}

/* Global content */
.content-page {
  padding-top: 20px;
  padding-bottom: 36px;
}

.surface-card {
  border: 1px solid var(--portal-line) !important;
  border-radius: var(--portal-radius) !important;
  background: var(--portal-surface) !important;
  box-shadow: none !important;
}

.surface-card::before {
  display: none !important;
}

.kicker,
.eyebrow-live,
.micro-pill,
.status-pill,
.roadmap-priority,
.content-tag {
  min-height: 22px;
  padding: 0 8px;
  border-radius: 5px;
  font-size: .61rem;
  letter-spacing: .08em;
}

.kicker,
.micro-pill {
  color: #e7c57e !important;
  border-color: #5c4828 !important;
  background: rgba(213,164,77,.09) !important;
}

.eyebrow-live {
  color: #a9e2bd !important;
  border-color: rgba(105,200,141,.3) !important;
  background: rgba(105,200,141,.09) !important;
}

.button,
.danger-button,
.read-more-button,
.copy-code-button {
  min-height: 38px;
  padding: 0 13px;
  border-radius: 6px;
  font-size: .79rem;
  box-shadow: none !important;
}

.button-large,
.button-xl {
  min-height: 42px;
  padding: 0 16px;
  font-size: .82rem;
}

.button:hover,
.danger-button:hover,
.read-more-button:hover,
.copy-code-button:hover {
  transform: none;
}

.button-primary,
.copy-code-button {
  color: #17130c !important;
  border-color: #d9aa54 !important;
  background: #d8aa54 !important;
}

.button-primary:hover,
.copy-code-button:hover {
  background: #e8bb65 !important;
}

.button-subtle,
.button-glass,
.read-more-button {
  color: var(--portal-soft) !important;
  border-color: #2a3950 !important;
  background: #111c2a !important;
}

.button-subtle:hover,
.button-glass:hover,
.read-more-button:hover {
  color: #fff !important;
  border-color: #3b4d66 !important;
  background: #172334 !important;
}

.page-hero,
.rules-hero {
  position: relative;
  padding: 22px 24px !important;
  border-left: 3px solid var(--portal-accent) !important;
  background: #0e1826 !important;
}

.page-hero h1,
.rules-hero h1,
.hero-command-card h1 {
  max-width: none;
  font-size: clamp(1.8rem, 2.6vw, 2.65rem) !important;
  line-height: 1.08 !important;
  letter-spacing: -.035em !important;
}

.page-hero p,
.rules-hero-copy > p,
.hero-description {
  max-width: 72ch;
  color: #aeb8c7 !important;
  font-size: .91rem !important;
  line-height: 1.55 !important;
}

.page-hero-split {
  grid-template-columns: minmax(0, 1fr) minmax(270px, .5fr);
  gap: 22px;
}

.page-hero-tools {
  gap: 10px;
}

.search-field,
.field {
  gap: 5px;
}

.search-field > span,
.field > span {
  color: #8e9aac;
  font-size: .68rem;
  letter-spacing: .03em;
}

.search-field input,
.field input,
.field textarea,
.field select {
  min-height: 40px;
  border: 1px solid #2a3950 !important;
  border-radius: 6px !important;
  background: #09121e !important;
  color: #f2f4f7 !important;
  box-shadow: none !important;
}

.search-field input:focus,
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: #9a773d !important;
  box-shadow: 0 0 0 3px rgba(213,164,77,.08) !important;
}

.filter-row {
  gap: 5px;
}

.filter-button {
  min-height: 32px;
  padding: 0 11px;
  border-radius: 5px;
  border-color: #2b3a50;
  color: #9eabba;
  background: #0f1927;
  font-size: .72rem;
}

.filter-button:hover,
.filter-button.is-active {
  color: #f7f3ea;
  border-color: #735b31;
  background: rgba(213,164,77,.1);
}

/* Home */
.hero-premium-grid {
  padding: 20px 0 16px;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
  gap: 14px;
}

.hero-command-card {
  min-height: 0 !important;
  padding: 30px !important;
  gap: 16px !important;
  border-top: 2px solid var(--portal-accent) !important;
  background: #0f1927 !important;
}

.hero-command-card h1 {
  max-width: 15ch;
  margin: 4px 0 0;
  font-size: clamp(2.15rem, 4vw, 3.65rem) !important;
}

.hero-overline-row {
  gap: 7px;
}

.hero-actions {
  gap: 8px;
}

.hero-trust-grid {
  gap: 1px;
  margin-top: 4px;
  border: 1px solid #243246;
  border-radius: 7px;
  overflow: hidden;
  background: #243246;
}

.hero-trust-grid article {
  min-height: 54px;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  background: #0c1522;
}

.hero-trust-grid strong {
  font-size: .78rem;
  line-height: 1.3;
}

.hero-intelligence-stack {
  gap: 10px;
}

.intelligence-card,
.social-command-card,
.portal-panel,
.page-hero,
.codes-panel,
.roadmap-metrics-card,
.leaderboard-selector-card,
.leaderboard-board-card,
.leaderboard-stats-card,
.report-form-card,
.known-issues-card,
.stat-rail-card,
.rail-cta-card {
  padding: 18px !important;
}

.card-head,
.portal-panel-head,
.feed-heading {
  gap: 12px;
}

.card-head h2,
.portal-panel-head h3,
.feed-heading h2,
.known-issues-card h2,
.report-form-card h2,
.leaderboard-stats-card h2,
.leaderboard-board-head h2 {
  font-size: 1.12rem !important;
  line-height: 1.2 !important;
  letter-spacing: -.02em !important;
}

.premium-stat-grid {
  gap: 1px;
  overflow: hidden;
  border: 1px solid #243246;
  border-radius: 7px;
  background: #243246;
}

.roblox-stat {
  min-height: 86px;
  padding: 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #0c1522 !important;
}

.roblox-stat strong,
.hero-mini-metrics strong,
.rail-metrics strong,
.leaderboard-stat-grid strong {
  font-size: clamp(1.25rem, 2vw, 1.75rem) !important;
}

.roblox-stat span,
.roblox-stat small {
  font-size: .67rem;
}

.compact-link-grid {
  gap: 6px;
}

.compact-link-card {
  padding: 12px !important;
  border-radius: 6px !important;
  border-color: #243246 !important;
  background: #0c1522 !important;
}

.compact-link-card:hover {
  border-color: #6f5730 !important;
  background: #101a28 !important;
}

.signal-board-section {
  padding-top: 12px;
  padding-bottom: 32px;
}

.section-intro {
  margin-bottom: 10px;
}

.section-intro h2 {
  margin-top: 6px;
  font-size: clamp(1.35rem, 2vw, 1.75rem) !important;
  letter-spacing: -.025em !important;
}

.signal-board-grid {
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 10px;
}

.portal-panel {
  min-width: 0;
  min-height: 0;
  border-radius: 8px !important;
}

.portal-panel-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #243246;
}

.portal-panel-head h3 {
  margin-top: 4px;
  white-space: normal;
}

.text-link {
  color: #e0b969 !important;
  font-size: .72rem !important;
  white-space: nowrap;
}

.signal-stack,
.updates-list,
.shop-items-grid,
.promo-codes-grid,
.known-issues-list,
.roadmap-grid {
  gap: 8px !important;
}

.signal-card,
.home-post,
.update-card,
.shop-item-card,
.promo-code-card,
.known-issue-card,
.roadmap-card,
.leaderboard-row,
.preview-card {
  padding: 13px !important;
  border: 1px solid #243246 !important;
  border-radius: 7px !important;
  background: #0b1522 !important;
  box-shadow: none !important;
}

.signal-card:hover,
.home-post:hover,
.update-card:hover,
.shop-item-card:hover,
.promo-code-card:hover,
.known-issue-card:hover,
.roadmap-card:hover,
.leaderboard-row:hover {
  transform: none !important;
  border-color: #4f5f74 !important;
  background: #0e1928 !important;
}

.signal-card strong,
.home-post strong,
.update-card h3,
.shop-item-card h3,
.promo-code-card h3,
.known-issue-card h3,
.roadmap-card h3,
.preview-card h3 {
  font-size: .88rem !important;
  line-height: 1.35 !important;
}

.signal-card p,
.home-post p,
.update-card p,
.shop-item-card p,
.known-issue-card p,
.roadmap-card p,
.preview-card p {
  color: #9eabba !important;
  font-size: .78rem !important;
  line-height: 1.5 !important;
}

.richest-ribbon {
  border-bottom: 1px solid #1e2c3f;
  background: #0b1421;
}

.richest-ribbon-inner {
  min-height: 38px;
  gap: 7px;
  font-size: .72rem;
}

/* Secondary page layouts */
.content-grid-with-rail,
.shop-layout,
.reports-layout,
.leaderboard-hub-layout,
.rules-layout,
.codes-layout {
  gap: 14px !important;
}

.content-grid-with-rail {
  grid-template-columns: 220px minmax(0, 1fr) !important;
}

.content-rail {
  gap: 10px;
}

.stat-rail-card,
.rail-cta-card {
  border-radius: 8px !important;
}

.rail-metrics,
.hero-mini-metrics,
.leaderboard-stat-grid {
  gap: 1px !important;
  border: 1px solid #243246;
  border-radius: 7px;
  overflow: hidden;
  background: #243246;
}

.rail-metrics article,
.hero-mini-metrics article,
.leaderboard-stat-grid article {
  padding: 11px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #0b1522 !important;
}

.feed-heading-main {
  margin-top: 4px;
  margin-bottom: 10px;
}

.pinned-grid,
.shop-featured-grid {
  gap: 8px !important;
}

/* Codes */
.codes-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr) !important;
}

.codes-panel {
  border-radius: 8px !important;
}

.promo-code-card.is-expired {
  opacity: .65;
}

/* Roadmap */
.roadmap-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.roadmap-card.status-in_progress,
.roadmap-card.status-testing,
.roadmap-card.status-released {
  border-left: 2px solid var(--portal-accent) !important;
}

/* Leaderboards */
.leaderboard-hub-layout {
  grid-template-columns: 270px minmax(0, 1fr) !important;
}

.leaderboard-selector-button {
  min-height: 44px !important;
  border-radius: 6px !important;
  border-color: #243246 !important;
  background: #0b1522 !important;
}

.leaderboard-selector-button:hover,
.leaderboard-selector-button.is-active {
  border-color: #745c32 !important;
  background: rgba(213,164,77,.1) !important;
}

.leaderboard-row.is-champion,
.leaderboard-row.is-podium:not(.is-champion) {
  background: #101a28 !important;
}

/* Rules */
.rules-language-strip {
  display: none !important;
}

.rules-hero {
  grid-template-columns: minmax(0, 1fr) !important;
}

.rules-hero h1 {
  margin: 8px 0 11px !important;
  font-size: clamp(1.8rem, 2.6vw, 2.45rem) !important;
}

.rules-alert {
  max-width: 900px;
  margin-top: 16px !important;
  padding: 12px 13px !important;
  border-radius: 7px !important;
  border-color: rgba(224,120,120,.35) !important;
  background: rgba(224,120,120,.07) !important;
}

.rules-alert-icon {
  width: 28px !important;
  height: 28px !important;
  border-radius: 5px !important;
  color: #fff !important;
  background: #b75f5f !important;
  box-shadow: none !important;
}

.rules-layout {
  grid-template-columns: 220px minmax(0, 1fr) !important;
}

.rules-toc-card {
  top: calc(var(--header-height) + 14px) !important;
  padding: 15px !important;
  border-radius: 8px !important;
}

.rules-toc-card h2 {
  font-size: 1.2rem !important;
}

.rules-toc-list {
  gap: 4px !important;
}

.rules-toc-link {
  min-height: 44px !important;
  padding: 7px 8px !important;
  border-radius: 6px !important;
}

.rules-toc-link:hover,
.rules-toc-link:focus-visible {
  transform: none !important;
  border-color: #6b552f !important;
  background: rgba(213,164,77,.08) !important;
}

.rules-toc-link span {
  width: 28px !important;
  height: 28px !important;
  border-radius: 5px !important;
  color: #e4bd70 !important;
  background: rgba(213,164,77,.09) !important;
}

.rule-card {
  grid-template-columns: 66px minmax(0, 1fr) !important;
  border-radius: 8px !important;
}

.rule-card:hover {
  transform: none !important;
  border-color: #34465f !important;
  box-shadow: none !important;
}

.rule-number-rail {
  padding: 18px 10px !important;
  background: #0c1522 !important;
}

.rule-number-rail strong {
  font-size: 1.45rem !important;
}

.rule-card-content {
  padding: 20px !important;
}

.rule-icon {
  width: 40px !important;
  height: 40px !important;
  border-radius: 7px !important;
  color: #e2b969 !important;
  border-color: #604b2a !important;
  background: rgba(213,164,77,.08) !important;
}

.rule-icon svg {
  width: 21px !important;
  height: 21px !important;
}

.rule-heading-row h2 {
  margin-top: 4px !important;
  font-size: clamp(1.18rem, 1.8vw, 1.55rem) !important;
}

.rule-intro {
  margin-top: 14px !important;
  font-size: .86rem !important;
}

.rule-points {
  margin-top: 15px !important;
  gap: 6px !important;
}

.rule-points li {
  padding: 10px 11px !important;
  border-radius: 6px !important;
  background: #0b1522 !important;
}

.rule-points li > span {
  width: 24px !important;
  height: 24px !important;
  border-radius: 5px !important;
  background: #71c68f !important;
}

.rule-points p {
  font-size: .82rem !important;
}

.rule-callout,
.rule-card blockquote {
  margin-top: 14px !important;
  border-radius: 6px !important;
}

.rules-report-cta {
  padding: 20px !important;
  border-radius: 8px !important;
  background: #0e1826 !important;
}

.rules-report-cta h2 {
  font-size: 1.4rem !important;
}

/* Reports */
.reports-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr) !important;
}

/* Footer */
.site-footer.portal-footer {
  margin-top: 0;
  border-top: 1px solid #202d40;
  background: #070c13;
}

.portal-footer-grid {
  padding: 26px 0 30px;
  grid-template-columns: minmax(240px, 1.3fr) minmax(160px, .5fr) minmax(160px, .5fr);
  gap: 30px;
}

.portal-footer-brand p {
  margin-top: 12px;
  font-size: .7rem;
}

.portal-footer-grid nav {
  gap: 6px;
}

.portal-footer-grid nav > strong {
  color: #7f8b9e;
  font-size: .62rem;
}

.portal-footer-grid nav a {
  font-size: .76rem;
}

/* Mobile */
@media (max-width: 1080px) {
  .portal-header-inner {
    gap: 15px;
  }

  .portal-primary-nav a {
    padding: 0 10px;
  }

  .hero-premium-grid {
    grid-template-columns: 1fr;
  }

  .hero-intelligence-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-board-grid > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .portal-primary-nav,
  .portal-more-button {
    display: none;
  }

  .content-grid-with-rail,
  .shop-layout,
  .reports-layout,
  .leaderboard-hub-layout,
  .rules-layout,
  .codes-layout {
    grid-template-columns: 1fr !important;
  }

  .roadmap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .content-rail,
  .shop-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    display: grid;
  }
}

@media (max-width: 720px) {
  :root {
    --portal-language-height: 28px;
    --portal-header-height: 54px;
  }

  .shell {
    width: min(100% - 20px, var(--portal-max));
  }

  .site-language-inner {
    justify-content: center;
  }

  .site-language-inner > span {
    display: none;
  }

  .portal-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 7px;
  }

  .portal-brand em {
    display: none;
  }

  .portal-play-button {
    min-height: 36px;
    padding: 0 10px;
  }

  .portal-mobile-menu-button {
    width: 36px;
    height: 36px;
  }

  body {
    padding-bottom: 64px;
  }

  .mobile-bottom-nav.portal-mobile-dock {
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 58px;
    padding: 4px 6px max(4px, env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid #2b3a50;
    border-radius: 0;
    gap: 1px;
    background: #09111c;
    box-shadow: 0 -10px 26px rgba(0,0,0,.28);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .portal-dock-item {
    position: relative;
    min-height: 50px;
    border-radius: 5px;
    color: #7e8b9e;
    font-size: .59rem;
  }

  .portal-dock-item::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 24%;
    right: 24%;
    height: 2px;
    background: transparent;
  }

  .portal-dock-item.is-active {
    color: #f1cc82;
    background: #101a28;
  }

  .portal-dock-item.is-active::before {
    background: var(--portal-accent);
  }

  .portal-dock-play {
    color: #17130c;
    background: #d8aa54;
  }

  .content-page {
    padding-top: 12px;
    padding-bottom: 22px;
  }

  .page-hero,
  .rules-hero,
  .hero-command-card {
    padding: 18px !important;
  }

  .page-hero h1,
  .rules-hero h1,
  .hero-command-card h1 {
    font-size: clamp(1.65rem, 7.5vw, 2.15rem) !important;
  }

  .hero-premium-grid {
    padding-top: 12px;
  }

  .hero-command-card h1 {
    max-width: none;
  }

  .hero-intelligence-stack,
  .signal-board-grid {
    grid-template-columns: 1fr;
  }

  .signal-board-grid > :first-child {
    grid-column: auto;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-trust-grid {
    grid-template-columns: 1fr;
  }

  .premium-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-rail,
  .shop-sidebar {
    grid-template-columns: 1fr;
  }

  .filter-row {
    width: calc(100vw - 32px);
  }

  .roadmap-grid {
    grid-template-columns: 1fr !important;
  }

  .rules-toc-list {
    grid-template-columns: 1fr !important;
  }

  .rule-card {
    grid-template-columns: 1fr !important;
  }

  .rule-number-rail {
    padding: 9px 13px !important;
    flex-direction: row;
    justify-content: flex-start;
    border-right: 0;
    border-bottom: 1px solid #243246;
  }

  .rule-card-content {
    padding: 16px !important;
  }

  .rules-report-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-footer-grid {
    padding-bottom: 74px;
    grid-template-columns: 1fr 1fr;
    gap: 22px 16px;
  }

  .portal-footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 440px) {
  .premium-stat-grid,
  .portal-footer-grid {
    grid-template-columns: 1fr;
  }

  .portal-footer-brand {
    grid-column: auto;
  }
}

/* Final density tuning */
body.portal-shell,
body.portal-shell main,
.page-home,
.page-home main {
  background: var(--portal-bg) !important;
}

.hero-premium-grid {
  align-items: stretch !important;
}

.hero-command-card {
  height: 100%;
}

.hero-command-card h1 {
  font-size: clamp(2.05rem, 3.5vw, 3.25rem) !important;
}

.intelligence-card {
  padding: 15px !important;
}

.social-command-card {
  padding: 14px !important;
}

.roblox-stat {
  min-height: 72px !important;
  padding: 10px !important;
}

.compact-link-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.compact-link-card {
  min-width: 0;
}

.compact-link-card em {
  display: none;
}

@media (max-width: 720px) {
  .compact-link-grid {
    grid-template-columns: 1fr !important;
  }

  .mobile-bottom-nav.portal-mobile-dock {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border-radius: 0 !important;
  }
}
