/* =====================================================================
   ARPRIC.com — additions on top of arpricgroup.css
   arpricgroup.css (the shared ARPRIC design system) is loaded first and
   left unchanged, so it can be replaced with a newer copy from arpricgroup.com.
   This file only styles things that exist on ARPRIC.com alone:
   knowledge articles, labelled note boxes, table of contents, placeholders…
   It uses the same tokens (--lime, --olive, --paper, --surface …).
   ===================================================================== */

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.coming-soon { color: var(--muted); font-style: italic; }
.paper .coming-soon { color: var(--paper-muted); }

/* Draft preview bar (admins only) */
.draft-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: #FFD479; color: #000; text-align: center; padding: 8px 16px; font-size: 14px; }
.draft-banner a { color: #000; text-decoration: underline; }

/* Section head: link / rail arrows stacked on the right */
.section-head__aside { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.section-head--split .section-head__aside { justify-self: end; align-items: flex-end; text-align: right; }
@media (max-width: 900px) { .section-head--split .section-head__aside { justify-self: start; align-items: flex-start; text-align: left; } }
.rail-head .link-arrow { margin-right: 8px; }

/* Products mega menu: a long category (e.g. 15 spice powders) shows in two columns */
.dropdown--mega:has(.mega-col--2) { width: min(860px, calc(100vw - 48px)); grid-template-columns: 1fr 2fr; left: 0; transform: translate(-140px, 6px); }
.has-dropdown:hover .dropdown--mega:has(.mega-col--2), .has-dropdown:focus-within .dropdown--mega:has(.mega-col--2) { transform: translate(-140px, 0); }
.mega-col--2 { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; align-content: start; }
.mega-col--2 > h4 { grid-column: 1 / -1; }

/* Placeholder image (no photo yet) — used in cards and product hero */
.media-ph { width: 100%; height: 100%; min-height: 160px; display: grid; place-items: center;
  background: radial-gradient(120% 90% at 20% 10%, rgba(31, 92, 53, .12), transparent 60%), linear-gradient(135deg, var(--surface-2), var(--ink)); }
.media-ph span { font: 400 64px/1 var(--f-head); color: rgba(19, 41, 75, .25); }
.media-ph-lg { aspect-ratio: 1; }
.media-ph-lg span { font-size: 140px; }
.paper .media-ph { background: radial-gradient(120% 90% at 20% 10%, rgba(31, 92, 53, .10), transparent 60%), linear-gradient(135deg, var(--paper-2), var(--paper)); }
.paper .media-ph span { color: rgba(20, 22, 18, .3); }
.product-hero__img .media-ph { position: absolute; inset: 0; }
.post-card__img .media-ph { height: 100%; }

/* Chips row inside page heroes / home */
.hero-chips { margin-top: 28px; }
.home-chips { margin-top: 26px; }
a.chip { text-decoration: none; transition: border-color .2s, color .2s; }
a.chip:hover { border-color: var(--lime); color: var(--lime); }
.paper a.chip:hover { border-color: var(--paper-ink); color: var(--paper-ink); }

/* Suggestions on product pages (related guides / products): max 3, one row, equal cards */
.suggest-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; align-items: stretch; }
.suggest-grid > .pcard { height: 100%; }
.suggest-grid .pcard__body h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.suggest-grid .pcard__body p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 760px) { .suggest-grid { grid-template-columns: 1fr !important; } }

/* Empty state / pager */
.empty { border: 1px dashed var(--line-strong); border-radius: var(--r-lg); padding: 44px 24px; text-align: center; color: var(--muted); }
.empty p { margin: 0; }
.paper .empty { border-color: var(--paper-line); color: var(--paper-muted); }
.pager { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 44px; font-size: 15px; color: var(--muted); }

/* Report card dates (inside hub-card) */
.report-dates { display: flex; gap: 28px; margin: 4px 0; font-size: 14px; }
.report-dates dt { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; }
.report-dates dd { margin: 4px 0 0; color: var(--text); }

/* Contact form extras */
.b2b-note { margin: 12px 0 0; padding: 12px 14px; border-radius: var(--r-sm); background: var(--olive-soft); border: 1px solid var(--line); font-size: 14.5px; color: var(--text); }
.b2b-note a { color: var(--lime); }
.field-error { color: #B3261E; font-size: 13.5px; margin: 6px 0 0; }
[aria-invalid="true"] { border-color: #B3261E !important; }
.alert a { color: inherit; text-decoration: underline; }

/* Inside the white arpricgroup-style form card */
.form--message .field-error { color: #C62828; font-size: 13px; margin-top: 6px; }
.form--message [aria-invalid="true"] { border-color: transparent !important; border-bottom-color: #E53935 !important; box-shadow: 0 1px 0 #E53935; }
.form--message .b2b-note { margin: 0; background: var(--olive-soft); border: 1px solid rgba(31, 92, 53, .18); color: var(--text); border-radius: 8px; }
.form--message .b2b-note a { color: var(--lime); font-weight: 500; text-decoration: underline; }
.form--message .alert a { color: inherit; }

/* Sitemap */
.sitemap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 40px; }
.sitemap-grid h2 { margin-bottom: 16px; }

/* ---------- Articles (knowledge, insights, reports) ---------- */
.article-head .lead { margin-top: 22px; }
.article-facts { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 30px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.article-facts dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.article-facts dd { margin: 4px 0 0; color: var(--text); font-size: 15px; }
.post-cover { margin: 0 auto 48px; max-width: 1100px; }
.post-cover img { width: 100%; border-radius: var(--r-lg); max-height: min(540px, 62vh); object-fit: cover; }
.post-layout { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: 64px; justify-content: center; }
.post-layout--single { grid-template-columns: minmax(0, 760px); }
.toc { position: sticky; top: 110px; align-self: start; max-height: calc(100vh - 140px); overflow-y: auto; font-size: 14.5px; }
.toc summary { list-style: none; cursor: pointer; margin-bottom: 14px; font: 500 12px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--sage); }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 1px solid transparent; color: var(--text); line-height: 1.4; }
.toc li a:hover, .toc li a.active { color: var(--lime); border-left-color: var(--lime); }
.toc .toc-l3 a { padding-left: 30px; font-size: 13.5px; }
@media (max-width: 1020px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; background: var(--ink); }
  .toc details[open] summary { margin-bottom: 12px; }
}

/* Rich text written in the admin editor */
.prose { color: var(--text); font-size: 18px; line-height: 1.8; }
.prose > * + * { margin-top: 1.1em; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0; }
.prose h2 { font-size: clamp(26px, 2.6vw, 32px); margin: 2em 0 .6em; color: var(--white); }
.prose h3 { font-size: 22px; margin: 1.6em 0 .5em; color: var(--white); }
.prose h4 { font-size: 18px; margin: 1.4em 0 .4em; color: var(--white); }
.prose a { color: var(--lime); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.prose strong { color: var(--white); font-weight: 500; }
.prose ul { list-style: none; padding: 0; margin: 0; }
.prose ul li { position: relative; padding-left: 26px; margin: .4em 0; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 8px; height: 8px; background: var(--lime); transform: rotate(45deg); }
.prose ol { padding-left: 1.3em; margin: 0; }
.prose ol li { margin: .4em 0; }
.prose ol li::marker { color: var(--sage); }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--lime); color: var(--text); font: 300 22px/1.5 var(--f-head); }
.prose img { border-radius: var(--r-md); }
.prose figure { margin: 1.8em 0; }
.prose figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.prose figure:has(video) figcaption { text-align: center; }
.prose video { display: block; width: 100%; max-width: 380px; max-height: 75vh; margin: 0 auto; border-radius: var(--r-md); background: var(--ink); border: 1px solid var(--line); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 11px 14px; text-align: left; vertical-align: top; }
.prose th { background: var(--surface); color: var(--white); font-weight: 500; }
.prose .lead { font-size: 1.12em; color: var(--text); }
.page-prose h2:first-child { margin-top: 0; }

/* prose on light "paper" sections (product tabs) */
.paper .prose, .paper .prose p { color: var(--paper-text); }
.paper .prose h2, .paper .prose h3, .paper .prose h4, .paper .prose strong { color: var(--paper-ink); }
.paper .prose a { color: var(--paper-ink); text-decoration-color: rgba(20, 22, 18, .35); }
.paper .prose ul li::before { background: var(--olive); }
.paper .prose th { background: var(--paper-2); color: var(--paper-ink); }
.paper .prose th, .paper .prose td { border-color: var(--paper-line); }
.paper .prose td { color: var(--paper-text); }
.tabpanel .prose { font-size: 16.5px; }

/* Labelled boxes: Fact / Data / ARPRIC Observation / ARPRIC Analysis / Key takeaway */
.prose .note { position: relative; margin-top: 1.2em; padding: 20px 22px; border-radius: var(--r-md); background: var(--ink); border: 1px solid var(--line); border-left-width: 3px; font-size: 17px; color: var(--text); }
.prose .note::before { display: block; font: 500 11px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; }
.prose .note > :first-child { margin-top: 0; }
.prose .note-fact { border-left-color: var(--lime); }
.prose .note-fact::before { content: "Fact"; color: var(--lime); }
.prose .note-data { border-left-color: var(--text); }
.prose .note-data::before { content: "Data"; color: var(--text); }
.prose .note-observation { border-left-color: var(--olive); background: var(--olive-soft); }
.prose .note-observation::before { content: "ARPRIC Observation"; color: var(--olive); }
.prose .note-analysis { border-left-color: var(--sage); border-style: dashed; border-left-style: solid; }
.prose .note-analysis::before { content: "ARPRIC Analysis — interpretation, not fact"; color: var(--sage); }
.prose .note-key { border-left-color: var(--lime); background: var(--olive-soft); }
.prose .note-key::before { content: "Key takeaway"; color: var(--lime); }
.note-legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 15px; }
.lg { display: inline-block; min-width: 170px; margin-right: 10px; padding: 5px 10px; border-radius: 6px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; border-left: 3px solid; background: var(--ink); }
.lg-fact { border-color: var(--lime); color: var(--lime); }
.lg-data { border-color: var(--text); color: var(--text); }
.lg-observation { border-color: var(--olive); color: var(--olive); background: var(--olive-soft); }
.lg-analysis { border-color: var(--sage); color: var(--sage); }
.paper .lg { background: var(--paper-ink); }
@media (max-width: 560px) { .lg { display: block; margin-bottom: 4px; width: max-content; } }
.legend-box { margin-bottom: 32px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 20px; background: var(--ink); }
.legend-box summary { cursor: pointer; color: var(--text); font-size: 15px; }
.legend-box[open] summary { margin-bottom: 14px; }

.original-insights { margin-top: 48px; padding: 30px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--olive-soft); }
.original-insights h2 { font-size: 26px; margin-bottom: 4px; }
.article-faq { margin-top: 56px; }
.article-faq h2 { font-size: clamp(26px, 2.6vw, 32px); margin-bottom: 20px; }
.sources { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 15px; }
.sources h2 { font-size: 22px; margin-bottom: 12px; }
.sources ol { padding-left: 1.3em; margin: 0; }
.sources li { margin: 6px 0; word-break: break-word; }
.sources a { color: var(--lime); }
.author-box { display: flex; gap: 16px; align-items: center; margin-top: 40px; padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.author-box p { margin: 0; }
.author-name { color: var(--white); font: 400 19px/1.3 var(--f-head); }
.author-avatar { flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--olive); color: var(--lime); font: 400 22px/1 var(--f-head); }

/* Placeholders — visible while "Show placeholder labels" is on (Admin → Site Settings → Launch) */
.ph-badge { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 1px 8px; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: #000; background: #FFD479; border-radius: 999px; }
.prose .placeholder { border: 1px dashed #FFD479; border-radius: var(--r-sm); padding: 14px 18px; }
.prose .placeholder::before { content: "Placeholder — replace before launch"; display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #C99A2E; margin-bottom: 6px; }
.hide-ph .placeholder { display: none; }

@media print {
  .site-header, .site-footer, .mobile-cta, .wa-float, .cta-band, .toc, .mobile-nav { display: none !important; }
  body { background: #fff; color: #000; }
  .prose, .prose p, h1, h2, h3 { color: #000 !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
