/* Well Sourced: palette, type and phone-first layout from intent.md §5 (ADR-0015).
   The phone's own system font is used, so nothing is loaded from another website. */

:root {
  --cream: #FBF8F3;      /* page */
  --ink: #1F2A2E;        /* text */
  --teal: #1F6F6B;       /* links and buttons */
  --sage: #E6EFEA;       /* "Key points" box */
  --terracotta: #A84E36; /* "When to see a doctor" box and warnings */
  --stone: #D9D3CA;      /* lines */
  --white: #FFFFFF;
}

* { box-sizing: border-box; }

html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

.site-header, main, .site-footer { max-width: 40rem; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--stone);
}

.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; padding: 0.6rem 0; }

nav a { display: inline-block; min-height: 44px; min-width: 44px; padding: 0.55rem 0.4rem; }

a { color: var(--teal); text-underline-offset: 0.15em; overflow-wrap: anywhere; }

a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 2px; }

h1 { font-size: 1.75rem; line-height: 1.25; margin: 1.25rem 0 0.5rem; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 1.75rem 0 0.5rem; }

.tagline { margin-top: 0; font-size: 1.05rem; }

.search label { display: block; font-weight: 600; margin: 1rem 0 0.35rem; }
.search-row { display: flex; gap: 0.5rem; }
.search input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  font: inherit;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--ink);
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--ink);
}
.search button {
  min-height: 48px;
  min-width: 48px;
  font: inherit;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--teal);
  color: var(--white);
  cursor: pointer;
}

.topics { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: 0.75rem; }
.topic-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 56px;
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
}

.recent ul, .article-list, .source-list, .result-list, .topic-links { padding-left: 1.2rem; }
.recent li, .article-list li, .source-list li, .result-list li, .topic-links li { margin-bottom: 0.6rem; }
.no-results { margin-top: 1.25rem; }
/* The room for search results is kept from the first paint, so the footer never jumps when they arrive (M-003). */
#results { min-height: 100vh; }
.date { white-space: nowrap; }

.crumb { margin: 1rem 0 0; }

.test-banner { background: var(--terracotta); color: var(--white); padding: 0.5rem 0.75rem; border-radius: 0.5rem; }

.key-points { background: var(--sage); border-radius: 0.6rem; padding: 0.25rem 1rem 0.75rem; margin-top: 1rem; }
.key-points h2 { margin-top: 0.75rem; }

.mark { text-decoration: none; white-space: nowrap; padding: 0 0.15rem; }

.differ { border-left: 4px solid var(--stone); padding-left: 1rem; }

.doctor { border: 2px solid var(--terracotta); border-radius: 0.6rem; padding: 0.25rem 1rem 0.75rem; margin-top: 1.5rem; }
.doctor h2 { color: var(--terracotta); margin-top: 0.75rem; }

.sources ol, .further ul { padding-left: 1.4rem; }
.sources li, .further li { margin-bottom: 0.6rem; }
.new-tab { font-size: 0.9rem; }

.last-updated { margin-top: 1.5rem; font-weight: 600; }

.site-footer { margin-top: 2.5rem; padding-top: 1rem; padding-bottom: 2rem; border-top: 1px solid var(--stone); }
.disclaimer { font-weight: 600; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--white); padding: 0.5rem; }
