/* Soft Resistance shared styles. Used by every page except the shop and thank-you pages, which carry their own. */
  :root {
    /* Sharp colors lead */
    --royal: #2338C8;
    --emerald: #0A8A57;
    --red: #D92B2B;
    --ink: #15120F;
    /* Soft colors clash on purpose. Cream is retired. */
    --blush: #F6BFCB;
    --lavender: #D2C4F5;
    --butter: #F8DE82;
    --white: #FFFFFF;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--white);
    color: var(--ink);
    font-family: "DM Sans", system-ui, sans-serif;
    font-size: 18px;
    line-height: 1.65;
  }
  h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
  /* Young Serif is the closest free match to the logo wordmark. It is used for headings only. */
  h2, h3, .poem-title { font-family: "Young Serif", Georgia, serif; font-weight: 400; }
  h2 { font-size: clamp(1.9rem, 6vw, 2.6rem); color: var(--royal); }
  h3 { font-size: 1.4rem; color: var(--ink); }
  p { margin: 0 0 1em; }
  a { color: var(--royal); }
  a:focus-visible, summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
  .wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
  section { padding: 64px 0; scroll-margin-top: 16px; }

  /* HAND-DRAWN SLOT: border strip.
     When your Procreate border is ready, export it as a PNG, put it in the images folder
     as border-top.png, and un-comment the background-image line. */
  .border-strip {
    height: 36px;
    background-color: var(--royal);
    /* background-image: url("/images/border-top.png"); */
    background-size: auto 100%;
    background-repeat: repeat-x;
  }

  /* Navigation */
  .nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 14px 20px; max-width: 1100px; margin: 0 auto; }
  .nav .logo img { display: block; height: 64px; width: auto; }
  .nav ul { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; margin: 0; padding: 0; }
  .nav a { font-weight: 700; font-size: 1rem; text-decoration: none; color: var(--ink); padding: 8px 0; display: inline-block; }
  .nav a:hover { color: var(--royal); text-decoration: underline; }

  /* Hero */
  .hero { text-align: center; padding: 40px 0 72px; }
  .hero h1 { margin: 0 auto 8px; }
  .hero h1 img { display: block; margin: 0 auto; width: min(420px, 82%); height: auto; }
  .triad { letter-spacing: .14em; text-transform: uppercase; font-weight: 700; font-size: .9rem; color: var(--red); margin: 12px 0 28px; }
  .btns { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
  .btn {
    display: inline-block; background: var(--royal); color: var(--white);
    text-decoration: none; font-weight: 700; padding: 14px 26px; border-radius: 999px; border: 2px solid var(--royal);
  }
  .btn:hover, .btn:focus { background: var(--red); border-color: var(--red); }
  .btn.alt { background: var(--white); color: var(--royal); }
  .btn.alt:hover, .btn.alt:focus { background: var(--royal); color: var(--white); border-color: var(--royal); }

  /* HAND-DRAWN SLOT: divider between sections. Swap for an image later. */
  .divider { height: 0; border-top: 4px solid var(--emerald); max-width: 120px; margin: 0 auto; }

  /* Mission */
  .three { display: grid; gap: 28px; margin-top: 28px; }
  .three p { margin: 0; }
  .closing { font-size: 1.5rem; font-weight: 700; color: var(--emerald); margin-top: 40px; line-height: 1.3; }
  @media (min-width: 760px) { .three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; } }

  /* Cards */
  .shop-peek { display: grid; gap: 18px; margin: 22px 0 26px; grid-template-columns: repeat(auto-fit, minmax(190px, 240px)); }
  .shop-peek[hidden] { display: none; }
  .peek { display: block; text-decoration: none; color: var(--ink); background: var(--lavender); border: 3px solid var(--ink); border-radius: 18px 26px 16px 28px / 26px 16px 28px 18px; padding: 14px; }
  .peek:nth-child(even) { background: var(--butter); }
  .peek:hover, .peek:focus-visible { background: var(--blush); }
  .peek .pic { background: var(--white); border: 3px solid var(--ink); border-radius: 12px; aspect-ratio: 1 / 1; overflow: hidden; margin-bottom: 10px; }
  .peek .pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
  .peek .nm { display: block; font-weight: 700; line-height: 1.25; }
  .peek .pr { display: block; color: var(--royal); font-weight: 700; margin-top: 2px; }
  .cards { display: grid; gap: 20px; margin-top: 28px; }
  .card {
    background: var(--lavender);
    border: 3px solid var(--ink);
    border-radius: 18px 26px 16px 28px / 26px 16px 28px 18px;
    padding: 24px;
  }
  .card.poem, .cards.three-up .card:nth-child(2) { background: var(--butter); }
  .card .num { font-size: 3.4rem; font-weight: 700; color: var(--royal); line-height: 1; margin-bottom: 4px; }
  .card .how { font-weight: 700; margin-bottom: .4em; }
  .card p:last-child { margin-bottom: 0; }
  .card.emergency { background: var(--red); color: var(--white); }
  .card.emergency .num { color: var(--white); }
  @media (min-width: 760px) { .cards.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cards.two-up { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); align-items: start; } }

  /* Poems */
  .by { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; color: var(--white); margin-bottom: 12px; }
  .by.sr { background: var(--royal); }
  .by.wd { background: var(--red); }
  .poem-title { font-size: 1.9rem; margin: 0 0 2px; }
  .poem-sub { font-style: italic; margin-bottom: 14px; }
  .poem p { margin: 0 0 1.1em; }
  .poem .refrain { color: var(--emerald); font-weight: 700; }
  details { margin-top: 12px; }
  summary { cursor: pointer; font-weight: 700; color: var(--royal); padding: 6px 0; }
  .poem-by { font-weight: 700; margin-top: 8px; }

  /* Journal */
  .box { background: var(--blush); border: 3px solid var(--emerald); border-radius: 22px; padding: 28px; }
  .subtitle { font-size: 1.25rem; margin-bottom: 20px; }
  .chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }
  .chips li { border: 2px solid var(--ink); border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: .95rem; background: var(--white); }

  .journal-grid { display: grid; gap: 24px; }
  .cover { margin: 0 auto; max-width: 280px; }
  .cover img { display: block; width: 100%; height: auto; border: 3px solid var(--ink); border-radius: 6px; background: var(--white); }
  @media (min-width: 760px) { .journal-grid { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 36px; align-items: start; } .cover { margin: 0; max-width: none; } }
  .box h3 { margin-top: 1.4em; }
  .journal-text > .lead + h3 { margin-top: 1.2em; }
  .box .lead { font-size: 1.15rem; }
  .steps { margin: 0 0 8px; padding-left: 1.3em; }
  .steps li { margin-bottom: .6em; }
  .box .btn { margin-top: 4px; }
  .box .fine { font-size: .9rem; margin: 20px 0 0; }

  /* About */

  /* ---------- Live-edit motifs: the page reads like a draft still being thought through ---------- */
  .note { font-style: italic; color: var(--royal); }                 /* a side comment inside a sentence */
  del.cut { text-decoration: line-through; text-decoration-color: var(--red); text-decoration-thickness: 3px; opacity: .6; }
  ins.add { text-decoration: none; background: linear-gradient(transparent 62%, var(--butter) 62%); font-weight: 700; }
  .cmt { display: block; width: fit-content; max-width: min(340px, 100%); margin: 14px 0 6px auto; padding: 8px 16px; background: var(--butter); border: 2px solid var(--ink); border-radius: 16px 16px 2px 16px; font-size: .95rem; font-style: italic; line-height: 1.45; transform: rotate(-1.2deg); }
  .cmt.lav { background: var(--lavender); transform: rotate(1deg); }
  .cmt.blush { background: var(--blush); }
  .tag { display: inline-block; vertical-align: middle; margin-left: 10px; padding: 2px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); font-family: "DM Sans", system-ui, sans-serif; font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: var(--ink); transform: rotate(-2deg); }
  .caret { display: inline-block; width: 3px; height: 1.1em; margin-left: 3px; vertical-align: text-bottom; background: var(--royal); animation: blink 1.1s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }
  @media (prefers-reduced-motion: reduce) { .caret { animation: none; } }
  .hero .pitch { max-width: 620px; margin: 0 auto 28px; font-size: 1.25rem; line-height: 1.5; }

  /* ---------- Home: the purpose is set loud on purpose, so the soft colors have something to push against ---------- */
  .hero { padding-bottom: 44px; }
  @media (max-width: 759px) { .hero { padding-top: 20px; } .hero h1 img { width: min(250px, 62%); } .hero-row h1 { margin-bottom: 12px; } .hero .shout { margin-top: 22px; } }
  .hero .shout { font-family: "Young Serif", Georgia, serif; font-size: clamp(1.9rem, 6.4vw, 3.4rem); line-height: 1.12; color: var(--ink); max-width: 880px; margin: 30px auto 18px; text-wrap: balance; }
  .hero .shout del.cut { text-decoration-thickness: .1em; opacity: .55; }
  .hero .shout ins.add { font-weight: 400; background: linear-gradient(var(--butter), var(--butter)) no-repeat left 74% / 100% .4em; }
  .hero .shout .caret { width: .07em; height: .95em; vertical-align: baseline; margin-bottom: -.08em; }
  .hero .what { max-width: 640px; margin: 0 auto 28px; font-size: 1.2rem; line-height: 1.55; }

  /* Three doors: one for each word the brand stands on */
  .doors-wrap { padding: 0 0 28px; }
  .doors { display: grid; gap: 16px; }
  @media (min-width: 760px) { .doors { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
  .door { display: block; text-decoration: none; color: var(--ink); background: var(--lavender); border: 3px solid var(--ink); border-radius: 18px 26px 16px 28px / 26px 16px 28px 18px; padding: 20px 22px 22px; }
  .door.advocate { background: var(--butter); }
  .door.belong { background: var(--blush); }
  .door .word { display: block; font-family: "Young Serif", Georgia, serif; font-size: clamp(2rem, 7vw, 2.6rem); line-height: 1.1; margin-bottom: 12px; text-decoration: underline; text-decoration-thickness: 6px; text-underline-offset: 8px; text-decoration-color: var(--royal); }
  .door.advocate .word { text-decoration-color: var(--red); }
  .door.belong .word { text-decoration-color: var(--emerald); }
  .door .line { display: block; line-height: 1.5; }
  .door:hover, .door:focus-visible { background: var(--white); }

  /* The three parts of the page. Each opens with its word, as large as the screen allows. */
  .pillar { padding: 56px 0 40px; scroll-margin-top: 8px; }
  .pillar .pillar-word { font-size: clamp(3.2rem, 19vw, 8rem); line-height: .92; letter-spacing: -.015em; margin: 0 0 .14em -.04em; }
  #care .pillar-word { color: var(--royal); }
  #advocate .pillar-word { color: var(--red); }
  #belong .pillar-word { color: var(--emerald); }
  .pillar-say { font-weight: 700; font-size: clamp(1.5rem, 5vw, 2.2rem); line-height: 1.18; margin: 0 0 .5em; }
  .pillar-why { font-size: 1.2rem; max-width: 700px; margin: 0; }
  .pillar .part { margin-top: 52px; scroll-margin-top: 16px; }
  .pillar .part > h3 { font-size: clamp(1.6rem, 5.4vw, 2.1rem); }
  .pillar .part .subtitle { margin-top: -.3em; }
  .pillar-btns { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 0; }

  /* The last word, in the loudest color on the page, right above the softest */
  .band { background: var(--royal); color: var(--white); padding: 64px 0 68px; margin-top: 40px; }
  .band p { font-family: "Young Serif", Georgia, serif; font-size: clamp(1.9rem, 6.6vw, 3.6rem); line-height: 1.14; margin: 0; }
  .band p span { display: block; }
  .band p span + span { margin-top: .28em; }
  .fw { display: grid; gap: 18px; margin: 28px 0 8px; }
  @media (min-width: 560px) { .fw { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @media (min-width: 900px) { .fw { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
  .fw > div { border: 3px solid var(--ink); border-radius: 18px 26px 16px 28px / 26px 16px 28px 18px; padding: 18px 18px 16px; background: var(--lavender); }
  .fw > div:nth-child(2) { background: var(--butter); }
  .fw > div:nth-child(3) { background: var(--blush); }
  .fw > div:nth-child(4) { background: var(--white); }
  .fw h3 { color: var(--royal); margin-bottom: .3em; }
  .fw p { margin: 0; font-size: 1rem; line-height: 1.5; }
  .long-h { margin-top: 48px; }

  .hero-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-width: 900px; margin: 0 auto 8px; align-items: stretch; }
  .hero-row .mark { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
  .hero-row h1 { grid-column: 1 / -1; order: -1; margin: 0 0 18px; }
  @media (min-width: 760px) {
    .hero-row { grid-template-columns: 1fr 1fr 1fr; }
    .hero-row h1 { grid-column: auto; order: 0; margin: 0; display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; }
    .hero-row h1 img { width: 86%; }
  }
  .page-h { font-family: "Young Serif", Georgia, serif; font-weight: 400; font-size: clamp(2.2rem, 7vw, 3.2rem); color: var(--royal); margin: 0 0 .3em; }
  .about p { font-size: 1.2rem; margin-bottom: .4em; }

  /* Footer */
  footer { background: var(--blush); padding: 48px 0 56px; }
  /* HAND-DRAWN SLOT: footer backdrop. Add images/border-bottom.png the same way as the top strip. */
  footer .foot { display: grid; gap: 28px; }
  footer img.flogo { display: block; height: 84px; width: auto; margin-bottom: 14px; }
  footer a { color: var(--ink); font-weight: 700; }
  .small { font-size: .9rem; line-height: 1.55; }
  @media (min-width: 760px) { footer .foot { grid-template-columns: 1fr 1fr; align-items: start; } }

  /* ---------- Shared across pages ---------- */
  .nav a[aria-current] { color: var(--royal); text-decoration: underline; }
  .count { display: inline-block; min-width: 1.6em; padding: 0 .45em; margin-left: 4px; background: var(--royal); color: var(--white); border-radius: 999px; font-size: .85rem; line-height: 1.6; text-align: center; }
  main.page { padding: 36px 0 72px; }
  main.page section { padding: 0; }
  .page-h .tag { font-size: .8rem; }
  .lede { font-size: 1.2rem; max-width: 720px; }
  .prose { max-width: 720px; }
  .prose h2 { font-size: clamp(1.4rem, 4.5vw, 1.8rem); margin-top: 1.8em; }
  .prose h3 { font-size: 1.2rem; margin-top: 1.4em; }
  .prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
  .prose li { margin-bottom: .4em; }
  .updated { font-size: .95rem; font-weight: 700; color: var(--emerald); }
  .plain { background: var(--lavender); border: 3px solid var(--ink); border-radius: 18px 26px 16px 28px / 26px 16px 28px 18px; padding: 20px 24px; margin: 22px 0 8px; }
  .plain h2 { margin-top: 0; }
  .plain ul { margin-bottom: 0; }
  .crisis { background: var(--butter); border: 3px solid var(--ink); border-radius: 16px; padding: 16px 20px; margin: 20px 0 32px; font-weight: 500; max-width: 720px; }
  .crisis strong { color: var(--royal); }
  .faq-group { margin-top: 36px; max-width: 720px; }
  .faq-group h2 { font-size: clamp(1.4rem, 4.5vw, 1.8rem); }
  .faq { border: 3px solid var(--ink); border-radius: 14px; margin: 0 0 12px; background: var(--white); }
  .faq summary { padding: 14px 18px; color: var(--ink); list-style-position: outside; margin-left: 0; }
  .faq[open] summary { color: var(--royal); }
  .faq .a { padding: 0 18px 14px; }
  .faq .a p:last-child { margin-bottom: 0; }
  .contact-card { background: var(--blush); border: 3px solid var(--emerald); border-radius: 22px; padding: 24px; max-width: 720px; }
  .contact-card p:last-child { margin-bottom: 0; }

  /* Blog */
  .filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
  .filters button { font: inherit; font-weight: 700; padding: 6px 18px; border: 2px solid var(--royal); border-radius: 999px; background: var(--white); color: var(--royal); cursor: pointer; }
  .filters button[aria-pressed="true"] { background: var(--royal); color: var(--white); }
  .posts { display: grid; gap: 20px; margin-top: 22px; }
  @media (min-width: 760px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .post-card { display: block; text-decoration: none; color: var(--ink); background: var(--lavender); border: 3px solid var(--ink); border-radius: 18px 26px 16px 28px / 26px 16px 28px 18px; padding: 22px; }
  .post-card:nth-child(even) { background: var(--butter); }
  .post-card:hover, .post-card:focus-visible { background: var(--blush); }
  .post-card h3 { font-size: 1.6rem; margin: 0 0 .3em; color: var(--ink); }
  .post-card p { margin: 0 0 .6em; }
  .post-card .more { font-weight: 700; color: var(--royal); text-decoration: underline; }
  .kind { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; border: 2px solid var(--ink); background: var(--white); margin: 0 6px 12px 0; }
  .post { max-width: 720px; }
  .post h1 { font-family: "Young Serif", Georgia, serif; font-weight: 400; font-size: clamp(2.2rem, 7vw, 3.2rem); color: var(--royal); margin: 0 0 .2em; line-height: 1.1; }
  .post .meta { font-weight: 700; margin-bottom: 1.6em; }
  .post .meta span { white-space: nowrap; }
  .post .dedication { font-style: italic; margin: -1em 0 1.6em; }
  .post .body h2 { font-size: clamp(1.4rem, 4.5vw, 1.8rem); margin-top: 1.8em; }
  .post .body ul, .post .body ol { padding-left: 1.3em; }
  .post .body li { margin-bottom: .4em; }
  .post .body blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 5px solid var(--emerald); font-style: italic; }
  .post.poem .body p { margin: 0 0 1.2em; font-size: 1.1rem; }
  .post .signed { font-weight: 700; margin-top: 1.4em; }
  .post .fine { font-size: .9rem; margin-top: 36px; padding-top: 16px; border-top: 3px solid var(--ink); }
  .back { display: inline-block; font-weight: 700; margin-bottom: 18px; }

  /* Sources: the small numbers in an essay, and the list they jump to */
  .cite { font-size: .72em; line-height: 0; font-weight: 700; }
  .cite a { text-decoration: none; padding: 8px 6px; margin: 0 -3px; }
  .cite a:hover, .cite a:focus-visible { text-decoration: underline; }
  .post .body .sources { font-size: .95rem; overflow-wrap: anywhere; }
  .post .body .sources li { margin-bottom: .8em; padding: 2px 4px; border-radius: 6px; }
  .sources li:target, .sources p:target, .cite a:target, a.citelink:target { background: var(--butter); }
  /* An APA style reference list: each entry hangs from its first line */
  .post .body .sources.refs p { padding-left: 2em; text-indent: -2em; margin: 0 0 .9em; border-radius: 6px; }
  .post .body .sources.refs .backref { text-indent: 0; }
  .post .body a.btn { margin: 4px 0 10px; }
  .backref { text-decoration: none; font-weight: 700; padding: 0 4px; }
  [id^="source-"], [id^="cite-"], #sources { scroll-margin-top: 28px; }

  /* Under a post: the next post, then the notebook and the shop */
  .post-next, .post-links { max-width: 720px; margin-top: 44px; }
  .post-next h2, .post-links h2 { font-size: clamp(1.4rem, 4.5vw, 1.8rem); }
  .post-next .posts { margin-top: 12px; }
  .when { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--royal); margin-bottom: 8px; }
  .post-links { background: var(--butter); border: 3px solid var(--ink); border-radius: 22px; padding: 24px; }
  .post-next .post-card:nth-child(even) { background: var(--lavender); }
  .post-next .post-card:hover, .post-next .post-card:focus-visible { background: var(--blush); }
  .post-links .pair { display: grid; gap: 24px; }
  .post-links h3 { font-size: 1.2rem; }
  .post-links p { margin-bottom: .9em; }
  @media (min-width: 640px) { .post-links .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; } }

  /* Journal teaser on the home page */
  .teaser { display: grid; gap: 24px; align-items: center; }
  .teaser .cover { max-width: 200px; margin: 0; }
  @media (min-width: 640px) { .teaser { grid-template-columns: 200px minmax(0, 1fr); gap: 32px; } }

  /* Footer links */
  footer .links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; list-style: none; padding: 0; margin: 0 0 18px; }
  footer .links a { font-weight: 700; }
  [hidden] { display: none !important; }
