/* Article pages: one reading column on paper, wide hero, dark cards for code and figures. */
.progress{position:fixed;left:0;top:0;right:0;height:3px;background:var(--accent);transform-origin:left;transform:scaleX(0);z-index:60}

.a-head{padding-top:clamp(40px,7vw,96px);padding-bottom:clamp(28px,4vw,48px)}
.a-head .back{display:inline-flex;gap:8px;color:var(--muted);transition:color .2s,gap .25s var(--ease)}
.a-head .back:hover{color:var(--accent);gap:12px}
.a-meta{margin-top:clamp(28px,4vw,44px);color:var(--muted)}
.a-meta .sep{margin:0 10px;opacity:.5}
.a-head h1{margin-top:18px;font-size:clamp(40px,7vw,96px);line-height:.98;letter-spacing:-.045em;font-weight:650;max-width:15ch;text-wrap:balance}
.a-hero{margin:0 auto}
.a-hero img{width:100%;max-height:680px;object-fit:cover;border-radius:24px;background:var(--paper-2)}

.a-body{max-width:740px;margin:0 auto;padding:clamp(48px,7vw,88px) var(--gutter) 0}
.post-content{font-size:19px;line-height:1.75;color:var(--ink-2)}
.post-content > *:first-child{margin-top:0}
.post-content p{margin:0 0 1.35em;text-wrap:pretty}
.post-content a{color:var(--ink);text-decoration:underline;text-decoration-color:var(--accent);text-decoration-thickness:1.5px;text-underline-offset:3px;transition:color .2s}
.post-content a:hover{color:var(--accent)}
.post-content strong,.post-content b{color:var(--ink);font-weight:650}
.post-content h1,.post-content h2,.post-content h3,.post-content h4{color:var(--ink);font-weight:650;letter-spacing:-.03em;text-wrap:balance;scroll-margin-top:90px}
.post-content h1{font-size:40px;line-height:1.1;margin:72px 0 24px}
.post-content h2{font-size:clamp(28px,3.4vw,36px);line-height:1.15;margin:80px 0 22px;padding-top:28px;border-top:1px solid var(--line)}
.post-content h3{font-size:24px;line-height:1.25;margin:52px 0 16px}
.post-content h4{font-size:20px;line-height:1.3;margin:40px 0 12px}

/* Lists: small squares from the logo, mono numbers */
.post-content ul,.post-content ol{margin:0 0 1.5em;padding:0;list-style:none}
.post-content li{position:relative;padding-left:30px;margin:0 0 .6em}
.post-content ul > li::before{content:"";position:absolute;left:6px;top:.68em;width:7px;height:7px;background:var(--accent);border-radius:1px}
.post-content ol{counter-reset:item}
.post-content ol > li{counter-increment:item}
.post-content ol > li::before{content:counter(item,decimal-leading-zero);position:absolute;left:0;top:.28em;font:500 13px/1.6 var(--mono);color:var(--accent)}
.post-content li > ul,.post-content li > ol{margin:.6em 0 0}

.post-content blockquote{margin:2em 0;padding:4px 0 4px 22px;border-left:3px solid var(--accent);font-size:22px;line-height:1.5;color:var(--ink);font-weight:500}
.post-content blockquote p:last-child{margin-bottom:0}
.post-content hr{border:0;height:1px;background:var(--line);margin:3.2em 0}
.post-content img{max-width:100%;height:auto;margin:2em auto;border-radius:12px;border:1px solid var(--line)}
.post-content p.code-comment{font-size:15px;line-height:1.6;color:var(--muted);background:var(--paper-2);border-radius:10px;padding:12px 16px;margin-top:-.4em}

/* Code: inline on paper, blocks as dark cards */
.post-content code{font-family:var(--mono);font-size:.84em;background:var(--paper-2);color:var(--ink);padding:2px 6px;border-radius:5px}
.post-content pre{position:relative;margin:1.8em 0;padding:20px 22px;background:var(--night);border-radius:14px;overflow-x:auto;line-height:1.65}
.post-content pre code{display:block;background:none;padding:0;color:#E7E5EE;font-size:14px;white-space:pre}
.code-copy-btn{position:absolute;top:10px;right:10px;font:500 11.5px/1 var(--mono);letter-spacing:.04em;text-transform:uppercase;color:rgba(255,255,255,.7);background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);border-radius:999px;padding:7px 11px;cursor:pointer;transition:color .2s,border-color .2s,background .2s}
.code-copy-btn:hover{color:#fff;border-color:rgba(255,255,255,.4)}
.code-copy-btn.copied{color:#fff;background:var(--accent);border-color:var(--accent)}

/* Tables */
.post-content table{width:100%;border-collapse:collapse;margin:2em 0;font-size:16px;display:block;overflow-x:auto}
.post-content th{font:500 12px/1.4 var(--mono);letter-spacing:.04em;text-transform:uppercase;color:var(--muted);text-align:left;padding:10px 14px;border-bottom:1.5px solid var(--ink)}
.post-content td{padding:12px 14px;border-bottom:1px solid var(--line);vertical-align:top}
.post-content tr:hover td{background:rgba(124,58,237,.04)}

/* Diagrams sit on a white card, wider than the text column */
.post-content figure{margin:2.4em calc(var(--gutter) * -0.5)!important;background:#fff;border:1px solid var(--line);border-radius:20px;padding:24px 18px 16px}
.post-content figcaption{color:var(--muted)!important}

/* The Trust Factory's own blocks, restyled for paper */
.a-body .post-content p.tf-dek{background:none;color:var(--ink);-webkit-text-fill-color:currentColor;font-size:clamp(24px,2.6vw,30px);line-height:1.35;letter-spacing:-.02em;font-weight:550}
.a-body .post-content p.tf-key{color:var(--ink);font-size:23px;line-height:1.45;font-weight:600;letter-spacing:-.015em;border-left:3px solid var(--accent);border-image:none;padding:2px 0 2px 22px;margin:2em 0}
.a-body .post-content ol.tf-steps{background:#fff;border:1px solid var(--line);border-radius:18px;padding:6px 26px;margin:1.6em 0 2em}
.a-body .post-content ol.tf-steps li{color:var(--ink-2);border-top-color:var(--line)}
.a-body .post-content ol.tf-steps li strong{color:var(--ink)}
.a-body .post-content ol.tf-steps li::before{background:var(--accent);font-family:var(--sans)}

/* Tools mentioned */
.tools{margin:56px 0 0}
.tools h3{color:var(--muted);margin-bottom:16px}
.tools-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.tool{display:flex;align-items:center;gap:14px;padding:14px 16px;border:1px solid var(--line);border-radius:16px;background:#fff;transition:border-color .25s,transform .35s var(--ease)}
.tool:hover{border-color:var(--ink);transform:translateY(-2px)}
.tool img,.tool svg{width:40px;height:40px;border-radius:10px;flex:none;object-fit:contain}
.tool b{display:block;font-weight:600}
.tool span{color:var(--muted);font-size:14px}

/* Share row */
.share{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:64px;padding-top:24px;border-top:1px solid var(--line);color:var(--muted)}
.share-buttons{display:flex;gap:8px}
.share-buttons a{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;border:1px solid var(--line);color:var(--ink);transition:background .25s,color .25s,border-color .25s,transform .25s var(--ease)}
.share-buttons a:hover{background:var(--ink);border-color:var(--ink);color:#fff;transform:translateY(-2px)}
.share-buttons svg{width:17px;height:17px}

/* Author card */
.author + .share{margin-top:32px}
.author{display:flex;align-items:center;gap:20px;margin-top:64px;padding:24px;border-radius:22px;background:#fff;border:1px solid var(--line)}
.author-mark{flex:none;width:64px;height:64px;border-radius:50%;background:var(--ink);color:#fff;display:grid;place-items:center;font-weight:650;font-size:21px;letter-spacing:-.02em}
.author-text{flex:1;min-width:0}
.author-text .mono{color:var(--muted)}
.author-text b{display:block;font-size:22px;font-weight:650;letter-spacing:-.02em;margin-top:2px}
.author-text p{margin-top:4px;color:var(--ink-2);font-size:15.5px;line-height:1.5}
.author .btn{flex:none}
.author .btn i{font-size:15px}

/* Keep reading */
.more-grid{display:grid;grid-template-columns:1fr 1fr;gap:clamp(16px,3vw,32px)}
.more-card{display:block}
.more-card .img{border-radius:18px;overflow:hidden;aspect-ratio:16/10;background:var(--paper-2)}
.more-card img{width:100%;height:100%;object-fit:cover;transition:transform 1s var(--ease)}
.more-card:hover img{transform:scale(1.04)}
.more-card .meta{display:block;color:var(--muted);margin-top:18px}
.more-card h3{font-size:clamp(22px,2.4vw,30px);line-height:1.15;letter-spacing:-.03em;font-weight:600;margin-top:8px;transition:color .2s}
.more-card:hover h3{color:var(--accent)}

@media (max-width:720px){
  .post-content{font-size:17.5px}
  .post-content figure{margin-left:-8px!important;margin-right:-8px!important;padding:16px 8px 12px;border-radius:16px}
  .a-hero img{border-radius:16px}
  .share{flex-direction:column;align-items:flex-start}
  .tools-row,.more-grid{grid-template-columns:1fr}
  .author{flex-wrap:wrap;gap:16px;padding:20px}
  .author-mark{width:52px;height:52px;font-size:18px}
  .author-text{flex-basis:calc(100% - 68px)}
  .author .btn{width:100%}
}
