/* Vote Better "Does this candidate..." view (#/alt) and the home page's
   four principle boxes. Colors and fonts are theme roles (css/theme.css),
   so all three palettes and both font sets apply here too. Elements that
   use the heading font outside h1-h3 also take its case rule: Homebody
   Club is ALL CAPS only. */

.alt-wrap { max-width: 760px; margin: 0 auto; padding: 0 0 3rem; }
.head-font {
  font-family: var(--f-head);
  text-transform: var(--f-head-transform);
  letter-spacing: var(--f-head-spacing);
  font-weight: 400;
}

/* ---------- hero ---------- */
.alt-hero {
  background: var(--c-hero-bg);
  color: var(--c-hero-text);
  padding: 2.25rem 1rem 2rem;
  text-align: center;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}
.alt-hero h1 { color: var(--c-hero-text); font-size: clamp(1.9rem, 6vw, 3rem); margin: 0.15em 0; }
.alt-hero p { margin: 0 auto; max-width: 34em; }
.alt-kicker { color: var(--c-hero-kicker); letter-spacing: 0.06em; margin: 0; }

/* ---------- alt home: lookup + race lists ---------- */
.alt-lookup {
  background: var(--c-surface);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 0 0 1.5rem;
}
.alt-lookup h2 { font-size: 1.15rem; margin: 0 0 0.5rem; }
.alt-lookup form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.alt-lookup input[type=text] {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.6em 0.8em;
  border-radius: var(--radius);
  border: 1px solid var(--c-line-strong);
  font: inherit;
  background: var(--c-bg);
  color: var(--c-text);
}
.alt-lookup .form-status { margin-top: 0.5rem; }
.alt-lookup .alt-clear { margin-top: 0.4rem; }

.alt-race { margin-top: 1.75rem; }
.alt-race h2 { font-size: 1.4rem; border-bottom: 3px solid var(--c-accent); padding-bottom: 0.2em; margin: 0 0 0.75rem; }
.alt-race h2 a { color: inherit; text-decoration: none; }
.alt-race .alt-race-sub { font-size: 0.9rem; color: var(--c-text-muted); margin: -0.4rem 0 0.75rem; }
.alt-cards { display: grid; gap: 0.9rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .alt-cards { grid-template-columns: 1fr 1fr; } }
.alt-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: var(--c-surface);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  color: var(--c-text);
  text-decoration: none;
  border-left: 5px solid #101010; /* Kylan, 2026-10-08: black by default, not the blue accent */
}
.alt-card:hover { border-left-color: var(--c-rule); color: var(--c-text); } /* --c-rule is the page yellow -- unchanged, already correct */
.alt-card-name { font-size: 1.25rem; }
.alt-card-meta { font-size: 0.9rem; color: var(--c-text-muted); }
.alt-card-bio { font-size: 0.95rem; }
.alt-card-cta { color: var(--c-link); margin-top: auto; }

.alt-browse { margin-top: 2rem; }
.alt-browse h2 { font-size: 1.4rem; border-bottom: 3px solid var(--c-accent); padding-bottom: 0.2em; }
.alt-browse details {
  background: var(--c-surface);
  border-radius: 8px;
  margin: 0.6rem 0;
  padding: 0.2rem 1rem;
}
.alt-browse summary { cursor: pointer; padding: 0.6rem 0; font-size: 1.05rem; }
.alt-browse ul { list-style: none; margin: 0 0 0.6rem; padding: 0; columns: 2; column-gap: 1.5rem; }
@media (max-width: 520px) { .alt-browse ul { columns: 1; } }
.alt-browse li { padding: 0.25rem 0; break-inside: avoid; }
.alt-footnote { font-size: 0.85rem; margin-top: 2rem; color: var(--c-text-muted); }

/* ---------- candidate page ---------- */
.alt-top { margin: 0.5rem 0 1.5rem; }
.alt-top h1 { font-size: clamp(1.9rem, 7vw, 2.8rem); margin: 0; line-height: 1.05; }
.alt-race-label { color: var(--c-kicker); letter-spacing: 0.05em; margin: 0; font-size: 1rem; }
.alt-race-label a { color: inherit; text-decoration: none; }
.alt-meta { margin: 0.3rem 0 1rem; color: var(--c-text-muted); }
.alt-status {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--c-text);
  color: var(--c-bg);
  border-radius: 999px;
  padding: 0.1em 0.7em;
  vertical-align: middle;
}
.alt-bio p { margin: 0 0 0.8em; }
.alt-fullprofile { margin: -0.3rem 0 0; font-size: 0.95rem; }
.alt-fullprofile a { color: var(--c-link); }

.alt-does {
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  margin: 2rem 0 0.5rem;
  border-top: 4px solid var(--c-rule);
  padding-top: 0.75rem;
}
.alt-legend { font-size: 0.85rem; line-height: 2.1; margin: 0 0 0.75rem; color: var(--c-text-muted); }
.alt-hint { font-size: 0.85rem; color: var(--c-text-muted); margin: -0.4rem 0 0.9rem; }

.alt-question {
  background: var(--c-surface);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.8rem;
  position: relative;
}
.alt-question h3 { font-size: 1.1rem; margin: 0 0 0.5rem; line-height: 1.25; }
.alt-q-num { display: inline-block; min-width: 1.4em; color: var(--c-kicker); }

/* The question heading is a button that reveals the same explanation shown
   in the home page's box: on hover/focus where hovering exists, on tap
   elsewhere (app.js toggles .open). */
.q-trigger {
  all: unset;
  cursor: help;
  display: inline;
  font: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  border-radius: 4px;
}
.q-trigger:hover { background: none; color: inherit; }
.q-trigger:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.q-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  height: 1.15em;
  margin-left: 0.35em;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-family: Georgia, serif;
  font-size: 0.75em;
  font-style: italic;
  text-transform: none;
  vertical-align: 0.1em;
}
.q-head { position: relative; }
.q-pop {
  display: none;
  position: absolute;
  z-index: 20;
  left: 0;
  top: 100%;
  width: min(34rem, 100%);
  padding: 0.85rem 1rem;
  border-radius: 8px;
  border-left: 6px solid var(--c-pop-edge);
  background: var(--c-pop-bg);
  color: var(--c-pop-text);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
  font-family: var(--f-body);
  font-weight: var(--f-body-weight);
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.95rem;
  line-height: 1.5;
}
.q-pop .q-pop-title { display: block; margin-bottom: 0.2rem; font-family: var(--f-head); text-transform: var(--f-head-transform); letter-spacing: var(--f-head-spacing); }
@media (hover: hover) {
  .q-head:hover .q-pop, .q-head:focus-within .q-pop { display: block; }
}
.q-head.open .q-pop { display: block; }
@media (hover: none) {
  .q-pop { position: static; margin: 0.2rem 0 0.7rem; box-shadow: none; width: auto; }
}

.alt-bullets { list-style: none; margin: 0; padding: 0; }
.alt-bullets li { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.3rem 0; }
.alt-bullet-text { flex: 1; min-width: 0; }
.alt-empty { margin: 0; font-style: italic; color: var(--c-text-muted); }

.alt-links a {
  display: inline-block;
  font-size: 0.8rem;
  margin: 0 0.35rem 0 0;
  white-space: nowrap;
  color: var(--c-link);
}
.alt-links a::after { content: " ↗"; }
/* Beside a source a reviewer marked paywalled: still listed, flagged. */
.paywall-note {
  display: inline-block; margin: 0 0.45rem 0 0.1rem; padding: 0 0.4em; border: 1px solid var(--c-line-strong);
  border-radius: 999px; font-size: 0.72rem; line-height: 1.5; color: var(--c-text-muted); white-space: nowrap;
}
.alt-cite .paywall-note { margin-left: 0.5rem; }

/* Signal markers carry a text label as well as color. */
.alt-signal {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 0.15em 0.6em;
  margin-top: 0.15rem;
  white-space: nowrap;
  border: 1.5px solid transparent;
}
.alt-signal-upholds { background: var(--c-up-bg); color: var(--c-up-text); }
.alt-signal-undermines { background: var(--c-down-bg); color: var(--c-down-text); }
.alt-signal-mixed { background: var(--c-mixed-bg); color: var(--c-mixed-text); border-color: var(--c-mixed-border); }
.alt-bullets .alt-signal { min-width: 7.8em; justify-content: center; }
@media (max-width: 520px) {
  .alt-bullets li { flex-direction: column; gap: 0.2rem; }
  .alt-bullets .alt-signal { min-width: 0; }
}

.alt-learn-btn {
  display: block;
  text-align: center;
  margin: 1.75rem 0 1rem;
  padding: 0.9rem 1.2rem;
  background: #101010; /* Kylan, 2026-10-08: black, not the blue accent */
  color: var(--c-on-accent);
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.1rem;
}
.alt-learn-btn:hover { background: #333333; color: var(--c-on-accent); }

/* ---------- sources page: one relevance-ordered list ----------
   The list is what ships while MBFC labels are withheld (SHOW_MBFC_COLUMNS in
   app.js); the .alt-sources table below is the same list with MBFC columns. */
.alt-source-list { list-style: none; margin: 0.5rem 0 0; padding: 0; border-top: 2px solid var(--c-accent); }
.alt-source-list li { padding: 0.55rem 0; border-bottom: 1px solid var(--c-line); }
.alt-source-list .src-head { display: block; color: var(--c-link); }
.alt-source-list .alt-cite { display: block; font-size: 0.85rem; color: var(--c-text-muted); }
.alt-sources { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.alt-sources th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--c-text-muted);
  border-bottom: 2px solid var(--c-accent);
  padding: 0.4rem 0.5rem;
  vertical-align: bottom;
}
.alt-sources th a { color: var(--c-link); }
.alt-sources td { padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.alt-sources td.mbfc { font-size: 0.85rem; white-space: nowrap; }
.alt-sources td.mbfc.unknown { color: var(--c-text-muted); font-style: italic; }
.alt-sources .src-head { display: block; color: var(--c-link); }
.alt-sources .alt-cite { display: block; font-size: 0.85rem; color: var(--c-text-muted); }
.alt-sources-note { font-size: 0.9rem; color: var(--c-text-muted); margin: 0.25rem 0 0.75rem; }
@media (max-width: 600px) {
  .alt-sources thead { display: none; }
  .alt-sources, .alt-sources tbody, .alt-sources tr, .alt-sources td { display: block; width: 100%; }
  .alt-sources tr { border-bottom: 1px solid var(--c-line); padding: 0.5rem 0; }
  .alt-sources td { border: none; padding: 0.1rem 0; white-space: normal; }
  .alt-sources td.mbfc::before { content: attr(data-label) ": "; font-style: normal; color: var(--c-text-muted); }
}
.alt-back { display: inline-block; margin-top: 1.5rem; color: var(--c-link); }
.alt-more-btn { margin-top: 1rem; }

/* ---------- home: why it matters + the four principle boxes ---------- */
.why {
  max-width: 680px;
  margin: 0 auto 1.75rem;
  font-size: 1.02rem;
}
.why h2 { font-size: 1.3rem; text-align: center; margin: 0 0 0.5rem; }
.why p { margin: 0 0 0.75rem; }
.track-line { text-align: center; max-width: 680px; margin: 2rem auto 1rem; font-size: 1.05rem; }
.principle-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr;
  max-width: 960px;
  margin: 0 auto 1rem;
}
@media (min-width: 640px) { .principle-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .principle-grid { grid-template-columns: repeat(4, 1fr); } }
.principle-box {
  background: var(--box-bg);
  color: var(--box-text);
  border-left: 6px solid var(--box-edge);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  font-size: 0.93rem;
  line-height: 1.5;
}
.principle-box h3 { color: var(--box-text); font-size: 1.05rem; margin: 0 0 0.35rem; line-height: 1.2; }
.principle-box p { margin: 0; }
.pbox-1 { --box-bg: var(--c-p1-bg); --box-text: var(--c-p1-text); --box-edge: var(--c-p1-edge); }
.pbox-2 { --box-bg: var(--c-p2-bg); --box-text: var(--c-p2-text); --box-edge: var(--c-p2-edge); }
.pbox-3 { --box-bg: var(--c-p3-bg); --box-text: var(--c-p3-text); --box-edge: var(--c-p3-edge); }
.pbox-4 { --box-bg: var(--c-p4-bg); --box-text: var(--c-p4-text); --box-edge: var(--c-p4-edge); }

/* Landing card link styled as a button */
.lookup-card a.btn { display: inline-block; text-decoration: none; }

/* Logo monogram (inline SVG in the header) */
.logo-mark rect { fill: var(--c-logo-bg); }
.logo-mark text { fill: var(--c-logo-text); font-family: 'Archivo Black', 'Arial Black', Helvetica, sans-serif; }

/* ---------- alt ballot (original-style race table) + race-page pins ---------- */
.alt-lookup-menu { margin: 0 auto 1.5rem; }
@media (min-width: 700px) { .alt-lookup-menu { grid-template-columns: 1fr auto 1fr; max-width: 760px; } }
.incumbent-note { margin: -0.4rem 0 0.6rem; }
.incumbent-note .incumbent-star { margin: 0 0.15rem 0 0; }
.alt-ballot .race-table { margin-bottom: 0.5rem; }
.alt-ballot-group { background: var(--c-surface); border-radius: 8px; margin: 0.6rem 0; padding: 0.2rem 0.8rem; }
.alt-ballot-group summary { cursor: pointer; padding: 0.6rem 0; font-size: 1.05rem; }
.alt-ballot-group .race-table { background: transparent; }
.alt-race-title { font-size: clamp(1.6rem, 5vw, 2.3rem); margin: 0 0 0.75rem; }

/* The whole race-page card opens the candidate (app.js); the name and the
   button stay real links for keyboard and screen-reader users. */
.alt-race-card { cursor: pointer; transition: box-shadow 0.15s; }
.alt-race-card:hover { box-shadow: 0 3px 14px rgba(0, 0, 0, 0.14); }
.alt-race-card:hover .alt-card-cta { text-decoration: underline; }
.alt-race-card .alt-card-name { color: var(--c-text); text-decoration: none; }
.alt-race-card .alt-card-name:hover { text-decoration: underline; }
.pin-intro { margin: 0.5rem 0 0.1rem; font-size: 0.85rem; color: var(--c-text-muted); }
.pin-rows { list-style: none; margin: 0 0 0.5rem; padding: 0; }
.pin-rows li { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.28rem 0; border-bottom: 1px solid var(--c-line); font-size: 0.9rem; }
.pin-rows li:last-child { border-bottom: none; }
.pin-set { display: inline-flex; gap: 0.25rem; flex-wrap: wrap; justify-content: flex-end; }
.pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55em;
  height: 1.55em;
  border-radius: 50%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  border: 1.5px solid transparent;
  vertical-align: middle;
}
.pin-upholds { background: var(--c-up-bg); color: var(--c-up-text); }
.pin-undermines { background: var(--c-down-bg); color: var(--c-down-text); }
.pin-mixed { background: var(--c-mixed-bg); color: var(--c-mixed-text); border-color: var(--c-mixed-border); }
.pin-none { font-size: 0.8rem; color: var(--c-text-muted); font-style: italic; }

/* ---------- 2026-10-07: info box, candidate links, district map, share, survey ---------- */

/* "There isn't much reporting on this candidate yet" (app.js littleInfoHtml) */
.info-box {
  background: var(--c-info-bg);
  border-left: 6px solid var(--c-info-edge);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  margin: 0 0 1.25rem;
}
.info-box p { margin: 0 0 0.6rem; }
.info-box-title { font-size: 1.1rem; margin: 0 0 0.4rem; line-height: 1.25; }
.info-steps { margin: 0; padding-left: 1.3rem; }
.info-steps li { margin: 0 0 0.6rem; }
.info-steps li:last-child { margin-bottom: 0; }
.info-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.45rem 0 0.2rem; }
.btn-small { font-size: 0.88rem; padding: 0.45em 0.9em; }
a.btn { display: inline-block; text-decoration: none; }
a.btn:not(.btn-outline), a.btn:not(.btn-outline):hover { color: var(--c-on-accent); }
.info-status { font-size: 0.85rem; color: var(--c-text-muted); }
.info-template summary { cursor: pointer; font-size: 0.88rem; color: var(--c-link); }
.info-template pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.88rem;
  background: var(--c-bg);
  border-radius: 6px;
  padding: 0.7rem 0.85rem;
  margin: 0.4rem 0 0;
}

/* Campaign site and social accounts, top of the sources page */
.cand-links { margin: 0 0 1.5rem; }
.cand-links-title { font-size: 1.1rem; margin: 0 0 0.5rem; }
.cand-link-row { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0; }
.cand-link-row a {
  display: inline-block;
  padding: 0.3em 0.8em;
  border: 1.5px solid var(--c-accent);
  border-radius: 999px;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--c-link);
}
.cand-link-row a::after { content: " ↗"; }
.cand-link-row a:hover { background: var(--c-surface); }

/* District map below the statewide races (app.js wireDistrictMap) */
.az-map { margin: 2rem 0 0; }
.az-map-toggle { display: inline-flex; gap: 0; margin: 0 0 0.75rem; border: 2px solid var(--c-accent); border-radius: 999px; overflow: hidden; }
.az-map .map-tab {
  border-radius: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 0.9rem;
  padding: 0.45em 1.1em;
}
.az-map .map-tab[aria-pressed="true"] { background: var(--c-accent); color: var(--c-on-accent); }
.az-map .map-tab:hover { background: var(--c-surface-2); }
.az-map .map-tab[aria-pressed="true"]:hover { background: var(--c-accent-hover); }
.az-map-body { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 640px) { .az-map-body { grid-template-columns: 3fr 2fr; } }
.az-map-insets { display: grid; gap: 0.75rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) { .az-map-insets { grid-template-columns: 1fr; } }
.az-map figure { margin: 0; }
.az-map figcaption { font-size: 0.8rem; color: var(--c-text-muted); margin-bottom: 0.2rem; }
.az-map svg { display: block; width: 100%; height: auto; }
.az-map-insets svg { border: 1px solid var(--c-line-strong); border-radius: 6px; background: var(--c-bg); }
.az-map g path {
  fill: var(--c-row-hover);
  fill-rule: evenodd;
  stroke: var(--c-bg);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.12s;
}
.az-map g.mine path { fill: var(--c-accent); }
.az-map g.hot path, .az-map g.sel path { fill: var(--c-pop-bg); }
.az-map g:focus { outline: none; }
.az-map g:focus-visible path { stroke: var(--c-text); stroke-width: 2.5; }
.az-map text {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-weight: 700;
  fill: var(--c-text);
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}
.az-map text.mine { fill: var(--c-on-accent); }
/* The district's number lights up on hover: yellow on the dark blue fill. */
.az-map text.hot, .az-map text.sel { fill: var(--c-pop-edge); }
.az-map .inset-frame { fill: none; stroke: var(--c-text-muted); stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.az-map-pick:not(:empty) { margin-top: 1rem; }
.az-map-pick-title { font-size: 1.05rem; margin: 0 0 0.4rem; }
.zip-district { font-size: 1rem; margin: 1.2rem 0 0.3rem; }
.zip-share { font-family: var(--f-body); font-size: 0.85rem; text-transform: none; letter-spacing: normal; color: var(--c-text-muted); margin-left: 0.3rem; }

.official-lookup {
  background: var(--c-surface);
  border-left: 6px solid var(--c-rule);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin: 1.5rem 0 0;
}
.official-lookup h3 { font-size: 1.05rem; margin: 0 0 0.3rem; }
.official-lookup p { margin: 0; }

/* Share (email banner) and the exit survey, both in the shared modal */
.share-cta { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.2); display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.email-banner .btn.btn-share { background: transparent; color: var(--c-banner-text); border: 2px solid var(--c-rule); }
.email-banner .btn.btn-share:hover { background: var(--c-rule); color: var(--c-text); }
.share-text {
  width: 100%;
  font: inherit;
  font-size: 0.9rem;
  padding: 0.6rem;
  border: 1px solid var(--c-line-strong);
  border-radius: 6px;
  resize: none;
  background: var(--c-surface);
  color: var(--c-text);
}
.share-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.share-actions .btn { font-size: 0.9rem; padding: 0.5em 1em; }
.share-status { font-size: 0.88rem; margin: 0.6rem 0 0; min-height: 1.2em; }

/* The visitor survey (2026-10-08): one question per screen in the modal */
.modal-box.modal-survey { max-width: 540px; max-height: calc(100vh - 2rem); overflow-y: auto; }
.survey [hidden] { display: none !important; }
.sv-progress { display: flex; align-items: center; gap: 0.75rem; font-size: 0.82rem; color: var(--c-text-muted); margin-bottom: 0.9rem; }
.sv-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--c-surface-2); overflow: hidden; }
.sv-bar > span { display: block; height: 100%; background: var(--c-accent); }
.sv-q { border: 0; margin: 0; padding: 0; min-width: 0; }
.sv-legend { font-weight: 700; font-size: 1.02rem; line-height: 1.35; margin-bottom: 0.45rem; padding: 0; }
.sv-legend:focus { outline: none; }
.sv-follow { margin-top: 1rem; }
.sv-follow .sv-legend { font-size: 0.96rem; }
.sv-hint { font-size: 0.86rem; color: var(--c-text-muted); margin: 0 0 0.6rem; }
.sv-choices { display: grid; gap: 0.4rem; margin: 0.5rem 0; }
.sv-choice { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.75rem; border: 1px solid var(--c-line-strong); border-radius: 8px; cursor: pointer; }
.sv-choice:has(input:checked) { border-color: var(--c-accent); background: var(--c-surface); }
.sv-choice input { accent-color: var(--c-accent); margin: 0; flex: none; }
.sv-check { margin-top: 0.8rem; }
.sv-check:has(input:disabled) { cursor: not-allowed; }
.sv-check input:disabled + span { opacity: 0.5; }
.sv-label { display: block; font-size: 0.9rem; font-weight: 600; margin: 0.7rem 0 0.3rem; }
.survey textarea, .survey input[type="text"], .survey input[type="email"] {
  width: 100%; box-sizing: border-box; font: inherit; padding: 0.55rem 0.65rem;
  border: 1px solid var(--c-line-strong); border-radius: 6px; background: var(--c-bg); color: var(--c-text);
}
.survey input.sv-short { max-width: 9em; }
.sv-rank { list-style: none; margin: 0.6rem 0; padding: 0; display: grid; gap: 0.4rem; }
.sv-rank-item {
  display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0.6rem; background: var(--c-bg);
  border: 1px solid var(--c-line-strong); border-radius: 8px; cursor: grab; user-select: none;
}
.sv-rank-item.dragging { border-color: var(--c-accent); background: var(--c-surface); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15); cursor: grabbing; }
.sv-handle { color: var(--c-text-muted); font-size: 1.15rem; padding: 0.3rem 0.2rem; touch-action: none; cursor: grab; }
.sv-rank-num { font-weight: 700; min-width: 1.1em; }
.sv-rank-label { flex: 1; }
.sv-rank-moves { display: flex; gap: 0.25rem; }
button.sv-move {
  background: transparent; color: var(--c-text); border: 1px solid var(--c-line-strong); border-radius: 6px;
  min-width: 34px; min-height: 34px; padding: 0; font-size: 0.75rem; line-height: 1;
}
button.sv-move:hover { background: var(--c-surface-2); }
button.sv-move:disabled { opacity: 0.3; }
.sv-nav { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1.1rem; }
.sv-error { color: var(--c-down-bg); font-size: 0.88rem; margin: 0.6rem 0 0; }
.sv-error:empty { display: none; }
.sv-trap, .sv-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sv-trap { left: -10000px; }
.sv-share { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--c-line); }
.sv-share h4 { margin: 0 0 0.5rem; }
@media (max-width: 480px) {
  .modal-box.modal-survey { padding: 1.2rem 1rem; }
  .sv-rank-item { gap: 0.45rem; padding: 0.4rem 0.45rem; font-size: 0.93rem; }
  button.sv-move { min-width: 32px; min-height: 32px; }
}
