/* WAM site v3 — blog at scale: cards with covers, sections, popular, pager, and the
   page-type components (chat case, steps, gallery, use-case cards, glossary).
   Built on v3.css tokens: plates, chips, the four type sizes, the landing's bubbles. */

/* ---- index: sections, popular, cards ---- */
.rubs{display:flex;flex-wrap:wrap;gap:10px;margin:34px 0 0}
.rubs .chip{text-decoration:none;color:inherit}
.rubs .chip span{color:var(--fg3);margin-left:4px}
.rubs .chip:hover{background:rgba(255,255,255,.34)}
.rubs .chip[aria-current]{background:var(--pill-bg);color:var(--pill-fg);border-color:var(--pill-bg)}
.rubs .chip[aria-current] span{color:inherit;opacity:.7}
.blog__h{margin:clamp(40px,5vw,64px) 0 18px}
.popular{margin-top:clamp(36px,4vw,56px)}
.popular__h{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 18px;margin-bottom:18px}
.popular__h .meta{color:var(--fg3)}
.popular__grid{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);gap:20px}
.popular__side{display:flex;flex-direction:column;gap:20px}
/* Side cards: text only. A cover shrunk to ~210px loses its own headline, so the side shows the
   kicker, the title and the date; each card takes an equal share of the big card's height. */
.popular__side .pc{flex:1 1 auto}
.popular__side .pc__body{padding:20px 26px;justify-content:center}
.popular__side .pc__desc{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:var(--t18);line-height:1.4}
.popular__side .pc h3{font-size:var(--t26)}
.popular__side .pc__meta{margin-top:0;padding-top:2px}
.pc__meta{white-space:nowrap}
.pcs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.pc{display:flex;flex-direction:column;overflow:hidden;text-decoration:none;color:inherit;min-width:0}
.pc__pic{position:relative;display:block;aspect-ratio:1280/714;overflow:hidden;background:rgba(255,255,255,.18)}
.pc__pic picture,.pc__pic img{display:block;width:100%;height:100%}
.pc__pic img{object-fit:cover;transition:transform .6s ease}
.pc:hover .pc__pic img{transform:scale(1.03)}
.pc__body{display:flex;flex-direction:column;gap:10px;padding:22px 24px 26px;flex:1;min-width:0}
.pc__body .kicker{margin:0}
.pc h2,.pc h3{overflow-wrap:anywhere}
.pc__desc{color:var(--fg2)}
.pc__meta{margin-top:auto;padding-top:6px;color:var(--fg3)}
.pc--big .pc__pic{aspect-ratio:1280/714}
.pc--big .pc__body{padding:26px 30px 30px}
.pager{display:flex;flex-direction:column;align-items:center;gap:18px;margin-top:36px}
.pager__nums{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.pager__nums .chip{text-decoration:none;color:inherit;min-width:2.4em;text-align:center}
.pager__nums .chip[aria-current]{background:var(--pill-bg);color:var(--pill-fg)}

/* ---- article ---- */
.art .kicker a{color:inherit;text-decoration:none}
.art .kicker a:hover{color:#fff}
.art--wide{max-width:1100px}
.art--wide .art__lead,.art--wide .art__meta{max-width:820px}
.art--wide .art__body>p,.art--wide .art__body>h2,.art--wide .art__body>.callout,.art--wide .faq,.art--wide .art__faqh,.art--wide .art__cta{max-width:820px}
.art__toc{margin-top:26px}
/* 29.10 long TOC headings (TR personal-ai-agents-compared) wrap instead of scrolling the page at 390px */
.art__toc .chip{white-space:normal;max-width:100%;overflow-wrap:anywhere}
.fig{margin:32px 0}
.fig picture,.fig img{display:block;width:100%;height:auto;border-radius:var(--r)}
.fig figcaption{margin-top:10px;color:var(--fg3)}
.art__cover{margin:34px 0 0}
.art__cover img{aspect-ratio:1280/714;object-fit:cover}
.callout{padding:22px 26px;margin:28px 0;color:var(--fg2)}
.callout p:last-child{margin-bottom:0}
.callout .kicker{margin-bottom:8px}
.callout--note{border-style:dashed}

/* chat case: the landing's chat scene itself (v3.css .chat[data-scene] + v3.js), nothing restyled here.
   Only the frame: the landing's chat width, and the window height set by blog.js to fit the whole chat. */
.fig--chat{margin:28px 0;max-width:680px}
html:not(.ready) .fig--chat .feed{height:auto}
.feed--mini{padding:6px 0 0;display:flex;flex-direction:column}

/* steps */
.steps{list-style:none;padding:0;margin:8px 0 0;display:flex;flex-direction:column;gap:clamp(36px,5vw,64px)}
.art__body .steps{padding:0}
.step{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:clamp(22px,4vw,56px);align-items:center}
.step:nth-child(even) .step__pic{order:2}
.step__pic img{display:block;width:100%;height:auto;border-radius:var(--r);aspect-ratio:1280/714;object-fit:cover}
.step__txt h2{margin:0 0 14px;color:#fff}
.step__txt .kicker{margin-bottom:8px}
.step__send{margin-top:8px;color:var(--fg3)}

/* gallery: scroll-snap carousel, arrows are an extra */
.gal{margin:8px 0 12px}
.gal__track{display:flex;gap:20px;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding:0;padding-bottom:6px;scrollbar-width:none;outline:none}
.gal__track::-webkit-scrollbar{display:none}
.gal__it{flex:0 0 min(560px,86%);scroll-snap-align:start;margin:0;overflow:hidden;display:flex;flex-direction:column}
.gal__it picture,.gal__it img{display:block;width:100%;height:auto;aspect-ratio:1/1;object-fit:cover}
.gal__it figcaption{padding:18px 22px 22px;display:flex;flex-direction:column;gap:10px;flex:1}
.gal__it .kicker{margin:0}
.gal__nav{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:16px}
.gal__btn{width:52px;height:52px;border-radius:50%;border:1.5px solid var(--plate-b);background:var(--plate);color:#fff;font:inherit;font-size:30px;line-height:1;cursor:pointer}
.gal__btn:hover{background:rgba(255,255,255,.34)}
.gal__btn:disabled{opacity:.4;cursor:default}
.gal__note{max-width:820px;margin-top:16px;color:var(--fg3)}

/* ready-to-copy requests */
.prm{position:relative;display:flex;align-items:flex-start;gap:12px;padding:14px 16px;border-radius:18px;background:rgba(255,255,255,.16);border:1.5px solid var(--plate-b)}
.prm__t{flex:1;margin:0!important;color:#fff;font-size:clamp(16px,1.5vw,20px);line-height:1.4}
.prm__copy{flex:none;font:inherit;font-size:14px;line-height:1;padding:8px 12px;border-radius:999px;border:0;background:var(--pill-bg);color:var(--pill-fg);cursor:pointer}
.prm__copy.ok{background:#fff;color:#1f8f5f}
.prms{display:flex;flex-direction:column;gap:12px;margin:8px 0 24px;max-width:820px}
.ucards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:6px 0 12px}
.ucard{display:flex;flex-direction:column;gap:12px;padding:24px 24px 24px}
.ucard h3{color:#fff;line-height:1.2}
.ucard>p{margin:0;color:var(--fg2)}
.ucard .prm{margin-top:auto}

/* glossary */
.az{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 20px}
.az .chip{text-decoration:none;color:inherit;min-width:2.2em;text-align:center}
.terms{display:flex;flex-direction:column;gap:12px;margin:0}
.terms__l{color:#fff;margin:22px 0 2px}
.term{padding:20px 24px;scroll-margin-top:110px}
.term:target{border-color:#fff}
.term dt{color:#fff;margin-bottom:8px}
.term dd{margin:0}
.term dd p{margin:0}
.terms__see{margin-top:10px!important;color:var(--fg3)}
.terms__see a{color:var(--fg2)}

@media (max-width:1100px){.pcs{grid-template-columns:repeat(2,minmax(0,1fr))}.popular__grid{grid-template-columns:minmax(0,1fr)}}
@media (max-width:760px){
  .pcs,.ucards{grid-template-columns:minmax(0,1fr)}
  .popular__side .pc{flex-direction:column}
  .popular__side .pc__pic{flex:none;align-self:stretch;margin:0;border-radius:0}
  .popular__side .pc__body{padding:22px 24px 26px}
  .step{grid-template-columns:minmax(0,1fr)}
  .step:nth-child(even) .step__pic{order:0}
  .callout{padding:18px 18px}
  .term{padding:18px}
  .gal__btn{width:44px;height:44px;font-size:26px}
}

/* article footer: reader stars (baked by blog_build, made votable by blog.js) and share buttons */
.social{position:relative;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px 24px;margin:44px 0 0;padding-top:26px;border-top:1.5px solid var(--plate-b)}
.social:empty{display:none}
.mag{display:inline-flex;align-items:center;gap:10px;height:50px;padding:0 22px 0 16px;border-radius:999px;border:1.5px solid var(--plate-b);background:var(--plate);color:#fff;font:inherit;font-size:17px;font-weight:500;line-height:1;cursor:pointer;transition:background .2s,color .2s}
.mag:hover{background:rgba(255,255,255,.34)}
.mag__ic{width:26px;height:26px;flex:none}
.mag__u{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:butt}
.mag__tip{fill:none;stroke:currentColor;stroke-width:1.6}
.mag.on{background:var(--pill-bg);color:var(--pill-fg);border-color:var(--pill-bg)}
.mag.on .mag__tip{fill:currentColor}
.mag.pulse .mag__ic{animation:magpulse .5s ease}
@keyframes magpulse{40%{transform:scale(1.25) rotate(-12deg)}100%{transform:none}}
.mag__n{font-weight:500;padding-left:10px;margin-left:2px;border-left:1.5px solid currentColor;opacity:.8}
.mag__n[hidden]{display:none}
.rate{display:flex;flex-direction:column;gap:8px;min-width:0;flex:1 1 360px}
.rate__q{margin:0;font-size:17px;font-weight:500;color:#fff}
.rate__row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px}
.rate svg{width:30px;height:30px;display:block}
.rate__stars{position:relative;display:inline-block;line-height:0}
.rate__bg,.rate__fg{display:flex;gap:4px}
.rate__bg svg{fill:none;stroke:rgba(255,255,255,.7);stroke-width:1.5;stroke-linejoin:round}
.rate__fg{position:absolute;inset:0 auto 0 0;width:var(--v,0%);overflow:hidden}
.rate__fg svg{flex:none;fill:#fff;stroke:#fff;stroke-width:1.5;stroke-linejoin:round}
.rate__pick{display:inline-flex;gap:2px}
.rate__b{padding:3px;border:0;background:none;cursor:pointer;color:#fff;border-radius:8px;line-height:0}
.rate__b svg{fill:none;stroke:rgba(255,255,255,.7);stroke-width:1.5;stroke-linejoin:round;transition:fill .15s,transform .15s}
.rate__b.on svg{fill:#fff;stroke:#fff}
.rate__b:hover svg{transform:scale(1.12)}
.rate__b:focus-visible{outline:2px solid #fff;outline-offset:1px}
.rate__f{display:flex;gap:8px;align-items:flex-end;width:100%;max-width:480px;margin-top:4px}
.rate__f textarea{flex:1;min-width:0;resize:vertical;font:inherit;font-size:16px;color:#fff;background:var(--plate);border:1.5px solid var(--plate-b);border-radius:16px;padding:10px 14px}
.rate__f textarea::placeholder{color:rgba(255,255,255,.7)}
.rate__send{height:44px;padding:0 18px;border-radius:999px;border:0;background:var(--pill-bg);color:var(--pill-fg);font:inherit;font-size:16px;font-weight:500;cursor:pointer}
.rate__ok{margin:0}
@media (prefers-reduced-motion:reduce){.rate__b svg{transition:none}.rate__b:hover svg{transform:none}}
.share{display:flex;flex-wrap:wrap;gap:8px}
.share__b{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;border:1.5px solid var(--plate-b);background:var(--plate);color:#fff;cursor:pointer;padding:0;transition:background .2s,color .2s}
.share__b svg{width:20px;height:20px;display:block}
.share__b:hover,.share__b:focus-visible{background:var(--pill-bg);color:var(--pill-fg);border-color:var(--pill-bg)}
.share__ok{position:absolute;right:0;top:calc(100% + 8px);color:var(--fg3)}
@media (prefers-reduced-motion:reduce){.mag.pulse .mag__ic{animation:none}}
@media (max-width:760px){
  .social{gap:14px}
  .mag{width:100%;justify-content:center}
  .share{width:100%;flex-wrap:nowrap;justify-content:space-between;gap:6px}
  .share__b{flex:1 1 0;width:auto;height:auto;max-width:46px;aspect-ratio:1/1}
  .share__b svg{width:19px;height:19px}
}
@media (max-width:1100px){.popular__side .pc{flex:none}}

/* story: notes on the left, the post's chats joined into one pinned chat on the right (desktop, blog.js adds .on).
   Phone and no-JS keep the old layout: each chat between its paragraphs. The inline chats stay in the HTML,
   on desktop they collapse to a zero-height marker: the text keeps its normal rhythm, the marker switches the beat. */
.story__side{display:none}
.story.on{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,500px);gap:56px;align-items:start}
.story.on .story__side{display:block;position:sticky;top:96px}
.story.on .story__side .chat{--feed-h:min(calc(100vh - 320px),560px);max-width:none}
.story.on .story__txt .fig--chat{height:0;margin:0;padding:0;border:0;overflow:hidden;visibility:hidden}
/* authors (24.10) */
.byline{display:inline-flex;align-items:center;gap:12px;margin-top:18px;color:inherit;text-decoration:none}
.byline b{display:block;font-weight:600;line-height:1.2}
.byline .meta{display:block;color:var(--fg3)}
.byline:hover b{text-decoration:underline}
.au-ava{display:block;border-radius:50%;object-fit:cover;flex:none;width:44px;height:44px}
.author{display:flex;align-items:center;gap:clamp(18px,3vw,36px);margin:10px 0 40px}
.author .au-ava{width:clamp(88px,10vw,120px);height:clamp(88px,10vw,120px)}
.author .lede{max-width:760px;margin-top:14px}
.author .kicker{margin-bottom:8px}
@media (max-width:600px){.author{flex-direction:column;align-items:flex-start}}

/* gallery card, SEO 24.10: <figure> holds the picture and its caption (kind of picture, prompt, "generated by"),
   the Copy button sits outside the caption. figure/figcaption are display:contents, so the card stays one grid:
   the prompt box spans columns 2–3 and the button lies over its right end exactly where it was (subgrid). */
.gal__it.gx{display:grid;grid-template-columns:22px minmax(0,1fr) auto 22px;align-content:start}
.gx>.gal__fig,.gx>.gal__fig>figcaption{display:contents}
.gx picture{grid-column:1/-1;grid-row:1}
.gal__it.gx .kicker{grid-column:2/4;grid-row:2;margin:18px 0 0}
.gx .prm{grid-column:2/4;grid-row:3;margin-top:10px;display:grid;grid-template-columns:subgrid;column-gap:12px}
.gx .prm__t{grid-column:1}
.gx>.prm__copy{grid-column:3;grid-row:3;align-self:start;margin:24px 16px 0 12px;position:relative;z-index:1}
.gx .gal__by{grid-column:2/4;grid-row:4;margin:10px 0 22px}
/* 28.10 fixed chat window in articles: same --feed-h as the landing; scroll inside once the scene is done */
.fig--chat .chat.scrollable .feed{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}

.rate{display:none}
