/* Content pages (/cpql/, /revops/, /insights/...). Loaded after style.css, reuses its tokens. */

.nav-sub .nav-inner { justify-content: space-between; }

/* Breadcrumb */
.crumbs { padding-top: 2rem; font-size: 14px; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--line); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* Article */
.article { padding-block: 2rem clamp(4rem, 8vw, 6rem); }
.article-head { max-width: 46rem; }
.article h1 { font-weight: 700; font-size: clamp(1.9rem, 1.2rem + 2vw, 2.6rem); letter-spacing: -0.01em; }
.byline { margin-top: 1rem; font-size: 14px; color: var(--muted); }
.byline a { color: var(--ink-2); }
.answer { margin-top: 1.75rem; padding: 1.25rem 1.4rem; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); font-size: 18px; color: var(--ink); max-width: 46rem; }
.prose { max-width: 46rem; margin-top: 2.5rem; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { margin-top: 3rem; font-weight: 700; font-size: clamp(1.35rem, 1.1rem + .9vw, 1.75rem); }
.prose h3 { margin-top: 2rem; font-weight: 600; font-size: 1.15rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose a { color: var(--accent-text); text-underline-offset: .2em; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: .4rem; }
.note { font-size: 14px; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: .75rem 1rem; border-top: 1px solid var(--line); }
.data-table thead th { border-top: 0; background: var(--panel); font-weight: 600; color: var(--ink); }
.data-table td { color: var(--ink-2); }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Formula */
.formula { padding: 1rem 1.25rem; background: var(--accent-soft); border-radius: var(--radius); font-weight: 600; color: var(--ink); }

/* Video facade: thumbnail first, the YouTube player loads only on click. */
.video { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #000; }
.video button { all: unset; position: absolute; inset: 0; cursor: pointer; }
.video img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; transition: opacity .2s; }
.video button:hover img, .video button:focus-visible img { opacity: 1; }
.video .play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 12px; background: var(--btn-bg); display: grid; place-items: center; }
.video .play::after { content: ""; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent var(--btn-ink); margin-left: 4px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-cap { margin-top: .6rem; font-size: 14px; color: var(--muted); }
.chapters { list-style: none; padding: 0 !important; columns: 2 18rem; column-gap: 2rem; font-size: 15px; }
.chapters li { break-inside: avoid; }
.chapters time { display: inline-block; min-width: 3.2rem; font-variant-numeric: tabular-nums; color: var(--accent-text); }

/* CPQL calculator */
.calc { margin-top: 2.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; max-width: 60rem; }
.calc > * { min-width: 0; }
.calc-in, .calc-out { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.calc h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.calc .field + .field { margin-top: 1rem; }
.calc label { display: block; font-size: 15px; font-weight: 600; margin-bottom: .35rem; }
.calc input { width: 100%; min-height: 48px; padding: 0 .9rem; font: inherit; font-variant-numeric: tabular-nums; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.calc input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.calc .hint { margin-top: .3rem; font-size: 13px; color: var(--muted); }
.calc-out dl { margin: 0; display: grid; gap: 1rem; }
.calc-out dt { font-size: 14px; color: var(--muted); }
.calc-out dd { margin: 0; font: 700 1.6rem/1.2 "Inter Tight", "Anuphan", sans-serif; font-variant-numeric: tabular-nums; }
.calc-out .big dd { font-size: 2.4rem; color: var(--accent-text); }
.calc-out .calc-msg { margin-top: 1.25rem; font-size: 15px; color: var(--ink-2); }

/* Insights list */
.post-list { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 1rem; max-width: 52rem; }
.post-list a { display: grid; grid-template-columns: 12rem 1fr; gap: 1.25rem; align-items: center; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .2s; }
.post-list a:hover { border-color: var(--accent); }
.post-list img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; display: block; }
.post-list h2 { font-size: 1.15rem; font-weight: 600; }
.post-list p { margin-top: .35rem; font-size: 15px; color: var(--ink-2); }
.post-meta { font-size: 13px; color: var(--muted); }

/* Closing CTA */
.cta-box { margin-top: 3.5rem; padding: 1.75rem; max-width: 46rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.cta-box h2 { margin-top: 0 !important; font-size: 1.35rem; }
.cta-box p { margin-top: .6rem; color: var(--ink-2); }
.cta-box .btn { margin-top: 1.25rem; }

/* Related */
.related { margin-top: 3rem; max-width: 46rem; }
.related h2 { font-size: 1.1rem; font-weight: 600; }
.related ul { margin-top: .75rem; padding-left: 1.2rem; }
.related a { color: var(--accent-text); }

@media (max-width: 860px) {
  .calc { grid-template-columns: 1fr; }
  .post-list a { grid-template-columns: 1fr; }
}
