/* Atlas by LodgIQ — the web app. The mockup's look: light, map-like, teal and navy. */
:root {
  --ink: #101828;
  --muted: #4A5565;
  --line: #E3E6EB;
  --line-strong: #D5DAE1;
  --ground: #F5F6F8;
  --surface: #FFFFFF;
  --soft: #FAFBFC;
  --accent: #0B6E69;
  --accent-ink: #084F4B;
  --accent-soft: #E3F1EF;
  --accent-line: #BFE0DC;
  --behind: #B45309;
  --ly: #C3CBD6;
  --dot: #9AA4B2;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Public Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ── buttons ─────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-ink); color: #fff; }
.btn-accent:disabled { opacity: .55; cursor: default; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--ground); }
.btn-icon { width: 44px; padding: 0; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }

/* ── header ──────────────────────────────────────────────────────────── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4vw, 48px); background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); text-decoration: none; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; color: var(--ink); }
.brand-by { color: var(--muted); font-size: 14px; }

/* ── start ───────────────────────────────────────────────────────────── */
.start { max-width: 1240px; margin: 0 auto; padding: clamp(28px, 6vw, 72px) clamp(16px, 4vw, 48px) 0; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.hero { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.pill { margin: 0; align-self: flex-start; font-size: 14px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 6px 12px; border-radius: 999px; }
h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(38px, 5vw, 60px); line-height: 1.05; letter-spacing: -0.02em; }
.lede { margin: 0; font-size: 19px; color: var(--muted); max-width: 560px; }
.askbox { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; padding: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
.askbox:focus-within { border-color: var(--accent); }
.askbox textarea { border: 0; resize: none; font: inherit; font-size: 18px; padding: 8px 10px; color: var(--ink); background: transparent; outline: none; }
.askbox-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.hint { font-size: 14px; color: var(--muted); padding-left: 10px; }
.tries { display: flex; flex-direction: column; gap: 10px; }
.tries-label { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.tries-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.try { text-align: left; font: inherit; font-size: 15px; color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; }
.try:hover { background: var(--surface); border-color: var(--dot); }
.mapcard { flex: 1 1 400px; min-width: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.mapcard svg { display: block; width: 100%; height: auto; }
.mapcard .dot circle { fill: var(--dot); }
.mapcard .hot circle { fill: var(--accent); }
.mapcard .hot .halo { fill-opacity: .16; }
.maplabel text { font-family: var(--body); font-size: 12px; font-weight: 600; fill: var(--ink); }
.mapcard figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.trust { flex: 1 1 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; border-top: 1px solid var(--line); padding: 28px 0 40px; margin-top: 8px; }
.trust > div { display: flex; gap: 12px; align-items: flex-start; color: var(--accent); }
.trust svg { flex: none; margin-top: 2px; }
.trust p { margin: 0; color: var(--ink); display: flex; flex-direction: column; gap: 2px; }
.trust span { color: var(--muted); font-size: 15px; }

/* ── conversation ────────────────────────────────────────────────────── */
.convo { display: flex; flex-direction: column; min-height: calc(100vh - 73px); }
.thread { flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: 28px clamp(16px, 3vw, 40px) 24px; display: flex; flex-direction: column; gap: 20px; }
.qbubble { align-self: flex-end; max-width: 80%; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.acard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px, 3vw, 28px); display: flex; flex-direction: column; gap: 20px; }
.acard-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.acard-who { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); }
.acard-who span { color: var(--muted); }
.asof { font-size: 12px; font-weight: 600; color: #33404F; background: var(--ground); border: 1px solid var(--line-strong); padding: 3px 8px; border-radius: 999px; }
.answer { font-size: 16px; }
.answer p { margin: 0 0 10px; }
.answer p:first-child { font-family: var(--display); font-weight: 600; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.3; letter-spacing: -0.01em; }
.answer ul, .answer ol { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.answer :last-child { margin-bottom: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kpi-label { margin: 0; font-size: 14px; color: var(--muted); }
.kpi-value { margin: 4px 0 0; font-family: var(--display); font-weight: 700; font-size: 28px; font-variant-numeric: tabular-nums; }
.kpi-delta { margin: 2px 0 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.kpi-delta.up { color: var(--accent); }
.kpi-delta.down { color: var(--behind); }
.chart { margin: 0; border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 8px; }
.chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.chart-head figcaption { font-weight: 600; font-size: 15px; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend .ty { background: var(--accent); }
.legend .ly { background: var(--ly); }
.chart svg { display: block; width: 100%; height: auto; margin-top: 8px; font-family: var(--body); }
.chart .grid { stroke: var(--line); }
.chart .axis { stroke: var(--dot); }
.chart .tick { font-size: 12px; fill: var(--muted); }
.chart .bar-ty { fill: var(--accent); }
.chart .bar-ly { fill: var(--ly); }
.chart .delta { font-size: 12.5px; font-weight: 700; }
.chart .delta.up { fill: var(--accent); }
.chart .delta.down { fill: var(--behind); }
.chart .wk { font-size: 12.5px; fill: var(--ink); }
.notes { display: flex; flex-direction: column; gap: 8px; }
.source { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); background: var(--ground); border-radius: 10px; padding: 10px 12px; }
.source svg { flex: none; margin-top: 2px; }
.source p { margin: 0; }
.held { font-size: 13px; color: #8A4B08; background: #FDF1E3; border: 1px solid #F3D3A8; border-radius: 10px; padding: 8px 12px; margin: 0; }
.nextq { display: flex; flex-direction: column; gap: 8px; }
.nextq-label { margin: 0; font-size: 14px; font-weight: 600; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 14px; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink); background: var(--soft); cursor: pointer; }
.chip:hover { background: var(--surface); border-color: var(--dot); }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 14px; padding: 16px 18px; }
.cta div { min-width: 0; flex: 1 1 300px; }
.cta p { margin: 0; }
.cta p + p { font-size: 15px; color: #33404F; margin-top: 2px; }
.errcard { background: var(--surface); border: 1px solid #F3D3A8; border-radius: 16px; padding: 18px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.errcard p { margin: 0; }
.followbar { position: sticky; bottom: 0; background: var(--ground); padding: 12px clamp(16px, 3vw, 40px) 20px; border-top: 1px solid var(--line); }
.followbox { max-width: 880px; margin: 0 auto; display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; padding: 6px 6px 6px 14px; }
.followbox:focus-within { border-color: var(--accent); }
.followbox input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 16px; background: transparent; color: var(--ink); }

/* ── header: account ─────────────────────────────────────────────────── */
.top-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.account { display: flex; align-items: center; gap: 10px; min-width: 0; }
.acct-who { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; min-width: 0; }
.acct-who > span:first-child { font-size: 14px; font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-left { font-size: 12px; color: var(--muted); }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.top .btn { white-space: nowrap; }
.acct-left { white-space: nowrap; }
.gate-form { display: flex; flex-direction: column; gap: 12px; }
.gate-form[hidden] { display: none !important; }
@media (max-width: 640px) {
  .acct-who > span:first-child { max-width: 120px; }
  .acct-long { display: none; }
  #new-question { padding: 0 12px; }
}

/* ── sign-in page (signin.html) ──────────────────────────────────────── */
.signin-page { min-height: calc(100vh - 73px); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.signin-page h1 { margin: 0; font-family: var(--display); font-size: 26px; letter-spacing: -0.01em; }
.signin-page .btn { align-self: flex-start; }

/* ── preview password ────────────────────────────────────────────────── */
.gate { position: fixed; inset: 0; z-index: 20; background: rgba(16,24,40,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.gate-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 10px 30px rgba(16,24,40,.2); }
.gate-card h2 { margin: 0; font-family: var(--display); font-size: 22px; }
.gate-card p { margin: 0; color: var(--muted); }
.gate-card input { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; }
.gate-card input:focus { outline: none; border-color: var(--accent); }
.gate-err { color: #8A4B08 !important; }

/* Loading is an animation, never a sentence. */
.skel { display: flex; flex-direction: column; gap: 14px; }
.skel i { display: block; height: 14px; border-radius: 7px; background: linear-gradient(90deg, #EEF0F3 0%, #F7F8FA 40%, #EEF0F3 80%); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; }
.skel i.h { height: 24px; width: 82%; }
.skel i.s { width: 55%; }
.skel .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.skel .row i { height: 84px; border-radius: 12px; }
.skel i.chartph { height: 220px; border-radius: 12px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skel i { animation: none; } }

@media (max-width: 640px) {
  .brand-by { display: none; }
  .qbubble { max-width: 92%; }
  .skel .row { grid-template-columns: 1fr; }
  .hint { display: none; }
}
