/* Blog and guides. Builds on /styles.css (palette, bands, header, footer).
   Source: content/blog.css; scripts/build_blog.py copies it to dist/blog/blog.css. */

.wrap-read { width: min(100% - 3rem, 720px); margin-inline: auto; }

/* ---------- Blog index ---------- */
.blog-hero { padding-block: clamp(3rem, 6vw, 5rem) clamp(3rem, 6vw, 4.5rem); }
.blog-hero .eyebrow a { color: inherit; }
.blog-mega { font-size: clamp(4rem, 11vw, 9rem); }
.blog-hero .band-lede { max-width: 40rem; color: #eef2ff; }
.blog-list { padding-block: 2.5rem 4.5rem; }
.tag-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.tag-filter a { display: inline-flex; align-items: center; gap: .45rem; border: 1.5px solid #4b514e; border-radius: 999px; padding: .5rem .9rem; color: #dfe2de; text-decoration: none; font-size: .88rem; font-weight: 800; }
.tag-filter a span { color: var(--muted); font-weight: 700; font-size: .8rem; }
.tag-filter a:hover { border-color: var(--teal); }
.tag-filter a[aria-current="page"] { background: var(--teal); border-color: var(--teal); color: #061010; }
.tag-filter a[aria-current="page"] span { color: #0b3c38; }
.feed-link { margin: 2.5rem 0 0; font-size: .9rem; }
.feed-link a { color: var(--teal); font-weight: 700; }

.post-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.post-card { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-top: 7px solid var(--edge, var(--teal)); border-radius: 22px; padding: 1.3rem 1.35rem 1.4rem; }
.post-card:hover { border-color: #4b514e; border-top-color: var(--edge, var(--teal)); }
.post-card:focus-within { outline: 3px solid var(--teal); outline-offset: 3px; }
.post-card-kicker { color: var(--muted); font-size: .74rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 .7rem; }
.post-card-title { font-size: 1.28rem; line-height: 1.22; letter-spacing: -.025em; margin: 0 0 .6rem; }
.post-card-title a { color: var(--ink); text-decoration: none; }
.post-card-title a::after { content: ""; position: absolute; inset: 0; border-radius: 22px; } /* whole card is the link */
.post-card-title a:focus-visible { outline: none; }
.post-card-desc { color: #c5cac6; font-size: .96rem; line-height: 1.5; margin: 0 0 1rem; }
.post-card-meta { color: #8d958f; font-size: .82rem; margin: auto 0 0; }
.band-amber-edge { --edge: var(--f-amber); } .band-blue-edge { --edge: #1f6fd1; } .band-fire-edge { --edge: #e2501f; }
.band-violet-edge { --edge: #7a36f0; } .band-teal-edge { --edge: var(--f-teal); } .band-green-edge { --edge: var(--f-green); }
.band-sand-edge { --edge: var(--f-sand); } .band-grey-edge { --edge: #b9bbbd; }

/* ---------- Post hero (colour band) ---------- */
.post-hero { padding-block: clamp(2rem, 4vw, 3rem) clamp(2.5rem, 5vw, 4rem); }
.post-hero-inner { max-width: 980px; }
.crumbs { font-size: .85rem; font-weight: 700; margin-bottom: 1.8rem; opacity: .9; }
.crumbs a { color: inherit; text-underline-offset: .25em; }
.post-kicker { font-size: .78rem; letter-spacing: .14em; font-weight: 900; text-transform: uppercase; margin: 0 0 .9rem; }
.post-title { font-family: var(--display); font-stretch: condensed; font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; font-size: clamp(2.5rem, 6.2vw, 5.4rem); line-height: .94; margin: 0; max-width: 18ch; text-wrap: balance; overflow-wrap: break-word; }
.post-lede { font-size: clamp(1.08rem, 1.6vw, 1.3rem); line-height: 1.5; font-weight: 600; max-width: 40rem; margin: 1.4rem 0 0; }
.post-meta { font-size: .88rem; font-weight: 700; margin: 1.2rem 0 0; opacity: .85; }
.post-hero-img { margin-top: 2rem; border-radius: 18px; width: 100%; max-width: 720px; }
.band-blue .post-lede { color: #eef2ff; }

/* ---------- Article body ---------- */
.post-body { padding-block: clamp(2.2rem, 5vw, 3.5rem) 1rem; }
.prose { font-size: 1.1rem; line-height: 1.72; color: #e4e6e2; }
.prose > * { margin-block: 0 1.15em; }
.prose h2 { font-family: var(--display); font-stretch: condensed; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; font-size: clamp(1.9rem, 4vw, 2.5rem); line-height: 1; color: var(--ink); margin: 2.4em 0 .6em; scroll-margin-top: 1rem; }
.prose h3 { font-size: 1.22rem; letter-spacing: -.02em; line-height: 1.3; color: var(--ink); margin: 1.8em 0 .45em; scroll-margin-top: 1rem; }
.prose h4 { font-size: 1.02rem; color: var(--ink); margin: 1.5em 0 .4em; }
.prose > :first-child { margin-top: 0; }
.prose a, .sources a, .post-tags a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: .2em; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { color: #fff; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-block: .4em; }
.prose li::marker { color: var(--teal); }
.prose code { font-size: .9em; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: .05em .35em; }
.prose img { border-radius: 14px; }
.prose [lang="ja"] { font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif; }
.note { background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--yellow); border-radius: 14px; padding: 1rem 1.2rem; font-size: 1rem; line-height: 1.6; }
.note > :last-child { margin-bottom: 0; }
.note p { margin: 0 0 .6em; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; line-height: 1.45; }
.prose th, .prose td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child th, .prose tr:last-child td { border-bottom: 0; }
.prose thead th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; background: #101212; }
.prose tbody th { color: var(--ink); font-weight: 800; }
.swatch { display: inline-block; width: .95em; height: .95em; border-radius: 4px; vertical-align: -.1em; margin-right: .45em; box-shadow: inset 0 0 0 1px #ffffff40; }

/* Table of contents */
.toc { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem 1.3rem 1.2rem; margin-bottom: 2.4rem; }
.toc-title { font-size: .76rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin: 0 0 .6rem; }
.toc ol { margin: 0; padding-left: 1.3rem; columns: 2 16rem; column-gap: 2rem; }
.toc li { margin: .3rem 0; break-inside: avoid; font-size: .95rem; line-height: 1.4; }
.toc li::marker { color: var(--muted); font-size: .85em; }
.toc a { color: #dfe2de; text-decoration: none; }
.toc a:hover { color: var(--teal); text-decoration: underline; }

/* Sources */
.sources { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.6rem; }
.sources h2 { font-size: .8rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 .8rem; scroll-margin-top: 1rem; }
.sources ol { padding-left: 1.3rem; margin: 0; font-size: .93rem; line-height: 1.5; }
.sources li { margin: .45rem 0; overflow-wrap: anywhere; }
.src-host { color: #8d958f; font-size: .82rem; white-space: nowrap; }
.sources-note { color: #8d958f; font-size: .84rem; line-height: 1.55; margin: 1.1rem 0 0; }

.post-tags { margin: 2rem 0 0; color: var(--muted); font-size: .88rem; display: flex; flex-wrap: wrap; gap: .4rem .7rem; align-items: center; }
.post-tags a { font-weight: 700; }

/* Calm CTA (brand teal, like the landing's closing band; the black App Store badge needs a light ground) */
.cta-box { display: flex; gap: 1.2rem; align-items: flex-start; margin: 2.6rem 0 1rem; background: var(--teal); color: #071210; border-radius: 22px; padding: 1.4rem 1.4rem 1.5rem; }
.cta-icon { flex: none; width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 6px 16px #0873694d; }
.cta-title { font-size: 1.16rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.35; margin: 0 0 .5rem; color: #071210; }
.cta-sub { color: #0b3c38; font-size: .92rem; line-height: 1.5; margin: 0 0 1.1rem; font-weight: 600; }
.cta-box .store-badge img { width: 150px; }
.cta-box .store-badge:focus-visible { outline-color: #071210; }

/* Related */
.related { padding-block: 2.5rem 4rem; border-top: 1px solid #202423; margin-top: 2.5rem; }
main h2.related-title { font-size: clamp(2.2rem, 4.5vw, 3.4rem); line-height: 1; margin: 0 0 1.5rem; }

@media (max-width: 760px) {
  .wrap-read { width: calc(100% - 2rem); }
  .blog-list { padding-top: 2rem; }
  .post-title { font-size: clamp(2.3rem, 11.5vw, 3.4rem); }
  .crumbs { margin-bottom: 1.3rem; }
  .prose { font-size: 1.06rem; line-height: 1.68; }
  .prose th, .prose td { padding: .6rem .65rem; }
  .toc ol { columns: 1; }
  .cta-box { flex-direction: column; gap: .9rem; padding: 1.2rem; }
  .cta-icon { width: 52px; height: 52px; border-radius: 12px; }
  .site-header .header-cta { font-size: .8rem; }
}
@media (max-width: 400px) {
  .site-header .header-cta { padding: .55rem .7rem; gap: .4rem; }
  .brand { font-size: 1.2rem; gap: .55rem; } .brand img { width: 34px; height: 34px; }
}
@media print {
  .site-header, .site-footer, .cta-box, .related, .tag-filter { display: none; }
  body { background: #fff; color: #000; }
  .post-hero { background: none; color: #000; }
  .prose, .prose strong, .prose h2, .prose h3 { color: #000; }
}
