/* Leadership Alignment Survey: only what shell.css lacks. Palette, faces and the 16px gutter come from the shell. */

/* ---------- Set up, answer and combine screens ---------- */
.lac-intro { max-width: 44rem; margin: -8px 0 28px; color: var(--deep-plum); }
.lac-narrow { max-width: 30rem; }
.lac-help-top { margin: -8px 0 16px; max-width: 44rem; }
.lac-help-below { margin-top: 12px; }
.lac-priorities { display: grid; gap: 16px; max-width: 40rem; }
.lac-goal-note { margin: 24px 0 0; padding: 16px 20px; border-radius: var(--radius-tile); background: var(--soft-mint); }
.lac-team { font-weight: 500; margin: -8px 0 6px; }
.lac-privacy { color: var(--cool-gray); font-size: 0.9375rem; margin: -8px 0 24px; max-width: 44rem; }
.lac-guess-intro { margin: 0 0 8px; padding: 16px 20px; border-radius: var(--radius-tile); background: var(--soft-mint); max-width: 44rem; }
.lac-two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lac-rank { display: grid; gap: 14px; max-width: 40rem; }
.lac-rank .field { display: grid; grid-template-columns: 9rem minmax(0, 1fr); align-items: center; gap: 12px; }
.lac-rank .field > label { margin: 0; }
.lac-rank .field-error { grid-column: 2; }
.lac-other { margin-top: 16px; }
.lac-percent .choice span { padding: 8px 14px; }
.inputs-card textarea { font-size: 0.875rem; line-height: 1.45; font-variant-numeric: normal; word-break: break-all; }

/* ---------- Link boxes (starter link, answer link) ---------- */
.lac-out { margin-top: 24px; }
.lac-out__lead { font-size: 1.125rem; font-weight: 500; max-width: 44rem; margin-bottom: 16px; }
.lac-out__heading { font-size: 1.0625rem; margin: 20px 0 8px; }
.lac-saved { margin: 0 0 8px; }
.lac-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; }
.lac-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; max-width: 52rem; }
.lac-link > label { grid-column: 1 / -1; font-weight: 500; font-size: 0.9375rem; }
.lac-link__input { font-size: 0.875rem; color: var(--deep-plum); background: var(--white); text-overflow: ellipsis; }
.lac-link__status { grid-column: 1 / -1; margin: 0; font-size: 0.9375rem; font-weight: 500; min-height: 1.4em; }
.lac-link__status:empty { display: none; }
.lac-summary-link { margin-top: 20px; }

/* ---------- Results ---------- */
.lac-role-note { margin: 0 0 20px; padding: 16px 20px; border-radius: var(--radius-tile); background: var(--white); box-shadow: var(--shadow-small), inset 0 0 0 2px var(--amber); max-width: 52rem; }
.lac-role-note__line { display: block; }
.lac-role-note__line + .lac-role-note__line { margin-top: 6px; }
.lac-grid { min-width: 560px; }
.lac-grid th, .lac-grid td { min-width: 7.5rem; }
.lac-grid thead th { white-space: normal; vertical-align: bottom; color: var(--deep-plum); }
.lac-grid tbody th[scope="row"] { min-width: 10rem; max-width: 13rem; }
.lac-grid--one { min-width: 0; }
.lac-grid--one td { min-width: 0; }
.lac-row--flagged > th, .lac-row--flagged > td { background: #FFF9E8; }
.lac-status { white-space: nowrap; }
.lac-cell-list { list-style: none; margin: 0; padding: 0; }
.lac-cell-list li + li { margin-top: 2px; }
.lac-cell-line { display: block; }

.lac-chip {
  display: inline-flex; align-items: center; min-height: 26px; padding: 2px 12px;
  border-radius: 999px; font-size: 0.8125rem; font-weight: 500; line-height: 1.2; white-space: nowrap;
  border: 1px solid transparent; color: var(--forest-dark);
}
.lac-chip--aligned { background: var(--soft-mint); }
.lac-chip--leaning, .lac-chip--partly { background: #EEF7FB; border-color: var(--sky-blue); color: var(--ocean-blue); }
.lac-chip--split { background: var(--white); border: 2px solid var(--amber); color: var(--deep-plum); }
.lac-flag { display: block; margin-top: 6px; font-size: 0.8125rem; font-weight: 500; color: var(--deep-plum); }
.lac-flag::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--amber); }

.lac-pkey { margin-top: 20px; font-size: 0.9375rem; }
.lac-pkey__lead { font-weight: 500; margin: 0 0 6px; }
.lac-pkey__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lac-pkey__list li + li { margin-top: 0; }
/* Hanging indent: a priority that wraps lines up under its own first word, not under "P1" (2026-12-04). */
.lac-pkey__list li { padding-left: 2.25rem; text-indent: -2.25rem; }
.lac-pkey__code { display: inline-block; min-width: 2.25rem; text-indent: 0; font-weight: 500; color: var(--deep-teal); }

.lac-pairs { margin-top: 28px; }
.lac-pairs .data-table th, .lac-pairs .data-table td { min-width: 6rem; }
.lac-negative { font-weight: 700; }
.results-body .card > .table-scroll + p, .results-body .card > .lac-scroll + p { margin-top: 14px; }

/* A table wider than its card: a white fade on the side that has more columns, and a hint above the grid. */
.lac-scroll__hint { display: none; margin: 0 0 8px; font-size: 0.875rem; color: var(--cool-gray); }
.lac-scroll--wide .lac-scroll__hint { display: block; }
.lac-scroll__area { position: relative; }
.lac-scroll__area::before, .lac-scroll__area::after {
  content: ""; position: absolute; top: 0; bottom: 0; z-index: 1; width: 48px; pointer-events: none;
  opacity: 0; transition: opacity var(--ease);
}
.lac-scroll__area::before { left: 0; background: linear-gradient(to right, var(--white) 10%, rgba(255, 255, 255, 0)); }
.lac-scroll__area::after { right: 0; background: linear-gradient(to left, var(--white) 10%, rgba(255, 255, 255, 0)); }
.lac-scroll--left .lac-scroll__area::before, .lac-scroll--right .lac-scroll__area::after { opacity: 1; }

/* "How many picked each option" bars: options nobody can share ("Something else") stay a neutral grey. */
.lac-bar-other { fill: var(--lavender-gray); }
.lac-picks .chart-legend { margin-top: 4px; }

/* A field with an error keeps one ring while it has focus: the Deep Teal focus edge replaces the amber edge, and the
   amber dot and message under the field still say what is wrong. */
.has-error textarea:focus, .has-error input:focus, .has-error select:focus { border-color: var(--deep-teal); box-shadow: none; }

.lac-stats { margin-bottom: 28px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.lac-stats .stat__value { white-space: normal; }
/* Goal panel: the three amounts on one row, the two gaps on the next, so no tile sits alone. */
@media (min-width: 701px) {
  [data-slot="goal"] .lac-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  [data-slot="goal"] .lac-stats > .stat { grid-column: span 2; }
  [data-slot="goal"] .lac-stats > .stat:nth-child(n+4) { grid-column: span 3; }
}

.lac-strip .chart-canvas { margin-top: 4px; }
.lac-axis { stroke: var(--cool-gray); stroke-width: 1.5; }
.lac-tick { stroke: var(--lavender-gray); stroke-width: 1; }
.lac-dot { fill: var(--ocean-blue); }
.lac-dot--guess { fill: var(--white); stroke: var(--ocean-blue); stroke-width: 2; stroke-dasharray: 3 2; }
.lac-dot-text { font-size: 11px; font-weight: 700; fill: var(--white); font-variant-numeric: tabular-nums; }
.lac-dot-text--guess { fill: var(--ocean-blue); }
.lac-key { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 0.875rem; color: var(--deep-plum); }
.lac-key li + li { margin-top: 0; }
.lac-key li { display: inline-flex; align-items: center; gap: 8px; }
.lac-key__num {
  display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ocean-blue); color: var(--white); font-size: 0.75rem; font-weight: 700;
}
.lac-strip + .lac-strip { margin-top: 28px; }

.lac-owner-list { margin: 0 0 16px; }

.lac-pair + .lac-pair { margin-top: 20px; padding-top: 20px; border-top: 1px solid rgba(188, 182, 206, 0.6); }
.lac-pair h4 { margin-bottom: 8px; }
.lac-pair__list { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.lac-pair__list dt { font-weight: 500; }
.lac-pair__list dd { margin: 0; }

.lac-agenda-intro { max-width: 44rem; margin-bottom: 20px; }
/* The grid's visible heading repeats its caption, so on screen the caption is for screen readers only. */
@media screen {
  .lac-caption { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; padding: 0 !important; }
}

/* ---------- Phones ---------- */
@media (max-width: 700px) {
  .lac-two-col { grid-template-columns: minmax(0, 1fr); }
  .lac-rank .field { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .lac-rank .field-error { grid-column: 1; }
  .lac-link { grid-template-columns: minmax(0, 1fr); }
  .lac-link .btn { justify-self: start; }
  .lac-pair__list { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .lac-pair__list dd + dt { margin-top: 8px; }
}

/* Small phones: the agreement grid and the pair table stop being tables. Each question becomes a block (the question,
   its Agreement pill on its own line, then one labelled line per leader), and each leader in the pair table becomes a
   block of "other leader, score" lines. Nothing scrolls sideways and no word, pill or number breaks inside itself.
   The column heads stay in the markup for screen readers; data-label (set by the page script) names each answer. */
@media screen and (max-width: 480px) {
  .lac-grid, .lac-grid tbody, .lac-grid tr, .lac-grid th, .lac-grid td,
  .lac-pairs .data-table, .lac-pairs .data-table tbody, .lac-pairs .data-table tr, .lac-pairs .data-table th, .lac-pairs .data-table td {
    display: block; min-width: 0; max-width: none; width: auto;
  }
  .lac-grid thead, .lac-pairs .data-table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .lac-grid { font-size: 0.9375rem; line-height: 1.4; }
  .lac-grid tbody tr { display: flex; flex-direction: column; gap: 8px; padding: 16px 12px; border-bottom: 1px solid rgba(188, 182, 206, 0.6); }
  .lac-grid tbody tr.lac-row--flagged { background: #FFF9E8; }
  .lac-scroll__hint { display: none !important; }
  .lac-grid tbody th, .lac-grid tbody td, .lac-row--flagged > th, .lac-row--flagged > td { padding: 0; border: 0; background: none; }
  .lac-grid tbody th[scope="row"] { order: 0; font-size: 1rem; font-weight: 700; }
  .lac-grid .lac-status { order: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
  .lac-grid .lac-flag { display: inline-flex; align-items: center; margin: 0; }
  /* break-word only splits a typed word longer than the whole line (an "Other" owner, say), never a normal one. */
  .lac-grid .lac-answer { order: 2; overflow-wrap: break-word; }
  .lac-grid .lac-answer[data-label]::before {
    content: attr(data-label); display: block; font-size: 0.8125rem; font-weight: 500; color: var(--deep-teal);
  }

  .lac-pairs .data-table caption { display: block; }
  .lac-pairs .data-table tbody tr { padding: 12px 0; border-bottom: 1px solid rgba(188, 182, 206, 0.6); }
  .lac-pairs .data-table tbody th, .lac-pairs .data-table tbody td { padding: 0; border: 0; text-align: left; }
  .lac-pairs .data-table tbody th[scope="row"] { font-weight: 700; margin-bottom: 4px; }
  .lac-pairs .data-table tbody td { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
  .lac-pairs .data-table tbody td::before { content: attr(data-label); font-weight: 400; text-align: left; white-space: normal; }
  .lac-pairs .data-table tbody td.lac-self { display: none; }
}

/* ---------- Print: verdict, grid, agenda and next step on one page ---------- */
@media print {
  .lac-out, .lac-summary-link, .lac-scroll__area::before, .lac-scroll__area::after { display: none !important; }
  .lac-grid { min-width: 0; font-size: 7pt; line-height: 1.3; }
  .lac-grid caption { padding-bottom: 3pt; }
  .lac-grid th, .lac-grid td { min-width: 0; padding: 1pt 4pt; }
  .lac-grid tbody th[scope="row"] { min-width: 0; max-width: none; width: 19%; }
  .results-body [data-slot="agenda"] .next-step { padding: 3pt 8pt; }
  .results-body [data-slot="agenda"] .next-step h4 { font-size: 9pt; margin-bottom: 1pt; }
  .results-body [data-slot="agenda"] .next-step p { font-size: 8.5pt; line-height: 1.3; }
  .print-sub { margin-bottom: 6pt; }
  .lac-people { display: none; }
  .results-body .card[data-slot="grid"] > .card-head { display: none; }
  .results-body .card > .card-head { margin-bottom: 3pt; }
  .results-body .card > .card-head .card-head__icon { display: none; }
  .results-body .card .next-step { border-radius: 6pt; }
  .results-body [data-slot="next"] .next-step { padding: 3pt 8pt; font-size: 8.5pt; }
  .results-body .card > .card-head .card-title { font-size: 10pt; }
  .results-body .card[data-slot="agenda"], .results-body .card[data-slot="next-block"] { padding: 0; border: 0; border-radius: 0; }
  .lac-agenda-intro { font-size: 8.5pt; }
  .lac-chip { min-height: 0; padding: 0 5pt; font-size: 7pt; }
  .lac-flag { display: inline; margin: 0 0 0 4pt; font-size: 7pt; }  .lac-cell-list li, .lac-cell-line { display: inline; }
  .lac-cell-list li + li { margin-top: 0; }
  .lac-cell-list li + li::before, .lac-cell-line + .lac-cell-line::before { content: ", "; }
  .lac-pkey { margin-top: 4pt; font-size: 7.5pt; }
  .lac-pkey__lead { margin-bottom: 2pt; }
  .lac-pkey__list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1pt 10pt; }
  .verdict__sub + .verdict__sub { margin-top: 3pt; }
  .results-body > * + * { margin-top: 7pt; }
  .results-body .verdict { padding: 7pt 10pt; }
  .results-body .verdict__label { margin-bottom: 2pt; }
  .results-body .verdict__headline { font-size: 11.5pt; margin-bottom: 4pt; }
  .results-body [data-slot="agenda"] .next-steps > * + * { margin-top: 3pt; }
  .lac-agenda-intro { margin-bottom: 3pt; }
  .results-body .card[data-slot="grid"] { padding: 6pt 8pt; }
  .verdict__sub { font-size: 8.5pt; }
}

/* The shell hides each chart's data table with position: absolute and a 1px width, but a table never shrinks below
   its widest unbroken row, so long cause labels widened the page on phones. Clipping the figure keeps the table out
   of the page's scroll width without changing what screen readers get. */
@media screen {
  .results .chart { position: relative; overflow: hidden; }
}
