/* ================================================================
   /vote/ — plan your vote. Loads after css/styles.css and reuses its
   tokens, buttons, form fields and footer. The one loud thing here is
   the wall-calendar sheet; everything around it stays quiet.
   ================================================================ */

.vp {
  --paper: #fffdf7;
  --rule: #e3d8bb;
  --off: #b3a88c;
  --marker: #b9852c;
  background: var(--wheat);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.vp :focus-visible {
  outline: 3px solid var(--field);
  outline-offset: 2px;
}

/* ---- Page column ---- */

.vp-main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 16px 4rem;
}

.vp-intro { padding: 1.5rem 0 1.75rem; }

.vp h1 {
  font-size: clamp(2.5rem, 9vw, 4.4rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
  text-wrap: balance;
}

.vp-lede {
  font-size: 1.12rem;
  max-width: 36em;
  margin: 0;
}

.vp-referral {
  display: inline-block;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 1.2rem;
}

/* ---- The calendar sheet ---- */

.vp-sheet {
  position: relative;
  background: var(--paper);
  border-radius: 6px;
  box-shadow:
    0 1px 0 var(--rule),
    0 18px 40px -18px rgba(23, 43, 69, 0.35);
  padding: 0 0 1.4rem;
  overflow: hidden;
}

/* The header band is the calendar's binding: two punched holes to hang it by. */
.vp-sheet-head {
  background: var(--navy);
  color: var(--white);
  padding: 1.6rem 1.25rem 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  background-image:
    radial-gradient(circle at 18% 0.8rem, var(--wheat) 0.34rem, transparent 0.38rem),
    radial-gradient(circle at 82% 0.8rem, var(--wheat) 0.34rem, transparent 0.38rem);
}
.vp-sheet-head h2 {
  color: var(--white);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 0;
}
.vp-sheet-note {
  margin: 0;
  font-size: 0.9rem;
  color: #c9d3e0;
}

.vp-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 0 0.9rem;
  border-left: 1px solid var(--rule);
}

.vp-dow {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-soft);
  padding: 0.7rem 0.45rem 0.4rem;
  border-right: 1px solid var(--rule);
  border-bottom: 2px solid var(--navy);
}

.vp-off,
.vp-day {
  position: relative;
  min-height: 5.2rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.35rem 0.45rem;
  text-align: left;
}

.vp-off {
  color: var(--off);
  font-weight: 600;
  font-size: 1rem;
}
.vp-blank { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(179, 168, 140, 0.18) 6px 7px); }

.vp-day {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  background: transparent;
  border-top: 0;
  border-left: 0;
  border-radius: 0;
  font: inherit;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.15s ease;
}
.vp-day:hover { background: rgba(217, 164, 65, 0.14); }
.vp-day:focus-visible { outline-offset: -3px; }

.vp-num {
  position: relative;
  isolation: isolate;
  font-size: clamp(1.5rem, 5.4vw, 2.6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.vp-tag {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--field-deep);
}

.vp-day:disabled {
  cursor: default;
  color: var(--off);
}
.vp-day:disabled:hover { background: transparent; }
.vp-day:disabled .vp-tag { color: var(--off); }
.vp-day.is-today .vp-tag { color: var(--navy); }

/* The marker circle, drawn by js/vote.js into each voting day. */
.vp-ring {
  position: absolute;
  z-index: -1;
  top: -0.3em;
  left: -0.32em;
  width: calc(100% + 0.64em);
  height: calc(100% + 0.6em);
  pointer-events: none;
  overflow: visible;
  opacity: 0;
}
.vp-ring path {
  fill: none;
  stroke: var(--marker);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.vp-day[aria-pressed="true"] .vp-ring { opacity: 1; }
.vp-day[aria-pressed="true"] .vp-ring.is-drawing path {
  animation: vp-draw 0.55s cubic-bezier(0.55, 0.1, 0.35, 1) both;
}
@keyframes vp-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

/* ---- Time of day ---- */

.vp-when {
  border: 0;
  margin: 1.3rem 0.9rem 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.vp-when legend {
  float: left;
  width: 100%;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.55rem;
}
.vp-when label {
  position: relative;
  padding: 0.5rem 1.05rem;
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
}
.vp-when input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.vp-when label:has(input:checked) {
  background: var(--navy);
  color: var(--white);
}
.vp-when label:has(input:focus-visible) {
  outline: 3px solid var(--field);
  outline-offset: 2px;
}

/* ---- Your plan ---- */

.vp-plan {
  margin-top: 1.5rem;
  background: var(--navy);
  color: #d8e0ea;
  border-radius: 6px;
  padding: 1.8rem 1.25rem 1.6rem;
}
.vp-plan-line {
  color: var(--white);
  font-size: clamp(1.5rem, 4.6vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 1.4rem;
  text-wrap: balance;
}
.vp-plan-line:focus { outline: none; }
.vp-plan h3 {
  color: var(--white);
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}
.vp-plan p { margin: 0 0 0.8rem; }
.vp-actions {
  display: grid;
  gap: 1.4rem;
}
.vp-action + .vp-action {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 1.3rem;
}
.vp-cal-links,
.vp-share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.vp-btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--white);
}
.vp-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: var(--white); }
.vp-plan .btn:focus-visible { outline-color: var(--gold); }
.vp-share-status {
  font-weight: 600;
  color: var(--gold);
}

@media (min-width: 44em) {
  .vp-plan { padding: 2.2rem 2rem 2rem; }
  .vp-actions { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .vp-action + .vp-action {
    border-top: 0;
    padding-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
    padding-left: 2rem;
  }
}

/* ---- Reminder ---- */

.vp-remind {
  margin-top: 2.8rem;
  padding-top: 2.2rem;
  border-top: 2px solid var(--navy);
}
.vp-remind h2,
.vp-need h2,
.vp-more h2 { font-size: clamp(1.45rem, 3.6vw, 1.9rem); }
.vp-remind > p { max-width: 34em; }
.vp-remind-form { max-width: 28rem; }
.vp-remind-form input[type="text"],
.vp-remind-form input[type="email"],
.vp-remind-form input[type="tel"] { background: var(--paper); }

/* ---- What you'll need ---- */

.vp-need,
.vp-more {
  margin-top: 2.8rem;
  padding-top: 2.2rem;
  border-top: 1px solid var(--wheat-deep);
}
.vp-need-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  max-width: 38em;
  overflow-wrap: anywhere;
}
.vp-need-list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.9rem;
}
.vp-need-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--gold-deep);
  border-radius: 2px;
}
.vp-official { font-size: 0.95rem; color: var(--ink-soft); }

.site-footer .footer-fine a { color: var(--gold); }

/* ---- Phones (em so enlarged text still gets this layout) ---- */

@media (max-width: 30em) {
  .vp-grid { margin: 0 0.5rem; }
  .vp-off,
  .vp-day { min-height: 4.3rem; padding: 0.3rem 0.28rem; }
  .vp-off { font-size: 0.85rem; }
  .vp-dow { padding: 0.55rem 0.28rem 0.35rem; font-size: 0.72rem; }
  .vp-tag { font-size: 0.6rem; }
  .vp-num { font-size: 1.3rem; letter-spacing: -0.05em; }
  .vp-when { margin: 1.2rem 0.5rem 0; }
  .vp-sheet-head { padding: 1.5rem 0.9rem 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .vp-day[aria-pressed="true"] .vp-ring.is-drawing path { animation: none; }
  .vp-day { transition: none; }
}
