/* ==========================================================================
   tapoueh.org — personal technical blog
   Brand DNA shared with theartofpostgresql.com (Bookman + Lato, aubergine +
   cyan), expressed in a quiet editorial register. Reading-first, ad-free body.
   ========================================================================== */

/* ---- self-hosted brand serif (headings + wordmark) ---------------------- */
@font-face { font-family:'Bookman'; font-style:normal; font-weight:400;
  src:url('/fonts/BookmanStdLight.woff2') format('woff2'),
      url('/fonts/BookmanStdLight.woff') format('woff'); font-display:swap; }
@font-face { font-family:'Bookman'; font-style:italic; font-weight:400;
  src:url('/fonts/BookmanStdLightItalic.woff2') format('woff2'),
      url('/fonts/BookmanStdLightItalic.woff') format('woff'); font-display:swap; }
@font-face { font-family:'Bookman'; font-style:normal; font-weight:600;
  src:url('/fonts/BookmanStdMedium.woff2') format('woff2'),
      url('/fonts/BookmanStdMedium.woff') format('woff'); font-display:swap; }
@font-face { font-family:'Bookman'; font-style:italic; font-weight:600;
  src:url('/fonts/BookmanStdMediumItalic.woff2') format('woff2'),
      url('/fonts/BookmanStdMediumItalic.woff') format('woff'); font-display:swap; }

:root {
  --serif: 'Bookman', Georgia, 'Times New Roman', serif;
  --sans: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;

  --bg: #f9f9f9;
  --surface: #ffffff;
  --ink: #2e2241;
  --ink-strong: #372649;
  --muted: #67527a;
  --faint: #8a7aa0;
  --accent: #60b2d3;
  --accent-deep: #2c7f9e;
  --border: #e6e1ec;
  --border-soft: #efebf3;
  --code-bg: #f5f5f7;
  --code-border: #e0dde6;

  --measure: 43rem;     /* ~688px reading column */
  --wide: 60rem;        /* header / footer / home */
  --radius: 6px;
}

/* ---- reset / base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

a { color: var(--accent-deep); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--ink-strong); text-decoration: underline; text-underline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink-strong); font-weight: 600; line-height: 1.25; }
h1 { font-size: 2.1rem; margin: 0 0 .6rem; }
h2 { font-size: 1.5rem; margin: 2.6rem 0 .65rem; }
h3 { font-size: 1.2rem; margin: 2.2rem 0 .5rem; }
h4 { font-size: 1.05rem; margin: 1.6rem 0 .5rem; }

.skip-link { position:absolute; left:-9999px; }
.skip-link:focus { left:1rem; top:1rem; background:var(--ink-strong); color:#fff; padding:.5rem .9rem; border-radius:var(--radius); z-index:10; }

/* ---- layout ------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem; }
.reading { max-width: var(--measure); }
main { display: block; min-height: 60vh; }

/* ---- site header (branded aubergine bar with icons) -------------------- */
.site-header { background: var(--ink-strong); border-bottom: 3px solid var(--accent); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .85rem; padding-bottom: .85rem; flex-wrap: wrap; }
.wordmark { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: #f6f3fb; white-space: nowrap; }
.wordmark:hover { text-decoration: none; color: #fff; }
.site-nav { display: flex; align-items: center; gap: 1.4rem; font-size: .92rem; flex-wrap: wrap; }
.site-nav a { color: #c4b7d6; display: inline-flex; align-items: center; gap: .4rem; transition: color .15s ease; font-weight: 400; }
.site-nav a:hover { color: #fff; font-weight: 600; text-decoration: none; }
.site-nav a.is-active { color: #fff; }
.site-nav .nav-ico { color: #9a89b4; display: inline-flex; }
.site-nav a:hover .nav-ico, .site-nav a.is-active .nav-ico { color: var(--accent); }
.site-nav .nav-ico svg { width: 16px; height: 16px; display: block; }
.site-nav a.nav-cta { color: var(--accent); }
.site-nav .rss .nav-ico { color: #9a89b4; }

/* ---- intro / page heading ---------------------------------------------- */
.page-intro { padding: 2.4rem 0 1rem; }
.page-intro h1 { font-size: 2rem; }
.page-intro .lede { color: var(--muted); font-size: 1.05rem; max-width: var(--measure); }
.eyebrow { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); margin-bottom: .55rem; }

/* ---- post list (writing archive / home) -------------------------------- */
.post-list { padding: .5rem 0 1.5rem; }
.post-item { display: flex; gap: 1.2rem; padding: 2.1rem 0; border-bottom: 1px solid var(--border); }
.post-item:first-child { padding-top: 1.1rem; }
.post-thumb { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 10px; object-fit: contain; padding: 7px; border: 1px solid var(--border); background: #fff; }
.post-icon { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 10px; border: 1px solid var(--border); background: #fff; display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.post-item .body { min-width: 0; flex: 1; }
.post-item h2 { font-size: 1.4rem; margin: .15rem 0 .4rem; line-height: 1.25; }
.post-item h2 a { color: var(--ink-strong); }
.post-item h2 a:hover { color: var(--accent-deep); text-decoration: none; }
.post-item .dek { color: var(--muted); margin: 0 0 .6rem; }
.post-meta { font-size: .82rem; color: var(--faint); display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.post-meta .dot { color: var(--border); }
@media (max-width: 520px) { .post-thumb { width: 52px; height: 52px; } }

/* ---- tags / pills ------------------------------------------------------- */
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  font-size: .78rem; color: var(--muted); background: #f1eef6;
  padding: .12rem .55rem; border-radius: 999px; line-height: 1.6;
  transition: color .15s ease, background-color .15s ease;
}
.tag:hover { color: var(--ink-strong); background: #e7e1f0; text-decoration: none; }

/* ---- article ------------------------------------------------------------ */
.article-header { padding: 2.4rem 0 1rem; }
.article-header h1 { font-size: 2.2rem; line-height: 1.2; }
.article-header .post-meta { margin-top: .7rem; font-size: .9rem; }

.prose { font-size: 19px; line-height: 1.78; color: var(--ink); }
.prose > * + * { margin-top: 1.5rem; }
.prose p { margin: 0; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.prose p + p { margin-top: 1.4rem; }
.prose a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: #c9bfd9; }
.prose a:hover { text-decoration-color: currentColor; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: .35rem; }
.prose strong { font-weight: 700; color: var(--ink-strong); }
.prose blockquote {
  margin: 1.4rem 0; padding: .2rem 0 .2rem 1.1rem;
  border-left: 3px solid var(--accent); color: var(--muted);
  font-family: var(--serif); font-style: italic; font-size: 1.1rem;
}
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 1.5rem; }
.prose img { border-radius: 6px; }

/* table of contents (replaces <!--toc--> marker) */
.toc { background: var(--border-soft); border-radius: var(--radius); padding: .9rem 1.4rem .9rem 1.1rem; font-size: .88rem; }
.toc-title { font-family: var(--serif); font-weight: 600; color: var(--ink-strong); margin-bottom: .4rem; }
.toc ul { margin: 0; padding-left: 1.6rem; list-style: none; }
.toc li { position: relative; break-inside: avoid; }
.toc li::before {
  font-family: 'Font Awesome 6 Free'; font-weight: 900;
  content: '\f101';
  position: absolute; left: -1.3rem; top: .05em;
  color: var(--accent); font-size: .8em;
}
.toc a { color: var(--muted); font-style: italic; }
.toc a:hover { color: var(--accent-deep); }
@media (min-width: 560px) {
  .toc ul { columns: 2; column-gap: 1.8rem; }
}

/* ---- code --------------------------------------------------------------- */
code, pre, kbd { font-family: var(--mono); }
:not(pre) > code {
  font-size: .85em; background: #eeecf1; color: #4b3a63;
  padding: .1em .38em; border-radius: 3px;
}
.prose pre, .highlight pre, pre.chroma {
  background: var(--code-bg); border: 1px solid var(--code-border);
  border-radius: 4px; padding: .85rem 1rem;
  overflow-x: auto; font-size: 14px; line-height: 1.58;
}
.highlight { margin: 1.3rem 0; }
.prose pre code { background: none; padding: 0; font-size: inherit; color: var(--ink); }

/* Chroma syntax classes — calm light palette on brand */
.chroma { background: transparent; }
.chroma .c, .chroma .ch, .chroma .cm, .chroma .c1, .chroma .cs { color: #9385a8; font-style: italic; }
.chroma .k, .chroma .kc, .chroma .kd, .chroma .kn, .chroma .kp, .chroma .kr { color: #6f4ea3; font-weight: 700; }
.chroma .kt, .chroma .nb, .chroma .bp { color: var(--accent-deep); }
.chroma .s, .chroma .sb, .chroma .sc, .chroma .s2, .chroma .s1, .chroma .se, .chroma .sd { color: #1f8a6d; }
.chroma .m, .chroma .mi, .chroma .mf, .chroma .mh, .chroma .il { color: #9a5b16; }
.chroma .nf, .chroma .fm { color: #2f5fa6; }
.chroma .nt { color: #6f4ea3; }
.chroma .nv, .chroma .vg, .chroma .vi { color: #4b3a63; }
.chroma .o, .chroma .ow, .chroma .p { color: var(--muted); }
.chroma .err { color: #c0392b; }
.chroma .gh, .chroma .gu { color: var(--ink-strong); font-weight: 700; }
.chroma .gd { color: #c0392b; }
.chroma .gi { color: #1f8a6d; }
.chroma .ln, .chroma .lnt { color: #c3b8d4; margin-right: .6rem; }

/* ---- figures / image shortcode ----------------------------------------- */
.figure { margin: 1.5rem 0; text-align: center; }
.figure.dim-margin { margin: 1.8rem auto; }
.figure .fig-img { border-radius: 6px; border: 1px solid var(--border); }
.figure .caption { display: block; margin-top: .5rem; font-size: .85rem; color: var(--faint); font-style: italic; }
.figure.fig25 { max-width: 25%; } .figure.fig50 { max-width: 50%; }
.figure.fig75 { max-width: 75%; } .figure.fig100 { max-width: 100%; }
.figure.left { float: left; margin-right: 1.3rem; } .figure.right { float: right; margin-left: 1.3rem; }
@media (max-width: 640px) { .figure.fig25, .figure.fig50, .figure.fig75 { max-width: 100%; float: none; margin: 1.3rem auto; } }

/* ---- LaTeX-style stats table ------------------------------------------- */
.stats-table { border-collapse: collapse; width: 100%; max-width: var(--measure); margin: 1.5rem 0; font-size: .92rem; }
.stats-table thead th { border-top: 2px solid var(--ink-strong); border-bottom: 1px solid var(--ink-strong); font-family: var(--serif); font-size: 1rem; font-weight: 600; text-align: center; padding: .45rem .6rem; letter-spacing: .01em; }
.stats-table tbody td { padding: .28rem .6rem; color: var(--ink); }
.stats-table tbody td:last-child { text-align: right; font-variant-numeric: tabular-nums; padding-left: 2rem; color: var(--ink-strong); }
.stats-table tbody tr:last-child td { border-bottom: 2px solid var(--ink-strong); padding-bottom: .5rem; }

/* ---- alert shortcode ---------------------------------------------------- */
.alert { margin: 1.3rem 0; padding: .85rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--border); background: #f4f1f8; }
.alert p { margin: 0; }
.alert.info { background: #eaf4f8; border-color: #cfe6ef; }
.alert.success { background: #eaf5ee; border-color: #cfe7d8; }
.alert.warning { background: #fbf2e3; border-color: #f0dcb8; }
.alert.danger { background: #fbecec; border-color: #f1cccc; }

/* ---- subscribe band (the funnel; lives in chrome, never in .Content) ---- */
.subscribe { background: var(--ink-strong); color: #fff; border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; margin: 2.5rem 0; }
.subscribe h2 { color: #fff; font-size: 1.5rem; margin: 0 0 .4rem; }
.subscribe p { color: #c9bfd6; margin: 0 auto 1.1rem; max-width: 30rem; font-size: .98rem; }
.subscribe .ck-embed { max-width: 26rem; margin: 0 auto; }
.subscribe-fallback { display: flex; gap: .5rem; max-width: 25rem; margin: 0 auto; }
.subscribe-fallback input { flex: 1; height: 42px; border: none; border-radius: 6px; padding: 0 .8rem; font: inherit; font-size: .95rem; }
.subscribe-fallback button { background: var(--accent); color: #123; border: none; border-radius: 6px; padding: 0 1.1rem; font-weight: 700; cursor: pointer; }
.subscribe-fallback button:hover { background: #4fa6c9; }

/* ---- in-content Lab note (value-first, Planet-safe) --------------------- */
.lab-note { display: flex; gap: .75rem; align-items: flex-start; background: #f4f1f8; border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1.1rem; margin: 1.4rem 0; font-size: .95rem; color: var(--muted); }
.lab-note .lab-mark { color: var(--accent-deep); font-weight: 700; }

/* ---- talks -------------------------------------------------------------- */
.talk-list .talk-row { padding: 1.3rem 0; border-bottom: 1px solid var(--border-soft); }
.talk-row .where { font-size: .82rem; color: var(--faint); }
.video-embed { position: relative; padding-bottom: 56.25%; height: 0; margin: 1.5rem 0; border-radius: var(--radius); overflow: hidden; background: #000; }
.video-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.slides-grid { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.3rem 0; }
.slides-grid a { display: block; }
.slides-grid img { border: 1px solid var(--border); border-radius: 6px; max-width: 320px; }
.talk-conf { font-size: .92rem; color: var(--muted); background: #f4f1f8; border-radius: var(--radius); padding: .8rem 1.1rem; }

/* ---- taxonomy hub ------------------------------------------------------- */
.term-cloud { display: flex; flex-wrap: wrap; gap: .6rem; padding: 1rem 0 2rem; }
.term-cloud a { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .3rem .9rem; color: var(--muted); font-size: .95rem; }
.term-cloud a:hover { border-color: var(--accent); color: var(--ink-strong); text-decoration: none; }
.term-cloud .count { color: var(--faint); font-size: .82rem; }

/* ---- pagination --------------------------------------------------------- */
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 2rem 0; font-size: .95rem; }
.pagination a { color: var(--accent-deep); }
.pagination .disabled { color: var(--border); }

/* ---- footer ------------------------------------------------------------- */
.site-footer { background: var(--ink-strong); color: #c9bfd6; margin-top: 3rem; padding: 2.4rem 0; font-size: .9rem; }
.site-footer a { color: #d9cfe6; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer-bio { max-width: 24rem; }
.footer-bio .name { font-family: var(--serif); color: #fff; font-size: 1.05rem; }
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-eco { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid #4a4257; display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: #a99ebb; }

/* ---- responsive --------------------------------------------------------- */
/* ---- talks timeline (one rail per year) --------------------------------- */
.timeline { padding: 1rem 0 2rem; }
.tl-year { display: flex; gap: 1.4rem; }
.tl-rail { flex: 0 0 4rem; text-align: right; }
.tl-rail .yr { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; color: var(--ink-strong); position: sticky; top: 1rem; }
.tl-items { flex: 1; min-width: 0; border-left: 2px solid var(--border); padding: 0 0 1.6rem 1.5rem; }
.tl-talk { position: relative; padding: .65rem 0; }
.tl-talk::before { content: ""; position: absolute; left: -1.5rem; margin-left: -5px; top: 1.15rem; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--bg); }
.tl-talk h3 { font-size: 1.12rem; margin: 0 0 .2rem; line-height: 1.3; }
.tl-talk h3 a { color: var(--ink-strong); }
.tl-talk h3 a:hover { color: var(--accent-deep); text-decoration: none; }
.tl-talk .where { font-size: .82rem; color: var(--faint); display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; }
.tl-badge { font-size: .68rem; color: var(--accent-deep); border: 1px solid #cfe6ef; background: #eaf4f8; border-radius: 999px; padding: 0 .5rem; line-height: 1.5; }
@media (max-width: 520px) { .tl-rail { flex-basis: 2.8rem; } .tl-rail .yr { font-size: 1.1rem; } }

/* ---- project cards ------------------------------------------------------ */
.section-head { font-family: var(--serif); font-weight: 600; color: var(--ink-strong); font-size: 1.5rem; margin: 2.2rem 0 .2rem; }
.section-sub { color: var(--muted); margin: 0 0 .4rem; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); gap: 1rem; padding: 1rem 0 1.5rem; }
.project-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; }
.project-card h3 { font-size: 1.18rem; margin: 0 0 .15rem; }
.project-card h3 a { color: var(--ink-strong); }
.project-card .lang { font-size: .7rem; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.project-card .tagline { color: var(--muted); font-size: .95rem; margin: 0 0 .9rem; flex: 1; }
.project-card .links { display: flex; gap: 1rem; font-size: .86rem; }

/* ---- topics hub (weighted clouds) -------------------------------------- */
.topics-block { padding: .5rem 0 1rem; }
.topics-block h2 { font-size: 1.25rem; margin: 1.6rem 0 .2rem; }
.topics-block .hint { color: var(--faint); font-size: .85rem; margin: 0 0 .7rem; }
.cloud { display: flex; flex-wrap: wrap; gap: .45rem .95rem; align-items: baseline; }
.cloud a { color: var(--muted); line-height: 1.45; }
.cloud a:hover { color: var(--ink-strong); text-decoration: none; }
.cloud a .n { color: var(--faint); font-size: .62em; vertical-align: .15em; }

/* ---- ecosystem card ----------------------------------------------------- */
.eco-card { background: #f4f1f8; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; margin: 1.9rem 0; }
.eco-card h3 { margin: 0 0 .25rem; }
.eco-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.eco-links { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .9rem; }
.eco-pill { display: inline-flex; align-items: center; gap: .4rem; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: .32rem .85rem; font-size: .9rem; color: var(--ink-strong); transition: border-color .15s ease, color .15s ease; }
.eco-pill:hover { border-color: var(--accent); text-decoration: none; color: var(--ink-strong); }
.eco-pill.primary { background: var(--ink-strong); color: #fff; border-color: var(--ink-strong); }
.eco-pill.primary:hover { background: #2b1d3d; color: #fff; }

/* ---- product band (projects page) --------------------------------------- */
.oss-callout { background: #f4f1f8; border-radius: var(--radius); padding: 1.6rem 2rem 1.4rem; margin: 1.8rem auto 0; max-width: 36rem; text-align: center; font-size: 1.05rem; color: var(--muted); }
.oss-callout-ico { font-size: 2rem; color: var(--accent-deep); display: block; margin-bottom: .6rem; }
.oss-callout h3 { font-size: 1.2rem; color: var(--ink-strong); margin: 0 0 .4rem; }
.oss-callout p { margin: 0; }
.products-sep { border-color: var(--border); margin: 1.8rem 0 0; }
.products-band { background: var(--header-bg); padding: 3rem 0 3.5rem; }
.products-hook { text-align: center; margin: 2rem auto 0; }
.products-hook h2 { font-size: 1.6rem; margin: 0 0 .5rem; }
.products-hook p { color: var(--muted); font-size: 1rem; margin: 0; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.product-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem 1.3rem 1.2rem;
  display: flex; flex-direction: column; gap: .6rem;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.product-card:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.22); text-decoration: none; }
.product-card i { font-size: 1.9rem; color: var(--accent-deep); }
.product-card h3 { font-size: 1.05rem; margin: 0; color: var(--ink-strong); }
.product-card p { font-size: .88rem; color: var(--muted); margin: 0; flex: 1; }
.product-cta { font-size: .8rem; font-weight: 700; color: var(--accent-deep); margin-top: .2rem; }
.product-card--book { background: var(--accent); }
.product-card--book i { color: #fff; }
.product-card--book h3 { color: #fff; }
.product-card--book p { color: rgba(255,255,255,.82); }
.product-card--book .product-cta { color: #fff; }
.product-cta--buy { background: var(--ink-strong); color: #fff; padding: .28rem .7rem; border-radius: 999px; font-size: .78rem; display: inline-block; }
.product-card-links { display: flex; gap: 1rem; margin-top: .2rem; }
.product-cta--gh { color: var(--muted); }

/* ---- footer social icons ------------------------------------------------ */
.footer-links a { display: inline-flex; align-items: center; gap: .4rem; }
.footer-links svg { width: 16px; height: 16px; }

/* ---- article grid (post pages: reading column + sticky sidebar) ---------- */
.article-grid {
  display: grid;
  grid-template-columns: var(--measure) 1fr;
  gap: 2rem;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.5rem;
  align-items: start;
}
.article-sidebar { position: sticky; top: 2rem; padding-top: 1.5rem; }

.book-sidebar {
  background: var(--ink-strong);
  border-radius: var(--radius);
  padding: 1.2rem 1.1rem 1rem;
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.book-sidebar-icon { font-size: 1.6rem; }
.book-sidebar-title { font-family: var(--serif); font-weight: 600; font-size: .95rem; color: #fff; line-height: 1.3; }
.book-sidebar-tagline { font-size: .8rem; color: #c9bfd6; line-height: 1.45; }
.book-sidebar-cta {
  display: block;
  background: var(--accent);
  color: #12334a;
  font-weight: 700;
  font-size: .82rem;
  padding: .45rem .8rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background .15s ease;
}
.book-sidebar-cta:hover { background: #4fa6c9; color: #12334a; text-decoration: none; }
.book-sidebar-learn { font-size: .78rem; color: #c9bfd6; text-decoration: underline; text-underline-offset: 2px; }
.book-sidebar-learn:hover { color: #fff; text-decoration: underline; }
.book-sidebar-also { margin-top: .65rem; background: #f4f1f8; border-radius: var(--radius); padding: .8rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.book-sidebar-also-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .1rem; }
.book-sidebar-also a { font-size: .82rem; color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.book-sidebar-also a:hover { color: var(--ink-strong); text-decoration: underline; }

/* ---- author card (between article and subscribe) ------------------------- */
.author-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  background: #f4f1f8;
  border-radius: var(--radius);
  padding: .85rem 1rem;
  margin: 2rem 0 1em;
}
.author-card-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-card-name { font-weight: 700; font-size: .95rem; color: var(--ink-strong); }
.author-card-role { font-size: .83rem; color: var(--muted); margin-top: .1rem; }
.author-card-role a { color: var(--accent-deep); }

/* ---- responsive --------------------------------------------------------- */
@media (max-width: 600px) {
  body { font-size: 18px; }
  .article-header h1 { font-size: 1.8rem; }
  .prose p { text-align: left; hyphens: none; -webkit-hyphens: none; }
  .site-header .wrap { gap: .5rem .9rem; }
  .site-nav { gap: .8rem; }
  .nav-label { display: none; }
  .site-nav .nav-ico svg { width: 18px; height: 18px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .article-grid { display: block; }
  .article-sidebar { display: none; }
}
