/* =====================================================================
   Young Engineers Connect — election panel website
   Layout: ballot-tier panel — blueprint-gridded gradient masthead, then
   candidates in election tiers (desktop 1 / 2 / 3 / 3, phone 1 / 1 / 1 / 2 / 2 / 2);
   candidate pages are portfolio sheets with a drafting-frame portrait and a gold ballot stamp.
   ===================================================================== */
:root {
  /* colour */
  --bg: #F1F4FA;
  --surface: #FFFFFF;
  --surface-2: #F5F8FD;
  --ink: #0C1A35;
  --muted: #55657F;
  --line: #DCE3EE;
  --line-strong: #C3CFE2;
  --brand-1: #172C6B;
  --brand-2: #1F4FD1;
  --brand-3: #0AA5C7;
  --tint: #E8EFFD;
  --tint-ink: #1D47BE;
  --gold-soft: #FFF3D6;
  --gold-ink: #865705;
  --gold-line: #EFD39A;
  --gold-bright: #FFD21F; /* YEC logo yellow */
  --on-brand: #FFFFFF;
  --on-brand-soft: rgba(255, 255, 255, .78);
  --glass: rgba(255, 255, 255, .10);
  --glass-line: rgba(255, 255, 255, .22);
  --footer-bg: #0A1631;
  --chip-bg: #15265A;
  --chip-line: rgba(255, 255, 255, .16);
  --ph-a: #2A4A9E;
  --ph-b: #178FB5;
  --grad: linear-gradient(120deg, var(--brand-1) 0%, var(--brand-2) 52%, var(--brand-3) 100%);
  --shadow-sm: 0 1px 2px rgba(15, 30, 70, .06), 0 8px 22px -12px rgba(15, 30, 70, .22);
  --shadow-lg: 0 2px 6px rgba(15, 30, 70, .06), 0 26px 48px -22px rgba(15, 30, 70, .42);

  /* type */
  --f-display: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --f-body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius: 22px;
  --wrap: 1140px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060C1B;
    --surface: #0C162E;
    --surface-2: #111E3B;
    --ink: #E6ECF7;
    --muted: #98A8C4;
    --line: #1C2A49;
    --line-strong: #2C3E66;
    --tint: #14244A;
    --tint-ink: #8FB2FF;
    --gold-soft: rgba(240, 190, 90, .12);
    --gold-ink: #FFD54F;
    --gold-line: rgba(240, 190, 90, .32);
    --footer-bg: #040917;
    --chip-bg: #1C2F62;
    --chip-line: rgba(255, 255, 255, .2);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 26px -14px rgba(0, 0, 0, .7);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 28px 50px -22px rgba(0, 0, 0, .85);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #060C1B;
  --surface: #0C162E;
  --surface-2: #111E3B;
  --ink: #E6ECF7;
  --muted: #98A8C4;
  --line: #1C2A49;
  --line-strong: #2C3E66;
  --tint: #14244A;
  --tint-ink: #8FB2FF;
  --gold-soft: rgba(240, 190, 90, .12);
  --gold-ink: #FFD54F;
  --gold-line: rgba(240, 190, 90, .32);
  --footer-bg: #040917;
  --chip-bg: #1C2F62;
  --chip-line: rgba(255, 255, 255, .2);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 26px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 28px 50px -22px rgba(0, 0, 0, .85);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-stretch: 94%; line-height: 1.2; margin: 0; text-wrap: balance; letter-spacing: -.005em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--brand-3); outline-offset: 3px; border-radius: 8px; }
.i { width: 1em; height: 1em; flex: none; display: inline-block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
@media (max-width: 480px) { .wrap { padding-inline: 16px; } }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: .01em; }

/* blueprint grid used on every gradient band */
.blueprint { position: relative; isolation: isolate; background: var(--grad); color: var(--on-brand); overflow: hidden; }
.blueprint::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}
.blueprint::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 70% at 88% 8%, rgba(10,165,199,.45), transparent 70%),
    radial-gradient(50% 60% at 6% 100%, rgba(23,44,107,.65), transparent 70%);
}

/* ---------- brand mark ---------- */
.brand { display: inline-flex; align-items: center; text-decoration: none; border-radius: 8px; }
.yec-logo { display: block; width: auto; height: 44px; max-width: none; }
.brand--footer .yec-logo { height: 64px; }

/* ---------- masthead (home): centred, title + election + facts only ---------- */
.mast {
  padding-block: 56px 60px; text-align: center;
  --gold-grad: linear-gradient(90deg, rgba(247,201,92,0), #F7C95C 25%, #FFE7A6 50%, #F7C95C 75%, rgba(247,201,92,0));
}
.mast::after {
  background:
    radial-gradient(46% 62% at 50% 34%, rgba(255,255,255,.16), transparent 70%),
    radial-gradient(60% 70% at 92% 0%, rgba(10,165,199,.45), transparent 70%),
    radial-gradient(50% 60% at 4% 100%, rgba(23,44,107,.7), transparent 70%);
}
.mast__line { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--gold-grad); opacity: .85; }
.mast__art {
  position: absolute; z-index: -1; left: 50%; top: 50%; width: 620px; height: 620px; transform: translate(-50%, -50%);
  color: rgba(255,255,255,.08); pointer-events: none;
}
.mast__in { display: flex; flex-direction: column; align-items: center; }
.mast__logo { margin: 0; line-height: 0; }
.mast__logo .yec-logo { height: auto; width: clamp(250px, 40vw, 430px); max-width: 100%; filter: drop-shadow(0 10px 28px rgba(2,8,30,.45)); }

/* IEB ELECTION 2027-28 badge: navy bar with gold border, IEB seal overlapping the left edge */
.ieb {
  --seal: 92px;
  position: relative; display: inline-flex; align-items: center;
  margin: 38px 0 0 calc(var(--seal) * .42);
  min-height: calc(var(--seal) * .68); padding: 8px 30px 8px calc(var(--seal) * .66);
  background: #0B1A31; border: 2px solid #E2B64B; border-radius: 20px;
  box-shadow: 0 18px 40px -20px rgba(2,8,30,.9);
}
.ieb__seal {
  position: absolute; left: calc(var(--seal) * -.42); top: 50%; transform: translateY(-50%);
  width: var(--seal); height: var(--seal); border-radius: 50%; background: #FFFFFF;
  border: 3px solid #E2B64B; display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 8px 22px -8px rgba(2,8,30,.8);
}
.ieb__seal img { width: 88%; height: 88%; object-fit: contain; }
.ieb__text {
  color: #FFFFFF; font-family: var(--f-body); font-weight: 500; text-transform: uppercase;
  font-size: clamp(1.2rem, 2.6vw, 1.75rem); line-height: 1.15; letter-spacing: .01em; white-space: nowrap;
}
.mast__facts {
  margin: 32px 0 0; padding: 8px; list-style: none;
  display: grid; grid-template-columns: repeat(3, auto); align-items: stretch;
  border-radius: 22px; background: rgba(6, 14, 38, .30); border: 1px solid rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 24px 50px -24px rgba(2,8,30,.8);
}
.mast__facts li { display: flex; align-items: center; gap: 12px; padding: 10px 22px 10px 12px; text-align: left; }
.mast__facts li + li { border-left: 1px solid rgba(255,255,255,.14); }
.mast__ic {
  width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 14px;
  background: linear-gradient(145deg, #FFE87A, #FFD21F 55%, #E3B400);
  color: #13235A; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 8px 18px -8px rgba(247,201,92,.7);
}
.mast__ic .i { width: 24px; height: 24px; }
.mast__fv { display: grid; line-height: 1.25; }
.mast__fv small { font-size: .68rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.mast__fv b { font-size: 1.02rem; font-weight: 600; color: #FFFFFF; white-space: nowrap; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 10px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-line);
  font-size: .88rem; font-weight: 600; letter-spacing: .01em;
}
.eyebrow .i { color: var(--gold-bright); width: 1.15em; height: 1.15em; }
.toplink {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  padding: 8px 14px; border-radius: 999px; font-size: .88rem; font-weight: 600;
  background: var(--glass); border: 1px solid var(--glass-line); color: var(--on-brand);
  transition: background .2s;
}
.toplink:hover { background: rgba(255,255,255,.18); }
.toplink .i { width: 1.15em; height: 1.15em; }

/* ---------- panel tiers ---------- */
.panel { position: relative; z-index: 1; padding-block: 8px 24px; }
.tier-label {
  display: flex; align-items: center; gap: 14px; justify-content: center;
  margin: 44px auto 22px; max-width: 720px;
  font-size: .76rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.tier-label::before, .tier-label::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.tier { display: grid; gap: 22px; justify-content: center; }
/* one card width for all 9 cards: wide enough for the longest name on one line */
.panel { --card-w: 330px; --photo-h: 229px; }
.tier--top { --raise: 64px; grid-template-columns: repeat(3, minmax(0, var(--card-w))); align-items: start; }
.tier--top .card--role-vice-president { grid-column: 1; grid-row: 1; margin-top: var(--raise); }
.tier--top .card--role-president { grid-column: 2; grid-row: 1; }
.tier--top .card--role-secretary { grid-column: 3; grid-row: 1; margin-top: var(--raise); }
.tier--members { grid-template-columns: repeat(3, minmax(0, var(--card-w))); }

/* ---------- candidate card ---------- */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; box-shadow: var(--shadow-sm);
  transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s, border-color .28s;
  animation: rise .6s cubic-bezier(.2,.7,.2,1) both;
  animation-delay: calc(var(--n, 0) * 60ms);
}
@keyframes rise { from { transform: translateY(14px); } to { transform: none; } }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.card--lead {
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box;
  box-shadow: var(--shadow-lg);
}
.photo { position: relative; overflow: hidden; background: linear-gradient(165deg, var(--ph-a), var(--ph-b)); }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.ph {
  position: absolute; inset: 0; display: grid; place-items: end center; color: rgba(255,255,255,.9);
  background-image:
    linear-gradient(rgba(255,255,255,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.10) 1px, transparent 1px);
  background-size: 22px 22px;
}
.ph .i { width: 74%; height: auto; aspect-ratio: 1; margin-bottom: -9%; filter: drop-shadow(0 10px 18px rgba(4,12,40,.35)); }
/* card photo: height = 0.9 × width (60% of the earlier 1.5 : 1) */
.card__media { position: relative; height: var(--photo-h); max-width: 100%; } /* same photo height on every card */
.card__photo { position: absolute; inset: 0 10px; border-radius: 15px; } /* 10px narrower on each side */
.card__photo img { object-position: center 22%; }
.card__head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.role-chip {
  justify-self: center;
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  padding: 6px 13px 6px 9px; border-radius: 999px;
  background: var(--chip-bg); border: 1px solid var(--chip-line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #FFFFFF; font-size: .86rem; font-weight: 600; line-height: 1.35; white-space: nowrap;
  box-shadow: 0 6px 14px -8px rgba(6,14,38,.55);
}
.role-chip .i { color: var(--gold-bright); width: 1.2em; height: 1.2em; }
.role-chip em { font-style: normal; }
.role-chip.is-short em { display: none; }
.card__body { display: flex; flex-direction: column; gap: 14px; flex: 1; padding: 16px 6px 4px; }
.card__name { --name-min: 17px; font-size: 1.25rem; font-stretch: 88%; font-weight: 700; line-height: 1.22; text-align: center; text-wrap: wrap; hyphens: manual; } /* centred; fill line 1, then wrap */
.card__name.is-measure { white-space: nowrap; text-align: left; }
.meta { display: grid; gap: 8px; margin: 0; }
.meta > div {
  display: flex; align-items: center; justify-content: space-between; gap: 6px 10px; flex-wrap: wrap;
  padding: 8px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line);
}
.meta dt { display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; color: var(--muted); }
.meta dt .i { width: 1.25em; height: 1.25em; color: var(--tint-ink); }
.meta dd { margin: 0; font-family: var(--f-mono); font-weight: 600; font-size: .95rem; font-variant-numeric: tabular-nums; }
.meta .meta__ballot { background: var(--gold-soft); border-color: var(--gold-line); }
.meta__ballot dt .i { color: var(--gold-ink); }
.meta__ballot dd { font-family: var(--f-display); font-size: 1.4rem; line-height: 1; font-weight: 800; color: var(--gold-ink); }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px; border-radius: 13px; border: 0; cursor: pointer;
  background: var(--grad); background-size: 140% 100%; background-position: 0 0;
  color: var(--on-brand); font: 600 .98rem/1.2 var(--f-body); text-decoration: none;
  box-shadow: 0 8px 18px -10px rgba(31, 79, 209, .8);
  transition: background-position .35s, box-shadow .25s, transform .2s;
}
.btn .i { width: 1.15em; height: 1.15em; transition: transform .25s; }
.btn:hover { background-position: 100% 0; box-shadow: 0 12px 24px -10px rgba(31, 79, 209, .9); }
.btn:hover .i { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn--ghost {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: none;
}
.btn--ghost:hover { background: var(--surface-2); box-shadow: none; }
.card .meta { margin-top: auto; } /* keeps numbers and button on the same line across a row, even when a name wraps */
.card .btn { width: 100%; }
.card .btn::after { content: ""; position: absolute; inset: -9999px; } /* whole card is clickable */
.card { overflow: hidden; }

/* ---------- ballot quick reference ---------- */

/* ---------- footer ---------- */
.footer { margin-top: 64px; background: var(--footer-bg); color: var(--on-brand); padding-block: 44px 32px; }
.footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 28px; }
.footer__about { max-width: 420px; display: grid; gap: 14px; }
.footer__about p { color: var(--on-brand-soft); font-size: .95rem; }
.footer__links { display: grid; gap: 10px; font-size: .95rem; }
.footer__links a, .footer__links span { display: inline-flex; align-items: center; gap: 10px; color: var(--on-brand-soft); text-decoration: none; }
.footer__links a:hover { color: var(--on-brand); }
.footer__links .i { width: 1.25em; height: 1.25em; color: var(--gold-bright); }
.footer__base {
  margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .84rem; color: rgba(255,255,255,.55);
}

.footer__credit { margin-top: 10px; font-size: .78rem; color: rgba(255,255,255,.45); }

/* =====================================================================
   Candidate page
   ===================================================================== */
.sample-note { background: var(--gold-soft); color: var(--gold-ink); border-bottom: 1px solid var(--gold-line); font-size: .86rem; line-height: 1.5; padding-block: 9px; }
.sample-note .wrap { display: flex; align-items: flex-start; gap: 10px; }
.sample-note .i { width: 1.25em; height: 1.25em; margin-top: 1px; }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--brand-1) 92%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: var(--on-brand); border-bottom: 1px solid rgba(255,255,255,.1);
}
.topbar__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }

.phero { padding-block: 48px 40px; }
.phero__grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 48px; align-items: center; }
.frame {
  position: relative; padding: 10px; border-radius: 30px;
  background: rgba(255,255,255,.10); border: 1px solid var(--glass-line);
  box-shadow: 0 30px 60px -30px rgba(2, 8, 30, .7);
}
.frame .photo { aspect-ratio: 4 / 5; border-radius: 22px; }
/* drafting crop marks */
.frame__mark { position: absolute; width: 22px; height: 22px; border: 0 solid var(--gold-bright); }
.frame__mark--tl { top: -8px; left: -8px; border-top-width: 2px; border-left-width: 2px; }
.frame__mark--tr { top: -8px; right: -8px; border-top-width: 2px; border-right-width: 2px; }
.frame__mark--bl { bottom: -8px; left: -8px; border-bottom-width: 2px; border-left-width: 2px; }
.frame__mark--br { bottom: -8px; right: -8px; border-bottom-width: 2px; border-right-width: 2px; }
.phero__info { min-width: 0; }
.phero h1 { margin-top: 18px; font-size: clamp(2.1rem, 5.2vw, 3.7rem); font-weight: 800; font-stretch: 84%; letter-spacing: -.01em; line-height: 1.04; }
.phero__en { margin-top: 8px; color: var(--on-brand-soft); font-size: 1.05rem; letter-spacing: .02em; }
.quote { position: relative; margin-top: 22px; padding-left: 46px; max-width: 56ch; font-size: 1.12rem; font-weight: 500; line-height: 1.65; }
.quote .i { position: absolute; left: 0; top: 0; width: 34px; height: 34px; color: var(--gold-bright); opacity: .9; }
.ids { display: flex; flex-wrap: wrap; align-items: stretch; gap: 14px; margin-top: 28px; }
.stamp {
  display: grid; justify-items: center; align-content: center; gap: 2px;
  min-width: 132px; padding: 12px 20px; border-radius: 16px;
  border: 2px solid var(--gold-bright); outline: 1px dashed rgba(247, 201, 92, .6); outline-offset: 4px;
  background: rgba(247, 201, 92, .10); color: var(--gold-bright);
  transform: rotate(-3deg);
}
.stamp small { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.stamp b { font: 800 2.7rem/1 var(--f-display); }
.idcard {
  display: grid; align-content: center; gap: 4px; padding: 12px 18px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--glass-line);
}
.idcard small { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--on-brand-soft); }
.idcard small .i { width: 1.2em; height: 1.2em; color: var(--gold-bright); }
.idcard b { font-family: var(--f-mono); font-size: 1.25rem; font-weight: 600; }
.facts { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.facts li {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; align-items: center;
  padding: 14px 16px; border-radius: 16px; background: rgba(6, 14, 38, .26); border: 1px solid var(--glass-line);
}
.facts .i { grid-row: span 2; width: 34px; height: 34px; padding: 7px; border-radius: 10px; background: var(--glass); color: var(--gold-bright); }
.facts small { font-size: .7rem; color: var(--on-brand-soft); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.facts b { font-weight: 600; font-size: .96rem; line-height: 1.4; }

.profile { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; padding-block: 40px 8px; align-items: start; }
.profile__main, .profile__aside { display: grid; gap: 22px; min-width: 0; }
.profile__aside { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.block__title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: 1.28rem; font-weight: 700; }
.block__title .i { width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: var(--tint); color: var(--tint-ink); }
.block p { color: var(--ink); }
.about { font-size: 1.04rem; line-height: 1.85; max-width: 68ch; }

.pledges { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.pledge { display: grid; gap: 10px; align-content: start; padding: 18px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.pledge .i { width: 46px; height: 46px; padding: 10px; border-radius: 13px; background: var(--grad); color: var(--on-brand); }
.pledge h3 { font-size: 1.08rem; font-weight: 700; }
.pledge p { color: var(--muted); font-size: .95rem; line-height: 1.65; }

.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; position: relative; }
.tl::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--brand-2), var(--brand-3)); border-radius: 2px; opacity: .45; }
.tl li { position: relative; padding-left: 34px; display: grid; gap: 3px; }
.tl li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--brand-2); box-shadow: 0 0 0 4px var(--tint);
}
.tl__period { font-family: var(--f-mono); font-size: .78rem; font-weight: 600; color: var(--tint-ink); letter-spacing: .02em; }
.tl h3 { font-size: 1.08rem; font-weight: 700; }
.tl__org { font-size: .95rem; color: var(--muted); font-weight: 500; }
.tl p { margin-top: 4px; font-size: .96rem; }

.wins { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.wins li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px 14px; border-radius: 14px; background: var(--gold-soft); border: 1px solid var(--gold-line); }
.wins .i { width: 26px; height: 26px; color: var(--gold-ink); margin-top: 1px; }

.vote {
  border-radius: var(--radius); padding: 26px; text-align: center; box-shadow: var(--shadow-lg);
  display: grid; gap: 6px; justify-items: center;
}
.vote small { font-size: .74rem; color: var(--on-brand-soft); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.vote__no {
  margin: 8px 0; width: 112px; height: 112px; display: grid; place-items: center; border-radius: 50%;
  border: 2px solid var(--gold-bright); outline: 1px dashed rgba(247,201,92,.6); outline-offset: 5px;
  color: var(--gold-bright); font: 800 3rem/1 var(--f-display); background: rgba(247,201,92,.08);
}
.vote b { font-family: var(--f-display); font-size: 1.15rem; }
.vote p { color: var(--on-brand-soft); font-size: .92rem; }

.contact { display: grid; gap: 10px; }
.crow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.crow > .i { width: 36px; height: 36px; padding: 7px; border-radius: 10px; background: var(--tint); color: var(--tint-ink); }
.crow__v { min-width: 0; display: grid; line-height: 1.35; }
.crow__v small { font-size: .7rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.crow__v a, .crow__v span { font-weight: 600; font-size: .92rem; text-decoration: none; overflow-wrap: anywhere; }
.crow__v a:hover { color: var(--tint-ink); text-decoration: underline; }
.copy {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line-strong); color: var(--muted);
  transition: color .2s, border-color .2s;
}
.copy:hover { color: var(--tint-ink); border-color: var(--tint-ink); }
.copy .i { width: 18px; height: 18px; }
.copy.is-done { color: #13996B; border-color: #13996B; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li { padding: 6px 13px; border-radius: 999px; background: var(--tint); color: var(--tint-ink); font-size: .9rem; font-weight: 600; }

.share { display: grid; gap: 10px; }
.share .btn { width: 100%; }

/* prev / next */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 40px; }
.pager a {
  display: grid; gap: 4px; padding: 18px 20px; border-radius: 18px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, transform .2s;
}
.pager a:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.pager small { display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); }
.pager small .i { width: 1.2em; height: 1.2em; }
.pager b { font-family: var(--f-display); font-size: 1.1rem; }
.pager__next { text-align: right; justify-items: end; }

/* other candidates strip */
.strip { padding-top: 40px; }
.strip h2 { font-size: 1.3rem; margin-bottom: 16px; }
.strip__list {
  list-style: none; margin: 0; padding: 4px 2px 14px; display: grid; grid-auto-flow: column; grid-auto-columns: 128px;
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.strip__list li { scroll-snap-align: start; }
@media (min-width: 1001px) {
  .strip__list { grid-auto-flow: row; grid-template-columns: repeat(9, minmax(0, 1fr)); overflow: visible; }
}
.strip__list a {
  display: grid; justify-items: center; gap: 8px; padding: 14px 10px; height: 100%; border-radius: 18px; text-align: center; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, transform .2s;
}
.strip__list a:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.strip__list a[aria-current="page"] { border: 2px solid var(--brand-2); background: var(--tint); }
.strip__av { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line-strong); }
.strip__av .ph .i { width: 82%; margin-bottom: -12%; }
.strip__list b { font-size: .86rem; font-weight: 600; line-height: 1.35; }
.strip__list span { font-size: .76rem; color: var(--muted); }
.strip__list em { font-style: normal; font: 800 .95rem/1 var(--f-display); color: var(--gold-ink); }

.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); z-index: 50;
  transform: translate(-50%, 140%); opacity: 0;
  padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--bg);
  font-size: .92rem; font-weight: 600; box-shadow: var(--shadow-lg);
  transition: transform .3s, opacity .3s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* =====================================================================
   QR page
   ===================================================================== */
.qr-hero { padding-block: 44px 120px; }
.qr-hero h1 { margin-top: 16px; font-size: clamp(2.1rem, 5vw, 3.2rem); font-weight: 800; font-stretch: 84%; }
.qr-hero p { margin-top: 10px; max-width: 60ch; color: var(--on-brand-soft); }
.qr-wrap { margin-top: -84px; position: relative; z-index: 1; }
.qr-poster { margin: 0 auto; display: grid; justify-items: center; gap: 20px; max-width: 520px; }
.qr-poster > a { display: block; width: 100%; border-radius: 20px; }
.qr-poster img { display: block; width: 100%; height: auto; border-radius: 20px; box-shadow: var(--shadow-lg); }
.qr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* =====================================================================
   Responsive
   ===================================================================== */
@media (min-width: 721px) and (max-width: 959px) {
  .tier--members { grid-template-columns: repeat(2, minmax(0, var(--card-w))); } /* 3 rows of 2 so names stay on one line */
  /* President on top, VP and Secretary side by side below */
  .tier--top { grid-template-columns: repeat(2, minmax(0, var(--card-w))); }
  .tier--top .card--role-president { grid-column: 1 / -1; grid-row: 1; justify-self: center; width: calc((100% - 22px) / 2); }
  .tier--top .card--role-vice-president { grid-column: 1; grid-row: 2; margin-top: 0; }
  .tier--top .card--role-secretary { grid-column: 2; grid-row: 2; margin-top: 0; }
}
@media (max-width: 1000px) {
  .profile { grid-template-columns: minmax(0, 1fr); }
  .profile__aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .mast { padding-block: 40px 44px; }
  .mast__art { width: 420px; height: 420px; }
  .ieb { --seal: 74px; margin-top: 30px; padding-right: 18px; border-radius: 16px; }
  .ieb__text { font-size: clamp(.98rem, 4.6vw, 1.3rem); }
  .mast__facts { grid-template-columns: minmax(0, 1fr); width: 100%; max-width: 380px; padding: 6px 8px; margin-top: 26px; }
  .mast__facts li { padding: 10px 6px; }
  .mast__facts li + li { border-left: 0; border-top: 1px solid rgba(255,255,255,.14); }
  .mast__fv b { white-space: normal; }
  .panel { padding-top: 0; }
  .tier-label { margin: 30px auto 14px; font-size: .74rem; }
  .tier { gap: 14px; }
  .tier--top { grid-template-columns: minmax(0, 1fr); }
  .tier--top .card { grid-column: auto; grid-row: auto; width: auto; margin-top: 0; } /* stacked: President, VP, Secretary */

  /* President, VP and secretary: one per row, photo beside the details */
  .tier--top .card { flex-direction: row; align-items: center; padding: 10px; }
  .card__media { height: auto; aspect-ratio: 10 / 9; max-height: var(--photo-h); }
  .tier--top .card__media { width: 40%; flex: none; }
  .tier--top .card__photo { border-radius: 13px; }
  .role-chip { font-size: .8rem; padding: 5px 12px 5px 9px; }
  .tier--top .card__head { gap: 8px; }
  .tier--top .card__body { justify-content: center; padding: 2px 2px 2px 4px; gap: 10px; min-width: 0; }
  .card__name { font-stretch: 82%; }
  .tier--top .card__name { font-size: 1.12rem; --name-min: 15px; }
  .tier--top .meta { gap: 6px; }
  .tier--top .meta > div { flex-wrap: nowrap; padding: 6px 9px; border-radius: 10px; }
  .tier--top .meta dt { font-size: .74rem; white-space: nowrap; }
  .tier--top .meta dt .i { display: none; }
  .tier--top .meta dd { font-size: .84rem; }
  .tier--top .meta__ballot dd { font-size: 1.15rem; }
  .tier--top .btn { min-height: 42px; padding: 8px 10px; font-size: .92rem; }

  /* members: 2 per row */
  .tier--members { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tier--members .card { padding: 8px; border-radius: 18px; }
  .tier--members .card__photo { border-radius: 12px; }
  .tier--members .card__head { gap: 8px; }
  .tier--members .card__body { padding: 12px 2px 2px; gap: 10px; }
  .tier--members .card__name { font-size: .95rem; --name-min: 14px; }
  .tier--members .meta > div { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; padding: 6px 8px; border-radius: 10px; }
  .tier--members .meta dt { font-size: .76rem; gap: 5px; }
  .tier--members .meta dt .i { display: none; }
  .tier--members .meta dd { font-size: .82rem; }
  .tier--members .meta__ballot dd { font-size: 1.15rem; }
  .tier--members .btn { min-height: 40px; padding: 8px 10px; font-size: .86rem; border-radius: 11px; }

  .phero { padding-block: 32px 28px; }
  .phero__grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .frame { width: min(300px, 100%); justify-self: center; }
  .profile__aside { grid-template-columns: minmax(0, 1fr); }
  .block { padding: 20px; }
  .pager { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pager__next { text-align: left; justify-items: start; }
  .topbar__name { display: none; }
}
@media (max-width: 400px) {
  .tier--top .meta dt { font-size: .7rem; }
  .tier--top .meta dd { font-size: .8rem; }
  .facts li { padding: 12px; gap: 2px 10px; }
  .facts .i { width: 30px; height: 30px; padding: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
