/* SD Pen Club Journal styles. Load after /assets/site.css on /journal/ pages.
   Every color and easing comes from the tokens in site.css (:root), so the
   one line ink swap described there reaches these pages too. The shared
   journal card and carousel styles live in site.css; this file is the
   reading layout: page head, prose, FAQ, the meetup card and sources. */

:root { --measure: 680px; }

/* Skip link: hidden until a keyboard user tabs to it. */
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: var(--radius); font-weight: 600; font-size: 15px; text-decoration: none; }
.skip-link:focus { top: 12px; }

/* The Journal link reads as the current section in the header. */
.nav-panel a[aria-current] { color: var(--ink); font-weight: 600; }
@media (min-width: 900px) {
  .nav-panel a[aria-current]::after { transform: scaleX(1); }
}

.read { max-width: var(--measure); margin: 0 auto; }

/* ==========================================================================
   PAGE HEAD
   ========================================================================== */
.post-head { padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.crumbs ol { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; line-height: 1.5; color: var(--muted); }
.crumbs li + li::before { content: "/"; display: inline-block; margin: 0 .7em 0 .5em; color: var(--muted); opacity: .45; font-weight: 400; }
.crumbs a { color: var(--teal-deep); }
.crumbs a:hover { color: var(--ink); }
.post-head h1 { font-size: clamp(34px, 5vw, 50px); line-height: 1.12; margin-bottom: 20px; text-wrap: balance; }
.post-head .lede { font-size: 19px; line-height: 1.65; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.post-meta .sep { opacity: .55; }

/* ==========================================================================
   PROSE
   ========================================================================== */
.post-body { padding: 64px 0 120px; }
.prose { font-size: 18px; line-height: 1.8; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.3em; }
.prose .intro { font-size: 20px; line-height: 1.7; color: var(--text); margin-bottom: 1.4em; }
.prose h2 { font-size: clamp(26px, 3.4vw, 32px); line-height: 1.2; margin: 2.3em 0 .75em; text-wrap: balance; }
.prose h3 { font-size: 21px; line-height: 1.3; margin: 2em 0 .6em; }
.prose h2 + h3 { margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .6em; padding-left: .25em; }
.prose li::marker { color: var(--teal); }
.prose strong { font-weight: 600; color: var(--ink); }

/* Links in running text: ink type on a teal hairline, and the ink line from
   site.css sweeps across on hover and focus. */
@supports (color: color-mix(in srgb, red, blue)) {
  .prose :is(p, li) a:not(.btn) {
    background-image: linear-gradient(currentColor, currentColor), linear-gradient(color-mix(in srgb, var(--teal) 70%, transparent), color-mix(in srgb, var(--teal) 70%, transparent));
    background-size: 0% 1.5px, 100% 1.5px;
  }
  .prose :is(p, li) a:not(.btn):is(:hover, :focus-visible) { background-size: 100% 1.5px, 100% 1.5px; }
}

/* "Good for" notes and "Price" lines from the posts. */
.prose .note { background: var(--soft); border-left: 3px solid var(--teal); border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 20px; font-size: 16px; line-height: 1.65; }
.prose .spec { font-size: 15px; line-height: 1.6; color: var(--muted); margin-bottom: 1em; }
.prose .spec strong { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-deep); margin-right: 4px; }

.prose blockquote { margin: 2em 0; padding: 6px 0 6px 26px; border-left: 3px solid var(--teal); font-family: Arimo, Arial, sans-serif; font-weight: 500; font-size: 22px; line-height: 1.5; color: var(--ink); }
.prose blockquote p { margin: 0 0 .5em; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose blockquote cite { display: block; margin-top: 12px; font-family: "Open Sans", system-ui, sans-serif; font-style: normal; font-size: 14px; color: var(--muted); }

.table-wrap { margin: 1.8em 0 2em; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.prose thead th { font-family: Arimo, Arial, sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); text-align: left; background: var(--soft); padding: 14px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.prose tbody th, .prose td { padding: 14px 18px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.prose tbody tr:first-child > * { border-top: 0; }
.prose tbody th { font-family: Arimo, Arial, sans-serif; font-weight: 700; color: var(--ink); }
.prose td { font-variant-numeric: tabular-nums; }

/* Sections inside the post keep the reading rhythm, not the homepage's big bands. */
.prose section { padding: 0; border: 0; }

/* FAQ */
.post-faq { margin-top: 96px; }
.post-faq h2 { margin: 0 0 24px; }
.post-faq summary { font-size: 19px; }
.post-faq details p { font-size: 17px; line-height: 1.75; }

/* ==========================================================================
   MEETUP CARD (ink surface, soft call to action)
   ========================================================================== */
.cta-card { margin: 96px 0 0; padding: 56px 48px 52px; border-radius: calc(var(--radius) * 1.6); text-align: center; box-shadow: 0 30px 60px -40px var(--ink-shadow); }
.cta-card .kicker { margin-bottom: 16px; }
.cta-card h2 { font-size: clamp(26px, 3.4vw, 32px); margin: 0 0 .5em; }
.cta-card p:not(.kicker) { font-size: 17px; line-height: 1.7; max-width: 32em; margin: 0 auto 30px; }
.cta-card .btn-row { justify-content: center; }
/* Teal button: deep ink type passes contrast on teal; on hover it deepens and the type turns white. */
.cta-card .btn-solid { background: var(--teal); border-color: var(--teal); color: var(--ink-deep); font-weight: 700; }
.cta-card .btn-solid:is(:hover, :focus-visible) { background: var(--teal-deep); border-color: var(--teal-deep); color: var(--white); box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .5); }

/* ==========================================================================
   SOURCES
   ========================================================================== */
.sources { margin-top: 96px; padding-top: 44px; border-top: 1px solid var(--line); }
.sources h2 { font-size: 22px; margin: 0 0 8px; }
.sources .sources-note { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 0 0 24px; }
.sources ol { margin: 0; padding-left: 1.7em; font-size: 15px; line-height: 1.6; color: var(--muted); }
.sources li { margin-bottom: 10px; padding-left: .3em; }
.sources li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.sources a { color: var(--ink); overflow-wrap: anywhere; }

/* ==========================================================================
   KEEP READING (after a post)
   ========================================================================== */
.more-posts { border-top: 1px solid var(--line); padding: 104px 0 112px; }
.more-posts .head { max-width: var(--read); margin: 0 auto 56px; text-align: center; }
.more-posts h2 { font-size: clamp(28px, 3.6vw, 36px); margin: 0; }
.more-posts .carousel { max-width: 880px; margin: 0 auto; }
.more-posts .more { text-align: center; margin: 32px 0 0; }

/* ==========================================================================
   JOURNAL INDEX
   ========================================================================== */
.journal-list { padding: 16px 0 112px; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-item { position: relative; padding: 40px 0 42px; border-bottom: 1px solid var(--line); }
.post-item .post-meta { margin-bottom: 14px; }
.post-item h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.22; margin: 0 0 12px; text-wrap: balance; }
.post-item h2 a { color: var(--ink); text-decoration: none; background-size: 0% 1.5px, 0% 1px; }
.post-item h2 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.post-item h2 a:focus-visible { outline: none; }
.post-item h2 a:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 4px; }
.post-item:hover h2 a { background-size: 100% 1.5px, 0% 1px; }
.post-item .desc { margin: 0; color: var(--muted); }
.post-item .go { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 600; font-size: 15px; color: var(--ink); }
.post-item .go svg { width: 18px; height: 18px; }
.journal-list .cta-card { margin-top: 88px; }

/* ==========================================================================
   SMALL SCREENS
   ========================================================================== */
@media (max-width: 899px) {
  .post-head { padding: 40px 0 44px; }
  .post-body { padding: 48px 0 96px; }
  .post-faq, .cta-card, .sources { margin-top: 80px; }
  .more-posts { padding: 80px 0 88px; }
  .more-posts .head { margin-bottom: 40px; }
  .journal-list { padding-bottom: 96px; }
}
@media (max-width: 599px) {
  .post-head .lede { font-size: 18px; }
  .prose { font-size: 17px; }
  .prose .intro { font-size: 18.5px; }
  .prose table { font-size: 15px; }
  .prose :is(thead th, tbody th, td) { padding: 12px; }
  .cta-card { padding: 44px 22px 40px; }
  .cta-card .btn { width: 100%; text-align: center; }
}

/* ==========================================================================
   MOTION (the page head enters like the homepage hero; the rest of the
   post uses the scroll reveal in site.js through data-reveal)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .post-head .crumbs, .post-head h1, .post-head .lede, .post-head .post-meta, .prose > .intro { animation: journal-rise .9s var(--ease-out) backwards; }
  .post-head h1 { animation-delay: .08s; }
  .post-head .lede { animation-delay: .16s; }
  .post-head .post-meta { animation-delay: .24s; }
  .prose > .intro { animation-delay: .32s; }
  @keyframes journal-rise { from { opacity: 0; translate: 0 18px; } }

  .post-item .go svg { transition: transform .35s var(--ease-out); }
  .post-item:hover .go svg, .post-item:focus-within .go svg { transform: translateX(4px); }
}
