*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream: #faf9f7;
  --white: #ffffff;
  --border: #e0ddd5;
  --border-mid: #c8c4bb;
  --text: #2c2c2a;
  --text-mid: #4a4a46;
  --text-muted: #7a7870;
  --text-faint: #aaa89e;
  --bg-subtle: #f4f2ee;
  --error-bg: #fcebeb;
  --error-text: #a32d2d;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

html { font-size: 16px; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--text); }

/* Layout */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-header .logo {
  font-size: 17px;
  font-style: italic;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 1.5rem;
}

.site-header nav a {
  font-family: system-ui, sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  text-decoration: none;
}

.site-header nav a:hover { color: var(--text); }

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.page-wide {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

/* Site footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.5rem;
  text-align: center;
  font-family: system-ui, sans-serif;
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.8;
}

.site-footer a { color: var(--text-faint); }

/* Finder page header */
.finder-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.finder-header h1 {
  font-size: 28px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.01em;
  margin-bottom: 0.5rem;
}

.finder-header p {
  font-family: system-ui, sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 480px;
  margin: 0 auto;
}

/* Intro blurb */
.intro {
  font-family: system-ui, sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* Form */
.form-label {
  display: block;
  font-family: system-ui, sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

textarea {
  width: 100%;
  min-height: 115px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--text);
  font-family: system-ui, sans-serif;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.65;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}

textarea:focus { border-color: var(--text-muted); }
textarea::placeholder { color: var(--text-faint); font-style: italic; }

.btn {
  display: block;
  width: 100%;
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  background: var(--white);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-family: system-ui, sans-serif;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.15s, border-color 0.15s;
}

.btn:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: var(--text-muted);
}

.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-small {
  display: inline-block;
  width: auto;
  margin-top: 1.5rem;
  padding: 0.5rem 1.4rem;
  font-size: 13px;
  color: var(--text-muted);
}

/* Status */
.status {
  font-family: system-ui, sans-serif;
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
  padding: 1.5rem 0;
  display: none;
}

/* Results */
.results-label {
  font-family: system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

.remedy-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.3rem;
  margin-bottom: 0.85rem;
  background: var(--white);
}

.remedy-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.remedy-name {
  font-size: 21px;
  font-weight: 400;
  font-style: italic;
}

.remedy-group {
  font-family: system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.remedy-indication {
  font-family: system-ui, sans-serif;
  font-size: 12px;
  font-weight: 300;
  font-style: italic;
  color: var(--text-faint);
  margin-bottom: 0.8rem;
}

.remedy-components {
  font-family: system-ui, sans-serif;
  font-size: 12px;
  font-weight: 300;
  color: var(--text-faint);
  margin-bottom: 0.6rem;
}

.remedy-divider {
  width: 24px;
  height: 1px;
  background: var(--border);
  margin: 0.65rem 0;
}

.remedy-reason {
  font-family: system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.7;
  margin-bottom: 0.85rem;
}

audio {
  width: 100%;
  margin-top: 0.25rem;
  height: 36px;
}

.audio-note {
  font-family: system-ui, sans-serif;
  font-size: 12px;
  font-style: italic;
  color: var(--text-faint);
  margin-top: 0.5rem;
}

/* Return box */
.return-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  background: var(--bg-subtle);
  margin: 0.25rem 0 1.25rem;
}

.return-box p {
  font-family: system-ui, sans-serif;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  line-height: 1.6;
}

.return-url {
  display: block;
  font-family: monospace;
  font-size: 12px;
  color: var(--text-mid);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.7rem;
  word-break: break-all;
  margin-bottom: 0.5rem;
}

.copy-btn {
  font-family: system-ui, sans-serif;
  font-size: 12px;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  color: var(--text-mid);
}

.copy-btn:hover { background: var(--bg-subtle); }

/* Footer note */
.footer-note {
  font-family: system-ui, sans-serif;
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  line-height: 1.85;
  font-style: italic;
  margin-top: 1rem;
}

.footer-note a { color: var(--text-faint); }

/* Returning banner */
.returning-banner {
  font-family: system-ui, sans-serif;
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

/* Error */
.error-msg {
  font-family: system-ui, sans-serif;
  font-size: 13px;
  color: var(--error-text);
  background: var(--error-bg);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-top: 0.85rem;
  line-height: 1.6;
  word-break: break-word;
}

/* Cookie banner */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  z-index: 100;
  font-family: system-ui, sans-serif;
  font-size: 13px;
  color: var(--text-muted);
}

#cookie-banner p { line-height: 1.5; max-width: 600px; }
#cookie-banner a { color: var(--text-muted); }

.cookie-btns { display: flex; gap: 0.75rem; flex-shrink: 0; }

.cookie-btn {
  padding: 0.4rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-mid);
  font-family: system-ui, sans-serif;
  font-size: 13px;
  cursor: pointer;
  background: var(--white);
  color: var(--text);
}

.cookie-btn.accept {
  background: var(--text);
  color: var(--white);
  border-color: var(--text);
}

.cookie-btn:hover { opacity: 0.85; }

/* About / static pages */
.prose h2 {
  font-size: 20px;
  font-weight: 400;
  font-style: italic;
  margin: 2rem 0 0.75rem;
}

.prose p {
  font-family: system-ui, sans-serif;
  font-size: 14.5px;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.prose p:first-child { margin-top: 0; }

.page-title {
  font-size: 26px;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
