:root {
  --aok-green: #005e3f;
  --aok-green-dark: #00432d;
  --aok-green-light: #e6f0ec;
  --ink: #1c2b26;
  --muted: #5c6b66;
  --line: #dde5e2;
  --bg: #f6f8f7;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 6px 20px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

.wrap { width: min(820px, 92vw); margin: 0 auto; }

/* Header */
.site-header {
  background: var(--aok-green);
  color: #fff;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  font-weight: 800;
  letter-spacing: 0.5px;
  background: #fff;
  color: var(--aok-green);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 15px;
}
.brand-text { font-weight: 600; font-size: 16px; }
.badge-poc {
  font-size: 12px;
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 10px;
  border-radius: 999px;
}

/* Hero */
.hero { padding: 40px 0 8px; }
.hero h1 { font-size: 28px; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 24px; max-width: 60ch; }

/* Search */
.search { display: flex; gap: 10px; }
.search input {
  flex: 1;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  outline: none;
}
.search input:focus {
  border-color: var(--aok-green);
  box-shadow: 0 0 0 3px var(--aok-green-light);
}
.search button {
  padding: 0 22px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--aok-green);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}
.search button:hover { background: var(--aok-green-dark); }
.search button:disabled { opacity: 0.6; cursor: default; }

/* Example chips */
.examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
}
.chip {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.chip:hover { border-color: var(--aok-green); color: var(--aok-green); }

/* Status */
.status {
  margin: 24px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--aok-green-light);
  color: var(--aok-green-dark);
}
.status.error { background: #fdecec; color: #a12626; }
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(0, 94, 63, 0.3);
  border-top-color: var(--aok-green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -2px;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Answer */
.answer-section, .sources-section { margin-top: 32px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.answer {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--aok-green);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.answer p { margin: 0 0 12px; }
.answer p:last-child { margin-bottom: 0; }
.cite {
  color: var(--aok-green);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.85em;
  vertical-align: super;
}
.cite:hover { text-decoration: underline; }

/* Sources */
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.source-card {
  display: flex;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}
.source-card:target { border-color: var(--aok-green); box-shadow: 0 0 0 3px var(--aok-green-light); }
.source-num {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--aok-green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.source-body { flex: 1; min-width: 0; }
.source-title { font-weight: 600; margin: 0 0 2px; }
.source-crumb { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.source-snippet { color: var(--ink); font-size: 14px; margin: 0 0 12px; }
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--aok-green);
  text-decoration: none;
}
.source-link:hover { text-decoration: underline; }

/* Footer */
.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.site-footer p {
  color: var(--muted);
  font-size: 13px;
  padding: 20px 0;
  margin: 0;
}

@media (max-width: 560px) {
  .search { flex-direction: column; }
  .search button { padding: 12px; }
  .hero h1 { font-size: 23px; }
}
