/* Resources styles — After Songs
 *
 * Loaded AFTER /styles.css, which supplies the design tokens (--bone, --ink,
 * --amber, --display, --body, --nav-h) and the shared .topbar / .nav / .wrap /
 * .foot-* rules. Nothing here redefines a token; this file only adds the two
 * Resources layouts: the hub, and a piece of writing.
 *
 * Kept as its own file rather than appended to /styles.css on purpose: the
 * intake-v2-phase1 branch has 59 unmerged lines in /styles.css, and a separate
 * file means Resources and the intake rework can never conflict.
 */

/* ── shared ─────────────────────────────────────────────────────────── */
.res-main{padding-top:calc(var(--nav-h) + 3.5rem);padding-bottom:6rem}
.res-wrap{width:min(720px,100% - 2.5rem);margin-inline:auto}

.res-eyebrow{font-size:.71rem;font-weight:600;letter-spacing:.18em;
  text-transform:uppercase;color:var(--amber-text);margin:0 0 .9rem}

.back{display:inline-block;margin-bottom:2.2rem;font-size:.92rem;
  color:var(--warm-gray);text-decoration:none}
.back:hover{color:var(--ink)}

/* Same amber-bracket discipline as privacy.html: an unfilled marker is
   impossible to miss on screen, so nothing ships half-written. */
.todo{color:var(--amber-text);font-weight:600;border-bottom:1px dotted var(--amber);white-space:nowrap}

/* ── the index ──────────────────────────────────────────────────────── */
.res-index h1{font-family:var(--display);font-weight:400;
  font-size:clamp(2.1rem,5.2vw,3rem);line-height:1.12;letter-spacing:-.01em;margin:0 0 .6rem}
.res-index .res-lede{color:#4A443E;font-size:1.05rem;line-height:1.7;margin:0 0 3.2rem;max-width:34em}

.post-list{list-style:none;padding:0;margin:0}
.post-list li{border-top:1px solid rgba(43,39,36,.12);padding:2rem 0}
.post-list li:last-child{border-bottom:1px solid rgba(43,39,36,.12)}

.post-card{display:grid;grid-template-columns:1fr;gap:1rem;text-decoration:none;color:inherit}
.post-card.has-img{grid-template-columns:1fr 160px;align-items:start}
.post-card img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:var(--r);display:block}
.post-card h3{font-family:var(--display);font-weight:400;font-size:1.5rem;
  line-height:1.25;margin:0 0 .45rem;transition:color .18s ease}
.post-card:hover h3{color:var(--amber-text)}
.post-card p{color:#4A443E;font-size:.98rem;line-height:1.65;margin:0}
.post-card time{display:block;font-size:.82rem;color:var(--warm-gray);margin:.55rem 0 0}

@media (max-width:620px){
  .post-card.has-img{grid-template-columns:1fr}
  .post-card img{aspect-ratio:16/9;order:-1}
}

/* Shown only while there are no posts. Delete the <p> when the first one
   lands — it is inside the list container, so it disappears with it. */
.post-empty{color:var(--warm-gray);font-style:italic;padding:2rem 0;
  border-top:1px solid rgba(43,39,36,.12)}

/* ── a post ─────────────────────────────────────────────────────────── */
.post h1{font-family:var(--display);font-weight:400;
  font-size:clamp(2rem,4.8vw,2.7rem);line-height:1.15;letter-spacing:-.01em;margin:0 0 .8rem}
.post .post-meta{font-size:.86rem;color:var(--warm-gray);margin:0 0 2.4rem}

.post-hero{width:100%;aspect-ratio:16/9;object-fit:cover;
  border-radius:var(--r);display:block;margin:0 0 2.6rem}

.post h2{font-family:var(--display);font-weight:400;font-size:clamp(1.35rem,2.6vw,1.7rem);
  line-height:1.25;margin:2.8rem 0 .8rem}
.post h3{font-family:var(--display);font-weight:500;font-size:1.08rem;margin:1.8rem 0 .4rem}
.post p,.post li{color:#4A443E;font-size:1.02rem;line-height:1.78}
.post p{margin:0 0 1.15rem}
.post ul,.post ol{padding-left:1.1rem;margin:.6rem 0 1.3rem}
.post li{margin:.42rem 0}
.post a{color:var(--amber-text)}
.post strong{font-weight:600;color:var(--ink)}

.post blockquote{margin:2rem 0;padding:0 0 0 1.4rem;border-left:2px solid var(--amber)}
.post blockquote p{font-family:var(--display);font-size:1.18rem;line-height:1.6;
  font-style:italic;color:var(--ink);margin:0}

.post figure{margin:2.2rem 0}
.post figure img{width:100%;border-radius:var(--r);display:block}
.post figcaption{font-size:.84rem;color:var(--warm-gray);margin-top:.6rem;text-align:center}

/* The quiet close on every post. Not a hard sell — the page it sits under is
   usually being read by someone who has just lost a person. */
.post-cta{margin-top:4rem;padding-top:2.2rem;border-top:1px solid rgba(43,39,36,.12)}
.post-cta p{font-family:var(--display);font-size:1.15rem;line-height:1.55;color:var(--ink);margin:0 0 1rem}

@media print{.topbar,.back,.post-cta{display:none}.res-main{padding-top:0}}

/* ── contents list ──────────────────────────────────────────────────── */
.post-toc{margin:2.4rem 0 3rem;padding:1.4rem 1.5rem;
  background:rgba(184,134,59,.05);border-left:2px solid var(--amber);border-radius:0 var(--r) var(--r) 0}
.post-toc p{font-size:.71rem;font-weight:600;letter-spacing:.18em;text-transform:uppercase;
  color:var(--amber-text);margin:0 0 .7rem}
.post-toc ul{list-style:none;padding:0;margin:0}
.post-toc li{margin:.34rem 0}
.post-toc a{color:#4A443E;text-decoration:none;font-size:.95rem;line-height:1.5}
.post-toc a:hover{color:var(--amber-text);text-decoration:underline}

/* Anchored headings must clear the fixed navbar when jumped to. */
.post h2[id],.post h3[id]{scroll-margin-top:calc(var(--nav-h) + 1.5rem)}

/* ── table ──────────────────────────────────────────────────────────── */
/* Wrapped in .post-table so a narrow phone scrolls the table, never the page. */
.post-table{overflow-x:auto;margin:1.8rem 0 2.2rem;-webkit-overflow-scrolling:touch}
.post-table table{border-collapse:collapse;width:100%;min-width:34rem;font-size:.95rem}
.post-table th,.post-table td{text-align:left;vertical-align:top;padding:.78rem .9rem;
  border-bottom:1px solid rgba(43,39,36,.12)}
.post-table thead th{font-family:var(--body);font-weight:600;font-size:.79rem;
  letter-spacing:.06em;text-transform:uppercase;color:var(--amber-text);
  border-bottom:1px solid rgba(43,39,36,.28)}
.post-table tbody th{font-weight:600;color:var(--ink);white-space:nowrap}
.post-table td{color:#4A443E;line-height:1.6}
.post-table tbody tr:last-child th,.post-table tbody tr:last-child td{border-bottom:none}

/* ── FAQ ────────────────────────────────────────────────────────────── */
/* Plain headings, not <details>: the answers are short, and a grieving reader
   should not have to click anything to find them. Mirrors the FAQPage JSON-LD. */
.post-faq{margin-top:1.4rem}
.post-faq h3{font-family:var(--body);font-weight:600;font-size:1rem;
  color:var(--ink);margin:1.9rem 0 .35rem;line-height:1.45}
.post-faq h3:first-child{margin-top:0}

/* ── support line ───────────────────────────────────────────────────── */
/* The bereavement number. Set apart so it is findable by someone skimming
   in a bad moment, without shouting. */
.post-support{margin:2.2rem 0;padding:1.15rem 1.3rem;background:rgba(43,39,36,.04);
  border-radius:var(--r)}
.post-support p{margin:0;font-size:.97rem;line-height:1.65}
.post-support a{font-weight:600;white-space:nowrap}


/* ── hub sections ───────────────────────────────────────────────────── */
/* Resources holds several strands — Writing, and more to come. Each is a
   <section> with its own h2, so post titles inside a strand are h3: a screen
   reader then hears "Writing" as the parent of the pieces under it, rather
   than every headline being a sibling of the section name. */
.res-section{margin-top:3.4rem}
.res-section:first-of-type{margin-top:2.6rem}
.res-h{font-family:var(--display);font-weight:400;font-size:clamp(1.5rem,3vw,1.95rem);
  line-height:1.2;margin:0 0 .35rem}
.res-sub{color:var(--warm-gray);font-size:.97rem;line-height:1.6;
  margin:0 0 .4rem;max-width:36em}
