:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f6f8fb;
  font-synthesis: none;
  --ink: #172033;
  --muted: #657085;
  --line: #dfe5ee;
  --blue: #2457d6;
  --blue-dark: #173eaa;
  --blue-soft: #edf3ff;
  --red: #ad2d31;
  --red-soft: #fff2f1;
  --green: #19724b;
  --white: #fff;
  --shadow: 0 18px 48px rgba(32, 48, 78, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 2%, rgba(61, 104, 221, 0.1), transparent 30rem),
    linear-gradient(180deg, #f9fbfe 0%, #f5f7fb 100%);
}

button, input { font: inherit; }
button { cursor: pointer; }

.site-shell { width: min(100% - 32px, 900px); margin: 0 auto; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 82px;
  border-bottom: 1px solid rgba(202, 211, 226, 0.8);
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(145deg, #3671ee, #204bbf);
  box-shadow: 0 7px 18px rgba(36, 87, 214, 0.24);
  font-weight: 800;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: -0.01em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.status-pill, .scope-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #cbd8f3;
  border-radius: 999px;
  padding: 7px 11px;
  color: #314c80;
  background: rgba(239, 244, 255, 0.88);
  font-size: 12px;
  font-weight: 700;
}
.status-pill span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

main { padding: 62px 0 34px; }
.hero { max-width: 720px; margin-bottom: 27px; }
.eyebrow { margin: 0 0 9px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
h1, h2 { margin: 0; letter-spacing: -0.035em; }
h1 { max-width: 680px; font-size: clamp(37px, 7vw, 62px); line-height: 1.01; }
h2 { font-size: clamp(25px, 4vw, 32px); }
.hero-copy { max-width: 690px; margin: 19px 0 0; color: #536079; font-size: 18px; line-height: 1.58; }

.notice {
  display: flex;
  gap: 13px;
  margin: 20px 0;
  border: 1px solid;
  border-radius: 16px;
  padding: 16px 18px;
}
.notice strong { display: block; margin: 0 0 4px; font-size: 14px; }
.notice p { margin: 0; font-size: 13px; line-height: 1.5; }
.notice-icon { display: grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; border-radius: 50%; font-size: 13px; font-weight: 850; }
.danger-notice { color: #7a292c; border-color: #f0c8c5; background: var(--red-soft); }
.danger-notice .notice-icon { color: white; background: var(--red); }
.safety-notice { color: #294873; border-color: #cfdbef; background: #f1f6ff; }
.safety-notice .notice-icon { color: white; background: #3766bb; }

.assistant-card {
  margin: 26px 0 20px;
  border: 1px solid rgba(210, 219, 232, 0.95);
  border-radius: 24px;
  padding: clamp(21px, 5vw, 38px);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}
.assistant-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 27px; }
.scope-pill { color: #43536d; border-color: #dce2eb; background: #f7f9fc; white-space: nowrap; }

.access-form label, .search-form label { display: block; margin-bottom: 6px; color: var(--ink); font-size: 16px; font-weight: 750; }
.access-form > p, .search-form > p { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.input-row { display: flex; gap: 10px; }
.input-row input {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  border: 1px solid #cbd4e2;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--ink);
  background: white;
  font-size: 16px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.input-row input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(36, 87, 214, 0.12); }
.input-row button {
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  padding: 0 21px;
  color: white;
  background: var(--blue);
  font-weight: 750;
  white-space: nowrap;
  transition: background 120ms ease, transform 120ms ease;
}
.input-row button:hover { background: var(--blue-dark); }
.input-row button:active { transform: translateY(1px); }
.input-row button:disabled { cursor: progress; opacity: 0.62; }
.form-message { margin: 11px 0 0 !important; color: var(--red) !important; font-weight: 650; }
.search-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.text-button { border: 0; padding: 0; color: var(--blue); background: transparent; font-weight: 750; }

.results { margin-top: 25px; }
.results:empty { display: none; }
.results-status { margin: 0; border-radius: 13px; padding: 13px 15px; color: #45536b; background: #f3f6fa; font-size: 13px; line-height: 1.5; }
.results-status.is-error { color: #872f32; background: var(--red-soft); }
.interpretation { margin: 0 0 12px; color: #485875; font-size: 13px; }
.result-card { border-top: 1px solid var(--line); padding: 20px 0; }
.result-card:last-child { padding-bottom: 0; }
.result-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.result-card h3 { margin: 0; font-size: 18px; line-height: 1.25; }
.confidence { flex: 0 0 auto; border-radius: 999px; padding: 5px 8px; color: #43516a; background: #edf1f6; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.result-reason { margin: 8px 0 0; color: #5c687d; font-size: 13px; line-height: 1.5; }
.workflow-steps { margin: 14px 0 0; border-radius: 14px; padding: 14px 16px 14px 37px; background: var(--blue-soft); color: #283e65; }
.workflow-steps li { margin: 0 0 7px; padding-left: 3px; font-size: 13px; line-height: 1.45; }
.workflow-steps li:last-child { margin-bottom: 0; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.result-actions a { border: 1px solid #cbd6e8; border-radius: 10px; padding: 8px 11px; color: #244d9a; background: white; font-size: 12px; font-weight: 750; text-decoration: none; }
.result-actions a:hover { border-color: #8ea8d8; background: #f7faff; }

footer { border-top: 1px solid var(--line); padding: 24px 0 38px; color: #788297; font-size: 11px; line-height: 1.5; }
footer p { margin: 2px 0; }

[hidden] { display: none !important; }

@media (max-width: 640px) {
  .site-shell { width: min(100% - 24px, 900px); }
  .site-header { min-height: 72px; }
  .status-pill { padding: 6px 8px; font-size: 10px; }
  main { padding-top: 42px; }
  .hero-copy { font-size: 16px; }
  .assistant-heading { display: block; }
  .scope-pill { margin-top: 13px; }
  .input-row { display: grid; }
  .input-row button { width: 100%; }
  .result-topline { display: block; }
  .confidence { display: inline-block; margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
