/* Sommelier-specific styles. Layered on top of cellarmate.css design tokens.
 *
 * The result page uses zero card backgrounds — instead, rows of editorial
 * prose separated by hairline rules. The home page keeps card surfaces but
 * applies the new paper palette.
 */
[x-cloak] { display: none !important; }

/* Status text fade — the loading indicator on the result page. */
@keyframes cm-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
.animate-pulse { animation: cm-pulse 1.6s ease-in-out infinite; }

/* Result page — wine row layout. Hairline-divided list, no per-row cards. */
.result-list      { display: flex; flex-direction: column; }
.result-row       {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: var(--space-4);
  padding: var(--space-8) 0 var(--space-6);
  border-top: 1px solid var(--somm-rule);
}
.result-row:first-child { border-top: none; padding-top: var(--space-4); }
.result-row__rank {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 144;
  font-weight: 300;
  font-size: var(--text-display-md);
  line-height: 0.85;
  color: var(--somm-accent);
  font-feature-settings: "lnum" 1;
  margin-top: 0.1em;
}
.result-row__main      { min-width: 0; }
.result-row__head      {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.result-row__producer  {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 60, "opsz" 36;
  font-weight: 500;
  font-size: var(--text-display-sm);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--somm-fg);
}
.result-row__wine      {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 24, "SOFT" 100;
  color: var(--somm-fg);
  font-size: var(--text-lg);
  margin-top: 0.15rem;
}
.result-row__prices    {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: var(--space-3);
  align-items: baseline;
  justify-content: end;
  font-variant-numeric: tabular-nums;
  font-size: var(--text-sm);
}
.result-row__prices dt { color: var(--somm-quiet); text-align: right; }
.result-row__prices dd { color: var(--somm-fg); font-weight: 500; }
.result-row__menu      { font-size: var(--text-base); }
.result-row__menu dd   { font-weight: 600; }

.result-row__markup    {
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  margin-top: var(--space-1);
}
.result-row__markup--fair       { color: var(--tier-fair); }
.result-row__markup--standard   { color: var(--tier-standard); }
.result-row__markup--aggressive,
.result-row__markup--high       { color: var(--tier-high); }
.result-row__markup--gouge      { color: var(--tier-gouge); font-weight: 600; }

.result-row__meta {
  display: flex;
  gap: var(--space-3);
  align-items: baseline;
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--somm-muted);
}
.result-row__winner {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--somm-rule-strong);
  border-radius: var(--radius-chip);
  color: var(--somm-fg);
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
}
.result-row__score {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 36;
  font-weight: 500;
  color: var(--somm-fg);
  font-variant-numeric: tabular-nums;
}

/* Score chip becomes a button when score-breakdown is available. */
.result-row__score-btn {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.result-row__score-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  border: 1px solid var(--somm-rule-strong);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--somm-muted);
  line-height: 1;
}
.result-row__score-help.is-open {
  background: var(--somm-accent);
  color: var(--somm-on-accent);
  border-color: var(--somm-accent);
}

.result-row__score-explain {
  flex-basis: 100%;
  margin-top: var(--space-3);
  padding: var(--space-4) var(--space-4) var(--space-3);
  background: var(--somm-surface);
  border: 1px solid var(--somm-rule);
  border-radius: 0.75rem;
  max-width: 30rem;
}
.result-row__score-explain dl {
  display: grid;
  gap: var(--space-2);
}
.result-row__score-explain .score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-3);
}
.result-row__score-explain dt {
  font-size: var(--text-sm);
  color: var(--somm-fg);
  display: flex;
  flex-direction: column;
}
.result-row__score-explain .score-row__hint {
  font-size: 0.7rem;
  color: var(--somm-muted);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}
.result-row__score-explain dd {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 6.5rem;
}
.result-row__score-explain .score-row__bar {
  display: inline-block;
  width: 4rem;
  height: 0.35rem;
  background: var(--somm-rule);
  border-radius: 9999px;
  overflow: hidden;
}
.result-row__score-explain .score-row__bar span {
  display: block;
  height: 100%;
  background: var(--somm-accent);
}
.result-row__score-explain .score-row__num {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--somm-fg);
  min-width: 1.75rem;
  text-align: right;
}
.score-explain__foot {
  margin-top: var(--space-3);
  font-size: 0.62rem;
  color: var(--somm-quiet);
}

.result-row__why {
  margin-top: var(--space-4);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--somm-fg);
  max-width: 60ch;
}
.result-row__talktrack {
  margin: var(--space-4) 0 0;
  padding: var(--space-3) var(--space-4);
  border-left: 2px solid var(--somm-accent);
  background: var(--somm-surface);
  font-family: var(--font-display);
  font-variation-settings: "opsz" 18, "SOFT" 80;
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.45;
  color: var(--somm-fg);
  max-width: 56ch;
  position: relative;
}
.result-row__talktrack-mark {
  color: var(--somm-accent);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1em;
}
.result-row__talktrack-label {
  display: block;
  margin-top: var(--space-1);
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--somm-muted);
  font-style: normal;
}

.result-row__tasting-toggle {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--somm-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.result-row__tasting-toggle:hover { color: var(--somm-fg); }
.result-row__tasting {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--somm-muted);
  max-width: 62ch;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 14, "SOFT" 30;
  font-weight: 400;
}

.result-row__footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: var(--space-6);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--somm-quiet);
}
.result-row__sources a {
  color: var(--somm-fg);
  text-decoration: none;
  border-bottom: 1px solid var(--somm-rule-strong);
}
.result-row__sources a:hover { border-bottom-color: var(--somm-accent); }

.result-row__hadthis {
  background: none;
  border: 1px solid var(--somm-rule-strong);
  border-radius: var(--radius-chip);
  padding: 0.35rem 0.8rem;
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--somm-fg);
  cursor: pointer;
}
.result-row__hadthis:hover { border-color: var(--somm-fg); }

.result-row__encounter {
  font-size: var(--text-xs);
  font-style: italic;
  letter-spacing: normal;
  text-transform: none;
  color: var(--somm-accent);
}

/* Section heads — "Bottles", "Glasses" — editorial style, all-caps small. */
.section-head {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--somm-muted);
  font-weight: 600;
  margin: var(--space-12) 0 var(--space-2);
}
.section-head:first-of-type { margin-top: var(--space-6); }

/* Page header */
.page-head {
  margin-top: var(--space-6);
  margin-bottom: var(--space-8);
}
.page-head h1 {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 30, "WONK" 1, "opsz" 144;
  font-weight: 500;
  font-size: var(--text-display-lg);
  line-height: 0.95;
  letter-spacing: -0.025em;
}
.page-head .status {
  margin-top: var(--space-2);
  font-style: italic;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 14, "SOFT" 100;
  font-weight: 400;
  color: var(--somm-muted);
}

/* Home-page filter card surface — paper inset. */
.paper-surface {
  background: var(--somm-surface);
  border: 1px solid var(--somm-rule);
  border-radius: var(--radius-card);
}
