/* ValeriSight shared presentation. Assessment meanings stay in their modules. */
:root {
  --ui-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ui-line: #ccd8e4;
  --ui-muted: #486276;
  /* 16px at the browser default; respect the user's larger default text. */
  font-size: 100%;
}
body.vs-ui { font: calc(1rem - 2px)/1.5 var(--ui-font); }
.vs-ui :is(p, details, table, td, .status-row) { font-size: calc(1rem - 2px); }
.vs-ui *, .vs-ui *::before, .vs-ui *::after { box-sizing: border-box; }
.vs-ui [hidden] { display: none !important; }
.vs-ui :is(button, input, select, textarea) {
  font-family: var(--ui-font) !important;
  font-size: calc(1rem - 2px) !important;
  line-height: 1.4;
}
.vs-ui :is(button, .button) {
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 8px;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}
.vs-ui :is(input, select, textarea) { min-width: 0; max-width: 100%; }
.vs-ui input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
.vs-ui select { min-height: 48px; }
.vs-ui select.choice-source { min-height: 0; height: 1px; padding: 0; }
.vs-ui textarea { min-height: 112px; }
.vs-ui :is(label, small, .caption, .muted, .cr-muted, .eyebrow, .tag,
  .badge, .ar-status, .cr-status, .sy-status, .legend, .system-status,
  .save-status, th) { font-size: calc(.875rem - 2px) !important; }
.vs-ui :is(.scope, .card-status, .test-label, .saved, .pill, .group-count,
  .legend-row, .notice, .notice b, .footnote, footer, pre, .ui-info p,
  .metric .label, .metric .sub, .metric > span, .aircraft-number > span,
  #message, #dataset-note) { font-size: calc(.875rem - 2px) !important; }
.vs-ui #cr-app :is(button, input, select) { min-height: 48px; }
.vs-ui #cr-app input[type=checkbox] { min-height: 20px; }
.vs-ui :is(h1, h2, h3) { line-height: 1.25; overflow-wrap: break-word; }
.vs-ui h1 { font-size: calc(1.75rem - 2px); }
.vs-ui h2, .vs-ui #cr-app h2 { font-size: calc(1.25rem - 2px); }
.vs-ui h3, .vs-ui .task-row h3 { font-size: calc(1.0625rem - 2px); }
.vs-ui .sidebar .brand { font-size: calc(1.75rem - 2px); }
.vs-ui .metric strong { font-size: calc(1.875rem - 2px); }
.vs-ui .donut > div { font-size: calc(1.75rem - 2px); }
.vs-ui .aircraft-number { font-size: calc(1.625rem - 2px); }
.vs-ui.vs-finance .metric strong { font-size: calc(1.5rem - 2px); }
.vs-ui.vs-finance .case strong { font-size: calc(1.4375rem - 2px); }
.vs-ui.vs-pilot .card b { font-size: calc(1.4rem - 2px); }
.vs-ui.vs-capture .app-header a { font-size: calc(1.7rem - 2px); }
.vs-ui :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid #1477b3;
  outline-offset: 3px;
}
.vs-ui summary { cursor: pointer; }
.vs-ui .ui-info {
  margin: 12px 0 18px;
  padding: 10px 14px;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: #f6f9fc;
  color: var(--ui-muted);
  font-size: calc(.875rem - 2px);
}
.vs-ui .ui-info > summary { min-height: 28px; font-weight: 650; }
.vs-ui .ui-info > p { margin: 10px 0 0; }
.vs-ui :is(.panel-head, header, .ar-controls, .cr-toolbar) { gap: 12px; }
.vs-ui :is(.panel, .form-grid, .cr-grid, .grid, .choice-field) { min-width: 0; }
.vs-ui .tag { white-space: normal; }
.vs-ui .ui-header-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.vs-ui .selection-mark { visibility: hidden; flex: 0 0 1em; width: 1em; font-weight: 800; }
.vs-ui [aria-pressed=true] > .selection-mark { visibility: visible; }

/* A group always reflows as a unit; answer order and hit areas stay stable. */
.vs-ui .choice-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 8px;
  min-width: 0;
}
.vs-ui .choice-buttons[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
.vs-ui .choice-buttons[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vs-ui .choice-buttons[data-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vs-ui .choice-buttons button {
  display: flex; align-items: center; justify-content: center; position: relative;
  min-width: 0; min-height: 56px; height: 100%; padding: 24px 6px 8px;
  border-width: 2px; border-radius: 8px; line-height: 1.35;
  white-space: normal; overflow-wrap: normal; word-break: normal;
}
.vs-ui .choice-buttons .selection-mark { position: absolute; right: 6px; top: 2px; }
.vs-ui .choice-buttons button[aria-pressed=true] {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #334d63;
}
.vs-ui .readiness-item > .choice-field,
.vs-ui #review-questions .choice-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(52%, 30rem);
  align-items: start;
  gap: 12px 20px;
}
.vs-ui .readiness-item > .choice-field > label,
.vs-ui #review-questions .choice-field > label {
  margin: 0; align-self: center; font-size: calc(1rem - 2px) !important;
  overflow-wrap: break-word;
}
.vs-ui .readiness-item .choice-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vs-ui .readiness-item .readiness-mitigation { margin-top: 14px; }
.vs-ui #review-questions #p4-na-reason { grid-column: 1 / -1; }
.vs-ui .status-options { grid-auto-rows: 1fr; gap: 8px; }
.vs-ui .status-options button {
  min-height: 80px; height: 100%; border-width: 2px; position: relative;
  padding: 24px 8px 10px; line-height: 1.35;
}
.vs-ui .status-options .selection-mark { position: absolute; right: 6px; top: 2px; }
.vs-ui .status-options button[aria-pressed=true] {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #334d63;
}
.vs-ui .ar-activity[aria-pressed=true] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #334d63; }
.vs-ui .mobile-label { display: none; }
.vs-ui .cr-table td > button { margin-bottom: 8px; }

@media (min-width: 701px) and (max-width: 1150px) {
  .vs-ui .sidebar .brand { font-size: calc(1.5625rem - 2px); }
}
@media (max-width: 700px) {
  .vs-ui h1 { font-size: calc(1.5rem - 2px); }
  .vs-ui .sidebar { padding: 16px; }
  .vs-ui .sidebar .brand { font-size: calc(1.5rem - 2px); margin-bottom: 12px; }
  .vs-ui .metric strong { font-size: calc(1.6875rem - 2px); }
  .vs-ui.vs-finance .metric strong { font-size: calc(1.5rem - 2px); }
  .vs-ui .sidebar .brand small { margin-top: 0; }
  .vs-ui .account { margin-top: 12px; padding-top: 12px; }
  .vs-ui .homepage-logo { width: 260px; max-width: 100%; margin: 0 0 12px; }
  .vs-ui main > header { align-items: stretch; flex-direction: column; }
  .vs-ui main > header > div { min-width: 0; }
  .vs-ui .ui-header-actions > button { flex: 1 1 150px; }
  .vs-ui .panel { padding: 14px; }
  .vs-ui .panel-head { flex-wrap: wrap; }
  .vs-ui .ar-controls label { min-width: 0; flex-basis: 100%; }
  .vs-ui .ar-controls button { width: 100%; }
  .vs-ui :is(.ar-table, .cr-table) { display: block; min-width: 0; width: 100%; }
  .vs-ui :is(.ar-table, .cr-table) thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
  }
  .vs-ui :is(.ar-table, .cr-table) tbody { display: grid; gap: 14px; }
  .vs-ui :is(.ar-table, .cr-table) tr {
    display: block; background: white; border: 1px solid var(--ui-line); border-radius: 10px;
    padding: 12px; min-width: 0;
  }
  .vs-ui :is(.ar-table, .cr-table) td {
    display: block; border: 0; padding: 6px 0; min-width: 0;
    white-space: normal; overflow-wrap: anywhere;
  }
  .vs-ui .mobile-label { display: block; color: var(--ui-muted); font-size: calc(.875rem - 2px); font-weight: 650; margin-bottom: 4px; }
  .vs-ui :is(.ar-table, .cr-table) td:first-child .mobile-label { display: none; }
  .vs-ui .ar-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .vs-ui .ar-actions button, .vs-ui .cr-table td > button { width: 100%; }
  .vs-ui #cr-app .cr-grid, .vs-ui .cr-fields { grid-template-columns: minmax(0, 1fr); }
  .vs-ui .cr-item > summary { align-items: start; flex-wrap: wrap; }
  .vs-ui .cr-item > summary .cr-status { width: 100%; }
  .vs-ui .cr-stages p { min-width: 0; flex-basis: 100%; }
  .vs-ui dialog { max-width: calc(100vw - 16px); padding: 16px; }
}
@media (max-width: 480px) {
  .vs-ui.vs-finance .metric strong { font-size: calc(1.25rem - 2px); }
}
@media (max-width: 42rem) {
  .vs-ui .readiness-item > .choice-field,
  .vs-ui #review-questions .choice-field { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .vs-ui .choice-buttons[data-count="4"], .vs-ui .status-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vs-ui .choice-buttons[data-count="3"] { grid-template-columns: minmax(0, 1fr); }
  .vs-ui .status-options { gap: 10px; }
  .vs-ui .view { padding: 14px; }
  .vs-ui.vs-pilot main { padding: 10px 6px; }
  .vs-ui.vs-pilot .view { padding: 12px 8px; }
  .vs-ui .readiness-item { padding: 12px; }
  .vs-ui .step-tabs { flex-wrap: wrap; }
  .vs-ui .step-tabs button { min-width: 0; padding: 10px 6px; }
}
@media print {
  .vs-ui .ui-info { display: none; }
  .vs-ui :is(.ar-table, .cr-table) { display: table; }
  .vs-ui :is(.ar-table, .cr-table) thead { position: static; display: table-header-group; width: auto; height: auto; clip-path: none; }
  .vs-ui :is(.ar-table, .cr-table) tbody { display: table-row-group; }
  .vs-ui :is(.ar-table, .cr-table) tr { display: table-row; }
  .vs-ui :is(.ar-table, .cr-table) td { display: table-cell; padding: 8px; }
  .vs-ui .mobile-label { display: none; }
}
