:root {
  color-scheme: light;
  --paper: #f8f6f0;
  --paper-2: #efede5;
  --surface: #fffefb;
  --ink: #172b32;
  --ink-2: #40575e;
  --muted: #52676d;
  --brand: #d66a3c;
  --action: #a54222;
  --action-hover: #883519;
  --line: #d7d8d1;
  --positive: #1f6c50;
  --warning: #835310;
  --danger: #9c2e24;
  --safe-top: max(0px, env(safe-area-inset-top));
  --safe-right: max(0px, env(safe-area-inset-right));
  --safe-bottom: max(0px, env(safe-area-inset-bottom));
  --safe-left: max(0px, env(safe-area-inset-left));
  --tab-height: 70px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  background: #e5e5df;
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { background: #e5e5df; }
body { margin: 0; background: #e5e5df; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { border: 0; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: #7c321c; }
[hidden] { display: none !important; }
.app-shell svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

/* Public and recovery pages share this file, but never inherit app-shell layout. */
body:not(.app-shell) {
  min-height: 100vh;
  background: radial-gradient(circle at 75% 10%, rgb(214 106 60 / 14%), transparent 28rem), var(--paper);
  color: var(--ink);
}
body:not(.app-shell) header,
body:not(.app-shell) main,
body:not(.app-shell) footer { width: min(100% - 2rem, 64rem); margin-inline: auto; }
body:not(.app-shell) header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; }
body:not(.app-shell) nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
body:not(.app-shell) main { padding-block: clamp(2.5rem, 8vw, 7rem); }
body:not(.app-shell) footer { padding-block: 2rem; color: #52676d; font-size: .9rem; }
body:not(.app-shell) .brand { display: inline-flex; min-height: 44px; align-items: center; gap: .65rem; color: inherit; font-size: 1.25rem; font-weight: 750; text-decoration: none; }
body:not(.app-shell) .brand img { width: 2.5rem; height: 2.5rem; object-fit: contain; }
body:not(.app-shell) .panel { max-width: 43rem; padding: clamp(1.5rem, 5vw, 3.5rem); border: 1px solid rgb(23 43 50 / 12%); border-radius: 1.5rem; background: rgb(255 255 255 / 82%); box-shadow: 0 1.5rem 5rem rgb(23 43 50 / 10%); }
body:not(.app-shell) h1 { max-width: 15ch; margin: 0 0 1rem; font-size: clamp(2.25rem, 8vw, 4.75rem); line-height: .98; letter-spacing: -.04em; }
body:not(.app-shell) h2 { margin-top: 2.5rem; }
body:not(.app-shell) p,
body:not(.app-shell) li { line-height: 1.65; }
body:not(.app-shell) .lede { max-width: 42rem; color: #40575e; font-size: 1.15rem; }
body:not(.app-shell) a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; color: #7c321c; }
body:not(.app-shell) .button,
body:not(.app-shell) button { min-width: 44px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: .75rem 1.2rem; border: 0; border-radius: 999px; background: var(--action); color: white; font: inherit; font-weight: 700; text-decoration: none; }
body:not(.app-shell) .button.secondary,
body:not(.app-shell) button.secondary { border: 1px solid rgb(23 43 50 / 24%); background: transparent; color: var(--ink); }
body:not(.app-shell) .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
body:not(.app-shell) .notice,
body:not(.app-shell) .error { margin-block: 1rem; padding: .9rem 1rem; border-radius: .75rem; }
body:not(.app-shell) .notice { background: #e5eeeb; }
body:not(.app-shell) .error { background: #f8dfd9; color: #6e2119; }
body:not(.app-shell) dl { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1rem; }
body:not(.app-shell) dt { font-weight: 700; }
body:not(.app-shell) dd { margin: 0; }
body:not(.app-shell) :focus-visible { outline: 3px solid #08799c; outline-offset: 3px; }
.offline-page main { max-width: 34rem; min-height: 100vh; display: grid; align-content: center; justify-items: center; padding-block: 2rem; text-align: center; }
.offline-art { width: min(160px, 48vw); height: auto; border-radius: 16px; }
.offline-page main > p:first-of-type { margin-bottom: 0; color: #7c321c; font-weight: 800; }

.signin-page { position: relative; min-height: 100vh; overflow-x: hidden; background: #0b2028; color: white; }
.signin-page::before { position: fixed; z-index: 1; inset: 0; content: ''; pointer-events: none; background: linear-gradient(180deg, rgb(7 24 31 / 8%) 25%, rgb(7 24 31 / 62%) 57%, rgb(7 24 31 / 96%) 100%); }
.signin-art { position: fixed; z-index: 0; inset: 0; display: block; }
.signin-art img { width: 100vw; height: 100vh; display: block; object-fit: cover; object-position: 50% 28%; }
.signin-page > header, .signin-page > main, .signin-page > footer { position: relative; z-index: 2; }
.signin-page > header { color: white; }
.signin-page > main { min-height: calc(100vh - 90px); display: flex; align-items: flex-end; justify-content: center; padding-top: min(56vh, 34rem); padding-bottom: 1rem; }
body.signin-page .panel { width: min(100%, 34rem); padding: clamp(1.25rem, 5vw, 2rem); overflow-wrap: anywhere; border-color: rgb(255 255 255 / 28%); border-radius: 16px; background: rgb(7 25 32 / 92%); box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 24%); backdrop-filter: blur(8px); }
body.signin-page .panel > p:first-child { margin-top: 0; color: #ffc4a8; font-weight: 800; }
body.signin-page h1 { color: white; font-size: clamp(2.25rem, 10vw, 4rem); }
body.signin-page .lede, body.signin-page .panel > p:last-child { color: #e7eeee; }
body.signin-page .button { background: #b64f29; }
body.signin-page a, body.signin-page footer { color: white; }
body.signin-page footer { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .35rem; padding-top: 1rem; }

.app-shell { overflow: hidden; }
.app-frame {
  width: min(100%, 600px);
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  margin-inline: auto;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) calc(var(--tab-height) + var(--safe-bottom));
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 0 0 1px rgb(23 43 50 / 5%), 0 20px 70px rgb(23 43 50 / 13%);
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 6px;
  left: 50%;
  min-height: 44px;
  padding: 11px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  transform: translate(-50%, -140%);
}
.skip-link:focus { transform: translate(-50%, 0); }

.app-toolbar {
  min-height: calc(60px + var(--safe-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(8px + var(--safe-top)) calc(16px + var(--safe-right)) 8px calc(16px + var(--safe-left));
  border-bottom: 1px solid var(--line);
  background: rgb(248 246 240 / 96%);
}
.site-mark { min-width: 0; display: flex; align-items: center; gap: 10px; }
.site-mark img { width: 36px; height: 36px; object-fit: contain; }
.site-mark span { min-width: 0; display: grid; }
.site-mark strong { overflow: hidden; font-size: 16px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.site-mark small { overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.icon-button, .viewer-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: var(--paper-2);
}
.avatar-button { background: var(--ink); color: white; font-size: 14px; font-weight: 800; }

.sample-banner, .connectivity-banner, .global-error {
  min-height: 34px;
  margin: 0;
  padding: 7px calc(16px + var(--safe-right)) 7px calc(16px + var(--safe-left));
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}
.notice-stack { min-height: 0; }
.sample-banner { display: flex; align-items: center; justify-content: center; gap: 7px; background: #e9eee6; color: #314c43; }
.sample-banner strong { color: var(--ink); }
.connectivity-banner { background: #fff0d3; color: #60400b; }
.global-error { background: #f8dfd9; color: #6e2119; }

.view-deck { position: relative; min-height: 0; overflow: hidden; }
.app-view { position: absolute; inset: 0; overflow: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; }
.view-content { padding: 18px max(16px, calc(16px + var(--safe-right))) 28px max(16px, calc(16px + var(--safe-left))); }
.kicker { margin: 0; color: #814028; font-size: 12px; font-weight: 800; letter-spacing: .095em; line-height: 1.35; text-transform: uppercase; }
.page-title { margin-bottom: 13px; }
.page-title h1 { margin: 2px 0 0; font-size: clamp(30px, 8vw, 38px); line-height: 1.05; letter-spacing: -.04em; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin: 2px 0 0; font-size: 20px; line-height: 1.2; letter-spacing: -.025em; }
.panel-state { margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.panel-retry { margin-top: 5px; }
.quiet-button, .text-action {
  min-height: 44px;
  padding: 8px;
  background: transparent;
  color: #7c321c;
  font-size: 13px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.receipt-card {
  width: 100%;
  min-height: 104px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(104px, .8fr) 20px;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  border-radius: 22px;
  background: var(--ink);
  color: white;
  text-align: left;
  box-shadow: 0 12px 30px rgb(23 43 50 / 14%);
}
.receipt-card__copy, .receipt-card__motion { min-width: 0; display: grid; gap: 2px; }
.receipt-card small, .receipt-card span { color: #d0dcde; font-size: 12px; line-height: 1.25; }
.receipt-card__copy strong { font-size: clamp(30px, 9vw, 40px); line-height: 1; letter-spacing: -.05em; }
.receipt-card__motion { padding-left: 12px; border-left: 1px solid rgb(255 255 255 / 18%); }
.receipt-card__motion strong { color: #ffd3c1; font-size: 18px; line-height: 1.2; }
.receipt-card > svg { color: #f6c1aa; }

.home-status { position: relative; min-height: 180px; display: flex; align-items: stretch; overflow: hidden; border-radius: 16px; background: #0c2833; color: white; }
.home-status__art { position: absolute; inset: 0; }
.home-status__art img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 70% 30%; }
.home-status__scrim { position: relative; z-index: 1; width: 100%; min-height: 180px; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px 42% 18px 18px; background: linear-gradient(90deg, rgb(5 24 31 / 96%) 0%, rgb(5 24 31 / 86%) 48%, rgb(5 24 31 / 18%) 78%, transparent 100%); }
.home-status__scrim > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.home-status__scrim > div > strong { min-width: 0; font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; text-shadow: 0 1px 3px rgb(0 0 0 / 45%); }
.home-status p { margin: 7px 0 0; color: #f0f5f5; font-size: 13px; font-weight: 650; line-height: 1.4; text-shadow: 0 1px 3px rgb(0 0 0 / 55%); }
.status-pill { min-height: 28px; display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1.25; }
.home-status .status-pill.is-ok { background: #e2f3eb; color: #104a37; }
.home-status .status-pill.is-warning { background: #fff0d3; color: #5e3d08; }
.home-status .status-pill.is-checking { background: #f1f3f1; color: #263f47; }
.home-ask { margin-top: 18px; }
.home-ask h2 { margin: 3px 0 9px; font-family: ui-serif, Georgia, serif; font-size: clamp(27px, 8vw, 34px); font-weight: 560; letter-spacing: -.035em; line-height: 1.05; }
.home-composer, .thread-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: center;
  gap: 7px;
  padding: 6px 6px 6px 14px;
  border: 1px solid #c7cac5;
  border-radius: 17px;
  background: var(--surface);
  box-shadow: 0 7px 20px rgb(23 43 50 / 7%);
}
.home-composer input, .thread-composer input { min-width: 0; min-height: 44px; padding: 7px 2px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.home-composer input::placeholder, .thread-composer input::placeholder { color: #66787d; opacity: 1; }
.send-button { width: 46px; height: 46px; display: grid; place-items: center; padding: 0; border-radius: 13px; background: var(--action); color: white; }
.send-button:hover { background: var(--action-hover); }
.send-button svg { width: 21px; height: 21px; stroke-width: 2.1; }
.prompt-row, .filter-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.prompt-row::-webkit-scrollbar, .filter-row::-webkit-scrollbar { display: none; }
.prompt-row { margin: 7px -16px 0; padding: 1px 16px 3px; }
.prompt-row button, .filter-chip, .camera-filter {
  min-width: 44px;
  min-height: 44px;
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 680;
  white-space: nowrap;
}
.recent-section { margin-top: 20px; }
.recent-list { display: grid; gap: 8px; margin-top: 10px; }
.moment-row,
.finding-card__open {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
}
.moment-thumb { width: 78px; height: 58px; object-fit: contain; border-radius: 12px; background: #172a33; }
.moment-thumb-placeholder { width: 78px; height: 58px; display: grid; place-items: center; border-radius: 12px; background: #dfe5e2; color: var(--ink-2); }
.moment-thumb-placeholder svg { width: 22px; }
.moment-copy { min-width: 0; display: grid; gap: 3px; }
.moment-kind-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #dcebe8; color: #1d5a59; }
.moment-kind-icon svg { width: 22px; height: 22px; stroke-width: 1.8; }
.moment-kind-icon .kind-icon-dot { fill: currentColor; stroke: none; }
.moment-copy strong { overflow-wrap: anywhere; font-size: 15px; line-height: 1.3; }
.moment-copy small { color: var(--muted); font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.finding-attributes { min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.finding-attributes .finding-attribute { min-width: 0; max-width: 100%; display: inline-flex; flex-wrap: wrap; gap: 3px 5px; align-items: baseline; padding: 5px 8px; border: 1px solid #c9d2ce; border-radius: 9px; background: #f0f1ec; font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; }
.finding-attributes .finding-attribute > span { color: var(--muted); }
.finding-attributes .finding-attribute > strong { display: inline; overflow: visible; color: var(--ink); font-size: inherit; -webkit-line-clamp: unset; }
.moment-row > svg { width: 18px; color: var(--muted); }
.finding-card__open > span:last-child { color: var(--muted); font-size: 24px; line-height: 1; }
.finding-card__open.is-withheld { grid-template-columns: minmax(0, 1fr) 20px; }
.conclusion-group { margin-top: 8px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.conclusion-group > summary { min-height: 48px; display: flex; align-items: center; padding: 9px 12px; cursor: pointer; font-size: 14px; font-weight: 760; line-height: 1.35; }
.conclusion-group > summary::marker { color: var(--muted); }
.conclusion-events { padding: 0 12px 6px; border-top: 1px solid var(--line); }

.see-all-activity { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding: 4px 2px; background: transparent; color: #73301c; font-weight: 760; text-align: left; }
.activity-content { padding-inline: 0; }
.activity-content > .page-title, .activity-content > .panel-state, .activity-content > .panel-retry, .activity-list, .load-more-wrap { margin-inline: 16px; }
.timeline-title { display: flex; align-items: center; gap: 12px; }
.timeline-title h1 { margin: 0; }
.day-picker { display: grid; gap: 5px; margin: 0 16px 10px; color: var(--muted); font-size: 12px; font-weight: 750; }
.day-picker input { width: 100%; min-height: 48px; padding: 9px 12px; border: 1px solid #9ba5a4; border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; }
.filter-row { padding: 4px 16px; }
.camera-filters { min-height: 0; padding-top: 3px; padding-bottom: 8px; }
.filter-chip.is-selected, .camera-filter.is-selected { border-color: var(--ink); background: var(--ink); color: white; }
.activity-day { margin-top: 16px; }
.activity-day__heading { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 7px; }
.activity-day__heading h2 { margin: 0; font-size: 18px; }
.activity-day__heading span { color: var(--muted); font-size: 12px; }
.activity-list .moment-row,
.activity-list .finding-card__open { min-height: 72px; margin-bottom: 8px; }
.empty-state { padding: 48px 16px; text-align: center; }
.empty-state img { width: 52px; opacity: .72; }
.empty-state h2 { margin: 8px 0 4px; font-size: 20px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.home-empty-state { padding: 4px 16px 2px; text-align: center; }
.home-empty-state img { width: min(160px, 52vw); height: auto; border-radius: 16px; }
.home-empty-state h3 { margin: 8px 0 4px; font-size: 20px; line-height: 1.2; }
.home-empty-state p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.secondary-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid #afb6b4;
  border-radius: 13px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}
.load-more-wrap { display: flex; justify-content: center; padding: 16px 0; }

.ask-view { overflow: hidden; }
.ask-layout { height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.ask-scroll { min-height: 0; overflow-y: auto; padding: 16px 16px 20px; overscroll-behavior-y: contain; }
.ask-title { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 4px 8px; }
.ask-title > div { min-width: 0; flex: 1 1 220px; }
.ask-title > .text-action { margin-left: auto; }
.quota-card { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper-2); color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.quota-card strong { display: block; color: var(--ink); font-size: 14px; }
.quota-card p { margin: 5px 0 0; color: #5d4816; }
.quota-card a { min-height: 44px; display: inline-flex; align-items: center; color: #7c321c; font-weight: 750; text-underline-offset: 3px; }
.account-quota { margin-top: 14px; }
.thread-composer { margin: 0 12px 10px; padding-bottom: max(6px, var(--safe-bottom)); }
.thread-empty { max-width: 310px; margin: 45px auto 0; text-align: center; }
.thread-empty img { width: 58px; opacity: .8; }
.thread-empty h2 { margin: 8px 0 6px; font-family: ui-serif, Georgia, serif; font-size: 28px; font-weight: 560; }
.thread-empty p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.history-panel { margin-bottom: 15px; padding: 15px; border-radius: 17px; background: var(--paper-2); }
.history-panel h2 { margin: 0; font-size: 18px; }
.history-panel > p { margin: 5px 0 10px; color: var(--muted); font-size: 12px; }
.history-row { width: 100%; min-height: 50px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid #d2d3cc; background: transparent; text-align: left; }
.history-row span { display: grid; gap: 2px; }
.history-row strong { font-size: 13px; }
.history-row small { color: var(--muted); font-size: 12px; }
.question-bubble { width: fit-content; max-width: 88%; margin: 7px 0 15px auto; padding: 11px 14px; border-radius: 17px 17px 5px 17px; background: var(--ink); color: white; font-size: 14px; line-height: 1.4; }
.checking-row { display: flex; align-items: center; gap: 11px; margin: 10px 0 16px; padding: 12px; border-radius: 16px; background: var(--paper-2); }
.checking-row img { width: 36px; height: 36px; }
.checking-row strong { font-size: 13px; }
.checking-row span { color: var(--muted); font-size: 12px; }
.answer-block { margin-bottom: 26px; }
.answer-provenance, .surface-sample {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 10px;
  background: #e5eeeb;
  color: #314c43;
  font-size: 12px;
  line-height: 1.35;
}
.answer-provenance { width: fit-content; margin: 0 0 9px !important; }
.answer-provenance strong, .surface-sample strong { color: var(--ink); }
.answer-block > h2 { margin: 5px 0 10px; font-family: ui-serif, Georgia, serif; font-size: clamp(24px, 7vw, 31px); font-weight: 560; line-height: 1.1; letter-spacing: -.03em; }
.answer-block > p { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.limitation { padding: 11px 12px; border-left: 4px solid var(--brand); border-radius: 4px 12px 12px 4px; background: #f0e9df; color: #384d53; font-size: 12px; line-height: 1.45; }
.answer-meta { margin: 10px 0 13px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.sources-heading { margin: 17px 0 3px; font-size: 16px; }
.citation-row { width: 100%; min-height: 62px; display: grid; grid-template-columns: 48px minmax(0, 1fr) 18px; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.citation-number { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #f4ded2; color: #7d311b; font-size: 12px; font-weight: 800; }
.citation-thumb { width: 48px; height: 40px; object-fit: contain; border-radius: 9px; background: #172a33; }
.citation-unavailable { min-height: 62px; display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 9px; border-bottom: 1px solid var(--line); }
.citation-unavailable > span:last-child { display: grid; gap: 2px; }
.citation-unavailable small { color: var(--muted); font-size: 12px; }
.replay-note { padding: 11px 12px; border-left: 4px solid #a96918; border-radius: 4px 12px 12px 4px; background: #fff2d5; color: #4e3915 !important; }
.ask-again { margin-top: 14px; }
.citation-row span:nth-child(2) { display: grid; gap: 2px; }
.citation-row strong { font-size: 13px; }
.citation-row small { color: var(--muted); font-size: 12px; }
.citation-row > svg { width: 17px; color: var(--muted); }
.ask-error { padding: 11px; border-radius: 12px; background: #f8dfd9; color: #6e2119; font-size: 13px; }

.camera-intro { margin: -5px 0 16px; color: var(--muted); font-size: 14px; }
.camera-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.camera-card { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.camera-card__top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.camera-card__top strong { font-size: 16px; }
.camera-status { max-width: 60%; display: inline-flex; align-items: flex-start; gap: 6px; color: var(--ink-2); font-size: 12px; font-weight: 750; line-height: 1.3; text-align: right; }
.camera-status > span { min-width: 0; }
.camera-status::before { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #777e7d; content: ""; }
.camera-status::before { margin-top: .28em; }
.camera-status.is-online::before { background: var(--positive); }
.camera-status.is-offline::before { background: var(--danger); }
.camera-status.is-sleeping::before { background: var(--warning); }
.camera-card__meta { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.camera-mode { margin: 7px 0 0; padding: 8px 9px; border-radius: 10px; background: var(--paper-2); color: var(--ink-2); font-size: 12px; line-height: 1.3; }
.camera-note { display: block; margin-top: 5px; color: #6e321f; font-size: 12px; }
.camera-battery { display: inline-block; margin-top: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.camera-last-frame { margin: 9px 0 0; display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 10px; }
.camera-last-frame img { width: 88px; height: 64px; object-fit: contain; border-radius: 11px; background: #172a33; }
.camera-last-frame figcaption, .camera-last-movement { color: var(--muted); font-size: 12px; line-height: 1.35; }
.camera-last-movement { display: block; margin-top: 7px; }

.tab-bar {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 5px var(--safe-right) var(--safe-bottom) var(--safe-left);
  border-top: 1px solid var(--line);
  background: rgb(255 254 251 / 97%);
}
.tab-bar > button { min-width: 0; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 3px; overflow: hidden; background: transparent; color: #5e7277; font-size: 12px; font-weight: 680; }
.tab-label { max-width: 100%; line-height: 1.1; text-align: center; white-space: normal; }
.has-icon-only-tabs .tab-label { display: none; }
.tab-bar > button svg { width: 22px; height: 22px; }
.tab-bar > button[aria-current="page"] { color: var(--ink); font-weight: 800; }
.tab-bar > button[aria-current="page"] svg { stroke-width: 2.35; }
.ask-icon { display: grid; place-items: center; color: #8d371d; }
.is-typing .tab-bar { display: none; }
.is-typing .app-frame { grid-template-rows: auto auto minmax(0, 1fr) 0; }

dialog { color: var(--ink); }
dialog::backdrop { background: rgb(8 19 23 / 60%); backdrop-filter: blur(3px); }
.bottom-sheet {
  width: min(100% - 12px, 588px);
  max-height: min(82dvh, 760px);
  margin: auto auto 0;
  padding: 9px 18px calc(20px + var(--safe-bottom));
  overflow: auto;
  border: 0;
  border-radius: 24px 24px 0 0;
  background: var(--paper);
  box-shadow: 0 -18px 60px rgb(0 0 0 / 22%);
}
.sheet-handle { width: 42px; height: 5px; margin: 0 auto 10px; border-radius: 99px; background: #bbc0bc; }
.receipt-sample { position: sticky; z-index: 2; top: -9px; justify-content: center; margin: 0 -9px 10px; border-radius: 0 0 10px 10px; }
.sheet-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.sheet-heading h2 { margin: 2px 0 0; font-size: 26px; line-height: 1.1; letter-spacing: -.03em; }
.sheet-heading .icon-button { font-size: 24px; }
.window-toggle { min-height: 52px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 16px 0 12px; padding: 4px; border: 1px solid var(--line); border-radius: 15px; }
.window-toggle button { min-height: 44px; padding: 8px; border-radius: 11px; background: transparent; font-size: 13px; font-weight: 750; }
.window-toggle button.is-selected { background: var(--ink); color: white; }
.receipt-explainer { margin: 0 0 5px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.receipt-group-title { margin: 18px 0 2px; color: #814028; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.receipt-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.receipt-row strong { font-size: 14px; }
.receipt-row > span { font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 800; }
.receipt-row small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.not-available { color: #733024; }
.receipt-generated { color: var(--muted); font-size: 12px; }
.account-sheet dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 13px; margin: 18px 0; font-size: 13px; }
.account-sheet dt { font-weight: 800; }
.account-sheet dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.account-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.account-details { padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper-2); }
.account-details .account-feature { width: 100%; margin-top: 8px; }
.privacy-link { min-height: 44px; display: inline-flex; align-items: center; margin-top: 9px; font-size: 13px; font-weight: 750; }

.evidence-viewer {
  width: 100%;
  max-width: 600px;
  height: 100%;
  max-height: none;
  margin: 0 auto;
  padding: 0;
  overflow: auto;
  border: 0;
  background: #0c191e;
  color: white;
}
.evidence-viewer::backdrop { background: #0c191e; }
.evidence-toolbar { position: sticky; z-index: 4; top: 0; min-height: calc(66px + var(--safe-top)); display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 8px 11px; padding: calc(10px + var(--safe-top)) calc(14px + var(--safe-right)) 10px calc(14px + var(--safe-left)); background: #0c191e; }
.viewer-button { background: #263940; color: white; }
.evidence-toolbar > div { display: grid; gap: 2px; }
.evidence-toolbar strong { font-size: 14px; }
.evidence-toolbar span { color: #b9c8ca; font-size: 12px; }
.evidence-toolbar .evidence-sample { grid-column: 1 / -1; min-height: 32px; max-width: 100%; display: inline-flex; align-items: center; justify-self: start; padding: 5px 9px; border: 1px solid #536970; border-radius: 12px; background: #233940; color: #f7d8ca; font-weight: 800; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; }
.evidence-media { position: relative; min-height: clamp(230px, 48vh, 430px); display: grid; place-items: center; overflow: hidden; background: #13272e; }
.evidence-media > img:not(.media-placeholder img), .evidence-media video { width: 100%; height: 100%; max-height: 52vh; object-fit: contain; background: #081216; }
.media-placeholder { width: 100%; display: grid; place-items: center; gap: 9px; padding: 12px; color: #f3f6f6; font-size: 14px; font-weight: 750; }
.media-placeholder img { width: min(100%, 360px); max-height: 38vh; display: block; border-radius: 16px; object-fit: contain; }
.evidence-copy { min-height: 280px; padding: 22px max(18px, calc(18px + var(--safe-right))) calc(28px + var(--safe-bottom)) max(18px, calc(18px + var(--safe-left))); border-radius: 24px 24px 0 0; background: #152930; }
.evidence-copy .kicker { color: #f0a07d; }
.evidence-copy h2 { margin: 5px 0 9px; font-family: ui-serif, Georgia, serif; font-size: clamp(27px, 8vw, 36px); font-weight: 560; line-height: 1.1; }
.evidence-copy > p:not(.kicker) { margin: 0 0 17px; color: #d3dcde; font-size: 14px; line-height: 1.5; }
.something-wrong { width: 100%; min-height: 52px; margin-top: 6px; padding: 12px 16px; border-radius: 14px; background: #f4e3d9; color: #6f2d1c; font-weight: 850; }
.group-sightings { margin: 20px 0; }
.group-sightings h3 { margin: 0 0 7px; font-size: 16px; }
.group-sighting { width: 100%; min-height: 56px; display: grid; gap: 3px; padding: 8px 2px; border-top: 1px solid #40535a; background: transparent; color: white; text-align: left; }
.group-sighting strong { font-size: 14px; }
.group-sighting span { color: #b9c8ca; font-size: 13px; }
.group-sighting[aria-current="true"] { color: #ffb18f; }
.problem-options { display: grid; gap: 8px; margin-top: 16px; }
.problem-options button { min-height: 52px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--ink); font-weight: 760; text-align: left; }
.evidence-attributes { margin: 0 0 17px; }
.evidence-attributes .finding-attribute { border-color: #4d6269; background: #20363e; color: white; }
.evidence-attributes .finding-attribute > span { color: #b9c8ca; }
.evidence-attributes .finding-attribute > strong { color: white; }
.supports-box { padding: 13px; border: 1px solid #40535a; border-radius: 14px; background: #1c333b; }
.supports-box strong { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.supports-box p { margin: 5px 0 0; color: #d3dcde; font-size: 13px; line-height: 1.45; }
.unavailable-state { margin-top: 14px; padding: 14px; border-radius: 14px; background: #2b3c42; }
.unavailable-state h3 { margin: 0; font-size: 18px; }
.unavailable-state p { margin: 5px 0 10px; color: #d3dcde; font-size: 13px; }
.unavailable-state .secondary-button { border-color: #728489; color: white; }

.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }
.app-shell :focus-visible { outline: 3px solid #08799c; outline-offset: 3px; }
.app-shell :is(button, input, a[href]) { min-width: 44px; min-height: 44px; }
.evidence-viewer :focus-visible { outline-color: #ffb18f; }

@media (max-width: 23rem) {
  .view-content, .ask-scroll { padding-inline: 13px; }
  .receipt-card { grid-template-columns: minmax(0, 1fr) 96px 16px; gap: 8px; padding-inline: 13px; }
  .receipt-card__motion { padding-left: 8px; }
  .prompt-row { margin-inline: -13px; padding-inline: 13px; }
  .activity-content > .page-title, .activity-content > .panel-state, .activity-content > .panel-retry, .activity-list, .load-more-wrap { margin-inline: 13px; }
  .filter-row { padding-inline: 13px; }
  .home-status__scrim { padding-right: 36%; padding-left: 15px; }
}

@media (max-height: 40rem) {
  :root { --tab-height: 62px; }
  .app-toolbar { min-height: calc(52px + var(--safe-top)); padding-block: calc(4px + var(--safe-top)) 4px; }
  .site-mark img { width: 32px; height: 32px; }
  .tab-bar > button { min-height: 54px; }
  .view-content { padding-top: 12px; }
  .thread-empty { margin-top: 15px; }
  .bottom-sheet { max-height: 94dvh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 38rem) {
  body:not(.app-shell) nav { font-size: .9rem; }
  body:not(.app-shell) dl { grid-template-columns: 1fr; }
  body:not(.app-shell) dd + dt { margin-top: .5rem; }
}
