*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }

:root {
  --ink: #0a0a0a;
  --ink2: #444;
  --ink3: #777;
  --ink4: #aaa;
  --surface: #fafaf8;
  --s2: #f2f0eb;
  --s3: #e8e5de;
  --accent: #e8562a;
  --ah: #c94420;
  --navy: #14203b;
  --border: rgba(0, 0, 0, 0.08);
  --b2: rgba(0, 0, 0, 0.14);
  --r: 4px;
  --rl: 10px;
  --max: 1140px;
  --prose: 680px;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Geist', system-ui, sans-serif
}

html { scroll-behavior: smooth }
body { font-family: var(--sans); background: var(--surface); color: var(--ink); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased }

/* HERO */
.art-hero { background: var(--navy); padding: 5rem 2rem 4.5rem }
.art-hero-i { max-width: var(--prose); margin: 0 auto }
.art-back { font-size: 0.78rem; color: rgba(255,255,255,0.4); text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 1.5rem; transition: color 0.2s }
.art-back:hover { color: rgba(255,255,255,0.7) }
.art-cats { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem }
.art-cat { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; background: rgba(232,86,42,0.2); color: rgba(232,86,42,0.9); padding: 0.22rem 0.65rem; border-radius: 2px }
.art-h1 { font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.1; color: #fff; letter-spacing: -0.02em; margin-bottom: 1.2rem }
.art-sub { font-size: 1rem; color: rgba(255,255,255,0.5); line-height: 1.7; margin-bottom: 1.8rem; font-weight: 300 }
.art-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: 0.78rem; color: rgba(255,255,255,0.35); border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.2rem; align-items: center }
.art-meta a { color: inherit; text-decoration: none; transition: color 0.2s }
.art-meta a:hover { color: rgba(255,255,255,0.7) }
.art-meta-item { display: flex; align-items: center; gap: 0.4rem }
a.art-meta-item { color: inherit; text-decoration: none; transition: color 0.2s }
a.art-meta-item:hover { color: rgba(255,255,255,0.7) }
.art-meta .share-btns { display: flex; gap: 0.3rem; margin-left: auto }
.art-meta .share-btn { border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.45); border-radius: var(--r) }
.art-meta .share-btn:hover { border-color: rgba(255,255,255,0.5); color: rgba(255,255,255,0.9) }

/* LAYOUT */
.art-layout { max-width: var(--max); margin: 0 auto; padding: 4rem 2rem; display: grid; grid-template-columns: 1fr 280px; gap: 5rem; align-items: start }
.art-body { min-width: 0 }

/* PROSE */
.art-prose h2 { font-family: var(--serif); font-size: 1.55rem; color: var(--ink); margin: 2.5rem 0 0.8rem; line-height: 1.2; letter-spacing: -0.01em }
.art-prose h3 { font-size: 1.05rem; font-weight: 500; color: var(--ink); margin: 1.5rem 0 0.5rem }
.art-prose p { font-size: 1rem; color: var(--ink2); line-height: 1.8; margin-bottom: 1.2rem; text-align: justify }
.art-prose p:first-child { font-size: 1.05rem; color: var(--ink); line-height: 1.8 }
.art-prose ul, .art-prose ol { margin: 0.8rem 0 1.2rem 1.2rem }
.art-prose li { font-size: 0.95rem; color: var(--ink2); line-height: 1.75; margin-bottom: 0.4rem }
.art-prose strong { color: var(--ink); font-weight: 500 }

/* BEFORE/AFTER — standard version; power-platform overrides this per-article */
.before-after { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--rl); overflow: hidden; margin: 2rem 0 }
.ba-col { padding: 1.5rem }
.ba-before { background: rgba(226,75,74,0.06) }
.ba-after { background: rgba(34,197,94,0.06) }
.ba-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 500; margin-bottom: 0.8rem }
.ba-before .ba-label { color: #a32d2d }
.ba-after .ba-label { color: #27500a }
.ba-item { font-size: 0.85rem; line-height: 1.6; margin-bottom: 0.5rem; display: flex; gap: 0.5rem }
.ba-before .ba-item::before { content: '✗'; color: #a32d2d; flex-shrink: 0 }
.ba-after .ba-item::before { content: '✓'; color: #27500a; flex-shrink: 0 }

/* STAT GRID */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--rl); overflow: hidden; margin: 2rem 0 }
.stat-block { background: var(--surface); padding: 1.5rem 1rem; text-align: center }
.stat-n { font-family: var(--serif); font-size: 2.2rem; color: var(--accent); line-height: 1; margin-bottom: 0.45rem }
.stat-label { font-size: 0.75rem; color: var(--ink3); line-height: 1.45 }
.stat-source { font-size: 0.67rem; color: var(--ink4); margin-top: 0.3rem }

/* TRIGGER LIST */
.trigger-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--rl); overflow: hidden; margin: 1.5rem 0 }
.trigger-item { display: flex; gap: 1rem; padding: 1rem 1.2rem; background: var(--surface); align-items: flex-start }
.tr-step { font-size: 0.64rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); background: rgba(232,86,42,0.08); padding: 0.2rem 0.5rem; border-radius: 2px; flex-shrink: 0; margin-top: 0.15rem; white-space: nowrap }
.tr-body { flex: 1 }
.tr-body strong { display: block; font-size: 0.88rem; color: var(--ink); margin-bottom: 0.2rem }
.tr-body span { font-size: 0.82rem; color: var(--ink3); line-height: 1.5 }

/* FEATURE ITEMS */
.feature-items { display: flex; flex-direction: column; gap: 0.7rem; margin: 1.2rem 0 }
.feature-item { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.9rem 1rem; background: var(--s2); border-radius: var(--r) }
.fi-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 0.55rem }
.fi-body strong { font-size: 0.9rem; color: var(--ink); display: block; margin-bottom: 0.2rem }
.fi-body span { font-size: 0.83rem; color: var(--ink2); line-height: 1.55 }

/* DUAL CTA — modifier classes (.dcta-qhub/.dcta-ops or .dcta-primary/.dcta-secondary) stay per-article */
.dual-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2.5rem 0 }
.dcta-card { border: 1px solid var(--border); border-radius: var(--rl); padding: 1.8rem }
.dcta-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.18em; margin-bottom: 0.6rem }
.dcta-title { font-family: var(--serif); font-size: 1.1rem; line-height: 1.35; margin-bottom: 0.7rem }
.dcta-card p { font-size: 0.8rem; line-height: 1.55; margin-bottom: 1rem }
.dcta-btn { display: inline-block; padding: 0.6rem 1.2rem; border-radius: var(--r); font-size: 0.82rem; font-weight: 500; text-decoration: none; background: var(--accent); color: #fff; transition: background 0.2s }
.dcta-btn:hover { background: var(--ah) }

/* ART CLOSE */
.art-close { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); text-align: center; margin: 2rem 0 0; padding-top: 2rem; border-top: 1px solid var(--border); font-style: italic }

/* IQ NOTE — standard orange version; opsgrid-vs overrides to peach per-article */
.iq-note { background: rgba(232,86,42,0.06); border: 1px solid rgba(232,86,42,0.2); border-radius: var(--rl); padding: 1.5rem; margin: 1.5rem 0 }
.iq-note-lbl { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 0.5rem }
.iq-note p { font-size: 0.88rem; color: var(--ink2); line-height: 1.65; margin: 0 }

/* ART DIVIDER */
.art-divider { border: none; border-top: 1px solid var(--border); margin: 3rem 0 }

/* SIDEBAR */
.art-sidebar { position: sticky; top: 80px }
.sidebar-card { border: 1px solid var(--border); border-radius: var(--rl); padding: 1.5rem; margin-bottom: 1.5rem }
.sb-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink4); margin-bottom: 1rem }
.sb-toc { display: flex; flex-direction: column; gap: 0.5rem }
.sb-toc a { font-size: 0.83rem; color: var(--ink2); text-decoration: none; padding-left: 0.75rem; border-left: 2px solid var(--border); transition: all 0.2s }
.sb-toc a:hover { color: var(--ink); border-left-color: var(--accent) }
.sb-cta { background: var(--accent); border-radius: var(--rl); padding: 1.5rem; text-align: center; margin-bottom: 1.5rem }
.sb-cta h4 { font-family: var(--serif); font-size: 1rem; color: #fff; margin-bottom: 0.5rem }
.sb-cta p { font-size: 0.78rem; color: rgba(255,255,255,0.65); line-height: 1.55; margin-bottom: 1rem }
.sb-cta a { display: block; background: #fff; color: var(--accent); padding: 0.6rem; border-radius: var(--r); font-size: 0.8rem; font-weight: 500; text-decoration: none; transition: all 0.2s }
.sb-cta a:hover { background: rgba(255,255,255,0.9) }
.sb-related { display: flex; flex-direction: column; gap: 0.8rem }
.sb-rel-item { font-size: 0.82rem; color: var(--ink2); text-decoration: none; display: flex; gap: 0.6rem; align-items: flex-start; line-height: 1.45; transition: color 0.2s }
.sb-rel-item:hover { color: var(--ink) }
.sb-rel-item::before { content: '→'; color: var(--accent); flex-shrink: 0; font-size: 0.8rem }

/* SHARE BUTTONS — base size/shape; hero context overrides color below */
.share-btns { display: flex; gap: 0.4rem }
.share-btn { display: inline-flex; align-items: center; justify-content: center; font-size: 0.78rem; padding: 0.5rem 0.65rem; border-radius: var(--r); text-decoration: none; transition: all 0.2s }

/* ARTICLE CTA — opsgrid-vs overrides this to card style per-article */
.art-cta { background: var(--navy); padding: 4rem 2rem; text-align: center }
.art-cta h3 { font-family: var(--serif); font-size: 1.8rem; color: #fff; margin-bottom: 0.7rem }
.art-cta p { font-size: 0.9rem; color: rgba(255,255,255,0.5); max-width: 480px; margin: 0 auto 2rem; font-weight: 300; line-height: 1.7 }
.btn-p { background: var(--accent); color: #fff; padding: 0.78rem 1.8rem; border-radius: var(--r); font-size: 0.88rem; text-decoration: none; font-weight: 500; transition: background 0.2s; display: inline-block }
.btn-p:hover { background: var(--ah) }

/* GLOBAL FOOTER */
footer { background: #080808; color: rgba(255,255,255,0.45); padding: 3rem 2rem }
.foot-i { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem }
.foot-logo { font-family: var(--serif); font-size: 1.1rem; color: rgba(255,255,255,0.8); text-decoration: none; display: block; margin-bottom: 0.8rem }
.foot-logo span { color: var(--accent) }
.foot-tag { font-size: 0.8rem; line-height: 1.6 }
.foot-col h5 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.25); margin-bottom: 1rem; font-weight: 400 }
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem }
.foot-col a { font-size: 0.8rem; color: rgba(255,255,255,0.4); text-decoration: none; transition: color 0.2s }
.foot-col a:hover { color: rgba(255,255,255,0.8) }
.foot-social { display: flex; gap: 1.2rem; margin-top: 1rem; flex-wrap: wrap }
.foot-social-link { font-size: 0.78rem; color: rgba(255,255,255,0.35); text-decoration: none; display: flex; align-items: center; gap: 0.4rem; transition: color 0.2s }
.foot-btm { max-width: var(--max); margin: 2rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.07); display: flex; justify-content: space-between; font-size: 0.73rem; color: rgba(255,255,255,0.2); flex-wrap: wrap; gap: 0.5rem }

/* NL SIGNUP */
.nl { background: var(--s2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 3rem 2rem }
.nl-i { max-width: 520px; margin: 0 auto; text-align: center }
.nl-i h3 { font-family: var(--serif); font-size: 1.4rem; margin-bottom: 0.5rem }
.nl-i p { font-size: 0.85rem; color: var(--ink2); margin-bottom: 1.5rem }
.nl-form { display: flex; gap: 0.5rem; max-width: 380px; margin: 0 auto }
.nl-form input { flex: 1; padding: 0.62rem 1rem; border: 1px solid var(--b2); border-radius: var(--r); font-size: 0.83rem; background: var(--surface); outline: none; font-family: var(--sans) }
.nl-form-input { flex: 1 !important; border-radius: var(--r) !important; font-size: 0.83rem !important; background: var(--surface) !important; outline: none !important; font-family: var(--sans) !important }
.nl-form input:focus { border-color: var(--ink) }
.nl-form button { padding: 0.62rem 1.1rem; background: var(--ink); color: #fff; border: none; border-radius: var(--r); font-size: 0.8rem; font-family: var(--sans); cursor: pointer; font-weight: 500; white-space: nowrap }
.nl-form-button { padding: 0.50rem 1.1rem !important; background: var(--ink) !important; color: #fff; border: none; border-radius: var(--r); font-size: 0.8rem !important; font-family: var(--sans); cursor: pointer; font-weight: 500; white-space: nowrap }
.nl-form button:focus { background: var(--ink) }

/* RESPONSIVE */
@media (max-width: 900px) {
  .art-layout { grid-template-columns: 1fr }
  .art-sidebar { position: static }
  .before-after { grid-template-columns: 1fr }
  .foot-i { grid-template-columns: 1fr 1fr }
}
@media (max-width: 600px) {
  .art-layout { padding: 3rem 1.25rem }
  .art-hero { padding: 4rem 1.25rem 3.5rem }
  .foot-i { grid-template-columns: 1fr }
  .art-h1 { font-size: 1.7rem }
  .nl-form { flex-direction: column }
}
