/* ══════════════════════════════════════════════════════════════════
   Yar feature voting on the v12 model (public/yar/features.html,
   landing/yar-features.js). Reads the site tokens only, so it follows
   the high-contrast and larger-text toggles. Every interactive target
   is at least 44 px.
   ══════════════════════════════════════════════════════════════════ */

.yv { --yv-radius: 14px; }
.yv .section-title { font-size: var(--fs-h3); }
.yv .section-sub { max-width: 62ch; }
.yv-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.yv-status, .yv-note, .yv-noscript { color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 62ch; }
.yv-note { margin: 12px 0 0; }
.yv-noscript { padding: 16px 18px; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--yv-radius); }
.yv-noscript a, .yv-note a, .yv-error a { color: var(--cg-violet-800); text-decoration: underline; text-underline-offset: 3px; }

.yv-error {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 18px 20px; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--yv-radius);
}
.yv-error p { margin: 0; color: var(--ink); line-height: 1.55; }
.yv-error[hidden], .yv-status[hidden] { display: none; }

/* ── Foundations: always on ─────────────────────────────────── */
.yv-fnd { margin-bottom: clamp(40px, 5vw, 64px); }
.yv-fnd .section-head { margin-bottom: 28px; }
.yv-fnd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.yv-fnd-card {
  padding: 18px 20px 20px; background: var(--surface); border: 1px solid var(--hair);
  border-radius: 16px; border-top: 3px solid var(--cg-teal-700);
}
.yv-fnd-card h3 { font: 600 16.5px/1.3 var(--f-display); color: var(--ink); margin: 0 0 6px; }
.yv-fnd-card > p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.yv-fnd-card ul { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.yv-fnd-card li { position: relative; padding-left: 16px; font-size: 14px; line-height: 1.45; color: var(--ink-2, var(--ink)); }
.yv-fnd-card li::before {
  content: ''; position: absolute; left: 1px; top: .55em; width: 6px; height: 6px; border-radius: 50%;
  background: var(--cg-teal-700);
}
.yv-fnd-card li.is-flagship { font-weight: 600; color: var(--ink); }

/* ── Your picks ─────────────────────────────────────────────── */
.yv-picks {
  margin: 0 0 clamp(32px, 4vw, 48px); background: var(--surface); border: 1px solid var(--hair);
  border-radius: var(--yv-radius);
}
.yv-picks[hidden] { display: none; }
.yv-picks > summary {
  display: flex; align-items: center; min-height: 52px; padding: 0 20px; cursor: pointer;
  font: 600 15.5px/1.3 var(--f-display); color: var(--ink); list-style: none;
}
.yv-picks > summary::-webkit-details-marker { display: none; }
.yv-picks > summary::after {
  content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .2s ease;
}
.yv-picks[open] > summary::after { transform: rotate(-135deg); }
.yv-picks-body { padding: 0 20px 18px; }
.yv-picks-empty { margin: 0; color: var(--muted); font-size: 14.5px; }
.yv-picks-list { margin: 0; padding: 0; display: flex; flex-direction: column; }
.yv-pick {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px 14px;
  padding: 6px 0; border-top: 1px solid var(--hair);
}
.yv-pick-text { display: flex; flex-direction: column; min-width: 0; }
.yv-pick-title { font: 600 14.5px/1.35 var(--f-display); color: var(--ink); }
.yv-pick-axis { font-size: 12.5px; color: var(--muted); }
.yv-pick-score { font: 700 16px/1 var(--f-mono); color: var(--cg-violet-700); min-width: 1.5ch; text-align: right; }
.yv-pick-remove {
  min-height: 44px; min-width: 44px; padding: 0 12px; background: none; border: 1px solid var(--hair);
  border-radius: 10px; color: var(--ink); font: 600 13.5px var(--f-display); cursor: pointer;
}
.yv-pick-remove:hover { border-color: var(--cg-violet-700); color: var(--cg-violet-800); }

/* ── Axis tabs ──────────────────────────────────────────────── */
.yv-score .section-head { margin-bottom: 24px; }
.yv-tabs {
  display: flex; gap: 4px; padding: 5px; margin-bottom: 26px;
  background: var(--bg-soft); border: 1px solid var(--hair); border-radius: 16px;
}
.yv-tab {
  flex: 1 1 0; min-width: 0; min-height: 56px; padding: 6px 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: none; border: none; border-radius: 11px; color: var(--muted); cursor: pointer;
  font: 600 16px/1.2 var(--f-display);
}
.yv-tab:hover { color: var(--ink); }
.yv-tab[aria-selected="true"] {
  color: #fff; background: var(--violet);
  box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--cg-violet-600) 60%, transparent);
}
.yv-tab-n { font: 500 12px/1.2 var(--f-body); }
.yv-tab-n[hidden] { display: none; }
@media (max-width: 480px) { .yv-tab { font-size: 15px; padding: 6px 6px; } }

.yv-panel-head { margin-bottom: 8px; }
.yv-axis-title { font: 600 clamp(1.25rem, 2.4vw, 1.6rem)/1.25 var(--f-display); color: var(--ink); margin: 0 0 6px; }
.yv-axis-sub { display: inline-block; font-weight: 400; color: var(--muted); font-size: .8em; margin-left: 4px; }
.yv-axis-desc { margin: 0 0 6px; color: var(--muted); max-width: 62ch; font-size: 15.5px; line-height: 1.6; }
.yv-later-toggle {
  min-height: 44px; padding: 0; background: none; border: none; cursor: pointer;
  color: var(--cg-violet-800); font: 600 14.5px var(--f-display); text-decoration: underline; text-underline-offset: 3px;
}

/* ── groups and features ────────────────────────────────────── */
.yv-group { margin-top: 30px; }
.yv-group-title { font: 600 17px/1.3 var(--f-display); color: var(--ink); margin: 0 0 4px; }
.yv-group-desc { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; line-height: 1.55; max-width: 66ch; }
.yv-feature-list { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.yv-feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, 270px); gap: 10px 28px; align-items: center;
  padding: 14px 18px; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--yv-radius);
}
.yv-feature.is-picked { border-color: var(--cg-violet-600); background: color-mix(in srgb, var(--cg-violet-600) 5%, var(--surface)); }
.yv-feature-main { min-width: 0; }
.yv-feature-main p { max-width: none; }
.yv-feature-title { margin: 0; font: 600 15.5px/1.4 var(--f-display); color: var(--ink); }
.yv-chip {
  display: inline-block; vertical-align: 1px; margin-left: 6px; padding: 2px 9px; border-radius: 999px;
  background: var(--cg-violet-100); color: var(--cg-violet-800); font: 600 11.5px/1.5 var(--f-mono); letter-spacing: .02em;
}
.yv-feature-tag { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.yv-community { margin: 8px 0 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.yv-community[hidden] { display: none; }
.yv-community strong { color: var(--ink); font-family: var(--f-mono); }
.yv-community .yv-meter { width: 84px; }

.yv-feature-score { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; }
.yv-score-label { font: 600 12.5px/1.2 var(--f-display); color: var(--muted); }
.yv-score-label { grid-column: 1; grid-row: 1; }
.yv-score-out { grid-column: 2; grid-row: 1; font: 700 17px/1 var(--f-mono); color: var(--muted); min-width: 2ch; text-align: right; }
.yv-score-out.is-set { color: var(--cg-violet-700); }
.yv-range { grid-column: 1 / -1; grid-row: 2; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; --pct: 0%; }
.yv-range::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px;
  background: linear-gradient(to right, var(--cg-violet-700) var(--pct), color-mix(in srgb, var(--ink) 14%, transparent) var(--pct));
}
.yv-range::-moz-range-track { height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 14%, transparent); }
.yv-range::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--cg-violet-700); }
.yv-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%;
  background: var(--cg-neutral-500); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--cg-neutral-500), 0 2px 6px rgba(20, 20, 40, .25);
}
.yv-range::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: var(--cg-neutral-500);
  border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--cg-neutral-500), 0 2px 6px rgba(20, 20, 40, .25);
}
.yv-range.is-set::-webkit-slider-thumb { background: var(--cg-violet-700); box-shadow: 0 0 0 1px var(--cg-violet-700), 0 2px 6px rgba(20, 20, 40, .25); }
.yv-range.is-set::-moz-range-thumb { background: var(--cg-violet-700); box-shadow: 0 0 0 1px var(--cg-violet-700), 0 2px 6px rgba(20, 20, 40, .25); }
@media (max-width: 720px) {
  .yv-feature { grid-template-columns: minmax(0, 1fr); padding: 14px 14px 6px; }
}

/* later ideas, folded away by default */
.yv-later { margin-top: 10px; }
.yv-later > summary {
  display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none;
  color: var(--cg-violet-800); font: 600 14.5px var(--f-display);
}
.yv-later > summary::-webkit-details-marker { display: none; }
.yv-later > summary::before {
  content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .2s ease; flex: none;
}
.yv-later[open] > summary::before { transform: rotate(45deg); }
.yv-later-n { font-weight: 500; color: var(--muted); }
.yv-later > .yv-feature-list { margin-top: 4px; }

/* ── results ────────────────────────────────────────────────── */
.yv-results { margin-top: clamp(40px, 5vw, 72px); }
.yv-results .section-head { margin-bottom: 20px; }
.yv-top { margin: 0; padding: 0; counter-reset: yvtop; display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.yv-top li {
  counter-increment: yvtop; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center;
  padding: 12px 16px 12px 46px; position: relative; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--yv-radius);
}
.yv-top li::before {
  content: counter(yvtop); position: absolute; left: 16px; top: 12px; font: 700 15px/1.6 var(--f-mono); color: var(--cg-violet-700);
}
.yv-top-text { display: flex; flex-direction: column; min-width: 0; }
.yv-top-title { font: 600 15px/1.35 var(--f-display); color: var(--ink); }
.yv-top-axis { font-size: 12.5px; color: var(--muted); }
.yv-top-mean { font: 700 16px/1 var(--f-mono); color: var(--ink); }
.yv-top .yv-meter { grid-column: 1 / -1; }
.yv-meter { display: block; height: 6px; border-radius: 999px; overflow: hidden; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.yv-meter i { display: block; height: 100%; border-radius: inherit; background: var(--cg-teal-700); }

#yv-callout { margin-top: clamp(32px, 4vw, 48px); }
#yv-callout[hidden] { display: none; }

/* ── dock: count, status, save error (sticks to the bottom while scoring) ── */
.yv-dock { position: sticky; bottom: 12px; z-index: 30; margin-top: 28px; display: flex; flex-direction: column; gap: 8px; }
.yv-dock[hidden] { display: none; }
.yv-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; padding: 4px 16px;
  background: var(--surface); border: 1px solid var(--hair); border-radius: var(--yv-radius);
  box-shadow: 0 10px 28px -12px rgba(20, 20, 40, .28);
}
.yv-bar-count { font: 700 14.5px var(--f-display); color: var(--ink); }
.yv-bar-note { font-size: 13.5px; color: var(--muted); }
.yv-bar-status { font-size: 13.5px; font-weight: 600; color: var(--cg-teal-800); min-width: 6ch; }
.yv-bar-link {
  margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; color: var(--cg-violet-800);
  font: 600 14px var(--f-display); text-decoration: underline; text-underline-offset: 3px;
}
.yv-save-error {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 8px 14px;
  background: color-mix(in srgb, var(--cg-coral-600) 10%, var(--surface)); border: 1px solid var(--cg-coral-800);
  border-radius: var(--yv-radius); color: var(--ink); font-size: 14px;
}
.yv-save-error[hidden] { display: none; }
.yv-toast { bottom: 5.5rem; }
/* the site's quick-links rail is fixed at the bottom left on small screens; keep the dock clear of it */
@media (max-width: 720px) { .yv-dock { margin-left: 56px; } }
@media (max-width: 520px) {
  .yv-bar-note { display: none; }
  .yv-pick { grid-template-columns: minmax(0, 1fr) auto; }
  .yv-pick-score { grid-column: 2; grid-row: 1; }
  .yv-pick-remove { grid-column: 1 / -1; justify-self: start; }
}

html.reduced-motion .yv-picks > summary::after, html.reduced-motion .yv-later > summary::before,
body.reduce-motion .yv-picks > summary::after, body.reduce-motion .yv-later > summary::before { transition: none; }

/* ══════════════════════════════════════════════════════════════════
   2026-10-21: the circle-pack feature map, the primary view again
   (landing/yar-pack.js). Night panel from Claude Design v11.3.1
   (--cg-neutral-900 Rich Night), axis colors from the 300 stops.
   ══════════════════════════════════════════════════════════════════ */
.yv-views {
  display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 20px;
  background: var(--surface); border: 1px solid var(--hair); border-radius: 999px;
}
.yv-view-tab {
  min-height: 44px; min-width: 96px; padding: 0 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--muted); font: 600 15px var(--f-display);
}
.yv-view-tab[aria-selected="true"] { background: var(--cg-violet-700, #7230A3); color: #fff; }
.yv-view-tab:focus-visible { outline: 3px solid var(--cg-azure-300, #9BC5F7); outline-offset: 2px; }

.yv-map { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 24px; align-items: start; }
.yv-map[hidden], #yv-view-list[hidden] { display: none; }
.yv-map-stage {
  background: radial-gradient(120% 90% at 30% 0%, #262640 0%, #1E1E32 55%, #15131C 100%);
  border-radius: 24px; padding: 16px 16px 18px; color: var(--on-night-1);
  box-shadow: 0 24px 60px -32px rgba(26, 26, 46, .55);
}
.yv-map-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-height: 44px; padding: 0 6px; font: 500 14px var(--f-display); }
.pk-crumb { background: none; border: 0; padding: 10px 6px; color: var(--cg-violet-300); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pk-crumb.is-current { color: var(--on-night-1); text-decoration: none; cursor: default; padding: 10px 6px; }
.pk-crumb-sep { color: var(--cg-indigo-400); }
.yv-map-svg { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 16px; }
.yv-map-svg .pk-node { cursor: pointer; transition: opacity .25s ease; }
.yv-map-svg .pk-node.is-dim { opacity: .28; }
.yv-map-svg .pk-node:focus { outline: none; }
.yv-map-svg .pk-node:focus-visible > circle:first-of-type { stroke: var(--cg-lp-yellow); stroke-width: 3px; vector-effect: non-scaling-stroke; }
.yv-map-svg .pk-node:hover > circle:first-of-type { stroke: var(--cg-day-50); stroke-opacity: .9; }
.yv-map-svg .pk-label {
  font-family: var(--f-display); font-weight: 600; fill: var(--on-night-1); pointer-events: none;
  paint-order: stroke; stroke: rgba(21, 19, 28, .85); stroke-width: .32em; stroke-linejoin: round;
}
.yv-map-svg .pk-label-axis { font-weight: 700; letter-spacing: .01em; }
.yv-map-svg .pk-label-feature { font-family: var(--f-body); font-weight: 500; fill: var(--on-night-1); }
.yv-map-svg .pk-score { font-family: var(--f-display); font-weight: 700; fill: var(--cg-neutral-950); pointer-events: none; }
.yv-map-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 6px 0; padding: 0; list-style: none; font-size: 14px; color: var(--on-night-2); }
.yv-map-legend li { display: inline-flex; align-items: center; gap: 8px; }
.pk-key { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.pk-key-ring { border: 2px solid var(--cg-day-50); background: var(--cg-azure-300); }
.pk-key-tier { background: linear-gradient(90deg, rgba(202,160,240,.3), rgba(202,160,240,1)); width: 26px; border-radius: 6px; }

.yv-map-panel {
  position: sticky; top: 96px; min-height: 280px; padding: 22px 22px 20px;
  background: var(--surface); border: 1px solid var(--hair); border-radius: 20px;
  box-shadow: 0 12px 32px -20px rgba(26, 26, 46, .3);
}
.pk-panel-kicker { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; font: 600 12.5px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pk-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.pk-panel-title { margin: 0 0 10px; font: 600 22px/1.25 var(--f-display); color: var(--ink); }
.pk-tier { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 10px; border-radius: 999px; font: 600 12.5px var(--f-display); background: var(--bg-3, #ECE9E4); color: var(--ink); }
.pk-tier-flagship { background: var(--cg-violet-100, #F0E0FB); color: var(--cg-violet-800, #5E2589); }
.pk-panel-body { margin: 0 0 14px; font-size: 16px; line-height: 1.6; color: var(--ink-2, var(--ink)); }
.pk-panel-hint { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.pk-panel-community { margin: 0 0 14px; font-size: 15px; color: var(--muted); }
.pk-panel-community strong { color: var(--ink); font: 700 17px var(--f-display); }
.pk-panel-always { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--bg-3, #ECE9E4); font-size: 15px; line-height: 1.5; color: var(--ink); }
.pk-score-label { display: flex; align-items: baseline; gap: 6px; margin: 4px 0 6px; font: 600 15px var(--f-display); color: var(--ink); }
.pk-score-label output { font: 700 22px var(--f-display); color: var(--cg-violet-700, #7230A3); }
.pk-of { font-weight: 500; color: var(--muted); }
#pk-range { width: 100%; }
.pk-close {
  margin-top: 16px; min-height: 44px; padding: 0 4px; background: none; border: 0; cursor: pointer;
  color: var(--cg-violet-800, #5E2589); font: 600 14.5px var(--f-display); text-decoration: underline; text-underline-offset: 3px;
}

.yv-fnd-wrap { margin: 28px 0 0; border: 1px solid var(--hair); border-radius: 16px; background: var(--surface); }
.yv-fnd-wrap > summary { cursor: pointer; min-height: 52px; display: flex; align-items: center; padding: 0 20px; font: 600 16px var(--f-display); color: var(--ink); }
.yv-fnd-wrap[open] > summary { border-bottom: 1px solid var(--hair); }
.yv-fnd-wrap .yv-fnd { padding: 20px; margin: 0; }
#yv-view-list .yv-score { margin-top: 0; }
.yv-results { margin-top: clamp(40px, 5vw, 64px); }

@media (max-width: 960px) {
  .yv-map { grid-template-columns: 1fr; }
  .yv-map-panel { position: static; min-height: 0; }
  .yv-map-stage { padding: 10px 8px 14px; border-radius: 18px; }
}
html.reduced-motion .yv-map-svg .pk-node { transition: none; }
.pk-key-fnd { background: var(--cg-indigo-300); }
.pk-key-cog { background: var(--cg-azure-300); }
.pk-key-mood { background: var(--cg-violet-300); }
.pk-key-beh { background: var(--cg-teal-300); }
