/* RunReady / Operational Resilience (views-v3-resilience.js, v3.3): only what the new screens need. Shared pieces (v2-table,
   v2-tw, v2c chips, v2-ftabs, v2-card, v2-menu, v2-btn-n / v2-btn-o, v3d-vd) come from views-v2.css and views-v3.css.
   NDS tokens from index.html only. */
.v3q [hidden], .v3q-pop[hidden] { display: none !important; }
.v3q-honest { font-size: 15px; line-height: 20px; color: var(--text-medium); padding: var(--s4) 0; }
.v3q-light { color: var(--text-light); }

/* layout: the page, and a right-hand drawer beside it when one is open */
.v3q-layout { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100%; }
.v3q.has-drawer .v3q-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); }
.v3q-main { min-width: 0; }

/* header: the product's right-hand controls, in the top bar before help and the Sheila pill (v33-14) */
.v3q-head { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s3); }
.v3q-head .v2-menu.v3q-pop { z-index: 60; }
.v3q-hbtn { background: transparent; border: none; padding: 0; cursor: pointer; }
.v3q-hico svg.ic { width: 20px; height: 20px; }
.v3q-dd { position: relative; display: inline-flex; }
.v2-menu.v3q-pop { position: absolute; top: calc(100% + 4px); right: 0; left: auto; z-index: 40; min-width: 220px; max-width: 320px; max-height: min(60vh, 440px); overflow-y: auto; }
.v2-menu.v3q-pop.left { left: 0; right: auto; }
.v3q-pop .v2-mh { padding-top: var(--s3); }
.v3q-pop .v2-mh:first-child { padding-top: var(--s2); }
.v3q-msep { height: 1px; background: var(--divider); margin: var(--s1) 0; }
/* menu items with a leading glyph (the Add menu) or a coloured marker (the result filter, v33-16) */
.v2-mi.v3q-mig { display: flex; align-items: center; gap: var(--s2); text-align: left; }
.v3q-mg { display: inline-flex; flex-shrink: 0; }
.v3q-mg svg.ic { width: 18px; height: 18px; color: var(--text-base); }
.v3q-mg.t-ok svg.ic { color: var(--fn-success); }
.v3q-mg.t-at svg.ic { color: var(--fn-warning); }
.v3q-mg.t-err svg.ic { color: var(--fn-error); }

/* the six tabs as pills */
.v3q-tabs { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s5); }
.v3q-tab { height: 36px; padding: 0 var(--s4); border: 1px solid var(--divider); border-radius: 18px; background: var(--solar-500); color: var(--text-medium); font-size: 15px; cursor: pointer; }
.v3q-tab:hover { background: var(--solar-300); }
.v3q-tab.on { background: var(--solar-50); border-color: var(--earth-500); color: var(--text-base); }

/* Overview: three donut cards */
.v3q-cards { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: var(--s4); overflow-x: auto; }
.v3q-dcard { display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.v3q-dcard .v2-card-t { align-self: flex-start; font-size: 16px; line-height: 22px; }
.v3q-ring { position: relative; width: 168px; height: 168px; }
.v3q-ring.sm { width: 88px; height: 88px; }
.v3q-ring svg { width: 100%; height: 100%; display: block; }
.v3q-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.v3q-ring-n { font-family: 'RecklessNeue Regular', serif; font-size: 48px; line-height: 52px; color: var(--text-base); }
.v3q-ring.sm .v3q-ring-n { font-size: 26px; line-height: 30px; }
.v3q-ring-l { font-size: 12px; line-height: 16px; color: var(--text-medium); max-width: 96px; }
.v3q-legend { list-style: none; align-self: flex-start; display: flex; flex-direction: column; gap: var(--s1); font-size: 12px; line-height: 16px; color: var(--text-medium); }
.v3q-legend li { display: flex; align-items: center; gap: var(--s2); }
.v3q-legend i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.v3q-why { display: flex; align-items: flex-start; gap: var(--s2); margin: var(--s4) 0 0; font-size: 13px; line-height: 18px; color: var(--text-medium); max-width: 820px; }
.v3q-why svg.ic { width: 16px; height: 16px; flex-shrink: 0; color: var(--purple-400); margin-top: 1px; }
.v3q-filters { display: flex; flex-wrap: wrap; gap: var(--s2); margin: var(--s5) 0 var(--s3); }
.v3q-ovlist, .v3q-plans { list-style: none; display: flex; flex-direction: column; gap: var(--s3); }
.v3q-ovrow, .v3q-plan { display: flex; align-items: center; gap: var(--s3); background: var(--solar-50); border: 1px solid var(--divider); border-radius: var(--radius); padding: var(--s3) var(--s4); }
.v3q-plan.on { border-color: var(--earth-500); }
.v3q-ovrow[hidden] { display: none; }
.v3q-ovnone { color: var(--text-light); font-size: 13px; padding: var(--s2) 0; }
.v3q-round { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--earth-500); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text-base); }
.v3q-round.dark { background: var(--earth-500); color: var(--solar-50); border-color: var(--earth-500); }
.v3q-round svg.ic { width: 18px; height: 18px; }
.v3q-ovt, .v3q-plant { font-size: 16px; line-height: 22px; color: var(--text-base); }
.v3q-ovm, .v3q-planm { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); margin-top: var(--s1); }
.v3q-ovs { font-size: 12px; line-height: 16px; color: var(--text-medium); margin-top: var(--s1); }
.v3q-dotsep { margin: 0 var(--s2); }
.v3q-pm { display: inline-flex; align-items: center; gap: var(--s1); font-size: 12px; line-height: 16px; color: var(--text-medium); }
.v3q-pm svg.ic { width: 14px; height: 14px; }
.v3q-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--earth-500); display: inline-block; }
.v2c.v3q-at { border-color: var(--fn-warning); color: var(--dawn-700); background: var(--orange-50); }
.v2c.v3q-crit { border-color: var(--fn-warning); color: var(--dawn-700); background: var(--orange-50); }

/* Operations: master-detail */
.v3q-md { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s4); align-items: start; }
.v3q-rail { display: flex; flex-direction: column; gap: var(--s2); }
.v3q-opcard { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); text-align: left; padding: var(--s3); border: 1px solid var(--divider); border-radius: var(--radius); background: var(--solar-50); color: var(--text-base); cursor: pointer; }
.v3q-opcard:hover { background: var(--solar-300); }
.v3q-opcard.on { background: var(--solar-600); border-color: var(--earth-500); }
.v3q-opcard-t { font-size: 13px; line-height: 18px; }
.v3q-opmain { min-width: 0; }
.v3q-oph { display: flex; align-items: center; gap: var(--s3); }
.v3q-opt { flex: 1; min-width: 0; font-family: 'RecklessNeue Regular', serif; font-weight: normal; font-size: 26px; line-height: 32px; color: var(--text-base); }
.v3q-stats { display: flex; flex-wrap: wrap; justify-content: space-around; gap: var(--s4); padding: var(--s5) 0; }
.v3q-stats.sm { padding: var(--s3) 0; justify-content: flex-start; gap: var(--s6); }
.v3q-stat { display: flex; flex-direction: column; align-items: center; gap: var(--s1); }
.v3q-stat-n { font-family: 'RecklessNeue Regular', serif; font-size: 56px; line-height: 60px; color: var(--text-base); }
.v3q-stats.sm .v3q-stat-n { font-size: 32px; line-height: 36px; }
.v3q-stat-n small { font-family: 'NeutrifPro Regular', sans-serif; font-size: 14px; margin-left: 4px; }
.v3q-stat-l { font-size: 13px; line-height: 18px; color: var(--text-base); font-family: 'NeutrifPro SemiBold', sans-serif; }
.v3q-stats.focus #res-drawer-stat-tasks, .v3q-rings.focus #res-drawer-stat-tasks { outline: 2px solid var(--purple-400); outline-offset: 4px; border-radius: var(--radius); }
.v3q-fpanel { padding: var(--s4); }
.v3q-form { padding: var(--s4); }
.v3q-form-h { display: flex; align-items: center; gap: var(--s2); font-size: 18px; line-height: 24px; margin-bottom: var(--s3); }
.v3q-form-h svg.ic { width: 22px; height: 22px; }
.v3q-fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.v3q-field { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: var(--s2) var(--s3); border: 1px solid var(--divider); border-radius: var(--radius); background: var(--solar-50); color: var(--text-base); cursor: pointer; min-width: 0; }
.v3q-field:hover { border-color: var(--earth-400); }
.v3q-field.wide { grid-column: 1 / -1; }
.v3q-field-check { justify-content: center; }
.v3q-fl { font-size: 12px; line-height: 16px; color: var(--text-medium); }
.v3q-fv { font-size: 15px; line-height: 20px; overflow-wrap: anywhere; }
.v3q-check { display: inline-flex; align-items: center; gap: var(--s1); }
.v3q-check svg.ic { width: 18px; height: 18px; color: var(--dawn-500); }
.v3q-acc { border: 1px solid var(--divider); border-radius: var(--radius); margin-top: var(--s3); background: var(--solar-50); }
.v3q-acc-h { display: flex; align-items: center; width: 100%; gap: var(--s2); padding: var(--s3) var(--s4); border: none; background: transparent; font-size: 16px; line-height: 22px; color: var(--text-base); text-align: left; cursor: pointer; }
.v3q-acc-h:hover { background: var(--solar-300); }
.v3q-acc-chev { width: 20px; height: 20px; transition: transform .15s ease; }
.v3q-acc-h[aria-expanded="true"] .v3q-acc-chev { transform: rotate(180deg); }
.v3q-acc-b { padding: 0 var(--s4) var(--s4); }
.v3q-explain { display: flex; align-items: flex-start; gap: var(--s2); margin-top: var(--s3); font-size: 12px; line-height: 16px; color: var(--text-medium); }
.v3q-explain svg.ic { width: 16px; height: 16px; flex-shrink: 0; color: var(--ft-info); }
.v3q-pcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.v3q-pcard { display: flex; align-items: center; gap: var(--s2); padding: var(--s3); border: 1px solid var(--divider); border-radius: var(--radius); background: var(--solar-500); font-size: 14px; line-height: 20px; }
.v3q-pcard.lib { background: var(--solar-50); }
.v3q-pcard svg.ic { width: 18px; height: 18px; flex-shrink: 0; }
.v3q-plink { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin: var(--s4) 0 var(--s2); }
.v3q-oplist { list-style: none; display: flex; flex-direction: column; }
.v3q-oprow { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--divider); }
.v3q-btn { display: inline-flex; align-items: center; gap: var(--s2); margin-top: var(--s4); cursor: pointer; }
.v3q-btn svg.ic { width: 18px; height: 18px; }

/* empty states (Documents, Diagram, Lessons) */
.v3q-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s2); padding: var(--s6) var(--s4); }
.v3q-empty p { max-width: 520px; }
.v3q-empty-ic { width: 48px; height: 48px; border-radius: 50%; background: var(--solar-600); display: inline-flex; align-items: center; justify-content: center; }
.v3q-empty-ic.big { width: 96px; height: 96px; background: var(--orange-50); color: var(--dawn-500); }
.v3q-empty-ic svg.ic { width: 24px; height: 24px; }
.v3q-empty-ic.big svg.ic { width: 48px; height: 48px; }

/* Processes and Resources tables */
.v3q-tw { mask-image: none; -webkit-mask-image: none; }
.v3q-table tr.row { cursor: pointer; }
.v3q-table tr.row.on td { background: var(--solar-600); }
.v3q-wcell { min-width: 180px; max-width: 320px; }
.v3q-ul { text-decoration: underline; text-underline-offset: 3px; }
.v3q-acts { white-space: nowrap; }
.v3q-more td { background: var(--solar-100); }
.v3q-more-in { display: flex; flex-direction: column; gap: var(--s3); max-width: 820px; }
.v3q-types { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s3); }
.v3q-type { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 12px; line-height: 16px; white-space: nowrap; color: var(--text-base); background: var(--grey-100); }
.v3q-type.t-fac { background: var(--dawn-50); }
.v3q-type.t-info { background: var(--sky-50); }
.v3q-type.t-ppl { background: var(--pink-50); }
.v3q-type.t-asset { background: var(--purple-50); }
.v3q-type.t-sub { background: var(--green-50); }
.v3q-type.t-tech { background: var(--green-100); }

/* the right-hand drawer */
.v3q-drawer { position: sticky; top: 0; align-self: start; max-height: calc(100vh - 88px); overflow-y: auto; background: var(--solar-50); border-left: 1px solid var(--divider); box-shadow: -8px 0 24px rgba(0,28,39,.08); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.v3q-dh { display: flex; align-items: flex-start; gap: var(--s2); }
.v3q-dt { flex: 1; min-width: 0; font-family: 'NeutrifPro Regular', sans-serif; font-weight: normal; font-size: 18px; line-height: 24px; color: var(--text-base); }
.v3q-dchips { display: flex; gap: var(--s2); }
.v3q-dtabs .v2-ftab { min-width: 72px; height: 38px; font-size: 14px; }
.v3q-dl { display: flex; flex-direction: column; }
.v3q-dl-r { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--divider); }
.v3q-dl-l { font-size: 12px; line-height: 18px; color: var(--text-medium); }
.v3q-dl-v { font-size: 13px; line-height: 18px; color: var(--text-base); overflow-wrap: anywhere; }
.v3q-dbtns { display: flex; flex-wrap: wrap; gap: var(--s2); }
.v3q-rings { display: flex; justify-content: space-around; gap: var(--s4); padding: var(--s2) 0; }
.v3q-rstat { display: flex; flex-direction: column; align-items: center; gap: var(--s1); text-align: center; color: var(--text-medium); }
.v3q-intro { display: flex; align-items: center; gap: var(--s2); font-size: 14px; line-height: 20px; margin-bottom: var(--s2); }
.v3q-intro svg.ic { width: 18px; height: 18px; color: var(--ft-success); }
.v3q-lessons { padding-left: var(--s5); display: flex; flex-direction: column; gap: var(--s2); font-size: 13px; line-height: 18px; }
.v3q-soon { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); }
.v3q-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 11px; background: var(--purple-50); color: var(--purple-700); font-size: 12px; line-height: 16px; }

@media (max-width: 1099px) {
  .v3q.has-drawer .v3q-layout { grid-template-columns: minmax(0, 1fr); }
  .v3q-drawer { position: relative; max-height: none; border-left: none; border-top: 1px solid var(--divider); box-shadow: none; order: -1; }
  .v3q-cards { grid-template-columns: repeat(3, minmax(200px, 1fr)); }
}
@media (max-width: 767px) {
  .v3q-md { grid-template-columns: minmax(0, 1fr); }
  .v3q-rail { flex-direction: row; overflow-x: auto; }
  .v3q-opcard { min-width: 180px; }
  .v3q-fgrid, .v3q-pcards { grid-template-columns: minmax(0, 1fr); }
  .v3q-stat-n { font-size: 40px; line-height: 44px; }
  .v3q-dl-r { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .v3q-drawer { padding: var(--s4); }
  .v3q-ovrow, .v3q-plan { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .v3q-acc-chev { transition: none; } }
