:root {
  --bg: #fff7e8;
  --bg-2: #fffdf8;
  --surface: #ffffff;
  --surface-2: #f5f8ff;
  --text: #26313a;
  --muted: #5f6d78;
  --accent: #2855d9;
  --accent-dark: #1f47bd;
  --accent-2: #f26a3d;
  --blue-soft: #dde7ff;
  --orange-soft: #ffe1d5;
  --line: rgba(40, 85, 217, .14);
  --line-strong: rgba(40, 85, 217, .28);
  --shadow: 0 24px 70px rgba(52, 72, 108, .12);
  --radius-lg: 20px;
  --radius-md: 14px;
  --display: Manrope, system-ui, sans-serif;
  --body: "Source Sans 3", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--text); font: 400 1rem/1.55 var(--body); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid rgba(242, 106, 61, .9); outline-offset: 3px; }

.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; padding: 0 max(1.25rem, calc((100vw - 1160px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255, 247, 232, .9); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: .12rem; color: var(--text); font: 800 1.06rem/1 var(--display); letter-spacing: -.045em; white-space: nowrap; }
.brand img { width: 36px; height: 36px; margin-right: .5rem; }
.brand span { color: var(--accent); }
.brand-link { color: var(--accent); font: 700 .92rem/1 var(--display); }

.hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(290px, .76fr); align-items: center; gap: clamp(2.5rem, 6vw, 5.5rem); width: min(1160px, calc(100% - 32px)); margin: auto; padding: clamp(4.5rem, 10vw, 8.5rem) 0; }
.eyebrow, .source-id, .query-label, .query-note { margin: 0; color: var(--accent); font: 800 .74rem/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); }
h1 { max-width: 750px; margin-bottom: 1.35rem; font-size: clamp(2.75rem, 5.8vw, 4.75rem); line-height: 1.03; letter-spacing: -.068em; }
h2 { max-width: 790px; margin-bottom: 0; font-size: clamp(1.9rem, 3.5vw, 3rem); line-height: 1.08; letter-spacing: -.055em; }
.hero .eyebrow { margin-bottom: 1.05rem; }
.intro { max-width: 570px; margin-bottom: 1.7rem; color: var(--muted); font-size: 1.12rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 1.2rem; border: 1px solid #e45d32; border-radius: var(--radius-md); background: var(--accent-2); color: #20262e; box-shadow: 0 14px 24px rgba(242, 106, 61, .2); font: 800 .92rem/1 var(--display); transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.button:hover { background: #ff7c52; color: #20262e; box-shadow: 0 18px 30px rgba(242, 106, 61, .26); transform: translateY(-2px); }

.query-window { position: relative; overflow: hidden; padding: 1.4rem; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.query-window::before { position: absolute; top: 0; right: 0; left: 0; height: 6px; background: var(--accent); content: ""; }
.window-bar { display: flex; align-items: center; gap: .38rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); color: var(--muted); font: 600 .72rem/1 var(--display); }.window-bar span { width: .5rem; height: .5rem; border-radius: 50%; background: var(--orange-soft); }.window-bar span:nth-child(2) { background: var(--blue-soft); }.window-bar span:nth-child(3) { background: #dce7d8; }.window-bar b { margin-left: .4rem; font-weight: 700; }
.query-label { margin-top: 3.7rem; }.query { margin: .75rem 0 1.6rem; font: 700 clamp(1.25rem, 2.1vw, 1.75rem)/1.32 var(--display); letter-spacing: -.035em; }.query-line { height: 1px; background: var(--line); }.query-note { margin-top: .8rem; color: var(--muted); font-size: .68rem; }

.manifesto { display: grid; grid-template-columns: .86fr 1.14fr; gap: clamp(2.5rem, 8vw, 7rem); padding: clamp(4.5rem, 9vw, 7.5rem) max(1.25rem, calc((100vw - 1160px) / 2)); background: var(--blue-soft); }
.manifesto .eyebrow { margin-bottom: 1rem; }.steps { list-style: none; margin: 0; padding: 0; }.steps li { display: grid; grid-template-columns: 3rem 1fr; column-gap: 1rem; padding: 1.3rem 0; border-top: 1px solid var(--line-strong); }.steps li:last-child { border-bottom: 1px solid var(--line-strong); }.steps span { grid-row: span 2; color: var(--accent); font: 800 .76rem/1.2 var(--display); }.steps strong { font: 800 1.18rem/1.25 var(--display); letter-spacing: -.025em; }.steps p { grid-column: 2; margin: .42rem 0 0; color: var(--muted); }

.sources { width: min(1160px, calc(100% - 32px)); margin: auto; padding: clamp(4.5rem, 9vw, 7.5rem) 0; }.sources .eyebrow { margin-bottom: 1rem; }.source-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 3rem; }.source-grid article { min-height: 250px; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }.source-grid article:nth-child(2) { background: var(--surface-2); }.source-grid article:nth-child(3) { background: #fffaf6; }.source-id { font-size: .68rem; }.source-grid h3 { margin: 2.8rem 0 .65rem; font-size: 1.35rem; line-height: 1.15; letter-spacing: -.045em; }.source-grid p:last-child, .status > p { margin-bottom: 0; color: var(--muted); }

.status { display: grid; grid-template-columns: 1.1fr .7fr; gap: clamp(2rem, 7vw, 6rem); width: min(1160px, calc(100% - 32px)); margin: 0 auto clamp(4.5rem, 9vw, 7.5rem); padding: clamp(2.2rem, 5vw, 4rem); border-radius: var(--radius-lg); background: var(--accent); color: #fff; }.status .eyebrow { color: #dfe8ff; }.status h2 { color: #fff; }.status > p { align-self: end; color: #e6edff; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem max(1.25rem, calc((100vw - 1160px) / 2)); border-top: 1px solid var(--line); background: var(--bg-2); } footer p { margin: 0; color: var(--muted); font-size: .88rem; }

input, button { font: inherit; }
input { width: 100%; min-height: 50px; padding: 0 .95rem; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--text); transition: border-color .2s ease, box-shadow .2s ease; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(40, 85, 217, .1); outline: 0; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
.login-page { min-height: 100vh; }
.login-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr); min-height: 100vh; }
.login-intro { display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: clamp(2rem, 5vw, 5rem); background: var(--blue-soft); }
.login-intro > div { max-width: 580px; }
.login-intro h1 { margin: 1rem 0 1.25rem; font-size: clamp(2.8rem, 5.6vw, 5.4rem); }
.login-intro p:not(.eyebrow) { max-width: 520px; color: var(--muted); font-size: 1.12rem; }
.login-intro small { color: var(--muted); }
.login-panel { display: grid; place-items: center; padding: 2rem; background: var(--bg); }
.login-card { width: min(430px, 100%); padding: clamp(1.75rem, 4vw, 2.8rem); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.login-card h2 { margin: .75rem 0 .5rem; }
.form-note { color: var(--muted); }
.form-error { padding: .75rem; border-radius: 10px; background: #fff0eb; color: #9e3216; font-weight: 700; }
.auth-form { display: grid; gap: .65rem; margin-top: 1.5rem; }
.auth-form label, .search-form > label:not(.check), .location-fields label { color: #43515c; font: 700 .84rem/1 var(--display); }
.auth-form input { margin-bottom: .55rem; }
.auth-form .button { width: 100%; margin-top: .5rem; }
.back-link { display: block; margin-top: 1.25rem; color: var(--muted); text-align: center; text-decoration: underline; text-underline-offset: .2rem; }

.dashboard-page { min-height: 100vh; background: var(--bg-2); }
.dashboard-header form { margin: 0; }
.link-button { padding: .55rem .8rem; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--accent); font: 700 .88rem/1 var(--display); }
.app-shell { display: grid; grid-template-columns: minmax(300px, 430px) minmax(0, 1fr); min-height: calc(100vh - 76px); }
.search-panel { padding: clamp(2rem, 4vw, 4rem) clamp(1.25rem, 4vw, 3.5rem); border-right: 1px solid var(--line); background: var(--bg); }
.search-panel h1 { margin: .85rem 0 1rem; font-size: clamp(2.25rem, 4vw, 3.8rem); }
.search-form { display: grid; gap: .72rem; margin-top: 2rem; }
.location-fields { display: grid; grid-template-columns: 1fr 84px; gap: .75rem; }
.location-fields > div { display: grid; gap: .72rem; }
.check { display: flex; align-items: flex-start; gap: .7rem; margin: .6rem 0; color: var(--muted); line-height: 1.35; }
.check input { width: 18px; min-height: 18px; margin-top: .05rem; accent-color: var(--accent); }
.search-form .button { width: 100%; }
.data-note { margin: 1rem 0 0; color: var(--muted); font-size: .82rem; }
.results-panel { padding: clamp(2rem, 5vw, 4.5rem); background: var(--surface-2); }
.empty-state { display: grid; place-content: center; min-height: 60vh; max-width: 620px; margin: auto; text-align: center; }
.empty-state h2 { margin: .8rem 0; }
.empty-state p:last-child { color: var(--muted); }
.empty-state.is-busy::after { width: 90px; height: 4px; margin: 1.2rem auto 0; overflow: hidden; border-radius: 99px; background: linear-gradient(90deg, var(--accent) 50%, var(--blue-soft) 50%); background-size: 200% 100%; animation: loading 1s linear infinite; content: ""; }
.results-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.results-heading h2 { margin-top: .65rem; }
.results-heading > span { color: var(--muted); font-size: .85rem; }
.lead { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(360px, 1.2fr); gap: 1.5rem; margin-bottom: .85rem; padding: 1.35rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.lead h3 { margin: .65rem 0 .25rem; font-size: 1.15rem; }
.lead p { margin: 0; color: var(--muted); }
.source-badge { color: var(--accent); font: 800 .64rem/1 var(--display); letter-spacing: .08em; }
.lead dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin: 0; }
.lead dl div { min-width: 0; }
.lead dt { color: var(--muted); font-size: .72rem; text-transform: uppercase; }
.lead dd { margin: .15rem 0 0; overflow-wrap: anywhere; font-weight: 600; }
.lead dd a { color: var(--accent); text-decoration: underline; }
.no-results { padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--muted); }
@keyframes loading { to { background-position: -200% 0; } }
@media (max-width: 720px) { .hero, .manifesto, .status { grid-template-columns: 1fr; }.hero { padding-block: 4.5rem; }.query-window { margin: 0 .5rem; }.source-grid { grid-template-columns: 1fr; }.source-grid article { min-height: auto; }.source-grid h3 { margin-top: 2rem; }.status { margin-bottom: 4.5rem; }.topbar, footer { padding-inline: 1.25rem; } }
@media (max-width: 860px) { .login-layout, .app-shell { grid-template-columns: 1fr; }.login-intro { min-height: auto; gap: 4rem; }.login-panel { min-height: 60vh; }.search-panel { border-right: 0; border-bottom: 1px solid var(--line); }.lead { grid-template-columns: 1fr; }.empty-state { min-height: 35vh; } }
@media (max-width: 520px) { .login-panel { padding: 1rem; }.login-intro { padding: 1.5rem; }.location-fields, .lead dl { grid-template-columns: 1fr; }.results-heading { align-items: flex-start; flex-direction: column; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; }.button { transition: none; }.empty-state.is-busy::after { animation: none; } }
