@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Cinzel+Decorative:wght@400;700&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Courier+Prime:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --bg: #050505;
  --panel: #0c0f0f;
  --card: #111111;
  --card-2: #161616;
  --gold: #C6A24A;
  --gold-dark: #8A6A2F;
  --gold-dim: rgba(198, 162, 74, 0.35);
  --gold-soft: rgba(198, 162, 74, 0.12);
  --document: #EFE6D2;
  --parchment: #D8C7A3;
  --muted: #B8B0A0;
  --doc-text: #1A1A1A;
  --danger: #8B1E1E;
  --danger-dim: rgba(139, 30, 30, 0.2);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--document);
  font-family: 'EB Garamond', Georgia, serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
.wrap { width: min(1180px, 92vw); margin: auto; }
.hidden { display: none !important; }

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 7, 7, 0.96);
  border-bottom: 1px solid rgba(198,162,74,0.22);
  backdrop-filter: blur(14px);
}
.nav-inner {
  width: min(1680px, 100vw);
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 0 32px;
}
.brand { display: inline-flex; align-items: center; gap: 14px; min-width: 220px; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  background: radial-gradient(circle at 50% 30%, rgba(198,162,74,0.18), rgba(0,0,0,0.1) 45%, #050505 100%);
  font-family: 'Cinzel Decorative', serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: inset 0 0 18px rgba(198,162,74,0.08);
}
.brand-text {
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.1;
}
.links {
  display: flex;
  gap: clamp(14px, 2vw, 34px);
  font-family: 'Cinzel', serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(239,230,210,0.82);
}
.links a:hover, .footer-links a:hover, .tile a:hover { color: var(--gold); }
.login-btn, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gold);
  background: linear-gradient(180deg, rgba(198,162,74,0.92), rgba(138,106,47,0.92));
  color: #080808;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 22px;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}
.login-btn:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 0 28px rgba(198,162,74,0.22); }
.btn.dark { background: rgba(7,8,8,0.82); color: var(--gold); }

/* Mega-bank homepage layout */
.mega-home {
  width: min(1680px, 100vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(230px, auto);
  gap: 12px;
  padding: 12px;
  position: relative;
  z-index: 1;
}
.tile {
  position: relative;
  border: 1px solid rgba(198,162,74,0.62);
  background: #090d0d;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(239,230,210,0.03);
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(198,162,74,0.13), transparent 32%, rgba(0,0,0,0.22));
  pointer-events: none;
}
.hero-tile {
  grid-column: span 6;
  grid-row: span 2;
  min-height: 520px;
  background:
    linear-gradient(90deg, rgba(3,5,5,0.98) 0%, rgba(3,5,5,0.78) 47%, rgba(3,5,5,0.35) 100%),
    radial-gradient(circle at 76% 42%, rgba(198,162,74,0.28), transparent 18%),
    linear-gradient(135deg, #20272a, #070808 58%, #040404);
}
.hero-tile::after {
  content: "";
  position: absolute;
  right: 6%;
  bottom: 0;
  width: 58%;
  height: 82%;
  opacity: 0.72;
  background:
    linear-gradient(to top, rgba(0,0,0,0.75), transparent 40%),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(198,162,74,0.14) 35px 36px),
    linear-gradient(110deg, transparent 0 18%, rgba(239,230,210,0.14) 18% 20%, transparent 20% 34%, rgba(198,162,74,0.22) 34% 36%, transparent 36% 100%);
  clip-path: polygon(18% 100%, 18% 18%, 34% 9%, 34% 100%, 40% 100%, 40% 28%, 58% 0, 76% 28%, 76% 100%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 490px;
  padding: clamp(34px, 5vw, 72px);
}
.hero-copy h1 {
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  line-height: 0.98;
  margin: 0 0 18px;
  font-size: clamp(48px, 5.9vw, 86px);
  letter-spacing: 0.05em;
  font-weight: 700;
}
.hero-copy h1 span { color: var(--gold); letter-spacing: 0.18em; }
.hero-copy p { color: rgba(239,230,210,0.85); font-size: 17px; line-height: 1.55; }
.strapline {
  color: var(--muted) !important;
  font-size: 15px !important;
  font-style: italic;
}
.strapline span { color: var(--gold); padding: 0 9px; }

.service-tile {
  grid-column: span 3;
  padding: 42px 34px;
  min-height: 245px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
}
.service-tile h2, .bottom-card h2, .future-band h2 {
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.08;
  margin: 12px 0 12px;
}
.service-tile h2 { font-size: clamp(25px, 2.2vw, 34px); }
.service-tile p, .bottom-card p, .future-band p, .news-card p { color: rgba(239,230,210,0.78); font-size: 16px; line-height: 1.5; }
.service-tile a, .bottom-card a, .news-card a {
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 8px;
  font-weight: 700;
}
.tile-icon { color: var(--gold); font-size: 33px; line-height: 1; }
.image-corporate { background: linear-gradient(120deg, rgba(6,8,9,0.92), rgba(6,8,9,0.38)), radial-gradient(circle at 72% 38%, rgba(239,230,210,0.14), transparent 26%), #101315; }
.image-ims { background: linear-gradient(120deg, rgba(6,8,9,0.9), rgba(6,8,9,0.5)), repeating-linear-gradient(90deg, rgba(239,230,210,0.06) 0 2px, transparent 2px 24px), #101315; }
.dashboard-tile { background: linear-gradient(120deg, rgba(6,8,9,0.9), rgba(6,8,9,0.42)), radial-gradient(circle at 72% 58%, rgba(48,122,140,0.22), transparent 28%), #101315; }
.vault-tile { background: radial-gradient(circle at 78% 52%, rgba(198,162,74,0.20), transparent 21%), repeating-radial-gradient(circle at 78% 52%, rgba(198,162,74,0.28) 0 1px, transparent 1px 18px), #0d1010; }

.future-band {
  grid-column: span 7;
  min-height: 170px;
  padding: 34px 46px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 30px;
  align-items: center;
  background: linear-gradient(90deg, rgba(4,6,6,0.94), rgba(4,6,6,0.62)), linear-gradient(130deg, #17140d, #101316 50%, #271d09);
}
.large-sigil {
  width: 92px;
  height: 92px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: 'Cinzel Decorative', serif;
  font-weight: 700;
  letter-spacing: .08em;
  background: radial-gradient(circle, rgba(198,162,74,.16), transparent 62%);
}
.overline { color: var(--gold) !important; font-family: 'Cinzel', serif; text-transform: uppercase; letter-spacing: .14em; margin: 0; }
.future-band h2 { color: var(--gold); font-size: clamp(27px, 2.4vw, 39px); margin: 6px 0; }
.stat-band {
  grid-column: span 5;
  min-height: 170px;
  padding: 28px 34px;
  background: linear-gradient(180deg, #0b0f0f, #080909);
}
.band-title {
  margin: 0 0 24px;
  text-align: center;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  letter-spacing: .16em;
}
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stats div { text-align: center; border-left: 1px solid rgba(198,162,74,0.25); padding: 0 12px; }
.stats div:first-child { border-left: none; }
.stats strong { display: block; color: var(--gold); font-family: 'Cinzel', serif; font-size: clamp(24px, 2.2vw, 38px); font-weight: 500; }
.stats span { display: block; color: rgba(239,230,210,0.76); font-size: 13px; line-height: 1.2; }
.bottom-card {
  grid-column: span 3;
  min-height: 240px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #080b0b;
}
.bottom-card h2 { font-size: 24px; }
.world-card { background: linear-gradient(130deg, rgba(5,8,8,0.88), rgba(5,8,8,0.5)), radial-gradient(circle at 70% 52%, rgba(198,162,74,0.18), transparent 34%), #090c0c; }
.security-card { background: linear-gradient(130deg, rgba(5,8,8,0.90), rgba(5,8,8,0.44)), radial-gradient(circle at 56% 55%, rgba(239,230,210,0.14), transparent 24%), #090c0c; }
.transparency-card { background: linear-gradient(130deg, rgba(5,8,8,0.90), rgba(5,8,8,0.46)), url('../images/merit_registry_control_room.png') center / cover no-repeat; }
.news-card { background: linear-gradient(130deg, rgba(5,8,8,0.92), rgba(5,8,8,0.6)), radial-gradient(circle at 76% 40%, rgba(198,162,74,0.22), transparent 24%), #0d0d0b; }

/* Shared sections */
.section { position: relative; z-index: 1; padding: 88px 0; }
.portal-section { border-top: 1px solid var(--gold-dim); background: linear-gradient(180deg, rgba(17,17,17,0.45), rgba(5,5,5,1)); }
.kicker {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.kicker::before { content: ""; width: 38px; height: 1px; background: var(--gold); display: block; }
.darkcopy h2, .portal-subsection h2 {
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 4vw, 50px);
  line-height: 1.04;
  margin: 0 0 22px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--document);
}
.darkcopy p, .section-lead { color: rgba(239,230,210,0.78); font-size: 18px; line-height: 1.7; }
.notice { border-left: 3px solid var(--gold); padding: 16px 20px; background: rgba(198,162,74,0.07); color: rgba(239,230,210,0.9); font-style: italic; margin-top: 24px; line-height: 1.6; }
.danger-notice { border-left-color: var(--danger); background: var(--danger-dim); }
.portal-intro-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: start; }
.panel {
  background: linear-gradient(160deg, var(--document) 0%, #e5dbc8 100%);
  color: var(--doc-text);
  border: 1px solid var(--gold);
  box-shadow: 0 30px 90px rgba(0,0,0,0.55), 0 0 60px rgba(198,162,74,0.08);
  padding: 40px;
  position: relative;
}
.panel::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(198,162,74,0.42); pointer-events: none; }
.panel h2 { font-family: 'Cinzel', serif; color: var(--doc-text); font-size: clamp(22px, 2.5vw, 34px); line-height: 1.08; margin: 0; text-transform: uppercase; letter-spacing: .07em; }
.panel label { font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: rgba(26,26,26,.62); display: block; margin: 18px 0 6px; }
.ornament { display: flex; align-items: center; gap: 16px; margin: 8px 0 28px; }
.ornament::before, .ornament::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-dim), transparent); }
.ornament span { color: var(--gold); font-family: 'Cinzel Decorative', serif; }
.input { width: 100%; padding: 14px 16px; background: rgba(17,17,17,.9); border: 1px solid rgba(198,162,74,.45); color: var(--document); font-family: 'Courier Prime', monospace; font-size: 14px; outline: none; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(198,162,74,.12); }
.input::placeholder { color: rgba(184,176,160,.45); }
.form-btn { width: 100%; margin-top: 20px; padding: 16px; }
.portal-hint { color: rgba(26,26,26,.55); font-size: 12px; margin: 14px 0 0; text-align: center; }
.access-denied { background: var(--danger-dim); border: 1px solid rgba(139,30,30,.6); color: #d85c5c; padding: 16px 20px; font-family: 'Courier Prime', monospace; font-size: 13px; line-height: 1.7; margin-top: 16px; display: none; }
.access-denied.visible { display: block; animation: flicker .4s ease; }
.access-denied b { color: #e05555; }
.access-denied.granted { display: block; color: var(--gold); border-color: rgba(198,162,74,.65); background: rgba(198,162,74,.08); }
.access-denied.granted b { color: var(--gold); }
@keyframes flicker { 0%{opacity:0} 20%{opacity:1} 35%{opacity:.3} 55%{opacity:1} 70%{opacity:.6} 100%{opacity:1} }
.portal-private { margin-top: 64px; border-top: 1px solid rgba(198,162,74,.35); padding-top: 42px; }
.portal-unlocked { border: 1px solid rgba(198,162,74,.42); background: linear-gradient(135deg, rgba(198,162,74,.12), rgba(17,17,17,.9)); padding: 18px 22px; margin-bottom: 36px; display: flex; justify-content: space-between; gap: 18px; align-items: center; color: var(--document); font-family: 'Courier Prime', monospace; }
.portal-unlocked span { color: var(--gold); font-family: 'Cinzel', serif; letter-spacing: .18em; font-size: 12px; }
.portal-subsection { padding-top: 40px; margin-top: 40px; border-top: 1px solid rgba(198,162,74,.22); }
.portal-subsection:first-of-type { margin-top: 0; }
.portal-subsection-heading { margin-bottom: 24px; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }
.contact-lines { margin-top: 20px; color: rgba(239,230,210,.62) !important; font-size: 15px !important; }
.contact-lines strong { color: var(--gold); }
.terminal { font-family: 'Courier Prime', monospace; background: #050505; border: 1px solid rgba(198,162,74,.35); padding: 28px 30px; color: rgba(239,230,210,.85); line-height: 1.8; box-shadow: inset 0 0 40px rgba(198,162,74,.06); font-size: 14px; }
.terminal::before { content: "● ● ●"; display: block; color: var(--gold-dim); letter-spacing: .3em; font-size: 10px; margin-bottom: 16px; }
.legal-row { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(198,162,74,.15); padding: 8px 0; gap: 18px; }
.legal-row:last-child { border-bottom: none; }
.legal-label { color: var(--muted); }
.legal-value { color: var(--document); text-align: right; }
.legal-value.flagged { color: #c94040; }
.docs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--gold-dim); margin-top: 40px; border: 1px solid var(--gold-dim); }
.doc { background: var(--card); padding: 18px; cursor: pointer; transition: background .25s, transform .25s; position: relative; overflow: hidden; }
.doc:hover { background: #181816; }
.doc:hover .doc-img-wrap img { transform: scale(1.03); }
.featured-doc { grid-column: span 2; grid-row: span 2; }
.doc-img-wrap { overflow: hidden; border: 1px solid rgba(239,230,210,.18); position: relative; background: #060606; max-height: 310px; }
.featured-doc .doc-img-wrap { max-height: 620px; }
.doc-img-wrap::after { content: "VIEW"; position: absolute; inset: 0; background: rgba(5,5,5,.7); display: grid; place-items: center; font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: .3em; color: var(--gold); opacity: 0; transition: opacity .25s; }
.doc:hover .doc-img-wrap::after { opacity: 1; }
.doc-img-wrap img { width: 100%; display: block; transition: transform .4s ease; }
.doc h3 { font-family: 'Cinzel', serif; margin: 14px 2px 6px; color: var(--gold); letter-spacing: .08em; text-transform: uppercase; font-size: 11px; font-weight: 600; }
.doc p { margin: 0 2px 8px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.footer { border-top: 1px solid rgba(198,162,74,.35); padding: 28px 36px 22px; position: relative; z-index: 1; background: #070909; }
.footer-main { width: min(1680px, 100%); margin: auto; display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 28px; align-items: center; }
.footer-links { display: flex; justify-content: center; gap: 28px; color: rgba(239,230,210,.66); font-family: 'Cinzel', serif; font-size: 11px; text-transform: uppercase; letter-spacing: .13em; }
.footer-motto { text-align: right; font-family: 'Cinzel', serif; color: var(--document); letter-spacing: .12em; text-transform: uppercase; line-height: 1.6; }
.footer-legal { margin: 18px auto 0; text-align: center; color: rgba(184,176,160,.54); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.modal { position: fixed; inset: 0; background: rgba(5,5,5,.92); display: none; align-items: center; justify-content: center; z-index: 200; padding: 28px; }
.modal.open { display: flex; animation: fadeIn .2s ease; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.modal img { max-height: 90vh; max-width: 90vw; border: 1px solid var(--gold); box-shadow: 0 50px 160px rgba(0,0,0,.8); }
.modal-close { position: absolute; top: 20px; right: 24px; background: var(--card); border: 1px solid var(--gold-dim); color: var(--gold); font-family: 'Cinzel', serif; font-size: 11px; letter-spacing: .15em; padding: 10px 16px; cursor: pointer; }

@media (max-width: 1180px) {
  .links { display: none; }
  .mega-home { grid-template-columns: repeat(6, 1fr); }
  .hero-tile { grid-column: span 6; }
  .service-tile { grid-column: span 3; }
  .future-band, .stat-band { grid-column: span 6; }
  .bottom-card { grid-column: span 3; }
  .portal-intro-grid, .split { grid-template-columns: 1fr; }
  .split.reverse { direction: ltr; }
  .docs { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav-inner { padding: 0 16px; min-height: 68px; }
  .brand { min-width: 0; }
  .brand-text { font-size: 12px; }
  .login-btn { padding: 10px 14px; }
  .mega-home { grid-template-columns: 1fr; padding: 8px; gap: 8px; }
  .hero-tile, .service-tile, .future-band, .stat-band, .bottom-card { grid-column: span 1; }
  .hero-copy { padding: 34px 26px; }
  .hero-copy h1 { font-size: 42px; }
  .future-band { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .stats div { border-left: none; }
  .section { padding: 58px 0; }
  .panel { padding: 30px 24px; }
  .docs { grid-template-columns: 1fr; }
  .featured-doc { grid-column: span 1; grid-row: span 1; }
  .footer-main { grid-template-columns: 1fr; text-align: center; }
  .footer .brand { justify-content: center; }
  .footer-links { flex-wrap: wrap; gap: 14px; }
  .footer-motto { text-align: center; }
  .portal-unlocked { flex-direction: column; align-items: flex-start; }
}


/* Fleshed-out subpages and image-led megacorp layout */
.hero-tile {
  background:
    linear-gradient(90deg, rgba(3,5,5,0.98) 0%, rgba(3,5,5,0.80) 42%, rgba(3,5,5,0.32) 100%),
    url('../images/corporate_cathedral_at_dusk.png') center / cover no-repeat !important;
}
.hero-tile::after { opacity: 0.12; }
.image-corporate {
  background: linear-gradient(120deg, rgba(6,8,9,0.90), rgba(6,8,9,0.32)), url('../images/corporate_power_boardroom.png') center / cover no-repeat !important;
}
.image-ims {
  background: linear-gradient(120deg, rgba(6,8,9,0.88), rgba(6,8,9,0.28)), url('../images/ims_corridor.png') center / cover no-repeat !important;
}
.dashboard-tile {
  background: linear-gradient(120deg, rgba(6,8,9,0.88), rgba(6,8,9,0.30)), url('../images/merit_registry_control_room.png') center / cover no-repeat !important;
}
.vault-tile {
  background: linear-gradient(120deg, rgba(6,8,9,0.88), rgba(6,8,9,0.28)), url('../images/vault_door.png') center / cover no-repeat !important;
}
.future-band {
  background: linear-gradient(90deg, rgba(4,6,6,0.94), rgba(4,6,6,0.52)), url('../images/global_connectivity.png') center / cover no-repeat !important;
}
.world-card { background: linear-gradient(130deg, rgba(5,8,8,0.86), rgba(5,8,8,0.42)), url('../images/global_connectivity.png') center / cover no-repeat !important; }
.security-card { background: linear-gradient(130deg, rgba(5,8,8,0.88), rgba(5,8,8,0.42)), url('../images/vault_door.png') center / cover no-repeat !important; }
.news-card { background: linear-gradient(130deg, rgba(5,8,8,0.90), rgba(5,8,8,0.48)), url('../images/bank_lobby.png') center / cover no-repeat !important; }

.subpage { position: relative; z-index: 1; }
.page-hero {
  min-height: 520px;
  display: flex;
  align-items: end;
  position: relative;
  background: var(--hero-image) center / cover no-repeat;
  border-bottom: 1px solid rgba(198,162,74,.42);
}
.page-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5,5,5,.96), rgba(5,5,5,.68) 48%, rgba(5,5,5,.18)), linear-gradient(0deg, rgba(5,5,5,.84), transparent 44%);
}
.page-hero-copy { position: relative; padding: 84px 0; max-width: 980px; }
.page-hero h1 {
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  font-size: clamp(44px, 6vw, 86px);
  line-height: .98;
  letter-spacing: .06em;
  margin: 0 0 24px;
}
.page-hero p { max-width: 760px; color: rgba(239,230,210,.84); font-size: 22px; line-height: 1.55; }
.page-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.page-grid.two { grid-template-columns: repeat(2, 1fr); }
.feature-card {
  min-height: 245px;
  padding: 34px;
  border: 1px solid rgba(198,162,74,.38);
  background: linear-gradient(160deg, rgba(17,17,17,.92), rgba(5,5,5,.94));
  box-shadow: inset 0 0 50px rgba(198,162,74,.04);
}
.feature-card.wide { grid-column: span 2; }
.feature-card.danger { border-color: rgba(139,30,30,.75); background: linear-gradient(160deg, rgba(139,30,30,.16), rgba(5,5,5,.94)); }
.feature-card h2, .showcase-copy h2, .image-band h2, .bulletin-list h2, .prose h2, .process-list h2 {
  font-family: 'Cinzel', serif;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gold);
  margin: 0 0 14px;
  line-height: 1.1;
}
.feature-card p, .showcase-copy p, .image-band p, .bulletin-list p, .prose p, .process-list p { color: rgba(239,230,210,.78); font-size: 18px; line-height: 1.65; }
.image-band {
  min-height: 380px;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, rgba(5,5,5,.92), rgba(5,5,5,.52)), var(--band-image) center / cover no-repeat;
  border-top: 1px solid rgba(198,162,74,.35);
  border-bottom: 1px solid rgba(198,162,74,.35);
}
.image-band h2 { font-size: clamp(34px,4vw,60px); color: var(--document); }
.image-band p { max-width: 700px; }
.split-showcase { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 520px; border-top: 1px solid rgba(198,162,74,.35); border-bottom: 1px solid rgba(198,162,74,.35); }
.showcase-img { background-position: center; background-size: cover; min-height: 420px; }
.showcase-copy { padding: clamp(46px,6vw,88px); display: flex; flex-direction: column; justify-content: center; background: linear-gradient(160deg, #111, #050505); }
.process-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid rgba(198,162,74,.38); }
.process-list > div { padding: 34px; border-left: 1px solid rgba(198,162,74,.25); background: rgba(17,17,17,.86); }
.process-list > div:first-child { border-left: none; }
.process-list span { font-family:'Cinzel',serif; color: var(--gold); font-size: 34px; }
.registry-dashboard { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 18px; align-items: stretch; }
.registry-terminal { grid-row: span 2; }
.slim { padding-top: 0; }
.bulletin-list, .prose { border: 1px solid rgba(198,162,74,.35); background: rgba(17,17,17,.78); padding: 34px; }
@media (max-width: 980px) {
  .page-grid, .page-grid.two, .registry-dashboard, .process-list, .split-showcase { grid-template-columns: 1fr; }
  .feature-card.wide { grid-column: span 1; }
  .process-list > div { border-left: none; border-top: 1px solid rgba(198,162,74,.25); }
  .process-list > div:first-child { border-top: none; }
}


/* Enhanced IMS internal portal */
.ims-system {
  background:
    radial-gradient(circle at top right, rgba(198, 162, 74, 0.09), transparent 34%),
    linear-gradient(180deg, #050505 0%, #0b0b0a 100%);
}

.portal-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  border: 1px solid rgba(198, 162, 74, 0.35);
  background: rgba(5, 5, 5, 0.86);
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  min-height: 720px;
}

.portal-sidebar {
  background: linear-gradient(180deg, rgba(17,17,17,0.98), rgba(5,5,5,0.98));
  border-right: 1px solid rgba(198, 162, 74, 0.28);
  padding: 28px 20px;
  position: relative;
}

.portal-emblem {
  border: 1px solid rgba(198, 162, 74, 0.35);
  padding: 18px;
  margin-bottom: 26px;
  text-align: center;
  background: rgba(198, 162, 74, 0.05);
}

.portal-emblem-mark {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 28px;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 6px;
}

.portal-emblem small,
.portal-sidebar-status small {
  display: block;
  color: rgba(239,230,210,0.6);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-menu {
  display: grid;
  gap: 8px;
}

.portal-menu a {
  color: rgba(239,230,210,0.68);
  text-decoration: none;
  border: 1px solid rgba(198, 162, 74, 0.13);
  padding: 12px 14px;
  font-size: 12px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.02);
}

.portal-menu a:hover,
.portal-menu a.active {
  color: var(--gold);
  border-color: rgba(198, 162, 74, 0.45);
  background: rgba(198, 162, 74, 0.08);
}

.portal-sidebar-status {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 24px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-top: 1px solid rgba(198, 162, 74, 0.2);
  padding-top: 18px;
  color: var(--document);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #63d471;
  box-shadow: 0 0 18px rgba(99, 212, 113, 0.8);
}

.portal-main {
  padding: 34px;
}

.portal-topbar {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  align-items: flex-start;
  margin-bottom: 26px;
}

.portal-lede {
  max-width: 720px;
  color: rgba(239,230,210,0.7);
  line-height: 1.7;
}

.clearance-card {
  min-width: 230px;
  border: 1px solid rgba(198, 162, 74, 0.35);
  padding: 16px;
  text-align: right;
  background: rgba(198, 162, 74, 0.05);
}

.clearance-card span,
.card-kicker {
  display: block;
  color: var(--gold);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.14em;
  margin-bottom: 7px;
}

.clearance-card strong {
  color: var(--document);
  font-family: 'Cinzel', serif;
  font-size: 15px;
}

.internal-login {
  border: 1px solid rgba(198, 162, 74, 0.28);
  background:
    linear-gradient(135deg, rgba(198, 162, 74, 0.07), rgba(255,255,255,0.015)),
    rgba(8,8,8,0.75);
  padding: 22px;
}

.login-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}

.internal-login label {
  color: rgba(239,230,210,0.72);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.internal-login input,
.internal-login select {
  display: block;
  width: 100%;
  margin-top: 8px;
  background: #050505;
  border: 1px solid rgba(198, 162, 74, 0.35);
  color: var(--document);
  padding: 13px 12px;
  font: inherit;
}

.login-hint {
  margin-top: 14px;
  color: rgba(239,230,210,0.6);
  font-size: 13px;
}

.login-hint code {
  color: var(--gold);
  border: 1px solid rgba(198, 162, 74, 0.35);
  padding: 2px 7px;
}

.portal-message {
  margin: 14px 0 0;
  font-family: monospace;
  color: rgba(239,230,210,0.65);
}

.portal-message.granted { color: #63d471; }
.portal-message.denied { color: #d46b63; }

.portal-private {
  margin-top: 28px;
}

.system-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(99, 212, 113, 0.35);
  background: rgba(99, 212, 113, 0.05);
  padding: 16px 18px;
  margin-bottom: 22px;
  color: var(--document);
}

.system-banner span {
  color: rgba(239,230,210,0.68);
}

.session-pill,
.classification-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(198, 162, 74, 0.35);
  color: var(--gold);
  padding: 7px 10px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 1fr;
  gap: 16px;
}

.system-card {
  border: 1px solid rgba(198, 162, 74, 0.25);
  background: rgba(17,17,17,0.72);
  padding: 22px;
  color: rgba(239,230,210,0.78);
}

.system-card h3 {
  color: var(--document);
  font-family: 'Cinzel', serif;
  margin: 0 0 16px;
}

.system-card h3 span {
  color: var(--gold);
  font-size: 0.75em;
}

.contributor-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.contributor-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(198, 162, 74, 0.12);
  padding-bottom: 8px;
}

.contributor-card dt {
  color: rgba(239,230,210,0.5);
}

.contributor-card dd {
  margin: 0;
  text-align: right;
}

.warning-text {
  color: #d4a263 !important;
}

.score-number {
  font-family: 'Cinzel', serif;
  font-size: 70px;
  line-height: 1;
  color: var(--gold);
}

.meter {
  height: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(198, 162, 74, 0.25);
  margin-top: 20px;
}

.meter span {
  display: block;
  height: 100%;
  background: var(--gold);
}

.status-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.status-list li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: rgba(239,230,210,0.76);
}

.status-list li span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 13px rgba(198, 162, 74, 0.55);
}

.portal-subsection {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid rgba(198, 162, 74, 0.22);
}

.subsection-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.case-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 18px;
}

.case-terminal {
  border: 1px solid rgba(198, 162, 74, 0.28);
  background: #050505;
  color: rgba(239,230,210,0.83);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid rgba(198, 162, 74, 0.2);
  padding: 10px 14px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.terminal-bar span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(198, 162, 74, 0.65);
}

.case-terminal pre {
  margin: 0;
  padding: 18px;
  overflow: auto;
  line-height: 1.55;
  font-size: 13px;
}

.notice.compact {
  margin-top: 18px;
  padding: 12px;
  font-size: 13px;
}

.locked-docgrid .doc {
  position: relative;
}

.locked-docgrid .doc:before {
  content: "RESTRICTED";
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  background: rgba(5,5,5,0.82);
  border: 1px solid rgba(198, 162, 74, 0.5);
  color: var(--gold);
  padding: 5px 8px;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.audit-table {
  border: 1px solid rgba(198, 162, 74, 0.25);
  background: rgba(5,5,5,0.72);
}

.audit-table div {
  display: grid;
  grid-template-columns: 180px 1fr 110px;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(198, 162, 74, 0.12);
  color: rgba(239,230,210,0.74);
}

.audit-table div:last-child {
  border-bottom: 0;
}

.audit-table strong {
  color: var(--gold);
}

.audit-table em {
  color: rgba(239,230,210,0.55);
  font-style: normal;
  text-align: right;
}

@media (max-width: 980px) {
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: static;
    border-right: 0;
    border-bottom: 1px solid rgba(198, 162, 74, 0.28);
  }

  .portal-sidebar-status {
    position: static;
    margin-top: 22px;
  }

  .portal-topbar,
  .system-banner,
  .subsection-head {
    display: block;
  }

  .clearance-card {
    margin-top: 18px;
    text-align: left;
  }

  .login-grid,
  .dashboard-grid,
  .case-layout,
  .audit-table div {
    grid-template-columns: 1fr;
  }

  .portal-main {
    padding: 24px;
  }
}


/* Three-login portal additions */
.login-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 0 0 18px;
}

.login-tab {
  text-align: left;
  border: 1px solid rgba(198, 162, 74, 0.25);
  background: rgba(17,17,17,0.72);
  color: rgba(239,230,210,0.72);
  padding: 16px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.login-tab:hover,
.login-tab.active {
  border-color: rgba(198, 162, 74, 0.65);
  background: rgba(198, 162, 74, 0.08);
  transform: translateY(-1px);
}

.login-tab strong {
  display: block;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 15px;
  margin-bottom: 6px;
}

.login-tab span {
  display: block;
  color: rgba(239,230,210,0.62);
  font-size: 13px;
  line-height: 1.45;
}

.role-panel {
  display: none;
}

.role-panel.active {
  display: block;
}

.three-login-grid {
  grid-template-columns: 1fr 1fr 1fr auto;
}

@media (max-width: 980px) {
  .login-selector,
  .three-login-grid {
    grid-template-columns: 1fr;
  }
}


/* Login gateway is hidden from public homepage until top-right Login is clicked */
.login-overlay.hidden {
  display: none !important;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(0, 0, 0, 0.72);
}

.login-overlay-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top, rgba(198, 162, 74, 0.10), transparent 36%),
    rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(8px);
}

.login-overlay-panel {
  position: relative;
  width: min(1180px, calc(100vw - 38px));
  max-height: calc(100vh - 38px);
  overflow: auto;
  border: 1px solid rgba(198, 162, 74, 0.45);
  background: #050505;
  box-shadow: 0 28px 90px rgba(0,0,0,0.82);
}

.login-close {
  position: sticky;
  top: 14px;
  float: right;
  z-index: 8;
  margin: 14px 14px -48px 0;
  border: 1px solid rgba(198, 162, 74, 0.45);
  background: rgba(5,5,5,0.9);
  color: var(--gold);
  padding: 10px 13px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.login-close:hover {
  background: rgba(198, 162, 74, 0.12);
}

.login-overlay .portal-shell {
  border: 0;
  min-height: min(720px, calc(100vh - 40px));
}

body.login-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .login-overlay {
    padding: 14px;
  }

  .login-overlay-panel {
    width: calc(100vw - 28px);
    max-height: calc(100vh - 28px);
  }

  .login-close {
    margin-bottom: 12px;
  }
}


/* ID-only login cleanup */
.login-selector {
  display: none !important;
}

.id-login-note {
  color: rgba(239,230,210,0.62);
  font-size: 13px;
}


/* Final polish pages */
.error-page {
  min-height: calc(100vh - 92px);
  display: grid;
  place-items: center;
  padding: 120px 20px 70px;
  background:
    radial-gradient(circle at center, rgba(139, 30, 30, 0.16), transparent 38%),
    linear-gradient(180deg, #050505, #0b0b0a);
}

.error-panel {
  width: min(860px, 100%);
  text-align: center;
  border: 1px solid rgba(198, 162, 74, 0.38);
  background: rgba(10,10,10,0.86);
  padding: 42px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.72);
}

.large-sigil {
  width: 86px;
  height: 86px;
  margin: 0 auto 22px;
  font-size: 18px;
}

.error-panel h1 {
  color: var(--gold);
  font-size: clamp(48px, 7vw, 92px);
  margin: 8px 0 14px;
}

.error-panel p {
  color: rgba(239,230,210,0.76);
  max-width: 700px;
  margin: 0 auto 24px;
  line-height: 1.7;
}

.error-terminal {
  text-align: left;
  margin: 28px auto;
  max-width: 660px;
}

.centered-actions {
  justify-content: center;
}

.signature-grid,
.credential-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.signature-card,
.credential-card {
  border: 1px solid rgba(198, 162, 74, 0.32);
  background: linear-gradient(145deg, rgba(17,17,17,0.96), rgba(5,5,5,0.92));
  padding: 24px;
  color: rgba(239,230,210,0.78);
}

.signature-card h3,
.credential-card h3 {
  font-family: 'Cinzel', serif;
  color: var(--gold);
  margin: 0 0 6px;
}

.signature-card .role,
.credential-card .alias {
  color: rgba(239,230,210,0.55);
  margin-top: 0;
}

.signature-card pre {
  white-space: pre-wrap;
  border-top: 1px solid rgba(198, 162, 74, 0.2);
  margin: 18px 0 0;
  padding-top: 18px;
  color: var(--document);
  font-size: 13px;
  line-height: 1.55;
}

.credential-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}

.credential-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.credential-card:before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(198,162,74,0.12), transparent 40%);
  opacity: 0.7;
  pointer-events: none;
}

.credential-top {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(198, 162, 74, 0.25);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.credential-top span {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.credential-card dl {
  position: relative;
  display: grid;
  gap: 9px;
  margin: 12px 0 24px;
}

.credential-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(198, 162, 74, 0.12);
  padding-bottom: 8px;
}

.credential-card dt {
  color: rgba(239,230,210,0.48);
}

.credential-card dd {
  margin: 0;
  color: var(--document);
  text-align: right;
}

.credential-footer {
  position: relative;
  margin-top: auto;
  color: var(--gold);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.footer-mini-links {
  text-align: center;
  color: rgba(239,230,210,0.46);
  margin: 22px 0 0;
  font-size: 13px;
}

.footer-mini-links a {
  color: rgba(239,230,210,0.62);
  text-decoration: none;
}

.footer-mini-links a:hover {
  color: var(--gold);
}

@media (max-width: 980px) {
  .signature-grid,
  .credential-grid {
    grid-template-columns: 1fr;
  }

  .credential-toolbar {
    display: block;
  }

  .credential-toolbar .btn {
    margin-top: 16px;
  }
}

@media print {
  .nav,
  .footer,
  .page-hero,
  .credential-toolbar .btn,
  .print-note {
    display: none !important;
  }

  body {
    background: white !important;
  }

  .section {
    padding: 0 !important;
  }

  .credential-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10mm;
  }

  .credential-card {
    break-inside: avoid;
    background: #111 !important;
    border: 1px solid #8A6A2F;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
