:root {
  --navy: #0f172a;
  --trust: #0369a1;
  --trust-hover: #075985;
  --cyan: #0891b2;
  --red: #dc2626;
  --red-dark: #991b1b;
  --red-bg: #fef2f2;
  --amber: #d97706;
  --amber-dark: #92400e;
  --amber-bg: #fffbeb;
  --green: #059669;
  --green-dark: #065f46;
  --green-bg: #ecfdf5;
  --bg: #f8fafc;
  --border: #e2e8f0;
  --muted: #475569;
  --slate-500: #64748b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: "Inter", system-ui, sans-serif;
  color: var(--navy);
}

::placeholder {
  color: var(--slate-500);
}

a {
  color: var(--trust);
}
a:hover {
  color: var(--trust-hover);
}

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  background: var(--navy);
  color: #fff;
  padding: 22px 20px 24px;
}
.app-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-header .brand-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--trust);
  align-items: center;
  justify-content: center;
  flex: none;
}
.app-header .brand-name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.app-header .brand-tagline {
  font-size: 13px;
  color: #cbd5e1;
}
.source-tags {
  display: flex;
  gap: 6px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.source-tag {
  font-size: 12px;
  font-weight: 500;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 4px 10px;
}

/* Simple back-button header (Result, Report screens) */
.page-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 12px;
}
.page-header .back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  border-radius: 12px;
  color: var(--navy);
  cursor: pointer;
  text-decoration: none;
}
.page-header .back-button:hover {
  background: #f1f5f9;
}
.page-header .page-title {
  font-size: 17px;
  font-weight: 600;
}

/* Main content */
.app-main {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

/* Form elements */
label.field-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.claim-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px 14px 12px;
}
.claim-card textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: vertical;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  color: var(--navy);
  min-height: 96px;
  padding: 0;
}
.claim-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 4px;
}
.char-count {
  font-size: 13px;
  color: var(--muted);
}

/* Buttons */
button,
.btn {
  font-family: inherit;
  cursor: pointer;
}
button:focus-visible,
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
label:focus-within {
  outline: 3px solid var(--trust);
  outline-offset: 2px;
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--trust);
  color: #fff;
  border: none;
  border-radius: 12px;
  min-height: 56px;
  width: 100%;
  font-size: 17px;
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--trust-hover);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: #fff;
  color: var(--navy);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  min-height: 52px;
  font-size: 15px;
  font-weight: 500;
}
.btn-secondary:hover {
  border-color: var(--trust);
}

.btn-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: none;
  color: var(--navy);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: 10px;
}
.btn-chip:hover {
  background: var(--border);
}

.btn-dashed {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  border: 1.5px dashed #94a3b8;
  color: var(--navy);
  border-radius: 12px;
  min-height: 52px;
  width: 100%;
  font-size: 15px;
  font-weight: 500;
}
.btn-dashed:hover {
  border-color: var(--trust);
}

/* Privacy line */
.privacy-line {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
}

/* Link card */
.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-decoration: none;
  color: var(--navy);
}
.link-card:hover {
  border-color: var(--cyan);
}
.link-card-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: #ecfeff;
  align-items: center;
  justify-content: center;
}
.link-card-title {
  display: block;
  font-size: 16px;
  font-weight: 600;
}
.link-card-desc {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}

/* Image attachment */
.image-attachment {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
}
.image-attachment img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
}
.image-attachment-name {
  flex: 1;
  font-size: 14px;
  color: var(--navy);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.image-attachment-remove {
  background: none;
  border: none;
  color: var(--muted);
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.image-attachment-remove:hover {
  background: #f1f5f9;
}

.inline-message {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

/* Bottom nav */
.bottom-nav {
  display: flex;
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 6px 8px calc(16px + env(safe-area-inset-bottom));
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 100;
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 0;
  min-height: 44px;
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.bottom-nav a.active {
  color: var(--trust);
  font-weight: 600;
}

/* Reserve space at the bottom of scrollable content on pages with the fixed
   bottom nav, so the last item is never hidden behind it. */
.app-main.has-bottom-nav {
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

/* Result / state cards */
.state-card {
  border: 1.5px solid;
  border-radius: 16px;
  padding: 18px;
}
.state-card.high {
  background: var(--red-bg);
  border-color: var(--red);
}
.state-card.medium {
  background: var(--amber-bg);
  border-color: var(--amber);
}
.state-card.low {
  background: var(--green-bg);
  border-color: var(--green);
}
.state-card.neutral {
  background: #fff;
  border-color: var(--border);
}
.state-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.state-card-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
}
.state-card.high .state-card-icon {
  background: var(--red);
}
.state-card.medium .state-card-icon {
  background: var(--amber);
}
.state-card.low .state-card-icon {
  background: var(--green);
}
.state-card.neutral .state-card-icon {
  background: #f1f5f9;
}
.state-card-title {
  font-size: 19px;
  font-weight: 700;
}
.state-card.high .state-card-title,
.state-card.high .state-card-subtitle {
  color: var(--red-dark);
}
.state-card.medium .state-card-title,
.state-card.medium .state-card-subtitle {
  color: var(--amber-dark);
}
.state-card.low .state-card-title,
.state-card.low .state-card-subtitle {
  color: var(--green-dark);
}
.state-card-subtitle {
  font-size: 14px;
  font-weight: 500;
}
.state-card-body {
  margin: 14px 0 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--navy);
}
.state-card-action {
  display: flex;
  gap: 10px;
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 14px;
  align-items: flex-start;
}
.state-card-action span {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}
.state-card.high .state-card-action svg {
  stroke: var(--red);
}
.state-card.medium .state-card-action svg {
  stroke: var(--amber);
}
.state-card.low .state-card-action svg {
  stroke: var(--green);
}

/* Generic info card */
.info-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.info-card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
}
.info-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.info-row svg {
  flex: none;
  margin-top: 2px;
  stroke: var(--trust);
}
.info-row span {
  font-size: 14px;
  line-height: 1.5;
  color: var(--navy);
}
.info-row .muted {
  color: var(--muted);
}

/* Message-checked card (Result screen) */
.message-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.message-card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.message-card-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.message-card-image-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.message-card-image-row img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--border);
}

/* Matched-source card (Result screen) */
.source-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.source-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.source-card-head-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.source-card-title {
  font-size: 15px;
  font-weight: 600;
}
.source-card-subtitle {
  font-size: 13px;
  color: var(--muted);
}
.source-card-quote {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.source-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  margin-top: 10px;
  text-decoration: none;
  min-height: 44px;
}

.plain-link-button {
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  padding: 12px;
  min-height: 44px;
  text-decoration: underline;
  color: var(--navy);
  background: none;
  border: none;
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .btn-primary,
  .btn-secondary,
  .btn-dashed,
  .link-card,
  .bottom-nav a {
    transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
  }
}

/* Simple navy header with title + subtitle (About screen) */
.simple-header {
  background: var(--navy);
  color: #fff;
  padding: 22px 20px 24px;
}
.simple-header-title {
  font-size: 20px;
  font-weight: 700;
}
.simple-header-subtitle {
  font-size: 14px;
  color: #cbd5e1;
  margin-top: 6px;
  line-height: 1.5;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Feature card (About screen) */
.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  gap: 14px;
}
.feature-card-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
}
.feature-card-title {
  font-size: 16px;
  font-weight: 600;
}
.feature-card-title .muted-suffix {
  font-weight: 400;
  color: var(--muted);
}
.feature-card-desc {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}
.feature-card-desc.secondary {
  margin-top: 4px;
}

/* Can-do / cannot-do list card (About screen) */
.list-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}
.list-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
}
.list-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--navy);
}

/* Sources screen */
.search-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  min-height: 48px;
  margin-top: 14px;
}
.search-input-row input {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  width: 100%;
  color: var(--navy);
}
.filter-chips {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.filter-chip {
  font-size: 13px;
  font-weight: 500;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--navy);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  min-height: 36px;
}
.filter-chip.active {
  font-weight: 600;
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.source-entry {
  display: flex;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  text-decoration: none;
  color: var(--navy);
}
.source-entry:hover {
  border-color: var(--cyan);
}
.source-entry-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.source-entry-desc {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.5;
}
.source-entry-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  padding: 3px 8px;
  margin-top: 8px;
}
.source-entry-badge.who {
  color: var(--trust);
  background: #eff6ff;
}
.source-entry-badge.cdc {
  color: #0e7490;
  background: #ecfeff;
}
.source-entry-badge.minsante,
.source-entry-badge.dpml {
  color: #334155;
  background: #f1f5f9;
}
.sources-footer-note {
  text-align: center;
  font-size: 13px;
  color: var(--slate-500);
  padding: 8px 0;
}

/* Report screen */
.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  min-height: 52px;
  cursor: pointer;
}
.radio-option.selected {
  background: #eff6ff;
  border-color: var(--trust);
}
.radio-dot {
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  border: 2px solid #94a3b8;
  align-items: center;
  justify-content: center;
}
.radio-option.selected .radio-dot {
  border-color: var(--trust);
}
.radio-dot-inner {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--trust);
  display: none;
}
.radio-option.selected .radio-dot-inner {
  display: block;
}
.radio-label {
  font-size: 15px;
  font-weight: 500;
}
.radio-option.selected .radio-label {
  font-weight: 600;
}

textarea.text-input,
.text-input-box {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--navy);
  font-family: inherit;
  width: 100%;
  min-height: 120px;
  resize: vertical;
}
.field-hint {
  font-size: 13px;
  color: var(--slate-500);
  margin-top: 6px;
}
input.contact-input {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  min-height: 52px;
  font-size: 16px;
  font-family: inherit;
  width: 100%;
  color: var(--navy);
}

/* Trending screen */
.trending-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  padding: 3px 8px;
  margin-top: 8px;
}
.trending-badge.high {
  color: var(--red-dark);
  background: var(--red-bg);
}
.trending-badge.medium {
  color: var(--amber-dark);
  background: var(--amber-bg);
}
.trending-badge.low {
  color: var(--green-dark);
  background: var(--green-bg);
}
.trending-badge.notfound {
  color: var(--amber-dark);
  background: var(--amber-bg);
}
.trending-empty {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 24px 16px;
}
