:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-2: #0b1728;
  --panel: rgba(12, 27, 46, 0.92);
  --panel-2: rgba(18, 36, 58, 0.94);
  --border: #2d4968;
  --border-soft: rgba(116, 157, 196, 0.24);
  --text: #f4f8fc;
  --muted: #9eb0c4;
  --green: #35e884;
  --green-2: #20d66f;
  --yellow: #f4c84d;
  --purple: #9b7cff;
  --blue: #47b9f6;
  --red: #ff6b73;
  --track: #2a3c53;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 75% -10%, rgba(117, 80, 189, 0.22), transparent 34rem),
    radial-gradient(circle at 16% -10%, rgba(27, 188, 229, 0.16), transparent 30rem),
    linear-gradient(180deg, #081321 0%, #06101c 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 100px;
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 0 42%, rgba(69, 82, 139, 0.20) 42% 49%, transparent 49%),
    linear-gradient(75deg, transparent 0 58%, rgba(224, 104, 101, 0.13) 58% 68%, transparent 68%);
  opacity: 0.9;
}

.shell {
  position: relative;
  width: min(1540px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 34px;
}

.hero {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 10px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  position: relative;
  width: 62px;
  height: 42px;
}

.brand-mark span {
  position: absolute;
  width: 34px;
  height: 34px;
  border-left: 14px solid var(--blue);
  border-top: 14px solid transparent;
  transform: rotate(45deg) skew(-8deg, -8deg);
}

.brand-mark span:first-child {
  left: 5px;
  top: 4px;
}

.brand-mark span:last-child {
  right: 0;
  top: -2px;
  border-left-color: #43e4b6;
}

.brand-name {
  font-size: clamp(30px, 3vw, 46px);
  font-weight: 850;
  letter-spacing: 0.01em;
}

.brand-divider {
  width: 1px;
  height: 46px;
  background: rgba(255, 255, 255, 0.45);
}

.hero h1 {
  margin: 0;
  font-size: clamp(24px, 2.7vw, 40px);
  line-height: 1.05;
}

.hero p {
  margin: 5px 0 0;
  color: #d2deeb;
  font-size: 16px;
}

.updated {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  background: rgba(7, 18, 32, 0.72);
  border-radius: 15px;
}

.updated small,
.updated strong {
  display: block;
}

.updated small {
  color: var(--muted);
  margin-bottom: 2px;
}

.live-dot {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(53, 232, 132, 0.85);
}

.panel,
.metric-card {
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(17, 35, 57, 0.96), rgba(9, 24, 41, 0.96));
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.panel {
  min-width: 0;
  max-width: 100%;
  padding: 20px;
}

.panel h2 {
  margin: 0;
  font-size: 21px;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.info {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid #8ca4ba;
  border-radius: 50%;
  color: #c6d4e1;
  font-size: 12px;
}

.top-grid {
  display: grid;
  grid-template-columns: minmax(460px, 2.8fr) repeat(4, minmax(145px, 0.72fr));
  gap: 16px;
}

.readiness-card {
  min-height: 164px;
}

.readiness-body {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(255px, 0.9fr);
  gap: 28px;
  margin-top: 14px;
  align-items: center;
}

.big-number {
  font-size: clamp(42px, 5vw, 62px);
  font-weight: 850;
  line-height: 1;
}

.big-progress,
.module-track {
  overflow: hidden;
  background: var(--track);
  border: 1px solid rgba(116, 157, 196, 0.18);
}

.big-progress {
  height: 22px;
  margin-top: 18px;
  border-radius: 999px;
}

.big-progress span,
.module-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #25ef77, #36dda0);
}

.summary-list {
  padding-left: 26px;
  border-left: 1px solid rgba(143, 169, 194, 0.55);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 8px 0;
  color: #d7e1ec;
}

.summary-row strong.done {
  color: var(--green);
}

.summary-row strong.audit_required {
  color: var(--yellow);
}

.summary-row strong.planned {
  color: var(--purple);
}

.summary-row strong.blocked {
  color: var(--red);
}

.metric-card {
  min-height: 164px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 22px;
}

.metric-card strong {
  font-size: 38px;
  margin: 8px 0 2px;
}

.metric-card span:last-child {
  color: #dbe5ef;
  font-size: 16px;
}

.metric-icon {
  font-size: 31px;
  font-weight: 700;
}

.metric-green .metric-icon { color: var(--green); }
.metric-yellow .metric-icon { color: var(--yellow); }
.metric-purple .metric-icon { color: var(--purple); }
.metric-red .metric-icon { color: var(--red); }

.main-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.22fr)
    minmax(330px, 0.94fr)
    minmax(260px, 0.7fr);
  grid-template-areas: "modules mid side";
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.modules-panel {
  grid-area: modules;
}

.mid-stack {
  grid-area: mid;
}

.side-stack {
  grid-area: side;
}

.modules-panel,
.mid-stack,
.side-stack,
.mid-stack > *,
.side-stack > * {
  min-width: 0;
  max-width: 100%;
}

.mid-stack,
.side-stack {
  display: grid;
  gap: 16px;
  align-content: start;
}

.modules-table {
  margin-top: 16px;
}

.module-head,
.module-row {
  display: grid;
  grid-template-columns: 1.45fr 0.48fr 1.1fr 0.9fr;
  align-items: center;
  gap: 12px;
}

.module-head {
  padding: 6px 4px 10px;
  color: #c8d5e2;
  font-size: 13px;
  border-bottom: 1px solid var(--border-soft);
}

.module-row {
  min-height: 49px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border-soft);
}

.module-row:last-child {
  border-bottom: 0;
}

.module-name {
  font-weight: 700;
}

.module-ready {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 48px;
  gap: 10px;
  align-items: center;
}

.module-track {
  height: 13px;
  border-radius: 999px;
}

.module-track span.audit_required {
  background: linear-gradient(90deg, #4ac0f6, #82d6ff);
}

.module-track span.planned {
  background: linear-gradient(90deg, #536982, #617690);
}

.module-track span.in_progress {
  background: linear-gradient(90deg, var(--green), #4ed7bd);
}

.status-pill,
.model-pill {
  justify-self: start;
  border: 1px solid;
  border-radius: 9px;
  padding: 6px 9px;
  font-size: 12px;
  white-space: nowrap;
}

.model-pill {
  color: #e6eef7;
  border-color: #46627f;
  background: rgba(44, 72, 102, 0.45);
}

.status-pill.done {
  color: #7df0ac;
  border-color: #2d9d62;
  background: rgba(31, 131, 76, 0.24);
}

.status-pill.in_progress {
  color: #84d7ff;
  border-color: #3181ab;
  background: rgba(36, 115, 157, 0.24);
}

.status-pill.audit_required {
  color: #f7d766;
  border-color: #a97c16;
  background: rgba(141, 100, 18, 0.25);
}

.status-pill.planned {
  color: #c8b9ff;
  border-color: #66569e;
  background: rgba(87, 70, 145, 0.25);
}

.status-pill.blocked {
  color: #ff9599;
  border-color: #a44b53;
  background: rgba(139, 52, 61, 0.25);
}

.donut-wrap {
  min-height: 205px;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  align-items: center;
  margin-top: 18px;
}

.donut {
  width: 184px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 21%, var(--yellow) 21% 37%, var(--purple) 37% 100%);
}

.donut::before {
  content: "";
  grid-area: 1 / 1;
  width: 116px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #0b192a;
  border: 1px solid var(--border-soft);
}

.donut-center {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  text-align: center;
}

.donut-center strong {
  display: block;
  font-size: 34px;
}

.donut-center span {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #d7e4ef;
}

.legend-item {
  display: grid;
  grid-template-columns: 13px 1fr auto;
  gap: 9px;
  align-items: center;
  margin: 12px 0;
  color: #dbe4ee;
  font-size: 13px;
}

.legend-swatch {
  width: 13px;
  height: 13px;
  border-radius: 3px;
}

.achievement-list {
  margin-top: 12px;
}

.achievement {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
}

.achievement:last-child {
  border-bottom: 0;
}

.check {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #052416;
  background: var(--green);
  font-weight: 900;
}

.achievement strong,
.achievement small {
  display: block;
}

.achievement small {
  color: var(--muted);
  margin-top: 2px;
}

.critical-path {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.path-node {
  min-width: 96px;
  max-width: 128px;
  flex: 1;
  border: 1px solid #49627c;
  background: rgba(29, 49, 73, 0.66);
  border-radius: 13px;
  padding: 13px 9px;
  text-align: center;
}

.path-node.active {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px rgba(53, 232, 132, 0.3);
}

.path-node strong {
  display: block;
  font-size: 13px;
}

.path-node small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.path-arrow {
  display: grid;
  place-items: center;
  color: #d8e8f6;
  font-size: 21px;
}

.next-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: next;
}

.next-list li {
  counter-increment: next;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 11px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}

.next-list li:last-child {
  border-bottom: 0;
}

.next-list li::before {
  content: counter(next);
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid #607995;
  border-radius: 50%;
  color: #dce7f1;
  font-size: 12px;
}

.next-list strong,
.next-list small {
  display: block;
}

.next-list small {
  color: var(--muted);
  margin-top: 3px;
}

.roadmap-panel {
  margin-top: 16px;
}

.roadmap {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 18px;
  margin-top: 20px;
  position: relative;
}

.roadmap::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 7%;
  right: 7%;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--blue) 35%, #51677f 55%, #51677f 80%, var(--purple));
  border-radius: 999px;
}

.roadmap-stage {
  position: relative;
  padding-top: 42px;
}

.roadmap-stage::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 50%;
  width: 18px;
  height: 18px;
  transform: translateX(-50%);
  border: 4px solid #68809a;
  background: #102137;
  border-radius: 50%;
}

.roadmap-stage.done::before {
  border-color: var(--green);
  box-shadow: 0 0 16px rgba(53, 232, 132, 0.5);
}

.roadmap-stage.active::before {
  border-color: var(--blue);
  box-shadow: 0 0 18px rgba(71, 185, 246, 0.75);
}

.roadmap-card {
  min-height: 92px;
  border: 1px solid #4a617a;
  background: rgba(24, 42, 64, 0.77);
  border-radius: 13px;
  padding: 13px 14px;
}

.roadmap-stage.done .roadmap-card {
  border-color: rgba(53, 232, 132, 0.5);
}

.roadmap-stage.active .roadmap-card {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(71, 185, 246, 0.25);
}

.roadmap-card strong {
  font-size: 18px;
}

.roadmap-card span {
  display: block;
  margin-top: 7px;
  color: #d8e4ef;
  font-size: 13px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #7f93a8;
  padding: 18px 4px 0;
  font-size: 12px;
}

@media (max-width: 1320px) {
  .top-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .readiness-card {
    grid-column: 1 / -1;
  }

  .main-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    grid-template-areas:
      "modules modules"
      "mid side";
  }
}

@media (max-width: 920px) {
  .main-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "modules"
      "mid"
      "side";
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 18px, 760px);
    padding-top: 8px;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 45px;
    transform: scale(0.78);
    transform-origin: left center;
  }

  .brand-divider {
    display: none;
  }

  .brand-name {
    font-size: 30px;
  }

  .hero h1 {
    font-size: 22px;
  }

  .hero p {
    font-size: 13px;
  }

  .updated {
    width: 100%;
  }

  .top-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .main-grid {
    gap: 10px;
  }

  .readiness-card {
    grid-column: 1 / -1;
  }

  .mid-stack,
  .side-stack {
    gap: 10px;
  }

  .metric-card {
    min-height: 126px;
    padding: 15px;
  }

  .metric-card strong {
    font-size: 31px;
  }

  .readiness-body {
    grid-template-columns: 1fr;
  }

  .summary-list {
    padding: 12px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(143, 169, 194, 0.45);
  }

  .module-head {
    display: none;
  }

  .module-row {
    grid-template-columns: 1fr auto;
    gap: 7px 14px;
    padding: 13px 2px;
  }

  .module-ready {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 42px;
  }

  .status-pill {
    grid-column: 2;
    grid-row: 1;
  }

  .donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .legend {
    width: 100%;
  }

  .roadmap {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .roadmap::before {
    top: 0;
    bottom: 0;
    left: 12px;
    width: 3px;
    height: auto;
    right: auto;
    background: linear-gradient(180deg, var(--green), var(--blue), #51677f, var(--purple));
  }

  .roadmap-stage {
    padding: 0 0 0 34px;
  }

  .roadmap-stage::before {
    top: 18px;
    left: 13px;
    transform: translate(-50%, -50%);
  }

  footer {
    flex-direction: column;
  }
}
