/* Calhoun Yard Sales: community bulletin board
   Brand: embroidered shield patch. Vintage-modern: cream paper, navy stitching,
   harvest yellow, barn red, mitten green. See /brand for the full kit. */
:root {
  /* Brand (sampled from the patch) */
  --navy: #132A52;
  --navy-800: #1C3766;
  --navy-900: #0C1D3B;
  --yellow: #F1B70F;
  --yellow-300: #F7CD4E;
  --yellow-100: #FCEFC4;
  --yellow-50: #FEF8E6;
  /* Soft butter yellows for large areas (rich --yellow stays for logo and small accents) */
  --butter: #FCF3D6;
  --butter-2: #FBEFC4;
  --butter-box: #FDF4D3;
  --butter-hover: #F7E3A1;
  --red: #C11519;
  --red-700: #9C1014;
  --red-50: #FDECEC;
  --green: #276B32;
  --footer-green: #1A3A2A; /* CalCo forest green, footer only */
  --green-100: #E0EFDD;

  /* Neutrals */
  --paper: #FBF6EA;
  --paper-deep: #F3EBD8;
  --card: #FFFDF8;
  --ink: #1E2433;
  --ink-muted: #4B5263;
  --ink-faint: #656B7B;
  --line: #E4D8BE;
  --line-strong: #CDBB94;
  --white: #ffffff;
  --stitch: rgba(19, 42, 82, 0.28);

  /* Legacy aliases (kept so nothing unstyled slips through) */
  --green-900: var(--navy);
  --green-800: var(--navy);
  --green-700: var(--navy-800);
  --green-50: var(--yellow-50);
  --cream: var(--paper);
  --cream-dark: var(--paper-deep);
  --danger: var(--red);

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(19, 42, 82, 0.06), 0 3px 10px rgba(19, 42, 82, 0.06);
  --shadow-lg: 0 2px 0 rgba(19, 42, 82, 0.08), 0 10px 26px rgba(19, 42, 82, 0.12);
  --font: "Nunito Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-head: "Oswald", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --font-script: "Damion", "Brush Script MT", cursive;
  --max: 740px;
  --max-wide: 1000px;
  --paper-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .36 0 0 0 0 .29 0 0 0 0 .14 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image: var(--paper-grain);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: 0.01em; color: var(--navy); }

a {
  color: var(--navy);
  text-decoration-color: rgba(193, 21, 25, 0.55);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { color: var(--red-700); text-decoration-color: var(--red); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--navy);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

.wrap {
  width: min(100% - 2rem, var(--max-wide));
  margin-inline: auto;
}
.narrow { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

/* --- Header --- */
.site-header {
  background: var(--card);
  background-image: var(--paper-grain);
  border-top: 6px solid var(--navy);
  position: relative;
  padding: 0.7rem 0 0.8rem;
  box-shadow: 0 1px 0 var(--line);
}
.site-header::after {
  /* stitched hem */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 5px;
  border-bottom: 2px dashed var(--stitch);
  pointer-events: none;
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.25rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--navy);
  text-decoration: none;
}
.brand:hover { color: var(--navy); }
.brand picture { display: block; line-height: 0; }
.brand-patch {
  display: block;
  width: 92px;
  height: auto;
  filter: drop-shadow(0 2px 2px rgba(12, 29, 59, 0.22));
  transition: transform 0.2s ease;
}
.brand:hover .brand-patch { transform: rotate(-3deg) scale(1.03); }
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.1;
}
.brand-script {
  font-family: var(--font-script);
  font-size: 1.7rem;
  color: var(--navy);
  line-height: 1;
}
.brand-sub {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
}
.brand-admin .brand-patch { width: 48px; }

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.nav a {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  border: 2px solid transparent;
}
.nav a:hover { background: var(--yellow-100); color: var(--navy); }
.nav a.is-active {
  background: var(--navy);
  color: #fff;
  outline: 1.5px dashed rgba(255, 255, 255, 0.55);
  outline-offset: -5px;
}
.nav a.nav-cta {
  background: var(--red);
  color: #fff;
  outline: 1.5px dashed rgba(255, 255, 255, 0.6);
  outline-offset: -5px;
}
.nav a.nav-cta:hover { background: var(--red-700); color: #fff; }
.nav a.nav-cta.is-active { background: var(--red-700); }

@media (max-width: 640px) {
  .site-header { padding: 0.55rem 0 0.7rem; }
  .brand { gap: 0.6rem; }
  .brand-patch { width: 56px; }
  .brand-script { font-size: 1.35rem; }
  .brand-sub { font-size: 0.7rem; letter-spacing: 0.12em; }
  .header-inner { gap: 0.5rem; }
  .nav { width: 100%; justify-content: flex-start; gap: 0.25rem; }
  .nav a { font-size: 0.92rem; padding: 0.35rem 0.75rem; }
  .nav a.nav-cta { margin-left: auto; }
}

/* --- Main --- */
main#main {
  flex: 1;
  padding: 2rem 0 3.5rem;
}
.page-hero { margin-bottom: 1.6rem; }
.kicker {
  margin: 0 0 0.1rem;
  font-family: var(--font-script);
  font-size: 1.65rem;
  line-height: 1.1;
  color: var(--red);
}
.page-hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--navy);
}
.page-hero p:not(.kicker) {
  margin: 0;
  color: var(--ink-muted);
  max-width: 38rem;
}

.page-hero.has-badge { display: flow-root; }
.hero-badge {
  float: right;
  width: 120px;
  height: auto;
  margin: -0.25rem 0 0.5rem 1rem;
  transform: rotate(7deg);
  filter: drop-shadow(0 3px 4px rgba(12, 29, 59, 0.2));
}
@media (max-width: 560px) {
  .hero-badge { width: 84px; margin-left: 0.5rem; }
}

.stitch-divider {
  border: 0;
  height: 0;
  border-top: 2px dashed var(--line-strong);
  margin: 2.5rem 0 0;
  position: relative;
  overflow: visible;
}

/* Stitched card treatment (inner dashed line, like the patch hem) */
.filters,
.sale-card,
.detail-card,
.form-card,
.prose,
.email-sale-card,
.updates-signup-home,
.admin-card,
.blast-status-card,
.blast-preview-card,
.blast-actions-card,
.blast-cron-card,
.empty-state {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  outline: 1.5px dashed var(--stitch);
  outline-offset: -8px;
}

/* --- Flash --- */
.flash {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.flash-success {
  background: var(--green-100);
  color: #1D5226;
  border: 1.5px solid #A9CFA5;
}
.flash-error {
  background: var(--red-50);
  color: var(--red-700);
  border: 1.5px solid #F0B8B9;
}

/* --- Filters --- */
.filters {
  padding: 1.15rem 1.25rem 1.25rem;
  margin-bottom: 1.6rem;
}
.quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.38rem 0.95rem;
  border-radius: 999px;
  background: var(--yellow-50);
  color: var(--navy);
  border: 2px solid var(--navy);
  text-decoration: none;
  outline: 1.5px dashed rgba(19, 42, 82, 0.35);
  outline-offset: -6px;
}
.pill:hover { background: var(--yellow-100); color: var(--navy); }
.pill.is-active {
  background: var(--navy);
  color: #fff;
  outline-color: rgba(255, 255, 255, 0.6);
}
.filters-form {
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 560px) {
  .filters-form {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }
}

/* --- Fields --- */
.field label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  background: var(--white);
  color: var(--ink);
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23132A52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
}
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: var(--navy-800); }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--navy); background-color: var(--white); }
.field input::placeholder,
.field textarea::placeholder { color: #8A8F9C; }
.field textarea { min-height: 120px; resize: vertical; }
.field-hint {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin: 0.3rem 0 0;
}
.field-row { display: grid; gap: 0.85rem; }
@media (min-width: 480px) {
  .field-row-2 { grid-template-columns: 1fr 1fr; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.66rem 1.3rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--navy);
  color: #fff;
  outline: 1.5px dashed rgba(255, 255, 255, 0.5);
  outline-offset: -6px;
}
.btn-primary:hover { background: var(--navy-900); color: #fff; }
.btn-accent {
  background: var(--red);
  color: #fff;
  outline: 1.5px dashed rgba(255, 255, 255, 0.6);
  outline-offset: -6px;
  box-shadow: 0 2px 0 var(--red-700);
}
.btn-accent:hover { background: var(--red-700); color: #fff; }
.btn-secondary {
  background: var(--butter-2);
  color: var(--navy);
  border-color: var(--navy);
}
.btn-secondary:hover { background: var(--butter-hover); color: var(--navy); }
.btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.btn-block { width: 100%; }
.btn-lg { padding: 0.85rem 1.6rem; font-size: 1.1rem; }

.actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  align-items: center;
  justify-content: space-between;
}
.results-count {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* --- Sale cards --- */
.sale-list { display: grid; gap: 1rem; }
.sale-card {
  padding: 1.25rem 1.4rem 1.3rem;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
  display: block;
  text-decoration: none;
  color: inherit;
  border-left: 6px solid var(--yellow);
}
a.sale-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--line-strong);
  border-left-color: var(--red);
  color: inherit;
  transform: translateY(-1px);
}
.sale-card.is-past { opacity: 0.65; border-left-color: var(--line-strong); }
.sale-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}
.sale-card h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: 0.01em;
}
a.sale-card:hover h2 { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Patch-style badge */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--navy);
  border: 2px solid var(--navy);
  outline: 1.2px dashed rgba(19, 42, 82, 0.5);
  outline-offset: -5px;
  white-space: nowrap;
}
.badge-past {
  background: var(--paper-deep);
  color: var(--ink-faint);
  border-color: var(--line-strong);
  outline-color: rgba(101, 107, 123, 0.4);
}
.badge-detail { margin-bottom: 0.85rem; }

.sale-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.98rem;
  color: var(--ink-muted);
  margin-bottom: 0.65rem;
}
.sale-meta span { display: flex; gap: 0.45rem; align-items: baseline; }
.sale-meta .icon { flex-shrink: 0; }
.sale-desc { margin: 0; color: var(--ink); font-size: 1rem; }
.sale-contact {
  margin: 0.7rem 0 0;
  padding-top: 0.6rem;
  border-top: 1.5px dashed var(--line);
  font-size: 0.9rem;
  color: var(--ink-faint);
}

/* --- Empty state --- */
.empty-state {
  text-align: center;
  padding: 2.75rem 1.5rem;
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.empty-state h2 { margin: 0 0 0.5rem; font-size: 1.6rem; text-transform: uppercase; }
.empty-state p {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
  max-width: 28rem;
  margin-inline: auto;
}

/* --- Detail --- */
.detail-card { padding: 1.75rem 1.75rem 1.6rem; border-top: 6px solid var(--yellow); }
.detail-card h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--navy);
}
.detail-meta {
  display: grid;
  gap: 0.7rem;
  margin: 0 0 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px dashed var(--line);
}
.detail-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.5rem;
  font-size: 1.02rem;
}
.detail-row dt {
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--red);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-top: 0.12rem;
}
.detail-row dd { margin: 0; }
.detail-body { font-size: 1.06rem; }
.detail-body p { margin: 0 0 0.75rem; }
.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

/* --- Forms --- */
.form-card { padding: 1.6rem 1.6rem 1.5rem; }
.form-card .field { margin-bottom: 1.1rem; }
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.required::after { content: " *"; color: var(--red); }
.error-list {
  background: var(--red-50);
  border: 1.5px solid #F0B8B9;
  color: var(--red-700);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.25rem;
}
.error-list ul { margin: 0.35rem 0 0; padding-left: 1.25rem; }

/* --- About / prose --- */
.prose { padding: 1.75rem; }
.prose h2 {
  margin: 1.75rem 0 0.4rem;
  font-size: 1.45rem;
  text-transform: uppercase;
  color: var(--navy);
}
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 0.9rem; color: var(--ink-muted); }
.prose ul { color: var(--ink-muted); margin: 0 0 0.9rem; padding-left: 1.25rem; }
.prose li::marker { color: var(--red); }

.calco-callout {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  background: var(--paper);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.calco-callout a { font-weight: 700; }

/* --- Footer --- */
.site-footer {
  background: var(--footer-green);
  color: rgba(255, 255, 255, 0.86);
  padding: 2.4rem 0 1.25rem;
  margin-top: auto;
  position: relative;
  border-top: 6px solid var(--yellow);
}
.site-footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 7px;
  border-top: 2px dashed rgba(241, 183, 15, 0.55);
}
.site-footer a { color: #fff; }
.footer-inner {
  display: grid;
  gap: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1.5px dashed rgba(255, 255, 255, 0.2);
}
@media (min-width: 600px) {
  .footer-inner { grid-template-columns: 1.5fr 1fr; }
}
.footer-patch {
  float: left;
  width: 64px;
  height: auto;
  margin: 0 1rem 0.5rem 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}
.footer-brand strong {
  display: block;
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--yellow);
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.55rem;
}
.footer-brand p { margin: 0; font-size: 0.95rem; line-height: 1.55; max-width: 28rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.45rem; }
.footer-links a {
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
}
.footer-links a:hover { color: var(--yellow); text-decoration: underline; }
.footer-bottom {
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
}
.footer-bottom > p { margin: 0; font-size: 0.82rem; opacity: 0.75; }

/* Quiet CalCo Card credit (footer only) */
.footer-powered {
  margin: 0;
  font-size: 0.72rem;
  opacity: 0.55;
  letter-spacing: 0.01em;
}
.footer-powered a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 400;
}
.footer-powered a:hover { opacity: 1; text-decoration: underline; color: #fff; }
.footer-powered-logo {
  display: inline-block;
  height: 20px;
  width: auto;
  box-sizing: content-box;
  padding: 2px 5px;
  background: #FBF7EC;
  border-radius: 4px;
  vertical-align: middle;
}

/* --- Ads --- */
.ad-slot {
  background: var(--card);
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 0.95rem 1.15rem;
  margin-bottom: 1.25rem;
  position: relative;
}
.ad-slot-strip { background: var(--yellow-50); border-color: var(--yellow-300); border-style: dashed; }
.ad-slot-footer { margin-bottom: 0; background: var(--card); border-color: var(--line-strong); }
.ad-footer-wrap {
  background: var(--paper-deep);
  border-top: 1px solid var(--line);
  padding: 1rem 0;
}
.ad-sponsor {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-bottom: 0.35rem;
}
.ad-link {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.ad-link:hover { color: inherit; }
.ad-link:hover .ad-title { color: var(--red-700); text-decoration: underline; }
.ad-image { max-height: 64px; max-width: 160px; object-fit: contain; border-radius: 6px; }
.ad-copy { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; flex: 1; }
.ad-title { color: var(--navy); font-size: 1.02rem; }
.ad-body { color: var(--ink-muted); font-size: 0.93rem; }

/* --- Admin --- */
.admin-body main#main { padding-bottom: 3.5rem; }
.admin-section { margin-bottom: 2.25rem; }
.admin-section-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.admin-section-head h2 {
  margin: 0;
  font-size: 1.35rem;
  text-transform: uppercase;
  color: var(--navy);
}
.admin-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  height: 1.8rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--navy);
  border: 2px solid var(--navy);
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
}
.admin-list { display: grid; gap: 0.85rem; }
.admin-card { padding: 1.1rem 1.25rem; display: grid; gap: 0.85rem; }
@media (min-width: 720px) {
  .admin-card { grid-template-columns: 1fr auto; align-items: start; }
}
.admin-card.is-past { opacity: 0.7; }
.admin-card h2 { margin: 0; font-size: 1.2rem; color: var(--navy); }
.admin-card-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.admin-card-actions form { display: inline; margin: 0; }
.btn-sm { padding: 0.42rem 0.9rem; font-size: 0.88rem; }
.btn-danger {
  background: #fff;
  color: var(--red-700);
  border: 2px solid #E9A3A5;
}
.btn-danger:hover { background: var(--red-50); color: var(--red-700); border-color: var(--red); }
.empty-state-sm { padding: 1.25rem 1rem; }
.empty-state-sm p { margin: 0; color: var(--ink-muted); }
.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font) !important;
  font-size: 0.98rem !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--ink) !important;
  cursor: pointer;
}
.checkbox-label input { width: auto; accent-color: var(--navy); }
.admin-body code,
.form-card code {
  font-size: 0.85em;
  background: var(--paper-deep);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

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

/* --- Send this sale --- */
.email-sale-card { margin-top: 1.5rem; padding: 1.4rem 1.6rem; }
.email-sale-card h2 { margin: 0 0 0.3rem; font-size: 1.45rem; text-transform: uppercase; }
.email-sale-lead { margin: 0 0 1rem; color: var(--ink-muted); font-size: 0.98rem; }
.email-sale-form {
  box-shadow: none;
  border: none;
  outline: none;
  padding: 0;
  background: transparent;
}
.privacy-note { margin: 0.85rem 0 0; font-size: 0.85rem; color: var(--ink-muted); line-height: 1.45; }

/* --- Updates signup (home) --- */
.updates-signup-home {
  margin: 2.25rem 0 0.5rem;
  padding: 1.5rem 1.6rem;
  background: var(--yellow-50);
  border-color: #EBD9A0;
}
.updates-signup-home h2 { margin: 0 0 0.3rem; font-size: 1.55rem; text-transform: uppercase; }
.updates-signup-home > p { margin: 0 0 1rem; color: var(--ink-muted); }
.updates-signup-fields { display: grid; gap: 0.85rem; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .updates-signup-submit .btn { white-space: nowrap; }
}
@media (min-width: 720px) {
  .updates-signup-home .updates-signup-fields {
    grid-template-columns: 1fr 1fr 1fr;
    align-items: end;
  }
}
.updates-signup-form .field { margin-bottom: 0; }

/* Updates signup (footer, compact) */
.updates-signup-footer { color: rgba(255, 255, 255, 0.9); }
.updates-signup-footer-title {
  margin: 0 0 0.25rem;
  color: #fff;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.updates-signup-footer-lead { margin: 0 0 0.75rem; font-size: 0.9rem; opacity: 0.85; }
.updates-signup-footer .field label { color: var(--yellow-300); }
.updates-signup-footer .field input,
.updates-signup-footer .field select { border-color: rgba(255, 255, 255, 0.25); }
.updates-signup-footer .privacy-note { color: rgba(255, 255, 255, 0.7); }
.updates-signup-footer .updates-signup-fields { grid-template-columns: 1fr; }
.updates-signup-footer .btn-primary {
  background: var(--butter-2);
  color: var(--navy);
  outline-color: rgba(19, 42, 82, 0.45);
}
.updates-signup-footer .btn-primary:hover { background: var(--butter-hover); color: var(--navy); }
@media (min-width: 900px) {
  .footer-inner { grid-template-columns: 1.4fr 1.4fr 0.8fr; }
}

/* --- Admin tables --- */
.admin-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.admin-table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px dashed var(--line);
  vertical-align: top;
}
.admin-table th {
  background: var(--navy);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  border-bottom: 3px solid var(--yellow);
}
.admin-table tbody tr:nth-child(even) td { background: rgba(251, 246, 234, 0.7); }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table a { color: var(--navy); }

/* --- Consent --- */
.field-consent { margin-top: 0.75rem; }
.consent-label {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-family: var(--font) !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 0.93rem !important;
  line-height: 1.45;
  cursor: pointer;
  color: var(--ink) !important;
}
.consent-label input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--navy);
}
.updates-signup-footer .consent-label { color: rgba(255, 255, 255, 0.9) !important; }
.updates-signup-footer .consent-label input[type="checkbox"] { accent-color: var(--yellow); }

/* --- Admin blasts --- */
.blast-status-card,
.blast-preview-card,
.blast-actions-card,
.blast-cron-card { padding: 1.35rem 1.6rem; margin-bottom: 1.25rem; }
.blast-status-card h2,
.blast-preview-card h2,
.blast-actions-card h2,
.blast-cron-card h2 { margin: 0 0 0.75rem; font-size: 1.35rem; text-transform: uppercase; }
.blast-status-grid { display: grid; gap: 1rem; }
@media (min-width: 700px) {
  .blast-status-grid { grid-template-columns: 1fr 1.4fr; }
}
.blast-meta { margin: 0.25rem 0; color: var(--ink-muted); font-size: 0.97rem; }
.blast-badge {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  border: 2px solid currentColor;
}
.blast-badge-ok { background: var(--green-100); color: #1D5226; }
.blast-badge-partial { background: var(--yellow-100); color: #6B4E00; }
.blast-badge-empty { background: var(--paper-deep); color: var(--ink-muted); }
.blast-badge-error { background: var(--red-50); color: var(--red-700); }
.blast-errors { margin: 0.5rem 0 0; padding-left: 1.2rem; color: var(--red-700); font-size: 0.88rem; }
.blast-listing-preview { margin: 0.5rem 0 1rem; padding-left: 1.2rem; }
.blast-body-preview { margin-top: 0.5rem; }
.blast-body-preview pre {
  white-space: pre-wrap;
  background: var(--paper);
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  max-height: 240px;
  overflow: auto;
}
.blast-cron-line {
  background: var(--navy);
  color: var(--yellow-100);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.85rem;
}
.text-danger { color: var(--red-700); }
.blast-status-empty { color: var(--ink-muted); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

.site-footer code {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

/* --- Pre-launch additions (legal links, unsubscribe, drafts) --- */
.updates-signup-submit-row { margin-top: 0.85rem; }
.updates-signup-footer .updates-signup-submit-row .btn { width: 100%; }
.consent-label + .consent-label { margin-top: 0.7rem; }
.consent-label-optional { color: var(--ink-muted) !important; }
.consent-links-line { margin: 0.5rem 0 0; font-size: 0.85rem; color: var(--ink-muted); }
.consent-links-line a { color: var(--navy); font-weight: 700; }
.updates-signup-footer .consent-links-line { color: rgba(255, 255, 255, 0.75); }
.updates-signup-footer .consent-links-line a { color: var(--yellow-300); }
.post-terms-line { margin: 0.25rem 0 1rem; }
.footer-inner-nosignup { }
@media (min-width: 900px) {
  .footer-inner.footer-inner-nosignup { grid-template-columns: 1.5fr 1fr; }
}
.footer-legal { margin: 0.35rem 0; font-size: 0.85rem; }
.footer-legal a { text-decoration: underline; }
.header-flash { margin-top: 1rem; }
.legal-draft {
  margin: 0 0 1.5rem;
  padding: 0.9rem 1.1rem;
  border: 2px dashed var(--red);
  border-radius: var(--radius-sm);
  background: #FFF4E5;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.5;
}
.legal-placeholder {
  background: #FFF1B8;
  padding: 0 0.25rem;
  border-radius: 4px;
  font-style: italic;
}
.legal-prose h3 { margin: 1.1rem 0 0.35rem; font-size: 1.05rem; }
.unsubscribe-card {
  margin: 2rem 0;
  padding: 2rem 1.6rem;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.unsubscribe-card h1 { margin: 0.25rem 0 0.75rem; }
.unsubscribe-undo { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.unsubscribe-undo p { margin: 0 0 0.5rem; color: var(--ink-muted); }
.admin-table tr.is-unsubscribed td { opacity: 0.6; }
.muted { color: var(--ink-faint); }
.blast-send-form { display: flex; flex-direction: column; gap: 0.4rem; }

.field label.consent-label { display: flex; }
.consent-label > span { flex: 1; min-width: 0; }
