:root{
  /* LIGHT (default) */
  --bg: #fbfbfe;
  --panel: #ffffff;
  --text: #111827;
  --muted: rgba(17,24,39,.72);
  --line: rgba(17,24,39,.12);
  --accent: #7c3aed;

  --shadow: 0 10px 30px rgba(0,0,0,.10);
  --radius: 16px;
  --max: 1100px;

  --header-bg: rgba(255,255,255,.72);
  --footer-bg: rgba(255,255,255,.75);
  --card-bg: rgba(255,255,255,.92);
  --field-bg: rgba(17,24,39,.03);
  --subcard-bg: rgba(17,24,39,.02);
}

/* DARK overrides */
html[data-theme="dark"]{
  --bg: #0b0d10;
  --panel: #11141a;
  --text: #eef2ff;
  --muted: rgba(238,242,255,.70);
  --line: rgba(238,242,255,.10);

  --shadow: 0 10px 30px rgba(0,0,0,.35);

  --header-bg: rgba(11,13,16,.65);
  --footer-bg: rgba(11,13,16,.75);
  --card-bg: rgba(17,20,26,.88);
  --field-bg: rgba(238,242,255,.05);
  --subcard-bg: rgba(238,242,255,.03);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(124,58,237,.18), transparent 60%),
    radial-gradient(1200px 600px at 90% 0%, rgba(56,189,248,.12), transparent 60%),
    var(--bg);
  color:var(--text);
  line-height:1.6;
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; }

.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 18px;
}

.site-header{
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
}

.brand{
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 18px;
}

.nav{ display:flex; gap: 14px; align-items:center; }
.nav-link{
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--muted);
}
.nav-link:hover{
  background: rgba(127,127,127,.08);
  color: var(--text);
  text-decoration:none;
}

.content{ padding: 26px 0 46px; }

.card{
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-pad{ padding: 18px; }

.h1{ font-size: 44px; line-height: 1.05; margin: 0 0 10px; }
.h2{ font-size: 26px; margin: 0 0 10px; }
.muted{ color: var(--muted); }

.grid{
  display:grid;
  gap: 16px;
}
.grid-2{ grid-template-columns: 1fr; }
@media (min-width: 900px){
  .grid-2{ grid-template-columns: 260px 1fr; }
}

.input, .btn, .select{
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--field-bg);
  color: var(--text);
  padding: 10px 12px;
  font-size: 15px;
}

.input{ width: 100%; }

.btn{
  background: linear-gradient(180deg, rgba(124,58,237,.95), rgba(124,58,237,.75));
  border: 0;
  cursor: pointer;
  font-weight: 700;
}
.btn:hover{ filter: brightness(1.05); text-decoration:none; }

.pill{
  display:inline-flex;
  gap: 6px;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(127,127,127,.06);
  color: var(--muted);
  font-size: 13px;
}

.theme-toggle{
  cursor:pointer;
  user-select:none;
}
.theme-toggle:hover{
  color: var(--text);
  background: rgba(127,127,127,.10);
  text-decoration:none;
}
.theme-icon{ font-size: 14px; line-height: 1; }
.theme-text{ font-weight: 600; }

.recipe-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 720px){
  .recipe-grid{ grid-template-columns: repeat(2, 1fr); }
}

.recipe-card{
  padding: 16px;
}
.recipe-card h3{ margin: 0 0 6px; font-size: 18px; }
.recipe-card p{ margin: 0; color: var(--muted); }

.site-footer{
  border-top: 1px solid var(--line);
  padding: 18px 0;
  background: var(--footer-bg);
}
.footer-inner{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* helpers used in recipe_page.html */
.hero-img{
  width:100%;
  height:auto;
  border-radius:16px;
  border:1px solid var(--line);
}
.subcard{
  background: var(--subcard-bg);
  box-shadow:none;
}
.pill-check { display: inline-flex; }
.pill-check input { position: absolute; opacity: 0; pointer-events: none; }
.pill-check input:checked + .pill {
  background: rgba(124,58,237,.16);
  border-color: rgba(124,58,237,.35);
  color: var(--text);
}
