/* Shared styles for the explainer pages (/pods, /why-leadcode) and their machine views.
   Tokens follow the v8 landing page: Archivo + IBM Plex Mono on #0b0a09. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: #0b0a09; }
body { color: #ece9e3; font-family: 'Archivo', system-ui, -apple-system, sans-serif; font-size: 15.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: #d97757; text-decoration: none; }
a:hover { color: #e08b63; }
::selection { background: rgba(217,119,87,0.3); }
:focus-visible { outline: 2px solid #d97757; outline-offset: 3px; }
@keyframes lc-breathe { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes lc-blink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.wrap { max-width: 1360px; margin: 0 auto; padding-left: clamp(20px, 4vw, 48px); padding-right: clamp(20px, 4vw, 48px); }
code, .k { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.86em; color: #ece9e3; }

/* header */
.hdr { position: sticky; top: 0; z-index: 40; background: rgba(11,10,9,0.74); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(236,233,227,0.07); }
.hdr .wrap { height: 58px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: #ece9e3; flex: none; }
.brand:hover { color: #ece9e3; }
.wm { display: inline-flex; align-items: baseline; gap: 4px; font-weight: 600; font-size: 18px; letter-spacing: -0.02em; }
.wm .gt { color: #d97757; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-weight: 600; font-size: 15px; }
.wm .cd { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-weight: 500; font-size: 16px; }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nl { color: #a5a29a; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11.5px; letter-spacing: 0.04em; white-space: nowrap; }
.nl:hover { color: #ece9e3; }
.nl .num { color: #55534e; }
.btn { display: inline-flex; align-items: center; gap: 9px; background: #d97757; color: #12100e; font-weight: 600; font-size: 14px; padding: 13px 22px; border-radius: 9px; transition: background .12s; }
.btn:hover { background: #e08b63; color: #12100e; }
.btn-sm { font-size: 12.5px; padding: 8px 15px; border-radius: 8px; }

/* hero */
.hero { position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; top: -180px; left: 50%; transform: translateX(-50%); width: min(900px, 100%); height: 420px; background: radial-gradient(ellipse at center, rgba(217,119,87,0.12), transparent 68%); pointer-events: none; }
.hero .wrap { position: relative; padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(48px, 7vw, 88px); }
.eyebrow { display: flex; align-items: center; gap: 12px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: #d97757; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: #d97757; flex: none; }
h1 { margin: 22px 0 0; max-width: 980px; font-size: clamp(40px, 7vw, 96px); line-height: 0.95; letter-spacing: -0.045em; font-weight: 600; font-stretch: 104%; text-wrap: balance; }
.intro { margin: 26px 0 0; max-width: 640px; font-size: clamp(16px, 1.5vw, 18px); line-height: 1.55; color: #a5a29a; text-wrap: pretty; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.toc a { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; padding: 6px 11px; border-radius: 7px; background: #12110f; border: 1px solid rgba(236,233,227,0.08); color: #a5a29a; }
.toc a:hover { color: #ece9e3; border-color: rgba(217,119,87,0.5); }
.toc a span { color: #55534e; margin-right: 6px; }

/* sections */
.sec { border-top: 1px solid rgba(236,233,227,0.07); scroll-margin-top: 58px; }
.sec.alt { background: #0e0d0b; }
.sec > .wrap { padding-top: clamp(72px, 9vw, 120px); padding-bottom: clamp(72px, 9vw, 120px); }
.label { display: flex; align-items: baseline; gap: 14px; border-top: 1px solid rgba(236,233,227,0.14); padding-top: 16px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }
.label .n { color: #d97757; }
.label .t { color: #706d66; }
.label .m { margin-left: auto; color: #3f3d39; letter-spacing: 0.06em; text-transform: none; }
h2 { margin: 30px 0 0; max-width: 900px; font-size: clamp(30px, 4.2vw, 54px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 600; font-stretch: 104%; text-wrap: balance; }
.answer { margin: 22px 0 0; max-width: 680px; font-size: clamp(16px, 1.45vw, 18px); line-height: 1.6; color: #d6d3cc; text-wrap: pretty; }
.more { margin: 14px 0 0; max-width: 680px; font-size: 15.5px; line-height: 1.7; color: #a5a29a; text-wrap: pretty; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: clamp(28px, 4vw, 64px); align-items: start; }
.cols > .text > h2 { margin-top: 30px; }
.viz { margin-top: 48px; }
.cols .viz { margin-top: 30px; }

/* panels */
.panel { border-radius: 14px; background: #0b0a09; border: 1px solid rgba(236,233,227,0.08); overflow: hidden; }
.sec.alt .panel { background: #0b0a09; }
.sec:not(.alt) .panel { background: #0e0d0b; }
.panel-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid rgba(236,233,227,0.08); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10.5px; color: #706d66; }
.panel-h .dot { width: 6px; height: 6px; border-radius: 50%; background: #95b075; flex: none; animation: lc-breathe 2s ease-in-out infinite; }
.panel-b { padding: 16px 18px; }
.term { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; line-height: 1.85; color: #a5a29a; }
.term div { overflow-wrap: anywhere; }
.chip { display: inline-block; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10px; padding: 2px 7px; border-radius: 5px; background: rgba(236,233,227,0.06); color: #a5a29a; white-space: nowrap; }
.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.card { display: flex; flex-direction: column; gap: 10px; padding: 20px 18px; border-radius: 13px; background: #12110f; border: 1px solid rgba(236,233,227,0.08); min-width: 0; }
.card .kick { display: flex; align-items: center; gap: 8px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: #706d66; }
.card .kick .r { margin-left: auto; letter-spacing: 0.04em; text-transform: none; color: #55534e; }
.card h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; font-stretch: 104%; }
.card p { margin: 0; font-size: 13.5px; color: #a5a29a; line-height: 1.6; }
.card .out { margin-top: auto; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10.5px; line-height: 1.5; color: #95b075; background: #0b0a09; border: 1px solid rgba(236,233,227,0.08); border-radius: 7px; padding: 7px 9px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.num3 { display: flex; flex-direction: column; gap: 12px; margin-top: 44px; }
.num3 > div { border-radius: 13px; background: #12110f; border: 1px solid rgba(236,233,227,0.08); padding: clamp(20px, 3vw, 28px); }
.num3 .kick { display: flex; align-items: baseline; gap: 10px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #706d66; margin-bottom: 12px; }
.num3 .kick b { color: #d97757; font-weight: 500; }
.num3 p { margin: 0; max-width: 760px; font-size: 15px; color: #a5a29a; line-height: 1.7; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 13px 16px; border-bottom: 1px solid rgba(236,233,227,0.07); vertical-align: top; }
.tbl th { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: #706d66; font-weight: 500; }
.tbl td { color: #a5a29a; }
.tbl td:first-child { color: #ece9e3; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.scroll-x { overflow-x: auto; }
.related { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); margin-top: 40px; }
.related a { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 12px; background: #12110f; border: 1px solid rgba(236,233,227,0.08); color: #ece9e3; transition: border-color .15s; }
.related a:hover { border-color: rgba(217,119,87,0.55); color: #ece9e3; }
.related a span { font-size: 13px; color: #a5a29a; line-height: 1.5; }
.related a b { font-weight: 600; }
.related a b::after { content: " →"; color: #d97757; }

/* closer + footer */
.closer { border-top: 1px solid rgba(236,233,227,0.07); position: relative; overflow: hidden; text-align: center; }
.closer::before { content: ""; position: absolute; bottom: -240px; left: 50%; transform: translateX(-50%); width: min(960px, 130%); height: 460px; background: radial-gradient(ellipse at center, rgba(217,119,87,0.16), transparent 66%); pointer-events: none; }
.closer .wrap { position: relative; padding-top: clamp(90px, 12vw, 160px); padding-bottom: clamp(90px, 12vw, 160px); }
.closer h2 { margin: 0 auto; max-width: 900px; font-size: clamp(40px, 6.4vw, 92px); line-height: 0.95; letter-spacing: -0.045em; }
.closer .note { margin: 20px 0 0; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; color: #706d66; }
.ftr { border-top: 1px solid rgba(236,233,227,0.07); background: #0e0d0b; }
/* bottom padding clears the floating Human/Machine switch */
.ftr .wrap { padding-top: 22px; padding-bottom: 96px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10.5px; color: #706d66; }
.ftr a { color: #706d66; }
.ftr a:hover { color: #ece9e3; }
.ftr .me { display: inline-flex; align-items: center; gap: 8px; color: #a5a29a; }
.ftr .rt { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.ftr .rt::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #95b075; animation: lc-breathe 2s ease-in-out infinite; }

/* Human / Machine switch — two real links, so each version has its own URL and works without JS */
.mode { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; display: flex; gap: 2px; padding: 5px; border-radius: 999px; background: rgba(28,26,23,0.9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(236,233,227,0.1); box-shadow: 0 14px 44px rgba(0,0,0,0.55); }
.mode a { display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 10px; border-radius: 999px; color: #a5a29a; font-family: 'Archivo', system-ui, sans-serif; font-size: 15px; font-weight: 500; transition: color .15s, background .15s; }
.mode a:hover { color: #ece9e3; background: rgba(236,233,227,0.05); }
.mode a[aria-current="page"] { color: #f5e4d6; }
.mode .r { width: 22px; height: 22px; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; flex: none; }
.mode a[aria-current="page"] .r::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }

/* machine view */
.machine { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.machine .top { max-width: 880px; margin: 0 auto; padding: 22px clamp(16px, 4vw, 32px) 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11px; color: #706d66; }
.machine .top a { color: #a5a29a; }
.machine pre { max-width: 880px; margin: 0 auto; padding: 18px clamp(16px, 4vw, 32px) 120px; font-family: inherit; font-size: 13.5px; line-height: 1.75; color: #d6d3cc; white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .nl, .label .m { display: none; }
  .mode a { font-size: 14px; padding: 7px 14px 7px 8px; }
  .mode .r { width: 20px; height: 20px; }
  .tbl th, .tbl td { padding: 11px 12px; }
}
