/* tyler.gold — Book Stock (decision 001) */

@font-face{
  font-family:"Fraunces";
  src:url("/fonts/fraunces.woff2") format("woff2");
  font-weight:100 900; font-display:swap;
}
@font-face{
  font-family:"EB Garamond";
  src:url("/fonts/ebgaramond.woff2") format("woff2");
  font-weight:400 800; font-display:swap;
}

:root{
  --paper:#EFEDE3;
  --ink:#16150F;
  --muted:#6A6455;
  --accent:#7C6420;
  --rule:#D8D3C2;
  --accent-soft:rgba(124,100,32,.12);
  --measure:34rem;
  --display:"Fraunces",Georgia,serif;
  --body:"EB Garamond",Georgia,serif;
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--paper); color:var(--ink);
  font-family:var(--body); font-size:19px; line-height:1.55;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
::selection{background:var(--accent-soft)}

a{color:var(--accent);text-decoration:none;
  border-bottom:1px solid rgba(124,100,32,.32);}
a:hover{border-bottom-color:var(--accent)}
a:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:2px}

.page{max-width:38rem;margin:0 auto;padding:4rem 1.5rem 5rem;
  display:flex;flex-direction:column;gap:2.6rem}
.page--wide{max-width:58rem}
/* The homepage is nearly empty, so it holds the full height of the window and
   lets the quote settle at the foot of it rather than leaving dead space. */
.page--home{min-height:100vh;padding:3.4rem 1.5rem 2.4rem;gap:2.2rem}

/* ---------- masthead ---------- */
.mast{display:flex;flex-direction:column;gap:.8rem}
/* Optical alignment. A 3.1rem display face carries a side bearing the small text
   does not, so a box-aligned name reads as indented. The em unit keeps the
   correction proportional if the size ever changes. Tuned against a guide at the
   column edge, magnified 4x — not by eye. */
.mast__name{margin:0 0 0 -.055em;font-family:var(--display);font-size:3.1rem;
  font-weight:600;letter-spacing:-.015em;line-height:1.02}
.mast__contact{display:flex;gap:1.1rem;flex-wrap:wrap;font-size:.84rem;color:var(--muted)}
.mast__contact a{color:var(--accent);border-bottom-color:rgba(124,100,32,.30)}
.mast__contact a:hover{color:var(--accent);border-bottom-color:var(--accent)}

/* ---------- registers ---------- */
.reg{display:flex;flex-direction:column;gap:.75rem}
.reg__label{font-size:.68rem;text-transform:uppercase;letter-spacing:.18em;
  font-weight:500;color:var(--accent);padding-bottom:.5rem;border-bottom:1px solid var(--rule)}
.reg__rows{display:flex;flex-direction:column;gap:.68rem}

.row{display:grid;grid-template-columns:1fr auto;gap:.15rem 1.1rem;align-items:baseline}
.row__name{font-weight:600;font-size:1.03rem}
.row__name a{color:var(--ink);border-bottom-color:rgba(22,21,15,.22)}
.row__name a:hover{color:var(--accent);border-bottom-color:var(--accent)}
.row__when{font-size:.82rem;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.row__note{grid-column:1/-1;color:var(--muted);font-size:.95rem;line-height:1.5;max-width:var(--measure)}
/* Outbound button under a row. Small caps rather than uppercase, so it reads as
   a caption in the same voice as the body rather than as a shouted label. */
.row__more{grid-column:1/-1;justify-self:start;margin-top:.55rem;
  font-variant-caps:all-small-caps;font-size:.8rem;letter-spacing:.09em;
  color:var(--accent);border:1px solid rgba(124,100,32,.42);border-radius:4px;
  padding:.3rem .72rem;display:inline-flex;align-items:baseline;gap:.42em;
  /* The box aligns with the column. Pulling it left so the WORDS aligned instead
     made the border hang past every rule on the page, which read as a mistake —
     a bordered object wants its edge on the column. */
  transition:border-color .14s,background .14s}
.row__more:hover{border-color:var(--accent);background:var(--accent-soft)}
.row__arrow{font-variant-caps:normal;font-size:.86em;
  transition:transform .14s ease}
.row__more:hover .row__arrow{transform:translate(.1em,-.1em)}

/* ---------- chapter ----------
   Everything from here to the colophon only shows up when a chapter or archive
   page is switched back on (PUBLISH_PAGES / PUBLISH_ARCHIVE in build.py). It is
   dormant, not dead — deleting it would break those pages the day they return. */
.back{font-size:.8rem;letter-spacing:.04em;color:var(--muted);border:0}
.back:hover{color:var(--accent)}

.ch__head{display:flex;flex-direction:column;gap:.55rem}
.ch__eyebrow{font-size:.68rem;text-transform:uppercase;letter-spacing:.2em;color:var(--accent)}
.ch__title{margin:0;font-family:var(--display);font-size:2.35rem;font-weight:600;
  letter-spacing:-.015em;line-height:1.06;text-wrap:balance}
.ch__stand{margin:0;font-size:1.06rem;line-height:1.62;max-width:var(--measure)}
.ch__stand .dc{float:left;font-family:var(--display);font-size:3.1rem;line-height:.82;
  padding:.16em .1em 0 0;font-weight:600;color:var(--accent)}

.ch__meta{display:flex;gap:1.6rem;flex-wrap:wrap;font-size:.8rem;color:var(--muted);
  border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);padding:.7rem 0}
.ch__meta b{display:block;font-family:var(--display);font-size:1.3rem;font-weight:600;
  color:var(--ink);font-variant-numeric:tabular-nums;letter-spacing:-.01em}

/* Text is held to a reading measure; blocks (grids, lists, images) run full width.
   Clamping .prose itself would shrink the plate grid on wide chapters. */
.prose{display:flex;flex-direction:column;gap:1.1rem}
.prose > p,.prose > h2,.prose > blockquote,.prose > ul,.prose > ol{max-width:var(--measure)}
.prose p{margin:0;font-size:1.03rem;line-height:1.65}
.prose h2{margin:1.2rem 0 0;font-family:var(--display);font-size:1.35rem;font-weight:600;letter-spacing:-.01em}
.prose blockquote{margin:0;padding-left:1.1rem;border-left:2px solid var(--rule);
  color:var(--muted);font-style:italic}
.prose em{font-style:italic}
/* Archive photographs carry no width/height attributes; keep them contained. */
.prose img{max-width:100%;height:auto;display:block;border:1px solid rgba(22,21,15,.14)}

/* ---------- work lists ---------- */
.group{display:flex;flex-direction:column;gap:.7rem}
.group__label{font-size:.68rem;text-transform:uppercase;letter-spacing:.16em;color:var(--accent);
  padding-bottom:.45rem;border-bottom:1px solid var(--rule)}
.items{display:flex;flex-direction:column;gap:.55rem}
.item{display:grid;grid-template-columns:1fr auto;gap:.1rem 1rem;align-items:baseline}
.item__t{font-size:.98rem;line-height:1.38}
.item__t a{color:var(--ink);border-bottom-color:rgba(22,21,15,.16)}
.item__t a:hover{color:var(--accent);border-bottom-color:var(--accent)}
.item__n{font-size:.8rem;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}

/* ---------- plates ---------- */
.plates{display:grid;grid-template-columns:repeat(3,1fr);gap:1.4rem 1.1rem}
.plate figure{margin:0;display:flex;flex-direction:column;gap:.42rem}
/* height:auto is load-bearing — the img's height="720" attribute is a presentational
   hint, and without overriding it the box stays 720px tall and aspect-ratio is ignored. */
.plate img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;display:block;
  border:1px solid rgba(22,21,15,.16);background:var(--rule)}
.plate figcaption{font-size:.85rem;line-height:1.36}
.plate figcaption a{color:var(--ink);border-bottom-color:rgba(22,21,15,.16)}
.plate figcaption a:hover{color:var(--accent);border-bottom-color:var(--accent)}
.plate .cnum{display:block;font-size:.76rem;color:var(--muted);
  font-variant-numeric:tabular-nums;margin-top:.15rem}
.rule-note{font-size:.85rem;color:var(--muted);font-style:italic;text-align:center;
  border-top:1px solid var(--rule);padding-top:.7rem}

/* ---------- colophon ---------- */
.colophon{font-size:.82rem;color:var(--muted);padding-top:.9rem;border-top:1px solid var(--rule);
  display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap}

/* ---------- the quote ----------
   A grace note at the foot of the homepage, chosen at build time (content/quotes.md).
   margin-top:auto pushes it to the bottom of the window on a short page. */
.quote{margin-top:auto;padding-top:2.6rem;text-align:center;
  display:flex;flex-direction:column;align-items:center;gap:.55rem}
.quote__t{margin:0;max-width:30rem;font-size:.98rem;line-height:1.6;
  color:var(--ink);text-wrap:balance}
/* The gilt quotation (decision 002). The marks sit INLINE, not absolutely
   positioned: absolute hugged the words only while a quote fitted on one line,
   and drifted out to the edges of the measure the moment one wrapped.
   line-height:0 keeps a 1.95rem glyph from opening up the line it sits on. */
.qm{font-family:var(--display);font-size:1.95rem;line-height:0;
  color:var(--accent);vertical-align:-.3em}
.qm:first-child{margin-right:.04em}
.qm:last-child{margin-left:.04em}
/* the span is always rendered so the rotation script has somewhere to write —
   collapse it when a quote carries no attribution, so the gap doesn't show */
.quote__a{font-size:.78rem;letter-spacing:.02em;color:var(--muted)}
.quote__a:empty{display:none}
/* There is one gold. A lighter tint was tried for the gilt marks and dropped: any
   gold pale enough to read as "shiny" lands at ~2.6:1 on this cream, against 4.8:1
   for --accent, so it could never carry text. See docs/design/palette.md. */

/* The whole quote is one link (build.py wraps it), not just the attribution:
   one affordance instead of two, and a target you cannot miss. Text inside an
   <a> stays selectable, so a quote can still be dragged and copied.
   The affordance is PERSISTENT — a hairline under the attribution — because a
   link that only appears on hover does not exist on a phone. */
.quote__link{display:flex;flex-direction:column;align-items:center;gap:.55rem;
  color:inherit;border:0;text-decoration:none}
.quote__link .quote__a{border-bottom:1px solid rgba(106,100,85,.32);padding-bottom:2px;
  transition:color .14s,border-color .14s}
.quote__link:hover .quote__a{color:var(--accent);border-bottom-color:var(--accent)}
.quote__link:focus-visible{outline:2px solid var(--accent);outline-offset:8px;border-radius:3px}

@media (max-width:640px){
  body{font-size:18px}
  .page{padding:2.6rem 1.15rem 3.5rem;gap:2.1rem}
  .page--home{padding:3rem 1.15rem 2.2rem;gap:2rem}
  .mast__name{font-size:2.3rem}
  .quote{padding-top:2.2rem}
  .quote__t{font-size:.95rem}
  .ch__title{font-size:1.8rem}
  /* rows keep their two columns on a phone — a name and a date fit side by side.
     Only the long work lists on chapter pages need to stack. */
  .row{gap:.2rem .8rem}
  .item{grid-template-columns:1fr}
  .item__n{grid-row:2}
  .plates{grid-template-columns:repeat(2,1fr);gap:1rem .8rem}
  .ch__meta{gap:1.1rem}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
