:root {
  --dpp-blue: #174a72;
  --dpp-blue-dark: #0e314d;
  --dpp-blue-light: #eaf3f8;
  --dpp-green: #277a5b;
  --dpp-red: #a33c3c;
  --dpp-border: #dce3e8;
  --dpp-background: #f4f6f8;
  --dpp-text: #263238;
  --dpp-muted: #64727b;
  --dpp-white: #ffffff;
  --dpp-shadow: 0 10px 30px rgb(21 45 62 / 8%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--dpp-text);
  background: var(--dpp-background);
  font-family:
    Inter,
    Arial,
    Helvetica,
    sans-serif;
  line-height: 1.55;
}

a {
  color: var(--dpp-blue);
  overflow-wrap: anywhere;
}

button {
  font: inherit;
}

#dpp-viewer {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto;
}

.dpp {
  overflow: hidden;
  background: var(--dpp-white);
  border: 1px solid var(--dpp-border);
  border-radius: 18px;
  box-shadow: var(--dpp-shadow);
}

.dpp-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 32px;
  align-items: center;
  padding: 56px;
  color: var(--dpp-white);
  background:
    linear-gradient(135deg, var(--dpp-blue-dark), var(--dpp-blue));
}

.dpp-header h1 {
  max-width: 800px;
  margin: 4px 0 12px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.08;
}

.dpp-eyebrow,
.dpp-card-kicker {
  color: #78bfdd;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.dpp-lead {
  max-width: 780px;
  margin: 0;
  color: #e6f0f6;
  font-size: 1.05rem;
}

.dpp-badges,
.dpp-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.dpp-badge,
.dpp-topic {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 11px;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 999px;
  background: rgb(255 255 255 / 10%);
  font-size: 0.78rem;
  font-weight: 700;
}

.dpp-badge a,
.dpp-topic a,
.dpp-badge a:visited,
.dpp-topic a:visited {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
}

.dpp-badge a:hover,
.dpp-topic a:hover {
  color: inherit;
  text-decoration: none;
}

.dpp-badge-valid {
  background: #1d6f50;
}

.dpp-badge-expired {
  background: #8c3535;
}

.dpp-product-image,
.dpp-product-placeholder {
  display: grid;
  width: 220px;
  height: 220px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 18px;
  background: rgb(255 255 255 / 10%);
}

.dpp-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dpp-product-placeholder span {
  color: rgb(255 255 255 / 55%);
  font-size: 3rem;
  font-weight: 800;
}

.dpp-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--dpp-border);
  background: var(--dpp-white);
}

.dpp-tab {
  padding: 9px 16px;
  color: var(--dpp-muted);
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.dpp-tab:hover,
.dpp-tab.is-active {
  color: var(--dpp-blue);
  background: var(--dpp-blue-light);
}

.dpp-tab-panel {
  padding: 12px 56px 56px;
}

.dpp-section {
  padding: 38px 0;
  border-bottom: 1px solid var(--dpp-border);
}

.dpp-section:last-child {
  border-bottom: 0;
}

.dpp-section > h2 {
  margin: 0 0 24px;
  color: var(--dpp-blue-dark);
  font-size: 1.55rem;
}

.dpp-section h3 {
  margin-top: 26px;
  margin-bottom: 12px;
}

.dpp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 32px;
}

.dpp-field {
  min-width: 0;
}

.dpp-field > span,
.dpp-measure-label {
  display: block;
  margin-bottom: 4px;
  color: var(--dpp-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dpp-field > strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.dpp-card-grid,
.dpp-measure-grid,
.dpp-performance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dpp-card,
.dpp-measure-card,
.dpp-performance-card,
.dpp-claim,
.dpp-document {
  border: 1px solid var(--dpp-border);
  border-radius: 12px;
  background: var(--dpp-white);
}

.dpp-card,
.dpp-measure-card,
.dpp-performance-card {
  padding: 20px;
}

.dpp-card h3 {
  margin: 3px 0 14px;
  font-size: 1.05rem;
}

.dpp-measure-card strong,
.dpp-performance-value {
  color: var(--dpp-blue-dark);
  font-size: 1.35rem;
}

.dpp-stack {
  display: grid;
  gap: 18px;
}

.dpp-claim {
  padding: 26px;
  background: #fbfcfd;
}

.dpp-claim-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.dpp-claim-heading h3 {
  margin: 2px 0 0;
  font-size: 1.25rem;
}

.dpp-topic-list {
  justify-content: flex-end;
  margin: 0;
}

.dpp-topic {
  color: var(--dpp-blue-dark);
  border-color: #c9dfe9;
  background: var(--dpp-blue-light);
}

.dpp-performance-grid {
  margin: 20px 0;
}

.dpp-score {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  color: var(--dpp-muted);
  font-size: 0.85rem;
}

.dpp-score-code {
  display: grid;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  place-items: center;
  color: var(--dpp-white);
  border-radius: 7px;
  background: var(--dpp-green);
  font-weight: 800;
}

.dpp-claim-meta {
  margin-top: 20px;
}

.dpp-references {
  margin-top: 20px;
}

.dpp-references h4 {
  margin: 0 0 8px;
}

.dpp-references ul {
  margin: 0;
  padding-left: 20px;
}

.dpp-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.dpp-list > div {
  display: grid;
  grid-template-columns: 115px minmax(0, 1fr);
  gap: 12px;
}

.dpp-list dt {
  color: var(--dpp-muted);
  font-size: 0.85rem;
}

.dpp-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.dpp-document-list {
  display: grid;
  gap: 12px;
}

.dpp-document {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
}

.dpp-document h3 {
  margin: 0;
}

.dpp-document p {
  margin-bottom: 0;
}

.dpp-document-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--dpp-muted);
  font-size: 0.8rem;
}

.dpp-link-button,
.dpp-secondary-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  color: var(--dpp-white);
  border: 0;
  border-radius: 7px;
  background: var(--dpp-blue);
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
}

.dpp-label-card img {
  width: 100%;
  max-height: 140px;
  margin-bottom: 12px;
  object-fit: contain;
}

.dpp-warning,
.dpp-error {
  margin: 24px;
  padding: 20px;
  border: 1px solid #ecc98c;
  border-radius: 10px;
  background: #fff8e8;
}

.dpp-error {
  border-color: #e7b2b2;
  background: #fff0f0;
}

.dpp-loading {
  display: grid;
  min-height: 300px;
  place-items: center;
  align-content: center;
  color: var(--dpp-muted);
}

.dpp-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid var(--dpp-border);
  border-top-color: var(--dpp-blue);
  border-radius: 50%;
  animation: dpp-spin 0.8s linear infinite;
}

@keyframes dpp-spin {
  to {
    transform: rotate(360deg);
  }
}

.dpp-json-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 22px 0 12px;
}

.dpp-json {
  overflow: auto;
  margin: 0;
  padding: 24px;
  color: #e9f1f5;
  border-radius: 12px;
  background: #162731;
  font-size: 0.82rem;
  line-height: 1.55;
}

.dpp-footer {
  padding: 25px 56px;
  color: var(--dpp-muted);
  background: #eef2f4;
  font-size: 0.85rem;
  text-align: center;
}

.dpp-footer p {
  margin: 4px 0;
}

.dpp-muted {
  color: var(--dpp-muted);
}

@media (max-width: 800px) {
  #dpp-viewer {
    width: min(100% - 16px, 1180px);
    margin: 8px auto;
  }

  .dpp-header {
    grid-template-columns: 1fr;
    padding: 36px 24px;
  }

  .dpp-product-image,
  .dpp-product-placeholder {
    width: 150px;
    height: 150px;
  }

  .dpp-tab-panel {
    padding: 8px 24px 36px;
  }

  .dpp-grid,
  .dpp-card-grid,
  .dpp-measure-grid,
  .dpp-performance-grid {
    grid-template-columns: 1fr;
  }

  .dpp-claim-heading,
  .dpp-document {
    align-items: stretch;
    flex-direction: column;
  }

  .dpp-topic-list {
    justify-content: flex-start;
  }

  .dpp-footer {
    padding: 24px;
  }
}