:root {
  --ink: #071a33;
  --paper: #f5f0df;
  --acid: #d2af4a;
  --orange: #39c56b;
  --blue: #315f7d;
  --green: #39c56b;
  --green-dark: #176d3b;
  --green-soft: #dff5e5;
  --gold: #d2af4a;
  --muted: #6c6a61;
  --line: 3px solid var(--ink);
  --shadow: 6px 6px 0 rgba(7, 26, 51, .22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: "IBM Plex Mono", monospace;
  background-image:
    linear-gradient(rgba(7,26,51,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7,26,51,.025) 1px, transparent 1px);
  background-size: 28px 28px;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}
main { display: flex; flex-direction: column; }
.cabinet-section { order: 1; }
.ticker { order: 2; }
.hero { order: 3; }
.scanner-section { order: 4; }
.manifesto { order: 5; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(20px, 4vw, 64px);
  border-bottom: 4px solid var(--gold);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 8px 30px rgba(7,26,51,.22);
  position: relative;
  z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: 13px; font-family: "Libre Baskerville", serif; font-weight: 700; line-height: .95; letter-spacing: -.035em; }
.brand small { display: block; margin-bottom: 4px; font-family: "IBM Plex Mono", monospace; font-size: 7px; letter-spacing: .22em; color: var(--gold); }
.brand-crest {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--paper);
  filter: drop-shadow(0 0 10px rgba(57,197,107,.28));
}
.brand-mark {
  width: 49px; height: 49px; display: grid; place-items: center;
  color: var(--paper); background: var(--ink); border-radius: 50%;
  transform: rotate(-7deg); letter-spacing: -.12em; font-family: "Archivo Black", sans-serif;
}
nav { display: flex; gap: 34px; font-size: 12px; font-weight: 700; }
nav a { border-bottom: 2px solid transparent; padding: 8px 0; }
nav a:hover { border-color: var(--gold); color: var(--gold); }
.button {
  border: var(--line);
  background: var(--gold);
  color: var(--ink);
  padding: 15px 22px;
  font-weight: 900;
  letter-spacing: -.04em;
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.button::before { content: "●"; margin-right: 8px; color: var(--green-dark); font-size: 9px; }
.button:hover { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.button-small { padding: 11px 17px; font-size: 12px; border-color: var(--paper); box-shadow: 4px 4px 0 var(--paper); }
.button-dark { color: var(--paper); background: var(--ink); box-shadow: 5px 5px 0 var(--orange); }

.hero {
  min-height: 720px;
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  border-bottom: var(--line);
}
.hero-copy {
  padding: clamp(54px, 7vw, 105px) clamp(25px, 6vw, 92px) 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(90deg, transparent 96%, rgba(210,175,74,.16) 96%),
    var(--paper);
}
.eyebrow {
  margin: 0 0 16px;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .16em;
  font-weight: 900;
}
.live-dot { width: 9px; height: 9px; background: var(--green); border-radius: 50%; display: inline-block; box-shadow: 0 0 0 4px rgba(57,197,107,.18), 0 0 15px rgba(57,197,107,.55); }
h1, h2, h3 { font-family: "Archivo Black", sans-serif; margin: 0; text-transform: uppercase; }
h1 { font-size: clamp(55px, 7.7vw, 118px); line-height: .84; letter-spacing: -.075em; max-width: 900px; }
h1 span, h2 span { color: var(--green); text-shadow: 2px 2px 0 rgba(7,26,51,.1); }
.hero-lede { max-width: 620px; font-size: clamp(15px, 1.4vw, 20px); line-height: 1.55; font-weight: 600; margin: 32px 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.text-button { border: 0; border-bottom: 2px solid var(--ink); background: transparent; font-weight: 900; cursor: pointer; padding: 8px 0; }
.text-button span { color: var(--muted); }
.stats-strip { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--ink); margin-top: auto; padding-top: 24px; gap: 20px; }
.stats-strip div { display: flex; flex-direction: column; gap: 8px; }
.stats-strip span { font-size: 9px; letter-spacing: .14em; font-weight: 800; }
.stats-strip strong { font-size: clamp(13px, 1.25vw, 19px); }
.hero-art {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  border-left: var(--line);
  background: var(--gold);
}
.hero-art img { width: 100%; height: 100%; display: block; object-fit: cover; filter: saturate(1.08) contrast(1.04); }
.stamp {
  position: absolute; z-index: 2; top: 35px; right: 30px;
  width: 108px; height: 108px; display: grid; place-items: center;
  text-align: center; border: 5px double var(--paper); color: var(--paper);
  background: rgba(7,26,51,.82);
  border-radius: 50%; transform: rotate(12deg);
  font-family: "Archivo Black"; font-size: 16px; line-height: .9;
}
.caption-tape {
  position: absolute; left: 5%; right: 5%; bottom: 44px; z-index: 3;
  padding: 13px 15px; background: var(--paper); border: var(--line);
  font-family: "Archivo Black"; text-align: center; font-size: clamp(16px, 2vw, 27px);
  transform: rotate(-2deg); box-shadow: var(--shadow);
  border-left: 9px solid var(--green);
}
.hero-art small { position: absolute; bottom: 13px; left: 30px; z-index: 3; font-weight: 900; font-size: 9px; }

.ticker { overflow: hidden; border-bottom: 4px solid var(--gold); background: var(--ink); color: var(--paper); }
.ticker-track { display: flex; width: max-content; animation: marquee 26s linear infinite; padding: 13px 0; }
.ticker span { font-family: "Archivo Black"; font-size: 14px; white-space: nowrap; }
.ticker span::after { content: "★"; color: var(--gold); margin: 0 40px; }
@keyframes marquee { to { transform: translateX(-50%); } }

.cabinet-section, .manifesto { padding: 90px clamp(20px, 6vw, 92px); }
.cabinet-section {
  min-height: calc(100vh - 88px);
  background:
    radial-gradient(circle at 15% 50%, rgba(57,197,107,.14), transparent 27%),
    linear-gradient(135deg, var(--paper) 0 70%, #dcebdd 70% 100%);
  border-bottom: var(--line);
  display: grid;
  grid-template-columns: minmax(280px, .62fr) minmax(620px, 1.38fr);
  align-items: center;
  gap: clamp(35px, 5vw, 80px);
}
.cabinet-section .section-heading { margin-bottom: 0; }
.cabinet-section .section-heading h2 { font-size: clamp(48px, 5.7vw, 82px); }
.token-identity { display: flex; align-items: center; gap: 16px; margin-bottom: 34px; }
.token-identity img { width: 74px; height: 74px; object-fit: cover; border: var(--line); box-shadow: 4px 4px 0 var(--green); background: var(--acid); }
.token-identity div { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 3px 10px; }
.token-identity .eyebrow { grid-column: 1 / -1; margin-bottom: 4px; }
.token-identity strong { font-family: "Archivo Black"; font-size: 20px; }
.token-identity > div > span:last-child { color: var(--green); font-weight: 900; }
.refresh-note {
  margin-top: 22px !important;
  font-size: 9px !important;
  letter-spacing: .08em;
  color: var(--muted);
}
.refresh-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  background: var(--green);
  border: 1px solid var(--green-dark);
  box-shadow: 0 0 10px rgba(57,197,107,.55);
  animation: refreshPulse 2s ease-in-out infinite;
}
@keyframes refreshPulse { 50% { transform: scale(1.45); background: var(--gold); } }
.section-heading { max-width: 930px; margin-bottom: 55px; }
.section-heading h2 { font-size: clamp(46px, 7vw, 98px); line-height: .88; letter-spacing: -.065em; }
.section-heading > p:last-child { max-width: 570px; line-height: 1.55; font-weight: 600; margin: 22px 0 0; }
.cabinet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: end; }
.official-card { border: 2px solid var(--ink); border-top: 7px solid var(--green); background: #fffdf5; box-shadow: var(--shadow); position: relative; padding: 16px; transition: transform .2s, box-shadow .2s; }
.official-card:hover { transform: translateY(-7px); box-shadow: 8px 10px 0 rgba(23,109,59,.22); }
.official-card::after { content: "OFFICIAL APPOINTMENT"; position: absolute; right: 14px; bottom: 13px; color: rgba(23,109,59,.38); font-size: 7px; font-weight: 900; transform: rotate(-5deg); }
.official-card.president { transform: translateY(-16px); border-top-color: var(--green-dark); }
.official-card.president:hover { transform: translateY(-22px); }
.official-card.vice, .official-card.secretary { transform: none; }
.rank { position: absolute; top: 24px; left: 24px; z-index: 2; background: var(--ink); color: var(--gold); padding: 8px 10px; font-weight: 900; border: 1px solid var(--gold); }
.portrait { aspect-ratio: 4/3; border: 2px solid var(--ink); display: grid; place-items: center; margin-bottom: 18px; overflow: hidden; }
.portrait-one { background: var(--green-soft); }
.portrait-two { background: var(--blue); }
.portrait-three { background: var(--green-soft); }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: none; filter: saturate(.85) contrast(1.12); }
.portrait.has-image img { display: block; }
.portrait.has-image span { display: none; }
.portrait span { font-family: "Archivo Black"; font-size: 100px; transform: rotate(7deg); }
.office {
  display: block;
  margin: -1px -1px 15px;
  padding: 11px 13px;
  background: var(--green-dark);
  color: white;
  border: 2px solid var(--ink);
  font-family: "Archivo Black", sans-serif;
  font-size: clamp(15px, 1.35vw, 22px);
  line-height: 1;
  letter-spacing: .025em;
  text-align: center;
  box-shadow: 4px 4px 0 var(--gold);
}
.president .office {
  background: var(--green);
  color: var(--ink);
  font-size: clamp(20px, 1.8vw, 28px);
  box-shadow: 5px 5px 0 var(--ink);
}
.official-card h3 { font-size: clamp(18px, 1.8vw, 29px); line-height: .95; word-break: break-word; }
.wallet { font-size: 11px; font-weight: 700; color: var(--muted); margin: 12px 0 20px; }
.holding { border-top: 2px solid var(--ink); padding-top: 14px; display: flex; justify-content: space-between; align-items: end; }
.holding span { font-size: 9px; font-weight: 900; max-width: 115px; }
.holding strong { font-size: 28px; font-family: "Archivo Black"; }

.scanner-section { display: grid; grid-template-columns: 1.15fr .85fr; border-top: 5px solid var(--green); border-bottom: var(--line); background: var(--green-soft); }
.scanner-main { padding: 84px clamp(20px, 6vw, 92px); }
.section-heading.compact { margin-bottom: 25px; }
.section-heading.compact h2 { font-size: clamp(53px, 7vw, 100px); }
.scanner-intro { max-width: 700px; font-weight: 600; line-height: 1.55; }
.scan-form { margin: 34px 0 22px; }
label { display: block; font-size: 10px; font-weight: 900; letter-spacing: .12em; margin-bottom: 9px; }
.input-row, .key-row { display: flex; gap: 12px; align-items: stretch; }
input {
  min-width: 0; width: 100%; border: var(--line); background: var(--paper);
  padding: 15px 16px; outline: none; border-radius: 0;
}
input:focus { box-shadow: 4px 4px 0 var(--green); }
.scan-form .button { min-width: 145px; background: var(--green-dark); color: white; box-shadow: 5px 5px 0 var(--ink); }
.scan-form > p, .settings-inner > p { font-size: 10px; font-weight: 600; line-height: 1.5; }
.api-settings { border: 2px solid var(--ink); background: rgba(242,238,223,.65); margin-top: 25px; }
.api-settings summary { padding: 15px; cursor: pointer; font-weight: 900; font-size: 11px; }
.settings-inner { padding: 0 15px 18px; }
.settings-inner label:not(:first-child) { margin-top: 20px; }
.settings-inner label span { color: var(--orange); }
.scan-status { display: flex; gap: 13px; align-items: center; border: 2px solid var(--ink); background: var(--paper); padding: 15px; margin-top: 22px; }
.scan-status .status-icon { width: 33px; height: 33px; flex: 0 0 auto; display: grid; place-items: center; background: var(--ink); color: var(--gold); font-weight: 900; border-radius: 50%; }
.scan-status strong { font-size: 12px; }
.scan-status p { margin: 3px 0 0; font-size: 10px; }
.scan-status.error { background: #9f2f2f; color: var(--paper); }
.activity-panel { background: var(--ink); color: var(--paper); padding: 55px clamp(20px, 4vw, 55px); min-width: 0; border-left: 5px solid var(--green); }
.activity-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 2px solid var(--paper); }
.activity-head h2 { font-size: clamp(26px, 3vw, 45px); }
.feed-badge { padding: 7px 9px; background: var(--acid); color: var(--ink); font-size: 9px; font-weight: 900; }
.feed-badge.live { background: var(--green); color: var(--ink); box-shadow: 0 0 15px rgba(57,197,107,.3); }
.activity-feed { height: 470px; overflow: hidden; }
.activity-item { display: grid; grid-template-columns: 39px 1fr auto; gap: 12px; align-items: center; padding: 17px 0; border-bottom: 1px solid #49505e; animation: enter .35s ease both; }
.activity-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--green); color: var(--green); font-weight: 900; }
.activity-item p { margin: 0; font-size: 11px; line-height: 1.4; }
.activity-item p strong { color: var(--green); }
.activity-item time { font-size: 9px; color: #9298a4; }
.feed-note { font-size: 9px; color: #9298a4; line-height: 1.5; border-top: 1px solid #49505e; padding-top: 14px; }
@keyframes enter { from { opacity: 0; transform: translateX(20px); } }
.loader { display: none; width: 17px; height: 17px; border: 3px solid rgba(16,21,34,.25); border-top-color: var(--ink); border-radius: 50%; animation: spin .7s linear infinite; }
.loading .button-label { display: none; }
.loading .loader { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.manifesto { background: var(--paper); }
.manifesto > h2 { font-size: clamp(48px, 7vw, 100px); line-height: .88; letter-spacing: -.065em; margin-bottom: 60px; }
.manifesto-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: var(--line); }
.manifesto-grid article { padding: 36px; min-height: 290px; }
.manifesto-grid article + article { border-left: var(--line); }
.manifesto-grid b { font-family: "Archivo Black"; font-size: 14px; color: var(--green-dark); }
.manifesto-grid h3 { font-size: clamp(22px, 2.5vw, 36px); line-height: 1; margin: 28px 0 18px; }
.manifesto-grid p { line-height: 1.6; font-size: 13px; }
.disclaimer { margin-top: 45px; border: 3px double var(--green); background: var(--ink); color: var(--paper); padding: 25px 30px; transform: none; box-shadow: 7px 7px 0 var(--green); }
.disclaimer strong { font-family: "Archivo Black"; font-size: 20px; }
.disclaimer p { margin: 8px 0 0; font-size: 11px; line-height: 1.5; max-width: 900px; }
footer { padding: 28px clamp(20px, 4vw, 64px); background: var(--ink); color: var(--paper); border-top: 4px solid var(--gold); display: flex; align-items: center; justify-content: space-between; gap: 30px; }
footer p { font-size: 10px; font-weight: 900; letter-spacing: .1em; }
footer > div { display: flex; gap: 22px; font-size: 11px; font-weight: 900; }
footer .brand-crest { border-color: var(--paper); }
.toast { position: fixed; right: 25px; bottom: 25px; z-index: 50; padding: 14px 18px; background: var(--ink); color: var(--gold); border: 2px solid var(--gold); font-weight: 900; font-size: 11px; transform: translateY(100px); opacity: 0; transition: .25s; }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 980px) {
  nav { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { border-left: 0; border-top: var(--line); min-height: 650px; }
  .stats-strip { margin-top: 50px; }
  .cabinet-section { display: block; min-height: 0; }
  .cabinet-section .section-heading { margin-bottom: 55px; }
  .cabinet-grid { grid-template-columns: 1fr 1fr; }
  .official-card.president { transform: none; grid-column: 1 / -1; max-width: 560px; justify-self: center; width: 100%; }
  .scanner-section { grid-template-columns: 1fr; }
  .manifesto-grid { grid-template-columns: 1fr; }
  .manifesto-grid article + article { border-left: 0; border-top: var(--line); }
}

@media (max-width: 640px) {
  .site-header { min-height: 72px; }
  .site-header .button { display: none; }
  .brand { font-size: 12px; }
  .brand-crest { width: 44px; height: 44px; }
  .brand-mark { width: 41px; height: 41px; }
  .hero-copy { min-height: 640px; padding-top: 70px; }
  h1 { font-size: clamp(49px, 16vw, 72px); }
  .hero-art { min-height: 520px; }
  .stats-strip { grid-template-columns: 1fr; }
  .stats-strip div { flex-direction: row; justify-content: space-between; border-bottom: 1px solid var(--ink); padding-bottom: 8px; }
  .cabinet-section, .manifesto { padding: 70px 18px; }
  .cabinet-grid { grid-template-columns: 1fr; }
  .official-card.president { grid-column: auto; }
  .official-card, .official-card.president, .official-card.vice, .official-card.secretary { transform: none; }
  .scanner-main { padding: 70px 18px; }
  .input-row, .key-row { flex-direction: column; }
  .scan-form .button { width: 100%; }
  .activity-panel { padding: 48px 18px; }
  .activity-feed { height: 420px; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
