/* Fridge Grid Boss — static companion pages stylesheet (Light Mode default matching main app, zero external deps) */
:root, :root[data-theme="light"] {
  color-scheme: light;
  --bg: #edf1f7;
  --panel: #ffffff;
  --panel-2: #f3f6fb;
  --line: #d5dce8;
  --ink: #161d29;
  --muted: #4e5869;
  --accent: #00749e;
  --accent-text: #ffffff;
  --accent-dim: rgba(0, 116, 158, 0.11);
  --fig-shadow: 0 10px 28px rgba(15, 25, 50, 0.14);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1217;
  --panel: #171b22;
  --panel-2: #202631;
  --line: #2f3847;
  --ink: #e6ebf2;
  --muted: #9aa5b5;
  --accent: #38d9ff;
  --accent-text: #08121a;
  --accent-dim: rgba(56, 217, 255, 0.14);
  --fig-shadow: 0 12px 32px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.68 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { opacity: 0.88; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.g-top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.g-top-in {
  max-width: 920px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.g-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-logo {
  height: 40px;
  width: auto;
  display: block;
  fill: #000;
}
:root[data-theme="dark"] .brand-logo { fill: #fff; }
.g-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.g-nav-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.g-nav-link:hover, .g-nav-link.is-active { color: var(--ink); }

.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.g-btn:active { transform: translateY(1px); }
.g-btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}
.g-btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.g-btn-ghost:hover { border-color: var(--accent); }
.g-btn-howto {
  background: #ff2d4d;
  border-color: #ff2d4d;
  color: #ffffff;
}
.g-btn-howto:hover {
  background: #e8112f;
  border-color: #e8112f;
  color: #ffffff;
  opacity: 1;
}

.g-main {
  flex: 1;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 36px 20px 64px;
}

.g-crumb {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
}
.g-crumb a { color: var(--muted); text-decoration: none; }
.g-crumb a:hover { color: var(--accent); text-decoration: underline; }

h1 {
  font-size: clamp(28px, 4.2vw, 38px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.g-lead {
  font-size: 18px;
  line-height: 1.58;
  color: var(--muted);
  margin: 0 0 24px;
}

h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 34px 0 10px;
  letter-spacing: -0.01em;
}
h3 {
  font-size: 17px;
  line-height: 1.35;
  margin: 22px 0 6px;
}
p { margin: 0 0 15px; }
ul, ol { margin: 0 0 18px; padding-left: 22px; }
li { margin: 0 0 8px; }
li strong { color: var(--ink); }

.g-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 28px;
}

.g-callout {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 22px 0;
}
.g-callout p:last-child { margin-bottom: 0; }

.g-sister {
  background: linear-gradient(135deg, rgba(11, 127, 95, 0.08), rgba(0, 116, 158, 0.07));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 26px 0;
}
:root[data-theme="dark"] .g-sister {
  background: linear-gradient(135deg, rgba(114, 238, 201, 0.08), rgba(56, 217, 255, 0.06));
}
.g-sister h2 { margin-top: 0; font-size: 19px; }
.g-sister p { color: var(--muted); margin-bottom: 12px; }
.g-sister p:last-child { margin-bottom: 0; }

.g-fig {
  margin: 24px 0 28px;
  padding: 0;
}
.g-fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--fig-shadow);
}
.g-fig figcaption {
  margin-top: 9px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.g-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
  margin: 26px 0 32px;
}
.g-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.14s ease, transform 0.14s ease;
}
.g-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  opacity: 1;
}
.g-card-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  margin-bottom: 10px;
}
.g-card h2 {
  font-size: 19px;
  margin: 0 0 8px;
}
.g-card p {
  font-size: 14.5px;
  color: var(--muted);
  margin: 0 0 14px;
  flex: 1;
}
.g-card-go {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.g-faq-cat {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 30px 0 12px;
}
.g-faq-cat:first-of-type { margin-top: 22px; }
.g-faq {
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.g-faq-standalone {
  margin-top: 8px;
  border-top: 0;
  padding-top: 0;
}
.g-faq details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 16px;
  margin-bottom: 10px;
}
.g-faq summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.g-faq summary::-webkit-details-marker { display: none; }
.g-faq summary::after {
  content: "+";
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
  font-weight: 600;
  flex-shrink: 0;
}
.g-faq details[open] summary::after { content: "−"; }
.g-faq details p {
  margin: 10px 0 2px;
  color: var(--muted);
  font-size: 15px;
}

.g-cta {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  margin-top: 34px;
}
.g-cta h2 { margin-top: 0; font-size: 21px; }
.g-cta p { color: var(--muted); margin-bottom: 16px; }
.g-cta .g-actions { margin: 0; }

.g-more {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.g-more h2 { margin-top: 0; font-size: 18px; color: var(--muted); }
.g-more-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 8px;
}
.g-more-list a { font-weight: 600; font-size: 15px; }

.g-foot {
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 22px 20px;
  font-size: 13.5px;
  color: var(--muted);
}
.g-foot-in {
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.g-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.g-foot-links a { color: var(--muted); text-decoration: none; }
.g-foot-links a:hover { color: var(--accent); text-decoration: underline; }

.g-404 {
  text-align: center;
  padding: 56px 20px 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.g-404-code {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  margin-bottom: 16px;
}
.g-404 .g-lead { max-width: 520px; }
.g-404 .g-actions { justify-content: center; margin-bottom: 0; }

@media (max-width: 560px) {
  .g-main { padding: 26px 16px 48px; }
  .brand-logo { height: 32px; }
  .g-cta { padding: 18px; }
}

@media print {
  :root,
  :root[data-theme="light"],
  :root[data-theme="dark"] {
    color-scheme: light;
    --bg: #ffffff;
    --panel: #ffffff;
    --panel-2: #f4f6f9;
    --line: #cbd5e1;
    --ink: #111318;
    --muted: #334155;
    --accent: #00749e;
    --accent-text: #ffffff;
  }
  body { background: #ffffff; color: #111318; min-height: auto; }
  .g-top, .g-actions, .g-cta, .g-foot { display: none !important; }
  .g-fig img { box-shadow: none; break-inside: avoid; }
  .g-main { max-width: none; padding: 0; }
  a { color: #111318; }
}
