/* A Scientist's Cookbook — ingredient QR flow (shared)
   Visual language aligned with live marketing site design-ref.
   Brand: cream #fdfaf5, blue #3862e4, gold #c5a059, ink black
   Fonts: Amiri (headings) + Inter (body)
   Mobile-first for QR phone scans
*/

:root {
  --brand-blue: #3862e4;
  --blue: #3862e4;
  --ink: #000000;
  --ink-muted: #1a1a1a;
  --cream: #fdfaf5;
  --gold: #c5a059;
  --white: #ffffff;
  --border: rgba(56, 98, 228, 0.1);
  --border-solid: #e8e2d6;
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  --max: 42rem;
  --container-pad: 1.25rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink-muted);
  background-color: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: var(--transition);
}

a:hover {
  opacity: 0.85;
}

h1,
h2,
h3,
.serif-brand {
  font-family: "Amiri", Georgia, serif;
  font-weight: 700;
  line-height: 1.15;
  color: var(--brand-blue);
}

/* ---------- Sticky nav (matches live site) ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 4px solid var(--brand-blue);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.site-nav__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-nav__logo {
  display: block;
  flex: 0 0 auto;
  text-decoration: none;
  transition: var(--transition);
}

.site-nav__logo:hover {
  opacity: 0.8;
}

.site-nav__logo img {
  display: block;
  width: 200px;
  max-width: 55vw;
  height: auto;
}

.site-nav__home {
  text-decoration: none;
  color: var(--brand-blue);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.site-nav__home:hover {
  opacity: 0.75;
}

/* ---------- Page layout ---------- */
.page {
  flex: 1 0 auto;
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem var(--container-pad) 3rem;
  width: 100%;
}

/* Uppercase gold labels — live site letter-spacing */
.eyebrow,
.label {
  display: block;
  margin: 0 0 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
}

h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 7vw, 3.25rem);
  color: var(--brand-blue);
  line-height: 1.05;
}

h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  color: var(--brand-blue);
}

h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  color: var(--ink);
}

.lede {
  margin: 0 0 1.75rem;
  color: var(--ink-muted);
  font-size: 1.05rem;
  max-width: 36rem;
}

.meta-line {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: #3a3a3a;
}

/* ---------- Panels (editorial cards) ---------- */
.panel {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 1.75rem 1.4rem;
}

.panel + .panel {
  margin-top: 1.25rem;
}

/* ---------- Form ---------- */
.mode-toggle {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.35rem;
  padding: 0.3rem;
  background: rgba(56, 98, 228, 0.06);
  border: 1px solid var(--border);
}

.mode-toggle label {
  flex: 1;
  text-align: center;
  padding: 0.6rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  color: #3a3a3a;
  transition: var(--transition);
}

.mode-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-toggle label:has(input:checked),
.mode-toggle label.is-active {
  background: var(--white);
  color: var(--brand-blue);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.field {
  margin-bottom: 1.15rem;
}

.field label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--gold);
}

.field input,
.field select {
  width: 100%;
  padding: 0.9rem 1rem;
  font: inherit;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--border-solid);
  border-radius: 2px;
  outline: none;
  transition: var(--transition);
}

.field input:focus,
.field select:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(56, 98, 228, 0.18);
}

.field-hint {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: #5a5a5a;
  line-height: 1.5;
}

.field-group[hidden] {
  display: none !important;
}

/* ---------- Buttons (live site CTA language) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  padding: 1.05rem 1.75rem;
  margin-top: 0.5rem;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--brand-blue);
  border: 2px solid var(--brand-blue);
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
}

.btn:hover {
  filter: brightness(1.08);
  text-decoration: none;
  color: var(--white);
  opacity: 1;
}

.btn:active {
  transform: translateY(1px);
}

.btn--ghost {
  background: transparent;
  color: var(--brand-blue);
  border: 2px solid var(--brand-blue);
}

.btn--ghost:hover {
  background: rgba(56, 98, 228, 0.06);
  color: var(--brand-blue);
  filter: none;
}

.btn-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* ---------- Outcome badges ---------- */
.outcome-badge {
  display: inline-block;
  margin-bottom: 0.85rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 0;
}

.outcome-badge--available {
  background: #e8f5ec;
  color: #1d6b3a;
}

.outcome-badge--unavailable {
  background: #eef1f8;
  color: #3a4a7a;
}

.outcome-badge--restricted {
  background: #f8ecec;
  color: #8a3030;
}

/* ---------- Place / alternative cards ---------- */
.place-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.place-card {
  padding: 1.1rem 1.15rem;
  background: var(--cream);
  border: 1px solid var(--border);
}

.place-card__name {
  margin: 0 0 0.25rem;
  font-family: "Amiri", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}

.place-card__place {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: #3a3a3a;
}

.place-card__note {
  margin: 0;
  font-size: 0.8rem;
  color: #8a6b2e;
  font-style: italic;
}

/* ---------- News ---------- */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.news-item {
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--border);
  background: var(--cream);
}

.news-item__title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  color: var(--ink);
}

.news-item__meta {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.news-item__summary {
  margin: 0;
  font-size: 0.92rem;
  color: #3a3a3a;
}

.contact-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.contact-list a {
  display: block;
  padding: 0.85rem 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  font-weight: 600;
  text-decoration: none;
}

.contact-list a:hover {
  border-color: var(--brand-blue);
  opacity: 1;
}

.contact-list small {
  display: block;
  margin-top: 0.2rem;
  font-weight: 400;
  color: #5a5a5a;
}

/* Inline footer note above site footer */
.footer-note {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: #5a5a5a;
  line-height: 1.6;
}

.footer-note code {
  font-size: 0.85em;
  background: rgba(56, 98, 228, 0.06);
  padding: 0.1em 0.35em;
}

/* ---------- Site footer (dark ink + brand mark) ---------- */
.site-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 3.5rem var(--container-pad) 2.5rem;
  background: var(--ink);
  color: var(--white);
  text-align: center;
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.site-footer__logo {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 1.25rem;
  transition: var(--transition);
}

.site-footer__logo:hover {
  opacity: 0.85;
}

.site-footer__logo img {
  width: min(220px, 55vw);
  height: auto;
  margin: 0 auto;
}

.site-footer__wordmark {
  font-family: "Amiri", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  color: var(--gold);
  text-decoration: none;
  display: block;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.site-footer__copy {
  font-size: 0.75rem;
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

@media (min-width: 480px) {
  .btn-row {
    flex-direction: row;
  }

  .btn-row .btn {
    width: auto;
    flex: 1;
  }

  .site-nav__logo img {
    width: 240px;
  }

  .page {
    padding: 3rem var(--container-pad) 3.5rem;
  }

  .panel {
    padding: 2rem 1.75rem;
  }
}

@media (min-width: 900px) {
  :root {
    --container-pad: 2rem;
  }

  .site-nav__inner {
    padding: 1.35rem var(--container-pad);
  }

  .site-nav__logo img {
    width: 280px;
  }
}

/* ---------- Ban notice (banned jurisdictions) ---------- */
.outcome-badge--banned {
  background: #8a2a2a;
  color: #ffffff;
}

.ban-notice {
  margin: 0 0 1.25rem;
  padding: 1.5rem 1.4rem 1.35rem;
  background: #fbf3ee;
  border: 1px solid rgba(138, 42, 42, 0.18);
  border-left: 6px solid #8a2a2a;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.ban-notice__label {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #8a2a2a;
}

.ban-notice__title {
  margin: 0 0 0.75rem;
  font-size: 1.65rem;
  line-height: 1.2;
  color: #8a2a2a;
}

.ban-notice__law {
  margin: 0 0 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(197, 160, 89, 0.45);
  font-size: 0.95rem;
  color: var(--ink);
}

.ban-notice__date {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6b5320;
}

.ban-notice__summary {
  margin: 0 0 0.6rem;
  font-size: 0.98rem;
  color: var(--ink-muted);
}

.ban-notice__source {
  margin: 0;
  font-size: 0.85rem;
  color: #3a3a3a;
}

.ban-notice + .panel {
  margin-top: 0;
}


/* ---------- Google Translate control ---------- */
.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  position: relative;
}

.nav-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.nav-translate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: var(--cream);
  color: var(--brand-blue);
  border: 1.5px solid var(--gold);
  border-radius: 2px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  text-transform: none;
  letter-spacing: normal;
}

.nav-translate:hover,
.nav-translate[aria-expanded="true"] {
  background: var(--brand-blue);
  color: var(--white);
  border-color: var(--brand-blue);
}

.nav-translate:focus-visible {
  outline: 3px solid rgba(56, 98, 228, 0.35);
  outline-offset: 2px;
}

.nav-translate svg {
  width: 18px;
  height: 18px;
  display: block;
}

.translate-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  z-index: 1100;
  min-width: 210px;
  max-width: min(280px, calc(100vw - 24px));
  padding: 0.9rem 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  overflow: visible;
  text-transform: none;
  letter-spacing: normal;
  text-align: left;
}

.translate-panel.is-open {
  display: block;
}

.translate-panel__hint {
  margin: 0 0 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.translate-panel__reset {
  appearance: none;
  -webkit-appearance: none;
  display: inline-block;
  margin-top: 0.65rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--brand-blue) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-transform: none;
  letter-spacing: normal;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  padding: 0;
  cursor: pointer;
}

.translate-panel__reset:hover {
  color: var(--ink);
}

/* Hide Google top banner / tooltips only — keep the widget select visible */
body {
  top: 0 !important;
}

.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame,
iframe.goog-te-banner-frame,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-l4eHX-hJ1YPc-OeYSMe {
  display: none !important;
  visibility: hidden !important;
}

body > .skiptranslate {
  display: none !important;
}

/* Hide Google floating/banner chrome while translated; keep our select */
.VIpgJd-ZVi9od-aZ2wEe,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.VIpgJd-ZVi9od-aZ2wEe-OiiCO,
.VIpgJd-ZVi9od-ORHb,
.VIpgJd-ZVi9od-ORHb *,
iframe.VIpgJd-ZVi9od-ORHb-OEVmcd,
.goog-te-spinner-pos,
.goog-te-menu-frame,
.goog-te-menu-value,
#goog-gt-vt,
.goog-te-ftab,
.goog-te-ftab-float {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
}


#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover {
  display: none !important;
}

.goog-text-highlight {
  background: none !important;
  box-shadow: none !important;
}

.goog-te-gadget {
  font-family: "Inter", system-ui, sans-serif !important;
  font-size: 0 !important;
  color: transparent !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  width: 100%;
}

.goog-te-gadget .goog-te-combo {
  font-family: "Inter", system-ui, sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  color: #1a1a1a !important;
  width: 100%;
  max-width: 100%;
  min-height: 38px;
  padding: 0.55rem 0.65rem;
  background: var(--cream);
  border: 1px solid var(--border-solid);
  border-radius: 2px;
  cursor: pointer;
  text-transform: none !important;
  letter-spacing: normal !important;
  line-height: 1.3 !important;
}

.goog-te-gadget img,
.goog-logo-link,
.goog-te-gadget > span > a {
  display: none !important;
}

@media (min-width: 480px) {
  .nav-translate {
    width: 40px;
    height: 40px;
  }

  .nav-translate svg {
    width: 20px;
    height: 20px;
  }
}


/* ---------- Ingredient chooser (/i/) ---------- */
.page--chooser {
  max-width: 48rem;
}

.chooser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin: 0.5rem 0 0;
}

.chooser-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  min-height: 9.5rem;
  padding: 1.25rem 1.2rem 1.15rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.chooser-card:hover {
  opacity: 1;
  border-color: rgba(56, 98, 228, 0.35);
  box-shadow: 0 10px 28px rgba(56, 98, 228, 0.12);
  transform: translateY(-2px);
}

.chooser-card:focus-visible {
  outline: 3px solid rgba(56, 98, 228, 0.35);
  outline-offset: 2px;
}

.chooser-card__eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.chooser-card__title {
  font-family: "Amiri", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  line-height: 1.05;
  color: var(--brand-blue);
}

.chooser-card__blurb {
  margin-top: 0.15rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-muted);
  flex: 1 1 auto;
}

.chooser-card__cta {
  margin-top: 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-blue);
}

.site-nav__all {
  text-decoration: none;
  color: var(--brand-blue);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.site-nav__all:hover {
  opacity: 0.75;
}

.chooser-back {
  margin: -0.6rem 0 1rem;
  font-size: 0.85rem;
}

.chooser-back a {
  font-weight: 600;
  text-decoration: none;
}

.chooser-back a:hover {
  text-decoration: underline;
}

@media (max-width: 380px) {
  .chooser-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 480px) {
  .chooser-grid {
    gap: 1rem;
  }

  .chooser-card {
    min-height: 10.5rem;
    padding: 1.45rem 1.4rem 1.3rem;
  }
}

@media (min-width: 900px) {
  .page--chooser {
    max-width: 52rem;
  }

  .chooser-grid {
    gap: 1.15rem;
  }
}
