/* ==========================================================================
   Legal pages: imprint, privacy policy, product security (public/imprint.php,
   privacy.php, security.php). Loaded after portal.css and built only from its
   tokens, so the pages follow the platform design without touching the shared
   stylesheet. Layout: .download-page + .download-header + one .card per section.
   ========================================================================== */

.legal-page .download-header p { max-width: 700px; }

/* Section cards */
.legal-card h2 { margin-bottom: 10px; }
.legal-card p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.legal-card p:last-child { margin-bottom: 0; }
.legal-card p strong { color: var(--text); }
.legal-card a:not(.btn) { color: var(--accent); overflow-wrap: anywhere; }
.legal-card a:not(.btn):hover { text-decoration: underline; }

.legal-list {
  display: grid;
  gap: 7px;
  margin: 0 0 12px;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.legal-list:last-child { margin-bottom: 0; }
.legal-list li::marker { color: var(--accent); }
.legal-list strong { color: var(--text); }

.legal-meta {
  margin: 26px 0 0;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}
.legal-meta a { color: var(--muted); }
.legal-meta a:hover { color: var(--accent); }

/* --- Product security ------------------------------------------------------ */

/* Key facts under the page header (same card language as .download-summary). */
.security-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.security-facts > div {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 14px 18px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow), var(--edge);
}
.security-facts > div::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 28px;
  height: 3px;
  margin-left: -14px;
  border-radius: 0 0 3px 3px;
  background: var(--brand);
}
.security-facts > div > span {
  color: var(--dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.security-facts strong {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.security-facts a { color: var(--accent); }
.security-facts a:hover { text-decoration: underline; }

.security-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-md);
  background: var(--accent-bg);
}
.security-contact-address {
  flex: 1 1 240px;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

/* Process steps (number badge as .form-section-head > span) */
.security-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}
.security-step {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.2);
}
.security-step > span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--brand);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--glow-accent);
}
.security-step strong { display: block; margin-top: 12px; font-size: 14px; font-weight: 700; }
.legal-card .security-step p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.5; }

.security-note {
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.24);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.legal-card .security-small { margin-top: 12px; color: var(--dim); font-size: 12.5px; }

/* Severity levels */
.severity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}
.severity-grid > div {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.2);
}
.severity-grid .pill { justify-self: start; }
.legal-card .severity-grid p { margin: 0; font-size: 12.5px; line-height: 1.45; }
.pill.sev-critical { background: rgba(255, 83, 71, 0.15); color: #ffb3ac; border: 1px solid rgba(255, 83, 71, 0.4); }
.pill.sev-high { background: var(--accent-bg); color: #ffcbb0; border: 1px solid var(--accent-border); }
.pill.sev-medium { background: rgba(255, 184, 77, 0.14); color: #ffdca0; border: 1px solid rgba(255, 184, 77, 0.38); }
.pill.sev-low { background: rgba(87, 208, 106, 0.14); color: #a6f0b1; border: 1px solid rgba(87, 208, 106, 0.36); }

.legal-card .table-wrap { margin: 4px 0 0; border: 1px solid var(--line); }
.legal-card .download-empty { margin-top: 4px; }

@media (max-width: 980px) {
  .security-steps, .severity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .security-facts { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .security-steps, .severity-grid { grid-template-columns: 1fr; }
  .security-contact .btn { width: 100%; }
}
