:root {
  --bg-page: #faf8f3;
  --bg-page-strong: #f7f5f1;
  --surface: #ffffff;
  --surface-soft: #f3f0ea;
  --surface-muted: #f8f5f0;
  --text-main: #171717;
  --text-muted: #6f6a63;
  --text-soft: #8b847a;
  --border-soft: #e4e0d8;
  --border-strong: #ddd7ce;
  --accent: #008c7a;
  --accent-dark: #006f61;
  --accent-soft: rgba(0, 140, 122, 0.1);
  --navy: #11152a;
  --navy-soft: #151730;
  --danger: #d85d78;
  --danger-soft: rgba(216, 93, 120, 0.12);
  --amber: #c89533;
  --amber-soft: rgba(200, 149, 51, 0.14);
  --blue: #5d76cb;
  --blue-soft: rgba(93, 118, 203, 0.1);
  --shadow-soft: 0 12px 32px rgba(20, 20, 20, 0.06);
  --shadow-subtle: 0 8px 22px rgba(20, 20, 20, 0.045);
  --radius-card: 20px;
  --radius-button: 10px;
}

.site-shell-page,
.home-page {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(0, 140, 122, 0.045), transparent 18%),
    radial-gradient(circle at top right, rgba(17, 21, 42, 0.028), transparent 16%),
    linear-gradient(180deg, var(--bg-page) 0%, var(--bg-page-strong) 100%);
}

.site-shell {
  min-height: 100vh;
  position: relative;
  overflow-x: clip;
}

.capital-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 248, 243, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.capital-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 6px 24px;
}

.capital-brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: 29px;
  text-decoration: none;
  color: inherit;
  flex: none;
}

.capital-brand--symbol {
  padding: 0;
}

.capital-brand-symbol {
  display: block;
  width: clamp(31px, 2.9vw, 37px);
  height: auto;
}

.capital-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
  margin-left: 4px;
}

.capital-nav-link,
.capital-nav-trigger,
.capital-lang-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-button);
  background: transparent;
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 140ms ease,
    color 140ms ease,
    border-color 140ms ease;
}

.capital-nav-link:hover,
.capital-nav-trigger:hover,
.capital-lang-button:hover {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.capital-nav-link.is-active,
.capital-nav-trigger[aria-expanded="true"],
.capital-nav-trigger.is-route-active {
  background: var(--accent);
  color: #ffffff;
}

.capital-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.capital-flag {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  font-size: 1rem;
}

.capital-lang-button {
  min-width: 42px;
  padding: 0 10px;
}

.capital-mega-anchor {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
}

.capital-mega-backdrop {
  position: fixed;
  inset: 54px 0 0;
  background: rgba(17, 21, 42, 0.12);
  backdrop-filter: blur(12px);
}

.capital-mega-panel {
  position: absolute;
  top: 8px;
  left: 50%;
  width: min(1360px, calc(100vw - 40px));
  transform: translateX(-50%);
  padding: 20px 24px 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border-soft);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.12);
}

.capital-mega-panel[hidden],
.capital-mega-backdrop[hidden] {
  display: none;
}

.capital-mega-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.capital-mega-tablist {
  display: inline-flex;
  padding: 2px;
  border-radius: 999px;
  background: #ece7de;
}

.capital-mega-tab {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.capital-mega-tab.is-active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(20, 20, 20, 0.06);
}

.capital-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
  padding: 0 12px;
}

.capital-plan-grid[hidden] {
  display: none;
}

.capital-plan-card {
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: start;
  justify-items: center;
  gap: 8px;
  min-height: 0;
  padding: 4px 8px 6px;
  border-radius: 18px;
  border: 1px solid transparent;
  color: inherit;
  text-decoration: none;
  background: transparent;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.capital-plan-card:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(248, 245, 240, 0.76);
}

.capital-plan-name {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 2.25em;
  width: 100%;
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.04em;
  text-align: center;
}

.capital-plan-image {
  display: block;
  width: min(164px, 100%);
  max-width: 164px;
  height: 94px;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(20, 20, 20, 0.12);
}

.capital-plan-caption {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.capital-mega-footer {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.capital-mega-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(0, 140, 122, 0.18);
}

.capital-mega-cta svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.home-main,
.site-app-main,
.capital-footer {
  transition: filter 220ms ease, opacity 220ms ease;
}

.site-shell.menu-open .home-main,
.site-shell.menu-open .site-app-main,
.site-shell.menu-open .capital-footer {
  filter: blur(14px);
  pointer-events: none;
  user-select: none;
}

.site-app-main {
  padding: 16px 0 0;
}

.site-shell-page .app-shell {
  display: block;
  min-height: auto;
  padding: 0;
}

.site-shell-page .sidebar {
  display: none;
}

.site-shell-page .workspace {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 28px 40px;
}

.capital-page-frame {
  border-radius: var(--radius-card);
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-soft);
}

.capital-footer {
  margin-top: 10px;
  border-top: 1px solid var(--border-soft);
  background: rgba(250, 248, 243, 0.92);
  color: var(--text-muted);
}

.capital-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 14px 28px 16px;
}

.capital-footer-copy,
.capital-footer-links,
.capital-footer-socials {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.capital-footer-copy,
.capital-footer-links a,
.capital-footer-socials a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
}

.capital-footer-links a:hover,
.capital-footer-socials a:hover {
  color: var(--text-main);
}

.capital-footer-socials svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.site-shell-page .topbar,
.site-shell-page .watchlist-frame,
.site-shell-page .screener-hero,
.site-shell-page .screener-filter-card,
.site-shell-page .screener-results-card,
.site-shell-page .screener-profile-card {
  box-shadow: var(--shadow-soft);
}

.site-shell-page .searchbar,
.site-shell-page .topbar-badge,
.site-shell-page .watchlist-badge,
.site-shell-page .dashboard-updated-box {
  box-shadow: none;
}

@media (max-width: 1120px) {
  .capital-header-inner {
    flex-wrap: wrap;
    padding: 6px 18px;
  }

  .capital-nav {
    order: 3;
    width: 100%;
    margin: 0;
    padding-top: 6px;
    overflow-x: auto;
  }

  .capital-mega-panel {
    width: min(100vw - 32px, 1320px);
    padding: 22px 22px 20px;
  }

  .capital-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0;
  }

  .site-shell-page .workspace,
  .capital-footer-inner {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 780px) {
  .capital-brand-symbol {
    width: 33px;
  }

  .capital-nav-link,
  .capital-nav-trigger,
  .capital-lang-button {
    min-height: 34px;
    padding: 0 9px;
    font-size: 0.84rem;
  }

  .capital-mega-panel {
    width: calc(100vw - 20px);
    padding: 20px 18px 18px;
  }

  .capital-plan-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .capital-plan-card {
    min-height: auto;
  }

  .capital-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
