:root {
  --navy: #0d1b3e;
  --navy2: #16264f;
  --red: #d92e2e;
  --red-glow: #ff4b4b;
  --cream: #f4ecd6;
  --ink: #1a1a1a;
  --gold: #d9a441;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  color: #e8ecf5;
  background:
    radial-gradient(circle at 20% 0%, rgba(217,46,46,0.12), transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(217,164,65,0.10), transparent 45%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.015) 0 2px, transparent 2px 22px),
    var(--navy);
  min-height: 100vh;
}

.portal-wrap.flash { animation: flashbang 0.35s ease-out; }
@keyframes flashbang {
  0% { background-color: rgba(217,46,46,0.55); }
  100% { background-color: transparent; }
}
.portal-wrap.flash::before {
  content: ""; position: fixed; inset: 0; z-index: 5;
  background: rgba(217,46,46,0.3); pointer-events: none;
}

/* Header */
.ihtx-header {
  background: linear-gradient(180deg, var(--navy2), var(--navy));
  border-bottom: 3px solid var(--red);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
  position: sticky; top: 0; z-index: 10;
}
.ihtx-title {
  font-weight: 700; letter-spacing: 2px; font-size: 1.15rem; margin: 0;
  text-shadow: 0 0 12px rgba(255,75,75,0.4);
}
.ihtx-sub {
  margin: 2px 0 0; font-size: 0.62rem; letter-spacing: 3px; color: var(--gold);
}
@media (min-width: 640px){ .ihtx-title { font-size: 1.6rem; } .ihtx-sub { font-size: 0.7rem; } }

.status-chip {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.6rem; letter-spacing: 1px; color: var(--red-glow);
  border: 1px solid var(--red); padding: 4px 8px; border-radius: 4px;
  background: rgba(217,46,46,0.08);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red-glow);
  box-shadow: 0 0 8px var(--red-glow); animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0.15; } }

/* Seal */
.ihtx-seal { position: relative; width: 52px; height: 52px; }
.ihtx-seal-inner {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 1.5rem; color: var(--gold);
}
.ihtx-seal-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px dashed var(--gold); animation: spin 9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.section-h {
  font-weight: 700; letter-spacing: 1.5px; font-size: 1rem; color: var(--gold);
  margin: 0 0 14px; text-transform: uppercase;
}

/* Notice card */
.notice-card {
  position: relative; background: var(--cream); color: var(--ink);
  border: 1px solid #c9b98a; border-radius: 4px; padding: 28px 24px;
  font-family: "Playfair Display", serif;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.urgent-stamp {
  position: absolute; top: 14px; right: 12px;
  font-family: "IBM Plex Mono", monospace; font-weight: 700; letter-spacing: 2px;
  color: var(--red); border: 3px solid var(--red); padding: 4px 10px; border-radius: 4px;
  transform: rotate(11deg); opacity: 0.85; animation: stampPulse 1.6s ease-in-out infinite;
}
@keyframes stampPulse { 50% { transform: rotate(11deg) scale(1.08); opacity: 1; } }
.notice-eyebrow {
  font-family: "IBM Plex Mono", monospace; font-size: 0.62rem; letter-spacing: 2px;
  color: #7a6a3a; margin: 0 0 14px;
}
.notice-quote { font-size: 1.35rem; font-weight: 900; line-height: 1.35; margin: 0; }
@media (min-width:640px){ .notice-quote { font-size: 1.7rem; } }
.notice-filer { font-style: italic; margin: 12px 0 18px; color: #5a4d2c; }
.notice-legal {
  font-family: "IBM Plex Mono", monospace; font-size: 0.72rem; line-height: 1.7;
  color: #3a3324; border-top: 1px dashed #c9b98a; padding-top: 14px; margin: 0;
}

/* Declassified strip */
.declass-strip {
  margin-top: 16px; padding: 12px 14px; border-radius: 4px;
  background: repeating-linear-gradient(-45deg, rgba(13,27,62,0.06) 0 8px, rgba(217,46,46,0.06) 8px 16px);
  border: 1px dashed var(--red);
  font-family: "IBM Plex Mono", monospace;
}
.declass-tag {
  display: inline-block; font-size: 0.58rem; letter-spacing: 2px; font-weight: 700;
  color: var(--red); background: var(--cream); padding: 2px 6px; margin-right: 8px;
  border: 1px solid var(--red); border-radius: 3px;
}
.declass-text { font-size: 0.72rem; line-height: 1.7; color: #3a3324; }
.declass-text strong { color: var(--red); letter-spacing: 1px; }
.declass-text em { font-style: italic; text-decoration: line-through wavy var(--red); }

/* Counter */
.counter-card {
  background: linear-gradient(180deg, rgba(217,46,46,0.10), rgba(13,27,62,0.4));
  border: 1px solid var(--red); border-radius: 8px; padding: 28px 20px; text-align: center;
  box-shadow: inset 0 0 30px rgba(217,46,46,0.15);
}
.counter-card.shake { animation: shake 0.5s; }
@keyframes shake {
  0%,100%{ transform: translateX(0); }
  20%{ transform: translateX(-10px); } 40%{ transform: translateX(9px); }
  60%{ transform: translateX(-6px); } 80%{ transform: translateX(4px); }
}
.counter-label { font-size: 0.7rem; letter-spacing: 3px; color: var(--gold); margin: 0; }
.counter-num {
  font-size: 5rem; font-weight: 700; line-height: 1; color: var(--red-glow);
  text-shadow: 0 0 24px rgba(255,75,75,0.6); margin: 6px 0;
}
.strike-pips { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; }
.pip {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--red);
  background: transparent; transition: all 0.2s;
}
.pip.on { background: var(--red-glow); box-shadow: 0 0 10px var(--red-glow); }
.admit-btn {
  background: var(--red); color: #fff; border: none; font-family: inherit;
  font-weight: 700; letter-spacing: 1px; font-size: 0.85rem;
  padding: 14px 20px; border-radius: 6px; cursor: pointer; width: 100%; max-width: 380px;
  box-shadow: 0 4px 0 #8c1a1a; transition: transform 0.08s, box-shadow 0.08s;
}
.admit-btn:hover { background: var(--red-glow); }
.admit-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #8c1a1a; }
.counter-note { font-size: 0.68rem; color: #b7c0d8; margin: 16px 0 0; letter-spacing: 1px; }

/* FAQ */
.faq-item { border: 1px solid #2b3d6b; border-radius: 6px; overflow: hidden; background: rgba(22,38,79,0.4); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  background: transparent; border: none; color: #e8ecf5; font-family: inherit;
  font-weight: 600; font-size: 0.8rem; text-align: left; padding: 14px 16px; cursor: pointer;
}
.faq-q:hover { background: rgba(217,164,65,0.06); }
.faq-chev { color: var(--gold); font-size: 0.7rem; transition: transform 0.2s; }
.faq-a { overflow: hidden; transition: max-height 0.3s ease; font-size: 0.75rem; color: #b7c0d8; }

/* Pledge */
.pledge-card {
  background: rgba(22,38,79,0.5); border: 1px solid #2b3d6b; border-radius: 8px; padding: 24px 20px;
}
.field-label { display: block; font-size: 0.62rem; letter-spacing: 2px; color: var(--gold); margin-bottom: 6px; }
.text-input {
  width: 100%; background: var(--navy); border: 1px solid #2b3d6b; color: #fff;
  font-family: inherit; font-size: 0.9rem; padding: 12px 14px; border-radius: 6px;
}
.text-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(217,164,65,0.25); }
.term-row { display: flex; gap: 10px; align-items: flex-start; font-size: 0.78rem; color: #d5dcee; cursor: pointer; }
.term-row input { margin-top: 3px; accent-color: var(--red); width: 16px; height: 16px; }
.form-err { color: var(--red-glow); font-size: 0.72rem; margin: 12px 0 0; }
.issue-btn {
  margin-top: 18px; background: var(--gold); color: var(--navy); border: none;
  font-family: inherit; font-weight: 700; letter-spacing: 1px; font-size: 0.85rem;
  padding: 13px 20px; border-radius: 6px; cursor: pointer; width: 100%;
  box-shadow: 0 4px 0 #a97e2a; transition: transform 0.08s, box-shadow 0.08s;
}
.issue-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #a97e2a; }

.certificate {
  margin-top: 22px; background: var(--cream); color: var(--ink); border: 3px double var(--gold);
  border-radius: 4px; padding: 24px; text-align: center; font-family: "Playfair Display", serif;
  position: relative; animation: certIn 0.5s ease;
}
@keyframes certIn { from { opacity: 0; transform: scale(0.9) rotate(-1deg); } to { opacity: 1; transform: none; } }
.cert-top { font-family: "IBM Plex Mono", monospace; font-size: 0.62rem; letter-spacing: 3px; color: #7a6a3a; margin: 0 0 10px; }
.cert-name { font-size: 1.8rem; font-weight: 900; margin: 0; }
.cert-body { font-size: 0.85rem; margin: 8px 0 16px; color: #4a4028; }
.cert-meta { display: flex; justify-content: space-between; font-family: "IBM Plex Mono", monospace; font-size: 0.6rem; letter-spacing: 1px; color: #7a6a3a; border-top: 1px dashed #c9b98a; padding-top: 10px; }
.cert-seal { position: absolute; bottom: 10px; right: 14px; font-size: 1.4rem; filter: drop-shadow(0 0 4px rgba(217,46,46,0.6)); }

/* Ban modal */
.ban-overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px;
  background: radial-gradient(circle at center, rgba(120,0,0,0.85), rgba(0,0,0,0.94));
  animation: banFade 0.5s ease;
}
@keyframes banFade { from { opacity: 0; } to { opacity: 1; } }
.ban-card {
  max-width: 460px; text-align: center; background: var(--navy2);
  border: 3px solid var(--red); border-radius: 10px; padding: 34px 26px;
  box-shadow: 0 0 60px rgba(217,46,46,0.6);
}
.ban-hammer { font-size: 3.5rem; animation: hammerSwing 1s ease-in-out infinite; }
@keyframes hammerSwing { 0%,100%{ transform: rotate(-18deg);} 50%{ transform: rotate(18deg);} }
.ban-title { font-weight: 700; letter-spacing: 1.5px; color: var(--red-glow); font-size: 1.25rem; margin: 12px 0; text-shadow: 0 0 16px rgba(255,75,75,0.6); }
.ban-body { font-size: 0.8rem; line-height: 1.7; color: #d5dcee; margin: 0 0 24px; }
.sorry-btn {
  background: #fff; color: var(--navy); border: none; font-family: inherit; font-weight: 700;
  padding: 12px 22px; border-radius: 6px; cursor: pointer; font-size: 0.85rem;
}
.sorry-btn:hover { background: var(--gold); }

/* Footer */
.ihtx-footer {
  border-top: 1px solid #2b3d6b; text-align: center; padding: 24px 16px; margin-top: 30px;
  font-size: 0.68rem; color: #7a86a8;
}
.remix-link { color: var(--gold); text-decoration: none; border-bottom: 1px dotted var(--gold); }
.remix-link:hover { color: var(--red-glow); border-color: var(--red-glow); }