/* ============================================================
   Goodside guides
   ------------------------------------------------------------
   Shared by /guides/ and every post under it, so a new post is
   only its own HTML. Same paper as the support page: cream
   canvas, espresso ink, sand hairlines, mauve as the one accent.
   Jost display, Work Sans body, both at the brand -0.06em.
   The framing figures reuse the homepage's anchor tick, and its
   captions stay on the system font so they read as the camera.
   No em dashes anywhere.
   ============================================================ */

:root {
  --white: #FFFFFF; --cream: #FFFBEF; --sand: #E0CEBA; --stone: #917B6A;
  --mauve: #BA887D; --cocoa: #5B4238; --espresso: #2A2520;
  --hairline: rgba(145, 123, 106, 0.28);
  --font-display: "Jost", "Avenir Next", sans-serif;
  --font-body: "Work Sans", -apple-system, "Helvetica Neue", sans-serif;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--cream); color: var(--espresso);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.7;
  letter-spacing: -0.06em;   /* brand tracking, inherited */
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--cocoa); text-underline-offset: 3px; }
a:hover { color: var(--espresso); }
:focus-visible { outline: 2px solid var(--cocoa); outline-offset: 3px; border-radius: 2px; }

/* ---------- Top bar ---------- */
.bar {
  max-width: 46rem; margin: 0 auto;
  padding: 1.5rem clamp(1rem, 5vw, 2.5rem) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.2rem;
  letter-spacing: -0.012em;   /* the wordmark exception */
  color: var(--espresso); text-decoration: none;
}
.wordmark svg { width: 18px; height: 18px; }
.bar nav { display: flex; gap: 1.25rem; font-size: 0.875rem; font-weight: 500; }
.bar nav a { color: var(--stone); text-decoration: none; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--espresso); }

/* ---------- Article ---------- */
.doc { max-width: 46rem; margin: 0 auto; padding: 3rem clamp(1rem, 5vw, 2.5rem) 5rem; }
.eyebrow {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.02em; color: var(--mauve); margin-bottom: 0.9rem;
}
h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.1rem, 6vw, 3.2rem); line-height: 1.08;
  letter-spacing: -0.06em; margin-bottom: 1rem;
}
.dek { font-size: 1.2rem; line-height: 1.55; color: var(--cocoa); margin-bottom: 1.25rem; }
.meta { font-size: 0.8125rem; color: var(--stone); margin-bottom: 2.5rem; }
h2 {
  font-family: var(--font-display); font-weight: 600; font-size: 1.55rem;
  line-height: 1.2; letter-spacing: -0.06em;
  margin: 3rem 0 0.75rem; padding-top: 2rem; border-top: 1px solid var(--sand);
}
h3 { font-size: 1.05rem; font-weight: 700; margin: 1.75rem 0 0.5rem; }
p, ul, ol { margin-bottom: 1.1rem; }
ul, ol { padding-left: 1.4rem; }
li { margin-bottom: 0.45rem; }
strong { font-weight: 600; }

/* The short version, for readers (and search answers) in a hurry */
.short {
  background: var(--white); border: 1px solid var(--sand); border-radius: 14px;
  padding: 1.4rem 1.5rem 0.5rem; margin-bottom: 1rem;
}
.short p:first-child { font-weight: 700; margin-bottom: 0.6rem; }

/* ---------- Framing figures ---------- */
.frames {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.5rem, 2vw, 1rem); margin: 2rem 0 0.75rem;
}
.frame-img {
  position: relative; aspect-ratio: 3 / 4;
  border-radius: 12px; overflow: hidden; background: var(--sand);
}
.frame-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frames figcaption {
  margin-top: 0.55rem; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.02em; color: var(--stone);
}
.frames-note { font-size: 0.875rem; color: var(--stone); margin-bottom: 1.5rem; }

/* Anchor tick on its dark backing, positioned from FramingCatalogue.swift */
.ftick {
  position: absolute; width: 34px; height: 2.5px;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.55); border-radius: 1.25px; z-index: 3;
}
.ftick::after {
  content: ""; position: absolute; left: 0.5px; top: 0.5px;
  width: 33px; height: 1.5px;
  background: rgba(255,255,255,0.95); border-radius: 0.75px;
}
.fpill {
  position: absolute; transform: translate(-50%, -50%);
  font-size: 8.5px; font-weight: 500;
  font-family: -apple-system, "SF Pro Text", sans-serif;
  letter-spacing: 0.01em;   /* camera chrome, not brand type */
  color: rgba(255,255,255,0.95); background: rgba(0,0,0,0.35);
  padding: 1px 4px; border-radius: 3px; white-space: nowrap; z-index: 4;
}
.frame-img .ftick.h { left: calc(var(--hx) * 100%); top: calc(var(--hy) * 100%); }
.frame-img .fpill.h { left: calc(var(--hx) * 100%); top: calc(var(--hy) * 100% - 11px); }
.frame-img .ftick.b { left: calc(var(--bx) * 100%); top: calc(var(--by) * 100%); }
.frame-img .fpill.b { left: calc(var(--bx) * 100%); top: calc(var(--by) * 100% + 11px); }
.flip .frame-img .fpill.b { top: calc(var(--by) * 100% - 11px); }

/* ---------- App call to action ---------- */
.cta {
  background: var(--espresso); color: var(--cream);
  border-radius: 18px; padding: 1.75rem; margin: 3rem 0 1rem;
}
.cta h2 {
  border: 0; padding: 0; margin: 0 0 0.6rem;
  color: var(--cream); font-size: 1.45rem;
}
.cta p { color: rgba(255,251,239,0.82); }
.cta .badge { display: inline-block; margin-top: 0.4rem; }
.cta .fine { font-size: 0.8125rem; color: rgba(224,206,186,0.75); margin: 0.9rem 0 0; }

/* ---------- Guide index ---------- */
.list { list-style: none; padding: 0; margin-top: 1rem; }
.list li { border-top: 1px solid var(--sand); padding: 1.5rem 0; margin: 0; }
.list a { text-decoration: none; color: var(--espresso); }
.list h2 {
  border: 0; padding: 0; margin: 0 0 0.35rem; font-size: 1.4rem;
}
.list a:hover h2 { color: var(--cocoa); }
.list p { margin: 0; color: var(--cocoa); font-size: 1rem; }
.list .meta { margin: 0.5rem 0 0; }

/* ---------- Footer ---------- */
.foot {
  max-width: 46rem; margin: 0 auto;
  padding: 2rem clamp(1rem, 5vw, 2.5rem) 3rem;
  border-top: 1px solid var(--sand);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem;
  font-size: 0.8125rem; color: var(--stone);
}
.foot a { color: var(--stone); }
.foot span { margin-right: auto; }

@media (max-width: 520px) {
  .bar nav { gap: 0.9rem; }
  .fpill { font-size: 7px; padding: 0 3px; }
  .ftick { width: 26px; }
  .ftick::after { width: 25px; }
}
