:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #5f5e5a;
  --border: #e4e2db;
  --graphite: #5f5e5a;
  --graphite-hover: #45443f;

  --fresh-bg: #eaf3de;
  --fresh-text: #173404;
  --aging-bg: #faeeda;
  --aging-text: #412402;
  --overdue-bg: #fcebeb;
  --overdue-text: #501313;
  --discontinued-bg: #e6e5e1;
  --discontinued-text: #55534d;

  --accent: #c2540c;
  --accent-dark: #9c4009;
  --accent-bg: #fbe9db;
  --navy: #14213d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

main { max-width: 1040px; margin: 0 auto; padding: 0 1.5rem 4rem; }

a { color: inherit; text-decoration: none; }

/* Header */
.site-header-bg { background: linear-gradient(100deg, #f5b942 0%, #e8752c 30%, #c8432f 58%, #7d2a4a 82%, #2e1a3d 100%); }
.site-header {
  display: flex;
  flex-wrap: wrap;
  row-gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}
.site-title { font-size: 26px; font-weight: 700; display: flex; align-items: center; gap: 12px; color: #fff; letter-spacing: -0.01em; }
.site-logo-img { flex-shrink: 0; width: 116px; height: 116px; border-radius: 12px; }
.site-nav { display: flex; flex-wrap: wrap; row-gap: 0.5rem; align-items: center; }
.site-nav a { margin-left: 1.75rem; font-size: 15px; font-weight: 600; color: #fff; opacity: 0.92; }
.site-nav a:hover { opacity: 1; text-decoration: underline; }
.site-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 1.75rem;
  padding: 10px 16px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.site-search svg { width: 17px; height: 17px; color: var(--text-secondary); flex-shrink: 0; }
.site-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  width: 200px;
}
.site-search input::placeholder { color: var(--text-secondary); }
.site-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  z-index: 50;
}
.site-search-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.site-search-dropdown a:hover, .site-search-dropdown a.is-active { background: var(--accent-bg); }
.site-search-dropdown a .placeholder-icon { width: 22px; height: 22px; flex-shrink: 0; }
.site-search-dropdown-empty { padding: 12px 14px; font-size: 13px; color: var(--text-secondary); }

.site-footer-bg { background: var(--accent-bg); border-top: 1px solid var(--border); }
.site-footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  font-size: 12px;
  color: var(--navy);
}
.footer-nav { margin-bottom: 0.75rem; }
.footer-nav a { margin-right: 1.25rem; font-size: 13px; font-weight: 700; color: var(--navy); }
.footer-nav a:hover { color: var(--accent-dark); }

/* About page */
.about-page h1 { margin-top: 1.5rem; }
.about-image { margin-top: 1rem; border-radius: 12px; overflow: hidden; }
.about-image img { width: 100%; display: block; }
.about-body { margin-top: 1.5rem; font-size: 15px; }
.about-body p { margin: 0 0 1rem; }

/* Admin */
.admin-form { display: flex; flex-direction: column; gap: 16px; max-width: 560px; margin: 1rem 0 2rem; }
.admin-advanced {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 16px;
}
.admin-advanced[open] { padding-bottom: 16px; }
.admin-advanced summary {
  cursor: pointer;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  list-style: none;
}
.admin-advanced summary::-webkit-details-marker { display: none; }
.admin-advanced summary::before { content: '\25B8  '; }
.admin-advanced[open] summary::before { content: '\25BE  '; }
.admin-advanced > *:not(summary) { margin-top: 16px; }
.admin-form-buttons { display: flex; gap: 10px; align-items: center; }
.admin-form label { display: flex; flex-direction: column; gap: 5px; font-size: 15px; font-weight: 600; color: var(--text); }
.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form input[type="date"],
.admin-form input[type="month"],
.admin-form input[type="number"],
.admin-form input[type="file"],
.admin-form select,
.admin-form textarea {
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-weight: 400;
}
.admin-form textarea { resize: vertical; }
.admin-form-section {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 2rem 0 -6px;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.admin-form-section:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.date-precision-radios { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.date-precision-radios label { display: flex; flex-direction: row; align-items: center; gap: 5px; font-size: 14px; font-weight: 400; color: var(--text-secondary); }
.date-precision-row { display: flex; gap: 8px; align-items: center; }
.date-precision-clear {
  font-size: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--overdue-text);
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
}
.date-precision-clear:hover { border-color: var(--overdue-text); }
.checkbox-label { flex-direction: row !important; align-items: center; gap: 8px !important; }
.price-currency-row { display: flex; align-items: center; gap: 16px; }
.price-currency-row input[type="text"] { flex: 1; max-width: 160px; }
.admin-btn {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--graphite);
  background: var(--graphite);
  color: #fff;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
}
.admin-btn:hover { background: var(--graphite-hover); }
.form-error { color: var(--overdue-text); font-size: 13px; }
.admin-list { margin: 1rem 0; max-width: 720px; }
.admin-fact-list { margin: 1rem 0; max-width: 720px; display: flex; flex-direction: column; gap: 8px; }
.admin-fact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.admin-fact-row p { margin: 0; font-size: 14px; flex: 1; }
.admin-fact-textarea { flex: 1; font-size: 14px; font-family: inherit; padding: 8px; border: 1px solid var(--border); border-radius: 6px; resize: vertical; }
.admin-fact-row button { flex-shrink: 0; }
.admin-search-input {
  display: block;
  width: 100%;
  max-width: 400px;
  font-size: 15px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 1rem 0;
  font-family: inherit;
}
.admin-table-row--featured { background: #fdf6d8; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table td a { color: var(--text); text-decoration: underline; }
.admin-table td a:hover { color: var(--accent); }
.admin-table-photo { width: 40px; }
.admin-table-photo img { width: 32px; height: 32px; object-fit: cover; border-radius: 6px; }
.admin-table-photo-placeholder { width: 32px; height: 32px; border-radius: 6px; background: #f6f5f1; display: inline-block; }
.admin-row-actions { white-space: nowrap; }
.admin-row-actions button {
  font-size: 12px;
  border: 1px solid var(--border);
  background: transparent;
  border-radius: 6px;
  padding: 4px 10px;
  margin-right: 6px;
  cursor: pointer;
}
.admin-row-actions button:hover { border-color: var(--graphite); }

.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin: 1rem 0 1.5rem; flex-wrap: wrap; gap: 12px; }
.admin-tabs { display: flex; gap: 8px; }
.admin-tab-btn {
  font-size: 13px;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
}
.admin-tab-btn.active { background: #f6f5f1; color: var(--text); font-weight: 500; }

.admin-subfield { display: flex; flex-direction: column; gap: 6px; }
.admin-subfield-label { font-size: 15px; font-weight: 600; color: var(--text); }

.refresh-history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.refresh-history-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
}
.refresh-history-list button {
  font-size: 12px;
  border: none;
  background: transparent;
  color: var(--overdue-text);
  cursor: pointer;
}
#event-products-list li { justify-content: flex-start; gap: 8px; }
#event-products-list li button { margin-left: auto; }
.refresh-history-add { display: flex; gap: 8px; align-items: center; }
.unified-date-buttons { display: flex; gap: 8px; margin-top: 8px; }
.date-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 6px 12px;
  background: var(--accent-bg);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.date-chip button { background: none; border: none; color: var(--accent-dark); font-weight: 700; cursor: pointer; padding: 0; }

.admin-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-thumb { position: relative; width: 64px; height: 64px; }
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.admin-thumb--reorderable { cursor: grab; }
.admin-thumb--reorderable:active { cursor: grabbing; }
.admin-thumb--dragging { opacity: 0.4; }
.admin-thumb--main img { border: 2px solid var(--accent); }
.admin-thumb-main-label {
  position: absolute;
  bottom: -6px;
  left: -6px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 2px 5px;
  border-radius: 4px;
  pointer-events: none;
}
.admin-thumb-main-btn.admin-thumb-main-btn {
  position: absolute;
  bottom: -6px;
  left: -6px;
  top: auto;
  right: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--accent);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 0 1px var(--border);
}
.admin-thumb-remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: var(--overdue-text);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.admin-thumb button {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: var(--overdue-text);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.admin-video-status { font-size: 13px; color: var(--text-secondary); }
.admin-video-status button { font-size: 12px; border: none; background: transparent; color: var(--overdue-text); cursor: pointer; margin-left: 4px; }

.admin-btn--small { padding: 6px 12px; font-size: 12px; }
.admin-btn--primary { background: var(--accent); border-color: var(--accent); }
.admin-btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.admin-back-link {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.admin-back-link:hover { color: var(--text); }
label.admin-btn { cursor: pointer; color: #fff; }
.admin-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Badges */
.pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
}
.pill:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.pill--muted { color: var(--text-secondary); border-color: var(--border); }
.pill--muted:hover { background: transparent; border-color: var(--border); color: var(--text-secondary); }
.pill--location { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill--location:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }

.controls-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1rem; }
.search-input {
  display: block;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
  font-size: 14px;
  padding: 9px 12px;
  border: 1.5px solid var(--accent-dark);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}
.sort-select-wrap { display: inline-flex; align-items: center; gap: 6px; }
.sort-select {
  font-size: 14px;
  padding: 9px 12px;
  border: 1.5px solid var(--accent-dark);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}
.sort-reset-btn {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  background: var(--bg);
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.sort-reset-btn:hover { background: var(--accent); color: #fff; }
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  text-align: center;
  text-transform: uppercase;
}
.badge--fresh { background: var(--fresh-bg); color: var(--fresh-text); }
.badge--aging { background: var(--aging-bg); color: var(--aging-text); }
.badge--overdue { background: var(--overdue-bg); color: var(--overdue-text); }
.badge--discontinued { background: var(--discontinued-bg); color: var(--discontinued-text); }

/* Intro hero */
.intro-hero { padding: 2rem 0 0.5rem; }
.intro-heading { font-size: 34px; line-height: 1.15; font-weight: 700; margin: 0 0 1rem; }
.intro-subtitle { font-size: 16px; color: var(--text-secondary); max-width: 420px; margin: 0 0 1.5rem; }
.intro-subtitle:not(:last-of-type) { margin-bottom: 0.75rem; }
.intro-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  padding: 12px 24px;
  border-radius: 999px;
}
.intro-cta:hover { background: var(--accent-dark); }

.intro-hero-layout { display: grid; grid-template-columns: 1fr 1.6fr; gap: 2.5rem; align-items: start; margin-top: 1rem; }
.intro-hero-cards { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 14px; }

.card-image {
  aspect-ratio: 4 / 3;
  background: #f6f5f1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-grid[data-mode="events"] .card-image img { object-fit: contain; }
.placeholder-icon { position: relative; z-index: 1; filter: drop-shadow(0 6px 10px rgba(20, 33, 61, 0.12)); }

.card--featured {
  grid-column: span 2;
  grid-row: span 2;
  position: relative;
}
.card-featured-label {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #fff;
  background: var(--accent);
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px #fff;
}
.card-featured-label--bottom { top: auto; bottom: 16px; right: 16px; }
.card--featured .card-name { font-size: 24px; }
.card-featured-details { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.card-featured-detail { font-size: 13px; color: var(--text); }
.card-featured-detail-label { color: var(--text-secondary); margin-right: 4px; }
.card-featured-count { display: flex; flex-direction: column; align-items: flex-start; margin: 10px 0; }
.card-featured-count-number { font-size: 56px; font-weight: 700; line-height: 1; }
.card-featured-count-suffix { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.card-featured-count--fresh .card-featured-count-number { color: var(--fresh-text); }
.card-featured-count--aging .card-featured-count-number { color: var(--aging-text); }
.card-featured-count--overdue .card-featured-count-number { color: var(--overdue-text); }

.card--event { justify-content: flex-start; border-color: var(--fresh-text); box-shadow: 0 0 0 1px var(--fresh-text); }
.card-event-image { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #f6f5f1; border-radius: 10px; display: block; }
.card-event-title { font-size: 20px; font-weight: 600; margin: 14px 0 0; }
.card-event-date { font-size: 14px; color: var(--text-secondary); margin: 6px 0 0; }


.homepage-section { margin-top: 2.5rem; }
.homepage-section--divided { border-top: 1px solid var(--border); padding-top: 2rem; }
.fact-box {
  background: var(--accent-bg);
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 2.25rem 1.5rem;
}
.fact-label, .fact-text, .fact-more-link { max-width: 640px; margin-left: auto; margin-right: auto; }
.fact-label { display: block; margin-top: 0; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; color: var(--accent-dark); }
.fact-text { margin-top: 10px; font-size: 18px; font-weight: 600; line-height: 1.4; }
.fact-more-link { display: block; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
.fact-more-link:hover { color: var(--accent-dark); }
.facts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 1.5rem;
}
.fact-card { background: var(--accent-bg); border-radius: 14px; padding: 1.5rem; }
.fact-card .fact-text { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.45; color: var(--text); }
.fact-card .fact-date { margin: 14px 0 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; color: var(--accent-dark); }
.homepage-section h2 { font-size: 18px; margin: 0 0 1rem; }

/* Equal-height rows so every tile matches and the pills line up along
   the bottom, whatever the length of each caption */
.gallery-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); grid-auto-rows: 1fr; gap: 14px; }
.gallery-strip-item {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit;
  padding: 10px; background: #fff;
  border: 1px solid #d8d4ca; border-radius: 12px;
  transition: border-color 0.15s ease;
}
.gallery-strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-strip-media { position: relative; display: block; }
.gallery-strip-single, .gallery-strip-mosaic {
  display: block; aspect-ratio: 1 / 1; border-radius: 8px; overflow: hidden;
  background: #f6f5f1;
  box-sizing: border-box;
}
/* Count sits on the photo, so it can never look like it belongs to the
   album below it */
.gallery-strip-count {
  position: absolute; top: 8px; right: 8px;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(24, 18, 13, 0.72); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
}
/* An album: one large photo with two smaller ones alongside */
.gallery-strip-mosaic { display: grid; grid-template-columns: 2fr 1fr; gap: 4px; background: #fff; padding: 0; }
/* Two photos: an even split down the middle rather than one large and
   one small, since neither is more important than the other */
.gallery-strip-mosaic--two { grid-template-columns: 1fr 1fr; }
.gallery-strip-main { display: block; overflow: hidden; border: 1px solid #d8d4ca; border-radius: 6px; }
.gallery-strip-side { display: grid; grid-template-rows: 1fr 1fr; gap: 4px; position: relative; }
/* Two photos: the single thumbnail fills the column, no empty square */
.gallery-strip-side--one { grid-template-rows: 1fr; }
.gallery-strip-thumb { display: block; overflow: hidden; border: 1px solid #d8d4ca; border-radius: 6px; }
.gallery-strip-more {
  position: absolute; right: 0; bottom: 0; left: 0;
  display: flex; align-items: center; justify-content: center;
  height: calc(50% - 2px);
  border-radius: 6px;
  background: rgba(30, 22, 16, 0.62); color: #fff;
  font-size: 13px; font-weight: 700;
}
.gallery-strip-item { height: 100%; }
.gallery-strip-item:hover { border-color: var(--accent); }
.gallery-strip-caption {
  display: block; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--text);
  min-height: 2.6em;
}
/* Pills sit along the bottom of each tile. Safe now the photo count is
   overlaid on the image rather than sitting in this row. */
.gallery-strip-pills { margin-top: auto; padding-top: 2px; }
.gallery-strip-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.gallery-strip-item:hover .gallery-strip-caption { color: var(--accent-dark); }
@media (max-width: 700px) {
  /* Two to a row on a phone rather than one large tile */
  .gallery-strip { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gallery-strip-caption { font-size: 13px; }
}

.see-all { margin-top: 1rem; font-size: 14px; text-align: center; }
.see-all .intro-cta { font-size: 11px; padding: 7px 16px; }

@media (max-width: 900px) {
  .intro-hero-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  /* Equal-height rows make sense side by side, but once the cards stack
     every one inherits the tall featured card's height, leaving a lot of
     empty space. Let each card size to its own content instead. */
  .intro-hero-cards { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
  .intro-hero-cards .card { height: auto; }
  .intro-hero-cards .card .card-link { flex: none; }
  .intro-hero-cards .card > .pill { margin-top: auto; }
}
@media (max-width: 560px) {
  /* Featured card full width, then the other two share a row, so the
     hero matches the two-column card grid further down the page. */
  .intro-hero-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card--featured { grid-column: 1 / -1; grid-row: auto; }
  .intro-hero-cards .card:not(.card--featured) { padding: 0.7rem; }
  .intro-hero-cards .card:not(.card--featured) .card-name { font-size: 14px; line-height: 1.25; }
  .intro-hero-cards .card:not(.card--featured) .badge { font-size: 11px; padding: 5px 8px; }
  .intro-hero-cards .card:not(.card--featured) .pill { font-size: 9px; padding: 2px 7px; }
  .intro-hero-cards .card:not(.card--featured) .card-name-row { gap: 5px; }
  .intro-hero-cards .card:not(.card--featured) .card-name-row svg,
  .intro-hero-cards .card:not(.card--featured) .card-name-row img { width: 24px; height: 24px; }
}

/* Cards */
.league-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.league-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  padding: 0 10px 10px;
  border-bottom: 1px solid #c7c4b8;
}
.league-table td { padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.league-table tbody tr:last-child td { border-bottom: none; }
.league-table tbody tr:hover { background: var(--accent-bg); cursor: pointer; }
.league-rank { width: 36px; font-size: 14px; font-weight: 700; color: var(--text-secondary); text-align: center; }
.league-name-link { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.league-name-link:hover { color: var(--accent); }
.league-name-link .placeholder-icon { flex-shrink: 0; color: var(--text-secondary); }
.league-name-link span { font-weight: 600; font-size: 15px; }
.league-launch, .league-price { color: var(--text-secondary); font-size: 14px; white-space: nowrap; }
@media (max-width: 640px) {
  .league-launch, th.league-launch { display: none; }
}

.products-status-divider { grid-column: 1 / -1; margin: 0.75rem 0 0.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.products-status-divider-label { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-secondary); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-auto-rows: auto;
  gap: 14px;
  margin-top: 1.5rem;
}
.card-grid[data-mode="events"] { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.card-grid[data-mode="gallery"] { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.card {
  border: 1px solid #c7c4b8;
  border-radius: 12px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--accent); }
.card--event:hover { border-color: var(--fresh-text); }
.card > .pill { margin-top: auto; }
.card-link { display: flex; flex-direction: column; gap: 8px; }
.card-name-row { display: flex; align-items: center; gap: 6px; }
.card--featured .card-name-row { padding-right: 100px; }
.card-name-row .placeholder-icon { flex-shrink: 0; color: var(--text-secondary); }
.card-name {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card--discontinued { opacity: 0.85; }


/* Buttons */
.wait-btn {
  display: inline-block;
  align-self: flex-start;
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  text-align: center;
  text-transform: uppercase;
}
.wait-btn:hover { background: var(--accent-bg); }
.wait-btn.voted { background: var(--accent); color: #fff; border-color: var(--accent); }
.wait-btn.voted:hover { background: var(--accent-dark); }
.wait-btn--large { padding: 11px 18px; margin-top: 1.5rem; }

@media (max-width: 480px) {
  .wait-btn { font-size: 13px; padding: 10px 14px; }
}

/* Filter bar */
.filters-with-everything { display: flex; align-items: center; gap: 16px; margin-top: 1.25rem; }
.filter-bars-stack { display: flex; flex-direction: column; gap: 0.85rem; }
.filter-bars-stack .filter-bar { margin-top: 0; }
.everything-btn {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 700;
  background: var(--fresh-bg);
  border: 1px solid var(--fresh-bg);
  color: var(--fresh-text);
  border-radius: 999px;
  padding: 12px 28px;
  cursor: pointer;
}
.everything-btn:hover { background: #dcecc9; border-color: #dcecc9; }

.pagination { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; justify-content: center; margin-top: 2rem; }
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  cursor: pointer;
}
.page-btn:hover:not(:disabled) { background: var(--accent); color: #fff; }
.page-btn.active { background: var(--accent); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: default; }
.page-btn--arrow { padding: 0 14px; width: auto; }
.page-ellipsis { color: var(--text-secondary); padding: 0 4px; }

.filter-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 1.25rem; align-items: center; }
.filter-bar + .filter-bar { margin-top: 0.85rem; }
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  text-decoration: none;
}
.hero-divider { border: none; border-top: 1px solid var(--border); margin: 2.75rem 0 0; }
.homepage-category-links.filter-bar { margin-top: 2.75rem; }
.homepage-category-links .filter-btn { font-size: 10.5px; padding: 6px 12px; gap: 4px; }
.filter-btn:hover { background: var(--accent); color: #fff; }
.filter-btn-count { color: var(--accent); font-weight: 400; opacity: 0.75; }
.filter-btn:hover .filter-btn-count { color: #fff; opacity: 0.85; }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-btn.active .filter-btn-count { color: rgba(255, 255, 255, 0.75); }
.filter-btn.active:hover { background: var(--accent); color: #fff; }

/* Product page */
.product-top { display: flex; gap: 2.5rem; align-items: flex-start; margin-top: 1.5rem; }
.product-top--no-media { display: block; }
.product-top--no-media .product-info { max-width: 640px; }
.product-media { flex: 1.2; min-width: 0; }
.product-info { flex: 1; min-width: 0; }
.product-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 0; }
.product-header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.page-header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-edit-link {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 12px;
  border-radius: 999px;
  text-decoration: none;
}
.admin-edit-link:hover { background: var(--accent-bg); }
.product-header h1 { margin: 0; font-size: 26px; }
.spec-list + .badge { margin-top: 1rem; display: inline-block; }
.product-video { width: 100%; border-radius: 12px; margin-top: 12px; background: #000; }

@media (max-width: 760px) {
  .product-top { flex-direction: column; gap: 1.25rem; }
}

/* Spec list on the product page: label / value rows, PullTab style */
.spec-list { margin: 1.25rem 0 0; padding: 0; border-top: 1px solid var(--border); }
.spec-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; break-inside: avoid; }
.spec-row dt { color: var(--text-secondary); margin: 0; font-weight: 700; }
.spec-row dd { margin: 0; font-weight: 400; }
.spec-row dd a { color: var(--text); text-decoration: underline; }
.spec-row dd .pill { font-weight: 500; text-decoration: none; }

@media (min-width: 760px) {
  .product-top--no-media .spec-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 2.5rem; row-gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
  .product-top--no-media .spec-row { border-bottom: none; padding-bottom: 0; }
}
@media (max-width: 480px) {
  .spec-row { grid-template-columns: 1fr; gap: 2px; }
}

/* Small secondary line on cards, e.g. "Lived 5 years, 3 months" */
.card-meta { font-size: 12px; color: var(--text-secondary); margin: 0; }
.card-meta--lifespan { font-weight: 700; color: #d32f2f; }
.gallery-tags { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
.gallery-tags-row { display: flex; flex-wrap: wrap; gap: 4px; }
.gallery-card-footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pill--count { font-weight: 700; color: var(--fresh-text); border-color: var(--fresh-text); background: var(--fresh-bg); flex-shrink: 0; margin-left: auto; margin-top: 20px; }
.pill--count:hover { background: #dcecc9; border-color: var(--fresh-text); color: var(--fresh-text); }

.gallery-photo-page { max-width: 640px; margin: 1.5rem auto 0; }
.event-detail-page { max-width: 640px; margin: 1.5rem auto 0; }
.event-detail-image { width: 100%; border-radius: 12px; display: block; margin: 1rem 0; }
.event-products-list { list-style: none; margin: 0.75rem 0 1.5rem; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.event-products-list li { font-size: 15px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; }
.event-products-list a { color: var(--accent); text-decoration: none; font-weight: 500; }
.event-products-list a:hover { text-decoration: underline; }
.gallery-photo-header { padding-bottom: 1.25rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.gallery-photo-header h1 { font-size: 24px; margin: 0; }
.gallery-photo-date { font-size: 14px; color: var(--text-secondary); margin: 6px 0 0; }
.gallery-photo-header .gallery-tags { margin-top: 12px; }
.gallery-photo-images { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.gallery-photo-images img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; cursor: zoom-in; }
.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 33, 61, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 1000;
}
.gallery-lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; object-fit: contain; cursor: default; }
.gallery-lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 8px;
}
.gallery-lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dark);
  border: none;
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.gallery-lightbox-arrow:hover { background: var(--accent); }
.gallery-lightbox-arrow svg { width: 24px; height: 24px; }
.gallery-lightbox-prev { left: 20px; }
.gallery-lightbox-next { right: 20px; }
.gallery-photo-copyright { margin-top: 1.5rem; padding: 1.25rem 0; border-top: 1px solid var(--border); text-align: center; }
.gallery-photo-copyright p { font-size: 13px; color: var(--text-secondary); margin: 0 0 12px; }
.gallery-photo-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.gallery-nav-link { font-size: 14px; font-weight: 600; color: var(--accent); }
.gallery-nav-link:hover { color: var(--accent-dark); }

/* Category index tiles */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 1.5rem; }
.category-tile {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.category-tile:hover { background: var(--accent-bg); border-color: var(--accent); }
.category-tile-icon { color: var(--text-secondary); }
.category-tile-name { font-size: 14px; font-weight: 700; line-height: 1.3; margin: 4px 0 0; text-transform: uppercase; min-height: 2.6em; display: flex; align-items: center; justify-content: center; }
.category-tile-count { font-size: 26px; font-weight: 700; color: var(--accent); margin: 6px 0 0; }
.category-tile-caption { font-size: 11px; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; margin: 0; }

.timeline-horizontal { position: relative; display: flex; align-items: center; overflow-x: auto; overflow-y: visible; padding: 160px 56px; margin: 0.75rem -56px 0; gap: 0; }
.timeline-rows { display: flex; flex-direction: column; }
.timeline-rows .timeline-horizontal { margin-top: 0; }
.timeline-horizontal--continues::after {
  content: '';
  position: absolute;
  right: 24px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--border-strong);
  border-bottom: 2px solid var(--border-strong);
  transform: translateY(-50%) rotate(45deg);
}
.timeline-point { flex: 1 0 120px; min-width: 120px; position: relative; display: flex; justify-content: center; }
.timeline-point:first-child { justify-content: flex-start; }
.timeline-point:last-child { justify-content: flex-end; }
.timeline-point:only-child { flex: 0 0 auto; justify-content: flex-start; }
.timeline-point-line-half { position: absolute; top: 50%; height: 2px; background: var(--border); transform: translateY(-1px); }
.timeline-point-line-half--left { left: 0; right: 50%; }
.timeline-point-line-half--right { left: 50%; right: 0; }
.timeline-point:first-child .timeline-point-line-half--right { left: 0; }
.timeline-point:last-child .timeline-point-line-half--left { right: 0; }
.timeline-dot {
  position: relative;
  z-index: 1;
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--graphite);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1.5px var(--border);
}
.timeline-point--launch .timeline-dot { background: var(--fresh-text); box-shadow: 0 0 0 1.5px var(--fresh-text); }
.timeline-point--refresh .timeline-dot { background: var(--accent); box-shadow: 0 0 0 1.5px var(--accent); }
.timeline-point--discontinued .timeline-dot { background: var(--overdue-text); box-shadow: 0 0 0 1.5px var(--overdue-text); }
.timeline-point-content { position: absolute; left: 50%; transform: translateX(-50%); width: 150px; text-align: center; }
.timeline-point:first-child .timeline-point-content { left: 0; transform: none; text-align: left; }
.timeline-point:last-child .timeline-point-content { left: auto; right: 0; transform: none; text-align: right; }
.timeline-point:only-child .timeline-point-content { left: 0; right: auto; transform: none; text-align: left; }
.timeline-point--above .timeline-point-content { bottom: 18px; }
.timeline-point--below .timeline-point-content { top: 18px; }
.timeline-point-content--above { bottom: 18px; }
.timeline-point-content--below { top: 18px; }
.timeline-point-entry + .timeline-point-entry { margin-top: 14px; }
.timeline-point-name { margin: 0; font-size: 12px; font-weight: 600; line-height: 1.3; }
.timeline-point-label { margin: 2px 0 0; font-size: 10px; font-weight: 600; text-transform: uppercase; color: var(--text-secondary); }
.timeline-point-date { margin: 1px 0 0; font-size: 11px; color: var(--text-secondary); }

.callout { background: transparent; padding: 1rem 0; margin-top: 1.5rem; }
.callout-label { font-size: 23px; font-weight: 700; margin: 0 0 8px; color: var(--text); }
.callout-body { color: var(--text); font-size: 16px; line-height: 1.6; }
.callout-body p { margin: 0 0 0.75rem; }
.callout-body p:last-child { margin: 0; }
.callout-body a { color: var(--text); text-decoration: underline; }
.callout-body b, .callout-body strong { font-weight: 700; }
.external-link { margin-top: 1rem; font-size: 14px; }
.external-link a { color: var(--text-accent, var(--accent)); text-decoration: underline; }

/* The headline number is the first card in the facts grid, so the boxes
   line up as one block instead of a wide banner sitting above two
   stranded cards. */
.days-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 12px 0 0;
  padding: 22px 24px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  gap: 8px;
}
.days-hero-number { display: block; font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.days-hero--fresh { background: var(--fresh-bg); color: var(--fresh-text); }
.days-hero--aging { background: var(--aging-bg); color: var(--aging-text); }
.days-hero--overdue { background: var(--overdue-bg); color: var(--overdue-text); }
.days-hero--discontinued { background: var(--discontinued-bg); color: var(--discontinued-text); font-size: 15px; font-weight: 600; padding: 8px 18px; border-radius: 999px; }
.spec-row dd .wait-count-value { font-weight: 700; }

.admin-hint { font-size: 13px; color: var(--text-secondary); margin: 4px 0 0; line-height: 1.5; }

.richtext-toolbar { display: flex; gap: 6px; }
.richtext-toolbar button {
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}
.richtext-toolbar button:hover { border-color: var(--graphite); }
.richtext-toolbar button.richtext-clear { color: var(--overdue-text); border-color: var(--overdue-text); }
.richtext-toolbar button.richtext-clear-all { width: auto; padding: 0 10px; font-size: 12px; color: var(--overdue-text); border-color: var(--overdue-text); }
.richtext-editor {
  min-height: 90px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
}
.richtext-editor:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.richtext-editor p { margin: 0 0 0.75rem; }
.richtext-editor p:last-child { margin: 0; }

.category-page-heading { display: flex; align-items: center; gap: 12px; margin-top: 1.5rem; }
.category-page-heading h1 { margin: 0; }
.category-page-heading .placeholder-icon { flex-shrink: 0; color: var(--text-secondary); }
.page-intro { color: var(--text-secondary); font-size: 14px; }

@media (max-width: 640px) {
  .intro-heading { font-size: 30px; }
  .hero-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Admin v162: family > product line > generation ---------- */
.admin-list-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.admin-steps-guide { margin: 0; font-size: 14px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.admin-steps-guide span {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-bg); color: var(--accent-dark); font-size: 12px; font-weight: 700; margin-left: 6px;
}
.admin-steps-guide span:first-child { margin-left: 0; }
.admin-btn--ghost { background: #fff; color: var(--text); border-color: var(--border); }
.admin-btn--ghost:hover { background: #f6f5f1; border-color: var(--graphite); }
.admin-btn--danger { background: #fff; color: var(--overdue-text); border-color: #e9c3c3; }
.admin-btn--danger:hover { background: var(--overdue-bg); }
.admin-btn:disabled { opacity: 0.6; cursor: progress; }
.admin-btn:focus-visible, .family-tile:focus-visible, .line-card-main:focus-visible, .segmented input:focus-visible + span {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.admin-optional { font-size: 12px; font-weight: 400; color: var(--text-secondary); }
.admin-form-title { margin: 0.5rem 0 0; font-size: 24px; }

/* Family tiles (list view and step 1) */
.family-tiles, .family-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.family-tiles { margin-bottom: 14px; }
.family-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 104px; padding: 12px 8px; border: 1.5px solid var(--border); border-radius: 12px;
  background: #fff; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: center;
}
.family-tile:hover { border-color: var(--graphite); }
.family-tile.is-selected { border-color: var(--accent); background: var(--accent-bg); color: var(--accent-dark); }
.family-tile .admin-icon { color: var(--text); }
.family-tile.is-selected .admin-icon { color: var(--accent-dark); }
.family-tile-count { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.family-tile--small { min-height: 78px; font-size: 12px; }
.family-tile--new { border-style: dashed; color: var(--text-secondary); }
.family-tile-plus { font-size: 24px; line-height: 1; font-weight: 300; }
.admin-icon { display: block; object-fit: contain; flex-shrink: 0; }

/* Product line cards */
.line-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin: 0 0 2rem; }
.line-card {
  display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden;
}
.line-card--featured { border-color: #e9cf73; }
.line-card--discontinued { background: #faf9f6; }
.line-card-main {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: none; background: transparent;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.line-card-main:hover .line-card-name { color: var(--accent-dark); }
.line-card-icon { width: 44px; height: 44px; border-radius: 10px; background: #f6f5f1; display: grid; place-items: center; flex-shrink: 0; }
.line-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.line-card-name { font-size: 15px; font-weight: 700; line-height: 1.3; }
.line-card-star { color: #b98a00; }
.line-card-meta { font-size: 12px; color: var(--text-secondary); }
.line-card-status { font-size: 12px; font-weight: 600; color: var(--fresh-text); }
.line-card-status--discontinued { color: var(--discontinued-text); }
.line-card-status--empty { color: var(--text-secondary); font-weight: 500; }
.line-card-actions { display: flex; gap: 6px; padding: 0 14px 14px; flex-wrap: wrap; }
.line-card-actions .admin-btn { align-self: auto; }
.line-card--new {
  flex-direction: row; align-items: center; justify-content: center; gap: 10px; min-height: 96px;
  border: 1.5px dashed var(--border); font: inherit; font-size: 14px; font-weight: 600; color: var(--text-secondary); cursor: pointer;
}
.line-card--new:hover { border-color: var(--accent); color: var(--accent-dark); }

/* Step layout */
.admin-form--steps { max-width: 640px; gap: 14px; }
.admin-step { border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: #fff; }
.admin-step-title { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 10px; }
.admin-step-num {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.admin-advanced summary { display: flex; align-items: center; gap: 10px; }
.admin-advanced summary::before { content: none; }
.admin-advanced .admin-step-num { background: var(--graphite); }
.admin-mini-details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.admin-mini-details[open] summary { margin-bottom: 8px; }
.admin-icon-row { display: flex; align-items: center; gap: 12px; }
.admin-thumb--icon { width: 56px; height: 56px; border: 1px solid var(--border); border-radius: 10px; display: grid; place-items: center; background: #f6f5f1; }
.admin-thumb--icon .admin-icon { width: 40px; height: 40px; }
.admin-thumb--fallback { opacity: 0.55; }

/* Segmented buttons: date precision, status, currency, badge basis */
.segmented, .admin-form .date-precision-radios {
  display: inline-flex; flex-wrap: wrap; gap: 0; padding: 3px; border-radius: 10px; background: #f1efe9; align-self: flex-start; margin: 0;
}
.segmented label, .admin-form .date-precision-radios label {
  flex-direction: row; gap: 0; font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer; position: relative;
}
.segmented input, .admin-form .date-precision-radios input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: block; padding: 7px 14px; border-radius: 8px; }
.admin-form .date-precision-radios label { padding: 6px 12px; border-radius: 8px; }
.segmented input:checked + span,
.admin-form .date-precision-radios label:has(input:checked) { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(20, 20, 20, 0.12); }
.admin-form .date-precision-radios label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.segmented--status span { padding: 9px 22px; font-size: 14px; }
.segmented--status label:last-child input:checked + span { background: var(--discontinued-text); color: #fff; }
.segmented--small span { padding: 5px 12px; }
.admin-discontinued-fields { display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: 10px; background: #f8f7f3; }

/* Generations */
.generation-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.generation-empty { font-size: 14px; color: var(--text-secondary); padding: 10px 12px; border: 1px dashed var(--border); border-radius: 10px; }
.generation-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.generation-item--latest { border-color: #d9c6b4; }
.generation-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.generation-date { font-size: 14px; font-weight: 700; }
.generation-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #efede7; color: var(--text-secondary); }
.generation-tag--latest { background: var(--accent-bg); color: var(--accent-dark); }
.generation-remove { margin-left: auto; font-size: 12px; border: none; background: transparent; color: var(--overdue-text); cursor: pointer; padding: 4px; }
.generation-item-fields { display: grid; grid-template-columns: 1fr 170px; gap: 8px; }
.admin-form .generation-item-fields label { font-size: 12px; font-weight: 600; color: var(--text-secondary); gap: 3px; }
.admin-form .generation-item-fields input { font-size: 14px; padding: 7px 10px; }
.generation-add { border-radius: 10px; background: #f8f7f3; padding: 14px; display: flex; flex-direction: column; gap: 12px; transition: box-shadow 0.3s; }
.generation-add--highlight { box-shadow: 0 0 0 3px var(--accent); }
.generation-add-title { margin: 0; font-size: 15px; font-weight: 700; }

/* Sticky save bar */
.admin-save-bar {
  position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; align-items: center;
  padding: 12px 0; background: linear-gradient(to top, #fff 75%, rgba(255, 255, 255, 0));
}
.admin-save-bar .admin-btn { align-self: auto; }
.admin-save-bar #delete-product-btn { margin-left: auto; }

@media (max-width: 560px) {
  .generation-item-fields { grid-template-columns: 1fr; }
  .family-tiles, .family-picker { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  .line-card-grid { grid-template-columns: 1fr; }
}

/* ---------- Product page: generations table ---------- */
.generations-table-wrap { overflow-x: auto; margin-bottom: 1.5rem; }
.generations-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.generations-table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--text-secondary);
  padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.generations-table td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.generations-table td.generation-name { white-space: normal; font-weight: 600; min-width: 180px; }
.generation-row--current td { background: #fbf8f2; }
.generation-current-pill {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: var(--fresh-bg); color: var(--fresh-text); vertical-align: 1px;
}

.admin-form .admin-label-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.form-error:empty { display: none; }
.admin-form .form-error { margin: 0; }
.admin-icon-row label.admin-btn { display: inline-block; }
.admin-form label.admin-btn--small { display: inline-block; font-size: 12px; font-weight: 500; }
.generation-add-row { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.generation-add-row .admin-btn { align-self: flex-end; }
.generation-name-text { font-size: 13px; color: var(--text-secondary); }
.generation-name-text--auto { font-style: italic; }
.generation-item-actions { margin-left: auto; display: flex; gap: 4px; flex-shrink: 0; }
.generation-edit { font-size: 12px; border: none; background: transparent; color: var(--accent-dark); cursor: pointer; padding: 4px; font-weight: 600; }
.generation-remove { margin-left: 0; }
.entry-tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; flex-shrink: 0; letter-spacing: 0.02em; }
.entry-tag--release { background: var(--accent-bg); color: var(--accent-dark); }
.entry-tag--discontinued { background: var(--discontinued-bg, #efede7); color: var(--discontinued-text); }
.generation-item--discontinued { border-color: #ded7cf; background: #faf9f6; }
.segmented--type span { padding: 8px 14px; }
.segmented--type label:nth-child(2) span { color: var(--discontinued-text); }
.admin-status-readout { margin: 0; font-size: 14px; font-weight: 600; padding: 10px 12px; border-radius: 10px; }
.admin-status-readout--current { background: var(--fresh-bg); color: var(--fresh-text); }
.admin-status-readout--discontinued { background: #f3efe9; color: var(--discontinued-text); }
.checkbox-label--feature { font-size: 14px; }
.segmented-option--off { opacity: 0.4; cursor: not-allowed; }
.segmented-option--off span { text-decoration: line-through; }
.admin-screen-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 20px; }
.admin-screen-family { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; color: var(--text-secondary); font-weight: 600; }
#products-screen .admin-back-link { margin-bottom: 10px; display: inline-block; }
.choice-cards { display: grid; gap: 8px; }
.choice-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; background: #fff; }
.choice-card:hover { border-color: var(--graphite); }
.choice-card:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice-card input { margin-top: 3px; accent-color: var(--accent); flex-shrink: 0; }
.choice-card-body { display: flex; flex-direction: column; gap: 2px; }
.choice-card-title { font-size: 14px; font-weight: 700; }
.choice-card-note { font-size: 13px; color: var(--text-secondary); font-weight: 400; }
.admin-linkish { border: none; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--accent-dark); text-decoration: underline; cursor: pointer; }
#generation-extra-fields { border-top: 1px solid var(--border); padding-top: 12px; }

/* ---------- Release history: vertical timeline ---------- */
.tl { list-style: none; margin: 0.75rem 0 2rem; padding: 0 0 0 4px; position: relative; }
.tl-item, .tl-now { position: relative; display: flex; gap: 14px; padding: 10px 0 10px 0; }
.tl-item::before, .tl-now::before {
  content: ""; position: absolute; left: 12px; top: 0; bottom: 0; width: 2px; background: var(--border);
}
.tl-now::before { top: 50%; }
.tl li:last-child::before { bottom: 50%; }
.tl-marker {
  position: relative; z-index: 1; flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; border: 2px solid var(--border); color: var(--text-secondary);
}
.tl-marker--refresh { border-color: var(--accent); color: var(--accent); }
.tl-marker--launch { border-color: var(--fresh-text); color: var(--fresh-text); }
.tl-marker--discontinued { border-color: #bdb7ae; color: var(--discontinued-text); }
.tl-marker--now { border-color: var(--accent); color: var(--accent); font-size: 11px; background: var(--accent-bg); }
.tl-body { padding-top: 2px; min-width: 0; }
.tl-date { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.01em; }
.tl-now-text { margin: 0; font-size: 13px; font-weight: 700; color: var(--accent-dark); }
.tl-entry { margin: 3px 0 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tl-entry-name { font-size: 15px; font-weight: 600; }
.tl-entry-type {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 999px; background: #f1efe9; color: var(--text-secondary);
}
.tl-entry-type--refresh { background: var(--accent-bg); color: var(--accent-dark); }
.tl-entry-type--launch { background: var(--fresh-bg); color: var(--fresh-text); }
.tl-entry-type--discontinued { background: var(--discontinued-bg); color: var(--discontinued-text); }
.tl-year { position: relative; padding: 14px 0 6px 40px; }
.tl-year::before { content: ""; position: absolute; left: 12px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.tl-year span {
  position: relative; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; color: var(--text-secondary);
  background: #fff; padding-right: 8px;
}
.tl-gap { position: relative; padding: 2px 0 2px 40px; }
.tl-gap::before { content: ""; position: absolute; left: 12px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.tl-gap-text { position: relative; font-size: 11px; color: var(--text-secondary); background: #fff; padding-right: 8px; }

/* Product page title with its icon */
.product-title-row { display: flex; align-items: center; gap: 12px; }
.product-title-row h1 { margin: 0; }
.product-title-icon { flex-shrink: 0; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: #f6f5f1; }
.product-title-icon .placeholder-icon { width: 40px; height: 40px; }

@media (max-width: 560px) {
  .product-title-icon { width: 42px; height: 42px; }
  .product-title-icon .placeholder-icon { width: 32px; height: 32px; }
  .tl-entry-name { font-size: 14px; }
}

/* Editable page copy and automatic stats line */
.page-copy { max-width: 68ch; margin: 0 0 1.25rem; color: var(--text); }
.page-copy p { margin: 0 0 0.75rem; line-height: 1.65; }
.page-copy--footer { margin: 2rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.page-stats {
  max-width: 68ch; margin: 0 0 1.25rem; padding: 12px 14px; border-radius: 10px;
  background: var(--accent-bg); color: var(--accent-dark); font-size: 14px; font-weight: 600; line-height: 1.55;
}
.intro-hero-text .page-copy p { font-size: 17px; color: var(--text-secondary); }

/* ---------- Key facts grid ---------- */
.key-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 1.25rem; }
.key-fact { padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.key-fact-label { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-secondary); }
.key-fact-value { margin: 7px 0 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.spec-list--secondary .spec-row dt { font-size: 12px; }
.spec-list--secondary .spec-row dd { font-size: 14px; }

/* ---------- Motion: all optional, all free ---------- */
/* Smooth page-to-page transitions where the browser supports them. */
@view-transition { navigation: auto; }

/* The timeline draws itself as it scrolls into view, using the browser's
   own scroll timeline. No JavaScript, and older browsers just see the
   finished state. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .tl-item, .tl-now {
      animation: tl-reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 30%;
    }
    @keyframes tl-reveal {
      from { opacity: 0.55; transform: translateY(8px); }
      to { opacity: 1; transform: none; }
    }
  }
}

@media (prefers-reduced-motion: no-preference) {
  .card, .line-card, .key-fact { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
  .card:hover, .key-fact:hover { transform: translateY(-2px); }
  .days-hero-number { display: inline-block; }
}


/* Headline number and key facts share one grid */
.product-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0 2rem; align-items: stretch; }
.product-facts .days-hero { margin: 0; grid-column: span 2; }
.product-facts .key-fact { display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 560px) {
  .product-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-facts .days-hero { grid-column: 1 / -1; }
  .days-hero-number { font-size: 38px; }
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { margin: 0 0 1rem; font-size: 13px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs a { color: var(--accent-dark); font-weight: 600; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs li[aria-current] { color: var(--text-secondary); }
.crumb-sep { color: var(--border); }

/* ---------- More in this family ---------- */
.related-section { margin: 2rem 0; }
.related-section h2 { margin-bottom: 0.75rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.related-card {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 12px; background: #fff; text-decoration: none; color: inherit;
}
.related-card:hover { border-color: var(--accent); }
.related-card-icon { width: 38px; height: 38px; border-radius: 10px; background: #f6f5f1; display: grid; place-items: center; flex-shrink: 0; }
.related-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.related-card-name { font-size: 15px; font-weight: 700; }
.related-card-line { font-size: 12px; color: var(--text-secondary); }

/* Notes: a comfortable reading measure */
.product-page .callout-body, .product-page .rich-text, .product-note { max-width: 68ch; }

/* ---------- 404 ---------- */
.not-found { padding: 3rem 0 4rem; max-width: 60ch; }
.not-found-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1.5rem; }
.intro-cta--ghost { background: #fff; color: var(--accent-dark); border: 1px solid var(--border); }

/* ---------- Phone and tablet pass ---------- */

/* The menu button only exists on narrow screens. Without JavaScript the
   nav is simply always open, so nothing is ever unreachable. */
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .site-header { padding: 0.6rem 1rem; flex-wrap: wrap; }
  .site-logo-img { width: 64px; height: 64px; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 10px;
    background: rgba(0, 0, 0, 0.18); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  }
  .nav-toggle-bars { display: grid; gap: 3px; }
  .nav-toggle-bars span { display: block; width: 17px; height: 2px; background: #fff; border-radius: 2px; }
  .site-nav {
    display: none; flex: 0 0 100%; width: 100%; flex-direction: column; align-items: stretch; gap: 2px;
    margin-top: 0.6rem; padding: 8px; border-radius: 14px; background: rgba(20, 12, 20, 0.38);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { margin: 0; padding: 12px 14px; font-size: 16px; border-radius: 10px; justify-content: flex-start; }
  .site-nav a:active { background: rgba(255, 255, 255, 0.14); }
  .site-search { margin: 6px 0 2px; width: 100%; }
  .site-search input { width: 100%; }
}

/* Phones */
@media (max-width: 600px) {
  main { padding-left: 1rem; padding-right: 1rem; }
  h1 { font-size: 27px; }
  h2 { font-size: 21px; }
  .card-grid, .related-grid, .line-card-grid { grid-template-columns: 1fr; }
  .spec-list { grid-template-columns: 1fr; }
  .spec-row { padding: 9px 0; }
  .generations-table td.generation-name { min-width: 0; }
  .filter-row, .sort-row { flex-direction: column; align-items: stretch; }
  .tl-body { padding-top: 0; }
  .tl-item, .tl-now { gap: 11px; }
  .breadcrumbs { font-size: 12px; }
  .related-card { padding: 11px 12px; }
}

/* Tablets, including iPad in portrait */
@media (min-width: 601px) and (max-width: 1024px) {
  main { padding-left: 1.5rem; padding-right: 1.5rem; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-facts .days-hero { grid-column: span 3; }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .family-tiles, .family-picker { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* Touch targets: comfortable on a finger, unchanged with a mouse */
@media (pointer: coarse) {
  /* min-height alone does nothing to an inline element, so these become
     inline-flex first. Pointer devices are untouched. */
  .site-nav a, .intro-cta, .admin-btn, .pill, .generation-edit, .generation-remove {
    display: inline-flex; align-items: center; justify-content: center;
  }
  .site-nav a, .intro-cta, .admin-btn, .sort-select, .generation-edit, .generation-remove { min-height: 44px; }
  /* Pills stay slim to look at, but an invisible margin around each one
     still catches a finger, so they remain easy to tap. */
  .pill { min-height: 26px; padding-top: 4px; padding-bottom: 4px; position: relative; }
  .pill::before { content: ''; position: absolute; inset: -8px -4px; }
  .generation-edit, .generation-remove { padding: 10px 8px; }
  .admin-btn { padding-top: 11px; padding-bottom: 11px; }
}
/* Menu links read as a list, so they align left even with the touch
   sizing rules above. */
@media (max-width: 860px) { .site-nav a { justify-content: flex-start; } }

/* ---------- Accessibility pass ---------- */

/* White text on the light end of the sunset gradient measured 2.8:1,
   below the 4.5:1 minimum. The gradient stays; the header bar now sits
   on a translucent dark panel, which lifts the text to about 5.4:1. */
.site-header-bg { position: relative; }
.site-header-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(24, 14, 22, 0.46);
  pointer-events: none;
}
.site-header { position: relative; }
.site-nav a { opacity: 1; }

/* A visible keyboard focus ring everywhere. Only shown for keyboard
   users, so mouse and touch are unaffected. */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.site-header :focus-visible, .site-footer :focus-visible { outline-color: #fff; }

/* Decorative, but it was almost invisible */
.crumb-sep { color: #7c766e; }
.tl-marker--now { color: var(--accent-dark); border-color: var(--accent-dark); }


/* The search field cleared its own outline, which left keyboard users
   with no idea where they were. The ring now lands on the whole pill. */
.site-search:focus-within { outline: 3px solid #fff; outline-offset: 2px; }
.site-search input:focus-visible { outline: none; }
.generation-announced { margin: 4px 0 0 0; font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.generation-announced .generation-edit { font-size: 11px; padding: 2px 4px; }
.entry-tag--launch { background: #e6efe6; color: #2f6b3a; }
.segmented--type label:last-child span { color: var(--discontinued-text); }
.tl-upcoming { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; background: var(--fresh-bg); color: var(--fresh-text); }
.admin-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.tweet-preview { margin: 12px 0 0; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: #fbfaf8; max-width: 560px; }
.tweet-preview-label { margin: 0 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }
.tweet-count { font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.tweet-count.is-over { color: var(--overdue-text); font-weight: 700; }
.tweet-preview-text { width: 100%; font: inherit; font-size: 14px; line-height: 1.5; padding: 10px; border: 1px solid var(--border); border-radius: 8px; resize: vertical; }
.tweet-preview-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- Hero countdown ---------- */
.countdown {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px;
  margin: 0 0 1.25rem; padding: 14px 18px; border-radius: 14px;
  background: var(--accent-bg); color: var(--accent-dark); text-decoration: none; border: 1px solid #f0d9c4;
}
.countdown:hover { border-color: var(--accent); }
.countdown-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; flex: 0 0 100%; }
.countdown-name { font-size: 17px; font-weight: 800; }
.countdown-clock { display: inline-flex; gap: 12px; }
.countdown-unit { display: inline-flex; align-items: baseline; gap: 4px; }
.countdown-value { font-size: 24px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown-unit-label { font-size: 12px; font-weight: 600; opacity: 0.8; }
.countdown-date { font-size: 13px; font-weight: 600; opacity: 0.85; }
.pill--link { text-decoration: none; }
.pill--link:hover { border-color: var(--accent); background: var(--accent-bg); }
@media (max-width: 600px) {
  .countdown { width: 100%; }
  .countdown-value { font-size: 20px; }
}
.site-search-dropdown-head { margin: 8px 12px 2px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }
.site-search-note { margin-left: auto; font-size: 11px; color: var(--text-secondary); }
.site-search-event-dot { width: 22px; height: 22px; border-radius: 6px; background: var(--accent-bg); border: 1px solid #f0d9c4; display: inline-block; flex-shrink: 0; }

/* ---------- Products still to arrive ---------- */
.badge--upcoming, .card-featured-count--upcoming, .days-hero--upcoming { background: var(--fresh-bg); color: var(--fresh-text); }
.days-hero--upcoming { font-size: 15px; }
.days-hero-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; display: block; }
.days-hero-soon { font-size: 26px; font-weight: 800; }

/* ---------- All products: calmer cards ---------- */
.card-grid .card { display: flex; flex-direction: column; }
.card-grid .card .card-link { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card-name-row { align-items: center; min-height: 44px; }
.card .badge { align-self: stretch; white-space: normal; max-width: 100%; box-sizing: border-box; line-height: 1.3; font-size: 12px; padding: 6px 12px; }
.card .pill:not(.pill--location):not(.pill--count) { font-size: 10px; padding: 3px 9px; border-color: #e6e1d8; color: var(--text-secondary); }
.card .pill:not(.pill--location):not(.pill--count):hover { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-dark); }
.card .pill--location, .card .pill--count { font-size: 10px; padding: 3px 9px; }
.filter-bar { gap: 6px; }
.homepage-category-links { margin-top: 0.5rem; }

/* One filter row: status, a divider, then the families */
.filter-row-merged { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0.5rem 0 1.25rem; }
.filter-row-merged .filter-bar { margin: 0; }
.filter-divider { width: 1px; align-self: stretch; min-height: 26px; background: var(--border); margin: 0 6px; }
@media (max-width: 600px) {
  .filter-divider { display: none; }
  .filter-row-merged { gap: 6px; }
}

@media (max-width: 600px) {
  .controls-row { margin-top: 0.75rem; gap: 8px; }
}

/* Families tab in admin: one row per product family with its icon */
.family-admin-list { display: flex; flex-direction: column; gap: 8px; margin-top: 1rem; }
.family-admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-wrap: wrap;
}
.family-admin-thumb {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.family-admin-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.family-admin-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 160px; }
.family-admin-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
@media (max-width: 600px) {
  .family-admin-actions { margin-left: 0; width: 100%; }
}

/* Publish changes control in the admin topbar */
.admin-topbar-actions { display: flex; gap: 8px; align-items: center; }
.admin-publish-status { margin: 6px 0 0; min-height: 1.2em; }
.admin-publish-status.is-ok { color: var(--fresh-text); }
.admin-publish-status.is-error { color: var(--overdue-text); }

/* The admin page has its own product search, so hide the public site
   search there to avoid two search boxes on one screen. */
body.is-admin .site-search { display: none; }

/* An announcement added before its release date exists */
.generation-row--pending { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; opacity: 0.9; }

/* Announced and pre-order pills, matching the Launch/Release ones */
.entry-pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; flex-shrink: 0; letter-spacing: 0.02em; }
.entry-pill--announced { background: #e8eef7; color: #2d4f7c; }
.entry-pill--preorder { background: #f5ecda; color: #7a5a1e; }

/* Countdown on the featured tile for an upcoming product */
.card-featured-count-due { display: block; font-size: 13px; color: var(--text-secondary); margin-top: 6px; }

/* Live countdown on the featured tile for an unreleased product */
.product-countdown-clock { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: baseline; }
.product-countdown-clock .countdown-value { font-size: 30px; }
.product-countdown-clock .countdown-unit { flex-direction: column; align-items: flex-start; gap: 2px; }
.product-countdown-clock .countdown-unit-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
@media (max-width: 600px) {
  .product-countdown-clock { gap: 8px 10px; }
  .product-countdown-clock .countdown-value { font-size: 24px; }
}

/* The seconds digit pulses each tick so the countdown reads as live */
@keyframes countdown-tick {
  0% { transform: scale(1.18); opacity: 0.65; }
  100% { transform: scale(1); opacity: 1; }
}
.countdown-unit--secs .countdown-value {
  display: inline-block;
  animation: countdown-tick 0.5s ease-out;
  min-width: 1.6em;
}
@media (prefers-reduced-motion: reduce) {
  .countdown-unit--secs .countdown-value { animation: none; }
}
/* Several countdowns stack neatly when more than one product is due */
.countdown + .countdown { margin-top: 10px; }

/* Screen-reader-only label text */
.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;
}

/* Family navigation: pills on desktop, native picker on mobile, where
   thirteen pills otherwise wrap into five rows. */
.homepage-category-select { display: none; margin: 0.5rem 0 1.25rem; }
.homepage-category-select select {
  width: 100%;
  padding: 13px 40px 13px 14px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent-dark);
  background-color: var(--accent-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239c4009' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 17px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  -webkit-appearance: none;
  appearance: none;
}
.homepage-category-select select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (max-width: 700px) {
  .homepage-category-links { display: none; }
  .homepage-category-select { display: block; }

  /* Two columns of smaller cards instead of one tall column */
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .card-grid .card { padding: 0.7rem; }
  .card-grid .card-name { font-size: 14px; line-height: 1.25; }
  .card-grid .badge { font-size: 11px; padding: 5px 8px; }
  .card-grid .pill { font-size: 9px; padding: 2px 7px; }
  .card-grid .card-name-row { gap: 5px; }
  .card-grid .card-name-row svg,
  .card-grid .card-name-row img { width: 24px; height: 24px; }
}

/* Tile alignment: names, badges and family pills should line up across
   a row whatever the length of the text inside them. The badge is sized
   for two lines so a long product name never makes one tile's shaded
   area taller than its neighbour's. */
.card-grid .card-name-row { align-items: flex-start; min-height: 2.6em; }
.card-grid .badge {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 3.1em;
  box-sizing: border-box;
}
.card-grid .card > .pill { margin-top: auto; }

@media (max-width: 600px) {
  .card-grid .card-name-row { min-height: 2.8em; }
  .card-grid .badge { min-height: 3.4em; }
}

/* The same alignment for the two smaller cards beside the featured one */
@media (max-width: 560px) {
  .intro-hero-cards .card:not(.card--featured) { display: flex; flex-direction: column; }
  .intro-hero-cards .card:not(.card--featured) .card-link { flex: 1; display: flex; flex-direction: column; gap: 8px; }
  .intro-hero-cards .card:not(.card--featured) .card-name-row { align-items: flex-start; min-height: 2.8em; }
  .intro-hero-cards .card:not(.card--featured) .badge {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 3.4em;
    box-sizing: border-box;
  }
  .intro-hero-cards .card:not(.card--featured) > .pill { margin-top: auto; }
}

/* iOS Safari zooms the page whenever a focused input has a font size
   below 16px. Bumping form controls to 16px on small screens stops the
   zoom without changing how anything looks on desktop. */
@media (max-width: 700px) {
  .search-input,
  .sort-select,
  .admin-search-input,
  .homepage-category-select select,
  input[type="text"],
  input[type="search"],
  input[type="url"],
  input[type="number"],
  input[type="date"],
  input[type="email"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px;
  }

  /* Keep the controls inside the screen rather than running off the
     right edge, which also removes the sideways scroll. */
  .search-input,
  .sort-select,
  .sort-select-wrap {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  .controls-row { flex-direction: column; align-items: stretch; }
}

/* "Did you know?" callout near the top of a product page */
.did-you-know {
  margin: 1.25rem 0;
  padding: 14px 18px;
  border-left: 4px solid var(--accent);
  background: var(--accent-bg);
  border-radius: 0 10px 10px 0;
}
.did-you-know-label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.did-you-know-text { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text); }

/* Draft-a-post composer: a pop-up styled like a real post */
.post-composer {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(20, 16, 12, 0.55);
  backdrop-filter: blur(3px);
  animation: post-composer-in 0.18s ease-out;
}
@keyframes post-composer-in { from { opacity: 0; } to { opacity: 1; } }
.post-composer-card {
  width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: #fff; border-radius: 18px; padding: 20px 22px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}
.post-composer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.post-composer-head h2 { margin: 0; font-size: 20px; }
.post-composer-close {
  width: 36px; height: 36px; border-radius: 999px; border: none;
  background: #f1efea; color: var(--text); font-size: 22px; line-height: 1; cursor: pointer;
}
.post-composer-close:hover { background: var(--accent-bg); color: var(--accent-dark); }

.post-composer-angles { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.post-composer-angles button {
  font: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; color: var(--text-secondary); cursor: pointer;
}
.post-composer-angles button:hover { border-color: var(--accent); color: var(--accent-dark); }
.post-composer-angles button.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

.post-preview {
  display: flex; gap: 12px; padding: 14px;
  border: 1px solid var(--border); border-radius: 14px; background: #fcfbf9;
}
.post-preview-avatar { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 999px; overflow: hidden; background: #111; }
.post-preview-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-preview-main { flex: 1; min-width: 0; }
.post-preview-who { margin: 2px 0 6px; font-size: 15px; }
.post-preview-who span { color: var(--text-secondary); font-weight: 400; }
.post-preview-text {
  width: 100%; box-sizing: border-box; border: none; background: transparent; resize: none;
  font: inherit; font-size: 16px; line-height: 1.5; color: var(--text); padding: 0;
  min-height: 96px; overflow: hidden; overflow-wrap: anywhere;
}
.post-preview-text:focus { outline: none; }

.post-composer-meter { height: 4px; border-radius: 999px; background: #eeebe5; margin-top: 14px; overflow: hidden; }
.post-composer-meter-bar { height: 100%; width: 0; background: #2f8a4b; transition: width 0.2s ease, background 0.2s ease; }
.post-composer-meter-bar.is-near { background: #c98a1b; }
.post-composer-meter-bar.is-over { background: #b3261e; }
.post-composer-count { margin: 6px 0 0; font-size: 12px; color: var(--text-secondary); text-align: right; }
.post-composer-count.is-over { color: #b3261e; font-weight: 600; }

.post-composer-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.post-composer-actions .intro-cta { margin: 0; }

@media (max-width: 560px) {
  .post-composer { align-items: flex-end; padding: 0; }
  .post-composer-card { border-radius: 18px 18px 0 0; max-height: 92vh; }
  .post-composer-actions { justify-content: stretch; }
  .post-composer-actions .intro-cta { flex: 1; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .post-composer { animation: none; } }

/* All Products / Discontinued filters.
   Two labelled groups in brand colours. Every chip is visible at once,
   wrapping onto a second line when needed rather than hiding off the
   edge of the screen. On phones the families become a single picker. */
.filter-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 1rem 0 1.5rem;
  padding: 16px 18px;
  background: var(--accent-bg);
  border: 1px solid #efd9c7;
  border-radius: 14px;
}
.filter-group { display: flex; align-items: flex-start; gap: 12px; }
.filter-group-label {
  flex: 0 0 64px;
  padding-top: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.filter-panel .filter-bar { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; }
.filter-panel .filter-btn {
  background: #fff;
  border: 1px solid var(--accent);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 13px;
  transition: background 0.15s ease, color 0.15s ease;
}
.filter-panel .filter-btn:hover { background: var(--accent); color: #fff; }
.filter-panel .filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-panel .filter-btn.active .filter-btn-count,
.filter-panel .filter-btn:hover .filter-btn-count { color: rgba(255, 255, 255, 0.85); }
.filter-panel .filter-btn-count { color: var(--accent); font-weight: 500; }
.filter-panel .filter-btn:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }

.family-select-wrap { display: none; flex: 1; }
.family-select {
  width: 100%;
  padding: 11px 40px 11px 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-dark);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239c4009' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 17px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  -webkit-appearance: none;
  appearance: none;
}

/* The decade filter on the Discontinued page gets the same treatment */
.filter-bar[data-filter-key="decade"] { display: flex; flex-wrap: wrap; gap: 7px; }

@media (max-width: 700px) {
  .filter-panel { padding: 14px; gap: 10px; }
  .filter-group { flex-direction: column; gap: 6px; }
  .filter-group-label { flex: none; padding-top: 0; }
  .filter-panel .filter-bar[data-filter-key="category"] { display: none; }
  .family-select-wrap { display: block; width: 100%; }
}

/* The first group needs no rule above it, and Current reads as the live
   set, so it takes the brand colour while Discontinued stays muted. */
.products-status-divider--current { margin-top: 0; padding-top: 0; border-top: none; }
.products-status-divider--current .products-status-divider-label { color: var(--accent-dark); }

/* Green "Current" tag marking the model still on sale in a timeline */
.tl-entry-type--current { background: var(--fresh-bg); color: var(--fresh-text); }

/* Keep a timeline entry's tags together so they stay on one line,
   wrapping as a group under a long product name rather than splitting */
.tl-entry-tags { display: inline-flex; align-items: center; gap: 6px; flex-wrap: nowrap; }

/* Contact page */
.page-narrow { max-width: 640px; }
.contact-form { margin-top: 1.75rem; display: flex; flex-direction: column; gap: 18px; }
.contact-field { display: flex; flex-direction: column; gap: 6px; }
/* A class-based display rule beats the browser's own [hidden] styling,
   so restore it or the prefilled page field shows on a direct visit. */
.contact-field[hidden] { display: none; }
.contact-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.contact-field input[type="text"],
.contact-field input[type="email"],
.contact-field select,
.contact-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: #fff;
  border: 1px solid #d8d4ca;
  border-radius: 10px;
}
.contact-field textarea { resize: vertical; min-height: 150px; line-height: 1.5; }
.contact-field input:focus, .contact-field select:focus, .contact-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.contact-field input[readonly] { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-dark); font-weight: 600; }
.contact-help { margin: 0; font-size: 12px; color: var(--text-secondary); }
.contact-submit { align-self: flex-start; border: none; cursor: pointer; font-size: 15px; }
/* Honeypot: hidden from people, visible to bots that fill everything in */
.contact-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* "Something not right" link on product pages */
.report-line { margin: 1.5rem 0 0; }
.report-link {
  display: inline-block;
  font-size: 15px;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px dotted var(--border);
  padding-bottom: 1px;
}
.report-link:hover { color: var(--accent-dark); border-bottom-color: var(--accent); }

/* Progress through the family's usual gap, inside the day-count box */
.days-hero-track {
  display: block;
  height: 6px;
  margin-top: 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.09);
  overflow: hidden;
}
.days-hero-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.55;
}
.days-hero-fill.is-over { opacity: 0.85; }
.days-hero-caption {
  display: block;
  margin-top: 7px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
}

/* Generations table: stacks into labelled rows on a phone rather than
   scrolling sideways, so nothing is hidden off the edge */
@media (max-width: 700px) {
  .generations-table-wrap { overflow-x: visible; }
  .generations-table, .generations-table tbody, .generations-table tr, .generations-table td { display: block; width: 100%; }
  .generations-table thead { display: none; }
  .generations-table tr {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
  }
  .generations-table tr.generation-row--current { border-color: var(--accent); background: var(--accent-bg); }
  .generations-table td { border-bottom: none; padding: 3px 0; white-space: normal; display: flex; justify-content: space-between; gap: 12px; }
  .generations-table td.generation-name { display: block; font-size: 16px; margin-bottom: 4px; }
  .generations-table td[data-label]::before {
    content: attr(data-label);
    font-size: 13px;
    color: var(--text-secondary);
    flex: 0 0 auto;
  }
  .generations-table td[data-label] { font-weight: 600; }
}
