/* CIP Terminal — APRIO TECHNOLOGIES LIMITED
 * Bloomberg-inspired dark theme for financial professionals
 */

:root {
  --bg-primary: #0A0B0D;
  --bg-surface: #121418;
  --bg-surface-2: #1A1D22;
  --bg-surface-3: #22262D;
  --border: #2A2E35;
  --border-strong: #3A3F47;

  --text-primary: #E8EAED;
  --text-muted: #9AA0A6;
  --text-faint: #5F6368;

  --sev-critical: #E5484D;
  --sev-high: #F76B15;
  --sev-medium: #F5D33F;
  --sev-low: #46A758;
  --sev-info: #7E868C;

  --accent-primary: #4F98A3;
  --accent-primary-strong: #6BB6C2;
  --accent-warm: #E1B15A;

  --score-great: #5BA84A;
  --score-good: #7CC142;
  --score-fair: #FCCB00;
  --score-poor: #EB8C2F;
  --score-bad: #DD3333;
  /* §49.35 CIP-P0-04: neutral color for insufficient_evidence — never green/warning. */
  --score-insufficient: #7E868C;

  --font-body: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", "Inter Tight", "Inter", Georgia, serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, "Menlo", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  font-feature-settings: "ss01" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.mono, .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1, "lnum" 1, "ss01" 1, "cv11" 1;
  letter-spacing: -0.005em;
}

.label-caps {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==================== VIEW SWITCHER ==================== */
/* view = 'lp' | 'login' | 'pricing' | 'app' */

/* ==================== LP (LANDING PAGE) ==================== */
.lp-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.lp-topbar {
  display: flex;
  align-items: center;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,11,13,0.95);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.lp-topbar .brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--accent-primary-strong);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.lp-topbar .brand svg { width: 24px; height: 24px; }
.lp-topbar .lp-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}
.lp-topbar .lp-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.lp-topbar .lp-nav a:hover { color: var(--text-primary); }
.lp-topbar .lp-nav .btn-primary {
  background: var(--accent-primary);
  color: #0A0B0D;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.lp-topbar .lp-nav .btn-primary:hover { background: var(--accent-primary-strong); }

.lp-hero {
  padding: 88px 40px 96px;
  max-width: 1120px;
  margin: 0 auto;
  text-align: left;
}
.lp-hero .kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent-primary-strong);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.lp-hero h1 {
  font-family: var(--font-display);
  font-size: 60px;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  line-height: 1.02;
  background: linear-gradient(180deg, #E8EAED 0%, #9AA0A6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-feature-settings: "ss01" 1, "onum" 1;
}
.lp-hero .lp-sub {
  font-size: 20px;
  color: var(--text-primary);
  font-weight: 400;
  margin-bottom: 20px;
  max-width: 780px;
  line-height: 1.45;
  letter-spacing: -0.005em;
}
.lp-hero .lp-desc {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.7;
  margin-bottom: 36px;
}
.lp-hero .cta-row {
  display: flex;
  gap: 14px;
  align-items: center;
}
.btn-primary-lg {
  background: var(--accent-primary);
  color: #0A0B0D;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.btn-primary-lg:hover { background: var(--accent-primary-strong); }
.btn-secondary-lg {
  background: transparent;
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid var(--border-strong);
  cursor: pointer;
}
.btn-secondary-lg:hover { border-color: var(--accent-primary-strong); color: var(--accent-primary-strong); }

/* LP - Mock terminal preview */
.lp-preview {
  max-width: 1120px;
  margin: 0 auto 96px;
  padding: 0 40px;
}
.lp-preview .preview-frame {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.lp-preview .preview-frame-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.dot.r { background: #E5484D; }
.dot.y { background: #F5D33F; }
.dot.g { background: #46A758; }
.lp-preview .preview-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 20px;
}
.lp-preview .preview-tile {
  padding: 14px;
  border-radius: 8px;
  min-height: 120px;
}
.lp-preview .preview-tile .pt-code {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.lp-preview .preview-tile .pt-domain {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 2px;
}
.lp-preview .preview-tile .pt-score {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  margin-top: 12px;
}

/* LP - Features grid */
.lp-features {
  padding: 96px 40px;
  max-width: 1120px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}
.lp-features h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 48px;
  line-height: 1.15;
}
.lp-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.lp-feature {
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.lp-feature .lp-feature-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-primary-strong);
  letter-spacing: 0.14em;
  margin-bottom: 12px;
}
.lp-feature h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
  letter-spacing: -0.005em;
  line-height: 1.35;
}
.lp-feature p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.65;
}

/* LP - Regulations strip */
.lp-regs {
  padding: 88px 40px;
  max-width: 1120px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}
.lp-regs h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  line-height: 1.15;
}
.lp-regs .lp-regs-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
  max-width: 720px;
}
.lp-regs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.lp-reg-chip {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-surface);
  font-size: 12px;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lp-reg-chip .region {
  font-size: 9px;
  color: var(--accent-primary-strong);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

/* LP - Footer CTA */
.lp-cta {
  padding: 96px 40px;
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
  border-top: 1px solid var(--border);
}
.lp-cta h2 {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  line-height: 1.1;
}
.lp-cta p { color: var(--text-muted); font-size: 15px; margin-bottom: 32px; }

.lp-footer {
  padding: 32px 40px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 11px;
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ==================== LOGIN ==================== */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(ellipse at top, rgba(79,152,163,0.08) 0%, transparent 60%),
    var(--bg-primary);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
}
.auth-card .brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 32px;
  color: var(--accent-primary-strong);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
}
.auth-card h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  line-height: 1.15;
}
.auth-card .auth-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 28px;
}
.form-field { margin-bottom: 16px; }
.form-field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.form-field .form-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-body);
}
.form-field .form-input:focus {
  outline: none;
  border-color: var(--accent-primary);
}
.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 12px;
}
.auth-row label { color: var(--text-muted); display: flex; align-items: center; gap: 6px; cursor: pointer; }
.auth-row a { color: var(--accent-primary-strong); text-decoration: none; }
.auth-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent-primary);
  color: #0A0B0D;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.auth-btn:hover { background: var(--accent-primary-strong); }
.auth-btn.disabled {
  background: var(--bg-surface-3);
  color: var(--text-faint);
  cursor: not-allowed;
  border: 1px dashed var(--border-strong);
}
.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider span { padding: 0 12px; }
.auth-alt {
  text-align: center;
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
}
.auth-alt a { color: var(--accent-primary-strong); text-decoration: none; margin-left: 4px; }
.dead-link {
  color: var(--text-faint);
  text-decoration: line-through;
  cursor: not-allowed;
}

/* ==================== PRICING ==================== */
.pricing-wrap {
  min-height: 100vh;
  padding: 40px;
}
.pricing-topbar {
  max-width: 1120px;
  margin: 0 auto 40px;
  display: flex;
  align-items: center;
}
.pricing-topbar .brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--accent-primary-strong);
  font-weight: 600;
}
.pricing-topbar .brand svg { width: 24px; height: 24px; }
.pricing-topbar .back {
  margin-left: auto;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.04em;
  background: none; border: none;
}
.pricing-topbar .back:hover { color: var(--text-primary); }
.pricing-head {
  max-width: 900px;
  margin: 0 auto 48px;
  text-align: center;
}
.pricing-head h1 {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
  line-height: 1.1;
}
.pricing-head p { color: var(--text-muted); font-size: 14px; }
.pricing-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 1100px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); max-width: 720px; }
}
.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
}
.pricing-card.featured {
  border-color: var(--accent-primary);
  background: linear-gradient(180deg, rgba(79,152,163,0.06) 0%, var(--bg-surface) 60%);
  position: relative;
}
.pricing-card.featured::before {
  content: "RECOMMENDED";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-primary);
  color: #0A0B0D;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-family: var(--font-mono);
}
.pricing-card .plan-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-primary-strong);
  margin-bottom: 8px;
}
.pricing-card .plan-price {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1;
}
.pricing-card .plan-price-cycle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.pricing-card .plan-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
}
.plan-features li {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 13px;
  gap: 12px;
}
.plan-features li .lbl {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.plan-features li .val {
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
}
.pricing-card .checkout-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--text-faint);
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
  cursor: not-allowed;
  font-weight: 500;
  font-size: 13px;
  text-decoration: line-through;
}
.pricing-card.featured .checkout-btn {
  background: rgba(79,152,163,0.12);
  color: var(--text-muted);
  border-color: var(--accent-primary);
}
.pricing-note {
  max-width: 1120px;
  margin: 24px auto 0;
  text-align: center;
  color: var(--text-faint);
  font-size: 11px;
}

/* ==================== Cyber Shield badges ==================== */
.cs-badges {
  margin: 0 0 20px;
  padding: 12px 0 0;
  border-top: 1px dashed var(--border);
}
.cs-badges-title {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}
.cs-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}
.cs-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: rgba(79,152,163,0.10);
  border: 1px solid rgba(79,152,163,0.35);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-primary-strong);
  font-family: var(--font-body);
  cursor: help;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.cs-chip:hover {
  background: rgba(79,152,163,0.18);
  border-color: var(--accent-primary-strong);
}
.cs-chip-icon {
  font-size: 10px;
  line-height: 1;
  opacity: 0.9;
}
.cs-chip.cs-chip-red {
  background: rgba(247,107,21,0.10);
  border-color: rgba(247,107,21,0.40);
  color: var(--sev-high);
}
.cs-chip.cs-chip-red:hover {
  background: rgba(247,107,21,0.18);
  border-color: var(--sev-high);
}
.cs-chip.cs-chip-blue {
  background: rgba(70,167,88,0.10);
  border-color: rgba(70,167,88,0.40);
  color: var(--sev-low);
}
.cs-chip.cs-chip-blue:hover {
  background: rgba(70,167,88,0.18);
  border-color: var(--sev-low);
}
.cs-chip-red-icon { color: var(--sev-high); }
.cs-chip-blue-icon { color: var(--sev-low); }

.cs-note {
  max-width: 1120px;
  margin: 32px auto 0;
  padding: 20px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.cs-note-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-primary-strong);
  margin-bottom: 6px;
}
.cs-note-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 14px;
}
.cs-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
  color: var(--text-primary);
}
.cs-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cs-legend-item .cs-chip-icon {
  color: var(--accent-primary-strong);
  font-size: 12px;
}

/* ==================== APP (Portal / Terminal / Compare / Reg / FAQ / Settings) ==================== */
.app-shell {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
}
.sidebar .avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-warm);
  color: #1A1D22;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 10px;
}
/* §49.34.3: avatar ボタン化 + ユーザーメニュー */
.sidebar .user-menu-wrap {
  position: relative;
  margin-bottom: 10px;
}
.sidebar .avatar-btn {
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  margin-bottom: 0;
}
.sidebar .avatar-btn:hover {
  border-color: var(--accent-primary-strong);
  transform: translateY(-1px);
}
.sidebar .avatar-btn:focus-visible {
  outline: 2px solid var(--accent-primary-strong);
  outline-offset: 2px;
}
.sidebar .avatar-btn[aria-expanded="true"] {
  border-color: var(--accent-primary-strong);
  box-shadow: 0 0 0 2px rgba(76, 130, 155, 0.25);
}
.user-menu-dropdown {
  position: absolute;
  top: 4px;
  left: calc(100% + 12px);
  min-width: 240px;
  background: var(--bg-surface-1);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 200;
  padding: 6px;
}
.user-menu-header {
  padding: 10px 12px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.user-menu-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.user-menu-email {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 2px;
  word-break: break-all;
}
.user-menu-org {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.user-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}
.user-menu-item:hover {
  background: var(--bg-surface-2);
}
.user-menu-item:focus-visible {
  outline: 2px solid var(--accent-primary-strong);
  outline-offset: -2px;
}
.user-menu-item svg {
  flex-shrink: 0;
  opacity: 0.75;
}
.user-menu-item-danger {
  color: #D45D5D;
}
.user-menu-item-danger:hover {
  background: rgba(212, 93, 93, 0.1);
  color: #E77676;
}
.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.sidebar .nav-btn {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
  border: none;
}
.sidebar .nav-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-2);
}
.sidebar .nav-btn.active {
  color: var(--accent-primary-strong);
  background: var(--bg-surface-2);
}
.sidebar .nav-btn svg {
  width: 20px; height: 20px;
  stroke-width: 1.6;
}
.sidebar .divider {
  width: 24px;
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.topbar {
  height: 48px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 10;
  min-width: 0;
  max-width: 100%;
}
.topbar .brand { flex: 0 0 auto; }
.topbar .brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--accent-primary-strong);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.topbar .brand svg { width: 22px; height: 22px; }
.topbar .tabs {
  display: flex;
  gap: 4px;
  margin-left: 20px;
  min-width: 0;
  flex: 0 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.topbar .tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 6px 14px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}
.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-2);
}
.tab-btn.active {
  color: var(--text-primary);
  background: var(--bg-surface-2);
  border-bottom: 2px solid var(--accent-primary);
}
.topbar .lang-toggle {
  margin-left: auto;
  display: flex;
  background: var(--bg-surface-2);
  border-radius: 6px;
  padding: 2px;
  font-size: 11px;
}
.topbar .lang-toggle button {
  padding: 4px 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-mono);
  border-radius: 4px;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.topbar .lang-toggle button.active {
  background: var(--accent-primary);
  color: #0A0B0D;
}
.topbar .clock {
  color: var(--text-muted);
  font-size: 12px;
  display: flex; align-items: center; gap: 12px;
  flex: 0 0 auto;
}
.topbar .lang-toggle { flex: 0 0 auto; }
/* §49.36 QA (mobile): at narrow widths the fixed-width topbar controls
   (clock, wide gaps) plus the 8 nowrap nav tabs pushed the layout viewport
   wider than the visual viewport, diverging Playwright actionability
   coordinates from the visual centre. Drop the decorative clock and tighten
   the topbar so the nav tabs scroll inside their own track instead of the
   whole page. */
@media (max-width: 640px) {
  .topbar { gap: 10px; padding: 0 12px; }
  .topbar .tabs { margin-left: 8px; }
  .topbar .clock { display: none; }
}
.topbar .live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--sev-low);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.main {
  padding: 24px 28px 48px;
  min-height: calc(100vh - 48px);
  min-width: 0;
  max-width: 100%;
}

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.card-title {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
}

/* Severity dot */
.sev-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.sev-critical .sev-dot, .sev-dot.sev-critical { background: var(--sev-critical); }
.sev-high     .sev-dot, .sev-dot.sev-high     { background: var(--sev-high); }
.sev-medium   .sev-dot, .sev-dot.sev-medium   { background: var(--sev-medium); }
.sev-low      .sev-dot, .sev-dot.sev-low      { background: var(--sev-low); }
.sev-info     .sev-dot, .sev-dot.sev-info     { background: var(--sev-info); }

/* ===== Portal tiles — TILE BODY colored per severity ===== */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.tile {
  border-radius: 10px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}
.tile:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}
.tile.selected {
  box-shadow: 0 0 0 2px var(--accent-primary-strong);
}

/* ---- TILE BODY COLOR (per tier) ----
 * §49.13 P0-16 WCAG fix: increased alpha so background hue dominates instead of
 * blending into the dark app background. Ensures dark text on fair/good tiles
 * meets AA 3:1 (large text) and 4.5:1 (normal text) contrast. */
.tile[data-tier="great"] {
  background: linear-gradient(160deg, rgba(91,168,74,0.92) 0%, rgba(91,168,74,0.78) 100%);
  border-color: rgba(91,168,74,1);
}
.tile[data-tier="good"] {
  background: linear-gradient(160deg, rgba(124,193,66,0.92) 0%, rgba(124,193,66,0.78) 100%);
  border-color: rgba(124,193,66,1);
}
.tile[data-tier="fair"] {
  background: linear-gradient(160deg, rgba(252,203,0,0.95) 0%, rgba(252,203,0,0.85) 100%);
  border-color: rgba(252,203,0,1);
}
.tile[data-tier="poor"] {
  background: linear-gradient(160deg, rgba(235,140,47,0.94) 0%, rgba(235,140,47,0.82) 100%);
  border-color: rgba(235,140,47,1);
}
.tile[data-tier="bad"] {
  background: linear-gradient(160deg, rgba(221,51,51,0.93) 0%, rgba(221,51,51,0.80) 100%);
  border-color: rgba(221,51,51,1);
}
/* §49.35 CIP-P0-04: coverage 不足時は neutral gray。緑/警告色に見せない。 */
.tile[data-tier="insufficient_evidence"] {
  background: linear-gradient(160deg, rgba(126,134,140,0.30) 0%, rgba(126,134,140,0.16) 100%);
  border-color: rgba(126,134,140,0.7);
}

.tile .code {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}
.tile .domain {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile .score-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 14px;
}
.tile .score {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
}
.tile .score-max {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.tile .sev-mini {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--text-primary);
}
.tile .sev-mini span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.tile .tile-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tile .badge-tier {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  background: rgba(0,0,0,0.3);
  color: #fff;
}

/* §49.13 P0-16: WCAG contrast fix for tinted tier tiles.
 * With increased background alpha (0.85–0.95), the light default text (rgb(232,234,237))
 * fails AA against yellow/green/orange backgrounds. Force dark text on great/good/fair/poor
 * tiles across all text lines so contrast meets AA 3:1 (large) and 4.5:1 (normal). */
.tile[data-tier="great"] .domain,
.tile[data-tier="great"] .score-max,
.tile[data-tier="great"] .tile-meta,
.tile[data-tier="great"] .tile-coverage-label,
.tile[data-tier="great"] .tile-confidence-chip,
.tile[data-tier="good"] .domain,
.tile[data-tier="good"] .score-max,
.tile[data-tier="good"] .tile-meta,
.tile[data-tier="good"] .tile-coverage-label,
.tile[data-tier="good"] .tile-confidence-chip,
.tile[data-tier="fair"] .domain,
.tile[data-tier="fair"] .score-max,
.tile[data-tier="fair"] .tile-meta,
.tile[data-tier="fair"] .tile-coverage-label,
.tile[data-tier="fair"] .tile-confidence-chip,
.tile[data-tier="poor"] .domain,
.tile[data-tier="poor"] .score-max,
.tile[data-tier="poor"] .tile-meta,
.tile[data-tier="poor"] .tile-coverage-label,
.tile[data-tier="poor"] .tile-confidence-chip {
  color: #0a0a0a;
}
.tile[data-tier="great"] .code,
.tile[data-tier="great"] .score,
.tile[data-tier="great"] .sev-mini,
.tile[data-tier="good"] .code,
.tile[data-tier="good"] .score,
.tile[data-tier="good"] .sev-mini,
.tile[data-tier="fair"] .code,
.tile[data-tier="fair"] .score,
.tile[data-tier="fair"] .sev-mini,
.tile[data-tier="poor"] .code,
.tile[data-tier="poor"] .score,
.tile[data-tier="poor"] .sev-mini {
  color: #0a0a0a;
}
/* bad (red) tier keeps light text — red bg #dd3333 is dark enough for white text (AA pass). */

/* §49.13 P0-16: focus ring for keyboard activation on tiles. */
.tile:focus-visible {
  outline: 2px solid #4F98A3;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px rgba(79,152,163,0.35);
}

/* §49.13 P0-9: coverage fraction + confidence chip */
.tile .tile-coverage {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 6px 8px;
  background: rgba(0,0,0,0.22);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.tile[data-tier="fair"] .tile-coverage {
  background: rgba(255,255,255,0.35);
}
.tile .tile-coverage-label {
  color: var(--text-muted);
  text-transform: uppercase;
}
.tile .tile-coverage-frac {
  color: var(--text-primary);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.tile .tile-confidence-chip {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(79,152,163,0.28);
  color: #cfeef2;
  white-space: nowrap;
}
.tile .tile-coverage[data-confidence="partial"] .tile-confidence-chip {
  background: rgba(252,203,0,0.32);
  color: #3a2a00;
}
.tile .tile-coverage[data-confidence="low"] .tile-confidence-chip {
  background: rgba(221,120,120,0.32);
  color: #4a1414;
}
.tile[data-tier="fair"] .tile-confidence-chip {
  color: #0a0a0a;
}

/* §49.13 P0-10: tri-state probe matrix cells */
.tile .tile-probe-matrix {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 10px;
}
.tile .probe-cell {
  height: 8px;
  border-radius: 2px;
  background: rgba(90,110,125,0.30);
  cursor: help;
}
.tile .probe-cell[data-probe-state="findings"] {
  background: #d93838;
}
.tile .probe-cell[data-probe-state="clean"] {
  background: #5ba84a;
}
.tile .probe-cell[data-probe-state="error"] {
  background: repeating-linear-gradient(45deg, #b56d1e 0 3px, #6a3e10 3px 6px);
}
.tile .probe-cell[data-probe-state="skipped"] {
  background: repeating-linear-gradient(45deg, rgba(90,110,125,0.35) 0 3px, rgba(90,110,125,0.10) 3px 6px);
}

/* §49.13 P0-10: heatmap not-probed cells (data-not-probed=true) get a hatched pattern overlay so */
/* they read as "we didn't measure this", not "this is perfect". */
.heatmap-cell[data-not-probed="true"] {
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.06) 0 4px, transparent 4px 8px);
}

/* §49.13 P0-13: evidence link inside findings-table (references RFC / OWASP / MDN docs). */
/* Kept visually restrained — dotted underline signals "reference material", not a primary CTA. */
.evidence-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent-primary-strong);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  letter-spacing: 0.02em;
  transition: color 120ms ease, text-decoration-color 120ms ease;
}
.evidence-link:hover,
.evidence-link:focus-visible {
  color: var(--text-primary);
  text-decoration: underline solid;
}
.evidence-link:focus-visible {
  outline: 2px solid var(--accent-primary-strong);
  outline-offset: 2px;
  border-radius: 2px;
}


/* KPI */
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .kpi-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
}
.kpi .kpi-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.kpi .kpi-delta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.portfolio-health {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* 4-metric bar (Total / Technical / Organizational / Severity) */
.metric-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.metric-cell {
  background: var(--bg-surface-2);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.metric-cell .metric-value {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.metric-cell .metric-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

/* Severity stacked bar */
.sev-stack {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--bg-surface-2);
}
.sev-stack .seg { height: 100%; }
.sev-stack .seg.sev-critical { background: var(--sev-critical); }
.sev-stack .seg.sev-high     { background: var(--sev-high); }
.sev-stack .seg.sev-medium   { background: var(--sev-medium); }
.sev-stack .seg.sev-low      { background: var(--sev-low); }
.sev-stack .seg.sev-info     { background: var(--sev-info); }
.sev-legend {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  flex-wrap: wrap;
}

/* Table */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
table.findings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
table.findings-table thead { background: var(--bg-surface-2); }
table.findings-table th {
  text-align: left;
  padding: 11px 14px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
table.findings-table th:hover { color: var(--text-primary); }
table.findings-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
table.findings-table tbody tr:hover { background: var(--bg-surface-2); }
table.findings-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.015); }
table.findings-table tbody tr:nth-child(even):hover { background: var(--bg-surface-2); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 0.04em;
  font-weight: 500;
  background: var(--bg-surface-3);
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
}
.badge.sev-critical { background: rgba(229,72,77,0.18); color: var(--sev-critical); }
.badge.sev-high     { background: rgba(247,107,21,0.18); color: var(--sev-high); }
.badge.sev-medium   { background: rgba(245,211,63,0.22); color: #E8C93A; }
.badge.sev-low      { background: rgba(70,167,88,0.18); color: var(--sev-low); }
.badge.sev-info     { background: rgba(126,134,140,0.2); color: var(--text-muted); }

.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg-surface-2);
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
}
.chip:hover { color: var(--text-primary); border-color: var(--border-strong); }
.chip.active {
  color: var(--text-primary);
  background: var(--bg-surface-3);
  border-color: var(--accent-primary);
}

.input, .select {
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font-body);
}
.input:focus, .select:focus { outline: none; border-color: var(--accent-primary); }
.input { width: 220px; }

/* Category breakdown row */
.cat-row {
  display: grid;
  grid-template-columns: 180px 1fr 50px;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.cat-name { font-size: 12px; color: var(--text-primary); }
.cat-count {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-size: 12px;
}

.probe-grid { display: flex; flex-direction: column; gap: 3px; }
.probe-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
}
.probe-row:hover { background: var(--bg-surface-2); }
.probe-name { color: var(--text-primary); font-family: var(--font-mono); font-size: 11px; }
.probe-count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--accent-primary-strong);
  font-weight: 600;
}

/* §49.13 P1-6: probe timing UI */
.probe-timing {
  font-size: 10px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 48px;
  text-align: right;
}
.probe-timing-summary {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.probe-timing-bar {
  display: flex;
  height: 6px;
  width: 100%;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-surface-2);
}
.probe-timing-seg {
  display: block;
  height: 100%;
  min-width: 2px;
}
.probe-timing-legend {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

/* Detail panel */
.detail-panel {
  margin-top: 20px;
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.detail-header h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.2;
}
.detail-header .code {
  font-family: var(--font-mono);
  color: var(--accent-primary-strong);
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Heatmap */
.heatmap {
  display: grid;
  gap: 2px;
}
.heatmap-cell {
  padding: 12px 10px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 60px;
}
.heatmap-cell.header {
  background: var(--bg-surface-2);
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 8px;
}
.hm-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  font-weight: 700;
}
.hm-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255,255,255,0.6);
  margin-top: 2px;
}

/* Regulatory */
.reg-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}
.reg-region-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  font-weight: 600;
  text-transform: uppercase;
  background: var(--bg-surface-3);
  color: var(--accent-primary-strong);
}
.reg-region-badge.jp { background: rgba(229,72,77,0.18); color: var(--sev-critical); }
.reg-region-badge.eu { background: rgba(79,152,163,0.2); color: var(--accent-primary-strong); }
.reg-region-badge.us { background: rgba(225,177,90,0.2); color: var(--accent-warm); }
.reg-region-badge.uk { background: rgba(70,167,88,0.2); color: var(--sev-low); }
.reg-region-badge.int { background: rgba(126,134,140,0.24); color: var(--text-primary); }

.coverage-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--bg-surface-2);
  overflow: hidden;
  min-width: 100px;
}
.coverage-bar .fill { height: 100%; }

/* FAQ accordion */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.faq-question {
  padding: 18px 22px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  line-height: 1.4;
}
.faq-question:hover { background: var(--bg-surface-2); }
.faq-question .toggle-icon {
  width: 16px; height: 16px;
  color: var(--accent-primary-strong);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq-item.open .toggle-icon { transform: rotate(45deg); }
.faq-answer {
  padding: 0 22px 22px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.75;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

/* Settings */
.settings-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
}
.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: sticky;
  top: 68px;
  align-self: start;
}
.settings-nav-item {
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  border: none;
  background: transparent;
  text-align: left;
}
.settings-nav-item:hover { background: var(--bg-surface-2); color: var(--text-primary); }
.settings-nav-item.active {
  background: var(--bg-surface-2);
  color: var(--accent-primary-strong);
  border-left: 2px solid var(--accent-primary);
}
.settings-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}
.settings-section h3 {
  margin: 0 0 22px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.settings-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.settings-row:last-child { border-bottom: none; }
.settings-row .lbl {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.settings-row .val { color: var(--text-primary); font-size: 13px; }
.settings-toggle {
  width: 40px;
  height: 22px;
  background: var(--bg-surface-3);
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--border);
}
.settings-toggle.on { background: var(--accent-primary); }
.settings-toggle::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 2px; left: 3px;
  transition: left 0.15s;
}
.settings-toggle.on::after { left: 20px; }

/* Layout utility */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 20px; }
.mt-6 { margin-top: 32px; }
.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-half { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-thirds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Footer */
.app-footer {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 900px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-half, .grid-thirds { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; overflow-x: auto; position: static; }
  .lp-preview .preview-tiles { grid-template-columns: repeat(2, 1fr); }
  .lp-hero h1 { font-size: 42px; letter-spacing: -0.02em; }
  .lp-hero .lp-sub { font-size: 17px; }
  .lp-features h2, .lp-cta h2, .pricing-head h1 { font-size: 30px; }
  .lp-topbar { padding: 14px 20px; flex-wrap: wrap; gap: 10px; }
  .lp-topbar .lp-nav { gap: 12px; margin-left: auto; }
  .lp-topbar .lp-nav a { font-size: 11px; }
  .lp-topbar .lp-nav .nav-link-desktop { display: none; }
  .lp-hero { padding: 48px 24px 56px; }
  .lp-features, .lp-regs, .lp-cta { padding: 56px 24px; }
  .lp-preview { padding: 0 24px; margin-bottom: 56px; }
  /* Prevent a wide descendant (e.g. the min-width:900px workflow-integration
     table) from inflating the mobile layout viewport past device-width; the
     table keeps its own overflow-x:auto scroll wrapper. */
  .lp-features, .lp-regs, .lp-cta { max-width: 100%; min-width: 0; }
}

/* ============================================================
   REPORT CTA BUTTONS (Portal / Terminal header)
   ============================================================ */
.btn-report-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.12s, transform 0.12s;
  white-space: nowrap;
}
.btn-report-cta:hover {
  background: var(--accent-primary-strong);
  transform: translateY(-1px);
}
.btn-report-cta svg {
  width: 13px; height: 13px;
  stroke-width: 2;
}

/* ============================================================
   REPORT PAGE — CONTROLS PANEL
   ============================================================ */
.report-controls {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px 22px;
  margin-bottom: 20px;
}
.report-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 18px;
}
.rc-cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rc-cell-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rc-cell-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rc-radio {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.rc-radio:hover {
  border-color: var(--border-strong);
}
.rc-radio.active {
  border-color: var(--accent-primary);
  background: rgba(79, 152, 163, 0.08);
}
.rc-radio input[type="radio"] {
  margin-top: 2px;
  accent-color: var(--accent-primary);
}
.rc-radio-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rc-radio-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.rc-radio-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.45;
}
.report-controls-actions {
  display: flex;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.btn-report-primary,
.btn-report-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.btn-report-primary {
  background: var(--accent-primary);
  color: #fff;
  border: 1px solid var(--accent-primary);
}
.btn-report-primary:hover {
  background: var(--accent-primary-strong);
  border-color: var(--accent-primary-strong);
}
.btn-report-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.btn-report-secondary:hover {
  border-color: var(--accent-primary-strong);
  color: var(--accent-primary-strong);
}
.btn-report-primary svg,
.btn-report-secondary svg {
  width: 12px; height: 12px;
  stroke-width: 2;
}

/* §49.13 P1-7 / P1-8: lightweight utility buttons for export/import and inline actions */
.btn-utility {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 4px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.btn-utility:hover {
  border-color: var(--accent-primary-strong);
  color: var(--accent-primary-strong);
}
.btn-utility:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}
.btn-utility[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.text-success { color: var(--accent-success, #437A22); }
.text-error { color: var(--accent-error, #A12C7B); }

/* Preview header meta bar */
.report-preview-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0 12px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ============================================================
   REPORT DOCUMENT — A4 page look
   ============================================================ */
.report-doc {
  max-width: 820px;
  margin: 0 auto;
  background: #FAFAF7;
  color: #17181A;
  padding: 56px 64px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.35), 0 12px 40px rgba(0,0,0,0.5);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.55;
}
.report-doc .mono { font-family: var(--font-mono); }
.report-doc .text-faint { color: #7A7A73; }
.report-doc .text-muted { color: #4D4E52; }

/* Cover */
.rd-cover {
  padding-bottom: 32px;
  border-bottom: 3px double #17181A;
  margin-bottom: 28px;
}
.rd-cover-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #17181A;
  margin-bottom: 32px;
}
.rd-cover-company {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.rd-cover-brand {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #7A7A73;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}
.rd-cover-classification {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 10px;
  background: #17181A;
  color: #FAFAF7;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.rd-cover-title {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 10px 0;
  color: #17181A;
}
.rd-cover-subtitle {
  font-size: 14px;
  color: #4D4E52;
  margin: 0 0 28px 0;
  line-height: 1.5;
  max-width: 640px;
}
.rd-cover-meta {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}
.rd-cover-meta th,
.rd-cover-meta td {
  padding: 6px 10px;
  border-bottom: 1px solid #D5D5CC;
  text-align: left;
  vertical-align: top;
}
.rd-cover-meta th {
  width: 200px;
  font-weight: 600;
  color: #4D4E52;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rd-cover-meta td {
  color: #17181A;
}

/* Section */
.rd-section {
  margin-bottom: 32px;
}
.rd-section h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #17181A;
  margin: 0 0 6px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #17181A;
}
.rd-desc {
  font-size: 11.5px;
  color: #4D4E52;
  margin: 0 0 14px 0;
  line-height: 1.55;
}
.rd-para {
  font-size: 12px;
  color: #17181A;
  margin: 0 0 12px 0;
  line-height: 1.65;
}

/* KPI row */
.rd-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.rd-kpi {
  background: #F0EFE9;
  border-left: 3px solid #17181A;
  padding: 14px 14px 12px;
}
.rd-kpi-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #4D4E52;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.rd-kpi-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: #17181A;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.rd-kpi-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #7A7A73;
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* Benchmark bars */
.rd-benchmark {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: #F0EFE9;
  margin-bottom: 12px;
}
.rd-bm-row {
  display: grid;
  grid-template-columns: 200px 1fr 60px;
  align-items: center;
  gap: 12px;
}
.rd-bm-label {
  font-size: 11.5px;
  color: #17181A;
  font-weight: 500;
}
.rd-bm-bar {
  height: 12px;
  background: #E0DFD6;
  position: relative;
  border-radius: 2px;
  overflow: hidden;
}
.rd-bm-bar-fill {
  height: 100%;
  border-radius: 2px;
}
.rd-bm-value {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  color: #17181A;
}
.rd-bm-note {
  font-size: 11px;
  color: #4D4E52;
  margin-top: 4px;
}

/* Table */
.rd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  margin-bottom: 8px;
}
.rd-table thead th {
  padding: 8px 10px;
  background: #17181A;
  color: #FAFAF7;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
}
.rd-table tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid #D5D5CC;
  color: #17181A;
  vertical-align: top;
  line-height: 1.5;
}
.rd-table tbody tr:nth-child(even) td {
  background: #F5F4EE;
}
.rd-table tbody tr.rd-total td {
  border-top: 2px solid #17181A;
  border-bottom: none;
  background: #EAE9E1;
  font-weight: 700;
  font-family: var(--font-mono);
  padding-top: 9px;
  padding-bottom: 9px;
}

/* Badges */
.rd-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rd-badge-good {
  background: #E1EDD3;
  color: #4A6E1F;
  border: 1px solid #C0D8A0;
}
.rd-badge-warn {
  background: #FBEDD8;
  color: #8A5411;
  border: 1px solid #E9D4A6;
}

/* Severity badges (reg findings) */
.rd-sev {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.rd-sev-critical { background: #F5D5D5; color: #8A1E1E; border: 1px solid #E4B3B3; }
.rd-sev-high     { background: #FBE0C7; color: #8A4210; border: 1px solid #ECC6A0; }
.rd-sev-medium   { background: #FDF3D5; color: #7A5B0F; border: 1px solid #EFDE9A; }
.rd-sev-low      { background: #E4EDF0; color: #305760; border: 1px solid #B7CFD4; }

/* Sign-off blocks */
.rd-signoff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}
.rd-signoff.rd-signoff-3 {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 22px;
}
.rd-signoff-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rd-signoff-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #4D4E52;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.rd-signoff-line {
  border-bottom: 1px solid #17181A;
  height: 1px;
}
.rd-signoff-sub {
  font-size: 10px;
  color: #7A7A73;
  margin-top: 6px;
  letter-spacing: 0.04em;
}

/* Footer of the report doc */
.rd-footer {
  margin-top: 40px;
  padding-top: 14px;
  border-top: 1px solid #D5D5CC;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #7A7A73;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

/* Report responsive */
@media (max-width: 900px) {
  .report-controls-grid { grid-template-columns: 1fr; gap: 16px; }
  .report-doc { padding: 32px 24px; max-width: 100%; }
  .rd-kpi-row { grid-template-columns: 1fr 1fr; }
  .rd-bm-row { grid-template-columns: 100px 1fr 50px; gap: 8px; }
  .rd-cover-title { font-size: 26px; }
  .rd-signoff, .rd-signoff.rd-signoff-3 { grid-template-columns: 1fr; gap: 20px; }
  .rd-cover-meta th { width: 120px; font-size: 9px; }
}

/* ============================================================
   PRINT STYLES  — §49.13 P1-5 強化後
   ============================================================ */
@media print {
  html, body {
    background: #ffffff !important;
    color: #17181A !important;
    /* タイル本体色を保持 (good/fair/poor/bad) */
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .sidebar,
  .topbar,
  .app-footer,
  .no-print,
  .report-controls,
  .report-preview-meta {
    display: none !important;
  }
  .main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
  }
  .app-shell {
    display: block !important;
  }
  .report-doc {
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    background: #ffffff !important;
    border-radius: 0 !important;
    font-size: 10.5pt !important;
    line-height: 1.45 !important;
  }

  /* Section 単位のページ分割制御 */
  .rd-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .rd-page-break {
    page-break-before: always;
    break-before: page;
  }
  .rd-cover {
    page-break-after: always;
    break-after: page;
  }

  /* テーブル / KPI / benchmark / signoff はページ分割しない */
  .rd-table,
  .rd-kpi-row,
  .rd-benchmark,
  .rd-signoff,
  .rd-callout,
  .rd-domain-tile-print,
  .findings-table,
  .heatmap,
  .card,
  figure {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* テーブル行は単体で分割させない */
  tr, li {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .rd-table thead,
  .findings-table thead {
    display: table-header-group;
  }
  .rd-table tfoot,
  .findings-table tfoot {
    display: table-footer-group;
  }

  /* 見出しの直後でページを切らない */
  h1, h2, h3, h4, h5, h6,
  .rd-h1, .rd-h2, .rd-h3,
  .card-title {
    page-break-after: avoid;
    break-after: avoid;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* 段落の widow/orphan 制御 */
  p, li {
    orphans: 3;
    widows: 3;
  }

  /* タイル本体色 — プリンタでも good/fair/poor/bad の色を保持 */
  .tile-good, .tile-fair, .tile-poor, .tile-bad,
  .sev-critical, .sev-high, .sev-medium, .sev-low, .sev-info {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* URL を link の後ろに展開 (監査追跡性 — 一部 anchor に限定) */
  .rd-section a[href^="http"]::after,
  .rd-callout a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #57606a;
    word-break: break-all;
  }
  /* ナビゲーション / 内部 anchor は URL 展開しない */
  a[href^="#"]::after,
  .no-print-url::after {
    content: "" !important;
  }

  /* Image の overflow 防止 */
  img, svg {
    max-width: 100% !important;
    height: auto !important;
  }

  /* A4 ページ定義 (ヘッダ/フッタを含むマージン) */
  @page {
    size: A4;
    margin: 15mm 14mm 18mm 14mm;
  }
  @page :first {
    /* Cover page は上マージンを少なく */
    margin-top: 12mm;
  }
}

@media print and (max-width: 210mm) {
  /* A4 幅より小さいプリンタはフォントを少し縮める */
  .report-doc {
    font-size: 9.5pt !important;
  }
}

/* Callout in report */
.rd-callout {
  padding: 10px 14px;
  background: #F5F4EE;
  border-left: 3px solid #17181A;
  font-size: 12px;
  color: #17181A;
  margin-top: 8px;
}

/* ============================================================
   3-Layer Health View (Entity Detail Panel)
   ============================================================ */

/* Layer 1: Health Hero (overall health at a glance) */
.health-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  padding: 22px 24px;
  margin-top: 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(79,152,163,0.04) 0%, rgba(79,152,163,0.01) 100%);
  position: relative;
  overflow: hidden;
}
.health-hero::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--score-fair);
}
.health-hero[data-tier="good"]::before { background: var(--score-good); }
.health-hero[data-tier="fair"]::before { background: var(--score-fair); }
.health-hero[data-tier="poor"]::before { background: var(--score-poor); }
.health-hero[data-tier="bad"]::before  { background: var(--score-bad); }
.health-hero[data-tier="insufficient_evidence"]::before { background: var(--score-insufficient); }

.health-hero-left { min-width: 0; }
.health-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 280px;
}

.health-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.health-overall-label {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}
.health-overall-desc {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 520px;
}

.health-gauge {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
}
.health-gauge-score {
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.health-gauge-tier {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.health-verdict {
  font-size: 12px;
  line-height: 1.55;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  color: var(--text-primary);
  max-width: 320px;
  text-align: right;
}
.health-verdict[data-tier="good"] { border-color: rgba(124,193,66,0.35); }
.health-verdict[data-tier="fair"] { border-color: rgba(252,203,0,0.35); }
.health-verdict[data-tier="poor"] { border-color: rgba(235,140,47,0.35); }
.health-verdict[data-tier="bad"]  { border-color: rgba(221,51,51,0.35); }
.health-verdict[data-tier="insufficient_evidence"] { border-color: rgba(126,134,140,0.4); }

/* Layer 2: Two-axis grid (Technical vs Organizational) */
.health-axis-kicker {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.health-axis-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.health-axis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.health-axis-card {
  padding: 18px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  position: relative;
  overflow: hidden;
}
.health-axis-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--score-fair);
}
.health-axis-card[data-tier="good"]::before { background: var(--score-good); }
.health-axis-card[data-tier="fair"]::before { background: var(--score-fair); }
.health-axis-card[data-tier="poor"]::before { background: var(--score-poor); }
.health-axis-card[data-tier="bad"]::before  { background: var(--score-bad); }
.health-axis-card[data-tier="insufficient_evidence"]::before { background: var(--score-insufficient); }

.health-axis-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.health-axis-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.health-axis-count {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.health-axis-count .mono {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.health-axis-desc-sm {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}
.health-axis-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
  margin-bottom: 8px;
}
.health-axis-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4,0.0,0.2,1);
}
.health-axis-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.health-axis-score {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.health-axis-tier {
  font-size: 12px;
  font-weight: 600;
}

/* Layer 3: Business impact + Advice */
.health-context-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.health-context-card {
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  position: relative;
}
.health-impact-card::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 14px;
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--accent-primary);
}
.health-advice-card::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 14px;
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--accent-warm);
}
.health-context-card[data-tier="bad"] .health-impact-card::before,
.health-context-card[data-tier="bad"]::before { background: var(--score-bad); }
.health-context-card[data-tier="insufficient_evidence"]::before { background: var(--score-insufficient); }
.health-context-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 12px;
}
.health-context-body {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-primary);
  padding-left: 12px;
}

/* Responsive: stack on narrow screens */
@media (max-width: 900px) {
  .health-hero {
    grid-template-columns: 1fr;
  }
  .health-hero-right {
    align-items: flex-start;
    min-width: 0;
  }
  .health-verdict {
    text-align: left;
    max-width: none;
  }
  .health-axis-grid,
  .health-context-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Cyber Shield Tab
   ============================================================ */

.shield-access-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.shield-access-card {
  padding: 16px 18px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface-2);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
  position: relative;
}
.shield-access-card:hover {
  border-color: var(--accent-primary);
  background: var(--bg-surface-3);
  transform: translateY(-1px);
}
/* §49.13 P0-16: keyboard focus ring (WCAG 2.4.7) */
.shield-access-card:focus-visible {
  outline: 2px solid var(--accent-primary-strong);
  outline-offset: 2px;
  border-color: var(--accent-primary);
}
.shield-access-icon {
  width: 26px;
  height: 26px;
  margin-bottom: 12px;
  color: var(--accent-primary-strong);
}
.shield-access-icon svg {
  width: 100%;
  height: 100%;
}
.shield-access-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.shield-access-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.shield-access-arrow {
  color: var(--accent-primary);
  font-size: 15px;
  transition: transform 0.18s ease;
}
.shield-access-card:hover .shield-access-arrow {
  transform: translateX(3px);
}
.shield-access-body {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.shield-plans-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.shield-plan-col {
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-surface-2);
}
.shield-plan-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.shield-plan-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-primary-strong);
  letter-spacing: 0.02em;
}
.shield-plan-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .shield-access-grid { grid-template-columns: 1fr; }
  .shield-plans-table { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .shield-plans-table { grid-template-columns: 1fr; }
}

/* ===========================================================
   §49.10 — Entity Overview Panel (per-target drill-down)
   =========================================================== */
.entity-panel {
  background: linear-gradient(135deg, rgba(20, 40, 55, 0.55) 0%, rgba(15, 30, 42, 0.55) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 20px 22px;
}
.entity-kicker {
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-primary);
  font-weight: 700;
  margin-bottom: 4px;
}
.entity-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
}
.entity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.entity-card {
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 14px 16px;
}
.entity-card-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}
.entity-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.35;
}
.entity-card-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  font-size: 12px;
}
.entity-card-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.entity-card-meta .lbl {
  color: var(--text-muted);
  font-size: 11px;
}
.entity-card-source {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,0.08);
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.entity-card-source a {
  color: var(--accent-primary);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent-primary);
}
.entity-card-source a:hover { opacity: 0.85; }

.entity-metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 6px;
}
.entity-metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}
.entity-metric .num {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-primary-strong);
  line-height: 1;
}
.entity-metric .lbl {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.entity-details {
  margin-top: 14px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 6px;
  padding: 10px 14px;
}
.entity-details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary);
  letter-spacing: 0.04em;
  list-style: none;
}
.entity-details summary::-webkit-details-marker { display: none; }
.entity-details summary::before {
  content: "▸ ";
  display: inline-block;
  margin-right: 4px;
  transition: transform 0.2s;
}
.entity-details[open] summary::before {
  content: "▾ ";
}
.entity-asset-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 12px;
}
.entity-asset-table th {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.entity-asset-table td {
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-primary);
}
.entity-asset-table td.mono { font-size: 11.5px; }

.entity-related-block {
  margin-top: 18px;
  padding: 14px 16px;
  background: rgba(30, 74, 94, 0.22);
  border: 1px dashed rgba(58, 118, 144, 0.5);
  border-radius: 8px;
}
.entity-related-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.entity-related-kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #B8DDF0;
  font-weight: 700;
  margin-bottom: 4px;
}
.entity-related-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.entity-related-cta {
  background: linear-gradient(135deg, #1e4a5e 0%, #2b5f78 100%);
  border: 1px solid #3a7690;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.entity-related-cta:hover { opacity: 0.88; }
.entity-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.entity-related-card {
  padding: 10px 12px;
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
}
.entity-related-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.35;
}
.entity-related-meta {
  display: flex;
  gap: 8px;
  font-size: 10.5px;
  color: var(--text-muted);
  align-items: center;
  flex-wrap: wrap;
}
.entity-related-meta .mono { font-size: 10px; }
.entity-related-note {
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--text-faint);
  line-height: 1.45;
  font-style: italic;
}

@media (max-width: 900px) {
  .entity-grid { grid-template-columns: 1fr; }
  .entity-related-header { flex-direction: column; }
}

/* ---------- Entity IP inventory (§49.11) ---------- */
.entity-ip-block {
  margin-top: 22px;
  padding: 16px 18px 18px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.06);
  border-left: 3px solid var(--accent-teal);
  border-radius: 6px;
}
.entity-ip-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.entity-ip-kicker {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-teal);
}
.entity-ip-count {
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.entity-ip-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.entity-ip-stats {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-mono);
}
.entity-ip-stats .entity-ip-count {
  color: var(--accent-teal);
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
}
.entity-ip-count-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.entity-ip-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.entity-ip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(0,0,0,0.32);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  transition: opacity 0.18s;
  min-width: 0;
}
.entity-ip-row .entity-ip-kind { flex: 0 0 auto; align-self: center; }
.entity-ip-row .entity-ip-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.entity-ip-row .entity-ip-addr {
  color: var(--text-primary);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entity-ip-row .entity-ip-ptr {
  font-size: 9.5px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entity-ip-row .entity-ip-source {
  flex: 0 0 auto;
  font-size: 9px;
  color: var(--text-muted);
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.entity-ip-row .entity-ip-toggle {
  flex: 0 0 auto;
  align-self: center;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.18s;
  white-space: nowrap;
}
.entity-ip-row .entity-ip-toggle:hover {
  border-color: var(--sev-high);
  color: var(--sev-high);
}
.entity-ip-row .entity-ip-toggle.ip-restore {
  color: var(--sev-low);
  border-color: rgba(114,168,90,0.35);
}
.entity-ip-row .entity-ip-toggle.ip-restore:hover {
  border-color: var(--sev-low);
  color: var(--sev-low);
}
.entity-ip-row.ip-removed {
  opacity: 0.42;
  border-style: dashed;
}
.entity-ip-row.ip-user-added {
  border-color: rgba(80,160,180,0.35);
  background: rgba(30,74,94,0.18);
}
.entity-ip-kind {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  text-transform: uppercase;
}
.entity-ip-kind[data-kind="ipv4"] {
  background: rgba(76,140,164,0.22);
  color: #7fb8cf;
  border: 1px solid rgba(76,140,164,0.35);
}
.entity-ip-kind[data-kind="ipv6"] {
  background: rgba(148,68,84,0.22);
  color: #d68694;
  border: 1px solid rgba(148,68,84,0.35);
}
.entity-ip-add {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,0.08);
}
.entity-ip-input {
  flex: 1;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-primary);
  padding: 7px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  min-width: 0;
}
.entity-ip-input:focus {
  outline: none;
  border-color: var(--accent-teal);
}
.entity-ip-input.invalid {
  border-color: var(--sev-high);
}
.entity-ip-add-btn {
  background: linear-gradient(135deg, #1e4a5e 0%, #2b5f78 100%);
  border: 1px solid #3a7690;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: opacity 0.18s;
}
.entity-ip-add-btn:hover { opacity: 0.88; }
.entity-ip-add-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.entity-ip-empty {
  font-size: 11.5px;
  color: var(--text-faint);
  font-style: italic;
  padding: 12px 0;
  text-align: center;
}

/* Findings table target-IP column */
.findings-table td.mono-ip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.findings-table td.mono-ip .ip-primary {
  color: var(--text-primary);
  display: block;
}
.findings-table td.mono-ip .ip-count {
  color: var(--text-faint);
  font-size: 9.5px;
}

@media (max-width: 900px) {
  .entity-ip-list { grid-template-columns: 1fr; }
  .entity-ip-add { flex-direction: column; }
}

/* ============================================================
 * §49.14 — Attacker-perspective cards (Fable 5 / Mythos)
 * ATT&CK heatmap · Kill Chain · STRIDE · Priority · Scenarios
 * ============================================================ */
.attacker-view-strip {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-primary);
  border-radius: 6px;
  background: var(--bg-surface-2);
  margin-top: 16px;
}
.attacker-view-strip .attacker-view-kicker {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-primary-strong);
  font-weight: 700;
  white-space: nowrap;
}
.attacker-view-strip .attacker-view-note {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.priority-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
  font-size: 12px;
}
.priority-table th,
.priority-table td {
  padding: 8px 10px;
  border-bottom: 1px dashed var(--border);
  text-align: left;
  vertical-align: top;
}
.priority-table th {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.priority-table td.num,
.priority-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums lining-nums;
}
.priority-score-badge {
  display: inline-block;
  min-width: 34px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  text-align: center;
  font-size: 11px;
}
.priority-tier-critical { background: rgba(221, 51, 51, 0.16); color: #b81c1c; }
.priority-tier-high     { background: rgba(235, 140, 47, 0.18); color: #a55414; }
.priority-tier-medium   { background: rgba(252, 203, 0, 0.20); color: #7a5f00; }
.priority-tier-low      { background: rgba(91, 168, 74, 0.18); color: #2f6d1b; }

.priority-breakdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 6px;
}
.priority-breakdown-cell {
  padding: 12px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-surface-2);
  text-align: center;
}
.priority-breakdown-cell .pb-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.priority-breakdown-cell .pb-value {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 1;
}
.priority-breakdown-cell[data-tier="critical"] .pb-value { color: #b81c1c; }
.priority-breakdown-cell[data-tier="high"] .pb-value     { color: #a55414; }
.priority-breakdown-cell[data-tier="medium"] .pb-value   { color: #7a5f00; }
.priority-breakdown-cell[data-tier="low"] .pb-value      { color: #2f6d1b; }

.attack-heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.attack-heatmap-cell {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-surface-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.attack-heatmap-cell[data-highlight="1"] {
  border-color: var(--accent-primary);
  background: rgba(1, 105, 111, 0.06);
}
.attack-heatmap-cell .ah-name {
  font-size: 11px;
  color: var(--text-primary);
  line-height: 1.3;
}
.attack-heatmap-cell .ah-count {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text-muted);
}
.attack-heatmap-cell[data-highlight="1"] .ah-count {
  color: var(--accent-primary-strong);
}

.kill-chain-flow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 6px;
}
.kill-chain-node {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 10px 8px;
  background: var(--bg-surface-2);
  text-align: center;
}
.kill-chain-node[data-active="1"] {
  border-color: var(--accent-primary);
  background: rgba(1, 105, 111, 0.06);
}
.kill-chain-node .kc-name {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.3;
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kill-chain-node .kc-count {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text-faint);
}
.kill-chain-node[data-active="1"] .kc-count {
  color: var(--accent-primary-strong);
}
@media (max-width: 900px) {
  .kill-chain-flow { grid-template-columns: repeat(2, 1fr); }
  .priority-breakdown { grid-template-columns: repeat(2, 1fr); }
}

.stride-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.stride-cell {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-surface-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.stride-cell[data-active="1"] {
  border-color: var(--accent-primary);
  background: rgba(1, 105, 111, 0.06);
}
.stride-cell .st-name { font-size: 11px; color: var(--text-primary); }
.stride-cell .st-count {
  font-size: 14px; font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--text-faint);
}
.stride-cell[data-active="1"] .st-count { color: var(--accent-primary-strong); }
@media (max-width: 700px) { .stride-grid { grid-template-columns: repeat(2, 1fr); } }

/* ==================== §49.36 CIP-SEC-P2-04: coverage matrix ==================== */
/* States are ALWAYS distinguished by an icon + text label; colour is a redundant
   secondary signal (WCAG 1.4.1). The .covmx-icon monospace glyph ([v]/[~]/[!]/[?])
   carries the state even with no colour / in print / for colour-blind users. */
.covmx-legend {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 4px 0 10px;
}
.covmx-legend-item {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 3px 8px; background: var(--bg-surface-2);
}
.covmx-icon {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; font-weight: 700; letter-spacing: -0.5px;
}
.covmx-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.covmx-table {
  width: 100%; border-collapse: collapse; margin-top: 4px;
  font-size: 12px; min-width: 420px;
}
.covmx-table caption.sr-only,
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.covmx-table th, .covmx-table td {
  text-align: left; padding: 7px 10px;
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
.covmx-table thead th {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted); background: var(--bg-surface-2);
  position: sticky; top: 0;
}
.covmx-fw-cell {
  font-weight: 700; color: var(--text-primary); white-space: nowrap;
}
.covmx-fw-cell[data-first="1"] { border-top: 2px solid var(--border-strong); }
.covmx-cat { color: var(--text-primary); }
.covmx-state {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: 4px; border: 1px solid var(--border);
  font-size: 11px; white-space: nowrap;
}
/* Colour is redundant with the icon+label; state also drives a subtle bg/border. */
.covmx-state[data-state="covered"]      { color: var(--sev-low);     border-color: var(--sev-low); }
.covmx-state[data-state="partial"]      { color: var(--sev-medium);  border-color: var(--sev-medium); }
.covmx-state[data-state="gap"]          { color: var(--sev-high);    border-color: var(--sev-high); }
.covmx-state[data-state="not_observed"] { color: var(--text-muted);  border-color: var(--border-strong); }
.covmx-row[data-state="gap"] .covmx-cat { font-weight: 600; }
.covmx-totals {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}
.covmx-total-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 4px;
  padding: 3px 8px; background: var(--bg-surface-2);
}
.covmx-total-n { font-weight: 700; color: var(--text-primary); }
@media (max-width: 560px) {
  .covmx-table { font-size: 11px; }
  .covmx-table th, .covmx-table td { padding: 6px 7px; }
}
/* Print: keep icons/labels, drop sticky header + surface fills so B/W stays legible. */
@media print {
  .covmx-scroll { overflow: visible; }
  .covmx-table thead th { position: static; background: transparent; }
  .covmx-state, .covmx-legend-item, .covmx-total-chip { background: transparent; }
  .covmx-state { border-color: #000 !important; color: #000 !important; }
  .covmx-icon { color: #000 !important; }
}

.scenario-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  margin-top: 10px;
  background: var(--bg-surface-2);
}
.scenario-card .sc-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.scenario-card .sc-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.scenario-card .sc-confidence {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.scenario-card .sc-confidence .sc-c-val {
  color: var(--accent-primary-strong);
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
}
.scenario-card .sc-body {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 8px;
}
.scenario-card dl.sc-meta {
  display: grid;
  grid-template-columns: 120px 1fr;
  row-gap: 4px;
  column-gap: 12px;
  font-size: 11px;
  margin: 0;
}
.scenario-card dl.sc-meta dt {
  color: var(--text-faint);
  font-weight: 600;
}
.scenario-card dl.sc-meta dd {
  margin: 0;
  color: var(--text-primary);
}
.scenario-card .sc-phase-chip {
  display: inline-block;
  padding: 2px 6px;
  margin-right: 4px;
  margin-bottom: 3px;
  border-radius: 3px;
  border: 1px solid var(--border);
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-surface-1);
}

/* ==================== §49.17: Executive Summary + Drawer ==================== */
.exec-summary {
  /* §49.36 QA (mobile): establish a block formatting context so no descendant
     margin / float can escape the box. This guarantees .exec-summary always
     occupies its full content height and its inner elements (.exec-score-tier,
     .text-faint, …) can never spill below the box and overlap the following
     .drawer-container, which on 320–390px was intercepting the pointer events
     that open a drawer (e.g. the coverage matrix). Visually neutral on desktop. */
  display: flow-root;
  position: relative;
  z-index: 0;
  margin: 16px 0 20px;
  padding: 18px 20px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--bg-surface-1) 0%, var(--bg-surface-0) 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  min-width: 0;
  max-width: 100%;
}
.exec-header {
  margin-bottom: 14px;
}
.exec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.exec-card {
  padding: 14px 14px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface-2);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 130px;
}
.exec-card-primary {
  border-left: 3px solid var(--exec-accent, var(--accent-primary-strong));
}
.exec-card-wide {
  grid-column: span 2;
}
.exec-card-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.exec-card-hint {
  margin-top: auto;
  font-size: 10px;
  color: var(--text-faint);
  line-height: 1.4;
}
.exec-score-value {
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.exec-score-tier {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.exec-pd-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 4px;
}
.exec-pd-band {
  font-size: 11px;
  color: var(--text-primary);
  font-weight: 500;
}
.exec-risk-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.exec-risk-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px;
  align-items: baseline;
  font-size: 12px;
  line-height: 1.45;
}
.exec-risk-text {
  color: var(--text-primary);
}
.exec-financial-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.exec-financial-item {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.exec-financial-item:last-child {
  border-bottom: none;
}
.exec-fin-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}
.exec-fin-name {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 600;
}
.exec-fin-confidence {
  font-size: 11px;
  color: var(--accent-primary-strong);
  font-weight: 600;
}
.exec-fin-impact {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}
.exec-evidence-strip {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-surface-2);
}
.exec-evidence-title {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 3px;
}
.exec-evidence-body {
  font-size: 11px;
  color: var(--text-primary);
  line-height: 1.5;
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, monospace);
}
.exec-drawer-hint {
  margin-top: 12px;
  padding: 8px 10px;
  font-size: 10px;
  color: var(--text-faint);
  text-align: center;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}

@media (max-width: 900px) {
  .exec-grid {
    grid-template-columns: 1fr 1fr;
  }
  .exec-card-wide {
    grid-column: span 2;
  }
  .exec-score-value { font-size: 36px; }
  .exec-pd-value { font-size: 24px; }
}
@media (max-width: 560px) {
  .exec-grid {
    grid-template-columns: 1fr;
  }
  .exec-card-wide {
    grid-column: span 1;
  }
}

/* Drawer sections (collapsible) */
.drawer-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* §49.36 QA: keep the drawers on a paint layer above the preceding
     .exec-summary (z-index:0) so a drawer <summary> always wins hit-testing and
     stays clickable/tappable even if adjacent content ever overflows. */
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
}
.drawer-section { min-width: 0; max-width: 100%; }
.drawer-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface-1);
  overflow: hidden;
}
.drawer-section[open] {
  background: var(--bg-surface-0);
}
.drawer-summary {
  list-style: none;
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background 120ms ease;
}
.drawer-summary::-webkit-details-marker {
  display: none;
}
.drawer-summary:hover {
  background: var(--bg-surface-2);
}
.drawer-summary-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}
/* §49.30 (c): drawer summary 内に label + badge を並べる */
.drawer-summary {
  gap: 12px;
}
.drawer-summary-label + .drawer-summary-badge {
  margin-right: auto;
}
.drawer-summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent-primary, #4F98A3);
  background: rgba(79, 152, 163, 0.10);
  border: 1px solid rgba(79, 152, 163, 0.32);
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.4;
}
.drawer-summary-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary, #4F98A3);
  box-shadow: 0 0 0 3px rgba(79, 152, 163, 0.15);
}
@media (max-width: 640px) {
  .drawer-summary-badge span:not(.drawer-summary-badge-dot) {
    display: none;
  }
  .drawer-summary-badge {
    padding: 4px;
  }
}
.drawer-summary-chev {
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted);
  transform: rotate(-45deg);
  transition: transform 180ms ease;
  margin-right: 4px;
}
.drawer-section[open] .drawer-summary-chev {
  transform: rotate(45deg);
}
.drawer-section > *:not(summary) {
  padding: 4px 16px 16px;
  min-width: 0;
}

/* ==================== §49.17 Phase B: Financial Context Switcher ==================== */
.fin-ctx {
  margin: 12px 0 14px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.fin-ctx-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.fin-ctx-label .label-caps {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.fin-ctx-hint {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 3px;
  line-height: 1.4;
}
.fin-ctx-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fin-ctx-tab {
  flex: 1 1 auto;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 140ms ease;
  white-space: nowrap;
  text-align: center;
  letter-spacing: 0.01em;
}
.fin-ctx-tab:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-surface-2);
}
.fin-ctx-tab.is-active {
  color: var(--bg-primary);
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  font-weight: 600;
}
.fin-ctx-tab.is-active:hover {
  background: var(--accent-primary-strong);
  border-color: var(--accent-primary-strong);
  color: var(--bg-primary);
}

/* Executive card sublabel (UC-aware role text under primary label) */
.exec-card-sublabel {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-top: 3px;
  margin-bottom: 4px;
  line-height: 1.35;
  font-weight: 500;
}

/* Financial context action panel */
.fin-action-panel {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.fin-action-title {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}
.fin-action-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fin-action-item {
  flex: 1 1 auto;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-primary-strong);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  cursor: pointer;
  transition: all 140ms ease;
  text-align: center;
  line-height: 1.35;
  min-width: 0;
}
.fin-action-item:hover {
  color: var(--bg-primary);
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* Financial context KPI strip */
.fin-kpi-strip {
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.fin-kpi-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.fin-kpi-label {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.fin-kpi-value {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .fin-ctx-tab {
    flex: 1 1 calc(50% - 3px);
    font-size: 11px;
    padding: 7px 10px;
  }
  .fin-action-list {
    flex-direction: column;
  }
  .fin-action-item {
    flex: 1 1 auto;
    width: 100%;
  }
  .fin-kpi-strip {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* ============================================================
   §49.18: Dual-axis (Technical / Organizational) tier badges
   4 discrete tiers surfaced everywhere the overall score appears.
   Design: two horizontally stacked chips, each with a colored dot
   + label + score. Uses existing --score-good/fair/poor/bad tokens.
   ============================================================ */
.axis-badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 4px;
}
.axis-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}
.axis-badge-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25) inset;
}
.axis-badge-dot[data-tier="good"] { background: var(--score-good); }
.axis-badge-dot[data-tier="fair"] { background: var(--score-fair); }
.axis-badge-dot[data-tier="poor"] { background: var(--score-poor); }
.axis-badge-dot[data-tier="bad"]  { background: var(--score-bad);  }

.axis-badge-label {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #B8DDF0);
  text-transform: uppercase;
  font-weight: 600;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.axis-badge-score {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.axis-badge-score[data-tier="good"] { color: var(--score-good); }
.axis-badge-score[data-tier="fair"] { color: var(--score-fair); }
.axis-badge-score[data-tier="poor"] { color: var(--score-poor); }
.axis-badge-score[data-tier="bad"]  { color: var(--score-bad);  }

/* Compact variant for table cells / inline lists */
.axis-badges-inline {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.axis-badge-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #B8DDF0);
}
.axis-badge-mini .axis-badge-dot {
  width: 8px;
  height: 8px;
}
.axis-badge-mini .axis-badge-mini-score {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 11px;
}
.axis-badge-mini .axis-badge-mini-score[data-tier="good"] { color: var(--score-good); }
.axis-badge-mini .axis-badge-mini-score[data-tier="fair"] { color: var(--score-fair); }
.axis-badge-mini .axis-badge-mini-score[data-tier="poor"] { color: var(--score-poor); }
.axis-badge-mini .axis-badge-mini-score[data-tier="bad"]  { color: var(--score-bad);  }

/* Legend chip variant used in section headers */
.axis-legend-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--text-tertiary, #8FB3C7);
  letter-spacing: 0.03em;
}
.axis-legend-hint .axis-badge-dot { width: 7px; height: 7px; }

/* Mobile: single column stack */
@media (max-width: 480px) {
  .axis-badges { grid-template-columns: 1fr; }
  .axis-badge-label { font-size: 9px; }
}

/* ================================================================
   §49.31 Phase A: Sparkline + Delta ring + News feed
   ================================================================ */

/* Portal body: tile grid + news sidebar layout */
.portal-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}
.portal-body.news-collapsed {
  grid-template-columns: 1fr 56px;
}
@media (max-width: 1100px) {
  .portal-body,
  .portal-body.news-collapsed {
    grid-template-columns: 1fr;
  }
}

/* Tile delta ring — outer glow based on 24h delta */
.tile[data-ring="ring-cool"] {
  box-shadow: 0 0 0 1px rgba(79, 152, 163, 0.55), 0 0 14px rgba(79, 152, 163, 0.32);
}
.tile[data-ring="ring-warm"] {
  box-shadow: 0 0 0 1px rgba(187, 101, 59, 0.55), 0 0 14px rgba(187, 101, 59, 0.32);
}
.tile[data-ring="ring-hot"] {
  box-shadow: 0 0 0 1px rgba(209, 99, 167, 0.60), 0 0 18px rgba(209, 99, 167, 0.42);
  animation: tile-pulse 2.6s ease-in-out infinite;
}
@keyframes tile-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(209, 99, 167, 0.55), 0 0 14px rgba(209, 99, 167, 0.30); }
  50%      { box-shadow: 0 0 0 2px rgba(209, 99, 167, 0.75), 0 0 22px rgba(209, 99, 167, 0.55); }
}

/* Tile sparkline */
.tile-trend {
  margin: 8px 12px 6px;
  padding: 8px 10px;
  background: rgba(15, 14, 12, 0.62);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tile-trend-svg {
  width: 100%;
  height: 26px;
  display: block;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.4));
}
.tile-trend-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(205, 204, 202, 0.75);
}
.tile-trend-label {
  text-transform: none;
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 9px;
  color: rgba(205, 204, 202, 0.7);
  line-height: 1.35;
  max-width: 70%;
}
.tile-delta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(28, 27, 25, 0.85);
  color: #CDCCCA;
  border: 1px solid rgba(255, 255, 255, 0.10);
}
.tile-delta-pill[data-delta-class="ring-cool"] {
  background: rgba(15, 60, 24, 0.85);
  color: #A8D387;
  border-color: rgba(109, 170, 69, 0.45);
}
.tile-delta-pill[data-delta-class="ring-warm"] {
  background: rgba(70, 34, 12, 0.85);
  color: #FAC490;
  border-color: rgba(187, 101, 59, 0.55);
}
.tile-delta-pill[data-delta-class="ring-hot"] {
  background: rgba(76, 20, 55, 0.90);
  color: #F5B4D7;
  border-color: rgba(209, 99, 167, 0.55);
}
.tile-delta-tag {
  font-family: var(--sans, inherit);
  font-weight: 600;
}

/* News feed sidebar */
.news-feed-sidebar {
  background: rgba(28, 27, 25, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 14px 14px 6px;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.news-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.news-feed-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.news-feed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6DAA45;
  box-shadow: 0 0 6px rgba(109, 170, 69, 0.7);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}
.news-feed-title-main {
  font-size: 12px;
  font-weight: 600;
  color: #CDCCCA;
  letter-spacing: 0.02em;
}
.news-feed-title-sub {
  font-size: 10px;
  color: rgba(205, 204, 202, 0.5);
  font-family: var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}
.news-feed-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(205, 204, 202, 0.75);
  width: 22px;
  height: 22px;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.news-feed-toggle:hover {
  background: rgba(79, 152, 163, 0.12);
  color: #79C5D4;
}
.news-feed-body {
  padding-top: 6px;
}
.news-feed-empty {
  padding: 12px 4px;
  color: rgba(205, 204, 202, 0.45);
  font-size: 11px;
  font-style: italic;
}
.news-feed-item {
  padding: 8px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.news-feed-item:last-child {
  border-bottom: none;
}
.news-feed-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.news-feed-source-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.news-feed-item[data-source="kev"] .news-feed-source-tag {
  background: rgba(161, 53, 68, 0.25); color: #E4899A;
}
.news-feed-item[data-source="epss"] .news-feed-source-tag {
  background: rgba(0, 100, 148, 0.30); color: #7DB8DA;
}
.news-feed-item[data-source="abusech"] .news-feed-source-tag {
  background: rgba(187, 101, 59, 0.28); color: #E5AE84;
}
.news-feed-time {
  font-size: 9px;
  color: rgba(205, 204, 202, 0.4);
}
.news-feed-headline {
  font-size: 11px;
  line-height: 1.5;
  color: #CDCCCA;
}
.news-feed-item[data-severity="high"] .news-feed-headline {
  color: #F0A0CE;
}
.news-feed-item[data-severity="medium"] .news-feed-headline {
  color: #E5AE84;
}

/* ================================================================
   §49.31 Fable5 掟2: Provenance chip
   ================================================================ */
.provenance-chip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%;
  gap: 6px;
  margin-top: 6px;
  padding: 3px 10px;
  background: rgba(28, 27, 25, 0.75);
  border: 1px solid rgba(79, 152, 163, 0.32);
  border-radius: 12px;
  font-size: 10px;
  color: rgba(205, 204, 202, 0.85);
  cursor: pointer;
  font-family: var(--sans, inherit);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.provenance-chip:hover {
  background: rgba(79, 152, 163, 0.10);
  border-color: rgba(79, 152, 163, 0.55);
}
.provenance-chip[data-drift="stale"],
.provenance-chip[data-drift="ahead"] {
  border-color: rgba(232, 175, 52, 0.55);
}
.provenance-chip[data-drift="outdated"] {
  border-color: rgba(209, 99, 167, 0.65);
  background: rgba(209, 99, 167, 0.08);
}
.prov-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6DAA45;
  box-shadow: 0 0 4px rgba(109, 170, 69, 0.6);
}
.provenance-chip[data-drift="stale"] .prov-chip-dot,
.provenance-chip[data-drift="ahead"] .prov-chip-dot {
  background: #E8AF34;
  box-shadow: 0 0 4px rgba(232, 175, 52, 0.6);
}
.provenance-chip[data-drift="outdated"] .prov-chip-dot {
  background: #D163A7;
  box-shadow: 0 0 4px rgba(209, 99, 167, 0.6);
}
.prov-chip-label {
  text-transform: uppercase;
  font-family: var(--mono, monospace);
  letter-spacing: 0.08em;
  font-weight: 600;
  color: rgba(205, 204, 202, 0.6);
  font-size: 9px;
}
.prov-chip-sep {
  color: rgba(205, 204, 202, 0.30);
}
.prov-chip-drift-badge {
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-left: 4px;
}
.prov-chip-drift-badge[data-drift="stale"] { background: rgba(232, 175, 52, 0.22); color: #E8AF34; }
.prov-chip-drift-badge[data-drift="ahead"] { background: rgba(0, 100, 148, 0.28); color: #7DB8DA; }
.prov-chip-drift-badge[data-drift="outdated"] { background: rgba(209, 99, 167, 0.28); color: #F0A0CE; }
.prov-chip-drift-badge[data-drift="minor"] { background: rgba(205, 204, 202, 0.15); color: #CDCCCA; }

/* Provenance drawer */
.prov-drawer {
  background: #1C1B19;
  border: 1px solid rgba(79, 152, 163, 0.30);
  border-radius: 10px;
  max-width: 720px;
  width: 100%;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}
.prov-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 14px;
  margin-bottom: 18px;
}
.prov-drawer-header h2 {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 600;
  color: #CDCCCA;
}
.prov-drawer-section {
  margin-bottom: 20px;
}
.prov-drawer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 8px;
}
.prov-drawer-table th {
  text-align: left;
  padding: 6px 10px;
  color: rgba(205, 204, 202, 0.55);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.prov-drawer-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: #CDCCCA;
}
.prov-drift-list,
.prov-migration-list,
.prov-changelog-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}
.prov-drift-list li {
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  color: #CDCCCA;
}
.prov-drift-list li[data-drift="outdated"] { background: rgba(209, 99, 167, 0.08); }
.prov-drift-list li[data-drift="stale"] { background: rgba(232, 175, 52, 0.08); }
.prov-migration-list li {
  padding: 6px 10px;
  background: rgba(79, 152, 163, 0.08);
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 11px;
  color: #79C5D4;
}
.prov-changelog-list li {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.prov-changelog-list li:last-child { border-bottom: none; }
.prov-changelog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 11px;
}
.prov-changelog-body {
  font-size: 12px;
  color: rgba(205, 204, 202, 0.75);
  line-height: 1.5;
}

/* ============================================================
 * §49.32 Cyber Risk Derivative — Honest Sparkline, scale
 * selector, Bloomberg-style pulse alerts, and portfolio toast.
 * ============================================================ */

/* --- Scale selector (segmented control on each tile) --- */
.tile-scale-selector {
  display: flex;
  gap: 2px;
  margin-top: 6px;
  padding: 2px;
  border-radius: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.03em;
  overflow-x: auto;
  scrollbar-width: none;
}
.tile-scale-selector::-webkit-scrollbar { display: none; }
.tile-scale-chip {
  flex: 1 0 auto;
  min-width: 32px;
  padding: 3px 4px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background 120ms ease, color 120ms ease;
  white-space: nowrap;
}
.tile-scale-chip:hover:not([disabled]) {
  background: rgba(79,152,163,0.12);
  color: var(--text);
}
.tile-scale-chip[data-active="true"] {
  background: rgba(79,152,163,0.28);
  color: #E6F4F6;
  font-weight: 600;
}
.tile-scale-chip[data-locked="true"] {
  color: rgba(122,121,116,0.35);
  cursor: not-allowed;
  opacity: 0.55;
}
.tile-scale-chip[data-locked="true"]:hover {
  background: transparent;
  color: rgba(122,121,116,0.35);
}
.tile-scale-chip:focus-visible {
  outline: 2px solid var(--accent-primary, #4F98A3);
  outline-offset: 1px;
}

/* --- Alert level ring classes (extend §49.31 delta pill) --- */
.tile-delta-pill[data-delta-class="ring-notice"] {
  background: rgba(187,101,59,0.14);
  color: #E8AF8F;
  border-color: rgba(187,101,59,0.4);
}
.tile-delta-pill[data-delta-class="ring-warning"] {
  background: rgba(218,113,1,0.18);
  color: #FDAB43;
  border-color: rgba(218,113,1,0.5);
}
.tile-delta-pill[data-delta-class="ring-critical"] {
  background: rgba(161,44,123,0.22);
  color: #F5B4DA;
  border-color: rgba(161,44,123,0.55);
  font-weight: 700;
}

/* --- Tile-level pulse animation (Bloomberg-style, 3-tier) --- */
@keyframes cip-pulse-notice {
  0%, 100% { box-shadow: 0 0 0 0 rgba(187,101,59,0.0); }
  50%      { box-shadow: 0 0 0 3px rgba(187,101,59,0.35), 0 0 12px 2px rgba(187,101,59,0.18); }
}
@keyframes cip-pulse-warning {
  0%, 100% { box-shadow: 0 0 0 0 rgba(218,113,1,0.0); border-color: var(--border); }
  50%      { box-shadow: 0 0 0 3px rgba(218,113,1,0.55), 0 0 16px 4px rgba(218,113,1,0.35); border-color: rgba(218,113,1,0.8); }
}
@keyframes cip-pulse-critical {
  0%, 100% { box-shadow: 0 0 0 0 rgba(161,44,123,0.0); border-color: var(--border); }
  50%      { box-shadow: 0 0 0 4px rgba(161,44,123,0.75), 0 0 24px 6px rgba(161,44,123,0.55); border-color: rgba(161,44,123,0.95); }
}

.tile[data-alert-level="notice"] {
  animation: cip-pulse-notice 2s ease-in-out infinite;
}
.tile[data-alert-level="warning"] {
  animation: cip-pulse-warning 1s ease-in-out infinite;
}
.tile[data-alert-level="critical"] {
  animation: cip-pulse-critical 0.5s ease-in-out infinite;
}

/* Respect prefers-reduced-motion — never pulse, use static badge instead */
@media (prefers-reduced-motion: reduce) {
  .tile[data-alert-level="notice"],
  .tile[data-alert-level="warning"],
  .tile[data-alert-level="critical"] {
    animation: none;
  }
  .tile[data-alert-level="notice"]  { box-shadow: 0 0 0 1px rgba(187,101,59,0.55); }
  .tile[data-alert-level="warning"] { box-shadow: 0 0 0 2px rgba(218,113,1,0.65); }
  .tile[data-alert-level="critical"]{ box-shadow: 0 0 0 3px rgba(161,44,123,0.85); }
}

/* --- Alert toast (portfolio-wide, Bloomberg-style top banner) --- */
.alert-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 16px;
  padding: 12px 16px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(24,20,22,0.85), rgba(20,18,20,0.85));
  border: 1px solid rgba(218,113,1,0.35);
  color: var(--text);
  font-size: 12px;
}
.alert-toast[data-level="warning"] {
  border-color: rgba(218,113,1,0.55);
  animation: cip-pulse-warning 1.2s ease-in-out infinite;
}
.alert-toast[data-level="critical"] {
  border-color: rgba(161,44,123,0.75);
  animation: cip-pulse-critical 0.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .alert-toast { animation: none; }
}
.alert-toast-icon {
  flex: 0 0 auto;
  color: #FDAB43;
}
.alert-toast[data-level="critical"] .alert-toast-icon {
  color: #F5B4DA;
}
.alert-toast-body { flex: 1; min-width: 0; }
.alert-toast-title {
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 11px;
  color: #FDAB43;
  margin-bottom: 2px;
}
.alert-toast[data-level="critical"] .alert-toast-title {
  color: #F5B4DA;
}
.alert-toast-detail {
  font-size: 12px;
  color: var(--text);
  margin-bottom: 4px;
}
.alert-toast-entities {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.alert-toast-chip {
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.04);
}
.alert-toast-chip[data-level="warning"] {
  border-color: rgba(218,113,1,0.5);
  color: #FDAB43;
}
.alert-toast-chip[data-level="critical"] {
  border-color: rgba(161,44,123,0.6);
  color: #F5B4DA;
}
.alert-toast-dismiss {
  flex: 0 0 auto;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 3px;
}
.alert-toast-dismiss:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.alert-toast-dismiss:focus-visible { outline: 2px solid var(--accent-primary, #4F98A3); }

/* --- Observation badge text (replaces "30-day trend") --- */
.tile-trend-label {
  /* observation badge is longer than the old "30日推移" label; wrap gracefully */
  white-space: normal;
  line-height: 1.3;
  font-size: 10px;
  color: var(--text-muted);
}

/* §49.32 mobile refinements for tile-trend + scale selector */
@media (max-width: 640px) {
  .tile-trend { padding: 6px 8px; margin: 6px 8px 4px; }
  .tile-trend-labels {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .tile-trend-label {
    max-width: 100%;
    font-size: 8.5px;
    line-height: 1.35;
  }
  .tile-scale-selector {
    font-size: 8.5px;
  }
  .tile-scale-chip {
    min-width: 28px;
    padding: 2px 3px;
  }
}

/* =========================================================================
 * §49.33 LP + Pricing refactor — professional-tool visual system
 * ========================================================================= */

/* Shared section kicker */
.lp-section-kicker {
  color: var(--accent-primary-strong);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Hero refactor */
.lp-hero-4933 {
  padding-top: 84px;
  padding-bottom: 72px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 900px 400px at 50% 0%, rgba(79, 152, 163, 0.10), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.01) 0%, transparent 60%);
}
.lp-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.lp-pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--score-great);
  box-shadow: 0 0 0 0 rgba(91, 168, 74, 0.6);
  animation: lp-pulse 2s ease-out infinite;
}
@keyframes lp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(91, 168, 74, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(91, 168, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(91, 168, 74, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .lp-pulse-dot { animation: none; }
}
.lp-hero-title-4933 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 7vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.028em;
  margin: 0 auto 20px;
  max-width: 940px;
  white-space: pre-line;
  color: var(--text-primary);
}
.lp-hero-sub-4933 {
  font-size: 20px;
  line-height: 1.5;
  color: var(--text-primary);
  max-width: 720px;
  margin: 0 auto 18px;
  font-weight: 500;
}
.lp-hero-desc-4933 {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 36px;
}

/* Why Now band */
.lp-why-now {
  padding: 72px 32px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-primary) 100%);
}
.lp-why-now-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.lp-why-now-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  color: var(--text-primary);
}
.lp-why-now-body {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.75;
  margin: 0;
}
.lp-why-now-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.lp-metric {
  padding: 22px 20px;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lp-metric-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.lp-metric-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.lp-metric-value-sm {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.4;
}
@media (max-width: 900px) {
  .lp-why-now-inner { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .lp-why-now { padding: 56px 20px; }
  .lp-why-now-metrics { grid-template-columns: 1fr; }
}

/* Features refactor — 3x2 grid */
.lp-features-4933 {
  padding-top: 80px;
  padding-bottom: 20px;
}
.lp-features-4933 h2 {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 38px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 auto 40px;
}
.lp-features-grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}
.lp-feature {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px;
  background: var(--bg-surface);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}
.lp-feature:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  background: var(--bg-surface-2);
}
.lp-feature-new {
  border-color: rgba(79, 152, 163, 0.35);
}
.lp-feature-new::before {
  content: "NEW";
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--accent-primary-strong);
  border: 1px solid var(--accent-primary-strong);
  padding: 2px 6px;
  border-radius: 2px;
  margin-bottom: 12px;
}
.lp-feature-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.lp-feature h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--text-primary);
  margin: 0 0 10px;
  letter-spacing: -0.005em;
}
.lp-feature p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}
@media (max-width: 900px) {
  .lp-features-grid-6 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .lp-features-grid-6 { grid-template-columns: 1fr; padding: 0 20px; }
}

/* Why us comparison table */
.lp-why-us {
  padding: 96px 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
}
.lp-why-us-inner {
  max-width: 1040px;
  margin: 0 auto;
}
.lp-why-us-title {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 38px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 12px;
}
.lp-why-us-intro {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 auto 36px;
  max-width: 640px;
}
.lp-why-us-table-wrap {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-surface);
}
.lp-why-us-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.lp-why-us-table th,
.lp-why-us-table td {
  padding: 16px 20px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}
.lp-why-us-table tr:last-child td { border-bottom: none; }
.lp-why-us-table th {
  background: var(--bg-surface-2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 500;
  text-transform: uppercase;
}
.lp-why-us-table .lp-col-aprio { color: var(--accent-primary-strong); }
.lp-why-us-dim {
  color: var(--text-primary);
  font-weight: 500;
  width: 22%;
}
.lp-why-us-legacy {
  color: var(--text-faint);
  width: 32%;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.lp-why-us-aprio {
  color: var(--text-primary);
  width: 46%;
  font-weight: 500;
}
.lp-why-us-footnote {
  text-align: center;
  color: var(--text-faint);
  font-size: 12px;
  line-height: 1.7;
  margin: 24px auto 0;
  max-width: 720px;
}
@media (max-width: 720px) {
  .lp-why-us-table th,
  .lp-why-us-table td {
    padding: 12px 14px;
    font-size: 12px;
  }
  .lp-why-us-legacy { font-size: 11px; }
  .lp-why-us-dim { width: 30%; }
  .lp-why-us-legacy { width: 32%; }
  .lp-why-us-aprio { width: 38%; }
}

/* Trust & Security — 5 design principles */
.lp-trust {
  padding: 96px 32px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-primary) 100%);
}
.lp-trust-inner {
  max-width: 1120px;
  margin: 0 auto;
}
.lp-trust-title {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 14px;
}
.lp-trust-intro {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 auto 40px;
  max-width: 720px;
}
.lp-trust-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.lp-trust-card {
  padding: 24px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.lp-trust-card:hover {
  border-color: var(--accent-primary);
  background: var(--bg-surface-2);
}
.lp-trust-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent-primary-strong);
}
.lp-trust-card-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin: 0 0 4px;
  line-height: 1.35;
  letter-spacing: -0.005em;
}
.lp-trust-card-desc {
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.7;
  margin: 0;
}
@media (max-width: 1000px) {
  .lp-trust-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .lp-trust { padding: 72px 20px; }
  .lp-trust-grid { grid-template-columns: 1fr; }
}

/* Pricing FAQ accordion */
.pricing-faq {
  padding: 72px 32px 96px;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
}
.pricing-faq-inner {
  max-width: 820px;
  margin: 0 auto;
}
.pricing-faq h2 {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 2.8vw, 32px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 40px;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-summary {
  padding: 22px 8px;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 14.5px;
  transition: color 0.15s ease;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary:hover { color: var(--accent-primary-strong); }
.faq-marker {
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.1em;
  min-width: 24px;
  transition: transform 0.2s ease, color 0.15s ease;
  flex-shrink: 0;
}
.faq-item[open] .faq-marker {
  transform: rotate(45deg);
  color: var(--accent-primary-strong);
}
.faq-answer {
  padding: 0 8px 24px 52px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
}
@media (max-width: 560px) {
  .faq-answer { padding-left: 32px; }
  .faq-summary { font-size: 13.5px; }
}

/* §49.33 Pricing grid — feature matrix additions */
.pricing-scale-badge,
.pricing-trend-badge,
.pricing-alert-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 4px;
  margin-bottom: 3px;
}
.pricing-scale-badge { background: rgba(79,152,163,0.12); color: var(--accent-primary-strong); border: 1px solid rgba(79,152,163,0.3); }
