/* Secondary pages use the main site's type, colors and navigation. Their
   existing content blocks retain their own layouts. */

.secondary-page {
  --text: var(--fs-text);
  --text-2: var(--fs-muted);
  --text-3: #a3b5cf;
  --stroke: var(--fs-line);
  --brand-blue-soft: var(--fs-light);
  --green: #30d158;
}

.secondary-page .page-hero {
  padding: 72px 0 56px;
  overflow: visible;
}

.secondary-page .page-hero::after,
.secondary-page .principle-card::after {
  content: none;
}

.secondary-page .page-h1 {
  max-width: 24ch;
  font-size: clamp(42px, 5.3vw, 72px);
  line-height: 1.06;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
}

.secondary-page .page-sub {
  color: var(--fs-muted);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.7;
}

.secondary-page .section-heading h2 {
  font-size: clamp(30px, 3.7vw, 48px);
  line-height: 1.13;
}

.secondary-page .page :is(
  .telegram-shell,
  .principle-card,
  .contact-card,
  .cta-panel,
  .era-panel,
  .system-node,
  .card,
  .faq-item
) {
  background: var(--fs-surface);
  border-color: var(--fs-line);
  border-radius: 10px;
  box-shadow: none;
}

.secondary-page .cta-panel::before {
  content: none;
}

.secondary-page .footer-links a[aria-current="page"] {
  color: var(--fs-text);
  text-decoration: underline;
  text-underline-offset: .2em;
}

.secondary-page .feed-account {
  margin-bottom: 22px;
}

.secondary-page .feed-layout {
  align-items: start;
}

.secondary-page .telegram-shell {
  min-width: 0;
}

.secondary-page .telegram-top {
  flex-wrap: wrap;
}

.secondary-page .telegram-top .fs-badge {
  margin-inline-start: auto;
}

.secondary-page .telegram-avatar {
  flex-shrink: 0;
  background: var(--fs-navy);
  box-shadow: none;
}

.secondary-page .telegram-stream {
  background: none;
}

.secondary-page .lifecycle-message,
.secondary-page .lifecycle-message:nth-child(2),
.secondary-page .lifecycle-message.report {
  background: rgba(7, 24, 47, .64);
  border-color: var(--fs-line);
  border-radius: 8px;
  box-shadow: none;
}

@media (max-width: 820px) {
  .secondary-page .page-hero {
    padding: 42px 0 36px;
  }

  .secondary-page .page-hero .hero-actions {
    margin-top: 24px;
  }
}

@media (max-width: 480px) {
  .secondary-page .telegram-top .fs-badge {
    margin-inline-start: 0;
  }

  .secondary-page .hero-actions > a {
    width: 100%;
  }
}

/* Every public page begins with the same type scale, width and reading order. */
.refined-site {
  --fs-motion: 160ms;
  --fs-ease: cubic-bezier(.2,.65,.3,1);
  --fs-panel: #0e2036;
  --fs-panel-line: #2b4462;
}

.refined-site .fs-feature {
  padding-block: clamp(50px, 6vw, 92px);
  background:
    radial-gradient(ellipse at 76% 43%, rgba(29,111,255,.12), transparent 55%),
    radial-gradient(ellipse at 96% 16%, rgba(241,198,111,.07), transparent 36%),
    linear-gradient(115deg, #020810, var(--fs-navy));
  border-bottom: 1px solid var(--fs-line);
}

.fs-feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(34px, 6vw, 88px);
  align-items: start;
}

.fs-feature-single .fs-feature-grid {
  grid-template-columns: minmax(0, 740px);
}

.fs-feature-single {
  min-height: 0;
}

.fs-feature-copy {
  padding-top: 7px;
}

.refined-site .fs-feature h1 {
  max-width: 19ch;
  margin: 20px 0 0;
  font-size: clamp(2.75rem, 5.4vw, 4.8125rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.062em;
  color: var(--fs-text);
  overflow-wrap: break-word;
}

.fs-feature h1 span {
  color: var(--fs-light);
}

.refined-site .fs-feature .fs-lead {
  max-width: 35em;
  margin: 22px 0 0;
  color: var(--fs-muted);
  font-size: clamp(1rem, 1.4vw, 1.1875rem);
  line-height: 1.69;
}

.fs-feature .fs-actions {
  margin-top: 26px;
  gap: 10px;
}

.fs-action-arrow {
  line-height: 1;
  font-size: 16px;
}

.fs-action-arrow,
.fs-evidence-arrow {
  font-variant-emoji: text;
}

.refined-site .fs-details summary::after {
  content: none;
}

.fs-feature-panel {
  position: relative;
  min-width: 0;
  border: 1px solid var(--fs-panel-line);
  border-radius: 22px;
  padding: clamp(20px, 3vw, 32px);
  background: linear-gradient(150deg, var(--fs-panel), #071220);
  box-shadow: 0 24px 66px rgba(0, 0, 0, .26);
}

.fs-panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 12px;
  color: var(--fs-light);
  font: 600 11px/1.45 'IBM Plex Mono', monospace;
  letter-spacing: .08em;
}

.fs-panel-top time {
  color: var(--fs-muted);
  letter-spacing: 0;
}

.refined-site .fs-feature-panel h2 {
  color: var(--fs-text);
  font-size: clamp(1.5rem, 2.1vw, 1.9375rem);
  line-height: 1.2;
  letter-spacing: -.035em;
  margin: 13px 0 18px;
}

.fs-evidence-steps,
.fs-evidence-facts {
  margin: 0;
  padding: 0;
}

.fs-evidence-steps li {
  list-style: none;
}

.fs-evidence-steps li a,
.fs-evidence-facts div {
  display: grid;
  align-items: center;
  gap: 10px;
  min-height: 47px;
  padding-block: 8px;
  border-top: 1px solid var(--fs-line);
  font-size: .875rem;
  line-height: 1.4;
}

.fs-evidence-steps li a {
  grid-template-columns: 10px minmax(0, 1fr) auto 13px;
  color: var(--fs-text);
  text-decoration: none;
}

.fs-evidence-steps li a:hover {
  background: rgba(164,201,255,.09);
}

.fs-evidence-steps strong,
.fs-panel-result strong {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  white-space: nowrap;
}

.fs-evidence-dot {
  width: 7px;
  height: 7px;
  background: #9ac1ff;
  border-radius: 50%;
}

.fs-evidence-arrow {
  color: var(--fs-light);
}

.fs-evidence-facts div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.fs-evidence-facts dt {
  color: var(--fs-muted);
}

.fs-evidence-facts dd {
  margin: 0;
  text-align: right;
  color: var(--fs-text);
  font-weight: 700;
}

#account-source {
  container: account-summary / inline-size;
}

.fs-account-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  margin: 0 0 5px;
}

@container account-summary (max-width: 14.75rem) {
  .fs-account-stats {
    grid-template-columns: 1fr;
  }
}

.fs-account-stats > div {
  min-width: 0;
  border-top: 1px solid var(--fs-line);
  padding-top: 8px;
}

.fs-account-stats dt {
  color: var(--fs-muted);
  font-size: 13px;
}

.fs-account-stats dd {
  margin: 2px 0 0;
  color: var(--fs-text);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.fs-account-stats > :nth-child(2) dd {
  color: #ffcb81;
}

.fs-panel-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--fs-line);
  padding-block: 13px 0;
  color: var(--fs-muted);
}

.fs-panel-result strong {
  font-size: clamp(19px, 2vw, 25px);
}

.fs-panel-result small {
  font-size: .6em;
}

.fs-panel-context {
  margin: 9px 0 0;
  color: var(--fs-muted);
  font-size: 13px;
  line-height: 1.55;
}

.fs-panel-links {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 16px;
  border-top: 1px solid var(--fs-line);
  margin-top: 13px;
  padding-top: 4px;
}

.fs-panel-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  color: var(--fs-light);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.fs-panel-links a:hover,
.fs-panel-links a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.refined-site .fs-feature-single .fs-feature-copy {
  padding-top: 0;
}

.refined-site .fs-feature-single h1 {
  max-width: 23ch;
  font-size: clamp(2.6875rem, 4.7vw, 4.1875rem);
}

.refined-site .fs-feature-single .fs-feature-copy > h1:first-child {
  margin-top: 0;
}

.refined-site .page > :is(.section,.section-tight) {
  padding-block: clamp(42px, 6vw, 82px);
}

.refined-site .page :is(.system-node,.step,.principle-card,.contact-card,.faq-item) {
  border-color: var(--fs-panel-line);
  box-shadow: none;
}

.refined-site [id]:target {
  scroll-margin-block-start: 104px;
}

.refined-site .site-nav a,
.refined-site .btn,
.refined-site .fs-panel-links a,
.refined-site .fs-evidence-steps a,
.refined-site .fs-inline,
.refined-site .contact-card,
.refined-site .mobile-toggle {
  transition: background-color var(--fs-motion) var(--fs-ease),
              border-color var(--fs-motion) var(--fs-ease),
              color var(--fs-motion) var(--fs-ease);
}

.refined-site .btn-primary:hover,
.refined-site .contact-card:hover {
  transform: none;
}

.refined-site .fs-history {
  padding-top: clamp(42px, 5.5vw, 80px);
}

@media (min-width: 851px) {
  .fs-feature-panel {
    display: flex;
    flex-direction: column;
    min-height: 437px;
  }

  .fs-feature-panel .fs-panel-context {
    padding-bottom: 13px;
  }

  .fs-feature-panel .fs-panel-links {
    margin-top: auto;
  }
}

@media (max-width: 850px) {
  .fs-feature-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .refined-site .fs-feature {
    padding-block: 34px 40px;
  }

  .refined-site .fs-feature h1,
  .refined-site .fs-feature-single h1 {
    font-size: clamp(2.5rem, 9vw, 3.9375rem);
  }
}

@media (max-width: 440px) {
  .fs-feature .fs-actions .btn {
    width: 100%;
  }

  .fs-evidence-steps li a {
    font-size: 13px;
  }
}

@media (max-width: 820px) and (prefers-reduced-motion: no-preference) {
  .refined-site .site-nav {
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
  }

  .refined-site .site-nav:not(.open) {
    transform: translateY(-8px);
  }

  .refined-site .site-nav.open {
    transition-delay: 0s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .refined-site *,
  .refined-site *::before,
  .refined-site *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Shared navigation and footer */
.refined-site .header-inner {
  height: auto;
  min-height: 76px;
}

.refined-site .site-nav a {
  font-size: .875rem;
}

.refined-site .header-record,
.refined-site .site-nav .menu-support {
  display: none;
}

@media (min-width: 821px) {
  .refined-site .site-nav .menu-support[href="/contact"] {
    display: inline-flex;
  }

  .refined-site .site-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    background: transparent;
    border-color: transparent;
    gap: clamp(0px, .5vw, 8px);
  }

  .refined-site .site-nav a {
    padding-inline: clamp(8px, 1vw, 16px);
    border-radius: 6px;
  }

  .refined-site .site-nav a[aria-current="page"] {
    color: #d9e8ff;
    background: #10243d;
    box-shadow: none;
  }

  .refined-site .site-nav a[aria-current="page"]::after {
    content: '';
    position: absolute;
    inset: auto 12px 3px;
    height: 2px;
    background: #75aaff;
  }
}

@media (max-width: 820px) {
  .refined-site .header-inner {
    display: grid;
    grid-template-columns: minmax(max-content, 1fr) minmax(min-content, max-content) auto;
    min-height: 68px;
    gap: 10px;
    padding-block: 6px;
  }

  .refined-site .header-inner .brand { justify-self: start; }
  .refined-site .site-nav { grid-column: 1 / -1; }

  .refined-site .header-record {
    margin-inline-start: auto;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--fs-light);
    font-size: .875rem;
    font-weight: 700;
  }

  .refined-site .mobile-toggle {
    flex: none;
    margin-inline-start: 0;
    width: auto;
    min-width: 55px;
    height: auto;
    min-height: 44px;
    padding: 6px 10px;
    font: 700 .875rem/1.2 'Manrope', sans-serif;
  }

  .refined-site .site-nav a { justify-content: flex-start; }

  .refined-site .site-nav .menu-support { display: inline-flex; }
  .refined-site .site-nav [aria-current="page"] {
    color: #fff;
    background: #163354;
    text-decoration: underline;
    text-underline-offset: .25em;
  }
}

@media (max-width: 22em) {
  .refined-site .header-inner { column-gap: 4px; }
  .refined-site .header-inner .brand { gap: 4px; }
  .refined-site .site-header .brand-mark { width: 27px; padding-inline: 0; }
  .refined-site .site-header .brand-mark img { width: 100%; }
  .refined-site .mobile-toggle { padding-inline: 5px; }
}

/* Extra-large default text can need a second row for the shortcuts. */
@media (max-width: 18.5em) {
  .refined-site .header-inner { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0; }
  .refined-site .header-inner .brand { grid-column: 1 / -1; }
  .refined-site .header-record { margin-inline: 0 auto; }
  .refined-site .site-header { position: relative; }
}

/* When enlarged type wraps the desktop navigation, leave anchored headings visible. */
@media (min-width: 821px) and (max-width: 51.25em) {
  .refined-site .site-header { position: relative; }
}

.refined-site .site-footer {
  padding-block: clamp(38px, 5vw, 68px) 20px;
  background: #050f1d;
}

.fs-footer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(140px, .55fr));
  align-items: start;
  gap: clamp(24px, 5vw, 80px);
}

.fs-footer-about .brand { display: inline-flex; }

.fs-footer-about p {
  margin-top: 13px;
  max-width: 52ch;
  color: #acbdd2;
  font: 400 .875rem/1.65 'Manrope', sans-serif;
}

.fs-footer-nav {
  overflow-wrap: anywhere;
  display: grid;
  justify-items: start;
  align-content: start;
}

.fs-footer-nav h2 {
  margin: 8px 0;
  font: 700 1rem/1.4 'Manrope', sans-serif;
  letter-spacing: -.01em;
}

.fs-footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: #b9cbe1;
  font-size: .875rem;
  font-weight: 500;
}

.fs-footer-nav a:is(:hover, :focus-visible, [aria-current="page"]) {
  color: white;
  text-decoration: underline;
  text-underline-offset: .23em;
}

.fs-copyright {
  display: block;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--fs-line);
  color: #9daec4;
  font-size: .8125rem;
}

@media (max-width: 650px) {
  .fs-footer-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
  .fs-footer-about { grid-column: 1 / -1; }
  .fs-footer-nav a { min-height: 42px; }
  .fs-footer-nav h2 { margin-bottom: 4px; }
}

/* The example shares the introduction's row on wider screens. */
@media (min-width: 851px) {
  .refined-site[data-page="signals"] .trade-example-jump { display: none; }
}
