/* Blog pages. Same structure as the MoneyOS blog (hero, "In short", sticky contents, question-led
   sections, FAQ, call to action), in Open Agentic Brain and Memory's deep black with the one signal blue. No canvas
   here: posts stay quiet and fast to read. */
:root {
  color-scheme: dark;
  --bg: #000000; --card: #0a0a0c; --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.16);
  --fg: #f5f5f6; --fg-2: #c9cad0; --muted: #8b8e97; --dim: #55585f;
  --signal: #8fd3ff; --signal-soft: rgba(143,211,255,.1); --ok: #4ade80; --warn: #fbbf24; --bad: #f87171;
  --sans: "Geist", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--fg); overflow-x: clip; padding: 0 20px;
  background-image: radial-gradient(900px 500px at 70% -160px, rgba(143,211,255,.08), transparent 70%); background-repeat: no-repeat;
  font: 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--signal); text-underline-offset: 3px; }
::selection { background: var(--signal); color: #000; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 6px; }
svg { width: 1em; height: 1em; flex: none; }
code { font-family: var(--mono); font-size: .84em; background: rgba(255,255,255,.06); padding: .12em .42em; border-radius: 5px; box-shadow: 0 0 0 1px var(--line) inset; color: var(--fg); }
p { margin: 0 0 16px; color: var(--fg-2); }
strong { color: var(--fg); }

/* header (matches the main site) */
header.site { position: sticky; top: 0; z-index: 30; max-width: 1160px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top, 0px)) 0 14px;
  display: flex; align-items: center; gap: 12px; }
header.site::before { content: ""; position: absolute; z-index: -1; inset: 0 -100vmax; background: rgba(0,0,0,.9); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 600; letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
header.site nav { margin-left: auto; display: flex; gap: 22px; font-size: 14px; align-items: center; }
header.site nav a { color: var(--muted); text-decoration: none; } header.site nav a:hover, header.site nav a[aria-current] { color: var(--fg); }
header.site nav a[aria-current] { box-shadow: 0 2px 0 var(--signal); }

main { max-width: 1160px; margin: 0 auto; }
.crumbs { font: 12px var(--mono); color: var(--muted); margin: 0 0 18px; } .crumbs a { color: var(--muted); }
.kicker { font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--signal); margin: 0 0 14px; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 10px; font-weight: 500; text-decoration: none; font-size: 15px; }
.btn.primary { color: #000; background: var(--fg); } .btn.primary:hover { background: #fff; }
.btn.ghost { color: var(--fg); box-shadow: 0 0 0 1px var(--line-2) inset; }
.soon { display: inline-flex; align-items: center; gap: 8px; font: 500 12px var(--mono); color: var(--fg); padding: 7px 12px; border-radius: 99px; box-shadow: 0 0 0 1px var(--line-2) inset; }
.soon i { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 8px var(--warn); }

/* hero */
.post-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; padding: 48px 0 56px; }
.post-hero h1 { font-size: clamp(36px, 5vw, 60px); line-height: 1.03; letter-spacing: -.045em; font-weight: 600; margin: 0 0 20px; text-wrap: balance; }
.post-hero .lede { font-size: 19px; color: var(--muted); margin-bottom: 18px; max-width: 600px; }
.byline { font: 12.5px var(--mono); color: var(--dim); margin: 0 0 28px; } .byline b { color: var(--fg-2); font-weight: 500; }

/* hero visual: three tools, three different answers */
.forget { position: relative; display: grid; gap: 12px; }
.fw { border-radius: 14px; background: var(--card); box-shadow: 0 0 0 1px var(--line-2) inset; overflow: hidden; font-size: 14px; }
.fw:nth-child(2) { margin-left: 28px; } .fw:nth-child(3) { margin-left: 56px; }
.fw-h { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); font: 12px var(--mono); color: var(--muted); }
.fw-h svg { width: 15px; height: 15px; color: var(--brand, var(--fg)); } .fw-h em { margin-left: auto; font-style: normal; color: var(--dim); }
.fw-b { padding: 11px 14px; color: var(--fg-2); }
.fw-b .bad { color: var(--bad); } .fw-b .you { color: var(--fg); }
.forget-tag { justify-self: start; margin-left: 56px; font: 500 12px var(--mono); color: var(--warn); padding: 6px 10px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(251,191,36,.35) inset; }

/* summary */
.tldr { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px 28px; margin-bottom: 64px; }
.tldr h2 { margin: 0 0 16px; font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--signal); }
.tldr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0; }
.tldr-grid dt { font-weight: 600; margin-bottom: 4px; } .tldr-grid dd { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* layout */
.post-layout { display: grid; grid-template-columns: 200px minmax(0, 760px); gap: 64px; justify-content: center; }
.toc { position: sticky; top: 92px; align-self: start; font-size: 14px; }
.toc p { margin: 0 0 10px; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; color: var(--muted); text-decoration: none; margin-left: -1px; border-left: 1px solid transparent; }
.toc a:hover, .toc a.on { color: var(--fg); border-left-color: var(--signal); }
.post h2 { font-size: clamp(25px, 3vw, 32px); line-height: 1.15; letter-spacing: -.03em; font-weight: 600; margin: 72px 0 16px; scroll-margin-top: 90px; text-wrap: balance; }
.post h2:first-child { margin-top: 0; }
.post h3 { font-size: 18px; margin: 28px 0 6px; letter-spacing: -.01em; }
.answer { font-size: 18.5px; color: var(--fg); }
.post ul { padding-left: 20px; } .post li { margin-bottom: 8px; color: var(--fg-2); } .post li::marker { color: var(--signal); }
.post figure { margin: 0; } .post figcaption { font-size: 14px; color: var(--muted); line-height: 1.5; margin-top: 12px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.feature-grid > div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.feature-grid h3 { margin: 0 0 6px; font-size: 16px; }
.feature-grid h3::before { content: ""; display: block; width: 26px; height: 2px; border-radius: 2px; background: var(--signal); margin-bottom: 12px; box-shadow: 0 0 8px var(--signal); }
.feature-grid p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; margin: 24px 0 12px; }
.stats div { background: var(--card); padding: 20px 18px; }
.stats b { display: block; font-size: 34px; font-weight: 600; letter-spacing: -.04em; line-height: 1; color: var(--fg); font-variant-numeric: tabular-nums; }
.stats div:first-child b { color: var(--signal); }
.stats span { display: block; margin-top: 10px; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.fine { font-size: 13px; color: var(--dim); line-height: 1.55; }

.bars { display: grid; gap: 8px; margin: 22px 0 10px; padding: 22px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.bar { display: grid; grid-template-columns: 170px minmax(0, 1fr) 52px; gap: 14px; align-items: center; font-size: 14px; color: var(--fg-2); }
.bar i { height: 14px; border-radius: 0 4px 4px 0; background: #3a3d45; width: calc(var(--v) * 100%); }
.bar b { font: 500 13px var(--mono); text-align: right; color: var(--fg-2); }
.bar.me { color: var(--fg); } .bar.me i { background: var(--signal); box-shadow: 0 0 14px rgba(143,211,255,.35); } .bar.me b { color: var(--fg); }

.timeline { list-style: none; padding: 0 !important; margin: 20px 0 0; counter-reset: t; }
.timeline li { position: relative; padding: 0 0 18px 46px; margin: 0; counter-increment: t; }
.timeline li::before { content: counter(t); position: absolute; left: 0; top: 1px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font: 600 12px var(--mono); color: #000; background: var(--signal); }
.timeline li::after { content: ""; position: absolute; left: 14.5px; top: 36px; bottom: 4px; width: 1px; background: var(--line-2); }
.timeline li:last-child::after { display: none; } .timeline b { color: var(--fg); }

.table-wrap { overflow-x: auto; margin: 20px 0 8px; border: 1px solid var(--line); border-radius: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); }
thead th { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); background: var(--card); }
thead th:last-child { color: var(--signal); }
tbody th { font-weight: 500; color: var(--fg); } tbody tr:last-child > * { border-bottom: 0; }
td { color: var(--muted); } td.yes { color: var(--fg); font-weight: 500; background: var(--signal-soft); }

.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 500; list-style: none; display: flex; gap: 12px; color: var(--fg); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; color: var(--signal); font-size: 22px; line-height: 1.1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 20px 6px; color: var(--muted); }

.cta-box { margin: 96px 0 0; padding: 48px; border-radius: 26px; border: 1px solid var(--line-2); text-align: left;
  background: radial-gradient(600px 300px at 85% 20%, rgba(143,211,255,.12), transparent 70%), var(--card); }
.cta-box h2 { margin: 18px 0 10px !important; font-size: clamp(28px, 3.4vw, 40px) !important; }
.cta-box p { color: var(--muted); max-width: 560px; }
.cta-box .row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* blog index */
.index-head { padding: 56px 0 36px; }
.index-head h1 { font-size: clamp(40px, 6vw, 64px); letter-spacing: -.05em; line-height: 1; margin: 0 0 14px; font-weight: 600; }
.index-head .lede { font-size: 19px; color: var(--muted); max-width: 620px; }
.post-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); text-decoration: none; color: inherit; background: var(--card); align-items: stretch;
  border: 1px solid var(--line); border-radius: 22px; overflow: hidden; transition: border-color .2s, transform .2s; }
.post-card:hover { border-color: rgba(143,211,255,.45); transform: translateY(-2px); }
.post-card .pc-art { padding: 28px; display: grid; align-content: center; background: radial-gradient(400px 260px at 30% 30%, rgba(143,211,255,.1), transparent 70%), #050506; border-right: 1px solid var(--line); }
.post-card .pc-body { padding: 28px; }
.post-card h2 { margin: 0 0 10px; font-size: 24px; line-height: 1.2; letter-spacing: -.025em; font-weight: 600; }
.post-card p { color: var(--muted); } .post-card .more { color: var(--signal); font-weight: 500; }
.post-card + .post-card { margin-top: 20px; }

.blog-foot { max-width: 1160px; margin: 80px auto 0; padding: 24px 0 calc(48px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px; display: flex; gap: 18px; flex-wrap: wrap; }
.blog-foot a { color: var(--muted); text-decoration: none; } .blog-foot > span { margin-left: auto; }

@media (max-width: 980px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); } .toc { display: none; }
  .tldr-grid, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { padding: 0 16px; font-size: 16px; }
  header.site nav { gap: 14px; font-size: 13px; }
  .post-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 24px; }
  .fw:nth-child(2) { margin-left: 14px; } .fw:nth-child(3), .forget-tag { margin-left: 28px; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .bar { grid-template-columns: 112px minmax(0, 1fr) 44px; gap: 8px; font-size: 12.5px; }
  .cta-box { padding: 30px 22px; }
  .post-card { grid-template-columns: minmax(0, 1fr); } .post-card .pc-art { border-right: 0; border-bottom: 1px solid var(--line); }
  table { font-size: 13.5px; } th, td { padding: 10px; }
  .blog-foot > span { margin-left: 0; }
}
@media (max-width: 460px) { .tldr-grid { grid-template-columns: minmax(0, 1fr); } }

/* hero visual: the instruction file each tool reads */
.files { display: grid; gap: 10px; }
.file { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 16px; border-radius: 12px;
  background: var(--card); box-shadow: 0 0 0 1px var(--line-2) inset; }
.file svg { width: 18px; height: 18px; color: var(--brand, var(--fg)); }
.file code { background: none; box-shadow: none; padding: 0; font-size: 13.5px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file em { font-style: normal; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.file.dim { opacity: .6; box-shadow: 0 0 0 1px var(--line) inset; }
.pc-art .files .file { padding: 9px 12px; } .pc-art .files code { font-size: 12px; }
@media (max-width: 760px) { .file { grid-template-columns: 20px minmax(0, 1fr); } .file em { grid-column: 2; } }
/* hero visual: the memory loop */
.flow .file { grid-template-columns: 26px minmax(0, 1fr) auto; }
.flow .file b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 11px var(--mono); color: var(--muted); box-shadow: 0 0 0 1px var(--line-2) inset; }
.flow .file code { font-family: var(--sans); font-size: 15px; font-weight: 500; }
.flow .file.hot { box-shadow: 0 0 0 1px rgba(143,211,255,.5) inset, 0 0 30px -10px rgba(143,211,255,.5); }
.flow .file.hot b { color: #000; background: var(--signal); box-shadow: none; }
/* hero visual: a context window budget */
.ctx { margin: 0; padding: 24px; border-radius: 16px; background: var(--card); box-shadow: 0 0 0 1px var(--line-2) inset; }
.ctx figcaption { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 500; color: var(--fg); margin-bottom: 16px; }
.ctx figcaption em { font: 400 11.5px var(--mono); font-style: normal; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.ctx-bar { display: flex; gap: 2px; height: 44px; border-radius: 10px; overflow: hidden; }
.ctx-bar i { width: var(--w); background: var(--c); transform-origin: left; animation: ctx-in .9s cubic-bezier(.2,.7,.2,1) both; }
.ctx-bar i:nth-child(2) { animation-delay: .08s; } .ctx-bar i:nth-child(3) { animation-delay: .16s; } .ctx-bar i:nth-child(4) { animation-delay: .24s; }
.ctx-bar i:nth-child(5) { animation-delay: .32s; } .ctx-bar i:nth-child(6) { animation-delay: .4s; }
@keyframes ctx-in { from { transform: scaleX(0); opacity: 0; } }
.ctx-key { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 16px; font-size: 13px; color: var(--muted); }
.ctx-key li { display: flex; align-items: center; gap: 9px; margin: 0; }
.ctx-key li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--c); box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset; }
.ctx-note { margin: 18px 0 0; font-size: 13px; color: var(--muted); line-height: 1.55; }
.pc-art .ctx { padding: 0; background: none; box-shadow: none; } .pc-art .ctx-bar { height: 34px; }
@media (prefers-reduced-motion: reduce) { .ctx-bar i { animation: none; } }
@media (max-width: 460px) { .ctx-key { grid-template-columns: minmax(0, 1fr); } }
/* bars inside a hero/card figure: no second card */
.ctx .bars { margin: 0; padding: 0; background: none; border: 0; }
.ctx .bar { grid-template-columns: 112px minmax(0, 1fr) 48px; gap: 10px; font-size: 13px; }

/* launch: install command + GitHub links */
.soon.live i { background: var(--signal); box-shadow: 0 0 8px var(--signal); }
.btn svg { width: 17px; height: 17px; }
.cta-box .cmd { display: flex; align-items: center; max-width: 720px; margin-top: 22px; border-radius: 14px; background: rgba(0,0,0,.55); box-shadow: 0 0 0 1px var(--line-2) inset; }
.cta-box .cmd code { flex: 1; min-width: 0; padding: 14px 0 14px 18px; font: 13px/1.7 var(--mono); color: var(--fg); background: none; box-shadow: none; border-radius: 0;
  white-space: pre-wrap; overflow-wrap: anywhere; }
.cta-box .cmd code::before { content: "$ "; color: var(--signal); }
.cta-box .copy { flex: none; align-self: flex-start; margin: 9px; padding: 8px 14px; border: 0; border-radius: 9px; font: 500 12px var(--mono); color: var(--fg);
  background: rgba(255,255,255,.06); box-shadow: 0 0 0 1px var(--line-2) inset; cursor: pointer; }
.cta-box .copy:hover { background: rgba(255,255,255,.12); } .cta-box .copy.ok { color: var(--signal); }
header.site nav a.gh, .blog-foot a.gh { display: inline-flex; align-items: center; gap: 7px; }
header.site nav a.gh svg, .blog-foot a.gh svg { width: 16px; height: 16px; }
@media (max-width: 760px) {
  header.site nav a.gh span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cta-box .cmd code { font-size: 12px; padding-left: 14px; }
}

/* long product name: let the nav brand label wrap and shrink on phones */
.brand { min-width: 0; }
@media (max-width: 760px) {
  header.site .brand { font-size: 12px; line-height: 1.15; gap: 8px; max-width: 150px; }
  header.site nav { flex: none; }
}
@media (max-width: 760px) {
  header.site .brand { flex: 0 1 auto; }
  header.site nav a[href^="mailto:"] { display: none; }
  header.site { gap: 10px; }
}
