/* CardKeeper styles */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --border: #d8dee8;
  --text: #1a2330;
  --text-muted: #5a6577;
  --accent: #1f3b5c;
  --accent-2: #2f6aa5;
  --accent-soft: #e1ecf7;
  --good: #1f7a4d;
  --warn: #8a5a00;
  --danger: #a3302b;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(15, 28, 51, 0.06), 0 4px 14px rgba(15, 28, 51, 0.06);
  --max: 1100px;
}

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

a { color: var(--accent-2); }
a:hover { color: var(--accent); }

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

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
}
.brand-mark { display: block; }
.site-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--accent-2); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  padding: 40px 0 24px;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--accent-2);
  font-weight: 700;
  margin: 0 0 8px;
}
.hero h1 {
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 12px;
}
.lede {
  color: var(--text-muted);
  font-size: 16px;
  margin: 0 0 18px;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

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

.hero-card {
  background: linear-gradient(135deg, #1f3b5c 0%, #2f6aa5 100%);
  border-radius: var(--radius);
  padding: 24px;
  color: #fff;
  box-shadow: var(--shadow);
}
.hero-card-inner {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hero-card-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.8; }
.hero-card-title { font-size: 18px; font-weight: 700; }
.hero-card-sub { font-size: 13px; opacity: 0.85; }
.hero-card-tag {
  margin-top: 8px;
  background: rgba(255,255,255,0.18);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  align-self: flex-start;
}

/* Sections */
section { padding: 32px 0; }
.section-intro { color: var(--text-muted); margin-top: 0; }

/* Picker */
.picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 18px;
}
.control-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 0 14px;
  background: var(--surface);
}
.control-group legend {
  font-weight: 700;
  font-size: 13px;
  padding: 0 6px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--accent-2); }
.chip[aria-checked="true"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.inline-inputs {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.inline-inputs label {
  font-size: 13px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.inline-inputs input {
  width: 70px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.save-status {
  font-size: 13px;
  color: var(--good);
  margin: 8px 0 0;
  min-height: 18px;
}

/* Recommendation */
.recommendation {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 80px;
  align-self: start;
}
.rec-header { border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 12px; }
.rec-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-2);
  font-weight: 700;
}
.rec-header h3 { margin: 4px 0 2px; font-size: 20px; }
.rec-sub { margin: 0; color: var(--text-muted); font-size: 14px; }
.rec-block { margin-bottom: 12px; }
.rec-block h4 {
  margin: 0 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.rec-block p { margin: 0; font-size: 14px; }
.rec-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.compare-col {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.compare-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  font-weight: 700;
  margin-bottom: 4px;
}
.compare-col p { margin: 0; font-size: 13px; color: var(--text); }

/* Reference */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ref-table th, .ref-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.ref-table thead th {
  background: var(--surface-2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.ref-table tbody tr:last-child td { border-bottom: none; }

.reference-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}
.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.note h3 { margin: 0 0 8px; font-size: 16px; }
.note ul { margin: 0; padding-left: 18px; }
.note li { margin-bottom: 6px; font-size: 14px; }

/* Checklist */
.checklist-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.checklist-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
}
.check-box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent-2);
  border-radius: 4px;
  margin-top: 2px;
}
.checklist-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface-2);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

/* Why note */
.why-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.why-note h2 { margin-top: 0; }
.last-updated {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Footer */
.site-footer {
  margin-top: 40px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-inner nav { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-inner a { color: var(--text-muted); text-decoration: none; }
.footer-inner a:hover { color: var(--accent); }

/* Print */
@media print {
  .site-header, .site-footer, .hero-actions, .picker-controls, .control-actions, .save-status { display: none; }
  .picker-grid { grid-template-columns: 1fr; }
  .recommendation { position: static; box-shadow: none; }
  body { background: #fff; }
}

/* Responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .picker-grid { grid-template-columns: 1fr; }
  .recommendation { position: static; }
  .reference-notes { grid-template-columns: 1fr; }
  .rec-compare { grid-template-columns: 1fr; }
  .hero h1 { font-size: 28px; }
}
@media (max-width: 560px) {
  .header-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
  .site-nav { gap: 12px; }
  .hero { padding-top: 24px; }
  .hero h1 { font-size: 24px; }
  .inline-inputs { flex-direction: column; }
}



/* 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;
}
