/* ===========================================================================
   shield.css — Trio Shield (Solution 06): the security-posture monitor panel
   + the protective ring around the architecture diagram.
   Roll back: remove this <link>, js/shield.js, the #shield section, the
   .arch-shield markup, the solution-row/footer links, the recommender 'shield'
   entries, and the script tag.
   =========================================================================== */

:root {
  --shield-green: #1f9d6b;       /* decorative fills + large text */
  --shield-green-text: #136d4d;  /* small green text — AA on white */
  --shield-red:   #c63a2e;
  --shield-amber: #9a6810;
}

/* ---------------------- security-posture monitor panel --------------------- */
.shield-stage { max-width: 920px; margin: clamp(36px, 5vw, 64px) auto 0; }
.shield-panel {
  border-radius: clamp(16px, 2vw, 24px); overflow: hidden; background: #fff;
  border: 1px solid var(--line); box-shadow: 0 30px 70px -40px rgba(10, 60, 111, 0.4);
}
.shield-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: linear-gradient(180deg, #0A3C6F, #072c52); color: #fff; }
.shield-bar .dash-dots { display: inline-flex; gap: 6px; }
.shield-bar .dash-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); display: block; }
.shield-bar-title { font-family: var(--font-head); font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.shield-status { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: #bfe9d6; }
.shield-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--shield-green); box-shadow: 0 0 0 4px rgba(31, 157, 107, 0.25); }

.shield-body { padding: clamp(18px, 2.4vw, 28px); display: flex; flex-direction: column; gap: clamp(16px, 2vw, 22px); }

.shield-top { display: flex; gap: clamp(16px, 2.4vw, 28px); align-items: center; flex-wrap: wrap; }
.shield-grade { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 104px; padding: 14px 18px; border-radius: 16px; background: linear-gradient(180deg, rgba(31, 157, 107, 0.12), rgba(31, 157, 107, 0.04)); border: 1px solid rgba(31, 157, 107, 0.3); }
.shield-grade-val { font-family: var(--font-head); font-weight: 800; font-size: clamp(34px, 5vw, 52px); line-height: 1; color: var(--shield-green); }
.shield-grade-lbl { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); margin-top: 6px; }
.shield-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; flex: 1; min-width: 240px; }
.shield-metric { background: var(--bg-gray); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.shield-metric-num { font-family: var(--font-head); font-weight: 800; font-size: clamp(22px, 2.6vw, 30px); color: var(--accent); display: block; font-variant-numeric: tabular-nums; }
.shield-metric-num.shield-ok { color: var(--shield-green); }
.shield-metric-lbl { font-size: 12px; color: var(--text-2); margin-top: 2px; display: block; }

.shield-scan-top { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.shield-track { height: 10px; border-radius: 999px; background: var(--bg-gray); border: 1px solid var(--line); overflow: hidden; }
.shield-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width 1.4s var(--ease); }

.shield-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 28px); }
.shield-col-h { font-family: var(--font-head); font-weight: 700; font-size: 13px; letter-spacing: 0.02em; color: var(--text); margin-bottom: 10px; }
.shield-checklist ul { display: flex; flex-direction: column; gap: 9px; }
.shield-checklist li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); opacity: 0.4; transition: opacity 0.4s var(--ease); }
.shield-checklist li.is-done { opacity: 1; }
.shield-tick { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; position: relative; }
.shield-checklist li.is-done .shield-tick { background: var(--shield-green); border-color: var(--shield-green); }
.shield-checklist li.is-done .shield-tick::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

.shield-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.shield-badges li { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); }
.shield-badges li.is-ok { color: var(--shield-green-text); border-color: rgba(31, 157, 107, 0.4); background: rgba(31, 157, 107, 0.08); }
.shield-badges li.is-prog { color: #6f5630; border-color: rgba(173, 142, 98, 0.4); background: var(--gold-soft); }
.shield-badges li small { font-weight: 500; opacity: 0.8; }

.shield-findings-h { font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); margin-bottom: 8px; }
.shield-findings { display: flex; flex-direction: column; gap: 7px; }
.shield-findings li { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.shield-findings b { color: var(--shield-green-text); font-weight: 600; }
.sf-sev { font-size: 10px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; color: #fff; }
.sf-high { background: var(--shield-red); }
.sf-med { background: var(--shield-amber); }
.sf-low { background: #7a8aa0; }

.shield-cap { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-2); }

@media (max-width: 640px) {
  .shield-cols { grid-template-columns: 1fr; }
  .shield-top { flex-direction: column; align-items: stretch; }
  .shield-grade { flex-direction: row; gap: 12px; }
}

/* ------------------ protective ring around the architecture ------------------ */
/* The ring + label belong to the desktop (radial) diagram only — gate on the
   JS-enhanced layout, NOT the removed arch-pinned class. Hidden on the mobile
   stacked list. The ring sits behind the nodes (z-index 0); the label is lifted
   out of the ring so its overflow:hidden can't clip it and it clears the nodes. */
.arch-shield, .arch-shield-label { display: none; }
@media (min-width: 761px) {
  /* Negative inset pushes the perimeter OUTSIDE all six cards, so the whole gold
     frame is visible in the surrounding margin (not hidden behind the cards). */
  html.js .arch-shield {
    display: block; position: absolute; inset: -24px -20px; z-index: 0; pointer-events: none;
    border: 1.5px solid rgba(201, 168, 106, 0.5); border-radius: clamp(24px, 3vw, 44px);
    box-shadow: inset 0 0 110px -45px rgba(201, 168, 106, 0.32), 0 0 60px -22px rgba(201, 168, 106, 0.3);
    overflow: hidden;
  }
  html.js .arch-shield-label {
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
    position: absolute; top: -34px; left: 50%; transform: translateX(-50%); z-index: 3;
    font-family: var(--font-head); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
    color: #1a1206; background: linear-gradient(180deg, #c9a86a, #a9854f); padding: 5px 14px; border-radius: 999px;
  }
}
.arch-shield-label svg { width: 13px; height: 13px; }
.arch-shield-sweep {
  position: absolute; left: 0; right: 0; top: 0; height: 30%; z-index: 1;
  background: linear-gradient(180deg, rgba(201, 168, 106, 0.13), transparent);
  animation: archScan 4.5s var(--ease) infinite;
}
@media (prefers-reduced-motion: reduce) { .arch-shield-sweep { display: none; } }
@keyframes archScan {
  0% { transform: translateY(0); opacity: 0; }
  14% { opacity: 1; }
  86% { opacity: 1; }
  100% { transform: translateY(200%); opacity: 0; }
}
