/* Perrin Companion – brand tokens match the app (src/styles.css) */
:root {
  --bg: #fefaf1;          /* cream */
  --surface: #ffffff;
  --text: #1a2d2e;        /* foreground */
  --muted: #4d6264;
  --primary: #50a9a8;     /* brand turquoise – fills and accents */
  --link: #2c7978;        /* darker turquoise – readable text/links */
  --soft: #d2efec;        /* secondary */
  --accent: #abe5dd;
  --border: #d1e3de;
  --radius: 16px;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: "Nunito", ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #132123;
    --surface: #1a2d2e;
    --text: #eaf3f1;
    --muted: #a8bebd;
    --link: #7fd0cc;
    --soft: #20403f;
    --accent: #2b5754;
    --border: #2d4546;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.65 var(--font-sans);
}
a { color: var(--link); text-underline-offset: 2px; }
.wrap { max-width: 740px; margin: 0 auto; padding: 0 16px; }

/* Header */
header.site { background: var(--surface); border-bottom: 1px solid var(--border); }
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 20px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 40px; height: 40px; }
.brand span { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; letter-spacing: -.01em; }
nav { display: flex; gap: 18px; flex-wrap: wrap; }
nav a { text-decoration: none; color: var(--muted); font-size: .95rem; font-weight: 600; }
nav a:hover { color: var(--link); }
nav a[aria-current="page"] { color: var(--link); }

/* Content */
main { padding: 44px 0 64px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 2.2rem; line-height: 1.15; margin: 0 0 14px; }
h2 { font-size: 1.4rem; line-height: 1.25; margin: 44px 0 10px; }
h3 { font-size: 1.1rem; margin: 26px 0 6px; }
.lede { font-size: 1.15rem; color: var(--muted); margin-top: 0; }
.small { font-size: .9rem; color: var(--muted); }
ul, ol { padding-left: 1.3em; }
li { margin: 6px 0; }

.hero { text-align: center; padding-bottom: 8px; }
.hero img { width: 220px; height: auto; margin: 0 auto 18px; display: block; }
.hero .lede { max-width: 560px; margin: 0 auto; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; margin: 20px 0;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.note { background: var(--soft); border-radius: var(--radius); padding: 18px 22px; margin: 24px 0; }
.note > :first-child { margin-top: 0; }
.note > :last-child { margin-bottom: 0; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 36px 0; }
.features .card { margin: 0; }
.features .dot { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-size: 1.1rem; margin-bottom: 10px; }

.button {
  display: inline-block; background: var(--primary); color: #0f2324; font-weight: 700;
  text-decoration: none; padding: 12px 22px; border-radius: 999px;
}
.button:hover { filter: brightness(1.05); }

.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
td:first-child { font-weight: 700; white-space: nowrap; }

.toc { columns: 2; column-gap: 24px; font-size: .95rem; margin: 0; padding-left: 1.2em; }
@media (max-width: 560px) { .toc { columns: 1; } h1 { font-size: 1.85rem; } td:first-child { white-space: normal; } }

/* Footer */
footer.site { border-top: 1px solid var(--border); color: var(--muted); font-size: .88rem; }
footer.site .wrap { padding-top: 22px; padding-bottom: 36px; }
footer.site a { color: var(--muted); }
.toc li { margin: 0 0 6px; break-inside: avoid; }
