/* Resolve Execution Pulse. Resolve Strategies palette:
   royal blue #003C84 · red #E43C48 · navy #0B1F33 · light #F4F7FA */
:root {
  --navy: #0B1F33;
  --blue: #003C84;
  --blue-soft: #E6EEF8;
  --red: #E43C48;
  --red-text: #C42F3B;
  --red-soft: #FDEEF0;
  --light: #F4F7FA;
  --white: #FFFFFF;
  --ink: #0B1F33;
  --muted: #5B6472;
  --line: #DCE3EA;
  --radius: 14px;
  --head: "Space Grotesk", "Segoe UI", Arial, sans-serif;
  --body: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--light);
  color: var(--ink);
  font: 16px/1.55 var(--body);
}
[hidden] { display: none !important; }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--head); letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
p { margin: 0; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; }
.brand img { width: 26px; height: auto; }
.brand span { display: grid; line-height: 1.15; }
.brand b { font-family: var(--head); font-size: 1.05rem; }
.brand small { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }
.tabs { display: flex; gap: 4px; background: var(--light); border-radius: 999px; padding: 4px; }
.tabs a {
  padding: 7px 16px; border-radius: 999px; color: var(--muted);
  font-weight: 600; font-size: 0.92rem; text-decoration: none; white-space: nowrap;
}
.tabs a[aria-current="page"] { background: var(--white); color: var(--blue); box-shadow: 0 1px 3px rgba(11, 31, 51, 0.12); }

/* ---------- Layout ---------- */
.view { max-width: 1180px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 40px) 40px; }
.view-narrow { max-width: 640px; }
.eyebrow { color: var(--red-text); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 10px; }
.demo-flag { display: inline-block; background: var(--navy); color: var(--white); border-radius: 6px; padding: 2px 8px; margin-right: 8px; letter-spacing: 0.08em; }
.lead { color: var(--muted); font-size: 1.08rem; margin-top: 12px; }
.sub { font-family: var(--body); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.hint, .fine { color: var(--muted); font-size: 0.86rem; }
.foot { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 8px 16px 28px; }
.noscript { text-align: center; padding: 40px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: #002F68; }
.btn-secondary { background: var(--white); border-color: var(--blue); color: var(--blue); }
.btn-secondary:hover { background: var(--blue-soft); }
.btn-quiet { background: transparent; color: var(--muted); padding-inline: 10px; }
.btn-quiet:hover { color: var(--navy); }
.btn-big { width: 100%; min-height: 54px; font-size: 1.05rem; margin-top: 24px; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ---------- Dashboard ---------- */
.intro h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.objective-meta { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 18px; }
.meta-field { display: grid; gap: 2px; }
.meta-field > span { color: var(--muted); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.meta-field b { font-weight: 600; }
.meta-field select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: var(--white); font-weight: 600; min-height: 38px; }
.meta-field select.is-missing { border-color: var(--red); color: var(--red-text); }

.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; list-style: none; padding: 0; margin: 26px 0 18px; }
.steps button {
  width: 100%; display: flex; align-items: center; gap: 10px; justify-content: center;
  padding: 10px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--white);
  font-family: var(--head); font-weight: 600; font-size: 1rem; color: var(--navy); cursor: pointer;
}
.steps i { font-style: normal; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 0.8rem; }
.steps button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--white); }
.steps button[aria-pressed="true"] i { background: var(--white); }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; display: grid; gap: 2px; }
.kpi > span { color: var(--muted); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.kpi b { font-family: var(--head); font-size: clamp(2rem, 3.6vw, 2.8rem); line-height: 1.1; color: var(--navy); letter-spacing: -0.03em; }
.kpi small { color: var(--muted); font-size: 0.86rem; }
.kpi-gap b { color: var(--red-text); }
.kpi-activity { background: var(--light); }
.kpi-activity b { color: var(--blue); }
.up { color: var(--blue); font-weight: 600; }
.down { color: var(--red-text); font-weight: 600; }

.dash-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px; margin: 12px 0; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; transition: box-shadow 0.25s, border-color 0.25s; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.card-head h2 { font-size: 1.25rem; }
.step-tag { color: var(--blue); background: var(--blue-soft); border-radius: 999px; padding: 3px 10px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.is-spotlit { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 60, 132, 0.18); }

.chart svg { display: block; width: 100%; height: auto; }
.chart text { font-family: var(--body); }
.record { margin-top: 10px; }
.record label { font-weight: 600; display: block; margin-bottom: 6px; }
.record-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pct-input { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--white); padding-right: 12px; }
.pct-input input { width: 110px; border: 0; background: transparent; padding: 10px 12px; font-size: 1.1rem; font-weight: 600; }
.pct-input input:focus { outline: none; }
.pct-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 60, 132, 0.15); }
.pct-input span { color: var(--muted); font-weight: 600; }
.record .hint { margin-top: 8px; }
.record .hint.is-error { color: var(--red-text); font-weight: 600; }

.gaps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.gaps li { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: 10px; background: var(--red-soft); color: var(--navy); }
.gaps li b { color: var(--red-text); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; min-width: 62px; }
.gaps li.ok { background: var(--blue-soft); }
.gaps li.ok b { color: var(--blue); }
.insight { border-left: 0; background: var(--light); border-radius: 10px; padding: 14px 16px; }
.insight b { font-family: var(--head); font-size: 1.12rem; display: block; margin-bottom: 4px; }
.insight p { color: var(--ink); }

.table-wrap { overflow-x: auto; }
.actions { width: 100%; border-collapse: collapse; }
.actions th { text-align: left; color: var(--muted); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.actions td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.actions tr:last-child td { border-bottom: 0; }
.actions .c-done { width: 60px; text-align: center; }
.actions .c-owner { width: 200px; }
.actions .c-due { width: 120px; }
.actions .c-status { width: 120px; }
.actions td.c-done input { width: 22px; height: 22px; accent-color: var(--blue); cursor: pointer; }
.actions tr.is-done .a-title { color: var(--muted); text-decoration: line-through; }
.actions select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: var(--white); min-height: 38px; }
.actions select.is-missing { border-color: var(--red); color: var(--red-text); font-weight: 600; }
.chip { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.chip-done { background: var(--blue-soft); color: var(--blue); }
.chip-risk { background: var(--red-soft); color: var(--red-text); }
.chip-ok { background: var(--light); color: var(--muted); }
.chip-new { background: var(--navy); color: var(--white); }

.add-action { display: grid; grid-template-columns: 1fr 200px 160px auto; gap: 8px; margin-top: 14px; }
.add-action input, .add-action select { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--white); min-height: 44px; }
.form-error { color: var(--red-text); font-weight: 600; margin-top: 8px; font-size: 0.9rem; }

.dash-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; color: var(--muted); font-size: 0.86rem; }

/* ---------- Health check ---------- */
#assessment h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); }
.facts { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.facts li { position: relative; padding-left: 28px; }
.facts li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 12px; height: 7px; border-left: 2.5px solid var(--blue); border-bottom: 2.5px solid var(--blue); transform: rotate(-45deg); }

.hc-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 22px; }
.hc-progress span { height: 6px; border-radius: 6px; background: var(--line); }
.hc-progress span.on { background: var(--blue); }
.hc-q { border: 0; padding: 0; margin: 0; }
.hc-q legend { font-family: var(--head); font-size: clamp(1.4rem, 5vw, 1.8rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; padding: 0; margin-bottom: 22px; }
.hc-options { display: grid; gap: 10px; }
.hc-options label {
  display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 12px 16px;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer;
  font-weight: 600; font-size: 1.05rem;
}
.hc-options label:hover { border-color: var(--blue); }
.hc-options input { width: 22px; height: 22px; accent-color: var(--blue); margin: 0; }
.hc-options label:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
#hcBack { margin-top: 14px; }

.score { display: flex; align-items: center; gap: 22px; margin: 4px 0 20px; }
.score-ring {
  --p: 0;
  flex: none; width: 128px; height: 128px; border-radius: 50%;
  display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--light) 80%, transparent 81% 100%), conic-gradient(var(--blue) calc(var(--p) * 1%), var(--line) 0);
}
.score-ring b { font-family: var(--head); font-size: 2.6rem; line-height: 1; color: var(--navy); }
.score-ring span { color: var(--muted); font-size: 0.74rem; }
.score h1 { font-size: 1.6rem !important; margin-bottom: 4px; }
.score p { color: var(--muted); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pair-item { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; }
.pair-item span { color: var(--muted); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.pair-item b { font-family: var(--head); font-size: 1.35rem; }
.pair-strong b { color: var(--blue); }
.pair-weak { background: var(--red-soft); border-color: transparent; }
.pair-weak b { color: var(--red-text); }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 82px 1fr 92px; align-items: center; gap: 10px; font-size: 0.95rem; }
.bars li b { font-weight: 600; }
.bars .track { height: 10px; background: var(--line); border-radius: 10px; overflow: hidden; }
.bars .fill { display: block; height: 100%; background: var(--blue); border-radius: 10px; }
.bars li.weak .fill { background: var(--red); }
.bars small { color: var(--muted); text-align: right; }
.rec-summary { color: var(--muted); margin-bottom: 8px; }
.recs { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.recs li::marker { color: var(--blue); font-weight: 700; }
#hcRestart { display: block; margin: 8px auto 0; }
.fine { margin-top: 18px; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .dash-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .add-action { grid-template-columns: 1fr 1fr; }
  .add-action input[type="text"] { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .bar { padding: 10px 14px; }
  .brand small { display: none; }
  .tabs a { padding: 7px 12px; font-size: 0.88rem; }
  .view { padding-top: 22px; }
  .steps { grid-template-columns: repeat(5, auto); overflow-x: auto; }
  .steps button { padding: 8px 10px; font-size: 0.92rem; }
  .steps i { display: none; }
  .actions thead { display: none; }
  .actions, .actions tbody, .actions tr, .actions td { display: block; width: 100%; }
  .actions tr { display: grid; grid-template-columns: 40px 1fr; gap: 6px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .actions tr:last-child { border-bottom: 0; }
  .actions td { border: 0; padding: 0; width: auto !important; }
  .actions td.c-done { grid-row: span 4; text-align: left; }
  .add-action { grid-template-columns: 1fr; }
  .score { gap: 16px; }
  .score-ring { width: 108px; height: 108px; }
  .score-ring b { font-size: 2.2rem; }
}
@media (max-width: 420px) {
  .brand b { font-size: 0.95rem; }
  .kpis { gap: 8px; }
  .kpi { padding: 12px 14px; }
  .pair b { font-size: 1.15rem; }
  .bars li { grid-template-columns: 70px 1fr 78px; font-size: 0.88rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
