/* =================================================================
   AUTHORITY.CSS — The Architecture of Authority
   Settlement Integrity Institute
   Design: Cosmological. Vertical gravity. The horizon declares.
   ================================================================= */

:root {
  --navy-deep:       #0F1A30;
  --navy:            #1B2A4A;
  --navy-mid:        #223260;
  --bronze:          #8B7355;
  --bronze-light:    #A99579;
  --bronze-xlight:   #C4B49A;
  --parchment:       #F8F6F3;
  --parchment-dk:    #EDE9E3;
  --body-text:       #D8D4CE;
  --muted:           #8A8680;
  --border:          rgba(139, 115, 85, 0.12);
  --border-mid:      rgba(139, 115, 85, 0.22);

  --sovereign-bg:    rgba(27, 42, 74, 0.0);
  --regulatory-bg:   rgba(27, 42, 74, 0.0);
  --assurance-bg:    rgba(27, 42, 74, 0.0);

  --ease-out:        cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring:     cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* -----------------------------------------------------------------
   PAGE ROOT
   ----------------------------------------------------------------- */
.auth-page {
  background: var(--navy-deep);
  color: var(--body-text);
  font-family: 'DM Sans', sans-serif;
  overflow-x: hidden;
}

.auth-page .nav {
  background: rgba(15, 26, 48, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.auth-page .nav__links a { color: var(--body-text); }
.auth-page .nav__links a.nav__active {
  color: var(--bronze-light);
  border-bottom: 1px solid var(--bronze);
}

/* -----------------------------------------------------------------
   CROSSHATCH
   ----------------------------------------------------------------- */
.auth-crosshatch {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 115, 85, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 115, 85, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

/* -----------------------------------------------------------------
   SHARED EYEBROW
   ----------------------------------------------------------------- */
.auth-eyebrow {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 20px;
}

.auth-eyebrow--light { color: rgba(139, 115, 85, 0.6); }

/* -----------------------------------------------------------------
   INTRO SECTION
   ----------------------------------------------------------------- */
.auth-intro {
  position: relative;
  padding: 160px 80px 96px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  min-height: 52vh;
  display: flex;
  align-items: center;
}

/* Radial wash top center */
.auth-intro::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse at 50% 0%,
    rgba(139, 115, 85, 0.06) 0%,
    transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.auth-intro__inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.auth-intro__inner.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.auth-intro__title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(3.2rem, 7vw, 7.5rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--parchment);
  margin-bottom: 40px;
  max-width: 900px;
}

.auth-intro__body {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  font-weight: 300;
  line-height: 1.8;
  color: var(--body-text);
  max-width: 580px;
}

.auth-intro__body em {
  font-style: italic;
  color: var(--bronze-xlight);
}

/* -----------------------------------------------------------------
   ARCHITECTURE CANVAS
   ----------------------------------------------------------------- */
.auth-architecture {
  position: relative;
  overflow: hidden;
}

.auth-architecture__inner {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Vertical connector lines — pure decoration */
.auth-connector {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(139, 115, 85, 0.08) 15%,
    rgba(139, 115, 85, 0.12) 50%,
    rgba(139, 115, 85, 0.08) 85%,
    transparent 100%
  );
  z-index: 0;
  pointer-events: none;
}

.auth-connector--left  { left: 80px; }
.auth-connector--right { right: 80px; }

/* -----------------------------------------------------------------
   TIER — SHARED
   ----------------------------------------------------------------- */
.auth-tier {
  padding: 64px 80px;
  border-bottom: 1px solid var(--border);
  position: relative;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.auth-tier.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.auth-tier__label-wrap {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 40px;
}

.auth-tier__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.auth-tier__function {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 300;
  font-style: italic;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Entity grid */
.auth-tier__entities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2px;
}

/* -----------------------------------------------------------------
   TIER VARIANTS — COLOR CODING
   ----------------------------------------------------------------- */

/* Sovereign — deepest navy, most authority */
.auth-tier--sovereign {
  background: rgba(15, 26, 48, 0.6);
  transition-delay: 0s;
}
.auth-tier--sovereign .auth-tier__label { color: rgba(168, 196, 162, 0.7); }

/* Regulatory */
.auth-tier--regulatory {
  background: rgba(15, 26, 48, 0.3);
  transition-delay: 0.1s;
}
.auth-tier--regulatory .auth-tier__label { color: rgba(169, 149, 121, 0.8); }

/* Assurance */
.auth-tier--assurance {
  background: rgba(15, 26, 48, 0.15);
  transition-delay: 0.2s;
}
.auth-tier--assurance .auth-tier__label { color: rgba(139, 115, 85, 0.7); }

/* Market — lightest, lowest */
.auth-tier--market {
  background: rgba(27, 42, 74, 0.15);
  transition-delay: 0.1s;
  padding-top: 80px;
  padding-bottom: 80px;
}
.auth-tier--market .auth-tier__label { color: rgba(138, 134, 128, 0.6); }

/* -----------------------------------------------------------------
   ENTITY CARDS
   ----------------------------------------------------------------- */
.auth-entity {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 1px solid transparent;
  transition:
    background 220ms var(--ease-out),
    border-color 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out);
}

.auth-entity__abbr {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}

.auth-entity__name {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.3;
  max-width: none;
}

.auth-entity__role {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 300;
  line-height: 1.5;
  max-width: none;
}

/* Sovereign entity */
.auth-entity--sovereign {
  background: rgba(168, 196, 162, 0.07);
  border-color: rgba(168, 196, 162, 0.22);
}
.auth-entity--sovereign:hover {
  background: rgba(168, 196, 162, 0.1);
  border-color: rgba(168, 196, 162, 0.28);
  box-shadow:
    0 0 18px rgba(168, 196, 162, 0.12),
    0 0 6px  rgba(168, 196, 162, 0.08);
}
.auth-entity--sovereign .auth-entity__abbr  { color: #A8C4A2; }
.auth-entity--sovereign .auth-entity__name  { color: var(--parchment); }
.auth-entity--sovereign .auth-entity__role  { color: rgba(168, 196, 162, 0.55); }

/* Regulatory entity */
.auth-entity--regulatory {
  background: rgba(169, 149, 121, 0.08);
  border-color: rgba(169, 149, 121, 0.22);
}
.auth-entity--regulatory:hover {
  background: rgba(169, 149, 121, 0.12);
  border-color: rgba(169, 149, 121, 0.3);
  box-shadow:
    0 0 18px rgba(169, 149, 121, 0.13),
    0 0 6px  rgba(169, 149, 121, 0.08);
}
.auth-entity--regulatory .auth-entity__abbr  { color: var(--bronze-light); }
.auth-entity--regulatory .auth-entity__name  { color: var(--parchment); }
.auth-entity--regulatory .auth-entity__role  { color: rgba(169, 149, 121, 0.65); }

/* Assurance entity */
.auth-entity--assurance {
  background: rgba(139, 115, 85, 0.08);
  border-color: rgba(139, 115, 85, 0.22);
}
.auth-entity--assurance:hover {
  background: rgba(139, 115, 85, 0.12);
  border-color: rgba(139, 115, 85, 0.3);
  box-shadow:
    0 0 18px rgba(139, 115, 85, 0.14),
    0 0 6px  rgba(139, 115, 85, 0.09);
}
.auth-entity--assurance .auth-entity__abbr  { color: var(--bronze); }
.auth-entity--assurance .auth-entity__name  { color: var(--parchment); }
.auth-entity--assurance .auth-entity__role  { color: rgba(139, 115, 85, 0.65); }

/* Market entity */
.auth-entity--market {
  padding: 28px 32px;
  gap: 8px;
  background: rgba(216, 212, 206, 0.03);
  border-color: rgba(216, 212, 206, 0.1);
}
.auth-entity--market:hover {
  background: rgba(216, 212, 206, 0.065);
  border-color: rgba(216, 212, 206, 0.22);
  box-shadow:
    0 0 22px rgba(216, 212, 206, 0.08),
    0 0 8px  rgba(216, 212, 206, 0.05);
}
.auth-entity--market .auth-entity__abbr {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
  color: rgba(216, 212, 206, 0.6);
}
.auth-entity--market .auth-entity__name {
  font-size: 0.88rem;
  font-weight: 400;
  color: rgba(216, 212, 206, 0.75);
}
.auth-entity--market .auth-entity__role {
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1.65;
  color: rgba(138, 134, 128, 0.55);
}

.auth-tier__entities--market {
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
}

/* -----------------------------------------------------------------
   THE HORIZON — SII BAND
   ----------------------------------------------------------------- */
.auth-horizon {
  position: relative;
  padding: 72px 80px;
  background: var(--navy-deep);
  z-index: 2;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 1s var(--ease-out) 0.15s, transform 1s var(--ease-out) 0.15s;
}

.auth-horizon.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* The two bronze rails — animated in */
.auth-horizon__rail {
  position: absolute;
  left: 0; right: 0;
  height: 1.5px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--bronze) 8%,
    var(--bronze) 92%,
    transparent 100%
  );
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.2s var(--ease-out);
}

.auth-horizon.horizon-active .auth-horizon__rail {
  transform: scaleX(1);
}

.auth-horizon__rail--top    { top: 0; }
.auth-horizon__rail--bottom { bottom: 0; transition-delay: 0.15s; }

/* Inner glow wash */
.auth-horizon::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(139, 115, 85, 0.05) 0%,
      rgba(139, 115, 85, 0.08) 50%,
      rgba(139, 115, 85, 0.05) 100%
    );
  pointer-events: none;
  z-index: 0;
}

.auth-horizon__content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

/* Left — identity */
.auth-horizon__layer-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bronze);
  background: rgba(139, 115, 85, 0.08);
  border: 1px solid rgba(139, 115, 85, 0.2);
  padding: 5px 14px;
  margin-bottom: 24px;
}

.auth-horizon__mark {
  color: var(--parchment);
  margin-bottom: 16px;
  opacity: 0.9;
}

.auth-horizon__name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--parchment);
  margin-bottom: 20px;
}

.auth-horizon__declaration {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.7;
  color: var(--bronze-xlight);
  max-width: 440px;
}

/* Right — distinction table */
.auth-horizon__distinction {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border-mid);
}

.auth-horizon__distinction-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: start;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 200ms var(--ease-out);
}

.auth-horizon__distinction-item:last-child { border-bottom: none; }

.auth-horizon__distinction-item:hover {
  background: rgba(139, 115, 85, 0.04);
}

.auth-horizon__distinction-item--sii {
  background: rgba(139, 115, 85, 0.06);
  border-top: 1px solid var(--border-mid);
}

.auth-horizon__distinction-item--sii:hover {
  background: rgba(139, 115, 85, 0.1);
}

.auth-horizon__distinction-divider {
  height: 0;
  display: none;
}

.auth-horizon__distinction-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}

.auth-horizon__distinction-item--sii .auth-horizon__distinction-label {
  color: var(--bronze-light);
}

.auth-horizon__distinction-value {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--body-text);
  line-height: 1.5;
  max-width: none;
}

.auth-horizon__distinction-item--sii .auth-horizon__distinction-value {
  font-weight: 400;
  color: var(--parchment);
}

/* -----------------------------------------------------------------
   CLOSING STATEMENT
   ----------------------------------------------------------------- */
.auth-close {
  position: relative;
  background: var(--parchment);
  padding: 112px 80px 120px;
  overflow: hidden;
}

.auth-close .auth-crosshatch {
  background-image:
    linear-gradient(rgba(27, 42, 74, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 42, 74, 0.025) 1px, transparent 1px);
}

.auth-close__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.auth-close__left {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.auth-close__left.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.auth-close__left .auth-eyebrow { color: var(--bronze); }

.auth-close__title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--navy-deep);
  margin-bottom: 12px;
}

.auth-close__title em {
  font-style: italic;
  color: var(--navy);
}

.auth-close__sub {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 400;
  font-style: italic;
  color: var(--bronze);
  margin-bottom: 32px;
  max-width: none;
}

.auth-close__sub strong {
  font-style: normal;
  font-weight: 400;
}

.auth-close__body {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.85;
  color: #4A4740;
  max-width: 520px;
  margin-bottom: 40px;
}

.auth-close__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--parchment);
  background: var(--navy);
  text-decoration: none;
  padding: 16px 32px;
  transition: background 200ms var(--ease-out);
}

.auth-close__cta:hover { background: var(--navy-mid); }

/* Pillar diagram */
.auth-close__right {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease-out) 0.2s, transform 0.9s var(--ease-out) 0.2s;
}

.auth-close__right.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.auth-close__pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 360px;
}

.auth-close__pillar-top,
.auth-close__pillar-bottom {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, rgba(27, 42, 74, 0.2));
}

.auth-close__pillar-bottom {
  background: linear-gradient(to bottom, rgba(27, 42, 74, 0.2), transparent);
}

.auth-close__pillar-line {
  width: 1px;
  height: 40px;
  background: rgba(27, 42, 74, 0.15);
}

.auth-close__pillar-mid {
  width: 1px;
  height: 32px;
  background: rgba(27, 42, 74, 0.12);
}

.auth-close__pillar-node {
  width: 100%;
  padding: 16px 24px;
  text-align: center;
  border: 1px solid rgba(27, 42, 74, 0.12);
}

.auth-close__pillar-node span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-close__pillar-node--top {
  background: rgba(168, 196, 162, 0.06);
  border-color: rgba(168, 196, 162, 0.15);
}
.auth-close__pillar-node--top span { color: #7BAF74; }

.auth-close__pillar-node--sii {
  background: var(--navy);
  border: 2px solid var(--bronze);
  padding: 24px;
}
.auth-close__pillar-node--sii span {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  color: var(--parchment);
  font-weight: 400;
  text-transform: none;
}

.auth-close__pillar-node--bottom {
  background: rgba(138, 134, 128, 0.04);
  border-color: rgba(138, 134, 128, 0.1);
}
.auth-close__pillar-node--bottom span { color: #8A8680; }

/* -----------------------------------------------------------------
   FOOTER
   ----------------------------------------------------------------- */
.auth-footer {
  background: var(--navy-deep);
  border-top: 1px solid var(--border);
  padding: 80px 80px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.auth-footer__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.auth-footer__monolith {
  display: block;
  width: clamp(200px, 32vw, 300px);
  margin: 0 auto;
  opacity: 0.8;
}

.auth-footer__meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.55rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: rgba(138, 134, 128, 0.4);
  text-transform: uppercase;
  max-width: 100%;
}

.auth-footer__meta a {
  color: rgba(139, 115, 85, 0.5);
  text-decoration: none;
}

/* -----------------------------------------------------------------
   ANNOTATION RAIL — Option D + C
   ----------------------------------------------------------------- */

/* Rail container — sits left of the architecture inner, fixed to the section */
.auth-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 44px;
  pointer-events: none;
  z-index: 3;
}

/* Each bracket bracket spans a tier group via JS-set CSS vars */
.auth-rail__bracket {
  position: absolute;
  left: 20px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(139, 115, 85, 0.0) 0%,
    rgba(139, 115, 85, 0.28) 8%,
    rgba(139, 115, 85, 0.28) 92%,
    rgba(139, 115, 85, 0.0) 100%
  );
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
}

.auth-rail__bracket.is-visible {
  opacity: 1;
}

/* Mandate bracket — spans Sovereign + Regulatory */
.auth-rail__bracket--mandate {
  top:    var(--rail-mandate-top,    0px);
  height: var(--rail-mandate-height, 0px);
}

/* Evidence bracket — spans Assurance tier */
.auth-rail__bracket--evidence {
  top:    var(--rail-evidence-top,    0px);
  height: var(--rail-evidence-height, 0px);
}

/* Labels — rotated, JetBrains Mono, tiny */
.auth-rail__label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%) rotate(-90deg);
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.52rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(139, 115, 85, 0.45);
}

/* End-caps on the bracket lines (top and bottom ticks) */
.auth-rail__bracket::before,
.auth-rail__bracket::after {
  content: '';
  position: absolute;
  left: 0;
  width: 6px;
  height: 1px;
  background: rgba(139, 115, 85, 0.3);
}
.auth-rail__bracket::before { top: 0; }
.auth-rail__bracket::after  { bottom: 0; }

/* -----------------------------------------------------------------
   Option C — SII HORIZON GLOW BLEED
   Radial glow that bleeds up into Assurance and down into Market
   ----------------------------------------------------------------- */

/* Upward bleed — sits at the bottom of the assurance tier */
.auth-tier--assurance::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(
    to top,
    rgba(139, 115, 85, 0.07) 0%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* Downward bleed — sits at the top of the market tier */
.auth-tier--market::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(
    to bottom,
    rgba(139, 115, 85, 0.06) 0%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* Expanded horizon glow — radial wash that pulses outward */
.auth-horizon::after {
  content: '';
  position: absolute;
  inset: -2px -1px;
  background:
    radial-gradient(
      ellipse 60% 180% at 50% 50%,
      rgba(139, 115, 85, 0.09) 0%,
      transparent 70%
    );
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.4s var(--ease-out) 0.3s;
}

.auth-horizon.is-visible::after {
  opacity: 1;
}

/* -----------------------------------------------------------------
   MOBILE — hide rail on small screens
   ----------------------------------------------------------------- */
@media (max-width: 1000px) {
  .auth-rail { display: none; }
  .auth-tier--assurance::after { display: none; }
  .auth-tier--market::before   { display: none; }
}

/* -----------------------------------------------------------------
   MOBILE
   ----------------------------------------------------------------- */
@media (max-width: 1000px) {
  .auth-intro     { padding: 120px 24px 72px; }
  .auth-tier      { padding: 48px 24px; }
  .auth-horizon   { padding: 56px 24px; }
  .auth-close     { padding: 72px 24px 80px; }
  .auth-footer    { padding: 64px 24px 48px; }

  .auth-connector { display: none; }

  .auth-horizon__content {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .auth-close__inner {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .auth-tier__entities--market {
    grid-template-columns: 1fr;
  }

  .auth-tier__label-wrap {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 600px) {
  .auth-tier__entities {
    grid-template-columns: 1fr;
  }
}

/* -----------------------------------------------------------------
   REDUCED MOTION
   ----------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .auth-intro__inner,
  .auth-tier,
  .auth-horizon,
  .auth-close__left,
  .auth-close__right {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .auth-horizon__rail {
    transform: scaleX(1) !important;
    transition: none !important;
  }
}

/* =================================================================
   ENTITY POPUP SYSTEM
   ================================================================= */

/* ── Clickable entity cards ───────────────────────────────────────
   Cards are always fully opaque — visibility never depends
   on the parent .auth-tier fade-in state
   ───────────────────────────────────────────────── */
.auth-entity--clickable {
  /* Reset button defaults */
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;

  /* Restore entity card styling — inherited from .auth-entity */
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 1px solid transparent;
  transition:
    background 220ms var(--ease-out),
    border-color 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out),
    transform 180ms var(--ease-out);
}

.auth-entity--clickable:hover {
  transform: translateY(-1px);
}

.auth-entity--clickable:focus-visible {
  outline: 1.5px solid var(--bronze);
  outline-offset: 2px;
}

/* Subtle "click to explore" hint — appears on hover */
.auth-entity__hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: transparent;
  transition: color 200ms var(--ease-out);
  margin-top: 2px;
}

.auth-entity--clickable:hover .auth-entity__hint {
  color: var(--bronze);
  opacity: 0.5;
}

/* Active state — card is the open one */
.auth-entity--active {
  transform: translateY(-1px);
}

.auth-entity--active.auth-entity--sovereign {
  background: rgba(168, 196, 162, 0.13) !important;
  border-color: rgba(168, 196, 162, 0.32) !important;
  box-shadow:
    0 0 22px rgba(168, 196, 162, 0.16),
    0 0 8px  rgba(168, 196, 162, 0.1) !important;
}
.auth-entity--active.auth-entity--regulatory {
  background: rgba(169, 149, 121, 0.13) !important;
  border-color: rgba(169, 149, 121, 0.32) !important;
  box-shadow:
    0 0 22px rgba(169, 149, 121, 0.16),
    0 0 8px  rgba(169, 149, 121, 0.1) !important;
}
.auth-entity--active.auth-entity--assurance {
  background: rgba(139, 115, 85, 0.13) !important;
  border-color: rgba(139, 115, 85, 0.32) !important;
  box-shadow:
    0 0 22px rgba(139, 115, 85, 0.17),
    0 0 8px  rgba(139, 115, 85, 0.11) !important;
}

/* ── Overlay ──────────────────────────────────────────────────────── */
.ep-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 30, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms var(--ease-out);
}

.ep-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Popup card — centered modal, viewport-safe ───────────────────── */
.ep-popup {
  position: fixed;
  z-index: 910;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -47%) scale(0.96);
  width: 480px;
  max-width: calc(100vw - 40px);
  max-height: 88vh;
  overflow-y: auto;
  background: linear-gradient(
    160deg,
    rgba(20, 32, 58, 0.98) 0%,
    rgba(15, 26, 48, 0.99) 100%
  );
  border: 1px solid rgba(139, 115, 85, 0.2);
  padding: 0;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.7),
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(139, 115, 85, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);

  opacity: 0;
  pointer-events: none;
  transition:
    opacity 300ms var(--ease-out),
    transform 300ms var(--ease-spring);
}

.ep-popup--open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

/* ── Tier accent header strip ─────────────────────────────────────── */
.ep-popup__header {
  position: relative;
  padding: 22px 28px 18px;
  border-bottom: 1px solid rgba(139, 115, 85, 0.1);
  overflow: hidden;
}

/* Glowing top accent line */
.ep-popup__header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
}
/* Soft radial glow beneath it */
.ep-popup__header::after {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 60px;
  pointer-events: none;
}

.ep-popup--sovereign .ep-popup__header::before  { background: linear-gradient(90deg, transparent 0%, rgba(168,196,162,0.7) 40%, rgba(168,196,162,0.7) 60%, transparent 100%); }
.ep-popup--sovereign .ep-popup__header::after   { background: radial-gradient(ellipse at 50% 0%, rgba(168,196,162,0.1) 0%, transparent 70%); }
.ep-popup--regulatory .ep-popup__header::before { background: linear-gradient(90deg, transparent 0%, rgba(169,149,121,0.8) 40%, rgba(169,149,121,0.8) 60%, transparent 100%); }
.ep-popup--regulatory .ep-popup__header::after  { background: radial-gradient(ellipse at 50% 0%, rgba(169,149,121,0.11) 0%, transparent 70%); }
.ep-popup--assurance .ep-popup__header::before  { background: linear-gradient(90deg, transparent 0%, rgba(139,115,85,0.9) 40%, rgba(139,115,85,0.9) 60%, transparent 100%); }
.ep-popup--assurance .ep-popup__header::after   { background: radial-gradient(ellipse at 50% 0%, rgba(139,115,85,0.12) 0%, transparent 70%); }

/* ── Tier label inside header ─────────────────────────────────────── */
.ep-popup__tier-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.5rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin-bottom: 18px;
  padding-right: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ep-popup__tier-tag::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1px;
  flex-shrink: 0;
}

.ep-popup--sovereign .ep-popup__tier-tag        { color: rgba(168,196,162,0.65); }
.ep-popup--sovereign .ep-popup__tier-tag::before { background: rgba(168,196,162,0.5); }
.ep-popup--regulatory .ep-popup__tier-tag        { color: var(--bronze-light); opacity: 0.85; }
.ep-popup--regulatory .ep-popup__tier-tag::before{ background: var(--bronze-light); opacity: 0.6; }
.ep-popup--assurance .ep-popup__tier-tag         { color: var(--bronze); opacity: 0.8; }
.ep-popup--assurance .ep-popup__tier-tag::before { background: var(--bronze); opacity: 0.7; }

/* ── Identity block — abbr + name ─────────────────────────────────── */
.ep-popup__identity {
  position: relative;
}

/* Large ghost abbreviation behind the name */
.ep-popup__abbr {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 3.6rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: -8px;
  opacity: 0.07;
  /* Slight color per tier */
  color: var(--parchment);
  user-select: none;
  pointer-events: none;
}

.ep-popup--sovereign .ep-popup__abbr  { color: #A8C4A2; opacity: 0.1; }
.ep-popup--regulatory .ep-popup__abbr { color: var(--bronze-light); opacity: 0.09; }
.ep-popup--assurance .ep-popup__abbr  { color: var(--bronze); opacity: 0.1; }

/* Full name overlaid on top of ghost */
.ep-popup__name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--parchment);
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
  margin-top: -2px;
}

/* ── Close button ─────────────────────────────────────────────────── */
.ep-close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(138, 134, 128, 0.45);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1;
  transition: color 180ms var(--ease-out);
  z-index: 2;
}

.ep-close:hover  { color: var(--body-text); }

.ep-close:focus-visible {
  outline: 1px solid var(--bronze);
  outline-offset: 3px;
}

/* ── Body rows ────────────────────────────────────────────────────── */
.ep-popup__divider { display: none; }

.ep-popup__body {
  display: flex;
  flex-direction: column;
  padding: 0 28px 24px;
}

.ep-popup__row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(139, 115, 85, 0.07);
  position: relative;
}

.ep-popup__row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* SII row — the verdict section */
.ep-popup__row--accent {
  margin: 4px -28px 0;
  padding: 18px 28px 32px;
  border-bottom: none;
  border-top: 1px solid rgba(139, 115, 85, 0.12);
  background: rgba(139, 115, 85, 0.05);
  position: relative;
  overflow: hidden;
}

/* Subtle left accent bar on SII row */
.ep-popup__row--accent::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
}
.ep-popup--sovereign .ep-popup__row--accent::before  { background: linear-gradient(to bottom, transparent, rgba(168,196,162,0.5), transparent); }
.ep-popup--regulatory .ep-popup__row--accent::before { background: linear-gradient(to bottom, transparent, rgba(169,149,121,0.6), transparent); }
.ep-popup--assurance .ep-popup__row--accent::before  { background: linear-gradient(to bottom, transparent, rgba(139,115,85,0.7), transparent); }

.ep-popup__label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.48rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
}

.ep-popup__row--accent .ep-popup__label { color: var(--bronze-light); }

.ep-popup__value {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.83rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--body-text);
  max-width: none;
}

.ep-popup__row--accent .ep-popup__value {
  color: var(--parchment);
  font-weight: 400;
  font-size: 0.86rem;
}

/* ── Mobile: full-width bottom sheet ─────────────────────────────── */
@media (max-width: 680px) {
  .ep-popup {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 82vh;
    overflow-y: auto;
    border-left: none;
    border-right: none;
    border-bottom: none;
    transform: translateY(24px) !important;
    box-shadow: 0 -16px 56px rgba(0, 0, 0, 0.6);
  }

  .ep-popup--open {
    transform: translateY(0) !important;
  }
}

/* ── Reduced motion ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ep-popup,
  .ep-overlay {
    transition: none !important;
  }
  .auth-entity--clickable {
    transition: background 220ms, border-color 220ms, box-shadow 220ms !important;
    transform: none !important;
  }
}
