/* poreclogger.com — design ported from the Lovable template (Fraunces + Karla, warm clinical).
   Plain CSS, no build step. Tokens in oklch. */

:root {
  --radius: 1rem;
  --background: oklch(0.982 0.008 85);
  --foreground: oklch(0.26 0.023 55);
  --surface: oklch(0.962 0.014 84);
  --card: oklch(0.995 0.004 90);
  --primary: oklch(0.58 0.13 42);
  --primary-foreground: oklch(0.99 0.006 90);
  --secondary: oklch(0.945 0.018 80);
  --secondary-foreground: oklch(0.34 0.03 55);
  --muted-foreground: oklch(0.52 0.024 60);
  --accent: oklch(0.93 0.035 75);
  --accent-foreground: oklch(0.32 0.04 50);
  --border: oklch(0.9 0.016 78);
  --ring: oklch(0.58 0.13 42);
  --rating-low: oklch(0.52 0.11 155);
  --rating-low-soft: oklch(0.93 0.05 155);
  --rating-mild: oklch(0.66 0.11 85);
  --rating-mild-soft: oklch(0.95 0.05 90);
  --rating-mid: oklch(0.62 0.15 65);
  --rating-mid-soft: oklch(0.94 0.06 75);
  --rating-high: oklch(0.55 0.18 25);
  --rating-high-soft: oklch(0.94 0.045 30);
  --shadow-card: 0 1px 2px oklch(0.35 0.04 60 / 0.05), 0 12px 32px -18px oklch(0.35 0.04 60 / 0.35);
  --shadow-lift: 0 2px 4px oklch(0.35 0.04 60 / 0.06), 0 24px 48px -24px oklch(0.35 0.04 60 / 0.4);
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-sans: "Karla", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font: 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; margin: 0; }
a { color: inherit; }
p { margin: 0; }

.container { max-width: 48rem; margin: 0 auto; padding: 0 1.25rem; }
.container-wide { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }
main.container { padding-top: 2.5rem; padding-bottom: 2.5rem; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  background: color-mix(in oklab, var(--background) 85%, transparent);
  backdrop-filter: blur(8px);
}
.site-header .container-wide { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding-top: 0.75rem; padding-bottom: 0.75rem; }
.brand { display: flex; align-items: center; gap: 0.5rem; min-width: 0; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 0.75rem;
  background: var(--primary); color: var(--primary-foreground);
  font-family: var(--font-display); font-weight: 600; font-size: 0.875rem;
}
.brand-name { font-family: var(--font-display); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.nav-link {
  border-radius: 999px; padding: 0.375rem 0.75rem; font-size: 0.875rem; font-weight: 500;
  color: var(--muted-foreground); text-decoration: none; transition: background 0.15s, color 0.15s;
}
.nav-link:hover, .nav-link[aria-current="page"] { background: var(--secondary); color: var(--foreground); }
.chip-soon {
  margin-left: 0.4rem; border-radius: 999px; background: var(--accent); color: var(--accent-foreground);
  padding: 0.1rem 0.5rem; font-size: 0.625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}

/* hero */
.kicker {
  display: inline-block; width: fit-content; border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-foreground); margin-bottom: 1rem;
}
h1 { font-size: 2.5rem; line-height: 1.15; }
@media (min-width: 640px) { h1 { font-size: 3rem; } }
.sub { font-size: 1.125rem; color: var(--muted-foreground); margin-top: 1rem; max-width: 40rem; }

/* checker */
.checker-card {
  display: grid; gap: 0.75rem; margin-top: 2rem; border: 1px solid var(--border); background: var(--card);
  border-radius: calc(var(--radius) + 12px); padding: 1.25rem; box-shadow: var(--shadow-card);
}
.checker-label { font-size: 0.875rem; font-weight: 600; }
textarea {
  width: 100%; resize: vertical; border: 1px solid var(--border); background: var(--background);
  border-radius: calc(var(--radius) + 8px); padding: 0.75rem 1rem; font: inherit; line-height: 1.6; color: inherit;
}
textarea:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 4px color-mix(in oklab, var(--ring) 15%, transparent); }
.checker-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer;
  border-radius: 999px; background: var(--primary); color: var(--primary-foreground);
  padding: 0.75rem 1.5rem; font: inherit; font-size: 0.875rem; font-weight: 600; box-shadow: var(--shadow-card);
  transition: opacity 0.15s, transform 0.05s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.99); }
.link-quiet {
  border: 0; background: none; cursor: pointer; padding: 0; font: inherit; font-size: 0.875rem; font-weight: 500;
  color: var(--muted-foreground); text-decoration: none;
}
.link-quiet:hover { color: var(--foreground); text-decoration: underline; text-underline-offset: 4px; }

/* results */
#result { display: grid; gap: 1rem; margin-top: 1.25rem; }
.banner { border-radius: calc(var(--radius) + 12px); border: 1px solid; padding: 1.25rem; }
.banner-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.banner-sub { margin-top: 0.25rem; font-size: 0.875rem; color: color-mix(in oklab, var(--foreground) 70%, transparent); }
.banner-high { border-color: color-mix(in oklab, var(--rating-high) 25%, transparent); background: var(--rating-high-soft); color: var(--rating-high); }
.banner-mild { border-color: color-mix(in oklab, var(--rating-mild) 30%, transparent); background: var(--rating-mild-soft); color: var(--rating-mild); }
.banner-low  { border-color: color-mix(in oklab, var(--rating-low) 25%, transparent); background: var(--rating-low-soft); color: var(--rating-low); }

.result-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: start;
  border: 1px solid var(--border); background: var(--card); border-radius: calc(var(--radius) + 12px);
  padding: 1.25rem; box-shadow: var(--shadow-card);
}
.result-name { font-size: 1.125rem; }
.result-name a { text-decoration: none; }
.result-name a:hover { text-decoration: underline; }
.result-matched { margin-top: 0.125rem; font-size: 0.875rem; color: var(--muted-foreground); }
.result-meta { margin-top: 0.125rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted-foreground); }
.result-note { margin-top: 0.5rem; font-size: 0.875rem; }
.stats-line { font-size: 0.875rem; color: var(--muted-foreground); }

/* rating badge */
.badge {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0;
  width: 3rem; height: 3rem; border-radius: calc(var(--radius) + 4px); border: 1px solid;
  font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; line-height: 1; font-variant-numeric: tabular-nums;
}
.badge-lg { width: 5rem; height: 5rem; font-size: 1.875rem; border-radius: calc(var(--radius) + 8px); }
.badge-denom { margin-top: 0.125rem; font-family: var(--font-sans); font-weight: 500; font-size: 0.55em; opacity: 0.7; }
.tone-low  { background: var(--rating-low-soft);  color: var(--rating-low);  border-color: color-mix(in oklab, var(--rating-low) 25%, transparent); }
.tone-mild { background: var(--rating-mild-soft); color: var(--rating-mild); border-color: color-mix(in oklab, var(--rating-mild) 30%, transparent); }
.tone-mid  { background: var(--rating-mid-soft);  color: var(--rating-mid);  border-color: color-mix(in oklab, var(--rating-mid) 30%, transparent); }
.tone-high { background: var(--rating-high-soft); color: var(--rating-high); border-color: color-mix(in oklab, var(--rating-high) 25%, transparent); }

/* panels, chips */
.panel { border: 1px solid var(--border); background: var(--surface); border-radius: calc(var(--radius) + 12px); padding: 1.25rem; }
.panel summary { cursor: pointer; font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; }
.panel-unknown { font-size: 0.875rem; }
.panel-unknown summary { font-family: var(--font-sans); font-size: 0.875rem; font-weight: 600; }
.panel-body { display: grid; gap: 0.75rem; margin-top: 1rem; font-size: 0.875rem; color: var(--muted-foreground); }
.panel-body strong { color: var(--foreground); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 0; padding: 0; list-style: none; }
.chip {
  border: 1px solid var(--border); background: var(--card); border-radius: 999px;
  padding: 0.375rem 0.75rem; font-size: 0.875rem; color: var(--muted-foreground);
}

/* section rhythm */
.section { margin-top: 3.5rem; }
.section h2 { font-size: 1.5rem; }
.section-gap { display: grid; gap: 0.75rem; margin-top: 0.75rem; }

/* ingredient page */
.breadcrumbs { font-size: 0.875rem; color: var(--muted-foreground); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0; padding: 0; list-style: none; }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--foreground); }
.breadcrumbs .current { color: var(--foreground); }
.ing-header { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.25rem; align-items: center; margin-top: 1.5rem; }
.ing-header h1 { font-size: 1.875rem; }
@media (min-width: 640px) { .ing-header h1 { font-size: 2.25rem; } }
.ing-verdict { margin-top: 0.5rem; color: var(--muted-foreground); }
.prose { display: grid; gap: 0.75rem; margin-top: 0.75rem; color: var(--muted-foreground); }
.source-box { margin-top: 2.5rem; }
.source-box p { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); }

/* list rows (index + related) */
.row-list { display: grid; gap: 0.5rem; margin: 0.75rem 0 0; padding: 0; list-style: none; }
.row-link {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center;
  border: 1px solid var(--border); background: var(--card); border-radius: calc(var(--radius) + 8px);
  padding: 0.75rem 1rem; box-shadow: var(--shadow-card); text-decoration: none; transition: box-shadow 0.15s;
}
.row-link:hover { box-shadow: var(--shadow-lift); }
.row-name { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-note { display: block; font-size: 0.875rem; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* A–Z nav */
.alpha-nav { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 1.5rem; }
.alpha-nav a, .alpha-nav span { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 600; }
.alpha-nav a { border: 1px solid var(--border); background: var(--card); text-decoration: none; transition: background 0.15s; }
.alpha-nav a:hover { background: var(--accent); }
.alpha-nav span { color: color-mix(in oklab, var(--muted-foreground) 40%, transparent); }
.letter-section { margin-top: 2.5rem; scroll-margin-top: 6rem; }
.letter-section h2 { font-size: 1.25rem; color: var(--muted-foreground); }

/* footer */
.site-footer { margin-top: 5rem; border-top: 1px solid var(--border); background: var(--surface); }
.site-footer .container-wide { display: grid; gap: 1.5rem; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 0.875rem; }
.footer-nav a { color: var(--muted-foreground); text-decoration: none; }
.footer-nav a:hover { color: var(--foreground); }
.disclaimer { max-width: 40rem; font-size: 0.875rem; color: var(--muted-foreground); }
.copyright { font-size: 0.75rem; color: color-mix(in oklab, var(--muted-foreground) 70%, transparent); }
