/*
 * Styles of the public trust page (public/security.html, plan 01-23).
 *
 * Why an external file: the page ships without inline <style> or <script>, so the stricter
 * Content-Security-Policy planned for Phase 2 (no 'unsafe-inline') will not break it.
 * Same look as public/gdpr.html, but system fonts only and no remote imports.
 */
:root {
  --bg: #0B1120;
  --card: rgba(19, 27, 46, 0.75);
  --line: rgba(30, 41, 59, 0.6);
  --line-2: rgba(148, 163, 184, 0.18);
  --text: #E2E8F0;
  --text-2: #CBD5E1;
  --muted: #94A3B8;
  --yellow: #DED114;
  --heading: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 1000px 500px at 50% -10%, rgba(222, 209, 20, 0.07), transparent 60%),
    radial-gradient(ellipse 700px 700px at 100% 100%, rgba(74, 127, 191, 0.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}
a { color: var(--yellow); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 30;
  height: 56px;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(30, 41, 59, 0.6);
}
.top-inner {
  max-width: 1120px; margin: 0 auto; height: 100%;
  padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.back {
  font-family: var(--heading); font-weight: 600; font-size: 14px;
  color: var(--muted); text-decoration: none; white-space: nowrap;
}
.back:hover { color: var(--yellow); }
.langs {
  display: flex; gap: 4px; padding: 4px; border-radius: 9999px;
  background: rgba(15, 23, 42, 0.6);
}
.langs button {
  min-width: 40px; min-height: 32px; padding: 0 8px;
  border-radius: 9999px; border: 1px solid rgba(148, 163, 184, 0.3);
  background: transparent; color: var(--muted);
  font: 700 12px var(--heading); text-transform: uppercase; cursor: pointer;
}
.langs button[aria-pressed="true"] { background: var(--yellow); color: #0B1120; border-color: var(--yellow); }

/* Main */
main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 16px 24px; }
.hero { margin-bottom: 18px; }
.kicker {
  font-family: var(--heading); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--yellow); font-weight: 700; margin-bottom: 8px;
}
h1 {
  font-family: var(--heading); font-size: 30px; font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.05; margin: 0 0 8px;
}
h1 .hi { color: var(--yellow); }
.lead { font-size: 14px; color: var(--text-2); line-height: 1.55; max-width: 860px; margin: 0; }
.meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 8px; }

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card {
  background: var(--card);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex; flex-direction: column; min-width: 0;
}
.card.accent { border-left: 3px solid var(--yellow); }
.card.wide { grid-column: 1 / -1; scroll-margin-top: 72px; }
.card h2 {
  font-family: var(--heading); font-size: 14px; font-weight: 700; color: var(--text);
  display: flex; align-items: baseline; gap: 8px; margin: 0 0 6px; line-height: 1.2;
}
.card h2 .num { font-family: var(--mono); font-size: 11px; color: var(--yellow); font-weight: 600; }
.card h3 { font-family: var(--heading); font-size: 12px; font-weight: 700; color: var(--text); margin: 10px 0 2px; }
.card p, .card li { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.card p { margin: 0 0 6px; }
.card p:last-child { margin-bottom: 0; }
.card strong { color: var(--text); font-weight: 600; }
.card a { color: var(--yellow); text-decoration: none; }
.card a:hover { text-decoration: underline; }
.card .note { font-size: 12px; color: var(--muted); }

/* Control lists generated by scripts/gen-security-page.mjs */
ul.controls { list-style: none; padding: 0; margin: 4px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 20px; }
ul.controls li { padding: 4px 0 4px 16px; position: relative; min-width: 0; }
ul.controls li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; position: absolute; left: 2px; top: 11px; }
ul.controls.live li::before { background: var(--yellow); }
ul.controls.planned li::before { background: transparent; border: 1px solid var(--muted); }
ul.controls li strong { display: block; margin-bottom: 1px; }
ul.controls li .ctl-body { display: block; }

/* Footer */
footer {
  border-top: 1px solid rgba(30, 41, 59, 0.5);
  padding: 40px 24px; text-align: center;
}
footer p { margin: 0 0 8px; font-size: 12px; color: #94A3B8; opacity: 0.85; line-height: 1.6; }
footer a { color: #94A3B8; text-decoration: none; }
footer a:hover { color: var(--yellow); text-decoration: underline; }

[data-lang] { display: none; }
[data-lang].active { display: block; }

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  ul.controls { grid-template-columns: 1fr; }
  h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  body { background: #fff; color: #111; }
  .top, footer .links { display: none; }
  .card { background: #fff; border: 1px solid #ddd; color: #111; }
  .card p, .card li, .card strong, .lead { color: #111 !important; }
}
