/* Evelina QR Admin - full analytics dashboard */

/* Real brand fonts, self-hosted (CSP font-src 'self'). Same files the
   storefront serves, so the admin matches the site exactly. */
@font-face {
  font-family: 'GT America';
  src: url('/admin/fonts/gt-america.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Stringer';
  src: url('/admin/fonts/stringer-light.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'GT America Mono';
  src: url('/admin/fonts/gt-america-mono.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --ink: #2D2B28;
  --muted: #8a8378;
  --faint: #a9a396;
  --cream: #FFFAF4;
  --beige: #EDE8DF;
  --line: #DDD8CE;
  --white: #ffffff;
  --green: #6B8F4A;
  --red: #c0392b;
  --accent: #333333;
  --blue: #4A6B8F;
  --orange: #C27A3A;
  --radius: 8px;
  --sans: 'GT America', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --serif: 'Stringer', Georgia, 'Times New Roman', serif;
  --mono: 'GT America Mono', 'SF Mono', Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--sans); font-size: 14px; color: var(--ink);
  background: var(--cream); min-height: 100vh; -webkit-font-smoothing: antialiased;
}
.screen { max-width: 1060px; margin: 0 auto; padding: 32px 24px; }

/* Login */
#login-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 0; }
/* Per-screen [hidden] overrides — needed because the generic `[hidden]` rule
   (specificity 0,1,0) can't beat the IDs above (1,0,0). The compound
   `#id[hidden]` (1,1,0) wins cleanly without !important. */
#login-screen[hidden],
#dashboard-screen[hidden],
#edit-screen[hidden] { display: none; }
.login-box { text-align: center; width: 320px; }
.logo { display: block; height: 42px; width: auto; margin: 0 auto 6px; }
.login-subtitle { color: var(--muted); font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 32px; }
#login-form { display: flex; flex-direction: column; gap: 12px; }
#login-password { width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--sans); font-size: 14px; background: var(--white); color: var(--ink); text-align: center; }
#login-password:focus { outline: none; border-color: var(--accent); }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; gap: 16px; }
.topbar__title { font-family: var(--serif); font-size: 28px; font-weight: 300; letter-spacing: -0.01em; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border: none; border-radius: var(--radius); font-family: var(--sans); font-size: 14px; cursor: pointer; text-decoration: none; transition: background 0.15s, transform 0.1s, box-shadow 0.15s; }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: #1a1a18; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.btn--secondary { background: var(--beige); color: var(--ink); }
.btn--secondary:hover { background: var(--line); }
.btn--danger { background: transparent; color: var(--red); border: 1px solid var(--red); }
.btn--danger:hover { background: #fdf2f0; }
.btn--text { background: none; color: var(--muted); padding: 8px 0; }
.btn--text:hover { color: var(--ink); }
.btn--sm { padding: 8px 16px; font-size: 12px; }

/* Stats */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.stats-row--4 { grid-template-columns: repeat(4, 1fr); }
.stats-row--5 { grid-template-columns: repeat(5, 1fr); }
.stat-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.stat-card__value { font-family: var(--serif); font-size: 28px; font-weight: 300; letter-spacing: -0.02em; }
/* Sub-line below the main value (EUR equivalent of a CZK reward).
   Slightly larger + bolder than the label so it doesn't get lost in
   the tiny-text layer; mono keeps the digits aligned. Lives between
   value and label by display order. */
.stat-card__sub {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  opacity: 0.65;
  margin-top: 2px;
  letter-spacing: 0.01em;
  cursor: help;
}
.stat-card--accent .stat-card__sub { color: var(--green); opacity: 0.75; }
.stat-card__label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.stat-card--accent { border-color: var(--green); }
.stat-card--accent .stat-card__value { color: var(--green); }

/* Table */
.table-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 12px 14px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); border-bottom: 1px solid var(--line); font-weight: 400; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--cream); }
.table--sm td { padding: 10px 14px; font-size: 12px; }
.table .code-cell { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.table .url-cell { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.table .scan-cell { font-family: var(--mono); font-size: 12px; }
.table .action-cell { text-align: right; }
.table .action-cell a { color: var(--accent); text-decoration: none; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }
.table .action-cell a:hover { text-decoration: underline; }
.empty-state { padding: 48px; text-align: center; color: var(--muted); font-size: 14px; }

/* Edit form */
.edit-grid { display: grid; grid-template-columns: 1fr 300px; gap: 32px; margin-bottom: 40px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field__label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.field__input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--sans); font-size: 14px; background: var(--white); color: var(--ink); }
.field__input:focus { outline: none; border-color: var(--accent); }
.field__input-row { display: flex; gap: 8px; align-items: stretch; }
.field__input-row .field__input { flex: 1; }
.btn--icon { width: 40px; padding: 0; background: var(--white); border: 1px solid var(--line); color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s, transform 0.15s; }
.btn--icon:hover { background: var(--cream); color: var(--ink); }
.btn--icon:active { transform: rotate(180deg); }
.btn--icon:disabled { opacity: 0.3; cursor: not-allowed; }
.field__hint { font-size: 11px; color: var(--faint); line-height: 1.5; }
.field__hint strong { color: var(--ink); font-weight: 400; }
.field--toggle { flex-direction: row; align-items: center; gap: 12px; }
.form-actions { margin-top: 8px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.edit-preview { display: flex; flex-direction: column; gap: 12px; }
.qr-preview { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; justify-content: center; min-height: 240px; }
.qr-preview svg { width: 100%; height: auto; }
.qr-preview__placeholder { color: var(--faint); font-size: 13px; text-align: center; }
.preview-actions { display: flex; gap: 8px; }

/* Section titles */
.section-title { font-family: var(--serif); font-size: 20px; font-weight: 300; margin: 32px 0 16px; }

/* Chart cards */
.charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.chart-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.chart-card--full { margin-bottom: 12px; }
.chart-card__title { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 16px; font-weight: 400; }
.chart-card__subtitle { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: 10px; font-weight: 400; }
.chart-double { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Bar charts */
.chart-bars { display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: flex; align-items: center; gap: 8px; }
.bar-row__label { font-family: var(--mono); font-size: 10px; width: 56px; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.bar-row__bar { flex: 1; height: 18px; background: var(--beige); border-radius: 3px; overflow: hidden; }
.bar-row__fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.3s ease; }
.bar-row__count { font-family: var(--mono); font-size: 10px; width: 36px; text-align: right; flex-shrink: 0; color: var(--muted); }

/* Sparkline */
.sparkline-wrap { height: 100px; position: relative; }
.sparkline-wrap svg { width: 100%; height: 100%; }

/* Mini sparkline in table */
.mini-spark { display: inline-block; width: 64px; height: 20px; vertical-align: middle; }
.mini-spark svg { width: 100%; height: 100%; }

/* Hour-of-day chart */
.hour-chart { display: flex; align-items: flex-end; gap: 2px; height: 80px; }
.hour-bar { flex: 1; background: var(--beige); border-radius: 2px 2px 0 0; min-height: 2px; transition: height 0.3s ease; position: relative; cursor: default; }
.hour-bar--active { background: var(--accent); }
.hour-chart__labels { display: flex; gap: 2px; margin-top: 4px; }
.hour-chart__labels span { flex: 1; font-family: var(--mono); font-size: 8px; text-align: center; color: var(--faint); }

/* Donut chart */
.donut-wrap { display: flex; align-items: center; gap: 24px; }
.donut-svg { flex-shrink: 0; }
.donut-legend { display: flex; flex-direction: column; gap: 6px; }
.donut-legend__item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.donut-legend__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.donut-legend__pct { font-family: var(--mono); font-size: 11px; color: var(--muted); width: 36px; }

/* Conversion funnel */
.funnel { display: flex; flex-direction: column; gap: 0; align-items: center; }
.funnel__step { width: 100%; padding: 14px 16px; text-align: center; font-size: 13px; color: var(--white); border-radius: 4px; position: relative; }
.funnel__step-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.8; }
.funnel__step-value { font-family: var(--serif); font-size: 22px; font-weight: 300; }
.funnel__arrow { font-size: 11px; color: var(--muted); padding: 6px 0; font-family: var(--mono); }

/* Country flag emoji */
.flag { font-size: 14px; margin-right: 4px; }

/* Filter tab bar (Active / Archived / All) above the codes table */
.filter-bar { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.filter-tab { background: transparent; border: none; padding: 10px 16px 12px; font-family: var(--sans); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.15s, border-color 0.15s; }
.filter-tab:hover { color: var(--ink); }
.filter-tab--active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 500; }
.filter-tab__count { display: inline-block; margin-left: 6px; padding: 1px 7px; background: var(--beige); border-radius: 10px; font-family: var(--mono); font-size: 10px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.filter-tab--active .filter-tab__count { background: var(--accent); color: var(--white); }

/* Archive state — applied on table rows + on detail page */
.archive-badge { display: inline-flex; align-items: center; padding: 4px 10px; background: var(--beige); border-radius: 4px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.topbar__actions { display: flex; gap: 8px; align-items: center; }
.table tr.row--archived td { opacity: 0.55; }
.table tr.row--archived td.code-cell::after { content: " · archived"; font-family: var(--mono); font-size: 9px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.08em; margin-left: 6px; }

/* Resource picker (Shopify product/collection/page/article + URL tab) */
.picker { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.picker__tabs { display: flex; border-bottom: 1px solid var(--line); background: var(--cream); }
.picker__tab { flex: 1; padding: 10px 8px; background: transparent; border: none; border-right: 1px solid var(--line); font-family: var(--sans); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); cursor: pointer; transition: background 0.15s, color 0.15s; }
.picker__tab:last-child { border-right: none; }
.picker__tab:hover { background: var(--beige); color: var(--ink); }
.picker__tab--active { background: var(--white); color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); font-weight: 500; }

.picker__search { position: relative; padding: 12px; }
.picker__search .field__input { width: 100%; }
.picker__url { padding: 12px; display: flex; flex-direction: column; gap: 6px; }

.picker__results { position: absolute; top: calc(100% - 4px); left: 12px; right: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); max-height: 340px; overflow-y: auto; z-index: 10; box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.picker__result { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; border-bottom: 1px solid var(--line); transition: background 0.12s; }
.picker__result:last-child { border-bottom: none; }
.picker__result:hover { background: var(--cream); }
.picker__result-img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; background: var(--beige); flex-shrink: 0; }
.picker__result-img--placeholder { background: var(--beige); }
.picker__result-body { flex: 1; min-width: 0; }
.picker__result-title { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker__result-subtitle { font-family: var(--mono); font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.picker__loading, .picker__empty, .picker__error { padding: 14px; font-size: 12px; color: var(--muted); text-align: center; }
.picker__error { color: var(--red); }
.picker__error a { color: var(--accent); margin-left: 6px; }

.picker__selected { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--cream); border-top: 1px solid var(--line); }
.picker__selected-img { width: 56px; height: 56px; border-radius: 6px; object-fit: cover; background: var(--beige); flex-shrink: 0; }
.picker__selected-body { flex: 1; min-width: 0; }
.picker__selected-type { font-family: var(--mono); font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 2px; }
.picker__selected-title { font-size: 14px; color: var(--ink); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker__selected-url { font-family: var(--mono); font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.picker__selected-clear { flex-shrink: 0; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; }

/* Feedback */
.error { color: var(--red); font-size: 13px; }
.success { color: var(--green); font-size: 13px; }

/* Mobile */
@media (max-width: 768px) {
  .stats-row, .stats-row--4, .stats-row--5 { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .edit-grid { grid-template-columns: 1fr; }
  .chart-double { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; }
  .screen { padding: 20px 16px; }
  .donut-wrap { flex-direction: column; }
}
@media (max-width: 480px) {
  .stats-row, .stats-row--4, .stats-row--5 { grid-template-columns: 1fr; }
}

/* ----------------------------------------------------------------------
   Top navigation (QR Kódy ↔ Marek odměna)
   ---------------------------------------------------------------------- */
.topnav {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 4px 28px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 24px 0;
}
.topnav__brand { display: flex; align-items: center; flex: none; }
.topnav__logo { height: 23px; width: auto; display: block; }
.topnav__links { display: flex; align-items: stretch; gap: 4px; margin-left: auto; }
.topnav__link {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 14px 20px;
  margin-bottom: -1px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #8a8378;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.topnav__link:hover { color: #2D2B28; }
.topnav__link--active {
  color: #2D2B28;
  border-bottom-color: #2D2B28;
}

/* ---- Marek-specific bits ---------------------------------------------- */
.topbar__subtitle {
  font-size: 13px;
  color: #8a8378;
  margin-left: auto;
}
.filter-bar--marek { flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.marek-custom {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 0 0 24px 0;
  padding: 16px;
  background: #FAF7F1;
  border: 1px solid #e6e2da;
  border-radius: 8px;
}
.field--inline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}
.field--inline .field__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8a8378;
}
.field--inline .field__input { width: 160px; }
.stats-row--3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 28px 0;
}
@media (max-width: 700px) {
  .stats-row--3 { grid-template-columns: 1fr; }
}
.section-title__count {
  font-size: 13px;
  font-weight: 400;
  color: #8a8378;
  margin-left: 8px;
}
.table th.num,
.table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
/* Shopify Admin deep link for individual orders in the Marek table.
   Subtle dotted underline to signal "this is a link" without competing
   with the row's data hierarchy. Hover lifts to a solid line. */
.order-link {
  color: #2D2B28;
  text-decoration: none;
  border-bottom: 1px dotted #b9b3a8;
  padding-bottom: 1px;
  font-weight: 500;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.order-link:hover {
  color: #6B8F4A;
  border-bottom-color: #6B8F4A;
  border-bottom-style: solid;
}
.order-link:focus-visible {
  outline: 2px solid #6B8F4A;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ----------------------------------------------------------------------
   Reviews moderation pane
   ---------------------------------------------------------------------- */
.topnav__count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  background: var(--accent, #6B8F4A);
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}
.reviews-list { display: flex; flex-direction: column; gap: 12px; }
/* ── Reviews: same visual system as the PDP widget (mono micro-labels,
      hairline separators, ink on paper, gold only on stars). ── */
.reviews-sort { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 2px 0 10px; }
.rsort {
  appearance: none; background: transparent; border: 0;
  border-bottom: 1px solid transparent; border-radius: 0;
  padding: 6px 0 7px;
  font-family: 'GT America Mono', ui-monospace, monospace;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted, #8a8378); cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.rsort:hover { color: var(--ink, #2D2B28); }
.rsort--active { color: var(--ink, #2D2B28); border-bottom-color: var(--ink, #2D2B28); }

.reviews-list { display: flex; flex-direction: column; gap: 0; border-bottom: 1px solid #E7E0D2; }
.review-card {
  background: transparent;
  border: 0;
  border-top: 1px solid #E7E0D2;
  border-radius: 0;
  padding: 24px 0 22px;
  box-shadow: none;
}
.review-card--rejected { opacity: 0.55; }
.review-card__hdr {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.review-card__avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: #f2f1ee; }
.review-card__avatar--ph {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, #CA9664 0%, #7A4A2C 100%);
  color: #FAF6EF;
  font-family: 'Stringer', Georgia, serif; font-size: 15px;
}
.review-card__id { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.review-card__id-top { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.review-card__stars { font-size: 15px; color: #D9D2C4; letter-spacing: 1.5px; }
.rstar--on { color: #C5A453; }
.review-card__author { font-weight: 500; font-size: 14px; color: var(--ink, #2D2B28); }
.review-card__status {
  font-family: 'GT America Mono', ui-monospace, monospace;
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.09em;
  background: transparent; border: 0; padding: 0; border-radius: 0;
}
.review-card__status--pending  { color: #8A6B0F; }
.review-card__status--approved { color: #4F6E33; }
.review-card__status--rejected { color: #B4493F; }
.review-card__date {
  margin-left: auto;
  font-family: 'GT America Mono', ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: 0.04em;
  color: var(--muted, #8a8378);
  white-space: nowrap;
}
.review-card__product {
  font-family: 'GT America Mono', ui-monospace, monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted, #8a8378);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.review-card__body {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.7;
  color: #46423D;
  white-space: pre-wrap;
}
.review-card__taste { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 10px 0 0; }
.taste-chip {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 0; background: transparent; border: 0;
  font-family: 'GT America Mono', ui-monospace, monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.07em;
  color: #46423D;
}
.taste-chip + .taste-chip::before { content: '\00B7'; margin: 0 10px; color: #E7E0D2; }
.taste-chip em { font-style: normal; color: var(--muted, #8a8378); }
.review-card__brew-details {
  margin: 8px 0 0;
  font-family: 'GT America Mono', ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: 0.04em;
  color: var(--muted, #8a8378);
}
.rscales { display: flex; gap: 16px; margin-top: 12px; max-width: 400px; }
.rscale { flex: 1 1 0; min-width: 0; }
.rscale__top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-bottom: 5px; }
.rscale__label {
  font-family: 'GT America Mono', ui-monospace, monospace;
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted, #8a8378);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rscale__val { font-family: 'GT America Mono', ui-monospace, monospace; font-size: 9.5px; color: var(--ink, #2D2B28); flex: 0 0 auto; }
.rscale__track { display: block; position: relative; height: 2px; background: #EFEAE0; overflow: hidden; }
.rscale__track i { display: block; height: 100%; background: var(--ink, #2D2B28); }
.review-card__rebuy {
  margin: 12px 0 0;
  font-family: 'GT America Mono', ui-monospace, monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.09em;
  color: #46423D;
}
.review-card__media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin: 12px 0 0;
  max-width: 440px;
}
.review-card__media-item {
  position: relative; display: block; aspect-ratio: 1;
  border-radius: 6px; overflow: hidden;
  background: #EFEAE0; border: 1px solid #E7E0D2;
}
.review-card__media-item img,
.review-card__media-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.review-card__media-tag {
  position: absolute; inset: auto 6px 6px auto;
  padding: 2px 7px;
  background: rgba(45,43,40,0.72); color: #FAF6EF;
  font-family: 'GT America Mono', ui-monospace, monospace;
  font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: 4px; pointer-events: none;
}
.review-card__discount {
  margin: 12px 0 0;
  font-family: 'GT America Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--muted, #8a8378);
}
.review-card__discount strong { font-weight: 400; color: var(--ink, #2D2B28); letter-spacing: 0.08em; }
.review-card__reply {
  margin: 14px 0 0;
  padding: 2px 0 2px 14px;
  background: transparent;
  border-left: 2px solid var(--ink, #2D2B28);
  border-radius: 0;
  font-size: 14px;
}
.review-card__reply strong {
  display: block;
  font-family: 'GT America Mono', ui-monospace, monospace;
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted, #8a8378); margin-bottom: 4px; font-weight: 400;
}
.review-card__reply p { margin: 0; line-height: 1.6; color: #46423D; }
.review-card__actions {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  padding-top: 0;
  border-top: 0;
}
.raction {
  appearance: none; background: transparent; border: 0; padding: 0;
  font-family: 'GT America Mono', ui-monospace, monospace;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted, #8a8378); cursor: pointer;
  text-decoration: underline; text-decoration-color: #E7E0D2; text-underline-offset: 3px;
  transition: color 0.15s;
}
.raction:hover { color: var(--ink, #2D2B28); }
.raction--good:hover { color: #4F6E33; }
.raction--danger:hover { color: #B4493F; }
@media (max-width: 540px) {
  .review-card__author { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .review-card__date { flex: 0 0 auto; }
}

.dev-tools {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line, #e6e2da);
}
.dev-tools__row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dev-tools__row .field__input { width: 280px; }

/* ─── Waiting list ───────────────────────────────────────────────── */
.topbar__hint {
  font-size: 12px;
  color: var(--muted, #8a8378);
  letter-spacing: 0.02em;
}
.waitlist-toggle {
  margin-bottom: 0;
  cursor: pointer;
  user-select: none;
}
.waitlist-toggle:focus-visible {
  outline: 2px solid var(--blue, #4A6B8F);
  outline-offset: 3px;
  border-radius: 4px;
}
.waitlist-chev {
  flex: none;
  margin-top: 2px;
  color: var(--muted, #8a8378);
  transition: transform 0.22s ease, color 0.12s;
}
.waitlist-toggle:hover .waitlist-chev { color: var(--ink, #2D2B28); }
.waitlist-toggle[aria-expanded="true"] .waitlist-chev { transform: rotate(90deg); }
.waitlist-emails-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.26s ease;
}
.waitlist-emails-wrap.is-open { grid-template-rows: 1fr; }
.waitlist-emails {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  min-height: 0;
  padding-top: 12px;
}
.waitlist-row {
  display: grid;
  grid-template-columns: 1fr auto 28px 28px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #FAF7F1;
  border: 1px solid #EFEAE0;
  border-radius: 6px;
  font-size: 13px;
}
.waitlist-row__email {
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: #2D2B28;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.waitlist-row__date {
  font-size: 11.5px;
  color: #8a8378;
  white-space: nowrap;
}
.waitlist-row__copy, .waitlist-row__remove {
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #46423D;
  transition: all 0.12s;
}
.waitlist-row__copy:hover { background: #ffffff; border-color: #DDD8CE; }
.waitlist-row__remove:hover { background: #FEF1F1; color: #8B3A3A; border-color: #F0BFBF; }
.dev-tools__result { font-size: 12px; color: var(--muted, #8a8378); font-family: var(--mono, monospace); }

/* ── Newsletter analytics ─────────────────────────────────────── */
.nl-custom { display: flex; align-items: flex-end; gap: 12px; margin: 0 0 20px; flex-wrap: wrap; }

.nl-chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.nl-chart-head .chart-card__title { margin-bottom: 0; }
.nl-gran { display: inline-flex; background: var(--beige); border-radius: 7px; padding: 2px; gap: 2px; }
.nl-gran__btn { border: none; background: transparent; padding: 5px 11px; font-family: var(--sans); font-size: 11px; color: var(--muted); cursor: pointer; border-radius: 5px; transition: background 0.15s, color 0.15s; }
.nl-gran__btn:hover { color: var(--ink); }
.nl-gran__btn--active { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

.nl-chart { position: relative; width: 100%; min-height: 280px; }
.nl-svg { overflow: visible; }
.nl-bar { fill: var(--accent); opacity: 0.85; transition: opacity 0.15s; }
.nl-area { fill: url(#nlGrad); }
.nl-line { fill: none; stroke: var(--green); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.nl-grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.nl-ax { font-family: var(--mono); font-size: 9px; fill: var(--faint); }
.nl-ax--l { text-anchor: end; }
.nl-ax--r { text-anchor: start; fill: var(--green); opacity: 0.85; }
.nl-ax--x { fill: var(--muted); }
.nl-cursor { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }

.nl-tip { position: absolute; top: 6px; transform: translateX(-50%); background: var(--ink); color: var(--white); padding: 8px 11px; border-radius: 6px; font-size: 11px; line-height: 1.55; pointer-events: none; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,0.2); z-index: 5; }
.nl-tip strong { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.05em; margin-bottom: 4px; opacity: 0.75; text-transform: uppercase; }
.nl-tip__row { display: flex; align-items: center; gap: 6px; }
.nl-tip__row b { font-family: var(--mono); margin-left: 2px; }
.nl-tip__dot { width: 8px; height: 8px; display: inline-block; }
.nl-tip__dot--bar { background: #b9b4ac; border-radius: 2px; }
.nl-tip__dot--line { background: var(--green); border-radius: 50%; }

.nl-legend { display: flex; gap: 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.nl-legend__item { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); }
.nl-legend__swatch { display: inline-block; }
.nl-legend__swatch--bar { width: 13px; height: 11px; border-radius: 2px; background: var(--accent); opacity: 0.85; }
.nl-legend__swatch--line { width: 16px; height: 3px; border-radius: 2px; background: var(--green); }

.nl-time { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.nl-prod { color: var(--muted); }

@media (max-width: 720px) {
  .nl-chart-head { flex-direction: column; align-items: flex-start; }
  .stats-row--4 { grid-template-columns: repeat(2, 1fr); }
}

/* ----------------------------------------------------------------------
   `hidden` attribute support — placed at end of file so equal-specificity
   class rules (like .btn { display: inline-flex }) lose to it via source
   order. No !important needed because (.btn) and ([hidden]) are both
   specificity (0,1,0); the later declaration wins.
   For elements selected by ID with custom display (the screens above),
   the per-screen #id[hidden] rules higher up handle the override.
   ---------------------------------------------------------------------- */
[hidden] { display: none; }
