/* Strawberry Ginger — single shared colour & type system */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/source-sans-3.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/source-sans-3-italic.woff2") format("woff2");
}

:root {
  /* Colour tokens — identical site-wide */
  --bg: #f7f7f5;
  --bg-subtle: #f0f0ec;
  --surface: #ffffff;
  --text: #12141a;
  --muted: #4b5565;
  --border: #e6e6e3;
  --accent: #0f766e;
  --accent-dark: #0b5f58;
  --accent-visited: #0a4f4a;
  --on-accent: #ffffff;
  --danger: #b42318;

  /* Type families — headings vs body only (local files; identical on every page) */
  --font-heading: "Source Serif 4", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;

  /* Type scale */
  --fs-h1: clamp(1.75rem, 2.4vw, 2.25rem);
  --fs-h2: 1.35rem;
  --fs-h3: 1.1rem;
  --fs-body: 1.0625rem;
  --fs-caption: 0.82rem;
  --fs-byline: 0.88rem;
  --lh-heading: 1.25;
  --lh-body: 1.6;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  --max: 1120px;
  --content: 720px;
  --shadow: 0 8px 24px rgba(18, 20, 26, 0.06);
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; color-scheme: light only; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  color: var(--text);
  background: var(--bg);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }

/* Links — one colour set site-wide */
a { color: var(--accent); }
a:visited { color: var(--accent-visited); }
a:hover, a:focus-visible { color: var(--accent-dark); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Heading scale — one family everywhere */
h1, h2, h3, h4, h5, h6,
.entry-title,
.sg-archive-head h1,
.sg-post-card__title,
.sg-brand,
.sg-brand-name,
.sg-footer-brand,
.sg-drawer-head h2 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-heading);
  color: var(--text);
  letter-spacing: -0.02em;
}
h1, .entry-title, .sg-archive-head h1 { font-size: var(--fs-h1); margin: 0 0 0.5em; }
h2 { font-size: var(--fs-h2); margin: 1.4em 0 0.5em; font-weight: var(--fw-semibold); }
h3 { font-size: var(--fs-h3); margin: 1.2em 0 0.4em; font-weight: var(--fw-semibold); }
h4, h5, h6 { font-size: var(--fs-body); margin: 1em 0 0.4em; font-weight: var(--fw-semibold); }

p, li, dd, blockquote, .entry-content, .format_text {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--text);
}
.sg-byline, .headline_meta, .sg-post-card__byline {
  font-family: var(--font-body);
  font-size: var(--fs-byline);
  font-weight: var(--fw-regular);
  color: var(--muted);
}
.sg-meta, .sg-count, .sg-post-card__cat, .sg-widget h3, figcaption, .sg-caption {
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  color: var(--muted);
}

.sg-wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.sg-site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  flex: 0 0 auto;
  color: var(--text);
}
.sg-header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  flex-wrap: wrap;
}
.sg-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--text) !important;
  white-space: nowrap;
}
.sg-brand:visited { color: var(--text) !important; }
.sg-brand:hover { color: var(--text) !important; }
.sg-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex: 0 0 auto;
  object-fit: contain;
}
.sg-brand-name { line-height: 1; color: inherit; font: inherit; }
.sg-primary-nav { flex: 1; min-width: 0; }
.sg-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}
.sg-nav a, .sg-more-toggle {
  text-decoration: none;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: var(--fw-medium);
  background: none;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.sg-nav a:visited { color: var(--muted); }
.sg-nav a:hover, .sg-more-toggle:hover,
.sg-nav a[aria-current="page"] {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.sg-header-actions { display: flex; gap: 8px; margin-left: auto; }
.sg-search-toggle, .sg-menu-toggle, .sg-drawer-close {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: var(--fw-semibold);
  cursor: pointer;
  font-family: var(--font-body);
}
.sg-menu-toggle { display: none; }
.sg-more-row {
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  padding: 10px 0;
}
.sg-search-panel {
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  padding: 18px 0;
}
.sg-search-panel-inner p { margin: 0 0 12px; color: var(--muted); max-width: 40rem; }
.sg-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent) !important;
  text-decoration: none;
  font-weight: var(--fw-semibold);
  font-family: var(--font-body);
  padding: 10px 16px;
  border-radius: 8px;
}
.sg-btn:visited { color: var(--on-accent) !important; }
.sg-btn:hover { background: var(--accent-dark); color: var(--on-accent) !important; }

/* Mobile drawer */
.sg-mobile-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(360px, 92vw);
  background: var(--surface);
  color: var(--text);
  z-index: 80;
  padding: 20px;
  overflow: auto;
  box-shadow: -8px 0 24px rgba(0,0,0,.12);
}
.sg-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(18,20,26,.4);
  z-index: 70;
}
.sg-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.sg-drawer-head h2 {
  margin: 0;
  font-size: 1.2rem;
}
.sg-drawer-nav { list-style: none; margin: 0; padding: 0; }
.sg-drawer-nav a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
}
.sg-drawer-nav a:visited { color: var(--text); }
.sg-drawer-nav a:hover { color: var(--accent-dark); }
.sg-drawer-all a { color: var(--accent); }
.sg-drawer-all a:visited { color: var(--accent-visited); }

/* Layout */
.sg-home-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 20px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
  flex: 1 0 auto;
  width: 100%;
  background: transparent;
}
.sg-home-main { min-width: 0; max-width: 100%; }
.sg-stream { display: flex; flex-direction: column; gap: 36px; }

/* Cards */
.sg-post-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  margin: 0 0 14px;
}
.sg-post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sg-post-card__cat {
  display: inline-block;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent);
  margin-bottom: 6px;
  font-weight: var(--fw-semibold);
}
.sg-post-card__cat:visited { color: var(--accent-visited); }
.sg-post-card__title {
  margin: 0 0 10px;
}
.sg-post-card--lead .sg-post-card__title { font-size: var(--fs-h1); }
.sg-post-card--item .sg-post-card__title { font-size: var(--fs-h2); }
.sg-post-card__title a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.sg-post-card__title a:visited { color: var(--accent-visited); }
.sg-post-card__title a:hover { color: var(--accent); }
.sg-archive-head { margin: 0 0 22px; }
.sg-archive-head h1 { margin: 0 0 6px; }
.sg-post-card__excerpt {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: var(--fs-body);
  max-width: 42rem;
}
.sg-post-card__byline { margin: 0; }

/* Sidebar */
.sg-sidebar { color: var(--text); }
.sg-widget {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin: 0 0 18px;
}
.sg-widget:last-child { margin-bottom: 0; }
.sg-widget h3 {
  margin: 0 0 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  color: var(--muted);
}
.sg-widget-list { list-style: none; margin: 0; padding: 0; }
.sg-widget-list li {
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.sg-widget-list li:first-child { border-top: 0; padding-top: 0; }
.sg-widget-list a {
  color: var(--text);
  text-decoration: none;
  font-weight: var(--fw-semibold);
  font-size: 0.95rem;
  font-family: var(--font-body);
}
.sg-widget-list a:visited { color: var(--text); }
.sg-widget-list a:hover { color: var(--accent-dark); }
.sg-count, .sg-meta {
  display: inline;
  color: var(--muted);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
}
.sg-widget-list .sg-meta { display: block; margin-top: 2px; }

/* Pagination */
.sg-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
}
.sg-pagination li { list-style: none; margin: 0; padding: 0; }
.sg-pagination a, .sg-pagination span {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: var(--fw-semibold);
  font-size: 0.95rem;
  font-family: var(--font-body);
}
.sg-pagination a:visited { color: var(--text); }
.sg-pagination a:hover { border-color: var(--accent); color: var(--accent-dark); }
.sg-pagination .is-current {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.sg-pagination .sg-ellipsis {
  border: 0;
  background: transparent;
  min-width: 24px;
  color: var(--muted);
}
.sg-pagination .sg-disabled {
  opacity: 0.45;
  cursor: default;
  color: var(--muted);
}

/* Footer */
.sg-site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 36px 0 48px;
  text-align: center;
  color: var(--muted);
  margin-top: auto;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}
.sg-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  color: var(--text) !important;
  text-decoration: none;
  margin-bottom: 8px;
}
.sg-footer-brand:visited, .sg-footer-brand:hover { color: var(--text) !important; }
.sg-footer-mark {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: contain;
}
.sg-footer-copy {
  margin: 0 0 16px;
  font-size: var(--fs-byline);
  color: var(--muted);
  font-family: var(--font-body);
}
.sg-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: center;
  margin-bottom: 16px;
}
.sg-footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-family: var(--font-body);
}
.sg-footer-nav a:visited { color: var(--muted); }
.sg-footer-nav a:hover { color: var(--accent); }
.sg-footer-top a {
  color: var(--muted);
  font-size: var(--fs-caption);
  text-decoration: none;
}
.sg-footer-top a:visited { color: var(--muted); }
.sg-footer-top a:hover { color: var(--accent-dark); }

/* Article / static page shell */
.sg-page-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 20px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  flex: 1 0 auto;
  width: 100%;
  background: transparent;
}
.sg-page-shell.sg-page-narrow {
  grid-template-columns: minmax(0, 1fr);
  max-width: 820px;
}
.sg-main {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  min-width: 0;
}
.sg-article-header { margin-bottom: 1.25rem; }
.sg-cats {
  margin: 0.5rem 0 0;
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  color: var(--muted);
}
.sg-cats a { color: var(--accent); }
.sg-cats a:visited { color: var(--accent-visited); }
.entry-content a, .format_text a { color: var(--accent); }
.entry-content a:visited, .format_text a:visited { color: var(--accent-visited); }
.entry-content a:hover, .format_text a:hover { color: var(--accent-dark); }

/* Archive list pages */
.sg-archive { color: var(--text); }
.sg-archive-list { list-style: none; margin: 0; padding: 0; }
.sg-archive-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-body);
}
.sg-archive-list a {
  color: var(--accent-dark);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}
.sg-archive-list a:visited { color: var(--accent-visited); }
.sg-archive-list a:hover { color: var(--accent); }

/* Kill leftover theme/ad-hoc colour & type from markup */
.entry-content [style*="font"],
.entry-content [style*="color"],
.entry-content [style*="Font"],
.format_text [style*="font"],
.format_text [style*="color"] {
  font-family: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  font-style: inherit !important;
  letter-spacing: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
  background: transparent !important;
  text-transform: none !important;
}


/* Cookie consent UI — fixed overlay; no body padding / layout shift */
.sg-cookie-ui {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 9999;
  max-width: 720px;
  margin: 0 auto;
  max-height: min(70vh, 520px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--text);
  color: var(--bg);
  border: 1px solid #2a2e38;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  padding: 16px 18px;
  box-sizing: border-box;
  font-family: var(--font-body);
}
.sg-cookie-ui[hidden] { display: none !important; }
.sg-cookie-ui__inner { display: flex; flex-direction: column; gap: 14px; }
.sg-cookie-ui__main {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: flex-start;
  justify-content: space-between;
}
.sg-cookie-ui__title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  font-weight: var(--fw-bold);
  font-family: var(--font-body);
  color: var(--on-accent);
}
.sg-cookie-ui__text {
  flex: 1 1 240px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #e8e8e6;
}
.sg-cookie-ui__text p { margin: 0 0 6px; color: inherit; font-size: inherit; }
.sg-cookie-ui__text a {
  color: #5eead4 !important;
  text-decoration: underline !important;
  margin: 0 !important;
}
.sg-cookie-ui__text a:visited { color: #5eead4 !important; }
.sg-cookie-ui__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
  align-items: center;
}
.sg-cookie-btn {
  appearance: none;
  border-radius: 10px;
  font: inherit;
  font-weight: var(--fw-bold);
  padding: 10px 14px;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--font-body);
  line-height: 1.2;
}
.sg-cookie-btn--reject {
  background: transparent;
  color: #e8e8e6;
  border-color: #6b7280;
}
.sg-cookie-btn--prefs {
  background: var(--surface);
  color: var(--text);
  border-color: #d0d0cc;
}
.sg-cookie-btn--accept {
  background: var(--accent);
  color: var(--on-accent);
}
.sg-cookie-ui__panel {
  border-top: 1px solid #3a3f4a;
  padding-top: 12px;
}
.sg-cookie-ui__panel[hidden] { display: none !important; }
.sg-cookie-ui__panel-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: var(--fw-bold);
  color: var(--on-accent);
}
.sg-cookie-ui__cats {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sg-cookie-ui__cat {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  background: rgba(255,255,255,.04);
  border-radius: 10px;
  padding: 10px 12px;
}
.sg-cookie-ui__cat-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.85rem;
  color: #e8e8e6;
  min-width: 0;
}
.sg-cookie-ui__cat-text strong {
  color: var(--on-accent);
  font-size: 0.9rem;
}
.sg-cookie-ui__cat-text span { color: #c5c7cc; }
.sg-cookie-ui__switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  font-size: 0.8rem;
  color: #c5c7cc;
  cursor: pointer;
  white-space: nowrap;
}
.sg-cookie-ui__switch input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.sg-cookie-ui__actions--panel { justify-content: flex-end; }
@media (max-width: 640px) {
  .sg-cookie-ui {
    left: 8px;
    right: 8px;
    bottom: 8px;
    max-height: 55vh;
    padding: 14px;
  }
  .sg-cookie-ui__actions { width: 100%; }
  .sg-cookie-btn { flex: 1 1 auto; text-align: center; }
}

.sg-legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.95rem;
}
.sg-legal th, .sg-legal td {
  border: 1px solid var(--border, #d8d8d4);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.sg-legal th { background: rgba(0,0,0,.03); }


/* Reserved AdSense layout slots — no live ad units; fixed height prevents CLS */
.sg-ad-slot {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 16px 0;
  border-radius: 8px;
  background: transparent;
  /* fixed reserve so later ad injection does not shift content */
  min-height: 90px;
  overflow: hidden;
}
.sg-ad-slot--top { min-height: 90px; }
.sg-ad-slot--bottom { min-height: 90px; }
.sg-ad-slot--sidebar {
  min-height: 250px;
  margin: 0 0 20px;
}
.sg-ad-slot--home {
  min-height: 90px;
  margin: 8px 0 24px;
}
.sg-widget--ad {
  padding: 0;
  border: none;
  background: transparent;
}


/* Related recipes */
.sg-related {
  margin: 28px 0 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border, #d8d8d4);
}
.sg-related h2 {
  margin: 0 0 14px;
  font-size: 1.25rem;
}
.sg-related__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.sg-related__card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none !important;
  color: inherit !important;
  margin: 0 !important;
}
.sg-related__thumb {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 8px;
  background: #ecece8;
}
.sg-related__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sg-related__title {
  font-size: 0.95rem;
  font-weight: var(--fw-bold, 700);
  line-height: 1.35;
}
@media (max-width: 768px) {
  .sg-related__list { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sg-primary-nav { display: none; }
  .sg-menu-toggle { display: inline-flex; }
  .sg-more-row { display: none !important; }
  .sg-home-layout, .sg-page-shell {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px 16px 40px;
  }
  .sg-post-card--lead .sg-post-card__title { font-size: 1.45rem; }
}
