/* Shared styling for the guides.
   These pages are plain HTML on purpose: they have to be readable by a crawler
   with no JavaScript, and they must not depend on the app's build. That means
   the palette below is a copy of the one in src/index.css rather than a shared
   import — if the app's colours ever change, change them here too. */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600&family=Lora:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ground: #f6f4f1;
  --card: #ffffff;
  --ink: #232019;
  --muted: #4f4a41;
  --faint: #8a8175;
  --rule: #e3ded7;
  --accent: #313f54;
  --accent-soft: #566f92;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1a1815;
    --card: #232019;
    --ink: #efece7;
    --muted: #d0c9bf;
    --faint: #8a8175;
    --rule: #34302a;
    --accent: #8098b4;
    --accent-soft: #aebccf;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'Lora', Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 1.9rem; margin-top: 3rem; }
h3 { font-size: 1.35rem; margin-top: 2rem; }

p, ul, ol { margin: 1.15rem 0; }
li { margin: 0.5rem 0; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-soft); }

strong { font-weight: 600; }

.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1.5rem; }

/* ---- Masthead */
.masthead { border-bottom: 1px solid var(--rule); }
.masthead .wrap {
  max-width: 60rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.masthead nav a {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

/* ---- Article furniture */
article { padding: 3.5rem 0 1rem; }

.kicker {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

.standfirst {
  font-size: 1.2rem;
  color: var(--muted);
  margin-top: 1.25rem;
}

.byline {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 1.5rem;
}

hr { border: 0; height: 1px; background: var(--rule); margin: 3rem 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.95rem;
}
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--rule); }
th {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 500;
}
td:not(:first-child), th:not(:first-child) { text-align: right; }

blockquote {
  margin: 2rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
  font-style: italic;
  color: var(--muted);
}

/* ---- The call to action that closes every guide */
.cta {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 5px;
  padding: 1.75rem;
  margin: 3rem 0;
}
.cta h2 { margin-top: 0; font-size: 1.5rem; }
.cta p { margin-bottom: 1.25rem; }
.button {
  display: inline-block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--accent);
  text-decoration: none;
}
.button:hover { background: rgba(86, 111, 146, 0.1); }

/* ---- Related links + footer */
.related { font-size: 0.95rem; }
.related h2 { font-size: 1.3rem; }

footer {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding: 2.5rem 0;
  font-size: 0.85rem;
  color: var(--faint);
}
footer .wrap { max-width: 60rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
footer a { color: var(--faint); }

@media (max-width: 640px) {
  body { font-size: 17px; }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.6rem; }
}
