/* =====================================================================
   YAKLAB — shared stylesheet for the public content pages
   =====================================================================
   Same design tokens as index.html / terms.html, pulled into one file
   so the article pages stay short and stay consistent with each other.
   Only the content pages (and 404.html) use this — index.html and the
   legal pages keep their own inline styles.
   ===================================================================== */

:root {
  --bone:       #F4EFE6;
  --bone-deep:  #ECE5D6;
  --cream:      #FAF7F0;
  --ink:        #1F1B16;
  --ink-soft:   rgba(31, 27, 22, 0.72);
  --rule:       rgba(31, 27, 22, 0.14);
  --stone:      #6F665A;
  --terracotta: #B85844;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Switzer', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* paper grain, same as the landing page ------------------------------ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.32;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12  0 0 0 0 0.10  0 0 0 0 0.08  0 0 0 0.07 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
main, header, footer { position: relative; z-index: 1; }

.shell { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 1.5rem; }
.shell-wide { max-width: 1080px; }

/* skip link ---------------------------------------------------------- */
.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--bone);
  padding: 0.75rem 1.25rem; z-index: 99;
}
.skip:focus { left: 1rem; top: 1rem; }

/* header ------------------------------------------------------------- */
header { padding: 1.75rem 0 0; }
header .shell { max-width: 1080px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.nav-right { display: flex; align-items: center; gap: 1.5rem; }
.wordmark {
  font-family: var(--serif);
  font-variation-settings: "opsz" 16, "SOFT" 50, "wght" 500;
  font-size: 1.25rem; letter-spacing: 0.005em;
  color: var(--ink); text-decoration: none;
}
.nav-login {
  font-family: var(--sans); font-size: 0.8125rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink); text-decoration: none;
  padding: 0.5rem 1rem; border: 1px solid var(--rule); border-radius: 2px;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.nav-login:hover { border-color: var(--ink); background: var(--ink); color: var(--bone); }

/* breadcrumb --------------------------------------------------------- */
.crumbs {
  font-size: 0.8125rem; color: var(--stone);
  margin: 2.5rem 0 0;
}
.crumbs a { color: var(--stone); text-decoration: none; border-bottom: 1px solid var(--rule); }
.crumbs a:hover { color: var(--terracotta); }

/* article ------------------------------------------------------------ */
main { padding: 1rem 0 4rem; }

.eyebrow {
  font-family: var(--sans); font-size: 0.75rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--terracotta); margin: 2.5rem 0 1.25rem;
}

h1 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 96, "SOFT" 100, "wght" 350;
  font-size: clamp(2.125rem, 4.6vw, 3.125rem);
  line-height: 1.06; letter-spacing: -0.02em;
  margin: 0 0 1.5rem; color: var(--ink);
}

.standfirst {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  color: var(--ink-soft); margin: 0 0 2rem; max-width: 46ch;
}

.meta { color: var(--stone); font-size: 0.8125rem; margin: 0 0 3rem; }

h2 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 36, "SOFT" 80, "wght" 450;
  font-size: clamp(1.4375rem, 2.6vw, 1.75rem);
  line-height: 1.2; letter-spacing: -0.006em;
  margin: 3.5rem 0 1rem;
}

h3 {
  font-family: var(--serif);
  font-variation-settings: "opsz" 22, "SOFT" 80, "wght" 480;
  font-size: 1.1875rem; line-height: 1.3;
  margin: 2.25rem 0 0.6rem;
}

p  { margin: 0 0 1.15rem; color: var(--ink-soft); }
p strong, li strong { color: var(--ink); font-weight: 600; }

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--terracotta); }

ul, ol { margin: 0 0 1.5rem; padding-left: 1.25rem; color: var(--ink-soft); }
li { margin-bottom: 0.5rem; }

blockquote {
  margin: 2rem 0; padding: 0 0 0 1.5rem;
  border-left: 2px solid var(--terracotta);
  font-family: var(--serif); font-style: italic;
  font-variation-settings: "opsz" 24, "SOFT" 100, "wght" 380;
  font-size: 1.125rem; color: var(--ink);
}

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

/* contents box ------------------------------------------------------- */
.toc {
  background: var(--cream); border: 1px solid var(--rule);
  padding: 1.5rem 1.75rem; margin: 0 0 3rem;
}
.toc p {
  font-family: var(--sans); font-size: 0.75rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--stone); margin: 0 0 0.75rem;
}
.toc ol { margin: 0; padding-left: 1.1rem; }
.toc li { margin-bottom: 0.3rem; font-size: 0.9375rem; }

/* callout ------------------------------------------------------------ */
.callout {
  background: var(--bone-deep); border: 1px solid var(--rule);
  padding: 1.5rem 1.75rem; margin: 2.5rem 0;
}
.callout :last-child { margin-bottom: 0; }
.callout .label {
  font-family: var(--sans); font-size: 0.75rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--terracotta); display: block; margin-bottom: 0.6rem;
}

/* definition list (glossary) ----------------------------------------- */
.terms { margin: 0; }
.terms dt {
  font-family: var(--serif);
  font-variation-settings: "opsz" 22, "SOFT" 80, "wght" 500;
  font-size: 1.125rem; color: var(--ink);
  margin: 2.25rem 0 0.4rem; scroll-margin-top: 2rem;
}
.terms dd { margin: 0 0 0.25rem; color: var(--ink-soft); }

.alpha-nav {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin: 0 0 2.5rem; padding: 1rem 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.alpha-nav a {
  font-family: var(--sans); font-size: 0.8125rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; color: var(--stone);
  padding: 0.15rem 0.5rem; border: 1px solid transparent;
}
.alpha-nav a:hover { color: var(--ink); border-color: var(--rule); }

/* end-of-article CTA ------------------------------------------------- */
.cta {
  background: var(--ink); color: var(--bone);
  padding: 2.5rem 2rem; margin: 4rem 0 0;
}
.cta h2 {
  color: var(--bone); margin: 0 0 0.75rem;
  font-size: clamp(1.375rem, 2.4vw, 1.625rem);
}
.cta p { color: rgba(244, 239, 230, 0.75); margin-bottom: 1.5rem; max-width: 48ch; }
.cta a.btn {
  display: inline-block; background: var(--terracotta); color: var(--bone);
  font-family: var(--sans); font-size: 0.9375rem; font-weight: 500;
  letter-spacing: 0.02em; text-decoration: none;
  padding: 0.875rem 1.75rem; border: 1px solid var(--terracotta);
  transition: background 0.2s ease, color 0.2s ease;
}
.cta a.btn:hover { background: transparent; color: var(--terracotta); }

/* related links ------------------------------------------------------ */
.related { margin: 4rem 0 0; padding-top: 2rem; border-top: 1px solid var(--rule); }
.related > p {
  font-family: var(--sans); font-size: 0.75rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--stone); margin: 0 0 1.25rem;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 760px) { .related-grid { grid-template-columns: 1fr; gap: 1.25rem; } }
.related-grid a {
  display: block; text-decoration: none;
  border-top: 1px solid var(--ink); padding-top: 0.875rem;
}
.related-grid a span {
  display: block;
  font-family: var(--serif);
  font-variation-settings: "opsz" 22, "SOFT" 80, "wght" 480;
  font-size: 1rem; line-height: 1.25; color: var(--ink); margin-bottom: 0.3rem;
}
.related-grid a small { color: var(--stone); font-size: 0.8125rem; line-height: 1.5; display: block; }
.related-grid a:hover span { color: var(--terracotta); }

/* footer ------------------------------------------------------------- */
footer { padding: 4rem 0 2.5rem; margin-top: 3rem; }
footer .shell {
  max-width: 1080px; display: flex; justify-content: space-between;
  align-items: baseline; flex-wrap: wrap; gap: 1.25rem;
  border-top: 1px solid var(--rule); padding-top: 2.25rem;
}
.foot-left { font-size: 0.875rem; color: var(--stone); }
.foot-left strong {
  font-family: var(--serif);
  font-variation-settings: "opsz" 14, "SOFT" 60, "wght" 500;
  font-size: 0.9375rem; color: var(--ink); font-weight: 500; margin-right: 0.75rem;
}
.foot-right { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: baseline; }
footer a {
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 1px; font-size: 0.875rem;
}
footer a:hover { color: var(--terracotta); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
