/* The blog: the index and the posts (built by scripts/make-blog.py). */
main { position: relative; isolation: isolate; width: min(1080px, 100% - 32px); margin: 0 auto; padding: 132px 0 88px; }
main::before { content: ""; position: absolute; z-index: -1; pointer-events: none; left: 50%; top: 0; width: 1100px; max-width: 100vw; height: 700px;
  transform: translateX(-50%); background: radial-gradient(ellipse 55% 50% at 50% 18%, rgba(243, 232, 212, .12), transparent 70%); }
.label { font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.intro-text { margin: 0; font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 720px; }
.crumb a, .mono { color: var(--muted); text-decoration: none; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.crumb a::before { content: "← "; }
.crumb a:hover { color: var(--ink); }

.byline { display: flex; align-items: center; gap: 12px; margin-top: 26px; }
.byline img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgba(243, 239, 231, .12); }
.byline > span { display: flex; flex-direction: column; font-size: 14px; line-height: 1.35; }
.byline > span > span { color: var(--faint); }

main section { padding: 0; }
.prose th, .prose td { text-align: left; border-bottom: 0; }
.prose td:first-child { color: var(--ink); }

/* Index */
.index-head { max-width: 760px; margin-bottom: 48px; }
.index-head h1, .post-head h1 { font: 650 clamp(36px, 6.4vw, 64px)/1.03 var(--display); letter-spacing: -.04em; margin: 14px 0 18px; max-width: none; text-wrap: balance; }
.card { display: grid; text-decoration: none; border-radius: 22px; overflow: hidden; background: rgba(243, 239, 231, .035);
  box-shadow: inset 0 0 0 1px var(--line); transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line-2), 0 26px 60px -30px rgba(0, 0, 0, .9); }
.card .img { display: block; overflow: hidden; aspect-ratio: 16 / 10; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover img { transform: scale(1.04); }
.card .txt { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 22px; }
.card .meta { font: 500 11.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.card .h { font: 600 20px/1.2 var(--display); letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
.card .d { font-size: 15px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card.big { grid-template-columns: 1.35fr 1fr; margin-bottom: 18px; }
.card.big .img { aspect-ratio: auto; min-height: 340px; }
.card.big .txt { justify-content: center; padding: 34px; }
.card.big .h { font-size: clamp(24px, 3.2vw, 34px); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* Post */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, #f3e2c4, #f3efe7); box-shadow: 0 0 12px rgba(243, 226, 196, .6); }
.post-head { max-width: 780px; margin: 0 auto; text-align: left; }
.post-photo { margin: 40px 0 0; }
.post-photo img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 24px; box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .9); }
.post-photo figcaption, .post-photo figcaption a { color: var(--faint); font-size: 13px; margin-top: 10px; text-align: right; }
.post-photo figcaption a:hover { color: var(--ink); }
.post-grid { display: grid; grid-template-columns: 220px minmax(0, 700px); gap: 56px; justify-content: center; margin-top: 56px; }
.post-grid > .prose:only-child { grid-column: 1 / -1; margin: 0 auto; width: min(700px, 100%); }
.toc { position: sticky; top: 100px; align-self: start; font-size: 14px; }
.toc ol { list-style: none; counter-reset: toc; border-left: 1px solid var(--line); }
.toc li { counter-increment: toc; }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 1px solid transparent; color: var(--faint); text-decoration: none; line-height: 1.35; }
.toc a:hover, .toc a.on { color: var(--ink); border-left-color: var(--ink); }

.prose { font-size: 18px; line-height: 1.7; color: #d9d4ca; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font: 620 clamp(24px, 3.4vw, 32px)/1.15 var(--display); letter-spacing: -.025em; color: var(--ink); margin-top: 2.2em; scroll-margin-top: 100px; }
.prose h3 { font: 600 20px/1.3 var(--display); color: var(--ink); margin-top: 1.8em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose em { font-style: italic; color: inherit; }
.prose a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(243, 239, 231, .35); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--faint); }
.prose code { font: 15px var(--mono); background: rgba(243, 239, 231, .07); padding: 2px 6px; border-radius: 6px; }
.pull { margin: 2em 0 !important; padding: 4px 0 4px 24px; border-left: 3px solid #f3e2c4; }
.pull p { font: 600 clamp(22px, 3vw, 28px)/1.3 var(--display); letter-spacing: -.02em; color: var(--ink); }

.box { padding: 22px 24px; border-radius: 18px; background: rgba(243, 239, 231, .045); box-shadow: inset 0 0 0 1px var(--line); font-size: 17px; }
.box > * + * { margin-top: .7em; }
.box.answer { background: linear-gradient(180deg, rgba(243, 226, 196, .11), rgba(243, 226, 196, .04)); box-shadow: inset 0 0 0 1px rgba(243, 226, 196, .22); }
.box.answer .label { color: #f3e2c4; }
.box.tip { position: relative; padding-left: 64px; }
.box.tip::before { content: ""; position: absolute; left: 22px; top: 22px; width: 26px; height: 26px; border-radius: 7px; background: url(/icon.png) center / cover; }
.box.side .label { color: #f0b47a; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 1.6em 0 !important; }
.stat { padding: 20px; border-radius: 18px; background: rgba(243, 239, 231, .045); box-shadow: inset 0 0 0 1px var(--line); }
.stat b { display: block; font: 650 clamp(26px, 3.6vw, 34px)/1.05 var(--display); letter-spacing: -.03em; color: var(--ink); }
.stat span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.4; color: var(--muted); }

.prose .table { overflow-x: auto; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; min-width: 0; }
.prose table.wide { min-width: 520px; }
.prose th:last-child, .prose td:last-child { display: table-cell; }  /* site.css hides the last column on phones, for the homepage table */
.prose th, .prose td { text-align: left; vertical-align: top; padding: 11px 14px; border-top: 1px solid var(--line); }
.prose thead th { border-top: 0; font: 500 11.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: rgba(243, 239, 231, .03); }

.calc { padding: 24px; border-radius: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; font-size: 15px; }
.calc .label, .calc .hint, .calc .calc-out { grid-column: 1 / -1; }
.calc label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); line-height: 1.35; }
.calc input { font: 500 17px var(--sans); color: var(--ink); background: rgba(0, 0, 0, .25); border: 0; border-radius: 12px; padding: 11px 13px; box-shadow: inset 0 0 0 1px var(--line-2); }
.calc input:focus { outline: 2px solid rgba(243, 226, 196, .5); }
.calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc-out.three { grid-template-columns: 1fr 1fr 1fr; }
.calc-out div { padding: 16px 18px; border-radius: 16px; background: rgba(243, 226, 196, .08); box-shadow: inset 0 0 0 1px rgba(243, 226, 196, .2); }
.calc-out span { display: block; color: var(--muted); font-size: 13.5px; }
.calc-out b { font: 650 30px/1.1 var(--display); letter-spacing: -.03em; color: var(--ink); }
.calc .hint { color: var(--faint); font-size: 13.5px; }

.cta-card { display: flex; gap: 20px; align-items: flex-start; padding: 26px; border-radius: 24px; margin: 56px auto 0; max-width: 780px; }
.prose .cta-card { margin: 2em 0 !important; }
.cta-card img { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.cta-card .cta-title { font: 620 21px/1.25 var(--display); letter-spacing: -.02em; color: var(--ink); }
.cta-card p { color: var(--muted); font-size: 15.5px; line-height: 1.55; margin-bottom: 14px; }
.cta-card p.cta-title { margin-bottom: 6px; }
.prose .cta-card a.btn { color: #14120f; text-decoration: none; }

.author { display: flex; gap: 22px; align-items: center; padding: 26px; border-radius: 24px; margin: 72px auto 0; max-width: 780px; }
.author img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: none; }
.author .name { font: 620 22px/1.2 var(--display); color: var(--ink); margin-bottom: 4px; }
.author p { color: var(--muted); font-size: 15.5px; }
.author a { display: inline-block; margin-top: 8px; color: var(--ink); font-size: 15px; text-decoration: none; }
.author a:hover { text-decoration: underline; }

.comments { max-width: 780px; margin: 72px auto 0; }
.comments h2, .more-posts h2 { font: 620 clamp(24px, 3.4vw, 30px)/1.15 var(--display); letter-spacing: -.025em; margin-bottom: 20px; }
.comment-list { list-style: none; display: grid; gap: 12px; margin-bottom: 18px; }
.comment-list li { padding: 18px 20px; border-radius: 18px; background: rgba(243, 239, 231, .04); box-shadow: inset 0 0 0 1px var(--line); }
.comment-list li.new { animation: pop .5s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
.comment-list .who { margin: 0 0 4px; padding: 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 15px; margin-bottom: 4px; }
.comment-list .who b { color: var(--ink); }
.comment-list .who span { color: var(--faint); font-size: 13px; }
.comment-list .who em { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: rgba(243, 226, 196, .16); color: #f3e2c4; }
.comment-list p { color: #d9d4ca; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-list .empty { color: var(--muted); background: none; box-shadow: none; padding: 0; }
.comment-form { display: grid; gap: 14px; padding: 22px; border-radius: 22px; }
.comment-form label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 14px; }
.comment-form input, .comment-form textarea { font: 400 16px/1.5 var(--sans); color: var(--ink); background: rgba(0, 0, 0, .25); border: 0; border-radius: 12px; padding: 11px 13px; box-shadow: inset 0 0 0 1px var(--line-2); resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus { outline: 2px solid rgba(243, 226, 196, .5); }
.comment-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.comment-form .row { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.comment-form .small { color: var(--faint); font-size: 13px; flex: 1 1 240px; }
.comment-form .status { color: var(--muted); font-size: 14px; min-height: 1em; }
.comment-form .status:empty { display: none; }

.more-posts { margin-top: 88px; }

@media (max-width: 960px) {
  .post-grid { grid-template-columns: minmax(0, 700px); gap: 0; }
  .toc { position: static; margin-bottom: 36px; padding: 18px 20px; border-radius: 18px; background: rgba(243, 239, 231, .035); box-shadow: inset 0 0 0 1px var(--line); }
  .cards { grid-template-columns: 1fr 1fr; }
  .card.big { grid-template-columns: 1fr; }
  .card.big .img { min-height: 0; aspect-ratio: 16 / 10; }
  .card.big .txt { padding: 22px; }
}
@media (max-width: 640px) {
  main { padding-top: 112px; }
  .prose { font-size: 17px; }
  .intro-text { font-size: 18px; }
  .cards { grid-template-columns: 1fr; }
  .post-photo img { border-radius: 16px; }
  .calc, .calc-out, .calc-out.three { grid-template-columns: 1fr; }
  .calc-out div { padding: 12px 16px; } .calc-out b { font-size: 24px; }
  .author, .cta-card { flex-direction: column; align-items: flex-start; }
  .box.tip { padding-left: 24px; padding-top: 60px; }
}
@media (prefers-reduced-motion: reduce) { .card, .card img { transition: none; } .comment-list li.new { animation: none; } }
