/* TradeCRM blog — tokens copied from the app's globals.css so the two match. */
:root {
  --background: oklch(1 0 0);
  --foreground: oklch(0.205 0.02 50);
  --primary: oklch(0.646 0.196 41);
  --primary-foreground: oklch(0.99 0.01 70);
  --secondary: oklch(0.97 0.025 60);
  --muted: oklch(0.97 0.015 55);
  --muted-foreground: oklch(0.5 0.02 50);
  --accent: oklch(0.93 0.05 55);
  --accent-foreground: oklch(0.35 0.09 40);
  --border: oklch(0.92 0.02 55);
  --radius: 0.85rem;
  --trade-orange: #f4510b;
  --trade-dark: #21170f;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--background); color: var(--foreground);
  font-family: var(--font-sans); line-height: 1.5; -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100dvh;
}
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: 44rem; }
.icon { width: 1em; height: 1em; flex-shrink: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

/* Header / footer */
.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--border); background: color-mix(in oklch, var(--background) 85%, transparent); backdrop-filter: blur(10px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .75rem; padding-bottom: .75rem; }
.logo { height: 2.5rem; width: auto; }
.nav { display: none; gap: 2rem; font-size: .875rem; font-weight: 500; color: var(--muted-foreground); }
.nav a:hover, .nav a[aria-current] { color: var(--foreground); }
.nav-mobile { display: flex; justify-content: center; gap: 1.75rem; border-top: 1px solid var(--border); padding: .5rem 0; font-size: .875rem; font-weight: 500; color: var(--muted-foreground); }
@media (min-width: 40rem) { .nav { display: flex; } .nav-mobile { display: none; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: 999px; border: 1px solid transparent; background: var(--primary); color: var(--primary-foreground); font: inherit; font-weight: 600; font-size: .875rem; padding: .55rem 1.1rem; cursor: pointer; transition: background .15s, transform .15s; }
.btn:hover { background: color-mix(in oklch, var(--primary) 85%, black); }
.btn-lg { height: 2.75rem; padding: 0 1.75rem; font-size: 1rem; box-shadow: 0 6px 16px -4px color-mix(in oklch, var(--primary) 45%, transparent); }
.btn-outline { background: #fff; color: var(--foreground); border-color: var(--border); box-shadow: none; }
.btn-outline:hover { background: var(--muted); }
.btn-white { background: #fff; color: var(--primary); box-shadow: 0 10px 24px -8px rgb(0 0 0 / .3); }
.btn-white:hover { background: rgb(255 255 255 / .9); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.site-footer { border-top: 1px solid var(--border); background: var(--muted); margin-top: 0; }
.site-footer .wrap { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 2.5rem; padding-bottom: 2.5rem; font-size: .875rem; color: var(--muted-foreground); }
.foot-brand { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .75rem; }
.foot-brand .logo { height: 2rem; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; }
.foot-links a:hover { color: var(--foreground); }
@media (min-width: 40rem) { .site-footer .wrap { flex-direction: row; } }

/* Hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(to bottom, color-mix(in oklch, var(--accent) 50%, transparent), var(--background) 60%); }
.orb { position: absolute; border-radius: 999px; filter: blur(64px); pointer-events: none; }
.orb-1 { top: -6rem; right: -6rem; width: 24rem; height: 24rem; background: color-mix(in oklch, var(--primary) 15%, transparent); }
.orb-2 { top: 50%; left: -8rem; width: 20rem; height: 20rem; background: var(--accent); }
.hero .wrap { position: relative; text-align: center; padding-top: 4rem; padding-bottom: 3.5rem; }
.badge { display: inline-flex; align-items: center; gap: .375rem; border: 1px solid color-mix(in oklch, var(--primary) 20%, transparent); background: #fff; color: var(--primary); border-radius: 999px; padding: .375rem .875rem; font-size: .75rem; font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / .06); }
.hero h1 { margin-top: 1.25rem; font-size: clamp(2.25rem, 6vw, 3.75rem); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p.lead { margin: 1.25rem auto 0; max-width: 40rem; font-size: 1.15rem; color: var(--muted-foreground); text-wrap: pretty; }
.hero .btn-row { justify-content: center; margin-top: 1.75rem; }
.ticks { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; font-size: .875rem; color: var(--muted-foreground); }
.ticks li { display: flex; align-items: center; gap: .375rem; }
.ticks .icon { color: var(--primary); stroke-width: 3; }
@media (min-width: 40rem) { .hero .wrap { padding-top: 5.5rem; padding-bottom: 5rem; } }

/* Filters */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 3rem 0 1.5rem; }
.chip-btn { font: inherit; font-size: .85rem; font-weight: 600; border: 1px solid var(--border); background: #fff; color: var(--muted-foreground); border-radius: 999px; padding: .4rem .95rem; cursor: pointer; transition: all .15s; }
.chip-btn:hover { color: var(--foreground); border-color: color-mix(in oklch, var(--primary) 40%, var(--border)); }
.chip-btn[aria-pressed="true"] { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

/* Cards */
.featured { display: grid; gap: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 1.5rem; background: #fff; box-shadow: 0 10px 30px -12px rgb(0 0 0 / .15); transition: box-shadow .2s, transform .2s; }
.featured:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -14px rgb(0 0 0 / .22); }
.featured .thumb { min-height: 14rem; }
.featured .body { padding: 1.75rem; display: flex; flex-direction: column; justify-content: center; gap: .875rem; }
.featured h2 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; text-wrap: balance; }
@media (min-width: 52rem) { .featured { grid-template-columns: 1.05fr 1fr; } .featured .body { padding: 2.5rem; } .featured .thumb { min-height: 20rem; } }

.grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin: 2rem 0 5rem; }
@media (min-width: 40rem) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 1.25rem; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .06); transition: box-shadow .2s, transform .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -14px rgb(0 0 0 / .22); }
.card .thumb { height: 9.5rem; }
.card .body { display: flex; flex-direction: column; gap: .625rem; padding: 1.25rem 1.25rem 1.4rem; flex: 1; }
.card h3 { font-size: 1.2rem; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; text-wrap: balance; }
.card p { color: var(--muted-foreground); font-size: .95rem; text-wrap: pretty; }
.card[hidden] { display: none; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; font-size: .8rem; color: var(--muted-foreground); }
.tag { border-radius: 999px; background: var(--accent); color: var(--accent-foreground); padding: .2rem .65rem; font-size: .72rem; font-weight: 600; }
.more { margin-top: auto; padding-top: .5rem; display: inline-flex; align-items: center; gap: .35rem; font-size: .875rem; font-weight: 600; color: var(--primary); }
.card:hover .more .icon, .featured:hover .more .icon { transform: translateX(3px); }
.more .icon { transition: transform .15s; }

/* Thumbnails (icon on a warm gradient, a different tilt per post) */
.thumb { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; background: linear-gradient(135deg, var(--accent), var(--secondary) 55%, var(--background)); }
.thumb::before { content: ""; position: absolute; width: 14rem; height: 14rem; border-radius: 999px; background: color-mix(in oklch, var(--primary) 14%, transparent); top: -5rem; right: -4rem; }
.thumb::after { content: ""; position: absolute; width: 9rem; height: 9rem; border-radius: 999px; background: rgb(255 255 255 / .55); bottom: -3.5rem; left: -2rem; }
.thumb .tile { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 4.5rem; height: 4.5rem; border-radius: 1.4rem; background: var(--primary); color: var(--primary-foreground); font-size: 2.1rem; box-shadow: 0 14px 28px -8px color-mix(in oklch, var(--primary) 60%, transparent); transform: rotate(var(--tilt, -6deg)); }
.featured .thumb .tile { width: 6rem; height: 6rem; font-size: 3rem; border-radius: 1.8rem; }

/* Post */
.post-head { position: relative; overflow: hidden; background: linear-gradient(to bottom, color-mix(in oklch, var(--accent) 50%, transparent), var(--background)); }
.post-head .wrap { position: relative; padding-top: 2.5rem; padding-bottom: 2.5rem; }
.crumbs { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--muted-foreground); }
.crumbs a:hover { color: var(--primary); }
.post-head h1 { margin-top: 1.25rem; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
.post-head .dek { margin-top: 1rem; font-size: 1.2rem; color: var(--muted-foreground); text-wrap: pretty; }
.post-head .meta { margin-top: 1.25rem; }
.dot { width: 3px; height: 3px; border-radius: 99px; background: currentColor; opacity: .5; }

/* Mock app screens */
.frame { position: relative; overflow: hidden; border: 1px solid color-mix(in oklch, var(--primary) 15%, transparent); border-radius: 1.5rem; padding: 1.25rem; background: linear-gradient(135deg, var(--accent), var(--secondary) 55%, var(--background)); box-shadow: 0 12px 30px -12px rgb(0 0 0 / .2); }
.frame-in { max-width: 32rem; margin: 0 auto; }
@media (min-width: 40rem) { .frame { padding: 2rem; } }
.panel { border: 1px solid var(--border); border-radius: 1rem; background: #fff; padding: 1rem; box-shadow: 0 6px 16px -6px rgb(0 0 0 / .18); font-size: .875rem; }
.panel + .panel { margin-top: .75rem; }
.stack > * + * { margin-top: .75rem; }
.panel-title { display: flex; align-items: center; gap: .5rem; font-weight: 600; margin-bottom: .75rem; }
.panel-title .icon, .ic-p { color: var(--primary); }
.row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.row-top { align-items: flex-start; }
.strong { font-weight: 600; }
.muted { color: var(--muted-foreground); }
.small { font-size: .75rem; }
.sub { background: var(--muted); border-radius: .75rem; padding: .75rem; }
.sub .label { display: flex; align-items: center; gap: .375rem; font-size: .75rem; font-weight: 600; color: var(--primary); margin-bottom: .25rem; }
.chip { display: inline-block; border-radius: 999px; background: var(--accent); color: var(--accent-foreground); padding: .15rem .65rem; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.chip-green { background: oklch(0.94 0.06 150); color: oklch(0.4 0.12 150); }
.chip-grey { background: var(--muted); color: var(--muted-foreground); border: 1px solid var(--border); }
.chip-red { background: oklch(0.95 0.04 25); color: oklch(0.5 0.18 27); }
.pill-btn { display: inline-flex; align-items: center; gap: .375rem; border-radius: 999px; padding: .45rem 1rem; font-size: .75rem; font-weight: 600; background: var(--primary); color: var(--primary-foreground); box-shadow: 0 4px 10px -3px color-mix(in oklch, var(--primary) 50%, transparent); }
.pill-btn.ghost { background: #fff; color: var(--foreground); border: 1px solid var(--border); box-shadow: none; }
.btns { display: flex; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; }
.bubble { border-radius: 1rem; padding: .6rem .85rem; max-width: 85%; line-height: 1.45; }
.bubble.in { background: var(--muted); border-bottom-left-radius: .25rem; }
.bubble.out { background: var(--primary); color: var(--primary-foreground); margin-left: auto; border-bottom-right-radius: .25rem; }
.bubble.note { background: oklch(0.97 0.05 95); border: 1px dashed oklch(0.8 0.1 90); max-width: 100%; }
.avatar { display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 99px; background: var(--accent); color: var(--accent-foreground); font-weight: 700; font-size: .75rem; flex-shrink: 0; }
.list > * { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.list > *:last-child { border-bottom: 0; padding-bottom: 0; }
.list > *:first-child { padding-top: 0; }
.grow { flex: 1; min-width: 0; }
.check { width: 1.1rem; height: 1.1rem; border-radius: 6px; border: 2px solid var(--border); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.check.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.check .icon { width: .75rem; height: .75rem; stroke-width: 3.5; }
.done { text-decoration: line-through; color: var(--muted-foreground); }
.bar { height: .5rem; border-radius: 99px; background: var(--muted); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--primary); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.stat { border-radius: .75rem; background: var(--muted); padding: .65rem; }
.stat b { display: block; font-size: 1.2rem; letter-spacing: -.02em; }
.stat span { font-size: .7rem; color: var(--muted-foreground); }
.map { position: relative; height: 9rem; border-radius: .75rem; background: var(--muted); overflow: hidden; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pin { position: absolute; width: 1.5rem; height: 1.5rem; margin: -.75rem 0 0 -.75rem; border-radius: 99px; border: 2px solid #fff; background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgb(0 0 0 / .25); }
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before { content: ""; position: absolute; left: .4rem; top: .3rem; bottom: .3rem; width: 2px; background: var(--border); }
.timeline > div { position: relative; padding-bottom: .9rem; }
.timeline > div:last-child { padding-bottom: 0; }
.timeline > div::before { content: ""; position: absolute; left: -1.5rem; top: .25rem; width: .85rem; height: .85rem; border-radius: 99px; background: #fff; border: 2px solid var(--border); }
.timeline > div.on::before { background: var(--primary); border-color: var(--primary); }
.photo { border-radius: 1.5rem; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 12px 30px -12px rgb(0 0 0 / .2); }
.photo img { width: 100%; height: auto; }

/* Article body */
.article { padding: 2.5rem 0 1rem; }
.article > .narrow > * + * { margin-top: 1.25rem; }
.article h2 { margin-top: 2.5rem !important; font-size: 1.65rem; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.article p, .article li { font-size: 1.1rem; line-height: 1.75; color: color-mix(in oklch, var(--foreground) 85%, var(--background)); text-wrap: pretty; }
.article ul, .article ol { padding-left: 1.4rem; display: grid; gap: .6rem; }
.article li::marker { color: var(--primary); font-weight: 700; }
.article strong { color: var(--foreground); }
.article a:not(.btn) { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.visual { margin: 2.25rem 0 !important; }
.reallife { border-left: 4px solid var(--primary); background: var(--muted); border-radius: 1rem; padding: 1.1rem 1.4rem; }
.reallife .k { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }
.reallife p { margin-top: .25rem; color: var(--foreground); }
.takeaways { border: 1px solid var(--border); border-radius: 1.25rem; padding: 1.25rem 1.5rem; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .06); }
.takeaways h2 { margin-top: 0 !important; font-size: 1.1rem; }
.takeaways ul { list-style: none; padding: 0; margin-top: .75rem; }
.takeaways li { display: flex; gap: .6rem; font-size: 1rem; line-height: 1.5; }
.takeaways li .icon { margin-top: .2rem; color: var(--primary); stroke-width: 3; }

/* CTA */
.cta { position: relative; overflow: hidden; border-radius: 2rem; background: var(--primary); color: var(--primary-foreground); text-align: center; padding: 3.5rem 1.5rem; }
.cta::before, .cta::after { content: ""; position: absolute; border-radius: 99px; background: rgb(255 255 255 / .1); }
.cta::before { width: 16rem; height: 16rem; top: -4rem; left: -4rem; }
.cta::after { width: 18rem; height: 18rem; bottom: -5rem; right: -2.5rem; }
.cta > * { position: relative; }
.cta h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; letter-spacing: -.02em; text-wrap: balance; margin: 0 auto; max-width: 32rem; }
.cta p { margin: 1rem auto 1.75rem; max-width: 28rem; font-size: 1.1rem; opacity: .92; }
.cta .btn-row { justify-content: center; }
.cta .btn-ghost { background: transparent; color: #fff; border: 1px solid rgb(255 255 255 / .55); box-shadow: none; }
.cta .btn-ghost:hover { background: rgb(255 255 255 / .12); }
.cta-wrap { margin: 4rem auto 4.5rem; }
.cta-inline { margin: 3rem 0 0 !important; border: 1px solid color-mix(in oklch, var(--primary) 25%, var(--border)); background: linear-gradient(135deg, var(--accent), var(--secondary)); border-radius: 1.5rem; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.cta-inline h2 { margin: 0 !important; font-size: 1.35rem; }
.cta-inline p { font-size: 1rem; margin-top: .25rem; }
@media (min-width: 40rem) { .cta-inline { flex-direction: row; align-items: center; justify-content: space-between; } .cta-inline .btn { flex-shrink: 0; } }

.section-title { text-align: center; margin-top: 4rem; }
.section-title .eyebrow { font-size: .85rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }
.section-title h2 { margin-top: .5rem; font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 700; letter-spacing: -.02em; }
.pager { display: grid; gap: 1rem; margin-top: 3rem; }
@media (min-width: 40rem) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a { border: 1px solid var(--border); border-radius: 1rem; padding: 1rem 1.25rem; background: #fff; transition: border-color .15s, box-shadow .15s; }
.pager a:hover { border-color: color-mix(in oklch, var(--primary) 50%, var(--border)); box-shadow: 0 8px 20px -10px rgb(0 0 0 / .2); }
.pager small { display: block; font-size: .75rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: .05em; }
.pager strong { display: block; margin-top: .2rem; line-height: 1.3; }
.pager .next { text-align: right; }

.notfound { text-align: center; padding: 6rem 1rem; }
.notfound h1 { font-size: 3rem; font-weight: 800; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .cta, .cta-inline, .pager { display: none; } }
.article .pager a { color: inherit; text-decoration: none; }
.article .pager a strong { color: var(--foreground); }
/* Mock app screens sit inside .article, so undo the article's larger body-text rules for them. */
.article .frame p, .article .frame li { font-size: .875rem; line-height: 1.45; color: inherit; }
.article .frame .small { font-size: .75rem; }
.article .frame .muted { color: var(--muted-foreground); }
.article .frame .stat span { font-size: .7rem; }
.article .frame ul { gap: 0; }
