/* ===========================================================================
   EFF KSD Campaign Platform — design system
   Economic Freedom Fighters house colours: red, black, green, gold.
   =========================================================================== */

:root {
  /* Brand */
  --eff-red:        #E30613;
  --eff-red-dark:   #A8040E;
  --eff-red-deep:   #7A0309;
  --eff-gold:       #FFD500;
  --eff-gold-dark:  #D9B400;
  --eff-green:      #046A38;
  --eff-green-dark: #024527;

  /* Neutrals */
  --ink:        #0C0C0D;
  --ink-2:      #1C1C1F;
  --ink-3:      #34343A;
  --slate:      #5B5B66;
  --slate-2:    #8A8A96;
  --line:       #E2E2E8;
  --line-2:     #EEEEF2;
  --paper:      #FFFFFF;
  --canvas:     #F6F6F9;
  --canvas-2:   #FAFAFC;

  /* Status */
  --ok:      #0F7B3F;
  --ok-bg:   #E6F5EC;
  --warn:    #B45309;
  --warn-bg: #FEF3C7;
  --bad:     #C0161F;
  --bad-bg:  #FDEAEB;
  --info:    #1D4ED8;
  --info-bg: #E7EDFD;

  --radius:    14px;
  --radius-sm: 9px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(12,12,13,.06), 0 1px 3px rgba(12,12,13,.04);
  --shadow:    0 2px 4px rgba(12,12,13,.05), 0 8px 24px rgba(12,12,13,.07);
  --shadow-lg: 0 12px 48px rgba(12,12,13,.16);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;

  --sidebar-w: 252px;
  --header-h:  62px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

body { min-height: 100vh; line-height: 1.5; }

h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -.021em; line-height: 1.18; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.06rem; }
h4 { font-size: .94rem; }
p  { margin: 0 0 .85rem; }
a  { color: var(--eff-red); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted     { color: var(--slate); }
.tiny      { font-size: .78rem; }
.small     { font-size: .86rem; }
.strong    { font-weight: 700; }
.mono      { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.nums      { font-variant-numeric: tabular-nums; }
.center    { text-align: center; }
.right     { text-align: right; }
.nowrap    { white-space: nowrap; }
.hide      { display: none !important; }
.spacer    { flex: 1 1 auto; }
.stack     { display: flex; flex-direction: column; gap: .55rem; }
.row       { display: flex; align-items: center; gap: .6rem; }
.row-wrap  { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.mt0{margin-top:0}.mt1{margin-top:.5rem}.mt2{margin-top:1rem}.mt3{margin-top:1.6rem}
.mb0{margin-bottom:0}.mb1{margin-bottom:.5rem}.mb2{margin-bottom:1rem}.mb3{margin-bottom:1.6rem}

/* ------------------------------------------------------------------ brand */
.brand-bar {
  height: 6px;
  background: linear-gradient(90deg,
    var(--eff-green) 0 33.3%, var(--eff-red) 33.3% 66.6%, var(--ink) 66.6% 100%);
}

.logo-lockup { display: flex; align-items: center; gap: .7rem; }
.logo-mark {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 10px;
  background: var(--eff-red);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 900; font-size: 1rem; letter-spacing: -.03em;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
}
.logo-text { line-height: 1.1; }
.logo-text b { display: block; font-size: .98rem; font-weight: 800; letter-spacing: -.02em; }
.logo-text span { display: block; font-size: .7rem; color: var(--slate); font-weight: 600; }

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 1.15rem 1.25rem; }
.card-head {
  display: flex; align-items: center; gap: .7rem;
  padding: .95rem 1.25rem;
  border-bottom: 1px solid var(--line-2);
}
.card-head h3 { flex: 1 1 auto; }
.card-body { padding: 1.15rem 1.25rem; }
.card-foot {
  padding: .8rem 1.25rem;
  border-top: 1px solid var(--line-2);
  background: var(--canvas-2);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ------------------------------------------------------------------ stats */
.stat-grid {
  display: grid; gap: .85rem;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .95rem 1.05rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--eff-red);
}
.stat.g::before { background: var(--eff-green); }
.stat.y::before { background: var(--eff-gold); }
.stat.k::before { background: var(--ink); }
.stat-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--slate);
}
.stat-value {
  font-size: 1.85rem; font-weight: 800; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; line-height: 1.15; margin-top: .12rem;
}
.stat-sub { font-size: .78rem; color: var(--slate); margin-top: .1rem; }

/* ----------------------------------------------------------------- badges */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .17rem .5rem;
  border-radius: 999px;
  font-size: .73rem; font-weight: 700;
  background: var(--line-2); color: var(--ink-3);
  white-space: nowrap;
}
.badge.ok   { background: var(--ok-bg);   color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad  { background: var(--bad-bg);  color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.red  { background: var(--eff-red); color: #fff; }
.badge.gold { background: var(--eff-gold); color: var(--ink); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--slate-2); flex: 0 0 8px; }
.dot.live { background: var(--ok); box-shadow: 0 0 0 0 rgba(15,123,63,.5); animation: pulse 2s infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(15,123,63,.5); }
  70%  { box-shadow: 0 0 0 7px rgba(15,123,63,0); }
  100% { box-shadow: 0 0 0 0 rgba(15,123,63,0); }
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .62rem 1.05rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: .9rem; font-weight: 700;
  cursor: pointer;
  background: var(--paper); color: var(--ink);
  border-color: var(--line);
  transition: background .13s ease, border-color .13s ease, transform .06s ease;
  text-decoration: none;
  line-height: 1.25;
}
.btn:hover  { background: var(--canvas); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-busy="true"] { opacity: .55; cursor: not-allowed; }

.btn-primary { background: var(--eff-red); color: #fff; border-color: var(--eff-red); }
.btn-primary:hover { background: var(--eff-red-dark); border-color: var(--eff-red-dark); }
.btn-dark    { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: var(--ink-2); }
.btn-green   { background: var(--eff-green); color: #fff; border-color: var(--eff-green); }
.btn-green:hover { background: var(--eff-green-dark); }
.btn-gold    { background: var(--eff-gold); color: var(--ink); border-color: var(--eff-gold); }
.btn-gold:hover { background: var(--eff-gold-dark); }
.btn-ghost   { background: transparent; border-color: transparent; color: var(--slate); }
.btn-ghost:hover { background: var(--line-2); color: var(--ink); }
.btn-lg  { padding: .82rem 1.4rem; font-size: 1rem; border-radius: var(--radius); }
.btn-sm  { padding: .38rem .7rem;  font-size: .8rem; }
.btn-block { width: 100%; }

/* ----------------------------------------------------------------- forms */
.field { margin-bottom: 1rem; }
.field > label {
  display: block;
  font-size: .8rem; font-weight: 700;
  color: var(--ink-3);
  margin-bottom: .32rem;
}
.field .hint { font-size: .76rem; color: var(--slate); margin-top: .28rem; }

.input, .select, .textarea {
  width: 100%;
  padding: .68rem .8rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem;
  background: var(--paper); color: var(--ink);
  transition: border-color .13s ease, box-shadow .13s ease;
  -webkit-appearance: none; appearance: none;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--eff-red);
  box-shadow: 0 0 0 3.5px rgba(227,6,19,.13);
}
.textarea { min-height: 108px; resize: vertical; line-height: 1.5; }
.select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%235B5B66' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  padding-right: 2.1rem;
}
.input.big {
  font-size: 1.28rem; font-weight: 700; letter-spacing: .06em;
  font-family: var(--mono);
  padding: .78rem .8rem;
}
.input.ok   { border-color: var(--ok); }
.input.bad  { border-color: var(--bad); }

.field-msg { font-size: .8rem; margin-top: .32rem; font-weight: 600; display: none; }
.field-msg.show { display: block; }
.field-msg.ok  { color: var(--ok); }
.field-msg.bad { color: var(--bad); }
.field-msg.warn{ color: var(--warn); }

.check {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .7rem .8rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--paper);
}
.check:hover { border-color: var(--slate-2); }
.check input { width: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--eff-red); flex: 0 0 19px; }
.check-text b { display: block; font-size: .9rem; }
.check-text span { display: block; font-size: .78rem; color: var(--slate); }

.seg {
  display: inline-flex; padding: 3px; gap: 3px;
  background: var(--line-2); border-radius: 999px;
}
.seg button {
  border: 0; background: transparent; cursor: pointer;
  padding: .4rem .85rem; border-radius: 999px;
  font-family: inherit; font-size: .84rem; font-weight: 700; color: var(--slate);
}
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th {
  text-align: left; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--slate);
  padding: .6rem .7rem; border-bottom: 1.5px solid var(--line);
  white-space: nowrap; background: var(--canvas-2);
  position: sticky; top: 0; z-index: 1;
}
table.data td {
  padding: .62rem .7rem; border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
table.data tbody tr:hover { background: var(--canvas-2); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

.rank {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--line-2); color: var(--ink-3);
  font-size: .78rem; font-weight: 800;
}
.rank.r1 { background: var(--eff-gold); color: var(--ink); }
.rank.r2 { background: #D8D8E0; }
.rank.r3 { background: #E8C9A8; }

.bar-track { height: 7px; background: var(--line-2); border-radius: 999px; overflow: hidden; min-width: 74px; }
.bar-fill  { height: 100%; background: var(--eff-red); border-radius: 999px; transition: width .4s ease; }
.bar-fill.g { background: var(--eff-green); }
.bar-fill.y { background: var(--eff-gold); }

/* --------------------------------------------------------------- notices */
.notice {
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid;
  font-size: .88rem;
  display: flex; gap: .6rem; align-items: flex-start;
}
.notice b { display: block; margin-bottom: .1rem; }
.notice.ok   { background: var(--ok-bg);   border-color: #B8E0C8; color: #0A5A2E; }
.notice.warn { background: var(--warn-bg); border-color: #F5D68A; color: #7A3E06; }
.notice.bad  { background: var(--bad-bg);  border-color: #F2B8BC; color: #8E1017; }
.notice.info { background: var(--info-bg); border-color: #BCCDF7; color: #16389E; }

.empty { text-align: center; padding: 2.4rem 1.2rem; color: var(--slate); }
.empty-icon { font-size: 2rem; opacity: .4; margin-bottom: .5rem; }

.skel {
  background: linear-gradient(90deg, var(--line-2) 25%, #F4F4F8 50%, var(--line-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* -------------------------------------------------------------- app shell */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--ink);
  color: #fff;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-head { padding: 1.1rem 1.1rem .9rem; border-bottom: 1px solid rgba(255,255,255,.09); }
.sidebar-head .logo-text b { color: #fff; }
.sidebar-head .logo-text span { color: rgba(255,255,255,.5); }
.nav { padding: .7rem .6rem; flex: 1 1 auto; overflow-y: auto; }
.nav-label {
  font-size: .67rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  color: rgba(255,255,255,.35); padding: .8rem .6rem .3rem;
}
.nav a {
  display: flex; align-items: center; gap: .65rem;
  padding: .58rem .65rem; border-radius: 9px;
  color: rgba(255,255,255,.74); font-size: .88rem; font-weight: 600;
  text-decoration: none; margin-bottom: 1px;
}
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav a.on { background: var(--eff-red); color: #fff; }
.nav a .ico { width: 17px; text-align: center; flex: 0 0 17px; opacity: .95; }
.sidebar-foot { padding: .8rem 1rem; border-top: 1px solid rgba(255,255,255,.09); font-size: .8rem; }
.sidebar-foot .who { color: #fff; font-weight: 700; }
.sidebar-foot .role { color: rgba(255,255,255,.5); font-size: .74rem; }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--header-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: .8rem;
  padding: 0 1.3rem;
  position: sticky; top: 0; z-index: 40;
}
.topbar h1 { font-size: 1.12rem; }
.content { padding: 1.4rem; flex: 1 1 auto; }
.content-wide { padding: 1.4rem; }

.page-head { margin-bottom: 1.25rem; }
.page-head h2 { margin-bottom: .18rem; }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }

/* Opacity only — never a transform here, or fixed children get trapped. */
.fade-in { animation: fadeIn .22s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --------------------------------------------------------------- modals */
.modal-back {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(12,12,13,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--paper); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
}
.modal-head {
  padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: center; gap: .7rem;
}
.modal-head h3 { flex: 1 1 auto; }
.modal-body { padding: 1.3rem; }
.modal-foot {
  padding: .95rem 1.3rem; border-top: 1px solid var(--line-2);
  display: flex; gap: .6rem; justify-content: flex-end;
  background: var(--canvas-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* --------------------------------------------------------------- toasts */
.toast-wrap {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 400; display: flex; flex-direction: column; gap: .5rem;
  width: min(430px, calc(100vw - 24px));
}
.toast {
  padding: .8rem 1rem; border-radius: var(--radius-sm);
  background: var(--ink); color: #fff;
  font-size: .89rem; font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: toastIn .2s ease;
}
.toast.ok  { background: var(--ok); }
.toast.bad { background: var(--bad); }
.toast.warn{ background: var(--warn); }
@keyframes toastIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------------------------------------------------------- offline chip */
.net-chip {
  position: fixed; right: 14px; bottom: 14px; z-index: 300;
  display: flex; align-items: center; gap: .45rem;
  padding: .45rem .8rem; border-radius: 999px;
  font-size: .8rem; font-weight: 700;
  background: var(--ink); color: #fff;
  box-shadow: var(--shadow);
}
.net-chip.off { background: var(--warn); }
.net-chip.sync { background: var(--info); }

/* =========================================================== PUBLIC SITE */
.pub-nav {
  background: var(--ink); color: #fff;
  position: sticky; top: 0; z-index: 50;
}
.pub-nav-in {
  max-width: 1220px; margin: 0 auto; padding: .8rem 1.3rem;
  display: flex; align-items: center; gap: 1.2rem;
}
.pub-nav a { color: rgba(255,255,255,.78); font-weight: 600; font-size: .9rem; }
.pub-nav a:hover, .pub-nav a.on { color: #fff; text-decoration: none; }
.pub-nav .logo-text b { color: #fff; }
.pub-nav .logo-text span { color: rgba(255,255,255,.5); }

.hero {
  background:
    radial-gradient(1100px 460px at 78% -8%, rgba(255,213,0,.20), transparent 62%),
    linear-gradient(150deg, var(--eff-red) 0%, var(--eff-red-dark) 58%, var(--eff-red-deep) 100%);
  color: #fff;
  padding: 3.4rem 1.3rem 3.6rem;
}
.hero-in {
  max-width: 1220px; margin: 0 auto;
  display: grid; gap: 2.4rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.5rem);
  line-height: 1.04; letter-spacing: -.035em;
  margin-bottom: .9rem;
}
.hero h1 .gold { color: var(--eff-gold); display: block; }
.hero p.lede { font-size: 1.08rem; opacity: .93; max-width: 54ch; margin-bottom: 1.5rem; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .45rem;
  background: rgba(0,0,0,.26);
  border: 1px solid rgba(255,255,255,.2);
  padding: .35rem .8rem; border-radius: 999px;
  font-size: .78rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: 1.1rem;
}

.poster-frame {
  background: var(--eff-red);
  border: 5px solid var(--eff-gold);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3 / 4;
  display: grid; place-items: center;
  position: relative;
}
.poster-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-fallback { padding: 1.6rem; text-align: center; color: #fff; }
.poster-fallback .name {
  font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 900;
  color: var(--eff-gold); letter-spacing: -.02em; line-height: 1.05;
}
.poster-fallback .role {
  font-size: .82rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; margin-top: .5rem; opacity: .92;
}

.section { padding: 3rem 1.3rem; }
.section-in { max-width: 1220px; margin: 0 auto; }
.section.alt { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 1.8rem; }
.section-head .kicker {
  color: var(--eff-red); font-size: .78rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .09em; margin-bottom: .35rem;
}
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.15rem); margin-bottom: .5rem; }

.pillar {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.3rem;
  border-top: 4px solid var(--eff-red);
  box-shadow: var(--shadow-sm);
}
.pillar .n {
  font-size: .72rem; font-weight: 800; color: var(--eff-red);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: .4rem;
}
.pillar h3 { margin-bottom: .45rem; }
.pillar p { font-size: .92rem; color: var(--slate); margin: 0; }

.cta-band {
  background: var(--ink); color: #fff;
  padding: 2.6rem 1.3rem;
}
.cta-band-in {
  max-width: 1220px; margin: 0 auto;
  display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: .35rem; }
.cta-band p { color: rgba(255,255,255,.72); margin: 0; }

.pub-foot {
  background: var(--ink-2); color: rgba(255,255,255,.6);
  padding: 2.2rem 1.3rem 2.6rem; font-size: .85rem;
}
.pub-foot-in { max-width: 1220px; margin: 0 auto; }
.pub-foot a { color: rgba(255,255,255,.85); }

/* ------------------------------------------------------------ issue cards */
.issue-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.issue-photo { aspect-ratio: 16/10; background: var(--line-2); overflow: hidden; }
.issue-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.issue-body { padding: 1rem 1.1rem; flex: 1 1 auto; }
.issue-meta { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-bottom: .55rem; }
.issue-body h3 { font-size: 1rem; margin-bottom: .35rem; }
.issue-body p { font-size: .88rem; color: var(--slate); margin: 0; }
.issue-update {
  border-top: 1px solid var(--line-2);
  background: var(--ok-bg);
  padding: .8rem 1.1rem; font-size: .85rem;
}
.issue-update b { color: var(--ok); display: block; font-size: .74rem;
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: .2rem; }

.timeline { position: relative; padding-left: 1.4rem; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: var(--line);
}
.tl-item { position: relative; padding-bottom: 1.1rem; }
.tl-item::before {
  content: ''; position: absolute; left: -1.4rem; top: 5px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--eff-red); border: 2.5px solid var(--paper);
  box-shadow: 0 0 0 1.5px var(--eff-red);
}
.tl-item.done::before { background: var(--ok); box-shadow: 0 0 0 1.5px var(--ok); }
.tl-when { font-size: .74rem; color: var(--slate-2); font-weight: 700; }
.tl-body { font-size: .89rem; margin-top: .15rem; }
.tl-who  { font-size: .76rem; color: var(--slate); font-weight: 600; margin-top: .2rem; }

/* ---------------------------------------------------------------- charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-legend { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .8rem; margin-top: .6rem; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: .3rem; }

#map { height: 460px; border-radius: var(--radius); overflow: hidden; z-index: 1; }

/* -------------------------------------------------------------- printing */
@media print {
  .sidebar, .topbar, .btn, .net-chip, .toast-wrap, .no-print { display: none !important; }
  body, .content { background: #fff; padding: 0; }
  .card { box-shadow: none; border-color: #999; break-inside: avoid; }
  table.data th { background: #eee !important; -webkit-print-color-adjust: exact; }
}

/* ================================================== RESPONSIVE (last) === */
@media (max-width: 1080px) {
  .grid-side { grid-template-columns: 1fr; }
  .hero-in   { grid-template-columns: 1fr; gap: 1.8rem; }
  .poster-frame { max-width: 380px; }
}

@media (max-width: 820px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%; flex: none; height: auto; position: static;
    flex-direction: row; align-items: center; overflow-x: auto;
    padding: .4rem .6rem;
  }
  .sidebar-head, .sidebar-foot { display: none; }
  .nav { display: flex; gap: .3rem; padding: .2rem; flex: 1 1 auto; }
  .nav-label { display: none; }
  .nav a { white-space: nowrap; padding: .5rem .8rem; font-size: .82rem; }
  .content, .content-wide { padding: 1rem .85rem; }
  .topbar { padding: 0 .85rem; }
  .topbar h1 { font-size: 1rem; }
  h1 { font-size: 1.5rem; }
  .stat-value { font-size: 1.55rem; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
  #map { height: 340px; }
}

@media (max-width: 560px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: .8rem .85rem; }
  .stat-value { font-size: 1.4rem; }
  .section { padding: 2.2rem 1rem; }
  .hero { padding: 2.4rem 1rem 2.6rem; }
  .card-pad, .card-body, .card-head { padding-inline: .95rem; }
  .pub-nav-in { gap: .8rem; padding: .7rem 1rem; }
  .pub-nav .hide-sm { display: none; }
}
