/* PSO Boston Local — Member Feedback & Engagement
   Palette: federal navy + badge brass on cool steel paper.
   Type: Barlow Condensed (display, uniform-patch feel) + Barlow (text). */

:root {
  --navy: #13233F;
  --navy-2: #1D3358;
  --navy-3: #2A4574;
  --brass: #C79A3A;
  --brass-2: #A67C24;
  --brass-soft: #F4EAD2;
  --paper: #ECEFF4;
  --card: #FFFFFF;
  --ink: #18212F;
  --muted: #5A6577;
  --line: #D5DBE4;
  --line-2: #E6EAF0;
  --ok: #2E7552;
  --ok-soft: #E1F0E7;
  --warn: #9A6412;
  --warn-soft: #FBEFD9;
  --danger: #A92C22;
  --danger-soft: #F8E1DE;
  --info: #2C5AA0;
  --info-soft: #E0E9F7;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif-condensed, system-ui, sans-serif;
  --text: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.6 var(--text); color: var(--ink); background: var(--paper); }
/* Short pages (tracking, confirmations) still push the footer to the bottom of the screen. */
body.public { display: flex; flex-direction: column; min-height: 100vh; }
body.public > main { flex: 1 0 auto; }
body.public > .footer { flex-shrink: 0; }
img, svg { max-width: 100%; }
a { color: var(--navy-3); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0 0 .5em; letter-spacing: .005em; color: var(--navy); }
h1 { font-size: clamp(2.1rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; border-radius: 3px; }
.ic { flex: none; vertical-align: middle; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brass); color: var(--navy); padding: 8px 14px; z-index: 99; font-weight: 600; }
.skip:focus { left: 8px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }
.page-pad { padding-block: 48px 72px; }

/* ---------- top bar ---------- */
.topbar { background: var(--navy); color: #fff; position: relative; z-index: 5; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font: 700 1.35rem/1 var(--display); letter-spacing: .01em; }
.brand:hover { color: #fff; }
.sitenav { display: flex; gap: 4px; flex-wrap: wrap; }
.sitenav a { color: #D6DEEB; text-decoration: none; font-weight: 500; font-size: .98rem; padding: 8px 12px; border-radius: var(--r-sm); position: relative; }
.sitenav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.sitenav a[aria-current="page"] { color: #fff; }
.sitenav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px; background: var(--brass); border-radius: 2px; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: var(--r-sm); padding: 7px 9px; cursor: pointer; }

/* ---------- hero ---------- */
.hero { background: var(--navy); color: #fff; position: relative; padding: 64px 0 150px; overflow: hidden; }
.hero::after { /* sleeve stripes */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px;
  background: linear-gradient(var(--brass) 0 5px, transparent 5px 10px, var(--brass) 10px 13px, transparent 13px);
  opacity: .9;
}
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: end; }
.hero h1 { color: #fff; font-size: clamp(3.2rem, 8.4vw, 6.6rem); line-height: .92; letter-spacing: -.01em; margin: 0; text-transform: none; }
.hero h1 span { display: block; }
.hero-copy p { color: #CBD5E4; font-size: 1.12rem; max-width: 46ch; }
.hero-copy .lead { color: #fff; font: 600 1.5rem/1.25 var(--display); margin-bottom: .6em; }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 span { opacity: 0; transform: translateY(18px); animation: rise .7s cubic-bezier(.2,.7,.2,1) forwards; }
  .hero h1 span:nth-child(2) { animation-delay: .12s; }
  .hero h1 span:nth-child(3) { animation-delay: .24s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

/* ---------- action tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(var(--tiles, 4), 1fr); gap: 16px; margin-top: -104px; position: relative; z-index: 2; }
.tile { display: flex; flex-direction: column; gap: 10px; background: var(--card); border-radius: var(--r-lg); padding: 24px 22px 22px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-top: 5px solid var(--brass); box-shadow: 0 14px 30px -18px rgba(19,35,63,.45); min-height: 200px; }
.tile:hover { border-color: var(--navy-3); border-top-color: var(--brass); color: var(--ink); }
.tile:hover .tile-go { background: var(--navy); color: #fff; }
.tile .tile-ic { width: 48px; height: 48px; border-radius: 12px; background: var(--brass-soft); color: var(--navy); display: grid; place-items: center; }
.tile strong { font: 700 1.55rem/1.05 var(--display); color: var(--navy); }
.tile span.d { color: var(--muted); font-size: .96rem; line-height: 1.45; }
.tile-go { margin-top: auto; align-self: flex-start; display: inline-flex; width: 36px; height: 36px; border-radius: 50%; align-items: center; justify-content: center; background: var(--paper); color: var(--navy); }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }
.intro-block { max-width: 70ch; font-size: 1.12rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.two-col > .panel + .panel, .side-layout > .panel + .panel { margin-top: 0; }
.side-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 28px; align-items: start; }
.side-layout h2 .ic { color: var(--brass); margin-right: 4px; vertical-align: -3px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; }
.panel h3 { margin-bottom: .4em; }
.panel + .panel { margin-top: 20px; }

.campaign-banner { display: flex; gap: 22px; align-items: center; justify-content: space-between; background: var(--brass-soft); border: 1px solid #E5D3A6; border-left: 6px solid var(--brass); border-radius: var(--r); padding: 22px 26px; flex-wrap: wrap; }
.campaign-banner h3 { margin: 0 0 4px; }
.campaign-banner p { margin: 0; color: #5B4A22; }

/* ---------- feedback loop ---------- */
.loop { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: s; }
.loop li { position: relative; padding: 0 14px 0 0; display: flex; flex-direction: column; gap: 6px; }
.loop li::before { content: ""; position: absolute; top: 21px; left: 44px; right: 0; height: 3px; background: var(--line); }
.loop li:last-child::before { display: none; }
.loop-dot { position: relative; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 700 1.25rem/1 var(--display); background: var(--navy); color: #fff; border: 3px solid var(--paper); box-shadow: 0 0 0 2px var(--navy); }
.loop-title { font: 700 1.2rem/1.15 var(--display); color: var(--navy); margin-top: 6px; }
.loop-desc { color: var(--muted); font-size: .95rem; line-height: 1.45; padding-right: 8px; }
.loop-live li.done .loop-dot { background: var(--navy); }
.loop-live li.done::before { background: var(--navy); }
.loop-live li.now .loop-dot { background: var(--brass); color: var(--navy); box-shadow: 0 0 0 2px var(--brass); }
.loop-live li.todo .loop-dot { background: #fff; color: var(--muted); box-shadow: 0 0 0 2px var(--line); }
.loop-live li.todo .loop-title { color: var(--muted); font-weight: 600; }
.loop-live .loop-dot { width: 38px; height: 38px; font-size: 1.1rem; }
.loop-live li::before { top: 18px; left: 38px; }
.panel .loop-dot { border-color: var(--card); }

/* ---------- lists: events + updates ---------- */
.ev-list, .up-list { list-style: none; margin: 0; padding: 0; }
.ev { display: grid; grid-template-columns: 74px 1fr; gap: 18px; padding: 18px 0; border-top: 1px solid var(--line-2); align-items: start; }
.ev:first-child { border-top: 0; padding-top: 4px; }
.datebadge { width: 74px; text-align: center; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.datebadge .m { display: block; background: var(--navy); color: #fff; font: 600 .95rem/1 var(--display); padding: 6px 0 5px; letter-spacing: .04em; }
.datebadge .d { display: block; font: 700 2rem/1 var(--display); color: var(--navy); padding: 6px 0 2px; }
.datebadge .w { display: block; font-size: .78rem; color: var(--muted); padding-bottom: 6px; }
.ev h3 { margin: 0 0 4px; font-size: 1.35rem; }
.ev h3 a { color: var(--navy); text-decoration: none; }
.ev h3 a:hover { text-decoration: underline; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .94rem; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.up { padding: 18px 0; border-top: 1px solid var(--line-2); }
.up:first-child { border-top: 0; padding-top: 4px; }
.up h3 { margin: 6px 0 4px; font-size: 1.35rem; }
.up h3 a { color: var(--navy); text-decoration: none; }
.up h3 a:hover { text-decoration: underline; }
.up p { margin: 0; color: var(--muted); }
.empty { color: var(--muted); padding: 10px 0; }
.empty a { font-weight: 600; }

/* ---------- pills / tags ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: .82rem; font-weight: 600; line-height: 1.5; background: var(--line-2); color: var(--ink); white-space: nowrap; }
.tag { display: inline-block; font-size: .82rem; font-weight: 600; color: var(--navy-3); }
.tag.imp { color: var(--danger); }
.st-new { background: var(--info-soft); color: var(--info); }
.st-under_review { background: var(--warn-soft); color: var(--warn); }
.st-in_progress { background: #EAE3F5; color: #5B3F8C; }
.st-responded { background: var(--brass-soft); color: #74561A; }
.st-resolved { background: var(--ok-soft); color: var(--ok); }
.st-closed { background: #E6E8EC; color: #4A5261; }
.st-open, .st-published { background: var(--ok-soft); color: var(--ok); }
.st-draft { background: #E6E8EC; color: #4A5261; }
.st-cancelled { background: var(--danger-soft); color: var(--danger); }

/* ---------- forms ---------- */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 32px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field label, .label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field .hint { display: block; font-weight: 400; color: var(--muted); font-size: .9rem; margin-top: 4px; }
.req { color: var(--danger); font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search],
input[type=datetime-local], input[type=date], input[type=time], input[type=month], input[type=week], input[type=tel],
input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 8px; padding: 11px 13px; min-height: 48px;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
input[type=date], input[type=time], input[type=datetime-local] { appearance: none; -webkit-appearance: none; }
input[type=date]::-webkit-calendar-picker-indicator, input[type=time]::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-3); box-shadow: 0 0 0 3px rgba(199,154,58,.35); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: block; height: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; line-height: 1.35; }
.choice span b { display: block; font: 700 1.1rem/1.2 var(--display); color: var(--navy); }
.choice span small { color: var(--muted); font-size: .88rem; }
.choice input:checked + span { border-color: var(--navy); background: #F3F6FB; box-shadow: inset 0 0 0 1px var(--navy); }
.choice input:focus-visible + span { outline: 3px solid var(--brass); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--navy); flex: none; }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 24px; }
.errors { background: var(--danger-soft); color: var(--danger); border-radius: var(--r-sm); padding: 12px 16px; margin-bottom: 20px; }
.errors ul { margin: 6px 0 0; padding-left: 20px; }

.topic-list { display: grid; gap: 10px; }
.topic { border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
.topic > label { padding: 12px 14px; }
.topic textarea { display: none; min-height: 80px; margin: 0 14px 14px; width: calc(100% - 28px); }
.topic.on { border-color: var(--navy); }
.topic.on textarea, .no-js .topic textarea { display: block; }
.topic .stance-row { display: none; margin: 0 14px 10px; }
.topic.on .stance-row, .no-js .topic .stance-row { display: grid; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 1rem/1 var(--text); padding: 13px 20px; min-height: 48px; border-radius: 8px; border: 1.5px solid var(--navy); background: var(--navy); color: #fff; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--navy-2); color: #fff; }
.btn-brass { background: var(--brass); border-color: var(--brass); color: var(--navy); }
.btn-brass:hover { background: #D6A947; color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: #fff; color: var(--navy); border-color: var(--navy-3); }
.btn-danger { background: #fff; color: var(--danger); border-color: #E7B9B3; }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 8px 12px; min-height: 36px; font-size: .9rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--navy-3); font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- confirmation / tracking ---------- */
.confirm-ref { display: inline-block; font: 700 2.4rem/1 var(--display); color: var(--navy); background: var(--brass-soft); border: 1px dashed var(--brass); padding: 12px 20px; border-radius: var(--r); letter-spacing: .02em; margin: 6px 0 18px; }
.detail-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 500; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 22px 28px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: -4px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--navy-3); }
.timeline li.note::after { border-color: var(--brass); }
.timeline li.status::after { border-color: var(--line); background: var(--line); }
.timeline .when { color: var(--muted); font-size: .88rem; }
.timeline .body { background: #F6F8FB; border: 1px solid var(--line-2); border-radius: 8px; padding: 12px 14px; margin-top: 6px; }
.timeline li.note .body { background: #FDF8EC; border-color: #EEDFB9; }
.timeline .body p:last-child { margin: 0; }
.quote { background: #F6F8FB; border-left: 4px solid var(--navy-3); padding: 14px 18px; border-radius: 0 8px 8px 0; }
.quote p:last-child { margin: 0; }

.article { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 36px; }
.article .body { font-size: 1.08rem; max-width: 70ch; }
.back { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; text-decoration: none; margin-bottom: 18px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filters a { text-decoration: none; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: .92rem; font-weight: 500; }
.filters a[aria-current="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- flash ---------- */
.flash-wrap { padding-top: 18px; }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 12px; font-weight: 500; border: 1px solid transparent; }
.flash-ok { background: var(--ok-soft); color: var(--ok); border-color: #BFDCCB; }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: #EDC1BB; }
.flash-info { background: var(--info-soft); color: var(--info); border-color: #C4D4EE; }

/* ---------- footer ---------- */
.footer { background: var(--navy); color: #C7D1E1; padding: 40px 0; margin-top: 24px; }
.footer-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer-brand { display: flex; gap: 12px; align-items: center; }
.footer-brand strong { display: block; color: #fff; font: 700 1.2rem/1.1 var(--display); }
.footer-brand span { font-size: .92rem; }
.footer-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-nav a { color: #C7D1E1; text-decoration: none; font-size: .95rem; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }

/* ---------- admin ---------- */
body.admin { background: var(--paper); }
.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #D6DEEB; display: flex; flex-direction: column; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side-brand { padding: 4px 8px 22px; font-size: 1.15rem; line-height: 1.1; }
.side-brand small { display: block; font: 500 .85rem/1.3 var(--text); color: #9FB0C8; margin-top: 3px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-foot a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: #D6DEEB; text-decoration: none; font-weight: 500; }
.side-nav a:hover, .side-foot a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav a[aria-current="page"] { background: var(--navy-2); color: #fff; box-shadow: inset 3px 0 0 var(--brass); }
.side-nav .count { margin-left: auto; background: var(--brass); color: var(--navy); font-size: .78rem; padding: 1px 8px; border-radius: 999px; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; font-size: .92rem; }
.admin-main { min-width: 0; }
.admin-top { display: flex; align-items: center; gap: 14px; padding: 22px 32px 0; }
.admin-top h1 { margin: 0; font-size: 2rem; }
.admin-content { padding: 20px 32px 60px; }
.side-toggle { display: none; color: var(--navy); border-color: var(--line); background: #fff; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; text-decoration: none; color: var(--ink); display: block; }
a.stat:hover { border-color: var(--navy-3); color: var(--ink); }
.stat b { display: block; font: 700 2.3rem/1 var(--display); color: var(--navy); }
.stat span { color: var(--muted); font-size: .94rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 1.4rem; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.toolbar .field { min-width: 150px; flex: 1; }
.toolbar .field.grow { flex: 2; }
.toolbar label { font-size: .85rem; }
.toolbar input, .toolbar select { min-height: 42px; padding: 8px 10px; }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th { text-align: left; font-weight: 600; color: var(--muted); font-size: .85rem; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #F7F9FB; }
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.new td:first-child { box-shadow: inset 3px 0 0 var(--info); }
table.data a.rowlink { font-weight: 600; color: var(--navy); text-decoration: none; }
table.data a.rowlink:hover { text-decoration: underline; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
.ref { font-weight: 700; font-family: var(--display); font-size: 1.05rem; letter-spacing: .02em; color: var(--navy); }

.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 48px; gap: 12px; align-items: center; font-size: .95rem; }
.bar { height: 12px; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--navy-3); border-radius: 6px; }
.bar.brass i { background: var(--brass); }
.bar-row .n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

.inline-form { display: inline; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: .95rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.stack > * + * { margin-top: 16px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.list-edit { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.list-edit li { display: grid; grid-template-columns: 1fr 90px auto; gap: 8px; align-items: center; }
.list-edit li .merge { grid-column: 1 / -1; min-height: 38px; padding: 6px 10px; font-size: .9rem; color: var(--muted); }
.list-edit li + li { border-top: 1px solid var(--line); padding-top: 10px; }
.list-edit li input[type=number] { min-height: 42px; }
.list-edit li input[type=text] { min-height: 42px; padding: 8px 10px; }
.pager { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pager a, .pager span { padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line); background: #fff; text-decoration: none; font-size: .92rem; }
.pager .cur { background: var(--navy); color: #fff; border-color: var(--navy); }

/* login */
.login-page { min-height: 100vh; display: grid; place-items: center; background: var(--navy); padding: 24px; position: relative; }
.login-page::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18px; background: linear-gradient(var(--brass) 0 5px, transparent 5px 10px, var(--brass) 10px 13px, transparent 13px); }
.login-card { background: #fff; border-radius: var(--r-lg); padding: 36px; width: min(420px, 100%); }
.login-card .brand { color: var(--navy); margin-bottom: 18px; }
.login-card .brand:hover { color: var(--navy); }

/* ---------- responsive ---------- */
.brand span, .footer-brand strong { white-space: nowrap; }
.side-brand span { white-space: normal; }
.check .hint { display: block; margin-top: 2px; }
.side-role { display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin: 4px 10px 0; border-radius: 8px; background: rgba(199,154,58,.16); color: var(--brass); font-size: .85rem; }
@media (max-width: 600px) { .brand span { white-space: normal; } }

/* ---------- printable meeting sheet ---------- */
.sheet { background: var(--paper); }
.sheet-wrap { width: min(820px, 100% - 40px); margin: 24px auto 60px; background: #fff; padding: 34px 38px; border-radius: var(--r); box-shadow: 0 1px 3px rgba(19,35,63,.12); }
.sheet-actions { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 18px; }
.sheet-head { display: flex; gap: 16px; align-items: flex-start; border-bottom: 3px solid var(--brass); padding-bottom: 16px; }
.sheet-head h1 { margin: 0 0 4px; font-size: 1.9rem; }
.sheet-head p { margin: 0; }
.sheet-sec { margin-top: 26px; }
.sheet-sec h2 { font-size: 1.25rem; margin: 0 0 10px; }
.sheet-sec h3 { font-size: 1rem; margin: 16px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sheet-q { margin: 0; padding-left: 20px; }
.sheet-q li { margin-bottom: 10px; }
.sheet-q .who { display: block; color: var(--muted); font-size: .85rem; }
.sheet-tbl { width: 100%; border-collapse: collapse; }
.sheet-tbl th, .sheet-tbl td { border: 1px solid var(--line); padding: 9px 10px; text-align: left; font-size: .92rem; }
.sheet-tbl th { background: var(--paper); font-family: var(--display); letter-spacing: .02em; }
.sheet-tbl td { height: 30px; }
.quote.done { opacity: .62; }
.quote-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
@media print {
  .no-print { display: none; }
  body.sheet { background: #fff; }
  .sheet-wrap { width: auto; margin: 0; padding: 0; box-shadow: none; }
  .sheet-break { page-break-before: always; }
  .sheet-tbl th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.stance-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 8px; }
.stance { display: block; cursor: pointer; }
.stance input { position: absolute; opacity: 0; }
.stance span { display: block; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; background: var(--card); }
.stance strong { display: block; font-size: .92rem; }
.stance small { color: var(--muted); font-size: .8rem; line-height: 1.25; display: block; margin-top: 2px; }
.stance input:checked + span { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(19,35,63,.08); }
.stance input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }
.bar.split { display: flex; gap: 2px; }
.bar.split i { position: static; height: 100%; border-radius: 3px; }
.bar.split .s-keep { background: var(--ok); }
.bar.split .s-improve { background: var(--navy-3); }
.bar.split .s-remove { background: var(--danger); }
.stance-key { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0 0; font-size: .85rem; color: var(--muted); }
.stance-key i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; }
.stance-key .s-keep { background: var(--ok); } .stance-key .s-improve { background: var(--navy-3); } .stance-key .s-remove { background: var(--danger); }
@media (max-width: 600px) { .stance-row { grid-template-columns: 1fr; } }

/* ---------- branding admin */
.brand-preview { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--p-brand, var(--navy)); border-bottom: 4px solid var(--p-accent, var(--brass)); }
.brand-preview strong { color: #fff; font-family: var(--display); font-size: 1.3rem; letter-spacing: .01em; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; font: inherit; font-size: .85rem; color: var(--muted); }
.swatch:hover { border-color: var(--navy-3); color: var(--ink); }
.swatch span { width: 13px; height: 13px; border-radius: 50%; display: inline-block; }
.tile-edit { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.tile-edit textarea { min-height: 54px; }
input[type=color] { width: 100%; min-height: 44px; padding: 4px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--card); }
input[type=file] { width: 100%; padding: 10px; border: 1.5px dashed var(--line); border-radius: var(--r-sm); background: var(--card); font-size: .92rem; }
.mark-img { display: block; object-fit: contain; }
.footer-note { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); color: #C9D2E3; font-size: .9rem; }
.footer-note p { margin: 0 0 6px; }
.notice-banner { background: var(--info-soft); border-left: 5px solid var(--info); }
.notice-banner p { margin: 0; }

/* ---------- polish */
.nowrap { white-space: nowrap; }
.stack > input[type="hidden"] + * { margin-top: 0; }
.admin-shell { background: linear-gradient(to right, var(--navy) 260px, var(--paper) 260px); }
.panel, .form-card { container-type: inline-size; }
@media (min-width: 861px) {
  @container (max-width: 560px) {
    .loop-live .loop-dot { width: 32px; height: 32px; font-size: .95rem; }
    .loop-live li::before { top: 15px; left: 32px; }
    .loop-live li { padding-right: 6px; }
    .loop-live .loop-title { font-size: .98rem; line-height: 1.15; }
  }
}

@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-main, .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .sitenav { display: none; position: absolute; left: 0; right: 0; top: 70px; background: var(--navy); flex-direction: column; padding: 8px 20px 18px; border-top: 1px solid rgba(255,255,255,.1); }
  .sitenav.open { display: flex; }
  .sitenav a { padding: 12px 8px; }
  .sitenav a[aria-current="page"]::after { left: 8px; right: auto; width: 28px; }
  .two-col, .side-layout { grid-template-columns: 1fr; }
  .loop { grid-template-columns: 1fr; gap: 18px; }
  .loop li { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 0; }
  .loop li::before { top: 44px; bottom: -18px; left: 20px; right: auto; width: 3px; height: auto; }
  .loop-live li::before { top: 38px; left: 17px; }
  .loop-title { margin-top: 0; }
  .loop-desc { flex-basis: 100%; padding-left: 58px; margin-top: -6px; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .admin-shell { grid-template-columns: 1fr; background: var(--paper); }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .side-toggle { display: inline-flex; }
  .admin-top, .admin-content { padding-inline: 18px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .tiles { grid-template-columns: 1fr; margin-top: -90px; }
  .tile { min-height: 0; }
  .hero { padding: 44px 0 130px; }
  .form-grid { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: 1fr; }
  .form-card, .article, .panel { padding: 22px 18px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .bar-row { grid-template-columns: 1fr 40px; }
  .bar-row .bar { grid-column: 1 / -1; grid-row: 2; }
  .detail-list { grid-template-columns: 1fr; gap: 2px; }
  .detail-list dd { margin-bottom: 8px; }
  .list-edit li { grid-template-columns: 1fr 70px; }
  .list-edit li > :last-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- grievance site ---------- */
.hero-tight { padding: 52px 0 120px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost-light:hover { border-color: #fff; }
.steps-list { margin: 0; padding-left: 20px; }
.steps-list li { margin-bottom: 8px; }
.case-list { display: grid; gap: 12px; margin-top: 16px; }
.case-card { display: block; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--navy-3); border-radius: var(--r); padding: 16px 18px; text-decoration: none; color: var(--ink); }
.case-card:hover { border-left-color: var(--brass); box-shadow: 0 10px 24px -18px rgba(19,35,63,.5); }
.case-card h3 { margin: 6px 0 8px; font-size: 1.2rem; }
.case-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.case-top .ref { font-family: var(--display); font-size: 1.05rem; letter-spacing: .04em; color: var(--muted); }
.case-card .meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: .88rem; }
.case-card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.plain-list { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.plain-list li { padding: 6px 0; border-top: 1px solid var(--line-2); }

/* evidence */
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.file { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.file-thumb { display: block; width: 100%; height: 118px; background: #0d1626; }
.file-thumb img, .file-thumb video { width: 100%; height: 118px; object-fit: cover; display: block; }
.file-doc { display: grid; place-items: center; background: var(--card); color: var(--navy-3); height: 118px; }
.file-audio { display: grid; place-items: center; background: var(--card); height: 118px; padding: 0 8px; }
.file-audio audio { width: 100%; }
.file figcaption { display: block; padding: 8px 10px; font-size: .85rem; line-height: 1.35; background: var(--card); }
.file figcaption a { color: var(--ink); }
.file figcaption .muted { display: block; margin-top: 2px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--danger); cursor: pointer; text-decoration: underline; }
.file-picked { list-style: none; margin: 8px 0 0; padding: 0; font-size: .88rem; color: var(--muted); }
.file-picked li { padding: 3px 0; }
.tl-officer .tl-body { border-left-color: var(--brass); }
.tl-note .tl-body { border-left-color: var(--warn); background: var(--warn-soft); }
.pill-review { background: #E4E9F5; color: #2C4577; }
.pill-progress { background: var(--info-soft); color: var(--info); }
.pill-new { background: var(--brass-soft); color: #6B4A00; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-closed { background: var(--line-2); color: var(--muted); }
.field-edit { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.field-edit .field { margin: 0; }
.field-flags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px; }
.danger-text { color: var(--danger); }
@media (max-width: 900px) { .field-edit { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .field-edit { grid-template-columns: 1fr; } }

.field > label .hint, .field > label .req { display: inline; margin-left: 6px; font-weight: 400; }
.field > label .req { margin-left: 3px; }
.text-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.text-jump a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--muted); text-decoration: none; font-size: .88rem; }
.text-jump a:hover { border-color: var(--navy-3); color: var(--ink); }
.footer-credit { margin: 6px 0 0; font-size: .85rem; color: rgba(255,255,255,.55); }
