/* ideamngmt.com blog — article typography and the generated claim-status block.
 *
 * This site is Bootstrap 5.3 with its tokens declared inline on each page, so this
 * file redeclares only what it needs and otherwise leans on Bootstrap. It is the
 * sibling of marketing/public/css/blog.css in the idea-base.us repo; the two are
 * ports of one design, deliberately. Keep them in step.
 *
 * The status block must read as editorial apparatus — dated, checkable, dry — not
 * as a marketing badge. A reader who thinks it is decoration gets nothing from it. */

:root {
  --primary: #3b82f6;
  --primary-button: #1d4ed8;
  --accent: #10b981;
  --dark: #0f172a;
  --dark-lighter: #1e293b;
  --dark-card: #334155;
  --text-muted: #cbd5e1;
  --text-light: #e2e8f0;
  --warning: #d29922;
  --danger: #f85149;
}

body { background: var(--dark); color: var(--text-light); }

.navbar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  /* Feed Bootstrap its own variables rather than fight specificity. Our
     `.navbar .nav-link` rule is (0,2,0); Bootstrap's `.navbar-nav .nav-link.active`
     is (0,3,0) and wins, and --bs-navbar-active-color defaults to light-mode BLACK —
     so the current page's link rendered black on a near-black bar. Setting the
     variables fixes active/hover/show without overriding anything. */
  --bs-navbar-color: var(--text-muted);
  --bs-navbar-active-color: #f8fafc;
  --bs-navbar-hover-color: #f8fafc;
}
.navbar-brand { color: var(--text-light); font-weight: 700; font-size: 1.2rem; }
.navbar-brand span { color: var(--primary); }
.navbar .nav-link { color: var(--text-muted); }
.navbar .nav-link:hover, .navbar .nav-link:focus { color: #fff; }
.navbar .nav-link.active, .navbar .nav-link.show { color: #f8fafc; }
.navbar .btn-primary { background: var(--primary-button); border-color: var(--primary-button); }
.navbar-toggler { border-color: rgba(255,255,255,0.2); }
.navbar-toggler-icon { filter: invert(1) grayscale(1) brightness(2); }

/* fixed-top nav needs the content pushed clear of it */
.post-main { padding-top: 96px; padding-bottom: 3rem; }
.post { max-width: 760px; margin: 0 auto; }

.eyebrow { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--accent); margin-bottom: .5rem; }
.post-breadcrumb { margin: 0 0 1rem; font-size: .875rem; }
.post-breadcrumb a, .post-body a, .post-status a { color: #7cb3ff; }
.post-header { padding-bottom: 1rem; }
.post-header h1 { font-size: clamp(28px, 5.5vw, 42px); line-height: 1.15; text-wrap: balance; margin: 0 0 1rem; font-weight: 700; }
.post-standfirst { font-size: 1.15rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

.post-body { font-size: 17px; line-height: 1.75; }
.post-body > p { margin: 0 0 1.5rem; }
.post-body h2 { font-size: 1.5rem; line-height: 1.3; text-wrap: balance; margin: 3rem 0 1rem; font-weight: 700; }
.post-body strong { color: #fff; }
.post-body code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .875em; background: var(--dark-lighter); border: 1px solid var(--dark-card); border-radius: 4px; padding: .1em .4em; overflow-wrap: anywhere; }

/* Tabular figures right-aligned so columns of money line up. */
.post-table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: .9rem; display: block; overflow-x: auto; }
.post-table th, .post-table td { padding: .5rem 1rem; border-bottom: 1px solid var(--dark-card); text-align: left; white-space: nowrap; }
.post-table thead th { color: var(--text-muted); font-weight: 600; font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; }
.post-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.post-table .total td { font-weight: 700; color: #fff; border-top: 2px solid var(--dark-card); border-bottom: none; }

/* ---------- Generated claim-status block (scripts/render-blog-status.mjs) ---------- */
.post-status { background: var(--dark-lighter); border: 1px solid var(--dark-card); border-left: 3px solid var(--text-muted); border-radius: 8px; padding: 1.5rem; margin: 1.5rem 0 3rem; font-size: .9rem; }
.post-status.status-holds { border-left-color: var(--accent); }
.post-status.status-decayed, .post-status.status-superseded { border-left-color: var(--warning); }
.post-status.status-retracted { border-left-color: var(--danger); }

.status-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.status-badge { font-size: .7rem; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: rgba(16,185,129,.14); color: var(--accent); border: 1px solid rgba(16,185,129,.35); }
.status-decayed .status-badge, .status-superseded .status-badge,
.status-badge.status-decayed, .status-badge.status-superseded { background: rgba(210,153,34,.14); color: var(--warning); border-color: rgba(210,153,34,.35); }
.status-retracted .status-badge, .status-badge.status-retracted { background: rgba(248,81,73,.14); color: var(--danger); border-color: rgba(248,81,73,.35); }
.status-title { font-size: 1rem; margin: 0; font-weight: 600; }
.status-dates { color: var(--text-muted); margin: .5rem 0 1rem; font-variant-numeric: tabular-nums; }

.status-claims, .status-changelog { margin-bottom: 1rem; }
.status-claims > summary, .status-changelog > summary { cursor: pointer; color: #7cb3ff; font-weight: 500; padding: .25rem 0; }
.status-claims > summary:hover, .status-changelog > summary:hover { color: #fff; }

.claim-list { list-style: none; margin: 1rem 0 0; padding: 0; }
/* minmax(0,1fr), not 1fr: a claim quoting an unbreakable token (an API constant, a
   long URL) has a min-content width wider than the card, and a bare 1fr lets that
   inflate the track past the container — the text then clips with no page scroll to
   reach it. Both this and overflow-wrap are needed. */
.claim { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .25rem 1rem; padding: 1rem 0; border-top: 1px solid var(--dark-card); line-height: 1.6; }
.claim-state { grid-column: 1; grid-row: 1 / span 2; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--accent); padding-top: 2px; white-space: nowrap; }
.claim-decayed .claim-state, .claim-superseded .claim-state { color: var(--warning); }
.claim-retracted .claim-state { color: var(--danger); }
.claim-text { grid-column: 2; overflow-wrap: anywhere; }
.claim-source { grid-column: 2; color: var(--text-muted); font-size: .75rem; }
.claim-basis { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }

.status-disclosure { margin: 0; padding-top: 1rem; border-top: 1px solid var(--dark-card); color: var(--text-muted); font-size: .75rem; line-height: 1.6; }

@media (max-width: 560px) {
  .claim { grid-template-columns: minmax(0, 1fr); }
  .claim-state { grid-row: auto; }
  .claim-text, .claim-source { grid-column: 1; }
}

/* ---------- End-of-post CTA ---------- */
.post-cta { margin-top: 3rem; padding: 2rem; background: var(--dark-lighter); border: 1px solid var(--dark-card); border-radius: 8px; }
.post-cta h2 { font-size: 1.25rem; margin: 0 0 .5rem; font-weight: 700; }
.post-cta p { color: var(--text-muted); margin: 0 0 1rem; }
.post-cta p:last-child { margin-bottom: 0; display: flex; gap: 1rem; flex-wrap: wrap; }
.post-cta .btn-primary { background: var(--primary-button); border-color: var(--primary-button); }

/* ---------- Index listing ---------- */
.blog-index-header { padding: 1rem 0 1.5rem; }
.blog-index-header h1 { font-size: clamp(28px, 5.5vw, 40px); margin: 0 0 1rem; font-weight: 700; }
.blog-index-header p { color: var(--text-muted); font-size: 1.15rem; line-height: 1.6; margin: 0; }

.post-list { list-style: none; padding: 0; margin: 0 0 3rem; }
.post-list > li { border-top: 1px solid var(--dark-card); padding: 1.5rem 0; }
.post-list h2 { font-size: 1.25rem; margin: 0 0 .5rem; line-height: 1.35; font-weight: 700; }
.post-list h2 a { color: var(--text-light); text-decoration: none; }
.post-list h2 a:hover { color: var(--primary); }
.post-list .meta { color: var(--text-muted); font-size: .75rem; font-variant-numeric: tabular-nums; margin: 0 0 .5rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.post-list .dek { color: var(--text-muted); margin: 0; line-height: 1.65; }

.how-we-write { background: var(--dark-lighter); border: 1px solid var(--dark-card); border-radius: 8px; padding: 1.5rem; margin-bottom: 3rem; }
.how-we-write h2 { font-size: 1rem; margin: 0 0 .5rem; font-weight: 700; }
.how-we-write p { color: var(--text-muted); font-size: .9rem; line-height: 1.7; margin: 0 0 1rem; }
.how-we-write p:last-child { margin-bottom: 0; }
.how-we-write dl { margin: 0; font-size: .9rem; }
.how-we-write dt { font-weight: 700; color: var(--text-light); margin-top: 1rem; }
.how-we-write dd { margin: 2px 0 0; color: var(--text-muted); line-height: 1.6; }
/* The box ends with a <p> after the <dl>; :last-child zeroes its margin. */
.how-we-write dl + p { margin-top: 1.5rem; }

.footer { background: #0b1220; border-top: 1px solid var(--dark-card); padding: 3rem 0 2rem; margin-top: 2rem; }
.footer-brand { font-weight: 700; font-size: 1.15rem; margin-bottom: .5rem; }
.footer-desc { color: var(--text-muted); font-size: .9rem; }
.footer h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: .75rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: .9rem; line-height: 2; }
.footer-links a:hover { color: #fff; }
