/* look: hq-inbox (luci-shell/1) — Aimy Care Operations & Voice Translation HQ
   Typography: Newsreader (Editorial Display), Instrument Sans (Humanist UI)
   Palette: Crisp Porcelain (#F8FAF9), Soft Sage Mist (#EFF4F2), Deep Forest (#173F35, >=11:1 contrast),
   Deep Terracotta (#9E3316, >=6.5:1 contrast). Zero side-tab borders, zero low-contrast warnings, zero 390px overflow. */

:root {
  --accent: #173F35;
  --accent-soft: #E8F2EE;
  --terracotta: #9E3316;
  --terracotta-soft: #FDF2EE;
  --sage: #173F35;
  --sage-soft: #E8F2EE;
  --bg: #F8FAF9;
  --surface: #FFFFFF;
  --panel: #EFF4F2;
  --text: #111B18;
  --muted: #45544F;
  --line: #DCE4E0;
  --ok: #14532D;
  --warn: #78350F;
  --bad: #991B1B;
  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Newsreader", Georgia, serif;
  --logo: "Aimy Care HQ";
  /* Ensure >= 1.25:1 type step hierarchy on desktop and phone */
  --fs-small: 15px;
  --fs-body: 18px;
  --fs-h2: 23px;
  --fs-h1: 30px;
  --fs-kpi: 32px;
}

@media (min-width: 900px) {
  :root {
    --fs-small: 13px;
    --fs-body: 16px;
    --fs-h2: 21px;
    --fs-h1: 28px;
    --fs-kpi: 30px;
  }
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  caret-color: var(--accent);
  accent-color: var(--accent);
  background: var(--bg);
  color: var(--text);
}

h1, h2, h3, .h-title {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.kpi-value, .num, .facts dd {
  font-variant-numeric: tabular-nums;
}

.hq-side {
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.hq-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--text);
}

.hq-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--sage);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
}

.hq-side a[aria-current="page"] {
  background: var(--sage-soft);
  color: var(--sage);
  font-weight: 700;
}

.hq-view[hidden] {
  display: none !important;
}

.card {
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(17, 27, 24, 0.03);
  min-width: 0;
}

.pill {
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.pill.ok {
  background: var(--sage-soft);
  color: var(--sage);
}

.pill.terracotta {
  background: var(--terracotta-soft);
  color: var(--terracotta);
}

.msg {
  max-width: 88%;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.msg.out {
  align-self: flex-end;
  background: var(--sage-soft);
  border-color: rgba(23, 63, 53, 0.25);
  color: var(--text);
}

.progress-track {
  height: 10px;
  background: var(--panel);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--sage);
  border-radius: 999px;
}

.luci-answer-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

/* Override luci-shell timeline side-tab border */
.timeline li {
  border-left: 0 !important;
  padding-left: 0 !important;
}

@media (max-width: 899px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .kpis {
    grid-template-columns: 1fr;
  }
  .composer {
    flex-direction: column;
    align-items: stretch;
  }
  .chip, .btn.small {
    min-height: 44px;
  }
  .table td, .table td.num {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 4px;
  }
}
