/* BreachCheck styles */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-alt: #f0f3f9;
  --text: #1a1f2b;
  --text-muted: #5a6477;
  --border: #d8dee9;
  --accent: #3b5bdb;
  --accent-soft: #edf2ff;
  --danger: #c92a2a;
  --danger-soft: #fff5f5;
  --warn: #e67700;
  --warn-soft: #fff9db;
  --ok: #2b8a3e;
  --ok-soft: #ebfbee;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(20,30,60,0.06), 0 6px 18px rgba(20,30,60,0.04);
  --max: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 8px;
}
.brand-text span { color: var(--accent); font-weight: 400; }
.site-nav { display: flex; gap: 20px; }
.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--accent); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  padding: 60px 0 40px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 8px;
}
.hero h1 {
  font-size: 2.4rem;
  line-height: 1.2;
  margin: 0 0 16px;
  font-weight: 700;
}
.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 24px;
  max-width: 540px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stat-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
}
.stat-num {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  background: transparent;
  color: var(--text);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #2f4ac4; }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Sections */
section { margin-bottom: 48px; }
section h2 { font-size: 1.5rem; margin: 0 0 8px; }
.panel-sub { color: var(--text-muted); margin: 0 0 24px; }

/* Assess panel */
.assess-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.exposure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  border: none;
  padding: 0;
  margin: 0 0 24px;
}
.exposure-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}
.exposure-card:hover { border-color: var(--accent); }
.exposure-card input { position: absolute; opacity: 0; pointer-events: none; }
.exposure-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.exposure-card:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--surface-alt);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--accent);
}
.exposure-card:has(input:checked) .card-icon {
  background: var(--accent);
  color: #fff;
}
.card-title { font-weight: 600; font-size: 0.95rem; }
.card-desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* Severity */
.severity-output {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  padding: 20px;
}
.severity-meter {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.severity-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}
.severity-value {
  font-size: 1.2rem;
  font-weight: 700;
}
.severity-value.low { color: var(--ok); }
.severity-value.medium { color: var(--warn); }
.severity-value.high { color: var(--danger); }
.severity-note { margin: 8px 0 0; color: var(--text-muted); font-size: 0.9rem; }

/* Checklist panel */
.checklist-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.checklist-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.progress-bar {
  height: 6px;
  background: var(--surface-alt);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.3s;
}
.progress-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 24px;
}

.phase { margin-bottom: 32px; }
.phase h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  margin: 0 0 12px;
}
.phase-tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
}
.phase[data-phase="hour"] .phase-tag { background: #fff5f5; color: var(--danger); }
.phase[data-phase="day"] .phase-tag { background: var(--warn-soft); color: var(--warn); }
.phase[data-phase="week"] .phase-tag { background: var(--accent-soft); color: var(--accent); }
.phase[data-phase="ongoing"] .phase-tag { background: var(--ok-soft); color: var(--ok); }

.task-list { list-style: none; padding: 0; margin: 0; }
.task-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.task-item:last-child { border-bottom: none; }
.task-check {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s;
}
.task-check:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.task-item.done .task-check {
  background: var(--accent);
  border-color: var(--accent);
}
.task-item.done .task-check::after {
  content: "";
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.task-body { flex: 1; }
.task-title { font-weight: 600; font-size: 0.95rem; }
.task-item.done .task-title { text-decoration: line-through; color: var(--text-muted); }
.task-desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }

/* Timeline */
.timeline-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.timeline-grid { margin-top: 20px; }
.timeline-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.timeline-row:last-child { border-bottom: none; }
.timeline-period {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 2px;
}
.timeline-body h4 { margin: 0 0 4px; font-size: 1rem; }
.timeline-body p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

/* Notes */
.notes-panel { padding: 32px 0; }
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
}
.note-card h3 { margin: 0 0 8px; font-size: 1rem; color: var(--danger); }
.note-card p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

.template {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}
.template summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
}
.template summary::-webkit-details-marker { display: none; }
.template summary::before { content: "+"; margin-right: 8px; color: var(--accent); }
.template[open] summary::before { content: "\2212"; }
.template-body {
  padding: 0 20px 16px;
  font-size: 0.85rem;
  white-space: pre-wrap;
  color: var(--text-muted);
  font-family: "SF Mono", "Fira Code", Menlo, Consolas, monospace;
  line-height: 1.5;
}

/* Supporting content */
.supporting-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.supporting-content h2 { margin-top: 0; }
.supporting-content h3 { font-size: 1.05rem; margin: 24px 0 8px; }
.supporting-content p { color: var(--text-muted); font-size: 0.95rem; }

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: 40px;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.site-footer nav { display: flex; gap: 16px; }
.site-footer nav a { font-size: 0.85rem; color: var(--text-muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent); }

/* Utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  z-index: 200;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Print */
@media print {
  .site-header, .site-footer, .checklist-actions, .hero-actions, .assess-panel { display: none; }
  .checklist-panel { box-shadow: none; border: none; padding: 0; }
  .phase { page-break-inside: avoid; }
  body { font-size: 14px; }
}

/* Responsive */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; padding: 40px 0 24px; }
  .hero h1 { font-size: 1.8rem; }
  .hero-stat { flex-direction: row; flex-wrap: wrap; }
  .stat-block { flex: 1; min-width: 100px; }
  .site-header .container { height: auto; padding: 12px 24px; flex-direction: column; gap: 8px; }
  .site-nav { flex-wrap: wrap; justify-content: center; }
  .exposure-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .timeline-row { grid-template-columns: 1fr; gap: 4px; }
  .checklist-header { flex-direction: column; }
  .notes-grid { grid-template-columns: 1fr; }
  .assess-panel, .checklist-panel, .timeline-panel, .supporting-content { padding: 20px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.5rem; }
  .exposure-grid { grid-template-columns: 1fr 1fr; }
  .btn { padding: 8px 14px; font-size: 0.85rem; }
}



/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
