/* Bill's Chill Kitchen — technical-docs style */

:root {
  --text: #202124;
  --text-muted: #5f6368;
  --link: #1a73e8;
  --link-visited: #681da8;
  --border: #dadce0;
  --bg: #ffffff;
  --bg-subtle: #f8f9fa;
  --nav-active-bg: #e8f0fe;
  --nav-active-text: #1967d2;
  --note-bg: #e8f0fe;
  --note-border: #1a73e8;
  --tip-bg: #e6f4ea;
  --tip-border: #188038;
  --caution-bg: #fef7e0;
  --caution-border: #f9ab00;
  --code-bg: #f1f3f4;
  --code-text: #37474f;
  --header-h: 64px;
  --font: "Roboto", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Google Sans", "Product Sans", "Roboto", Arial, sans-serif;
  --font-mono: "Roboto Mono", "SFMono-Regular", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 20px;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 26px; line-height: 1; }
.brand-sub { color: var(--text-muted); }

.header-tabs {
  display: flex;
  height: 100%;
  gap: 4px;
}
.header-tabs a {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 3px solid transparent;
}
.header-tabs a:hover { color: var(--text); text-decoration: none; }
.header-tabs a.active { color: var(--nav-active-text); border-bottom-color: var(--nav-active-text); }

.header-right { margin-left: auto; }
.header-right a {
  display: inline-block;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: var(--link);
  border-radius: 4px;
}
.header-right a:hover { background: #1765cc; text-decoration: none; }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr) 240px;
  max-width: 1440px;
  margin: 0 auto;
}

/* Left nav */
.side-nav {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 24px 0;
  border-right: 1px solid var(--border);
  font-size: 14px;
}
.side-nav h2 {
  margin: 16px 24px 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.side-nav h2:first-child { margin-top: 0; }
.side-nav ul { list-style: none; margin: 0 0 8px; padding: 0; }
.side-nav a {
  display: block;
  padding: 6px 24px;
  color: var(--text);
  border-radius: 0 16px 16px 0;
  margin-right: 12px;
}
.side-nav a:hover { background: var(--bg-subtle); text-decoration: none; }
.side-nav a.active { background: var(--nav-active-bg); color: var(--nav-active-text); font-weight: 500; }
.side-nav .soon { display: block; padding: 6px 24px; color: var(--text-muted); font-style: italic; }

/* Main content */
.content {
  padding: 32px 48px 64px;
  max-width: 880px;
}

.breadcrumbs {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-muted);
}
.breadcrumbs li + li::before { content: "›"; margin: 0 8px; }
.breadcrumbs a { color: var(--text-muted); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; color: var(--text); }
h1 { font-size: 36px; line-height: 1.25; margin: 0 0 12px; }
h2 { font-size: 26px; line-height: 1.3; margin: 48px 0 12px; padding-top: 8px; }
h3 { font-size: 20px; line-height: 1.4; margin: 32px 0 8px; font-weight: 500; }
h2 a.anchor, h3 a.anchor { visibility: hidden; margin-left: 8px; color: var(--text-muted); font-size: .8em; }
h2:hover a.anchor, h3:hover a.anchor { visibility: visible; }

.lede { font-size: 18px; color: var(--text-muted); margin: 0 0 24px; }

.meta {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 24px;
}

code, .chip {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Spec table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 15px;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
thead th {
  background: var(--bg-subtle);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
td.num, th.num { white-space: nowrap; }
.spec th { width: 40%; font-weight: 500; background: var(--bg-subtle); }
.spec td strong { font-size: 18px; }

/* Callouts */
.callout {
  margin: 20px 0;
  padding: 14px 20px;
  border-left: 4px solid var(--note-border);
  background: var(--note-bg);
  border-radius: 0 4px 4px 0;
  font-size: 15px;
}
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }
.callout .label { font-weight: 700; margin-right: 4px; }
.callout.tip { background: var(--tip-bg); border-color: var(--tip-border); }
.callout.caution { background: var(--caution-bg); border-color: var(--caution-border); }

/* Ingredients */
ul.ingredients { padding-left: 20px; }
ul.ingredients li { margin: 4px 0; }

/* Steps */
ol.steps { counter-reset: step; list-style: none; padding: 0; margin: 16px 0; }
ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 16px 48px;
  margin: 0 0 16px;
  border-bottom: 1px solid #f1f3f4;
}
ol.steps > li:last-child { border-bottom: 0; }
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--nav-active-text);
  background: var(--nav-active-bg);
  border-radius: 50%;
}
ol.steps.start-3 { counter-reset: step 2; }
ol.steps.start-5 { counter-reset: step 4; }
ol.steps.start-7 { counter-reset: step 6; }
ol.steps.start-9 { counter-reset: step 8; }

/* Hero photo */
.hero { margin: 0 0 24px; }
.hero img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.hero figcaption { margin-top: 8px; font-size: 14px; color: var(--text-muted); }

/* Photo placeholder (until a real photo is added) */
.photo-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #e8eaed;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 15px;
}
.card .card-placeholder { aspect-ratio: 16 / 9; border: 0; border-radius: 0; }

/* Video */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 16px 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.caption { font-size: 14px; color: var(--text-muted); margin: 0 0 24px; }

/* Cards (home) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin: 16px 0; }
.card {
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  color: var(--text);
  transition: box-shadow .15s;
}
.card:hover { text-decoration: none; box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15); }
.card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.card-body { padding: 16px; }
.card-body h3 { margin: 0 0 4px; font-size: 18px; }
.card-body p { margin: 0; font-size: 14px; color: var(--text-muted); }
.card-body .chip { margin-top: 10px; display: inline-block; }

/* Right TOC */
.toc {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  padding: 32px 16px 32px 0;
  font-size: 14px;
}
.toc h2 { margin: 0 0 8px; padding: 0 0 0 16px; font-family: var(--font); font-size: 14px; font-weight: 500; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc a { display: block; padding: 4px 0 4px 16px; color: var(--text-muted); margin-left: -1px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--link); text-decoration: none; }
.toc a.active { color: var(--nav-active-text); border-left-color: var(--nav-active-text); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  padding: 24px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}
.site-footer a { color: var(--text-muted); text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .layout { grid-template-columns: 240px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 840px) {
  .layout { display: block; }
  .side-nav {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
  }
  .side-nav h2 { margin-left: 16px; }
  .side-nav a, .side-nav .soon { padding-left: 16px; }
  .content { padding: 24px 16px 48px; }
  .header-tabs, .brand-sub { display: none; }
  .site-header { padding: 0 16px; gap: 16px; }
  h1 { font-size: 30px; }
  h2 { font-size: 23px; }
  th, td { padding: 8px 10px; }
}

/* Recipe action buttons */
.recipe-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font: 500 14px/20px var(--font);
  color: var(--link);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}
.btn:hover { background: var(--nav-active-bg); text-decoration: none; }
.btn-primary { color: #fff; background: var(--link); border-color: var(--link); }
.btn-primary:hover { background: #1765cc; }

/* Ingredient checklist */
.hint { margin: -4px 0 8px; font-size: 14px; color: var(--text-muted); }
ul.ingredients li.check-item { list-style: none; margin-left: -20px; }
ul.ingredients li.check-item input {
  width: 18px;
  height: 18px;
  margin: 0 10px 0 0;
  vertical-align: -3px;
  accent-color: var(--link);
  cursor: pointer;
}
ul.ingredients li.check-item label { cursor: pointer; }
ul.ingredients li.check-item input:checked + label { color: var(--text-muted); text-decoration: line-through; }

/* About page */
.profile { display: flex; align-items: center; gap: 20px; margin: 8px 0 24px; }
.profile img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 1px solid var(--border);
  object-fit: cover;
  flex: none;
}
.profile p { margin: 0; }
.profile .name { font-family: var(--font-display); font-size: 22px; }
.profile .role { color: var(--text-muted); font-size: 15px; }
@media (max-width: 840px) { .profile img { width: 112px; height: 112px; } }

.print-only { display: none; }

@media print {
  .site-header, .side-nav, .toc, .site-footer, .no-print, .anchor { display: none !important; }
  .print-only { display: block; }
  .layout { display: block; }
  .content { padding: 0; max-width: none; }
  body { font-size: 12pt; }
  h1 { font-size: 22pt; }
  h2 { font-size: 15pt; margin-top: 18pt; }
  h3 { font-size: 12pt; margin-top: 12pt; }
  .callout { border: 1px solid #999; background: none; }
  ol.steps > li { break-inside: avoid; padding-bottom: 6pt; margin-bottom: 6pt; }
  ol.steps > li::before { background: none; border: 1px solid #999; color: #000; }
  ul.ingredients li.check-item input { display: none; }
  ul.ingredients li.check-item { list-style: disc; margin-left: 0; }
  ul.ingredients li.check-item label { text-decoration: none; color: #000; }
  .print-source { margin-top: 18pt; font-size: 10pt; color: #555; }
  a { color: #000; }
}

/* Recipe card that isn't published yet */
.card-soon { cursor: default; }
.card-soon:hover { box-shadow: none; }
