/* Copyright 2026 John G Stroh. All rights reserved. */
/* Village Assembly workspace: shared styling for the run list, framing page and report.
 * Built on the Dawn Compass tokens in village-apps.css (light, dark and data-theme). */
:root {
  --va-dissent: #a8321f;
  --va-dissent-soft: #fbe3de;
  --va-on-pos: #ffffff;
  --va-pos1: var(--c-know);
  --va-pos2: var(--c-work);
  --va-pos3: var(--c-decide);
  --va-shadow: rgba(38, 32, 25, .16);
}
@media (prefers-color-scheme: dark) { :root {
  --va-dissent: #ff9a85; --va-dissent-soft: #3d1d17; --va-on-pos: #14110d; --va-shadow: rgba(0, 0, 0, .5);
} }
:root[data-theme=light] { --va-dissent: #a8321f; --va-dissent-soft: #fbe3de; --va-on-pos: #ffffff; --va-shadow: rgba(38, 32, 25, .16); }
:root[data-theme=dark] { --va-dissent: #ff9a85; --va-dissent-soft: #3d1d17; --va-on-pos: #14110d; --va-shadow: rgba(0, 0, 0, .5); }

body { font-family: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.va-wrap { max-width: 64rem; margin: 0 auto; padding: var(--s6) var(--s4) var(--s16); }
.va-wrap h1 { font-size: var(--t-xl); line-height: 1.2; margin: 0 0 var(--s2); }
.va-wrap h2 { font-size: var(--t-l); line-height: 1.25; margin: 0 0 var(--s2); }
.va-wrap h3 { font-size: var(--t-m); margin: 0; }
.va-sub { color: var(--ink-soft); font-size: var(--t-s); margin: 0 0 var(--s4); max-width: 62ch; }
.va-eyebrow { margin: 0; font-size: var(--t-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.va-wrap :focus-visible { outline: 3px solid var(--c-decide); outline-offset: 2px; }
.va-skip { position: absolute; left: -999px; }
.va-skip:focus { left: 8px; top: 8px; background: var(--bg-raise); padding: 8px 12px; z-index: 60; }

/* Step rail */
.va-rail { margin: 0 0 var(--s4); overflow-x: auto; }
.va-rail ol { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0 0 4px; min-width: max-content; }
@media (min-width: 900px) { .va-rail { overflow-x: visible; } .va-rail ol { flex-wrap: wrap; min-width: 0; } }
.va-step { display: flex; align-items: center; gap: 8px; padding: 6px 12px; min-height: 44px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--bg-raise); color: var(--ink-soft); font-size: var(--t-s); text-decoration: none; }
.va-step .n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--line); color: var(--ink); font-size: var(--t-xs); font-weight: 700; }
.va-step.done .n { background: var(--c-decide); color: var(--va-on-pos); }
.va-step.now { border-color: var(--c-decide); background: var(--c-decide-soft); color: var(--ink); font-weight: 700; }
.va-step.now .n { background: var(--c-decide); color: var(--va-on-pos); }
a.va-step:hover { border-color: var(--c-decide); color: var(--ink); }
.va-step.off { opacity: .75; }
.va-step .off-note { font-size: var(--t-xs); font-style: italic; }

/* Cards and forms */
.va-card { background: var(--bg-raise); border: 1px solid var(--line); border-radius: var(--r-m); padding: var(--s4); margin-bottom: var(--s4); }
.va-card.warn { border-color: var(--c-connect); background: var(--c-connect-soft); }
.va-card.warn h2 { color: var(--c-connect); }
.va-card.honesty { border-left: 4px solid var(--c-decide); }
.va-card ul { margin: var(--s2) 0 0; padding-left: 1.2rem; }
.va-card li { margin: 4px 0; font-size: var(--t-s); }
.va-none { color: var(--ink-soft); font-size: var(--t-s); }
.va-foot { color: var(--ink-soft); font-size: var(--t-xs); margin-top: var(--s2); }
.va-wrap label { display: block; font-size: var(--t-s); margin: var(--s3) 0 4px; }
.va-wrap input[type=text], .va-wrap textarea, .va-wrap select { width: 100%; padding: 10px 12px; min-height: 44px; border-radius: var(--r-s);
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: var(--t-s); }
.va-wrap textarea { min-height: 88px; resize: vertical; }
.va-hint { color: var(--ink-soft); font-size: var(--t-xs); margin-top: 4px; }
.va-btn { margin-top: var(--s3); padding: 10px 18px; min-height: 44px; border-radius: 999px; border: 1px solid var(--c-decide);
  background: var(--c-decide); color: var(--va-on-pos); font: inherit; font-weight: 700; cursor: pointer; }
.va-btn.secondary { background: transparent; color: var(--c-decide); }
.va-btn[disabled] { opacity: .55; cursor: default; }
.va-msg { font-size: var(--t-s); padding: 10px 14px; border-radius: var(--r-s); margin: var(--s3) 0; display: none;
  background: var(--bg-raise); border: 1px solid var(--line); }
.va-msg.show { display: block; }
.va-msg.warn { background: var(--c-connect-soft); border-color: var(--c-connect); }
.va-pill { font-size: var(--t-xs); padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); white-space: nowrap; }
.va-pill.ok { border-color: var(--c-work); color: var(--c-work); }
.va-pill.pending { border-color: var(--c-connect); color: var(--c-connect); }
.va-pill.dis { border-color: var(--va-dissent); color: var(--va-dissent); }

/* Run list */
.va-runs { list-style: none; margin: 0; padding: 0; }
.va-run { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.va-run:last-child { border-bottom: 0; }
.va-run .q { flex: 1 1 18rem; font-size: var(--t-s); }
.va-run .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.va-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--c-decide);
  color: var(--c-decide); text-decoration: none; font-size: var(--t-s); font-weight: 700; }
.va-link:hover { background: var(--c-decide-soft); }

/* Report: position bars */
.va-controls { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin: 0 0 var(--s4); }
.va-wrap label.va-chk { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; cursor: pointer; margin: 0 !important; }
.va-chk input { width: 20px; height: 20px; accent-color: var(--c-decide); }
.va-strand { margin: var(--s6) 0; }
.va-strand-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; align-items: baseline; }
.va-bar { display: flex; gap: 3px; margin: 8px 0 4px; min-height: 56px; }
.va-seg { flex: var(--w, 1) 1 0; min-width: 104px; border: 2px solid transparent; border-radius: 8px; color: var(--va-on-pos); font: inherit;
  text-align: left; padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.va-seg .l, .va-seg .c, .va-seg .tag { position: relative; z-index: 1; }
.va-seg .l { font-weight: 700; font-size: var(--t-s); line-height: 1.2; overflow-wrap: anywhere; }
.va-seg .c { font-size: var(--t-xs); }
.va-seg .tag { display: block; font-size: var(--t-xs); letter-spacing: .05em; text-transform: uppercase; font-weight: 700; }
.va-seg.p1 { background: var(--va-pos1); }
.va-seg.p2 { background: var(--va-pos2); }
.va-seg.p3 { background: var(--va-pos3); }
.va-seg.dis { background: var(--va-dissent); border-color: var(--ink);
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .28) 0 6px, transparent 6px 12px); }
.va-seg.thin::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .20) 0 2px, transparent 2px 6px); }
.va-seg[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 1px; }
.va-dissent-line { margin: 6px 0 0; font-size: var(--t-s); border-left: 4px solid var(--va-dissent); padding-left: 10px; }
.va-dissent-line b { color: var(--va-dissent); }
.va-legend { list-style: none; padding: 0; margin: 0 0 var(--s2); }
.va-legend li { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; font-size: var(--t-s); }
.va-sw { flex: 0 0 22px; height: 22px; border-radius: 5px; margin-top: 2px; background: var(--va-pos1); }
.va-sw.dis { background: var(--va-dissent); border: 2px solid var(--ink);
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .35) 0 4px, transparent 4px 8px); }
.va-sw.thin { background-color: var(--va-pos2); background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, .28) 0 2px, transparent 2px 5px); }

/* Detail sheet */
.va-detail { position: fixed; right: 0; top: 0; bottom: 0; width: min(420px, 100%); background: var(--bg-raise); border-left: 1px solid var(--line);
  padding: var(--s4); overflow-y: auto; box-shadow: -8px 0 24px var(--va-shadow); z-index: 50; }
.va-detail[hidden] { display: none; }
.va-detail dt { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-top: var(--s3); }
.va-detail dd { margin: 2px 0 0; font-size: var(--t-s); }
.va-detail .va-btn { float: right; margin-top: 0; }

.va-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
@media (max-width: 620px) {
  .va-cols { grid-template-columns: 1fr; }
  .va-bar { flex-direction: column; }
  .va-seg { flex: 0 0 auto; min-height: 52px; }
  .va-detail { top: auto; width: 100%; max-height: 78vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; }
}

/* Summary card on the run-list page */
.deliberative-summary { background: var(--bg-raise); border: 1px solid var(--line); border-left: 4px solid var(--c-decide);
  border-radius: var(--r-m); padding: var(--s4); margin: 0 0 var(--s4); }
.deliberative-summary h2 { font-size: var(--t-l); margin: 0 0 var(--s2); line-height: 1.3; }
.deliberative-summary p { font-size: var(--t-s); line-height: 1.6; margin: 0 0 var(--s2); max-width: 62ch; }
.deliberative-summary .ds-status { font-size: var(--t-xs); color: var(--ink-soft); letter-spacing: .05em; text-transform: uppercase; }

/* Rehearse step */
.va-row { border: 1px solid var(--line); border-radius: var(--r-m); padding: var(--s3) var(--s4) var(--s4); margin: 0 0 var(--s3); background: var(--bg); }
.va-row legend { font-weight: 700; padding: 0 6px; font-size: var(--t-s); }
.va-field { display: block; margin: var(--s2) 0; }
.va-field-l { display: block; font-size: var(--t-s); margin-bottom: 4px; }
.va-choice { border: 0; margin: 0 0 var(--s4); padding: 0; }
.va-choice legend { font-weight: 700; margin-bottom: var(--s2); }
.va-btn.small { min-height: 36px; padding: 4px 12px; font-size: var(--t-xs); }
.va-prog { margin: var(--s3) 0; }
.va-meter { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 6px 0 4px; }
.va-meter > span { display: block; height: 100%; width: 0; background: var(--c-decide); border-radius: 999px; transition: width .4s var(--ease); }
#problems:empty { display: none; }

/* The hidden attribute must win over a display set by a class (a .va-msg.show note was visible while hidden) */
.va-wrap [hidden] { display: none !important; }
.va-row .va-btn { margin-left: var(--s3); }
.va-choice .va-chk { display: flex; margin: 4px 0 !important; }

/* Compare two framings: a simple share-of-seats bar per position. */
.va-cmpbar { height: 10px; background: var(--va-line, #e3dccf); border-radius: 5px; overflow: hidden; margin: 6px 0 4px; }
.va-cmpfill { display: block; height: 100%; background: var(--va-pos1, #5b3fb0); }

/* Step help: a disclosure after the rail, with a plain-words / more-detail switch. */
.va-help { margin: 0 0 var(--s4, 16px); border: 1px solid var(--line, #e3dccf); border-radius: var(--r-m, 10px); padding: 10px 14px; background: #fff; }
.va-help summary { cursor: pointer; font-weight: 600; min-height: 24px; }
.va-help-bar { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.va-help-bar .va-btn[aria-pressed="true"] { outline: 2px solid var(--va-pos1, #5b3fb0); outline-offset: 1px; font-weight: 700; }

/* The guide: numbered and bulleted lists keep their markers (the shared reset removes them). */
.va-guide ol { list-style: decimal; padding-left: 1.5em; }
.va-guide ul { list-style: disc; padding-left: 1.3em; }
.va-guide li { margin: 0 0 .6em; }
