/* Page CSS for premdev: only what the tasteskill references allow as page CSS
   (inside visuals, --p-h, the skip link, the hero frame's lit ground). */

html { scroll-padding-top: 0; scroll-behavior: auto; }

.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 12px; left: 12px; width: auto; height: auto; clip-path: none; padding: 8px 12px; background: var(--action); color: var(--action-ink, #0f0f0f); z-index: 20; }

.mark--initial { background: var(--accent); color: var(--accent-ink, #0f0f0f); font: 600 13px/1 var(--font-display); }

/* the hero frame: a lit sage-and-lime field so the dark console never sits on a dark ground */
.hero__window {
  background:
    radial-gradient(120% 64% at 72% 118%, #48612f 0 40%, transparent 41%),
    radial-gradient(90% 52% at 12% 110%, #5f7a3c 0 42%, transparent 43%),
    radial-gradient(80% 42% at 58% 96%, #b8cf87 0 40%, transparent 41%),
    linear-gradient(#cfe5a3, #e6f2c9 68%, #eef5dc);
}
.d-win--dark .d-win__body { grid-template-columns: 260px 1fr; min-height: 420px; }
.d-win--dark .d-win__bar b { color: #eceef0; font-weight: 500; }
.d-win--dark .d-win__bar .sp { flex: 1; }
.hero__window .d-chat { padding: 14px 18px; gap: 8px; }
.hero__window .d-msg--bot { max-width: 86%; background: #22262b; color: #e9ecee; }
.hero__window .d-msg--bot small { display: inline; margin: 0 0 0 8px; white-space: nowrap; }
.agents { border-right: 1px solid rgb(255 255 255 / .07); padding: 10px; display: grid; align-content: start; gap: 2px; }
.agents .q { height: 30px; margin-bottom: 6px; display: flex; align-items: center; padding: 0 8px; color: #8d9399; font-size: 13px; font-weight: 500; }
.agents .t { display: grid; grid-template-columns: 14px 1fr auto; gap: 1px 10px; padding: 9px 8px; border-radius: 6px; font-size: 13px; align-items: center; }
.agents .t.is-on { background: rgb(255 255 255 / .07); }
.agents .t i { grid-row: 1 / span 2; width: 8px; height: 8px; border-radius: 50%; background: #4a4f56; justify-self: center; align-self: start; margin-top: 5px; }
.agents .t i.ok { background: #dafa9c; }
.agents .t b { font-weight: 500; color: #eceef0; }
.agents .t time { color: #8d9399; font-size: 12px; font-variant-numeric: tabular-nums; }
.agents .t span { grid-column: 2 / -1; color: #8d9399; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo { display: grid; min-width: 0; align-content: start; }
.acts { display: flex; gap: 8px; }
.acts span { height: 30px; padding: 0 12px; border-radius: 6px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 500; background: #dafa9c; color: #0f0f0f; }
.acts span + span { background: rgb(255 255 255 / .08); color: #e9ecee; }
@media (max-width: 639px) {
  .d-win--dark .d-win__body { grid-template-columns: 1fr; }
  .agents { display: none; }
  .hero__window .d-chat { font-size: 13px; padding: 12px 14px; }
  .d-win__bar .sp ~ span { display: none; }
}

/* agents section: diagram card beside the points */
.agents-grid { align-items: start; }
.agents-grid .panel { --p-h: 340px; height: var(--p-h); }
.agent-points .card__points { margin-top: 0; }
.agent-points .card__points li:first-child { border-top: 0; padding-top: 0; }
.agent-points .card__points li span { max-width: 44ch; }

/* Rovelle: the product board, then the pipeline card */
.rovelle-shot { display: block; position: relative; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); height: min(520px, 100%); }
.rovelle-shot img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
#rovelle .group:first-child { display: flex; flex-direction: column; }
#rovelle .group:first-child .rovelle-shot { flex: 1 1 auto; min-height: 280px; }
#rovelle .card--split > .panel { min-height: 460px; }
#rovelle .card__points li { padding: 10px 0; }

/* stat cards: the figure, the title, one line */
.stat-cards .card > strong { display: block; margin-bottom: var(--s-6); font: var(--display-weight) var(--t-stat)/1 var(--font-display); letter-spacing: var(--display-tracking); color: var(--accent); font-variant-numeric: tabular-nums; }
.stat-cards .card { justify-content: flex-start; }

/* fit cards: a row of real tool marks over the title */
.ic-row { display: flex; gap: 10px; margin-bottom: var(--s-6); }
.ic-row .ic { box-sizing: content-box; padding: 8px; background: #fff; border-radius: var(--r-sm); }

/* experience rows */
.exp-rows > li > div { grid-column: 1; }
.exp-rows > li > span.muted { grid-column: 2; grid-row: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.exp-rows > li > div .muted { display: block; margin-top: 2px; }
.exp-rows .rows__name { font-weight: 500; font-size: var(--t-card); }

@media (max-width: 1023px) {
  .agents-grid > .span-7, .agents-grid > .span-5 { grid-column: 1 / -1; }
}
@media (max-width: 639px) {
  .agents-grid .panel { --p-h: 240px; }
  .exp-rows > li { grid-template-columns: 1fr; }
  .exp-rows > li > span.muted { grid-column: 1; grid-row: auto; }
  #rovelle .card--split > .panel { min-height: 300px; }
}

/* Quince: six compact stat cards on one screen */
#quince .stat-cards { align-content: start; grid-auto-rows: auto; }
#quince .stat-cards .card { height: auto; }
#quince .stat-cards .card > strong { margin-bottom: var(--s-5); }

/* the toolbox under the fit cards */
.toolbox { margin-top: var(--s-8); }
.toolbox h3 { margin: 0 0 var(--s-5); font-weight: 500; }
.tool-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.tool-grid li { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-md); font-size: 15px; white-space: nowrap; }
.tool-grid li .ic { box-sizing: content-box; padding: 4px; background: #fff; border-radius: 4px; --ic-s: 18px; }
@media (max-width: 1279px) { .tool-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 639px) { .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .tool-grid li { height: 44px; } .toolbox { margin-top: var(--s-7); } }
#rovelle .card--split > .panel { min-height: 540px; }

/* Below 1024 the stacked content outgrows one or two screens; let sections take their content
   height (padding unchanged) instead of overlapping the next one. */
@media (max-width: 1023px) {
  main > section:not(.hero), footer.closing { height: auto !important; min-height: 100lvh; }
  main > section.g2 > .wrap { display: flex !important; flex-direction: column; row-gap: var(--s-8) !important; }
  #rovelle .group:first-child .rovelle-shot { height: auto; flex: none; aspect-ratio: 1600 / 1066; min-height: 0; }
  #rovelle .card--split { grid-template-columns: 1fr; }
  #rovelle .card--split > .panel { margin: 0 calc(-1 * var(--c-pad)) calc(-1 * var(--c-pad)); border-radius: 0 0 var(--c-r) var(--c-r); min-height: 340px; }
}
@media (max-width: 639px) {
  #rovelle .section-head--row .btn { width: 100%; }
}

/* checker fixes */
.hero__lead { color: #d6d6d6; }
#rovelle .card--split > .card__body { justify-content: flex-start; padding-top: 0; }
#rovelle .card--split > .card__body > h3 { font-size: var(--t-card); }
@media (min-width: 1024px) {
  #rovelle .group:last-child > .card--split { height: 100%; }
  #rovelle .card--split > .panel { min-height: 0; }
  #fde .ic-row { margin-bottom: var(--s-5); }
  #fde .toolbox { margin-top: var(--s-7); }
  .exp-rows > li { padding-block: 14px; }
}
.toolbox__label { margin: 0 0 var(--s-5); color: var(--muted); }
.exp-rows > li > div .muted, .exp-rows > li > span.muted { color: #b8b8b8; }
@media (min-width: 1024px) { #fde .toolbox { margin-top: var(--s-6); } #fde .card { padding-bottom: 28px; } }

/* Never let content spill into the next section: on short windows (or anywhere content is taller
   than its screens) the section grows instead of overlapping. Full-height windows look unchanged. */
main > section:not(.hero), footer.closing { height: auto !important; min-height: calc(var(--h, 1) * 100svh); }
@media (min-width: 1024px) {
  main > section.g2 > .wrap { min-height: calc(200svh - var(--padt) - var(--padb)); }
}

/* the logo mark (public/logo.svg) in place of the name */
.nav__logo svg.logo { height: 32px; width: 32px; display: block; }
.footer .nav__logo svg.logo { height: 40px; width: 40px; }

/* products and open source */
.product-cards { align-content: start; }
.product-cards .card { display: flex; flex-direction: column; }
.product-cards .status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 var(--s-4); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #6b6b6b; display: inline-block; }
.dot--live { background: var(--accent); }
.product-cards .card__link { margin-top: var(--s-4); }
.product-cards .shot { --p-h: 300px; height: var(--p-h); margin-top: var(--s-6); overflow: hidden; background: #1f1f1f; }
.product-cards .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform 600ms var(--m-ease, ease); }
.product-cards .card:hover .shot img { transform: scale(1.025); }
.pkg-rows { margin: var(--s-5) 0 0; padding: 0; list-style: none; }
.pkg-rows > li { padding-block: 14px; }
.pkg-rows > li > div { display: grid; gap: 2px; }
.pkg-rows .rows__name { font: 500 16px/1.4 var(--font-mono); }
.pkg-card .card__link { margin-top: auto; padding-top: var(--s-5); }
@media (max-width: 1023px) { .product-cards > .span-6 { grid-column: 1 / -1; } .product-cards .shot { --p-h: 260px; } }
@media (max-width: 639px) { .product-cards .shot { --p-h: 200px; } }
.product-cards .shot::before { display: none; }
.product-cards .shot img { position: relative; z-index: 1; }
@media (min-width: 1024px) { .product-cards .shot { --p-h: 250px; } #products .section-head { margin-bottom: var(--s-7); } }

/* Quince storefront frame */
.store-shot { display: block; position: relative; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); height: min(520px, 100%); }
.store-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
#quince .group:first-child { display: flex; flex-direction: column; }
#quince .group:first-child .store-shot { flex: 1 1 auto; min-height: 280px; }
@media (max-width: 1023px) { #quince .group:first-child .store-shot { flex: none; height: auto; aspect-ratio: 1280 / 800; min-height: 0; } }
@media (max-width: 639px) { #quince .section-head--row .btn { width: 100%; } }

/* more builds: screenshot first, then the lines */
.build-cards .shot { margin-top: 0; margin-bottom: var(--s-5); }
@media (min-width: 1024px) { .build-cards .shot { --p-h: 220px; } }

/* fixes: skip link hidden until keyboard focus; screenshots fill their panel; storefront frame height */
.nav .skip:not(:focus-visible) { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap; }
.product-cards .shot { position: relative; }
.product-cards .shot img { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (min-width: 1024px) { #quince .group:first-child .store-shot { flex: none; height: 500px; } }

/* ---------------- Quince: BFCM dashboard */
.quince-grid { align-items: stretch; }
.quince-grid .store-shot { height: 480px; flex: none; }
.bfcm { position: relative; height: 480px; display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; background: #151515; border: 1px solid var(--line); border-radius: var(--r-lg); font-family: var(--font-mono); color: #e9ecee; overflow: hidden; }
.bfcm__bar { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.bfcm__title { color: #9aa0a6; }
.bfcm__phase { margin-left: auto; padding: 4px 10px; border-radius: 99px; background: rgb(218 250 156 / .12); color: #dafa9c; white-space: nowrap; }
.bfcm__metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bfcm__metrics > div { padding: 10px 12px; border: 1px solid rgb(255 255 255 / .08); border-radius: 6px; display: grid; gap: 4px; }
.bfcm__metrics span { font-size: 12px; color: #9aa0a6; }
.bfcm__metrics b { font: 500 20px/1.1 var(--font-display); color: #fff; font-variant-numeric: tabular-nums; }
.bfcm__metrics b.ok { color: #dafa9c; }
.bfcm__chart { width: 100%; height: 150px; flex: none; overflow: visible; }
.bfcm__grid path { stroke: rgb(255 255 255 / .07); stroke-width: 1; fill: none; }
.bfcm__traffic { fill: none; stroke: #dafa9c; stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.bfcm__area { fill: url(#bfcm-fill); }
.bfcm__cap { fill: none; stroke: #ffffff; stroke-opacity: .55; stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.bfcm__head { stroke: rgb(255 255 255 / .35); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bfcm.is-still .bfcm__head { display: none; }
.bfcm__axis { display: flex; justify-content: space-between; font-size: 12px; color: #8d9399; margin-top: -6px; }
.bfcm__legend { display: flex; gap: 18px; font-size: 12px; color: #9aa0a6; }
.bfcm__legend span::before { content: ""; display: inline-block; width: 14px; height: 2px; margin-right: 6px; vertical-align: middle; background: #dafa9c; }
.bfcm__legend .l-cap::before { background: none; border-top: 2px dashed rgb(255 255 255 / .55); }
.bfcm__pods { display: grid; grid-template-columns: repeat(40, 1fr); gap: 3px; margin-top: auto; }
.bfcm__pods i { aspect-ratio: 1; border-radius: 1.5px; background: rgb(255 255 255 / .07); transition: background-color 180ms linear; }
.bfcm__pods i.on { background: rgb(218 250 156 / .75); }

/* pause control shared by both animations */
.anim-pause { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgb(255 255 255 / .16); background: rgb(255 255 255 / .04); color: #e9ecee; cursor: pointer; }
.anim-pause:hover { background: rgb(255 255 255 / .1); }
.anim-pause svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.anim-pause .i-play { display: none; fill: currentColor; stroke: none; }
.anim-pause[aria-pressed="true"] .i-pause { display: none; }
.anim-pause[aria-pressed="true"] .i-play { display: block; }
.is-still .anim-pause { display: none; }

/* ---------------- Quince: request flow */
.flow { position: relative; padding: 24px; background: #151515; border: 1px solid var(--line); border-radius: var(--r-lg); }
.flow > .anim-pause { position: absolute; top: 16px; right: 16px; z-index: 1; }
.flow svg { display: block; width: 100%; height: auto; }
.flow__edges use { fill: none; stroke: rgb(255 255 255 / .18); stroke-width: 1.5; }
.flow__dots circle { fill: #dafa9c; filter: drop-shadow(0 0 6px rgb(218 250 156 / .8)); }
.flow__dots circle.alt { fill: #8fc7ff; filter: drop-shadow(0 0 6px rgb(143 199 255 / .8)); }
.flow__nodes rect { fill: #1d1f22; stroke: rgb(255 255 255 / .12); rx: 8; }
.flow__nodes .hot rect { stroke: rgb(218 250 156 / .7); fill: rgb(218 250 156 / .06); }
.flow__nodes text { font-family: var(--font-mono); fill: #9aa0a6; font-size: 14px; }
.flow__nodes text.n { font-family: var(--font-display); fill: #fff; font-size: 17px; font-weight: 500; }
.flow__nodes text.tag { fill: #dafa9c; font-size: 14px; }
.flow__nodes .tagline { stroke: rgb(218 250 156 / .5); stroke-dasharray: 3 3; fill: none; }
.flow__key { display: flex; gap: 22px; margin-top: 12px; font: 13px var(--font-mono); color: #9aa0a6; flex-wrap: wrap; }
.flow__key span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: -1px; border-radius: 50%; }
.flow__key .k-hot::before { border-radius: 3px; border: 1px solid #dafa9c; background: rgb(218 250 156 / .1); }
.flow__key .k-req::before { background: #dafa9c; }
.flow__key .k-alt::before { background: #8fc7ff; }

@media (max-width: 1023px) {
  .quince-grid > .span-5, .quince-grid > .span-7 { grid-column: 1 / -1; }
  .quince-grid .store-shot { height: auto; aspect-ratio: 1280 / 800; }
  .bfcm { height: auto; }
  .flow { overflow-x: auto; }
  .flow svg { min-width: 760px; }
}
@media (max-width: 639px) {
  .bfcm { padding: 16px; }
  .bfcm__metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bfcm__title { display: none; }
  .bfcm__pods { grid-template-columns: repeat(24, 1fr); }
  .bfcm__axis span:nth-child(2n) { visibility: hidden; }
  #quince .section-head--row .btn { width: 100%; }
}

/* ---------------- Quince: network interceptor */
.icpt-grid { align-items: start; }
.icpt-points .card__points { margin-top: 0; }
.icpt-points .card__points li:first-child { border-top: 0; padding-top: 0; }
.icpt { position: relative; height: 460px; display: flex; flex-direction: column; padding: 20px 22px; background: #151515; border: 1px solid var(--line); border-radius: var(--r-lg); font-family: var(--font-mono); color: #e9ecee; overflow: hidden; }
.icpt__bar { display: flex; align-items: center; gap: 12px; font-size: 13px; margin-bottom: 16px; }
.icpt__title { color: #9aa0a6; }
.icpt__layers { margin-left: auto; display: flex; gap: 6px; }
.icpt__layers i { font-style: normal; font-size: 12px; padding: 3px 8px; border-radius: 99px; border: 1px solid rgb(218 250 156 / .35); color: #dafa9c; }
.icpt__head, .icpt__log li { display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px 72px; gap: 12px; align-items: center; }
.icpt__head { font-size: 12px; color: #8d9399; padding: 0 12px 8px; border-bottom: 1px solid rgb(255 255 255 / .08); }
.icpt__log { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; padding-top: 8px; }
.icpt__log li { height: 36px; padding: 0 12px; border-radius: 6px; font-size: 13px; background: rgb(255 255 255 / .03); }
.icpt__log li.in { animation: icpt-in 320ms cubic-bezier(.2,.8,.2,1); }
@keyframes icpt-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.icpt__log .l { color: #9aa0a6; }
.icpt__log .c { color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icpt__log .k { color: #9aa0a6; }
.icpt__log .s { color: #dafa9c; text-align: right; font-variant-numeric: tabular-nums; }
.icpt__log li.bad { background: rgb(255 107 94 / .1); }
.icpt__log li.bad .s { color: #ff8a7a; }
.icpt__alert { position: absolute; left: 22px; right: 22px; bottom: 18px; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 8px; font-size: 13px; background: #2a1715; border: 1px solid rgb(255 107 94 / .55); color: #ffd6cf; opacity: 0; transform: translateY(8px); transition: opacity 220ms ease, transform 220ms ease; }
.icpt__alert b { color: #ff8a7a; font-weight: 500; }
.icpt__alert.is-on { opacity: 1; transform: none; }
.icpt__alert.is-ok { background: #18210f; border-color: rgb(218 250 156 / .5); color: #e6f5c8; }
.icpt__alert.is-ok b { color: #dafa9c; }
.icpt.is-still .icpt__alert { opacity: 1; transform: none; }
@media (max-width: 1023px) { .icpt-grid > .span-5, .icpt-grid > .span-7 { grid-column: 1 / -1; } .icpt { height: 440px; } }
@media (max-width: 639px) {
  .icpt { padding: 16px; }
  .icpt__title { display: none; }
  .icpt__layers { margin-left: 0; }
  .icpt__head, .icpt__log li { grid-template-columns: 52px minmax(0, 1fr) 64px; }
  .icpt__head span:nth-child(3), .icpt__log .k { display: none; }
}
@media (min-width: 1024px) { .icpt { height: 440px; } }

/* ---------------- Hero: Morning brief agent at 9 AM */
.hero__window { position: relative; }
.brief-pause { position: absolute; top: 14px; right: 14px; z-index: 3; background: rgb(15 15 15 / .55); }
.brief { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; font-size: 13px; }
.brief__head { display: flex; align-items: center; gap: 10px; }
.brief__clock { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 6px; background: rgb(255 255 255 / .06); font: 500 15px/1 var(--font-mono); color: #fff; font-variant-numeric: tabular-nums; overflow: hidden; }
.brief__clock .d { display: inline-block; }
.brief__clock .d.roll { animation: brief-roll 380ms cubic-bezier(.22,1,.36,1); }
@keyframes brief-roll { from { transform: translateY(70%); opacity: 0; } to { transform: none; opacity: 1; } }
.brief.is-run .brief__clock { background: rgb(218 250 156 / .14); color: #dafa9c; }
.brief__name { font-weight: 500; color: #eceef0; font-size: 14px; }
.brief__status { margin-left: auto; color: #8d9399; font-size: 12px; font-family: var(--font-mono); white-space: nowrap; }
.brief.is-run .brief__status { color: #dafa9c; }

.brief__fetch, .brief__cards { transition: opacity 320ms ease, transform 420ms cubic-bezier(.2,.8,.2,1); }
.brief__fetch { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.brief__fetch li { display: grid; grid-template-columns: 170px 1fr 14px; align-items: center; gap: 10px; height: 26px; color: #8d9399; opacity: .35; transition: opacity 200ms ease, color 200ms ease; }
.brief__fetch .bar { height: 4px; border-radius: 99px; background: rgb(255 255 255 / .08); overflow: hidden; }
.brief__fetch .bar i { display: block; height: 100%; width: 100%; background: #dafa9c; transform: scaleX(0); transform-origin: left; transition: transform 1100ms cubic-bezier(.45,0,.2,1); }
.brief__fetch .ok { color: #dafa9c; opacity: 0; transition: opacity 160ms ease 1050ms; }
.brief.is-f1 .brief__fetch li:nth-child(1), .brief.is-f2 .brief__fetch li:nth-child(2), .brief.is-f3 .brief__fetch li:nth-child(3) { opacity: 1; color: #e9ecee; }
.brief.is-f1 .brief__fetch li:nth-child(1) .bar i, .brief.is-f2 .brief__fetch li:nth-child(2) .bar i, .brief.is-f3 .brief__fetch li:nth-child(3) .bar i { transform: scaleX(1); }
.brief.is-f1 .brief__fetch li:nth-child(1) .ok, .brief.is-f2 .brief__fetch li:nth-child(2) .ok, .brief.is-f3 .brief__fetch li:nth-child(3) .ok { opacity: 1; }
.brief.is-cards .brief__fetch { opacity: 0; transform: translateY(-10px); height: 0; margin-bottom: -12px; overflow: hidden; transition: opacity 260ms ease, transform 300ms ease, height 0s linear 300ms, margin 0s linear 300ms; }

.brief__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.bc { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 10px; background: #22262b; border: 1px solid rgb(255 255 255 / .06); opacity: 0; transform: translateY(14px) scale(.98); transition: opacity 360ms ease, transform 520ms cubic-bezier(.2,.8,.2,1); }
.brief.is-cards .bc { opacity: 1; transform: none; }
.brief.is-cards .bc:nth-child(2) { transition-delay: 140ms; }
.brief.is-cards .bc:nth-child(3) { transition-delay: 280ms; }
.bc__chip { align-self: flex-start; font: 500 11.5px/1 var(--font-mono); padding: 5px 7px; border-radius: 4px; letter-spacing: .02em; }
.bc--mkt .bc__chip { background: rgb(218 250 156 / .14); color: #dafa9c; }
.bc--geo .bc__chip { background: rgb(143 199 255 / .14); color: #8fc7ff; }
.bc--tech .bc__chip { background: rgb(255 255 255 / .1); color: #f2f2f0; }
.bc__h { margin: 0; color: #f2f2f0; font-size: 13px; line-height: 1.35; font-weight: 500; min-height: 3.6em; }
.bc__viz { width: 100%; height: 40px; display: block; overflow: visible; }
/* markets: the line draws, the area fills */
.bc__spark .line { fill: none; stroke: #dafa9c; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 220; stroke-dashoffset: 220; }
.bc__spark .area { fill: rgb(218 250 156 / .14); opacity: 0; }
.brief.is-cards .bc__spark .line { transition: stroke-dashoffset 1300ms cubic-bezier(.45,0,.2,1) 300ms; stroke-dashoffset: 0; }
.brief.is-cards .bc__spark .area { transition: opacity 500ms ease 1100ms; opacity: 1; }
/* geopolitics: dot map, an arc between two pins, a ring pulse */
.bc__map .dots circle { fill: rgb(143 199 255 / .35); }
.bc__map .arc { fill: none; stroke: #8fc7ff; stroke-width: 1.5; stroke-dasharray: 110; stroke-dashoffset: 110; }
.bc__map .pin { fill: #8fc7ff; }
.bc__map .ring { fill: none; stroke: #8fc7ff; stroke-width: 1.2; transform-box: fill-box; transform-origin: center; opacity: 0; }
.brief.is-cards .bc__map .arc { transition: stroke-dashoffset 1100ms cubic-bezier(.45,0,.2,1) 450ms; stroke-dashoffset: 0; }
.brief.is-cards .bc__map .ring { animation: brief-ring 1.6s ease-out 1.5s 2; }
@keyframes brief-ring { from { transform: scale(1); opacity: .9; } to { transform: scale(5); opacity: 0; } }
/* tech: bars grow, the last one in white */
.bc__bars rect { fill: rgb(255 255 255 / .18); transform-box: fill-box; transform-origin: bottom; transform: scaleY(.05); }
.bc__bars rect.top { fill: #f2f2f0; }
.brief.is-cards .bc__bars rect { transform: scaleY(var(--h)); transition: transform 700ms cubic-bezier(.2,.8,.2,1); }
.brief.is-cards .bc__bars rect:nth-child(2) { transition-delay: 80ms; } .brief.is-cards .bc__bars rect:nth-child(3) { transition-delay: 160ms; }
.brief.is-cards .bc__bars rect:nth-child(4) { transition-delay: 240ms; } .brief.is-cards .bc__bars rect:nth-child(5) { transition-delay: 360ms; }

.brief__sent { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 8px; background: rgb(218 250 156 / .12); border: 1px solid rgb(218 250 156 / .35); color: #e6f5c8; opacity: 0; transform: translateY(8px); transition: opacity 260ms ease, transform 360ms cubic-bezier(.2,.8,.2,1); }
.brief__sent .tick { color: #dafa9c; font-weight: 600; }
.brief__sent .muted { color: #9aa0a6; }
.brief.is-sent .brief__sent { opacity: 1; transform: none; }
.brief.is-out .brief__cards, .brief.is-out .brief__sent { opacity: 0; transition: opacity 400ms ease; }
.brief.is-paused *, .brief.is-paused { animation-play-state: paused !important; }
.hero__window.is-still .brief-pause { display: none; }
/* the running agent row pulses its dot */
.agents .t.is-running i.ok { animation: brief-dot 1s ease-in-out infinite; }
@keyframes brief-dot { 50% { box-shadow: 0 0 0 5px rgb(218 250 156 / .18); } }

@media (max-width: 639px) {
  .brief { padding: 12px 14px; gap: 10px; }
  .brief__fetch li { grid-template-columns: 1fr 70px 14px; }
  .brief__cards { grid-template-columns: 1fr; gap: 8px; }
  .bc { flex-direction: row; align-items: center; gap: 10px; padding: 10px; }
  .bc__h { min-height: 0; flex: 1; font-size: 12.5px; }
  .bc__viz { width: 64px; height: 30px; flex: none; }
  .bc__chip { display: none; }
  .brief-pause { top: 10px; right: 10px; }
}
/* compact pass: everything above the frame's fade */
.brief { gap: 10px; padding: 14px 16px; }
.brief__fetch { gap: 4px; }
.brief__fetch li { height: 22px; }
.bc { padding: 10px 11px; gap: 6px; }
.bc__h { min-height: 2.7em; font-size: 12.5px; }
.bc__viz { height: 30px; }
.brief.is-sent .brief__status { padding: 4px 9px; border-radius: 99px; background: rgb(218 250 156 / .14); color: #dafa9c; animation: brief-roll 380ms cubic-bezier(.22,1,.36,1); }
.bc__map .dots circle { fill: rgb(143 199 255 / .55); }
.brief__name { white-space: nowrap; }
@media (max-width: 639px) { .brief__name { font-size: 13px; } .brief__clock { font-size: 13px; padding: 0 8px; } }
