.period-analytics-phase12 {
  --phase12-ink: #203337;
  --phase12-muted: #66787b;
  --phase12-line: #d9e1df;
  --phase12-teal: #315d68;
  --phase12-green: #3f735f;
  --phase12-amber: #9a7352;
  --phase12-red: #9a5148;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--phase12-line);
  color: var(--phase12-ink);
}

.period-phase12-heading,
.period-phase12-toolbar,
.period-phase12-coverage header,
.period-phase12-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.period-phase12-heading h3,
.period-phase12-card h4 {
  margin: 0;
  color: var(--phase12-ink);
}

.period-phase12-heading h3 {
  margin-top: 4px;
  font-size: clamp(22px, 2.4vw, 32px);
  letter-spacing: -0.035em;
}

.period-phase12-heading p {
  max-width: 820px;
  margin: 8px 0 0;
  color: var(--phase12-muted);
  line-height: 1.65;
}

.period-phase12-eyebrow {
  color: var(--phase12-teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.period-phase12-grade {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid #b6cbc4;
  border-radius: 999px;
  background: #eff6f2;
  color: var(--phase12-green);
  font-size: 12px;
  font-weight: 800;
}

.period-phase12-grade.grade-c {
  border-color: #dec8a9;
  background: #fbf5e9;
  color: var(--phase12-amber);
}

.period-phase12-grade.grade-d {
  border-color: #ddbab5;
  background: #fbefed;
  color: var(--phase12-red);
}

.period-phase12-toolbar {
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--phase12-line);
  border-radius: 12px;
  background: #fff;
}

.period-phase12-toolbar span {
  flex: 1 1 360px;
  color: var(--phase12-muted);
  font-size: 12px;
}

.period-phase12-verdict {
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid #b8d0c7;
  border-left: 4px solid var(--phase12-green);
  border-radius: 12px;
  background: #eff6f2;
}

.period-phase12-verdict.blocked {
  border-color: #ddc0b9;
  border-left-color: var(--phase12-red);
  background: #fbf1ef;
}

.period-phase12-verdict > span,
.period-phase12-kpis article > span,
.period-phase12-lfl-grid article > span,
.period-phase12-boundaries article > span {
  display: block;
  color: var(--phase12-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.period-phase12-verdict strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.45;
}

.period-phase12-verdict p {
  margin: 7px 0 0;
  color: var(--phase12-muted);
  line-height: 1.55;
}

.period-phase12-coverage-grid,
.period-phase12-group-grid,
.period-phase12-boundaries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.period-phase12-coverage,
.period-phase12-card,
.period-phase12-kpis article,
.period-phase12-lfl-grid article,
.period-phase12-boundaries article {
  min-width: 0;
  border: 1px solid var(--phase12-line);
  border-radius: 12px;
  background: #fff;
}

.period-phase12-coverage {
  padding: 15px;
}

.period-phase12-coverage header {
  align-items: center;
}

.period-phase12-coverage header span {
  color: var(--phase12-muted);
  font-size: 12px;
  font-weight: 700;
}

.period-phase12-coverage header strong {
  font-size: 20px;
}

.period-phase12-progress {
  height: 8px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eeec;
}

.period-phase12-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--phase12-green);
}

.period-phase12-coverage.blocked .period-phase12-progress i,
.period-phase12-coverage.warn .period-phase12-progress i {
  background: var(--phase12-red);
}

.period-phase12-coverage p {
  margin: 8px 0 0;
  color: var(--phase12-muted);
  font-size: 11px;
}

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

.period-phase12-kpis article,
.period-phase12-lfl-grid article {
  padding: 14px;
}

.period-phase12-kpis article.warn,
.period-phase12-lfl-grid article.warn {
  border-color: #dfc1bb;
  background: #fcf3f1;
}

.period-phase12-kpis article strong,
.period-phase12-lfl-grid article strong {
  display: block;
  overflow: hidden;
  margin: 7px 0 5px;
  font-size: 20px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.period-phase12-kpis article small,
.period-phase12-lfl-grid article small {
  display: block;
  color: var(--phase12-muted);
  font-size: 10px;
  line-height: 1.45;
}

.period-phase12-lfl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.period-phase12-card {
  margin-top: 12px;
  padding: 18px;
}

.period-phase12-group-grid .period-phase12-card {
  margin-top: 0;
}

.period-phase12-card > header {
  align-items: center;
  margin-bottom: 14px;
}

.period-phase12-card > header h4 {
  font-size: 16px;
}

.period-phase12-card > header span {
  display: block;
  margin-top: 4px;
  color: var(--phase12-muted);
  font-size: 11px;
}

.period-phase12-card > header b {
  color: var(--phase12-teal);
  font-size: 12px;
  white-space: nowrap;
}

.period-phase12-card > header b.warn {
  color: var(--phase12-red);
}

.period-phase12-bridge {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.period-phase12-bridge div {
  min-width: 0;
  padding: 12px;
  border-radius: 9px;
  background: #f4f6f4;
}

.period-phase12-bridge div.net {
  background: #eaf1ef;
}

.period-phase12-bridge div.ambiguous {
  background: #f8f2e9;
}

.period-phase12-bridge span,
.period-phase12-bridge strong {
  display: block;
}

.period-phase12-bridge span {
  color: var(--phase12-muted);
  font-size: 10px;
}

.period-phase12-bridge strong {
  overflow: hidden;
  margin-top: 6px;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.period-phase12-table-wrap {
  overflow-x: auto;
}

.period-phase12-table-wrap table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}

.period-phase12-table-wrap th,
.period-phase12-table-wrap td {
  padding: 9px 8px;
  border-bottom: 1px solid #e7ecea;
  text-align: right;
  white-space: nowrap;
}

.period-phase12-table-wrap th:first-child,
.period-phase12-table-wrap td:first-child {
  text-align: left;
}

.period-phase12-table-wrap th {
  color: var(--phase12-muted);
  font-size: 10px;
  font-weight: 800;
}

.period-phase12-table-wrap td {
  font-size: 12px;
}

.period-phase12-table-wrap td.negative {
  color: var(--phase12-red);
}

.period-phase12-table-wrap td small {
  display: block;
  max-width: 190px;
  overflow: hidden;
  margin-top: 3px;
  color: var(--phase12-muted);
  font-size: 9px;
  text-overflow: ellipsis;
}

.period-phase12-boundaries article {
  padding: 16px 18px;
  background: #f4f8f5;
}

.period-phase12-boundaries article.suspended {
  background: #fbf3f1;
}

.period-phase12-boundaries ul {
  margin: 9px 0 0;
  padding-left: 18px;
}

.period-phase12-boundaries li,
.period-phase12-boundaries p {
  margin: 5px 0;
  color: var(--phase12-muted);
  font-size: 12px;
  line-height: 1.5;
}

.period-phase12-contract {
  margin: 10px 0 0;
  color: var(--phase12-muted);
  font-size: 11px;
  line-height: 1.6;
}

.period-phase12-state {
  margin-top: 14px;
  padding: 28px 18px;
  border: 1px dashed #c8d2cf;
  border-radius: 12px;
  background: #f7f9f7;
  color: var(--phase12-muted);
  text-align: center;
}

.period-phase12-state.compact {
  margin-top: 0;
  padding: 18px;
}

.period-comparison-gate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid #bfd0ca;
  border-left: 4px solid #3f735f;
  border-radius: 12px;
  background: #eff6f2;
}

.period-comparison-gate.grade-c,
.period-comparison-gate.grade-d {
  border-color: #dfc1bb;
  border-left-color: #9a5148;
  background: #fbf1ef;
}

.period-comparison-gate strong,
.period-comparison-gate span,
.period-comparison-gate p {
  display: block;
}

.period-comparison-gate p {
  margin: 4px 0 0;
  color: #66787b;
  font-size: 12px;
}

.period-comparison-gate dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 8px;
  margin: 0;
}

.period-comparison-gate dl div {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.period-comparison-gate dt {
  color: #66787b;
  font-size: 10px;
}

.period-comparison-gate dd {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 800;
}

.period-phase3-comparison-blocked,
.period-phase7-comparison-blocked,
.period-phase8-comparison-blocked {
  border-color: #dfc1bb !important;
  border-left: 4px solid #9a5148 !important;
  background: #fbf1ef !important;
}

.period-phase3-quadrant-label.unavailable,
.period-phase7-class.unavailable {
  background: #eef0ef !important;
  color: #66787b !important;
}

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

  .period-phase12-bridge {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .period-phase12-heading,
  .period-phase12-card > header,
  .period-comparison-gate {
    align-items: flex-start;
    flex-direction: column;
  }

  .period-phase12-grade {
    align-self: flex-start;
  }

  .period-phase12-coverage-grid,
  .period-phase12-group-grid,
  .period-phase12-boundaries {
    grid-template-columns: 1fr;
  }

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

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

  .period-comparison-gate dl {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .period-phase12-kpis,
  .period-phase12-lfl-grid {
    grid-template-columns: 1fr;
  }
}
