:root {
  --navy: #0a1628;
  --navy-2: #132944;
  --gold: #f0a63c;
  --gold-pale: #fff1d9;
  --red: #b01118;
  --cream: #f8f6f1;
  --paper: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #dfe3e8;
  --regiment: #7d3b8c;
  --shadow: 0 18px 50px rgba(10, 22, 40, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.5;
}

button, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  padding: 10px 14px;
  color: #fff;
  background: var(--red);
  border-radius: 6px;
}
.skip-link:focus { transform: none; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.draft-bar {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 7px 18px;
  color: #fff;
  background: var(--red);
  font-size: 12px;
  letter-spacing: .04em;
}
.draft-bar strong { text-transform: uppercase; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 clamp(20px, 5vw, 72px);
  color: #fff;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark {
  display: block;
  width: 54px;
  height: 57px;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.35));
}
.brand strong, .brand small { display: block; }
.brand strong { font: 600 19px/1.05 "Oswald", sans-serif; text-transform: uppercase; letter-spacing: .04em; }
.brand small { margin-top: 4px; color: rgba(255,255,255,.68); font-size: 11px; letter-spacing: .13em; text-transform: uppercase; }
.site-header nav { display: flex; align-items: center; gap: 28px; }
.site-header nav a { color: rgba(255,255,255,.82); font-size: 14px; font-weight: 600; text-decoration: none; }
.site-header nav a:hover { color: var(--gold); }

main { max-width: 1440px; margin: 0 auto; }
.briefing {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr);
  gap: clamp(30px, 6vw, 90px);
  align-items: end;
  padding: clamp(42px, 7vw, 84px) clamp(20px, 5vw, 72px) 42px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(10,22,40,.98), rgba(19,41,68,.94)),
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(255,255,255,.025) 18px 19px);
  position: relative;
  overflow: hidden;
}
.briefing::after {
  content: "EVYM";
  position: absolute;
  right: -35px;
  top: -45px;
  color: rgba(255,255,255,.035);
  font: 700 clamp(150px, 24vw, 340px)/1 "Oswald", sans-serif;
  letter-spacing: -.06em;
  pointer-events: none;
}
.briefing-copy, .next-card { position: relative; z-index: 1; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.briefing .eyebrow { color: var(--gold); }
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 850px;
  margin-bottom: 16px;
  font: 700 clamp(46px, 7vw, 92px)/.92 "Oswald", sans-serif;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
h1 span { color: var(--gold); }
.intro { max-width: 670px; margin-bottom: 0; color: rgba(255,255,255,.76); font-size: clamp(16px, 1.6vw, 20px); }
.next-card {
  padding: 22px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-top: 4px solid var(--gold);
  backdrop-filter: blur(10px);
}
.next-label { color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.next-card h2 { margin: 7px 0 12px; font: 600 26px/1.1 "Oswald", sans-serif; text-transform: uppercase; }
.next-meta { margin: 0; color: rgba(255,255,255,.72); font-size: 13px; }
.next-card button { margin-top: 17px; color: #fff; background: transparent; border: 0; padding: 0; font-weight: 700; cursor: pointer; }
.next-card button:hover { color: var(--gold); }

.subscribe-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px 40px;
  align-items: center;
  margin: 0 clamp(20px, 5vw, 72px);
  padding: 28px 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 5px solid var(--gold);
  box-shadow: var(--shadow);
  transform: translateY(18px);
  position: relative;
  z-index: 3;
}
.subscribe-panel h2 { margin-bottom: 5px; font: 600 28px/1.1 "Oswald", sans-serif; text-transform: uppercase; }
.subscribe-panel p { margin-bottom: 0; color: var(--muted); font-size: 14px; }
.subscribe-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.button, .icon-button, .filter {
  border: 0;
  cursor: pointer;
  font-weight: 700;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  text-decoration: none;
}
.button-primary { color: #fff; background: var(--red); }
.button-primary:hover { background: #8f0d14; }
.button-secondary { color: var(--navy); background: var(--gold-pale); border: 1px solid #efc77e; }
.button-secondary:hover { background: #ffe4b3; }
.button-quiet { min-height: 38px; color: var(--navy); background: transparent; border: 1px solid var(--line); }
.button[hidden] { display: none; }
.refresh-chip {
  grid-column: 1 / -1;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #4c5669;
  font-size: 12px;
}
.refresh-chip > span:first-child { color: var(--red); font-size: 18px; }

.calendar-shell { padding: 76px clamp(20px, 5vw, 72px) 58px; }
.calendar-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.calendar-toolbar h2 { margin: 0; font: 700 clamp(34px, 4vw, 52px)/1 "Oswald", sans-serif; text-transform: uppercase; }
.view-controls { display: flex; gap: 8px; }
.icon-button { width: 40px; height: 40px; color: #fff; background: var(--navy); font-size: 20px; }
.icon-button:hover { background: var(--red); }
.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 14px;
  color: var(--muted);
  font-size: 13px;
}
.filter { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 99px; }
.filter.active { color: #fff; background: var(--navy); border-color: var(--navy); }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.unit { background: var(--red); }
.dot.regiment { background: var(--regiment); }
.source-stamp { margin-left: auto; }

.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.month-panel { background: #fff; border: 1px solid var(--line); }
.weekday-row, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekday-row { color: #fff; background: var(--navy); }
.weekday-row span { padding: 11px 8px; font-size: 11px; font-weight: 700; letter-spacing: .11em; text-align: center; text-transform: uppercase; }
.day {
  min-height: 128px;
  padding: 9px 8px;
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.day:nth-child(7n) { border-right: 0; }
.day.outside { background: #f4f4f2; color: #9aa1ad; }
.day.today::after { content: ""; position: absolute; inset: 4px; border: 2px solid var(--gold); pointer-events: none; }
.day-number { display: inline-grid; place-items: center; width: 28px; height: 28px; font-weight: 700; font-size: 13px; }
.today .day-number { color: var(--navy); background: var(--gold); border-radius: 50%; }
.event-pill {
  display: block;
  width: 100%;
  margin: 4px 0 0;
  padding: 6px 7px;
  overflow: hidden;
  color: var(--navy);
  background: #fff3f3;
  border: 0;
  border-left: 4px solid var(--red);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  text-overflow: ellipsis;
  cursor: pointer;
}
.event-pill:hover { background: #ffe4e5; }
.event-pill.regiment { background: #f6eff8; border-left-color: var(--regiment); }
.event-pill.regiment:hover { background: #eadcef; }
.event-pill small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 600; }

.agenda { min-height: 400px; color: #fff; background: var(--navy); border-top: 5px solid var(--gold); }
.agenda-head { padding: 21px 20px 13px; border-bottom: 1px solid rgba(255,255,255,.12); }
.agenda .eyebrow { color: var(--gold); }
.agenda h3 { margin-bottom: 0; font: 600 28px/1 "Oswald", sans-serif; text-transform: uppercase; }
.agenda-item { display: grid; grid-template-columns: 48px 1fr; gap: 12px; width: 100%; padding: 16px 18px; color: #fff; background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,.1); text-align: left; cursor: pointer; }
.agenda-item:hover { background: rgba(255,255,255,.07); }
.agenda-date { color: var(--gold); font: 600 24px/1 "Oswald", sans-serif; text-align: center; }
.agenda-date small { display: block; margin-top: 5px; color: rgba(255,255,255,.55); font: 700 9px/1 "DM Sans", sans-serif; letter-spacing: .1em; }
.agenda-title { display: block; margin-bottom: 4px; font-size: 13px; line-height: 1.25; }
.agenda-time { color: rgba(255,255,255,.58); font-size: 11px; }
.empty-state { padding: 24px 20px; color: rgba(255,255,255,.64); font-size: 13px; }

.review-note {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 22px;
  align-items: start;
  margin: 0 clamp(20px, 5vw, 72px) 64px;
  padding: 28px;
  background: #fff7e8;
  border: 1px solid #efc77e;
}
.review-icon { display: grid; place-items: center; width: 54px; height: 54px; color: #fff; background: var(--red); border-radius: 50%; font: 700 28px/1 "Oswald", sans-serif; }
.review-note h2 { margin-bottom: 8px; font: 600 27px/1.15 "Oswald", sans-serif; text-transform: uppercase; }
.review-note p:last-child { margin-bottom: 0; color: var(--muted); }

footer { display: flex; justify-content: space-between; gap: 30px; padding: 32px clamp(20px, 5vw, 72px); color: rgba(255,255,255,.68); background: var(--navy); font-size: 12px; }
footer strong, footer span { display: block; }
footer strong { color: #fff; font: 600 18px/1.1 "Oswald", sans-serif; text-transform: uppercase; }
footer p { margin: 0; }

dialog {
  width: min(680px, calc(100% - 28px));
  max-height: calc(100vh - 34px);
  padding: 0;
  color: var(--ink);
  background: #fff;
  border: 0;
  box-shadow: 0 35px 90px rgba(0,0,0,.35);
  overflow: auto;
}
dialog::backdrop { background: rgba(10,22,40,.78); backdrop-filter: blur(4px); }
.dialog-accent { height: 8px; background: linear-gradient(90deg, var(--red) 0 22%, var(--gold) 22% 100%); }
dialog > .eyebrow, dialog > h2, dialog > dl, dialog > .quality-alert, dialog > .instructions, dialog > .dialog-actions { margin-left: 30px; margin-right: 30px; }
dialog > .eyebrow { margin-top: 29px; }
dialog > h2 { margin-bottom: 22px; font: 600 clamp(30px, 5vw, 44px)/1.05 "Oswald", sans-serif; text-transform: uppercase; }
.dialog-close { position: absolute; top: 20px; right: 20px; width: 38px; height: 38px; color: var(--navy); background: #f1f2f4; border: 0; border-radius: 50%; font-size: 24px; cursor: pointer; }
.event-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.event-facts div { padding: 13px 15px; background: #f5f6f7; }
.event-facts dt { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.event-facts dd { margin: 5px 0 0; font-size: 14px; font-weight: 600; }
.map-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}
.map-links[hidden] { display: none; }
.map-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  color: var(--navy);
  background: #fff;
  border: 1px solid #ccd2da;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.map-links a:hover { color: #fff; background: var(--navy); border-color: var(--navy); }
.map-links a:focus-visible { outline-color: var(--red); }
.quality-alert { padding: 13px 15px; color: #713d00; background: #fff1d9; border-left: 4px solid var(--gold); font-size: 13px; font-weight: 600; }
.instructions { margin-top: 22px; }
.instructions h3 { margin-bottom: 8px; font: 600 20px/1.1 "Oswald", sans-serif; text-transform: uppercase; }
.instructions p { white-space: pre-line; color: #3f4859; font-size: 14px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 0 30px; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 50; transform: translate(-50%, calc(100% + 40px)); padding: 11px 16px; color: #fff; background: var(--navy); box-shadow: var(--shadow); font-size: 13px; font-weight: 700; transition: transform .2s ease; }
.toast.show { transform: translate(-50%, 0); }

@media (max-width: 980px) {
  .briefing { grid-template-columns: 1fr; }
  .next-card { max-width: 480px; }
  .calendar-layout { grid-template-columns: 1fr; }
  .agenda { min-height: auto; }
  #agenda-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .draft-bar { display: block; text-align: center; }
  .draft-bar span { display: block; margin-top: 2px; }
  .site-header { min-height: 68px; }
  .site-header nav a:not(:last-child) { display: none; }
  .site-header nav { gap: 0; }
  .briefing { padding-top: 48px; }
  .briefing h1 { font-size: clamp(43px, 14vw, 68px); }
  .subscribe-panel { grid-template-columns: 1fr; padding: 23px 20px; }
  .subscribe-actions { justify-content: start; }
  .calendar-toolbar { align-items: start; }
  .view-controls .button-quiet { display: none; }
  .source-stamp { width: 100%; margin-left: 0; }
  .weekday-row { display: none; }
  .month-grid { display: block; }
  .day, .day.outside { display: none; }
  .day.has-events { display: grid; grid-template-columns: 45px 1fr; gap: 6px; min-height: 0; padding: 12px; border-right: 0; }
  .day.has-events .day-number { grid-row: 1 / span 5; align-self: start; color: var(--navy); background: var(--gold-pale); border-radius: 0; }
  .day.today::after { inset: 3px; }
  #agenda-list { display: block; }
  .review-note { grid-template-columns: 1fr; }
  footer { display: block; }
  footer p { margin-top: 18px; }
  .event-facts { grid-template-columns: 1fr; }
  dialog > .eyebrow, dialog > h2, dialog > dl, dialog > .quality-alert, dialog > .instructions, dialog > .dialog-actions { margin-left: 20px; margin-right: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; }
}
