/* LIVING MODE: «what changed» (src/sweep-delta-view.mjs). Brand navy #082547, teal #066C7D, light teal #63CED1. */
.sd-root {
  --navy: #082547; --teal: #066C7D; --teal-lt: #63CED1; --teal-wash: #e3f4f5; --red: #b42318; --red-wash: #fcebe9; --amber: #9a5b00; --amber-wash: #fdf1dc;
  --ink: #15222b; --muted: #55646d; --rule: #d7e0e5; --card: #fff; --wash: #f3f6f8;
  color: var(--ink); font: 400 15px/1.5 "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif; max-width: 1100px; margin: 0 auto; padding: 0 16px 48px;
}
.sd-head { background: var(--navy); color: #fff; margin: 0 -16px; padding: 28px 24px 24px; border-radius: 0 0 18px 18px; }
.sd-title { margin: 0; font-size: clamp(22px, 3.2vw, 32px); line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
.sd-range { margin: 8px 0 0; color: var(--teal-lt); font-weight: 600; }

.sd-counts { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.sd-count { background: var(--card); border: 1px solid var(--rule); border-top: 4px solid var(--rule); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; animation: sd-rise .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
.sd-count-n { font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sd-count-label { font-weight: 700; }
.sd-count-hint { color: var(--muted); font-size: 12.5px; }
.sd-count.is-closed { border-top-color: var(--teal); } .sd-count.is-closed .sd-count-n { color: var(--teal); }
.sd-count.is-new { border-top-color: var(--red); } .sd-count.is-new .sd-count-n { color: var(--red); }
.sd-count.is-check { border-top-color: var(--amber); } .sd-count.is-check .sd-count-n { color: var(--amber); }
.sd-count.is-persisting .sd-count-n { color: var(--navy); }

.sd-block { margin-top: 28px; }
.sd-h3 { margin: 0 0 12px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); font-weight: 700; }
.sd-none, .sd-faint { color: var(--muted); }
.sd-faint { font-size: 13px; margin: 8px 0 0; }
.sd-caveat { margin: 16px 0 0; padding: 10px 14px; background: var(--amber-wash); border-left: 4px solid var(--amber); border-radius: 6px; color: #5a3600; }

.sd-trends { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.sd-trend { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px; }
.sd-trend-title { margin: 0; color: var(--muted); font-weight: 600; font-size: 13px; }
.sd-trend-now { margin: 4px 0 0; display: flex; align-items: baseline; gap: 10px; }
.sd-trend-value { font-size: 30px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.sd-trend-delta { font-weight: 700; font-size: 14px; color: var(--muted); } .sd-trend-delta.is-good { color: var(--teal); } .sd-trend-delta.is-bad { color: var(--red); }
.sd-spark { display: block; width: 100%; height: 56px; margin-top: 6px; overflow: visible; }
.sd-spark-line { fill: none; stroke: var(--navy); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; animation: sd-draw 1.1s ease-out both; }
.sd-spark-dot { stroke: #fff; stroke-width: 2; animation: sd-pop .4s 1s ease-out both; } .sd-spark-dot.is-good { fill: var(--teal); } .sd-spark-dot.is-bad { fill: var(--red); }
.sd-trend-foot { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; }

.sd-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sd-card { background: var(--card); border: 1px solid var(--rule); border-left: 5px solid var(--rule); border-radius: 10px; padding: 12px 16px; animation: sd-slide .6s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
.sd-card.is-new { border-left-color: var(--red); background: var(--red-wash); }
.sd-card.is-check { border-left-color: var(--amber); background: var(--amber-wash); }
.sd-card.is-closed { border-left-color: var(--teal); background: var(--teal-wash); animation: sd-slide .6s cubic-bezier(.2, .8, .2, 1) both, sd-fade-teal 1.4s ease-out both; animation-delay: calc(var(--i, 0) * 70ms), calc(var(--i, 0) * 70ms + .5s); }
.sd-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sd-tag { font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.sd-tag.is-closed { color: var(--teal); } .sd-tag.is-new { color: var(--red); } .sd-tag.is-check { color: var(--amber); }
.sd-sev { font-size: 12px; font-weight: 700; color: var(--muted); background: rgba(8, 37, 71, .07); padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.sd-card-title { margin: 6px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.sd-card.is-closed .sd-card-title { text-decoration: line-through; text-decoration-color: rgba(6, 108, 125, .45); }
.sd-card-note { margin: 6px 0 0; font-size: 14px; color: var(--ink); }
.sd-card.is-closed .sd-card-note { color: var(--teal); font-weight: 600; }
.sd-card-place { margin: 4px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

.sd-moves { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sd-move { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--rule); border-left: 5px solid var(--rule); border-radius: 10px; padding: 10px 14px; animation: sd-slide .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }
.sd-move.is-improved { border-left-color: var(--teal); } .sd-move.is-regressed { border-left-color: var(--red); } .sd-move.is-changed { border-left-color: var(--amber); }
.sd-move-id { font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.sd-move-text { overflow-wrap: anywhere; }
.sd-move-pills { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sd-arrow { color: var(--muted); font-weight: 700; }
.sd-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: var(--wash); color: var(--navy); }
.sd-pill.is-COMPLIES { background: var(--teal-wash); color: var(--teal); } .sd-pill.is-NON_CONFORMING { background: var(--red-wash); color: var(--red); } .sd-pill.is-MISSING_EVIDENCE { background: var(--amber-wash); color: var(--amber); }

.sd-docs { margin-top: 12px; } .sd-docs-title { margin: 0 0 6px; font-weight: 700; color: var(--navy); }
.sd-doclist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sd-doc { background: var(--wash); border: 1px solid var(--rule); border-radius: 8px; padding: 5px 10px; font-size: 13px; overflow-wrap: anywhere; }
.sd-docs.is-added .sd-doc { border-color: var(--teal-lt); background: var(--teal-wash); } .sd-docs.is-removed .sd-doc { border-color: #e7b5b0; background: var(--red-wash); } .sd-docs.is-replaced .sd-doc { border-color: var(--teal-lt); }

.sd-still { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 16px; }
.sd-still-sum { cursor: pointer; font-weight: 700; color: var(--navy); }
.sd-still-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.sd-still-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding-top: 8px; border-top: 1px solid var(--rule); }
.sd-still-title { flex: 1 1 320px; overflow-wrap: anywhere; }
.sd-badge { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--amber-wash); color: var(--amber); }
.sd-sev.is-ALTA { background: var(--red-wash); color: var(--red); }

@keyframes sd-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sd-slide { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
@keyframes sd-fade-teal { from { background-color: var(--red-wash); border-left-color: var(--red); } to { background-color: var(--teal-wash); border-left-color: var(--teal); } }
@keyframes sd-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes sd-pop { from { opacity: 0; r: 0; } to { opacity: 1; r: 4; } }

@media (max-width: 720px) {
  .sd-counts { grid-template-columns: repeat(2, 1fr); } .sd-trends { grid-template-columns: 1fr; }
  .sd-count-n { font-size: 34px; } .sd-move { grid-template-columns: 44px 1fr; } .sd-move-pills { grid-column: 1 / -1; justify-content: flex-start; }
}
/* Preview page chrome (preview-delta.html only). */
.sd-page { margin: 0; background: #eef3f6; font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif; }
.sd-nav { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #061b36; color: #fff; font-size: 13px; }
.sd-brand { font-weight: 800; letter-spacing: .2em; color: #63CED1; }
.sd-note { flex: 1; color: #b8c7d6; }
.sd-langs a { color: #fff; text-decoration: none; font-weight: 700; padding: 4px 8px; border-radius: 6px; margin-left: 2px; }
.sd-langs a[aria-current] { background: #066C7D; }

@media (prefers-reduced-motion: reduce) {
  .sd-root *, .sd-root *::before, .sd-root *::after { animation: none !important; transition: none !important; }
  .sd-card.is-closed { background-color: var(--teal-wash); border-left-color: var(--teal); }
}
