:root {
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-strong: #f0f5f1;
  --ink: #17211d;
  --muted: #66736d;
  --subtle: #8a9690;
  --line: #dfe6e1;
  --line-strong: #c3d1c8;
  --green: #1d8f5a;
  --green-soft: #e2f4e9;
  --blue: #2b6cb0;
  --blue-soft: #e4eefb;
  --yellow: #c47b12;
  --yellow-soft: #fff1d7;
  --red: #c94646;
  --red-soft: #fae3e3;
  --shadow: 0 18px 50px rgba(23, 33, 29, .10);
  --radius: 8px;
  --sp-todo: #8eb6e8;
  --sp-prog: #2f7d93;
  --sp-done: #2f8b57;
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html { min-height: 100%; }

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(47, 125, 147, .10), transparent 34rem),
    linear-gradient(315deg, rgba(196, 123, 18, .10), transparent 30rem),
    var(--bg);
  font: 16px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: var(--blue); }

a:hover { color: #174f86; }

button,
input,
select {
  font: inherit;
}

button,
.btn-refresh {
  min-height: 42px;
  border-radius: var(--radius);
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

button:hover,
.btn-refresh:hover {
  transform: translateY(-1px);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(47, 125, 147, .28);
  outline-offset: 2px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 248, 245, .88);
  border-bottom: 1px solid rgba(195, 209, 200, .72);
  backdrop-filter: blur(18px);
}

.topbar {
  width: min(1120px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.brand-logo {
  width: 40px;
  height: 40px;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-name { white-space: nowrap; }

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .68);
}

.nav-links a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
  color: #33413b;
  text-decoration: none;
  font-size: .92rem;
}

.nav-links a:hover {
  background: var(--surface-strong);
  color: var(--ink);
}

.nav-links a.active,
.nav-links a[aria-current="page"] {
  background: var(--ink);
  color: #fff;
}

.page {
  width: min(920px, calc(100% - 32px));
  margin: 42px auto 64px;
}

.page.wide {
  width: min(1180px, calc(100% - 32px));
}

.page.home {
  min-height: calc(100vh - 190px);
  display: grid;
  place-items: center;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  font-size: 1.15rem;
  line-height: 1.2;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--green);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lead,
.notice,
.section-note {
  color: var(--muted);
}

.checker-panel {
  width: min(760px, 100%);
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.checker-panel {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: center;
  gap: clamp(24px, 5vw, 48px);
}

.error-panel {
  width: min(760px, 100%);
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel-copy {
  max-width: 620px;
}

.check-form {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.check-form label {
  color: #33413b;
  font-weight: 700;
  font-size: .9rem;
}

.form-row,
.project-picker {
  display: flex;
  gap: 10px;
}

.project-form {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.check-form input,
.project-form select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.check-form input {
  flex: 1;
  padding: 0 16px;
  font-size: 1.06rem;
  text-transform: uppercase;
}

.project-form select {
  min-width: min(390px, 64vw);
  padding: 0 40px 0 14px;
}

.check-form button,
.project-form button {
  border: 0;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.check-form button {
  min-width: 112px;
  padding: 0 22px;
}

.project-form button {
  min-width: 86px;
  padding: 0 18px;
}

.period-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .72);
}

.period-option {
  cursor: pointer;
}

.period-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.period-option span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 6px;
  color: #33413b;
  font-size: .9rem;
  font-weight: 700;
}

.period-option.active span,
.period-option input:checked + span {
  background: var(--ink);
  color: #fff;
}

.period-option input:focus-visible + span {
  outline: 3px solid rgba(47, 125, 147, .28);
  outline-offset: 2px;
}

.check-form button:hover,
.project-form button:hover {
  background: #2a3832;
}

/* ---- home-page ticket type-ahead combobox ---- */
.combo {
  position: relative;
  flex: 1;
  min-width: 0;
}
.combo input {
  width: 100%;
}
.combo-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.combo-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
}
.combo-option:hover,
.combo-option.active {
  background: var(--surface-strong);
}
.combo-message {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: .9rem;
}
.combo-message.loading {
  color: var(--ink);
}
.combo-message.loading::before {
  content: "";
  width: 14px;
  height: 14px;
  margin-right: 10px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: sprint-spin .9s linear infinite;
}
.combo-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.opt-key {
  font-weight: 700;
  font-size: .92rem;
  color: var(--ink);
  text-transform: none;
}
.opt-summary {
  font-size: .82rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
}

.panel-actions {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.secondary-link,
.back-link a {
  font-weight: 700;
  text-decoration: none;
}

.stamp,
.muted {
  color: var(--subtle);
  font-size: .86rem;
}

.readiness-preview {
  min-height: 310px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .70)),
    linear-gradient(135deg, rgba(47, 125, 147, .24), rgba(196, 123, 18, .18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.preview-toolbar {
  display: flex;
  gap: 7px;
  margin-bottom: 24px;
}

.preview-toolbar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(23, 33, 29, .28);
}

.preview-score {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
  padding: 18px;
  border-radius: var(--radius);
  background: #fff;
}

.preview-score strong {
  font-size: 2.6rem;
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.preview-score span,
.preview-row span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: #dfe6e1;
}

.preview-score span {
  width: 62%;
}

.preview-row {
  display: grid;
  grid-template-columns: 16px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 34px;
}

.preview-row i {
  width: 14px;
  height: 14px;
  border-radius: 999px;
}

.preview-row.pass i { background: var(--green); }
.preview-row.warn i { background: var(--yellow); }
.preview-row.fail i { background: var(--red); }
.preview-row.pass span { width: 92%; }
.preview-row.short span { width: 74%; }
.preview-row.warn span { width: 82%; }
.preview-row.fail span { width: 58%; }

.report-header,
.dash-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.report-header h1,
.dash-hero h1 {
  max-width: 760px;
}

.score-card {
  width: 150px;
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
  box-shadow: var(--shadow);
}

.score-card.ready {
  border-color: rgba(29, 143, 90, .35);
  background: linear-gradient(180deg, #fff, var(--green-soft));
}

.score-card.needs-work {
  border-color: rgba(201, 70, 70, .34);
  background: linear-gradient(180deg, #fff, var(--red-soft));
}

.score {
  display: block;
  font-size: 2.35rem;
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.score-label {
  color: var(--muted);
  font-size: .82rem;
}

.score-verdict {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.threshold-note {
  color: var(--muted);
  font-weight: 700;
}

.notice {
  padding: 12px 14px;
  border: 1px solid rgba(196, 123, 18, .32);
  border-radius: var(--radius);
  background: var(--yellow-soft);
}

.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 16px;
}

.report-filter {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.report-filter span {
  min-width: 24px;
  min-height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}

.report-filter:hover {
  border-color: var(--green);
  color: var(--green);
}

.report-filter.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.report-filter.active span {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.report-filter.filter-fail:not(.active) span { background: var(--red-soft); color: var(--red); }
.report-filter.filter-warn:not(.active) span { background: var(--yellow-soft); color: var(--yellow); }
.report-filter.filter-pass:not(.active) span { background: var(--green-soft); color: var(--green); }

.report-filter-empty {
  margin: 14px 0 0;
}

.table-card,
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(23, 33, 29, .06);
}

.table-card {
  overflow: hidden;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  scrollbar-gutter: stable;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.criteria th,
.criteria td,
.data th,
.data td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.criteria thead th,
.data thead th {
  background: #f3f7f4;
  color: #54615b;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 1px 0 var(--line);
}

.data thead th {
  position: sticky;
  /* .table-scroll is the sticky containing block. A header-sized offset here
     moves the header over the first data row instead of below the app bar. */
  top: 0;
  z-index: 2;
}

.criteria tbody tr:last-child td,
.data tbody tr:last-child td {
  border-bottom: 0;
}

.criteria tbody tr:hover,
.data tbody tr:hover {
  background: #fbfcfb;
}

.data th:first-child,
.data td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
}

.data thead th:first-child {
  z-index: 3;
  background: #f3f7f4;
}

.data tbody tr:hover td:first-child {
  background: #fbfcfb;
}

.criteria tr[hidden] {
  display: none;
}

.criteria .st {
  width: 132px;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pass .st { color: var(--green); }
.status-fail .st { color: var(--red); }
.status-warn .st { color: var(--yellow); }
.status-not_applicable .st { color: var(--subtle); }

.status-pill {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  font-size: .72rem;
}

.status-pill-pass {
  border-color: rgba(29, 143, 90, .32);
  background: var(--green-soft);
  color: var(--green);
}

.status-pill-fail {
  border-color: rgba(201, 70, 70, .32);
  background: var(--red-soft);
  color: var(--red);
}

.status-pill-warn {
  border-color: rgba(196, 123, 18, .34);
  background: var(--yellow-soft);
  color: var(--yellow);
}

.status-pill-not_applicable {
  color: var(--subtle);
}

.required-row.status-fail td:first-child {
  box-shadow: inset 4px 0 0 var(--red);
}

.required-row.status-fail {
  background: #fffafa;
}

.req {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  margin-left: 6px;
  padding: 0 7px;
  border: 1px solid rgba(201, 70, 70, .36);
  border-radius: 999px;
  color: var(--red);
  background: var(--red-soft);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  vertical-align: middle;
}

.report-lists {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.callout {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.callout h2 {
  margin-bottom: 10px;
}

.callout.danger {
  border-color: rgba(201, 70, 70, .28);
  background: var(--red-soft);
}

.callout.question {
  border-color: rgba(47, 125, 147, .28);
  background: var(--blue-soft);
}

ul {
  margin: 0;
  padding-left: 1.25rem;
}

li + li {
  margin-top: 6px;
}

ul.missing li { color: #9d2929; }

.back-link {
  margin-top: 24px;
}

.error-panel {
  margin: 10vh auto 0;
}

.dash-hero {
  align-items: center;
}

.dash-hero h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.dash-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.dash-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.btn-refresh:hover {
  border-color: var(--green);
  color: var(--green);
}

.btn-primary-action {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.btn-primary-action:hover {
  border-color: #2a3832;
  background: #2a3832;
  color: #fff;
}

.state-badge {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: .8rem;
  font-weight: 800;
  line-height: 1;
}

.state-fresh {
  border-color: rgba(29, 143, 90, .32);
  background: var(--green-soft);
  color: var(--green);
}

.state-cached {
  border-color: rgba(43, 108, 176, .28);
  background: var(--blue-soft);
  color: var(--blue);
}

.state-stale {
  border-color: rgba(196, 123, 18, .34);
  background: var(--yellow-soft);
  color: var(--yellow);
}

.state-neutral {
  color: var(--muted);
}

.empty-state {
  max-width: 620px;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .64);
}

.empty-state.compact {
  margin-top: 18px;
  padding: 22px;
}

.risk-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.risk-item {
  min-height: 118px;
  display: grid;
  align-content: space-between;
  gap: 7px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 28px rgba(23, 33, 29, .05);
}

.risk-item.risk-hot {
  border-left-color: var(--red);
  background: linear-gradient(180deg, #fff, rgba(250, 227, 227, .78));
}

.risk-item.risk-warn {
  border-left-color: var(--yellow);
  background: linear-gradient(180deg, #fff, rgba(255, 241, 215, .72));
}

.risk-kicker {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.risk-item strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.05;
}

.risk-item span:last-child {
  color: var(--subtle);
  font-size: .84rem;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.kpi {
  min-height: 126px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(23, 33, 29, .06);
}

.kpi.accent-green { border-top-color: var(--green); }
.kpi.accent-blue { border-top-color: var(--blue); }
.kpi.accent-yellow { border-top-color: var(--yellow); }
.kpi.accent-red { border-top-color: var(--red); }

.kpi .label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.kpi .value {
  font-size: 2.1rem;
  line-height: 1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.kpi .sub {
  color: var(--subtle);
  font-size: .8rem;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 4px 0 18px;
  color: var(--muted);
  font-size: .88rem;
}

.swatch {
  width: 12px;
  height: 12px;
  display: inline-block;
  margin-right: 6px;
  border-radius: 3px;
  vertical-align: -1px;
}

.swatch.todo,
.seg.todo { background: var(--sp-todo); }

.swatch.prog,
.seg.prog { background: var(--sp-prog); }

.swatch.done,
.seg.done { background: var(--sp-done); }

.card {
  margin: 16px 0;
  padding: 0;
  overflow: hidden;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 8px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-heading .section-note {
  margin-bottom: 0;
}

.card > .section-note {
  padding: 0 18px 18px;
}

.data {
  min-width: 760px;
}

.data th,
.data td {
  vertical-align: middle;
}

.data .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data .total {
  color: var(--ink);
  font-weight: 800;
}

.metric-link {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(43, 108, 176, .32);
}

.metric-link:hover {
  color: var(--blue);
  border-bottom-color: currentColor;
}

.metric-link span {
  color: var(--subtle);
  font-weight: 400;
}

.data .summary {
  max-width: 40ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data .barcol {
  width: 30%;
  min-width: 160px;
}

.bar {
  display: flex;
  gap: 2px;
  height: 18px;
  min-width: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2ef;
}

.bar .seg {
  display: block;
  height: 100%;
  min-width: 4px;
}

@media (max-width: 920px) {
  .kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: auto;
    padding: 12px 0;
    align-items: stretch;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    flex: 1;
    justify-content: center;
  }

  .page {
    margin-top: 24px;
  }

  .form-row,
  .project-picker,
  .report-header,
  .dash-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .project-form {
    justify-items: stretch;
  }

  .period-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .period-option span {
    width: 100%;
    padding: 0 8px;
  }

  .project-form select {
    min-width: 0;
  }

  .score-card {
    width: 100%;
    min-height: auto;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    text-align: left;
  }

  .score {
    font-size: 2rem;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 4px;
  }

  .checker-panel {
    grid-template-columns: 1fr;
  }

  .readiness-preview {
    min-height: 220px;
  }
}

@media (max-width: 480px) {
  .brand-name {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .checker-panel,
  .error-panel {
    padding: 22px;
  }

  .kpis {
    grid-template-columns: 1fr;
  }
}

/* --- Sprint insight page --- */

.analysis-loading,
.analysis-error {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 18px;
  padding: 48px 32px;
  text-align: center;
}

.analysis-loading .spinner {
  border: 3px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  margin: 0 auto 16px;
  animation: sprint-spin .9s linear infinite;
}

@keyframes sprint-spin {
  to { transform: rotate(360deg); }
}

.analysis-error h2 { color: var(--red); }

.btn-analyze {
  background: var(--green);
  border: 1px solid var(--green);
  color: #fff;
  padding: 8px 20px;
  cursor: pointer;
}

.objective-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 14px;
  padding: 24px 28px;
}

.objective-text {
  font-size: 1.08rem;
  margin: 6px 0 0;
}

.theme-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chip {
  background: var(--surface-strong);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-size: .85rem;
  padding: 4px 12px;
}

.dev-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  margin-top: 12px;
}

.dev-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.dev-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.dev-card h3 { margin: 0; }

.issue-count {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}

.dev-focus {
  color: var(--muted);
  margin: 0 0 10px;
}

.issue-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.issue-keys .issue-key {
  background: var(--blue-soft);
  border-radius: 4px;
  font-size: .82rem;
  padding: 2px 8px;
  text-decoration: none;
}

@media (max-width: 640px) {
  .data thead th {
    top: 0;
  }

  .card .table-scroll {
    overflow-x: visible;
  }

  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table {
    min-width: 0;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
  }

  .responsive-table tr:last-child {
    border-bottom: 0;
  }

  .responsive-table td,
  .responsive-table td:first-child {
    position: static;
    display: grid;
    grid-template-columns: minmax(104px, 34%) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 5px 0;
    border-bottom: 0;
    background: transparent;
  }

  .responsive-table td::before {
    content: attr(data-label);
    color: var(--subtle);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  .responsive-table .num {
    text-align: left;
    white-space: normal;
  }

  .responsive-table .summary {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .responsive-table .barcol {
    width: 100%;
    min-width: 0;
  }

  .responsive-table .bar {
    width: 100% !important;
  }

  .report-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-filter {
    justify-content: space-between;
  }

  .risk-summary {
    grid-template-columns: 1fr;
  }
}

/* --- Authentication and company administration --- */

.header-actions,
.account-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-menu {
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
}

.account-copy {
  display: grid;
  min-width: 0;
  line-height: 1.18;
  text-align: right;
}

.account-copy strong,
.account-copy small {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong { font-size: .82rem; }
.account-copy small { color: var(--muted); font-size: .74rem; }

.btn-signout {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 700;
}

.btn-signout:hover { border-color: var(--ink); }

.page.auth-page {
  min-height: calc(100vh - 190px);
  display: grid;
  place-items: center;
}

.auth-card,
.settings-shell {
  width: min(560px, 100%);
}

.auth-card {
  padding: clamp(26px, 6vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stack-form {
  display: grid;
  gap: 9px;
  margin-top: 28px;
}

.stack-form label {
  margin-top: 7px;
  color: #33413b;
  font-size: .88rem;
  font-weight: 800;
}

.stack-form input,
.stack-form select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.stack-form button {
  min-height: 46px;
  margin-top: 14px;
  padding: 0 18px;
  border: 0;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.stack-form button:hover { background: #2a3832; }

.field-help {
  color: var(--muted);
  font-size: .78rem;
}

.form-alert,
.form-success {
  margin: 20px 0 0;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: var(--radius);
}

.form-alert {
  border-color: rgba(201, 70, 70, .32);
  background: var(--red-soft);
  color: #8e2d2d;
}

.form-success {
  border-color: rgba(29, 143, 90, .3);
  background: var(--green-soft);
  color: #176e46;
}

.admin-hero { margin-bottom: 22px; }

.admin-grid {
  display: grid;
  grid-template-columns: minmax(300px, 350px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.admin-grid > .card { margin: 0; }
.admin-form-card { padding: 24px; }
.admin-list-card { padding: 0; }
.settings-card { padding: 22px; }

.admin-form-card .stack-form,
.settings-card .stack-form { margin-top: 22px; }

.admin-panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.admin-panel-heading .eyebrow,
.admin-list-heading .eyebrow {
  margin-bottom: 4px;
  font-size: .7rem;
}

.admin-panel-heading h2,
.admin-list-heading h2 {
  margin-bottom: 5px;
}

.admin-panel-heading .section-note,
.admin-list-heading .section-note {
  margin-bottom: 0;
  font-size: .86rem;
}

.admin-heading-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
}

.admin-list-heading {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.user-count {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 11px;
  border: 1px solid rgba(29, 143, 90, .24);
  border-radius: 999px;
  background: var(--green-soft);
  color: #176e46;
  font-size: .8rem;
  font-weight: 800;
  white-space: nowrap;
}

.admin-users-scroll {
  overflow-x: visible;
  scrollbar-gutter: auto;
}

.admin-users-table {
  min-width: 0;
  table-layout: fixed;
}

.admin-users-table .user-name-column { width: 29%; }
.admin-users-table .user-email-column { width: 34%; }
.admin-users-table .user-role-column { width: 22%; }
.admin-users-table .user-status-column { width: 15%; }

.admin-users-table thead th,
.admin-users-table thead th:first-child,
.admin-users-table tbody td:first-child {
  position: static;
  inset: auto;
  z-index: auto;
}

.admin-users-table th,
.admin-users-table td {
  padding: 15px 16px;
}

.admin-users-table tbody tr {
  transition: background .16s ease;
}

.user-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.user-identity strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--green-soft), var(--blue-soft));
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(43, 108, 176, .12);
  font-size: .8rem;
  font-weight: 900;
}

.user-avatar::before { content: attr(data-initial); }

.user-email {
  color: #33413b;
  text-decoration-color: rgba(43, 108, 176, .28);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.user-email:hover {
  color: var(--blue);
  text-decoration-color: currentColor;
}

.role-badge {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}

.admin-users-table .state-badge {
  min-height: 28px;
  gap: 7px;
  padding: 0 9px;
  font-size: .76rem;
}

.admin-users-table .state-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.settings-shell { margin: 0 auto; }
.settings-card { margin-top: 22px; }

.settings-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

@media (max-width: 980px) {
  .topbar { align-items: flex-start; padding: 12px 0; }
  .header-actions { align-items: flex-end; flex-direction: column-reverse; }
  .account-menu { border-left: 0; padding-left: 0; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-list-card { order: -1; }
}

@media (max-width: 720px) {
  .topbar { display: grid; }
  .header-actions { align-items: stretch; }
  .nav-links { max-width: calc(100vw - 32px); overflow-x: auto; }
  .account-menu { justify-content: space-between; }
  .account-copy { text-align: left; }
}

@media (max-width: 640px) {
  .admin-list-heading {
    min-height: 0;
    align-items: flex-start;
    padding: 20px;
  }

  .admin-users-table colgroup { display: none; }

  .admin-users-table th,
  .admin-users-table td {
    padding: 5px 0;
  }

  .admin-users-table tr {
    padding: 14px 20px;
  }

  .admin-users-table .user-identity strong {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .admin-form-card { padding: 20px; }
  .admin-list-heading { align-items: stretch; flex-direction: column; gap: 14px; }
  .user-count { align-self: flex-start; }
}

/* --- Project insight / product map --- */

/* --- Global page transition --- */

.page-transition-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(247, 248, 245, .76);
  backdrop-filter: blur(10px) saturate(.9);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility 0s linear .2s;
}

body.is-navigating {
  cursor: progress;
}

body.is-navigating .page-transition-loader {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.page-transition-bar {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  overflow: hidden;
  background: rgba(29, 143, 90, .12);
}

.page-transition-bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -38%;
  width: 38%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--green), #54bd80);
  box-shadow: 0 0 18px rgba(29, 143, 90, .48);
  animation: page-transition-sweep 1.05s cubic-bezier(.45, 0, .2, 1) infinite;
}

.page-transition-card {
  min-width: min(390px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(195, 209, 200, .86);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 24px 70px rgba(23, 33, 29, .18);
  transform: translateY(8px) scale(.98);
  transition: transform .22s cubic-bezier(.2, .8, .2, 1);
}

body.is-navigating .page-transition-card {
  transform: translateY(0) scale(1);
}

.page-transition-mark {
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, var(--surface-strong));
  box-shadow: inset 0 0 0 1px rgba(195, 209, 200, .72);
}

.page-transition-mark::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid transparent;
  border-top-color: var(--green);
  border-right-color: var(--blue);
  border-radius: 21px;
  animation: page-transition-orbit 1.15s linear infinite;
}

.page-transition-mark img {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
  animation: page-transition-breathe 1.15s ease-in-out infinite alternate;
}

.page-transition-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.page-transition-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-transition-copy small {
  color: var(--muted);
  font-size: .78rem;
}

.page-transition-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.page-transition-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: page-transition-dot .9s ease-in-out infinite;
}

.page-transition-dots i:nth-child(2) { animation-delay: .12s; }
.page-transition-dots i:nth-child(3) { animation-delay: .24s; }

@keyframes page-transition-sweep {
  to { transform: translateX(365%); }
}

@keyframes page-transition-orbit {
  to { transform: rotate(360deg); }
}

@keyframes page-transition-breathe {
  to { transform: scale(1.06); }
}

@keyframes page-transition-dot {
  0%, 60%, 100% { opacity: .28; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

@media (max-width: 480px) {
  .page-transition-loader { padding: 16px; }

  .page-transition-card {
    min-width: 0;
    width: 100%;
    gap: 13px;
    padding: 16px;
  }

  .page-transition-mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .page-transition-mark img { width: 38px; height: 38px; }
  .page-transition-copy small { font-size: .73rem; }
}

@media (prefers-reduced-motion: reduce) {
  .page-transition-loader,
  .page-transition-card {
    transition: none;
  }

  .page-transition-bar::after,
  .page-transition-mark::after,
  .page-transition-mark img,
  .page-transition-dots i {
    animation: none;
  }

  .page-transition-dots i { opacity: .65; }
}

.project-insight-hero .lead {
  max-width: 700px;
  margin-bottom: 0;
}

.project-insight-empty {
  max-width: 720px;
}

.insight-meta {
  margin-bottom: 14px;
}

.insight-overview {
  margin-top: 14px;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid rgba(29, 143, 90, .28);
  border-left: 5px solid var(--green);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(226, 244, 233, .72), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow);
}

.insight-overview h2 {
  max-width: 900px;
  margin-bottom: 12px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.25;
}

.insight-narrative {
  max-width: 92ch;
  margin-bottom: 0;
  color: #3d4c45;
  font-size: 1.02rem;
}

.insight-section {
  margin-top: 34px;
}

.insight-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 13px;
}

.insight-section-heading .eyebrow {
  margin-bottom: 5px;
}

.insight-section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
}

.insight-feature-grid,
.insight-workstream-grid {
  display: grid;
  gap: 14px;
}

.insight-feature-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}

.insight-workstream-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.insight-feature-card,
.insight-workstream-card,
.relationship-card,
.coverage-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(23, 33, 29, .06);
}

.insight-feature-card {
  display: flex;
  flex-direction: column;
  min-height: 270px;
  padding: 22px;
  border-top: 4px solid var(--green);
}

.insight-workstream-card {
  padding: 19px;
  border-top: 4px solid var(--blue);
}

.insight-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.insight-card-head h3,
.insight-workstream-card h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.insight-capability,
.insight-label {
  color: var(--green);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.insight-capability {
  margin-bottom: 4px;
}

.insight-label {
  margin: 16px 0 -7px;
}

.insight-description {
  margin-bottom: 12px;
  color: var(--muted);
}

.insight-value {
  display: grid;
  gap: 3px;
  margin: 2px 0 0;
  padding: 11px 13px;
  border-radius: 6px;
  background: var(--green-soft);
  color: #28533e;
  font-size: .88rem;
}

.insight-value strong {
  color: var(--green);
  font-size: .7rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.workstream-chips .chip,
.component-chips .chip {
  background: var(--blue-soft);
  border-color: rgba(43, 108, 176, .22);
  color: #245b91;
}

.insight-ticket-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
}

.insight-ticket-keys .issue-key {
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--blue-soft);
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none;
}

.relationship-list {
  display: grid;
  gap: 10px;
}

.relationship-card {
  display: grid;
  grid-template-columns: minmax(240px, .9fr) auto minmax(280px, 1.2fr);
  align-items: center;
  gap: 16px;
  padding: 17px 19px;
}

.relationship-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.relationship-route strong {
  overflow-wrap: anywhere;
}

.relationship-arrow {
  color: var(--green);
  font-size: 1.25rem;
  font-weight: 800;
}

.relationship-type {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--yellow-soft);
  color: #8c5910;
  font-size: .74rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.relationship-card .insight-description {
  margin: 0;
}

.relationship-card .insight-ticket-keys {
  grid-column: 1 / -1;
  padding-top: 0;
}

.coverage-card {
  padding: 22px;
}

.coverage-track {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ede9;
}

.coverage-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
}

.coverage-copy {
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: .88rem;
  font-variant-numeric: tabular-nums;
}

.coverage-card h3 {
  margin-bottom: 4px;
}

.insight-empty-copy {
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
}

@media (max-width: 900px) {
  .relationship-card {
    grid-template-columns: 1fr auto;
  }

  .relationship-card .insight-description {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .insight-section-heading,
  .insight-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .insight-feature-card,
  .insight-workstream-card,
  .coverage-card {
    padding: 18px;
  }

  .relationship-card {
    grid-template-columns: 1fr;
  }

  .relationship-route {
    grid-template-columns: 1fr;
  }

  .relationship-arrow {
    transform: rotate(90deg);
  }

  .relationship-type {
    justify-self: start;
  }

  .relationship-card .insight-description,
  .relationship-card .insight-ticket-keys {
    grid-column: auto;
  }
}
