/* Cook.ai Help — Scalar-style layout, Cook zinc + emerald palette. Dark by default. */

:root {
  --accent: #10b981; /* Cook --hw-accent */
  --accent-soft: rgba(16, 185, 129, 0.12);
  --accent-strong: #34d399;
  --radius: 10px;
  --sidebar-w: 286px;
  --content-max: 760px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Dark (default) */
html[data-theme="dark"] {
  --bg: #09090b;
  --bg-sidebar: #0c0c0f;
  --surface: #18181b;
  --surface-hover: #1f1f23;
  --border: #27272a;
  --border-strong: #3f3f46;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-faint: #71717a;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* Light */
html[data-theme="light"] {
  --bg: #ffffff;
  --bg-sidebar: #fafafa;
  --surface: #ffffff;
  --surface-hover: #f4f4f5;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --text-muted: #52525b;
  --text-faint: #a1a1aa;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.ico {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.ico-sm {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Twemoji — SVG emoji so the look is identical across OSes / headless Chromium */
.twemoji {
  display: inline-block;
  height: 0.9em;
  width: 0.9em;
  vertical-align: -0.1em;
  margin: 0 0.05em;
}

/* ---------- Layout ---------- */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 18px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
html[data-theme="dark"] .brand-mark .mark-light {
  display: none;
}
html[data-theme="light"] .brand-mark .mark-dark {
  display: none;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand-name {
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: 11.5px;
  color: var(--text-faint);
}
.dot {
  color: var(--text-muted);
}
.nav-emoji {
  width: 18px;
  height: 18px;
  flex: none;
  display: block;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
}
.nav-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  padding: 16px 8px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 7px 9px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
}
.nav-item:hover {
  background: var(--surface-hover);
  color: var(--text);
  text-decoration: none;
}
.nav-item.active {
  background: var(--border);
  color: var(--text);
}
.nav-item.active .ico {
  color: var(--text);
}

.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 14px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}
.theme-toggle {
  width: 38px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.theme-toggle:hover {
  color: var(--text);
  background: var(--surface-hover);
}
html[data-theme="dark"] .theme-toggle .sun {
  display: none;
}
html[data-theme="light"] .theme-toggle .moon {
  display: none;
}

/* ---------- Content ---------- */
.content {
  flex: 1;
  min-width: 0;
  padding: 64px 56px 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.doc {
  width: 100%;
  max-width: var(--content-max);
  animation: fade 0.25s ease;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin: 0 0 10px;
}
h1 {
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 16px;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.01em;
  font-weight: 650;
  margin: 40px 0 12px;
  padding-top: 8px;
}
.lead {
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 8px;
}
p {
  margin: 0 0 14px;
}

/* Callouts */
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 22px 0;
  box-shadow: var(--shadow);
}
.callout p {
  margin: 6px 0 0;
  color: var(--text-muted);
}
.callout ul {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--text-muted);
}
.callout ul li {
  margin: 5px 0;
}
.callout.tip {
  border-left-color: var(--accent);
}

/* Feature cards grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 18px 0 8px;
}
.feature-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color 0.14s, transform 0.14s, background 0.14s;
}
.feature-card:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-2px);
  text-decoration: none;
}
.fc-icon {
  color: var(--accent);
  margin-bottom: 6px;
}
.fc-title {
  font-weight: 600;
  font-size: 15.5px;
}
.fc-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Numbered steps */
ol.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 8px 0 4px;
}
ol.steps li {
  counter-increment: step;
  position: relative;
  padding: 10px 0 10px 44px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
ol.steps li:last-child {
  border-bottom: none;
}
ol.steps li strong {
  color: var(--text);
  font-weight: 600;
}
ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 9px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  display: grid;
  place-items: center;
}
em {
  color: var(--text);
  font-style: italic;
  opacity: 0.92;
}

.next {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-faint);
}
.next a {
  font-weight: 600;
}

.content-foot {
  width: 100%;
  max-width: var(--content-max);
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 13px;
}

/* ---------- Mobile ---------- */
.topbar {
  display: none;
}
.scrim {
  display: none;
}
.icon-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}

@media (max-width: 860px) {
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 10px 14px;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
  }
  .topbar-brand {
    font-weight: 600;
  }
  .sidebar {
    position: fixed;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  }
  .sidebar.open {
    transform: none;
  }
  .scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 45;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
  }
  .scrim.show {
    opacity: 1;
    pointer-events: auto;
  }
  .content {
    padding: 32px 20px 90px;
  }
  h1 {
    font-size: 30px;
  }
  .lead {
    font-size: 17px;
  }
}
