/* The Prepcook website. "Clean station": a light warm-paper ground with a
   dark variant, the chef-jacket blue #3F6AA6 as the only accent, amber only
   for "Needs you" attention, Figtree for text and JetBrains Mono for keys,
   paths and code. The values mirror the app's tokens in
   packages/web-core/src/app/styles/new/index.css. */

:root {
  color-scheme: light;
  --bg: #f7f6f3;
  --surface: #ffffff;
  --panel: #efede8;
  --raised: #fbfaf8;
  --border: #e4e1da;
  --divider: #f0eee9;
  --text-high: #1f2328;
  --text: #4b4f56;
  --text-low: #6a6f78;
  --brand: #3f6aa6;
  --brand-hover: #2f5285;
  --brand-text: #2f5285;
  --brand-soft: #e7eef8;
  --brand-soft-fg: #2f5285;
  --on-brand: #ffffff;
  --attention: #d29a1c;
  --attention-fg: #9a6700;
  --attention-soft: #fff4d6;
  --attention-border: #ebd9a8;
  --scrim: rgba(31, 35, 40, 0.45);
  --radius: 8px;
  --radius-lg: 10px;
  --header-h: 56px;
  --font-sans:
    'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Helvetica,
    Arial, sans-serif;
  --font-mono:
    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #1e1e21;
    --surface: #27282c;
    --panel: #2d2e33;
    --raised: #222225;
    --border: #37383e;
    --divider: #33343a;
    --text-high: #eceae4;
    --text: #c9cbd0;
    --text-low: #a0a3aa;
    --brand-hover: #4a7fbf;
    --brand-text: #8fb0de;
    --brand-soft: #243246;
    --brand-soft-fg: #9dbce8;
    --attention: #e7b94c;
    --attention-fg: #e7b94c;
    --attention-soft: #3a3120;
    --attention-border: #5a4a1f;
    --scrim: rgba(10, 10, 12, 0.6);
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #1e1e21;
  --surface: #27282c;
  --panel: #2d2e33;
  --raised: #222225;
  --border: #37383e;
  --divider: #33343a;
  --text-high: #eceae4;
  --text: #c9cbd0;
  --text-low: #a0a3aa;
  --brand-hover: #4a7fbf;
  --brand-text: #8fb0de;
  --brand-soft: #243246;
  --brand-soft-fg: #9dbce8;
  --attention: #e7b94c;
  --attention-fg: #e7b94c;
  --attention-soft: #3a3120;
  --attention-border: #5a4a1f;
  --scrim: rgba(10, 10, 12, 0.6);
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: break-word;
}

a {
  color: var(--brand-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

img {
  max-width: 100%;
  height: auto;
}

code,
pre,
kbd {
  font-family: var(--font-mono);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 50;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--on-brand);
}

.skip:focus {
  top: 8px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  color: var(--text-high);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.2px;
  text-decoration: none;
}

.brand-mark {
  display: block;
  flex-shrink: 0;
  color: var(--brand);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.header-nav a {
  padding: 6px 10px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.header-nav a:hover {
  background: var(--panel);
  color: var(--text-high);
}

.header-nav a[aria-current='page'] {
  color: var(--text-high);
  background: var(--panel);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-high);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--panel);
}

.theme-toggle .icon-sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .icon-sun {
    display: block;
  }
  :root:not([data-theme='light']) .theme-toggle .icon-moon {
    display: none;
  }
}

:root[data-theme='dark'] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme='dark'] .theme-toggle .icon-moon {
  display: none;
}

.menu-button {
  display: none;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 64px;
  font-size: 14px;
  color: var(--text-low);
}

.footer-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  justify-content: space-between;
  align-items: baseline;
}

.footer-inner p {
  margin: 0;
}

.footer-inner strong {
  color: var(--text-high);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--text);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-high);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: var(--panel);
  text-decoration: none;
}

.button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--on-brand);
}

.button.primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

/* Prose: rendered docs and the hand-written pages */

.prose {
  color: var(--text);
  min-width: 0;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  position: relative;
  color: var(--text-high);
  line-height: 1.3;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.prose h1 {
  margin: 0 0 16px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.prose h2 {
  margin: 48px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.prose h3 {
  margin: 32px 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.prose h4 {
  margin: 24px 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.prose .anchor {
  margin-left: 8px;
  color: var(--text-low);
  font-weight: 500;
  text-decoration: none;
  opacity: 0;
}

.prose :is(h1, h2, h3, h4):hover .anchor,
.prose .anchor:focus-visible {
  opacity: 1;
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose .table-wrap,
.prose .code-block {
  margin: 0 0 16px;
}

.prose ul,
.prose ol {
  padding-left: 24px;
}

.prose li {
  margin: 4px 0;
}

.prose li > ul,
.prose li > ol {
  margin: 4px 0;
}

.prose li:has(> input[type='checkbox']) {
  list-style: none;
}

.prose li > input[type='checkbox'] {
  margin: 0 8px 0 -22px;
  accent-color: var(--brand);
}

.prose strong {
  color: var(--text-high);
  font-weight: 600;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

.prose blockquote {
  padding: 4px 16px;
  border-left: 3px solid var(--border);
  color: var(--text);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose :not(pre) > code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--panel);
  color: var(--text-high);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

.prose a code {
  color: inherit;
}

.prose p[align='center'] {
  text-align: center;
}

.prose img[src$='.png'] {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

/* Code blocks: mono, scrollable sideways, with a header strip that carries
   the language and the copy button (the script reveals it). */

.code-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--raised);
  overflow: hidden;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 0 6px 0 14px;
  border-bottom: 1px solid var(--divider);
  background: var(--surface);
}

.code-lang {
  color: var(--text-low);
  font-family: var(--font-mono);
  font-size: 12px;
}

.copy {
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-low);
  font: 500 12px var(--font-sans);
  cursor: pointer;
}

.copy:hover {
  border-color: var(--border);
  color: var(--text-high);
}

.code-block pre {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  color: var(--text-high);
  font-size: 13px;
  line-height: 1.6;
  tab-size: 2;
}

/* Tables */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

.table-wrap th,
.table-wrap td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--divider);
  text-align: left;
  vertical-align: top;
}

.table-wrap th {
  background: var(--raised);
  color: var(--text-high);
  font-weight: 600;
  white-space: nowrap;
}

.table-wrap tr:last-child td {
  border-bottom: 0;
}

.table-wrap td code {
  overflow-wrap: normal;
  white-space: nowrap;
}

/* Docs layout: sidebar, article, on-this-page */

.doc-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 216px;
  gap: 48px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}

.sidebar {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 24px 0 32px;
}

.nav-group + .nav-group {
  margin-top: 20px;
}

.nav-title {
  margin: 0 0 6px;
  padding: 0 10px;
  color: var(--text-low);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar ul,
.toc ul,
.toc-inline ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar a {
  display: block;
  padding: 5px 10px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}

.sidebar a:hover {
  background: var(--panel);
  color: var(--text-high);
}

.sidebar a[aria-current='page'] {
  background: var(--brand-soft);
  color: var(--brand-soft-fg);
  font-weight: 600;
}

.sidebar code {
  font-size: 12.5px;
}

.doc-main {
  min-width: 0;
  max-width: 780px;
  padding: 32px 0 0;
}

.crumb {
  margin: 0 0 8px;
  color: var(--text-low);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc {
  position: sticky;
  top: var(--header-h);
  align-self: start;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 32px 0;
  font-size: 13px;
}

.toc a,
.toc-inline a {
  display: block;
  padding: 3px 10px;
  border-left: 2px solid var(--border);
  color: var(--text-low);
  line-height: 1.4;
  text-decoration: none;
}

.toc a:hover,
.toc-inline a:hover {
  color: var(--text-high);
  border-left-color: var(--brand);
}

.toc code,
.toc-inline code {
  font-size: 12px;
}

.toc-inline {
  display: none;
  margin: 0 0 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 14px;
}

.toc-inline summary {
  padding: 8px 12px;
  color: var(--text-high);
  font-weight: 600;
  cursor: pointer;
}

.toc-inline ul {
  padding: 0 12px 12px;
}

.edit {
  margin: 48px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 0;
}

.pager a {
  display: block;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-high);
  font-weight: 600;
  text-decoration: none;
}

.pager a:hover {
  border-color: var(--brand);
}

.pager span {
  display: block;
  color: var(--text-low);
  font-size: 12px;
  font-weight: 500;
}

.pager-next {
  text-align: right;
}

.scrim {
  display: none;
}

/* Hand-written pages */

.page {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 0;
}

.home {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  padding: 64px 0 40px;
  text-align: center;
}

/* The lockup: the mark in brand blue, the name in ink, Figtree 700. Sized in
   em so the mobile rule only has to change the font size. */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.2em;
  margin: 0 0 24px;
  color: var(--text-high);
  font-size: 50px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -1px;
}

.wordmark-mark {
  display: block;
  flex-shrink: 0;
  width: 1.28em;
  height: 1.28em;
  color: var(--brand);
}

.pitch-lead {
  margin: 0 auto 8px;
  max-width: 640px;
  color: var(--text-high);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.3px;
}

.pitch {
  margin: 0 auto 24px;
  max-width: 640px;
  font-size: 17px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.shot {
  margin: 0;
}

.shot a {
  display: block;
  line-height: 0;
}

.shot img {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.shot figcaption {
  margin-top: 10px;
  color: var(--text-low);
  font-size: 13px;
  line-height: 1.5;
}

.shot-board figcaption {
  text-align: center;
}

.shot figcaption strong {
  color: var(--text);
  font-weight: 600;
}

.band {
  margin-top: 72px;
}

.band > h2,
.tammy-teaser h2 {
  margin: 0 0 8px;
  color: var(--text-high);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.4px;
  line-height: 1.25;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--text-low);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-lead {
  margin: 0 0 24px;
  max-width: 640px;
}

.stages {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.stage {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  padding: 20px 24px;
}

.stage + .stage {
  border-top: 1px solid var(--divider);
}

.stage-name {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-content: start;
}

.stage-step {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-soft-fg);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

.stage h3 {
  margin: 0;
  color: var(--text-high);
  font-size: 17px;
  font-weight: 700;
  line-height: 26px;
}

.stage-helper {
  margin: 0;
  color: var(--text-low);
  font-size: 13px;
}

.stage > p {
  margin: 0;
  font-size: 15px;
}

.stage code,
.feature code,
.install :not(pre) > code,
.shot figcaption code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--panel);
  color: var(--text-high);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.feature-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.feature {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.feature h3 {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  color: var(--text-high);
  font-size: 17px;
  font-weight: 700;
}

.feature p {
  margin: 0 0 12px;
  font-size: 15px;
}

.feature > a,
.feature .links {
  margin-top: auto;
  font-size: 14px;
  font-weight: 500;
}

.feature .links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 24px;
  margin-top: 16px;
}

.tammy-teaser {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.tammy-teaser p {
  max-width: 680px;
}

.tammy-teaser .eyebrow {
  margin-top: 0;
}

/* One column at every width: the release card's curl lines need the full
   width to stay readable. */
.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.install {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.install h3 {
  margin: 0 0 8px;
  color: var(--text-high);
  font-size: 17px;
  font-weight: 700;
}

.install p {
  margin: 0 0 12px;
  font-size: 15px;
}

.install p:last-child {
  margin-bottom: 0;
}

.install-next {
  margin: 20px 0 0;
}

.tammy-logo {
  margin: 0 0 24px;
  line-height: 0;
}

.tammy-logo img {
  width: 290px;
}

.lead {
  color: var(--text-high);
  font-size: 18px;
  line-height: 1.6;
}

.tammy .feature h3 {
  font-size: 16px;
}

/* Narrower screens */

@media (max-width: 1199px) {
  .doc-layout {
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 40px;
  }
  .toc {
    display: none;
  }
  .toc-inline {
    display: block;
  }
}

@media (max-width: 959px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stage {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 899px) {
  .menu-button {
    display: inline-flex;
  }
  .doc-layout {
    display: block;
    padding: 0 16px;
  }
  .sidebar {
    position: fixed;
    top: var(--header-h);
    bottom: 0;
    left: 0;
    z-index: 25;
    width: min(300px, 86vw);
    max-height: none;
    padding: 16px 12px 32px;
    border-right: 1px solid var(--border);
    background: var(--bg);
    transform: translateX(-100%);
    visibility: hidden;
    transition:
      transform 0.18s ease,
      visibility 0.18s;
  }
  .nav-open .sidebar {
    transform: none;
    visibility: visible;
  }
  .nav-open .scrim {
    display: block;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 20;
    background: var(--scrim);
  }
  .doc-main {
    padding-top: 24px;
  }
}

@media (max-width: 639px) {
  .header-inner {
    padding: 0 16px;
    gap: 4px;
  }
  .header-nav a {
    padding: 6px 8px;
  }
  .brand {
    font-size: 17px;
  }
  .home,
  .page {
    padding-left: 16px;
    padding-right: 16px;
  }
  .hero {
    padding-top: 40px;
  }
  .wordmark {
    font-size: 38px;
  }
  .pitch-lead {
    font-size: 20px;
  }
  .pitch {
    font-size: 16px;
  }
  .feature-grid,
  .feature-grid.two,
  .gallery {
    grid-template-columns: minmax(0, 1fr);
  }
  .stage {
    padding: 16px;
  }
  .tammy-teaser {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 20px;
  }
  .tammy-teaser img {
    width: 44px;
    height: 44px;
  }
  .prose h1 {
    font-size: 26px;
  }
  .prose h2 {
    font-size: 20px;
  }
  .tammy-logo img {
    width: 220px;
  }
  .footer-inner {
    padding: 24px 16px;
  }
  .pager {
    grid-template-columns: 1fr;
  }
  .pager-next {
    text-align: left;
  }
}

@media (max-width: 479px) {
  .header-nav .external {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar {
    transition: none;
  }
}
