/* Peptides for Puppies: one stylesheet for the whole site.
   Night-ink broadsheet palette, humanist system type, hairline rules. */

:root {
  --night: #0d1030;
  --ink: #11142a;
  --panel: #161a3c;
  --chalk: #e7e9f2;
  --chalk-soft: #c4c8dc;
  --rule: #2f3577;
  --rule-strong: #4a52a3;
  --link: #b7c0ff;
  --link-hover: #e2e6ff;
  --ember: #f2cf8a;
  --focus: #ffe3a8;
  --measure: 40rem;
  --wide: 72rem;
  --gutter: 16px;
  --type: Seravek, "Gill Sans Nova", Ubuntu, Calibri, "DejaVu Sans", "Source Sans Pro", source-sans-pro, sans-serif;
}

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

html {
  background: var(--night);
  color: var(--chalk);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--chalk);
  font-family: var(--type);
  font-size: 1.125rem;
  line-height: 1.62;
  overflow-wrap: break-word;
}

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

a { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); }
a:focus-visible,
button:focus-visible,
input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

h1, h2, h3 { line-height: 1.2; font-weight: 700; letter-spacing: 0.005em; }
p, li { max-width: var(--measure); }

/* ---------- masthead and question tabs ---------- */

.masthead {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.25rem var(--gutter) 0;
}

.nameplate {
  text-align: center;
  padding-bottom: 0.9rem;
  border-bottom: 4px double var(--rule-strong);
}

.site-name {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.5rem;
  color: var(--chalk);
  text-decoration: none;
  font-size: clamp(1.6rem, 5.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-name:hover { color: var(--ember); }

.site-line {
  margin: 0.2rem auto 0;
  max-width: none;
  color: var(--chalk-soft);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.question-tabs { margin-top: 1rem; }

.tab-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.4rem;
  border-bottom: 1px solid var(--rule-strong);
}

.tab-row li { max-width: none; flex: 1 1 0; display: flex; }

.question-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--rule);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: var(--night);
  color: var(--link);
  text-align: center;
  text-decoration: none;
  font-size: 1.0625rem;
  font-weight: 600;
}

.question-tab:hover { background: var(--ink); color: var(--link-hover); }

.question-tab[aria-current="page"] {
  background: var(--ink);
  color: var(--chalk);
  border-color: var(--rule-strong);
  box-shadow: inset 0 3px 0 var(--ember);
}

/* ---------- page frame ---------- */

.page {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter) 3rem;
}

.opening { max-width: 46rem; padding: 2.25rem 0 1.25rem; }

.kicker {
  margin: 0 0 0.9rem;
  color: var(--ember);
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.opening h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(2rem, 6vw, 3.1rem);
  letter-spacing: -0.005em;
}

.lede { font-size: 1.2rem; margin: 0; }

.lede::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  color: var(--ember);
  font-size: 3.6em;
  font-weight: 700;
  line-height: 0.82;
}

.plate {
  margin: 1.5rem 0 2rem;
  max-width: 60rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.9rem 0;
}

.plate img { width: 100%; background: var(--ink); }

/* ---------- alternating summary and depth ---------- */

.summary {
  max-width: 46rem;
  margin: 2.5rem 0;
  padding: 1.4rem 1.4rem 1.2rem;
  background: var(--ink);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--ember);
  border-radius: 4px;
}

.summary h2 { margin: 0 0 0.8rem; font-size: 1.5rem; }
.summary p:last-child { margin-bottom: 0; }

.depth {
  max-width: 46rem;
  margin: 2.5rem 0;
  padding: 0.2rem 0 0.2rem 1.4rem;
  border-left: 1px solid var(--rule-strong);
}

.depth h2 { margin: 0 0 0.8rem; font-size: 1.4rem; color: var(--chalk); }

.plain-points { margin: 0; padding-left: 1.2rem; }
.plain-points li { margin: 0.55rem 0; padding-left: 0.2rem; }
.plain-points li::marker { color: var(--ember); }

/* ---------- claims, broadsheet columns ---------- */

.claims { margin-top: 3rem; }

.section-title {
  margin: 0 0 0.5rem;
  padding-top: 1rem;
  border-top: 4px double var(--rule-strong);
  font-size: 1.7rem;
}

.claim {
  margin: 0;
  padding: 2rem 0 2.25rem;
  border-bottom: 1px solid var(--rule);
}

.claim-top { margin-bottom: 1.1rem; }

.claim-label {
  margin: 0 0 0.3rem;
  color: var(--chalk-soft);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.claim-words {
  margin: 0;
  font-size: clamp(1.5rem, 4.4vw, 2.1rem);
  font-style: italic;
  font-weight: 600;
  color: var(--chalk);
}

.quick-check {
  padding: 1rem 1.15rem;
  background: var(--panel);
  border-left: 3px solid var(--ember);
  border-radius: 0 4px 4px 0;
}

.check-label {
  margin: 0 0 0.35rem;
  color: var(--ember);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.quick-check p:last-child { margin: 0; }

.longer-look h3 {
  margin: 1.5rem 0 0.6rem;
  font-size: 1.15rem;
  color: var(--chalk-soft);
  letter-spacing: 0.04em;
}

.longer-look p { margin: 0 0 1rem; }

.source-notes {
  margin-top: 1.25rem;
  padding: 0.75rem 0.9rem 0.4rem;
  background: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 4px;
}

.source-heading {
  margin: 0 0 0.3rem;
  color: var(--chalk-soft);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.source-list { list-style: none; margin: 0; padding: 0; }
.source-list li { max-width: none; border-top: 1px solid var(--rule); }
.source-list li:first-child { border-top: none; }

.source-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.55rem 0.2rem;
  font-size: 1rem;
  line-height: 1.4;
}

.page-sources { max-width: 46rem; margin: 2.5rem 0; }

@media (min-width: 1000px) {
  .claim {
    display: grid;
    grid-template-columns: minmax(0, 21rem) minmax(0, 1fr);
    grid-template-areas:
      "top top"
      "quick longer"
      "sources longer";
    column-gap: 3rem;
    align-items: start;
  }
  .claim:nth-of-type(even) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 21rem);
    grid-template-areas:
      "top top"
      "longer quick"
      "longer sources";
  }
  .claim-top { grid-area: top; }
  .quick-check { grid-area: quick; }
  .longer-look { grid-area: longer; }
  .claim .source-notes { grid-area: sources; }
  .longer-look h3 { margin-top: 0; }
  .claim .longer-look { padding: 0 0 0 2rem; border-left: 1px solid var(--rule); }
  .claim:nth-of-type(even) .longer-look { padding: 0 2rem 0 0; border-left: none; border-right: 1px solid var(--rule); }
}

/* ---------- red flags ---------- */

.flag-list { list-style: none; margin: 0; padding: 0; }

.red-flag {
  max-width: none;
  padding: 0.9rem 0 0.9rem 1.1rem;
  border-top: 1px solid var(--rule);
  border-left: 3px solid var(--ember);
  margin: 0 0 0.6rem;
}

.flag-name { margin: 0 0 0.3rem; font-weight: 700; font-size: 1.125rem; }
.flag-why { margin: 0; font-size: 1.0625rem; color: var(--chalk-soft); }

/* ---------- vet question checklist ---------- */

.checklist-block {
  max-width: 46rem;
  margin: 2.75rem 0;
  padding: 1.4rem;
  background: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
}

.checklist-block h2 { margin: 0 0 0.6rem; font-size: 1.6rem; }
.checklist-intro { margin: 0 0 1rem; }

.vet-questions { margin: 0; padding-left: 1.6rem; }

.vet-question {
  margin: 0;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
}

.vet-question::marker { color: var(--ember); font-weight: 700; }

.question-text { display: block; font-weight: 600; font-size: 1.125rem; }
.question-why { display: block; margin-top: 0.2rem; font-size: 1rem; color: var(--chalk-soft); }

.vet-questions.is-checklist { list-style: none; padding-left: 0; }

.vet-questions.is-checklist .vet-question {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.question-label { flex: 1; cursor: pointer; padding-top: 0.45rem; }

.tick {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  border: 2px solid var(--rule-strong);
  border-radius: 6px;
  background: var(--night);
  cursor: pointer;
}

.tick:checked {
  background: var(--ember) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%230d1030' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 28px no-repeat;
  border-color: var(--ember);
}

.vet-question.is-asked .question-text { color: var(--chalk-soft); }

.checklist-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule-strong);
}

.tally { margin: 0 auto 0 0; font-size: 1rem; color: var(--ember); }

.tool-button {
  min-height: 48px;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: var(--panel);
  color: var(--chalk);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.tool-button:hover { background: var(--rule); }

/* ---------- next steps and footer ---------- */

.next-steps {
  display: grid;
  gap: 1rem;
  margin: 3rem 0 0;
  padding-top: 1.5rem;
  border-top: 4px double var(--rule-strong);
}

.next-link {
  display: block;
  min-height: 48px;
  padding: 1.1rem 1.2rem;
  background: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 6px;
  text-decoration: none;
}

.next-link:hover { border-color: var(--ember); }
.next-q { display: block; font-size: 1.3rem; font-weight: 700; color: var(--link); }
.next-d { display: block; margin-top: 0.25rem; font-size: 1rem; color: var(--chalk-soft); }

@media (min-width: 700px) {
  .next-steps { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
}

.colophon {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 2.5rem;
  border-top: 4px double var(--rule-strong);
}

.footer-line { margin: 0 0 0.6rem; font-size: 1rem; }
.checked-line { margin: 0 0 1rem; font-size: 1rem; color: var(--chalk-soft); }

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.footer-links li { max-width: none; }

.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-size: 1rem;
}

/* ---------- narrow screens ---------- */

@media (max-width: 699px) {
  .tab-row { flex-direction: column; gap: 0; border-bottom: none; }
  .question-tab {
    justify-content: flex-start;
    text-align: left;
    border-radius: 0;
    border-bottom: 1px solid var(--rule);
  }
  .tab-row li + li .question-tab { border-top: none; }
  .question-tab[aria-current="page"] { box-shadow: inset 4px 0 0 var(--ember); }
  .summary { padding: 1.1rem 1rem 1rem; }
  .depth { padding-left: 1rem; }
  .checklist-block { padding: 1.1rem 1rem; }
  .lede { font-size: 1.125rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- print: the question list on paper ---------- */

@media print {
  html, body { background: #fff; color: #000; }
  .question-tabs, .next-steps, .plate, .footer-links, .checklist-tools { display: none; }
  .summary, .depth, .checklist-block, .source-notes, .quick-check { background: none; border-color: #999; }
  a { color: #000; }
  .tick { border-color: #000; background: #fff; }
  .kicker, .check-label, .claim-label, .lede::first-letter { color: #000; }
}
