/* Dogfish guide – print-friendly layout */

/* Box sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Base document */
html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 12pt;
  line-height: 1.5;
  color: #000;
  background-color: #fff;
}

/* Constrain main column to 6.5 inches, centered */
body > header,
body > nav,
body > main,
body > footer {
  max-width: 6.5in;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* Typography */
h1,
h2,
h3 {
  font-weight: 600;
  margin-top: 1.2em;
  margin-bottom: 0.4em;
}

h1 {
  font-size: 1.8em;
  margin-top: 1.2rem;
}

h2 {
  font-size: 1.35em;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 0.2em;
}

h3 {
  font-size: 1.15em;
}

p,
ul,
ol {
  margin-top: 0.3em;
  margin-bottom: 0.6em;
}

ul,
ol {
  padding-left: 1.2rem;
}

a {
  color: inherit;
  text-decoration: underline;
}

/* Header */
.site-header {
  padding-top: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e0e0e0;
}

.site-header .meta {
  font-size: 0.9em;
  color: #555;
}

/* Print button */
.print-btn {
  margin-top: 0.5rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.9em;
  border-radius: 4px;
  border: 1px solid #cccccc;
  background: #f5f5f5;
  cursor: pointer;
}

.print-btn:hover {
  background: #eaeaea;
}

/* Table of contents */
.toc {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #e0e0e0;
  background: #f8f8f8;
}

.toc h2 {
  border-bottom: none;
  margin-top: 0;
}

/* Region blocks */
.region {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-left: 3px solid #e0e0e0;
}

/* Notice / callout */
.notice {
  margin: 0.75rem 0;
  padding: 0.6rem 0.8rem;
  border: 1px solid #e0e0e0;
  background: #f8f8f8;
}

/* Steps list */
.steps {
  padding-left: 1.2rem;
}

/* Details / resources */
.resources {
  margin-top: 0.75rem;
}

.resources > summary {
  cursor: pointer;
  font-weight: 600;
}

/* Recipe cards */
.cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.cards > li {
  border: 1px solid #e0e0e0;
  padding: 0.6rem 0.8rem;
  background: #fafafa;
}

/* Link list */
.linklist {
  padding-left: 1.2rem;
}

/* Fine print & footnotes */
.fineprint {
  font-size: 0.9em;
  color: #555;
}

#footnotes ol {
  padding-left: 1.2rem;
  font-size: 0.9em;
}

/* Footer */
.site-footer {
  margin-top: 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid #e0e0e0;
  font-size: 0.9em;
  color: #555;
}

/* Page and print settings */
@page {
  size: letter portrait;
  margin: 1in;
}

@media print {
  body {
    background: #fff;
    color: #000;
  }

  /* Hide buttons and other interactive controls when printing */
  .print-btn {
    display: none !important;
  }

  /* Try to avoid awkward page breaks inside key blocks */
  .cards > li,
  .region,
  .notice,
  .steps li {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Show URLs next to external links to keep them visible on paper */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.9em;
  }
}
