/* Voice of Mechatronics: 3-colour palette only
   Blue   #004165  header, headings, text, buttons
   Maroon #772432  accents (Vote, live, winners, alerts)
   White  #FFFFFF  background, cards
   Tints below are the same colours at lower opacity. */
:root {
  --blue: #004165;
  --maroon: #772432;
  --white: #ffffff;
  --text: #004165;
  --muted: rgba(0, 65, 101, 0.68);
  --line: rgba(0, 65, 101, 0.14);
  --tint: rgba(0, 65, 101, 0.05);
  --tint-2: rgba(0, 65, 101, 0.09);
  --maroon-tint: rgba(119, 36, 50, 0.08);
  --radius: 16px;
  --shadow: 0 4px 20px rgba(0, 65, 101, 0.08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
}
a { color: var(--blue); }
h1, h2, h3, h4 { color: var(--blue); }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* Header */
.site-header { background: var(--blue); color: var(--white); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-weight: 700; letter-spacing: .2px; }
.brand img { height: 38px; width: auto; display: block; }
.brand span { font-size: 17px; white-space: nowrap; }
.nav { display: flex; gap: 4px; }
.nav a { color: rgba(255,255,255,.78); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a.active { color: var(--white); background: rgba(255,255,255,.12); }
.nav a.cta { background: var(--maroon); color: var(--white); font-weight: 700; }
@media (max-width: 640px) {
  .brand span { display: none; }
  .nav a { padding: 8px 9px; font-size: 14px; }
}

/* Live banner */
.live-banner { background: var(--maroon); color: var(--white); }
.live-banner a { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; color: var(--white); text-decoration: none; font-weight: 700; text-align: center; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--white); animation: pulse 1.2s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.8); } 100% { box-shadow: 0 0 0 12px rgba(255,255,255,0); } }

/* Hero */
.hero { background: var(--blue); color: var(--white); padding: 64px 0 72px; }
.hero h1 { color: var(--white); font-size: clamp(32px, 6vw, 52px); line-height: 1.1; margin: 0 0 14px; letter-spacing: -.5px; }
.hero h1 em { font-style: normal; color: var(--white); border-bottom: 4px solid var(--maroon); }
.hero p { font-size: 18px; color: rgba(255,255,255,.85); max-width: 620px; margin: 0 0 28px; }
.hero strong { color: var(--white); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,.75); margin-bottom: 12px; }
.page-hero { padding: 40px 0 44px; }
.page-hero h1 { font-size: clamp(28px, 5vw, 40px); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid transparent; cursor: pointer;
  padding: 12px 22px; border-radius: 12px; font-size: 16px; font-weight: 700; text-decoration: none; transition: transform .08s, opacity .2s; font-family: inherit; }
.btn:active { transform: scale(.98); }
.btn-navy, .btn-green { background: var(--blue); color: var(--white); }
.btn-gold, .btn-red { background: var(--maroon); color: var(--white); }
.btn-light { background: var(--white); color: var(--blue); border-color: var(--line); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.6); }
.hero .btn-gold { background: var(--white); color: var(--blue); }
.hero .btn-gold.vote, .hero #voteBtn { background: var(--maroon); color: var(--white); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Sections & cards */
section.block { padding: 52px 0; }
.section-title { font-size: 28px; margin: 0 0 6px; }
.section-sub { color: var(--muted); margin: 0 0 26px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature { border-top: 4px solid var(--blue); }
.feature h3 { margin: 0 0 6px; font-size: 20px; }
.feature p { margin: 0; color: var(--muted); }
.tm-card { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: center; }
@media (max-width: 760px) { .tm-card { grid-template-columns: 1fr; } }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--tint-2); color: var(--blue); }
.tag.live { background: var(--maroon-tint); color: var(--maroon); }

/* Meeting details */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 6px 0 8px; }
.fact { background: var(--tint); border-left: 4px solid var(--blue); border-radius: 10px; padding: 12px 14px; }
.fact small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }
.fact strong { font-size: 16px; }
h3.sub { margin: 26px 0 10px; font-size: 18px; }
table.roles { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
table.roles td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
table.roles tr:last-child td { border-bottom: 0; }
table.roles td:first-child { color: var(--muted); width: 45%; font-weight: 600; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.pgroup { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: var(--white); }
.pgroup h4 { margin: 0 0 6px; font-size: 15px; }
.pgroup ul { margin: 0; padding-left: 18px; }
.notes { margin-top: 18px; padding: 14px; background: var(--tint); border-radius: 12px; white-space: pre-line; }
.winners { border: 1.5px solid var(--maroon); border-radius: 14px; padding: 18px; margin-bottom: 20px; background: var(--maroon-tint); }
.winners h3 { margin: 0 0 12px; color: var(--maroon); }
.wgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.wcard { background: var(--white); border-radius: 10px; padding: 12px; border: 1px solid var(--line); }
.wcard span { display: block; font-size: 13px; color: var(--muted); }
.wcard strong { font-size: 17px; color: var(--maroon); }

/* Vote page */
.vote-shell { max-width: 620px; margin: 0 auto; padding: 22px 16px 60px; }
.state { text-align: center; padding: 40px 22px; }
.state .big { color: var(--blue); margin-bottom: 10px; display: flex; justify-content: center; }
.state h2 { margin: 0 0 8px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field small { color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=number], textarea {
  width: 100%; padding: 13px 14px; font-size: 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--white); color: var(--blue); font-family: inherit; }
input::placeholder, textarea::placeholder { color: rgba(0, 65, 101, 0.4); }
input:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--tint-2); }
input[type=checkbox] { accent-color: var(--blue); }
textarea { min-height: 110px; resize: vertical; }
.cat { margin-bottom: 16px; }
.cat h3 { margin: 0 0 10px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.cat h3 .done { margin-left: auto; color: var(--blue); font-size: 15px; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--white); font-size: 16px; font-weight: 600; color: var(--blue); cursor: pointer; font-family: inherit; }
.opt .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(0,65,101,.35); flex: none; }
.opt.sel { border-color: var(--blue); background: var(--tint); }
.opt.sel .dot { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 3px var(--white); }
.sticky-submit { position: sticky; bottom: 0; background: linear-gradient(rgba(255,255,255,0), var(--white) 30%); padding: 18px 0 8px; }
.msg { padding: 12px 14px; border-radius: 12px; margin: 12px 0; font-weight: 600; }
.msg.err { background: var(--maroon-tint); color: var(--maroon); border: 1px solid rgba(119,36,50,.25); }
.msg.ok { background: var(--tint); color: var(--blue); border: 1px solid var(--line); }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0, 65, 101, .55); display: flex; align-items: flex-end; justify-content: center; z-index: 50; padding: 16px; }
.modal .sheet { background: var(--white); border-radius: 18px; padding: 22px; width: 100%; max-width: 480px; }
.modal h3 { margin: 0 0 6px; }
.summary { list-style: none; padding: 0; margin: 14px 0; }
.summary li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.summary li span { color: var(--muted); }
@media (min-width: 640px) { .modal { align-items: center; } }

/* Admin */
.admin-grid { display: grid; gap: 18px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } }
.switch-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; padding: 8px 14px; border-radius: 99px; }
.status-pill.on { background: var(--maroon-tint); color: var(--maroon); }
.status-pill.off { background: var(--tint-2); color: var(--muted); }
.bigtoggle { font-size: 18px; padding: 16px 26px; }
.stat { font-size: 34px; font-weight: 800; color: var(--blue); line-height: 1; }
.bar-row { margin: 8px 0; }
.bar-row .lbl { display: flex; justify-content: space-between; font-weight: 600; font-size: 15px; }
.bar-row .lead { font-style: normal; font-size: 12px; font-weight: 700; color: var(--maroon); margin-left: 6px; }
.bar { height: 10px; background: var(--tint-2); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.bar-row.win .bar i { background: var(--maroon); }
.results-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
details summary { cursor: pointer; font-weight: 700; }
.small { font-size: 14px; }
code { background: var(--tint-2); color: var(--blue); padding: 2px 6px; border-radius: 6px; word-break: break-all; }

/* Footer */
.site-footer { background: var(--blue); color: rgba(255,255,255,.75); padding: 30px 0; font-size: 14px; margin-top: 40px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer a { color: var(--white); }
