/* The Articles section: the list on articles.html and each article in articles/. */

/* The list: newest first, one card per article. */
.ar-list{max-width:var(--maxw); margin:0 auto; padding:0 24px 80px}
.ar-cards{display:grid; gap:18px; margin-top:18px}
.ar-card{display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:24px; align-items:center; padding:20px 22px; border:1px solid var(--line); border-radius:var(--radius); background:var(--bg); color:var(--ink); text-decoration:none}
.ar-card:hover{border-color:var(--accent); background:var(--accent-soft); text-decoration:none; color:var(--ink)}
.ar-card .ar-meta{display:flex; flex-wrap:wrap; align-items:center; gap:6px 12px; margin-bottom:6px}
.ar-card time{display:block; font-size:12px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--muted)}
.ar-card h2{font-size:22px; line-height:1.25; letter-spacing:-.015em; font-weight:800; margin:0 0 8px}
.ar-card p{font-size:15.5px; line-height:1.6; color:var(--ink-2); margin:0}
.ar-card .more{display:inline-block; margin-top:10px; font-size:14px; font-weight:700; color:var(--accent)}
.ar-card img{display:block; width:100%; aspect-ratio:16/10; object-fit:cover; object-position:left top; border-radius:var(--radius-sm); border:1px solid #b9c0ce}
.ar-empty{color:var(--muted)}
/* Drafts: the same cards, under their own heading at the bottom of the list. */
.ar-drafts{margin-top:56px; padding:24px 22px 22px; background:var(--bg-soft); border:1px solid var(--line); border-radius:var(--radius)}
.ar-drafts h2{font-size:22px; line-height:1.25; letter-spacing:-.015em; font-weight:800; color:var(--ink-2); margin:0 0 6px}
.ar-drafts .lede{font-size:15.5px; line-height:1.6; color:var(--muted); margin:0}
.ar-drafts .ar-cards{margin-top:16px}
.ar-drafts .ar-card{border-style:dashed; background:var(--bg); opacity:.78}
.ar-drafts .ar-card:hover{opacity:1}
.ar-drafts .ar-card img{filter:saturate(.7)}
@media (max-width:720px){.ar-drafts{padding:18px 16px 16px}}
@media (max-width:720px){.ar-list{padding:0 16px 60px} .ar-card{grid-template-columns:1fr; gap:14px; padding:16px} .ar-card img{order:-1}}

/* The topic tag, on the card and beside the date on the article page. One colour
   per topic, keyed on the topic's slug; a topic without a rule here is grey. */
.ar-topic{display:inline-block; font-size:11px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; line-height:1; padding:5px 9px; border-radius:20px; vertical-align:middle; color:var(--cat-grey); background:var(--cat-grey-tint)}
.ar-topic[data-topic="agentic-development"]{color:var(--cat-amber); background:var(--cat-amber-tint)}
.ar-topic[data-topic="quantum-computing"]{color:var(--cat-violet); background:var(--cat-violet-tint)}
.ar-topic[data-topic="technical-leadership"]{color:var(--cat-green); background:var(--cat-green-tint)}
.ar-topic[data-topic="software-design"]{color:var(--cat-teal); background:var(--cat-teal-tint)}
.ar-head .eyebrow .ar-topic{letter-spacing:.1em}

/* One article: a reading column, with figures allowed a little wider. */
.ar{max-width:760px; margin:0 auto; padding:0 24px 80px}
.ar-head{padding:34px 0 8px}
.ar-head .eyebrow{display:block; margin:0 0 8px}
.ar-head .eyebrow a{color:var(--accent)}
.ar-head h1{font-size:clamp(28px,4vw,40px); line-height:1.12; letter-spacing:-.025em; font-weight:800; margin:0 0 14px; text-wrap:balance}
.ar-head .lede{font-size:19px; line-height:1.55; color:var(--ink-2); margin:0}
/* A draft article: a tag beside the date and a note under the title (articles.js adds both). */
.ar-head .ar-draft-tag{display:inline-block; font-size:11px; font-weight:800; letter-spacing:.12em; text-transform:uppercase; color:var(--accent-2); background:var(--amber-soft); border:1px solid var(--amber); border-radius:20px; padding:2px 9px; vertical-align:middle}
.ar-head .ar-draft-note{margin:0 0 8px; padding:12px 16px; font-size:15px; line-height:1.55; color:var(--ink-2); background:var(--amber-soft); border-left:4px solid var(--amber); border-radius:0 var(--radius-sm) var(--radius-sm) 0}
.ar-head .ar-draft-note strong{color:var(--ink)}

.ar-body{font-size:16px; line-height:1.68; color:var(--ink-2)}
.ar-body h2{font-size:24px; line-height:1.25; letter-spacing:-.015em; color:var(--ink); font-weight:800; margin:40px 0 10px}
.ar-body h3{font-size:18px; line-height:1.35; color:var(--ink); font-weight:700; margin:28px 0 6px}
.ar-body p{margin:0 0 16px}
.ar-body ul{margin:0 0 18px; padding-left:22px}
.ar-body li{margin-bottom:8px}
.ar-body strong{color:var(--ink)}
.ar-body mark{background:var(--amber-soft); color:var(--ink); padding:0 2px; border-radius:3px}
.ar-body code{font-size:.9em; background:var(--bg-soft); padding:1px 5px; border-radius:5px}

/* The key point of an article, as numbered steps in a heavy frame */
.ar-body .ar-key{list-style:none; counter-reset:k; margin:22px 0 24px; padding:22px 24px; border:2px solid var(--ink); border-radius:var(--radius); box-shadow:var(--shadow)}
.ar-body .ar-key li{counter-increment:k; position:relative; min-height:32px; padding-left:48px; margin:0 0 16px; font-size:18px; line-height:1.5}
.ar-body .ar-key li:last-child{margin-bottom:0}
.ar-body .ar-key li::before{content:counter(k); position:absolute; left:0; top:-2px; width:32px; height:32px; border-radius:50%; background:var(--ink); color:var(--bg); font-size:16px; font-weight:800; display:flex; align-items:center; justify-content:center}

.ar-body .fig{margin:28px 0}
.ar-body .fig img{display:block; width:100%; height:auto; border-radius:var(--radius-sm); border:1px solid #b9c0ce; box-shadow:var(--shadow)}
/* A problem a diagram shows, marked with the red circle the report itself uses. */
.ar-body .ar-flag{display:flex; gap:14px; align-items:flex-start; margin:14px 0 20px}
.ar-body .ar-flag-n{flex:none; width:26px; height:26px; margin-top:2px; border-radius:50%; background:#e0564a; color:#fff; font-size:15px; font-weight:800; display:flex; align-items:center; justify-content:center; box-shadow:0 0 0 3px #f6d5d1}
.ar-body .ar-flag p{margin:0}
.ar-body .ar-flag strong{display:block; color:#b4382d}
/* A screenshot: the image in a browser-window frame, with the page's name in the bar. */
.ar-body .fig.shot .shot-win{border:1px solid #2b313c; border-radius:var(--radius-sm); box-shadow:var(--shadow); overflow:hidden; background:#111318}
.ar-body .fig.shot .shot-bar{display:flex; align-items:center; gap:12px; padding:7px 12px; background:#1f232b; border-bottom:1px solid #2b313c}
.ar-body .fig.shot .shot-dots{flex:none; width:40px; height:10px; background:radial-gradient(circle at 5px 5px,#ef6a5e 4.5px,transparent 5px),radial-gradient(circle at 20px 5px,#f5bf4f 4.5px,transparent 5px),radial-gradient(circle at 35px 5px,#61c454 4.5px,transparent 5px)}
.ar-body .fig.shot .shot-title{flex:1; min-width:0; padding:3px 10px; border-radius:6px; background:#111318; font-size:12.5px; color:#aab2c0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.ar-body .fig.shot img{border:0; border-radius:0; box-shadow:none}
.ar-body .fig figcaption{margin-top:10px; font-size:14px; line-height:1.5; color:var(--muted)}

/* A row of screenshots: same-size previews of each one's top, full size on click. */
.ar-body .fig-row{display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin:28px 0}
.ar-body .fig-row .fig{margin:0}
.ar-body .fig-row .fig img{aspect-ratio:4/3; object-fit:cover; object-position:top}
@media (max-width:560px){.ar-body .fig-row{grid-template-columns:1fr}}

/* A table of figures. It scrolls sideways on a phone rather than squashing. */
.ar-body .tbl{overflow-x:auto; margin:4px 0 20px}
.ar-body table{border-collapse:collapse; font-size:15px; line-height:1.45; min-width:100%}
.ar-body th{text-align:left; font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); padding:8px 14px 8px 0; border-bottom:2px solid var(--ink)}
.ar-body td{padding:9px 14px 9px 0; border-bottom:1px solid var(--line); vertical-align:top}
.ar-body td:not(:first-child){white-space:nowrap}
.ar-body .tbl.wrap td{white-space:normal}

/* Author-only scratch, shown on localhost only (md.js drops it elsewhere). */
.ar-body .draft-notes{margin:48px 0 8px; padding:18px 20px 6px; border:1px dashed #b9c0ce; border-radius:var(--radius); background:var(--bg-soft)}
.ar-body .draft-notes .draft-tag{display:inline-block; font-size:10.5px; letter-spacing:.13em; text-transform:uppercase; font-weight:700; color:var(--muted); border:1px solid #c9cfdb; border-radius:20px; padding:3px 10px; margin-bottom:10px}
.ar-body .draft-notes h2{margin-top:0}
.ar-body .draft-notes, .ar-body .draft-notes p, .ar-body .draft-notes li{font-size:15px; color:var(--ink-2)}

/* The list of sections on the right (articles.js adds it when there are two or more).
   It looks like the recommendations list beside a conviction. On a narrow screen it
   sits above the article instead. */
.ar--toc{max-width:1104px; display:grid; grid-template-columns:minmax(0,1fr) 260px; column-gap:48px; align-items:start}
.ar--toc > .ar-head, .ar--toc > .ar-body, .ar--toc > .ar-foot{grid-column:1; max-width:712px}
.ar--toc > .ar-head{grid-row:1} .ar--toc > .ar-body{grid-row:2} .ar--toc > .ar-foot{grid-row:3}
.ar--toc > .ar-toc{grid-column:2; grid-row:2; position:sticky; top:84px; max-height:calc(100vh - 104px); overflow-y:auto; overscroll-behavior:contain; margin-top:6px}
.ar--toc .ar-body > h2, .ar--toc .ar-body > h3{scroll-margin-top:84px}
.ar-toc-k{font-size:12px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:#fff; background:var(--amber); padding:10px 14px; border-radius:12px 12px 0 0}
.ar-toc ol{list-style:none; margin:0; padding:4px 0; border:1px solid var(--line); border-top:0; border-radius:0 0 12px 12px; background:#fff}
.ar-toc a{display:block; padding:8px 14px 8px 11px; border-left:3px solid transparent; font-size:14px; line-height:1.4; font-weight:600; color:var(--ink); text-decoration:none}
.ar-toc .ar-toc-h3 a{padding-left:25px; font-size:13px; font-weight:500; color:var(--ink-2)}
.ar-toc a:hover{background:var(--amber-soft); text-decoration:none}
.ar-toc a.on{border-left-color:var(--amber); background:var(--amber-soft); color:var(--ink)}
@media (max-width:960px){
  .ar--toc{display:block; max-width:760px}
  .ar--toc > .ar-toc{position:static; max-height:none; margin:18px 0 26px}
}

.ar-foot{margin-top:40px; padding-top:20px; border-top:1px solid var(--line); display:flex; flex-wrap:wrap; gap:10px}
@media (max-width:720px){.ar{padding:0 16px 60px} .ar-head{padding-top:24px} .ar-head .lede{font-size:17px}}
.ar-body .li-post{white-space:pre-wrap; font-family:var(--font); font-size:15px; line-height:1.6; background:var(--bg); border:1px solid var(--line); border-radius:var(--radius-sm); padding:16px 18px; margin:0 0 16px}

/* A figure opens full size over the page when clicked (articles.js). */
.ar-body .fig img[role="button"]{cursor:zoom-in}
.ar-body .fig img[role="button"]:hover, .ar-body .fig img[role="button"]:focus-visible{border-color:var(--accent); outline:none}
.ar-zoom{position:fixed; inset:0; z-index:50; overflow:auto; padding:16px; background:rgba(22,24,29,.9); cursor:zoom-out}
/* As wide as the screen allows, up to the size it was taken at; a tall one scrolls. */
.ar-zoom img{display:block; margin:auto; width:auto; max-width:min(100%, 1440px); height:auto; border-radius:var(--radius-sm); box-shadow:var(--shadow-lg)}

/* "How to read" panel: stands out as the explanation, but stays quieter than the amber highlights. */
.ar-body .ar-explain{margin:8px 0 28px; padding:18px 22px 4px; background:var(--accent-soft); border-left:4px solid var(--accent); border-radius:0 var(--radius-sm) var(--radius-sm) 0}
.ar-body .ar-explain h2{font-size:19px; margin:0 0 8px; color:var(--accent-2)}
.ar-body .ar-explain p{font-size:16px; margin:0 0 14px}
@media (max-width:720px){.ar-body .ar-explain{padding:14px 16px 2px} .ar-body .ar-explain p{font-size:15px}}

/* A prompt the reader can copy into their own agent. */
/* A test list: the product area and level, the rule, and its cases. */
.ar-body .ar-tests{background:var(--bg-soft); border:1px solid var(--line); border-radius:var(--radius-sm); padding:14px 18px 6px; margin:0 0 20px; font-size:15px; line-height:1.5}
.ar-body .ar-tests .t-head{display:flex; align-items:center; gap:10px; margin-bottom:6px}
.ar-body .ar-tests .t-area{font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--muted)}
.ar-body .ar-tests .t-level, .ar-body .ar-tests .t-inf{font-size:11.5px; font-weight:600; color:var(--muted); border:1px solid var(--line); background:#fff; border-radius:20px; padding:1px 8px; white-space:nowrap}
.ar-body .ar-tests .t-rule{font-weight:700; margin:0 0 8px}
.ar-body .ar-tests ul{list-style:none; margin:0 0 8px; padding:0}
.ar-body .ar-tests li{position:relative; padding:5px 0 5px 22px; border-top:1px solid var(--line); margin:0}
.ar-body .ar-tests li::before{content:""; position:absolute; left:6px; top:14px; width:6px; height:6px; border-radius:50%; background:var(--muted)}
.ar-body .ar-prompt{white-space:pre-wrap; font-family:ui-monospace, SFMono-Regular, Consolas, monospace; font-size:13.5px; line-height:1.6; color:var(--ink); background:var(--bg-soft); border:1px solid var(--line); border-radius:var(--radius-sm); padding:16px 18px; margin:0 0 20px}
.ar-body ol{margin:0 0 18px; padding-left:24px}
.ar-body ol li{margin-bottom:10px}

/* A recommendations section: group titles as a tinted band (<h3 class="ar-group"> in the markdown),
   and every list after the first one numbered as one run, with the bold lead on its own line. */
.ar-body{counter-reset:rec}
.ar-body h3.ar-group{margin:34px 0 12px; padding:10px 16px; font-size:17px; color:var(--cat-amber); background:var(--cat-amber-tint); border-left:4px solid var(--brand); border-radius:0 var(--radius-sm) var(--radius-sm) 0}
.ar-body h3.ar-group ~ ul{list-style:none; padding-left:0; margin:0 0 14px}
.ar-body h3.ar-group ~ ul > li{counter-increment:rec; position:relative; margin:0 0 12px; padding:12px 16px 12px 52px; border:1px solid var(--line); border-radius:var(--radius-sm); background:#fff}
.ar-body h3.ar-group ~ ul > li::before{content:counter(rec); position:absolute; left:14px; top:12px; width:26px; height:26px; display:grid; place-items:center; border-radius:50%; background:var(--brand); color:var(--ink); font-size:13px; font-weight:800; line-height:1}
.ar-body h3.ar-group ~ ul > li > strong:first-child{display:block; margin-bottom:4px; font-size:17px; line-height:1.4; color:var(--ink)}
.ar-body h3.ar-group ~ ul > li > p.ex{margin:12px 0 0; padding-top:12px; border-top:1px solid var(--line)}
.ar-body h3.ar-group ~ :is(.tbl, figure){margin-left:52px}
@media (max-width:600px){ .ar-body h3.ar-group ~ :is(.tbl, figure){margin-left:0} }
