/* ═══════════════════════════════════════════════════════════
   SBR COHORT — Cohort Portal
   ═══════════════════════════════════════════════════════════ */
:root {
  --bg: #070a05;
  --bg-2: #0d1209;
  --bg-3: #121a0e;
  --card: rgba(20, 30, 16, 0.55);
  --card-solid: #131c0f;
  --gold: #c9a227;
  --gold-bright: #e6c04a;
  --gold-soft: #9a8a3a;
  --gold-dim: #5e5224;
  --gold-glow: rgba(214, 175, 55, 0.22);
  --text: #ece4c6;
  --text-2: #b0a77f;
  --text-3: #6b6545;
  --border: rgba(201, 162, 39, 0.16);
  --border-strong: rgba(201, 162, 39, 0.42);
  --danger: #e0574a;
  --ok: #5fcf8a;
  --font-brand: 'Cinzel', serif;
  --font-display: 'Oswald', sans-serif;
  --font-body: 'Crimson Pro', serif;
  --font-mono: 'Share Tech Mono', monospace;
  --radius: 14px;
  --ease: cubic-bezier(.22, .9, .3, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: var(--gold); color: var(--bg); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 3px; }

/* ── AMBIENT BACKGROUND ── */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient::before {
  content: ''; position: absolute; inset: -20%;
  background:
    radial-gradient(40% 35% at 20% 15%, rgba(201, 162, 39, .13), transparent 70%),
    radial-gradient(35% 30% at 85% 80%, rgba(120, 140, 40, .10), transparent 70%),
    radial-gradient(60% 50% at 50% 50%, rgba(16, 24, 12, .9), var(--bg));
  animation: drift 24s ease-in-out infinite alternate;
}
.ambient .grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(201, 162, 39, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 162, 39, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.ambient .noise {
  position: absolute; inset: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}
@keyframes drift { to { transform: translate3d(3%, -2%, 0) scale(1.05); } }

/* ── HEADER ── */
.cp-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  background: rgba(7, 10, 5, .72);
  border-bottom: 1px solid var(--border);
}
.cp-header-inner {
  max-width: 1280px; margin: 0 auto; padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.cp-brand { display: flex; align-items: center; gap: 14px; }
.cp-brand img {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 18px var(--gold-glow);
  transition: transform .6s var(--ease);
}
.cp-brand:hover img { transform: rotate(-12deg) scale(1.06); }
.cp-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.cp-brand-sub { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .32em; color: var(--text-3); }
.cp-brand-name {
  font-family: var(--font-brand); font-weight: 700; font-size: 1.15rem; letter-spacing: .18em;
  background: linear-gradient(100deg, var(--gold-soft), var(--gold-bright) 45%, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cp-header-actions { display: flex; align-items: center; gap: .75rem; }
.cp-user-chip {
  display: none; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; color: var(--text-2);
  padding: .45rem .9rem; border: 1px solid var(--border); border-radius: 999px;
}
.cp-user-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
body.is-member .cp-user-chip { display: inline-flex; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 600; letter-spacing: .18em; font-size: .85rem;
  text-transform: uppercase; padding: .85rem 1.5rem; border-radius: 10px;
  transition: all .3s var(--ease); position: relative; overflow: hidden; white-space: nowrap;
}
.btn-gold {
  color: #140f02;
  background: linear-gradient(120deg, #b38b1d, var(--gold-bright) 50%, #b38b1d);
  background-size: 200% 100%;
  box-shadow: 0 8px 28px -10px rgba(214, 175, 55, .6), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-gold:hover { background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 14px 34px -10px rgba(214, 175, 55, .75); }
.btn-gold:disabled { opacity: .55; transform: none; cursor: progress; }
.btn-ghost { color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--gold-bright); border-color: var(--border-strong); background: rgba(201, 162, 39, .06); }
.btn-sm { padding: .5rem 1rem; font-size: .7rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn .spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(20, 15, 2, .3); border-top-color: #140f02;
  animation: spin .8s linear infinite; display: none;
}
.btn.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── VIEWS ── */
main { min-height: calc(100vh - 73px); }
.view { display: none; animation: viewIn .7s var(--ease) both; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.gate {
  max-width: 1200px; margin: 0 auto; padding: 4.5rem 32px 5rem;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 4rem; align-items: center;
}

/* ── HERO / EMBLEM ── */
.emblem { position: relative; width: 210px; height: 210px; margin-bottom: 2.2rem; }
.emblem img {
  position: absolute; inset: 22px; width: calc(100% - 44px); height: calc(100% - 44px);
  border-radius: 50%; object-fit: cover; z-index: 2;
  box-shadow: 0 0 60px rgba(214, 175, 55, .25);
}
.emblem .ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--border-strong);
}
.emblem .ring.r1 { border-style: dashed; animation: spin 40s linear infinite; }
.emblem .ring.r2 {
  inset: -14px; border-color: transparent; border-top-color: var(--gold); border-right-color: rgba(201, 162, 39, .3);
  animation: spin 7s linear infinite;
}
.emblem .ring.r3 { inset: 10px; border-color: rgba(201, 162, 39, .1); }
.emblem::after {
  content: ''; position: absolute; inset: -40px; border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 175, 55, .16), transparent 65%);
  animation: pulse 4s ease-in-out infinite; z-index: 0;
}
@keyframes pulse { 50% { transform: scale(1.08); opacity: .6; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .32em; color: var(--gold-soft);
  margin-bottom: 1.1rem;
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--gold-soft); }
.hero-title {
  font-family: var(--font-brand); font-weight: 700; line-height: 1.02;
  font-size: clamp(2.6rem, 5.4vw, 4.4rem); letter-spacing: .04em;
  margin-bottom: 1.2rem;
}
.hero-title .sbr { display: block; font-size: .38em; letter-spacing: .5em; color: var(--text-2); margin-bottom: .5rem; }
.shimmer {
  background: linear-gradient(100deg, #8a7424 0%, var(--gold-bright) 30%, #fff3c4 45%, var(--gold-bright) 60%, #8a7424 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}
@keyframes shimmer { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.hero-lead { font-size: 1.2rem; color: var(--text-2); max-width: 30rem; margin-bottom: 2.4rem; font-weight: 300; }

.steps { display: flex; flex-direction: column; gap: 1rem; max-width: 30rem; }
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step-num {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: .75rem; color: var(--gold-bright);
  border: 1px solid var(--border-strong); background: rgba(201, 162, 39, .06);
}
.step h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: .12em; font-size: .9rem; text-transform: uppercase; }
.step p { font-size: .95rem; color: var(--text-3); }

/* ── GLASS CARD ── */
.glass {
  position: relative;
  background: linear-gradient(160deg, rgba(28, 40, 20, .7), rgba(12, 18, 9, .75));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.glass::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(230, 192, 74, .55), transparent 35%, transparent 65%, rgba(230, 192, 74, .3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.form-card { padding: 2.6rem; }
.card-tag { font-family: var(--font-mono); font-size: .65rem; letter-spacing: .28em; color: var(--gold-soft); margin-bottom: .6rem; }
.card-title { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; letter-spacing: .06em; margin-bottom: .3rem; }
.card-sub { color: var(--text-3); font-size: 1rem; margin-bottom: 2rem; }

/* ── FORMS ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.f-field { position: relative; }
.f-field label {
  display: block; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .2em;
  color: var(--text-2); margin-bottom: .45rem;
}
.f-field label .req { color: var(--gold-bright); }
.f-field label .opt { color: var(--text-3); letter-spacing: .1em; }
.f-input-wrap { position: relative; }
.f-input-wrap svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; stroke: var(--text-3); fill: none; stroke-width: 1.6;
  transition: stroke .3s; pointer-events: none;
}
.f-field input {
  width: 100%; padding: .9rem 1rem .9rem 2.6rem;
  background: rgba(7, 10, 5, .6); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  font-family: var(--font-body); font-size: 1.02rem; outline: none;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.f-field input::placeholder { color: var(--text-3); }
.f-field input:focus { border-color: var(--gold); background: rgba(7, 10, 5, .85); box-shadow: 0 0 0 4px rgba(201, 162, 39, .1); }
.f-field input:focus + svg, .f-input-wrap:focus-within svg { stroke: var(--gold-bright); }
.f-field.invalid input { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(224, 87, 74, .1); }
.pw-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em; color: var(--text-3); padding: .3rem .5rem;
}
.pw-toggle:hover { color: var(--gold-bright); }

.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem; color: var(--text-3); margin: 1.4rem 0 1.6rem; }
.consent input { accent-color: var(--gold); margin-top: .3rem; width: 16px; height: 16px; flex: none; }

.form-error {
  display: none; margin-bottom: 1rem; padding: .75rem 1rem; border-radius: 8px;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em;
  color: #ffb3aa; background: rgba(224, 87, 74, .1); border: 1px solid rgba(224, 87, 74, .35);
}
.form-error.show { display: block; animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.switch-line { margin-top: 1.5rem; text-align: center; font-size: .98rem; color: var(--text-3); }
.switch-line button { color: var(--gold-bright); font-weight: 600; border-bottom: 1px solid transparent; transition: border-color .3s; }
.switch-line button:hover { border-color: var(--gold-bright); }

/* ── PENDING / APPROVAL VIEW ── */
.status-wrap { max-width: 760px; margin: 0 auto; padding: 5rem 32px; }
.status-card { padding: 3.2rem 3rem; text-align: center; }
.radar { position: relative; width: 150px; height: 150px; margin: 0 auto 2.2rem; }
.radar .disc {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(circle, transparent 32%, rgba(201, 162, 39, .1) 33%, transparent 34%),
    radial-gradient(circle, transparent 62%, rgba(201, 162, 39, .1) 63%, transparent 64%),
    radial-gradient(circle, rgba(201, 162, 39, .07), transparent 70%);
  overflow: hidden;
}
.radar .disc::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(230, 192, 74, .55), transparent 25%);
  animation: spin 3.2s linear infinite;
}
.radar img {
  position: absolute; inset: 34px; width: calc(100% - 68px); height: calc(100% - 68px);
  border-radius: 50%; object-fit: cover; z-index: 2; border: 1px solid var(--border-strong);
}
.radar.approved .disc::before { background: conic-gradient(from 0deg, rgba(95, 207, 138, .55), transparent 25%); }
.radar.rejected .disc::before { animation: none; background: rgba(224, 87, 74, .15); }

.status-badge {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .26em;
  padding: .45rem 1rem; border-radius: 999px; margin-bottom: 1.2rem;
  color: var(--gold-bright); border: 1px solid var(--border-strong); background: rgba(201, 162, 39, .08);
}
.status-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; }
.status-badge.approved { color: var(--ok); border-color: rgba(95, 207, 138, .4); background: rgba(95, 207, 138, .08); }
.status-badge.rejected { color: var(--danger); border-color: rgba(224, 87, 74, .4); background: rgba(224, 87, 74, .08); }
@keyframes blink { 50% { opacity: .25; } }
.status-title { font-family: var(--font-display); font-weight: 600; font-size: 2.1rem; letter-spacing: .05em; margin-bottom: .7rem; }
.status-text { color: var(--text-2); font-size: 1.12rem; max-width: 34rem; margin: 0 auto 2.2rem; }

.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0 auto 2.4rem; max-width: 520px; position: relative; }
.timeline::before {
  content: ''; position: absolute; top: 15px; left: 16.6%; right: 16.6%; height: 1px; background: var(--border);
}
.timeline .progress-line {
  position: absolute; top: 15px; left: 16.6%; height: 1px; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright)); transition: width 1s var(--ease);
}
.tl-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.tl-dot {
  width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: .7rem; color: var(--text-3);
  background: var(--bg-2); border: 1px solid var(--border); z-index: 1; transition: all .5s;
}
.tl-step.done .tl-dot { background: var(--gold); color: #140f02; border-color: var(--gold); }
.tl-step.current .tl-dot { border-color: var(--gold-bright); color: var(--gold-bright); box-shadow: 0 0 0 6px rgba(201, 162, 39, .1); }
.tl-label { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .16em; color: var(--text-3); }
.tl-step.done .tl-label, .tl-step.current .tl-label { color: var(--text-2); }

.ref-box {
  display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap;
  padding: 1.1rem 1.5rem; border: 1px dashed var(--border); border-radius: 10px; margin-bottom: 2rem;
}
.ref-box div { text-align: left; }
.ref-box span { display: block; font-family: var(--font-mono); font-size: .6rem; letter-spacing: .2em; color: var(--text-3); }
.ref-box strong { font-family: var(--font-mono); font-weight: 400; font-size: .9rem; color: var(--text); letter-spacing: .06em; }
.status-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.poll-note { margin-top: 1.4rem; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .14em; color: var(--text-3); }

/* ── LOGIN VIEW ── */
.login-wrap { max-width: 470px; margin: 0 auto; padding: 5rem 24px; }
.login-wrap .emblem { width: 120px; height: 120px; margin: 0 auto 2rem; }
.login-wrap .emblem img { inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); }
.login-wrap .emblem .ring.r2 { inset: -9px; }
.login-wrap .form-card { text-align: left; }
.login-wrap .stack { display: flex; flex-direction: column; gap: 1.1rem; margin-bottom: 1.6rem; }

/* ── PORTAL ── */
.portal { max-width: 1280px; margin: 0 auto; padding: 3rem 32px 5rem; }
.portal-hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap;
  padding: 2.4rem 2.6rem; margin-bottom: 2.2rem; overflow: hidden;
}
.portal-hero .bg-emblem {
  position: absolute; right: -60px; top: 50%; transform: translateY(-50%);
  width: 320px; height: 320px; border-radius: 50%; opacity: .08; object-fit: cover; pointer-events: none;
}
.portal-hero h1 { font-family: var(--font-brand); font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: .05em; line-height: 1.1; }
.portal-hero p { color: var(--text-2); margin-top: .4rem; }
.stats { display: flex; gap: 1rem; position: relative; z-index: 1; }
.stat {
  min-width: 96px; padding: .9rem 1.1rem; border-radius: 10px; text-align: center;
  border: 1px solid var(--border); background: rgba(7, 10, 5, .45);
}
.stat b { display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--gold-bright); line-height: 1.1; }
.stat span { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .2em; color: var(--text-3); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.filter {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .16em;
  padding: .6rem 1.1rem; border-radius: 999px; color: var(--text-3);
  border: 1px solid var(--border); transition: all .3s var(--ease);
}
.filter .count { margin-left: .4rem; opacity: .7; }
.filter:hover { color: var(--text); border-color: var(--border-strong); }
.filter.active { color: #140f02; background: var(--gold); border-color: var(--gold); }
.search { position: relative; min-width: 260px; }
.search input {
  width: 100%; padding: .7rem 1rem .7rem 2.5rem; border-radius: 999px;
  background: rgba(7, 10, 5, .6); border: 1px solid var(--border); color: var(--text);
  font-family: var(--font-body); font-size: .98rem; outline: none; transition: border-color .3s;
}
.search input:focus { border-color: var(--gold); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; stroke: var(--text-3); fill: none; stroke-width: 2; }

.content-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.4rem; }
.c-card {
  position: relative; display: flex; flex-direction: column; text-align: left;
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: var(--card); border: 1px solid var(--border);
  transition: transform .45s var(--ease), border-color .3s, box-shadow .45s;
  animation: viewIn .6s var(--ease) both;
}
.c-card:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: 0 24px 50px -24px rgba(214, 175, 55, .35); }
.c-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--bg-2); overflow: hidden; }
.c-thumb img, .c-thumb video { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.c-card:hover .c-thumb img, .c-card:hover .c-thumb video { transform: scale(1.06); }
.c-thumb::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(7, 10, 5, .85));
}
.c-pdf {
  width: 100%; height: 100%; display: grid; place-items: center;
  background:
    repeating-linear-gradient(0deg, rgba(201, 162, 39, .04) 0 1px, transparent 1px 22px),
    radial-gradient(circle at 50% 40%, rgba(201, 162, 39, .14), transparent 60%), var(--bg-2);
}
.c-pdf .doc {
  width: 78px; height: 100px; border-radius: 6px; position: relative;
  border: 1px solid var(--border-strong); background: linear-gradient(160deg, #1c2614, #0e1509);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12px;
  font-family: var(--font-display); font-weight: 700; letter-spacing: .15em; color: var(--gold-bright); font-size: .85rem;
  box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .8);
  transition: transform .6s var(--ease);
}
.c-pdf .doc::before {
  content: ''; position: absolute; top: 14px; left: 12px; right: 12px; height: 34px;
  background: repeating-linear-gradient(180deg, rgba(201, 162, 39, .35) 0 2px, transparent 2px 8px);
}
.c-card:hover .c-pdf .doc { transform: translateY(-4px) rotate(-3deg); }
.play-btn {
  position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(7, 10, 5, .55); border: 1px solid var(--gold); backdrop-filter: blur(6px);
  transition: transform .4s var(--ease), background .3s;
}
.play-btn::before { content: ''; margin-left: 4px; border-left: 15px solid var(--gold-bright); border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.c-card:hover .play-btn { transform: translate(-50%, -50%) scale(1.12); background: rgba(201, 162, 39, .25); }
.type-badge {
  position: absolute; z-index: 2; top: 12px; left: 12px;
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .2em;
  padding: .3rem .65rem; border-radius: 6px;
  background: rgba(7, 10, 5, .7); border: 1px solid var(--border-strong); color: var(--gold-bright);
  backdrop-filter: blur(6px);
}
.c-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.c-title { font-family: var(--font-display); font-weight: 500; font-size: 1.12rem; letter-spacing: .04em; line-height: 1.3; }
.c-desc { color: var(--text-3); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-meta { margin-top: auto; padding-top: .7rem; display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em; color: var(--text-3); }

.empty-state { grid-column: 1 / -1; text-align: center; padding: 5rem 1rem; color: var(--text-3); }
.empty-state .big { font-family: var(--font-brand); font-size: 1.6rem; color: var(--text-2); margin-bottom: .4rem; }
.skeleton { border-radius: var(--radius); height: 300px; background: linear-gradient(100deg, var(--bg-2) 30%, var(--bg-3) 50%, var(--bg-2) 70%); background-size: 200% 100%; animation: sk 1.4s infinite; border: 1px solid var(--border); }
@keyframes sk { to { background-position: -200% 0; } }

/* ── VIEWER MODAL ── */
.viewer {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(3, 5, 2, .9); backdrop-filter: blur(10px);
  padding: 2rem; align-items: center; justify-content: center;
}
.viewer.open { display: flex; animation: fadeIn .3s ease both; }
@keyframes fadeIn { from { opacity: 0; } }
.viewer-box {
  width: min(1200px, 100%); max-height: 100%; display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-strong); background: var(--bg-2);
  animation: viewIn .45s var(--ease) both;
}
.viewer-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.3rem; border-bottom: 1px solid var(--border); }
.viewer-head h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: .05em; font-size: 1.15rem; }
.viewer-head .tag { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .2em; color: var(--gold-soft); }
.viewer-actions { display: flex; gap: .5rem; flex: none; }
.viewer-close { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--border); font-size: 1.1rem; color: var(--text-2); }
.viewer-close:hover { color: var(--danger); border-color: var(--danger); }
.viewer-stage { flex: 1; min-height: 0; background: #000; display: flex; align-items: center; justify-content: center; }
.viewer-stage img { max-height: 78vh; width: auto; object-fit: contain; }
.viewer-stage video { width: 100%; max-height: 78vh; background: #000; }
.viewer-stage iframe { width: 100%; height: 78vh; border: 0; background: #fff; }
.viewer-desc { padding: 1rem 1.3rem 1.2rem; color: var(--text-2); font-size: 1rem; border-top: 1px solid var(--border); }
.viewer-desc:empty { display: none; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 140%); z-index: 300;
  padding: .85rem 1.4rem; border-radius: 10px; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em;
  background: var(--card-solid); border: 1px solid var(--border-strong); color: var(--text);
  box-shadow: 0 20px 40px -20px #000; transition: transform .45s var(--ease);
}
.toast.show { transform: translate(-50%, 0); }
.toast.error { border-color: rgba(224, 87, 74, .5); color: #ffc2ba; }

.cp-footer { text-align: center; padding: 2rem; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .24em; color: var(--text-3); border-top: 1px solid var(--border); }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .gate { grid-template-columns: 1fr; gap: 3rem; padding-top: 3rem; }
  .gate-intro { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .eyebrow::before { display: none; }
  .steps { text-align: left; }
  .emblem { width: 170px; height: 170px; }
}
@media (max-width: 600px) {
  .cp-header-inner { padding: 12px 16px; gap: .6rem; }
  .cp-brand-sub, .cp-user-chip .uname { display: none; }
  .cp-brand { gap: 10px; min-width: 0; flex: 1 1 auto; }
  .cp-brand img { width: 36px; height: 36px; flex-shrink: 0; }
  .cp-brand-text { min-width: 0; }
  .cp-brand-name { font-size: 1rem; letter-spacing: .12em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cp-header-actions { gap: .45rem; flex-shrink: 0; }
  .cp-header-actions .btn-sm { padding: .45rem .7rem; font-size: .62rem; letter-spacing: .1em; }
  /* user chip collapses to a standalone status dot */
  .cp-user-chip { padding: 0; border: none; gap: 0; width: 10px; height: 10px; justify-content: center; flex-shrink: 0; }
  .cp-user-chip .dot { width: 8px; height: 8px; }
  .gate, .portal, .status-wrap { padding-left: 18px; padding-right: 18px; }
  .form-card, .status-card { padding: 2rem 1.4rem; }
  .form-grid { grid-template-columns: 1fr; }
  .portal-hero { padding: 1.8rem 1.4rem; }
  .stats { width: 100%; }
  .stat { flex: 1; min-width: 0; }
  .search { min-width: 100%; }
  .viewer { padding: .5rem; }
  .timeline .tl-label { font-size: .55rem; }
}
@media (max-width: 400px) {
  .cp-header-inner { padding: 10px 12px; }
  .cp-brand img { width: 32px; height: 32px; }
  .cp-brand-name { font-size: .9rem; letter-spacing: .08em; }
  .cp-header-actions .btn-sm { padding: .42rem .6rem; letter-spacing: .06em; }
  #mainSiteLink .lbl { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
