/* ==========================================================================
   Diagnosa Bisnis TikTok — Bootstrap 5 × Cohere Design System bridge
   --------------------------------------------------------------------------
   Layer order
   1. Bootstrap variable overrides (make Bootstrap speak Cohere)
   2. Fluid type scale (phone → tablet → desktop, no hard jumps)
   3. Layout primitives
   4. Components
   5. Breakpoint refinements
   ========================================================================== */

/* ==========================================================================
   1. BOOTSTRAP VARIABLE OVERRIDES
   ========================================================================== */

:root {
  --bs-body-font-family: var(--cohere-font-body);
  --bs-body-color: var(--cohere-ink);
  --bs-body-bg: var(--cohere-canvas);
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.5;
  --bs-border-color: var(--cohere-border-light);
  --bs-link-color: var(--cohere-ink);
  --bs-link-hover-color: var(--cohere-black);
  --bs-emphasis-color: var(--cohere-ink);
  --bs-secondary-color: var(--cohere-body-muted);
  --bs-focus-ring-color: rgba(76, 110, 230, 0.25);
  --bs-border-radius: var(--cohere-radius-xs);

  /* project-level fluid rhythm */
  --sec-pad: clamp(48px, 6.5vw, 80px);
  --sec-pad-tight: clamp(32px, 4vw, 48px);
  --band-pad: clamp(24px, 4.5vw, 80px);
  --nav-h: 64px;
}

/* Cohere is flat: kill Bootstrap shadows globally */
.btn:focus, .btn:active, .form-control:focus, .accordion-button:focus,
.accordion-button:not(.collapsed), .navbar-toggler:focus {
  box-shadow: none !important;
}

/* Containers follow Cohere's 1280px ceiling.
   The gutter is kept >= the largest row gutter used on the page
   (g-4 = 24px below lg, g-lg-5 = 48px at lg+) so negative row margins
   never push past the viewport and create horizontal scroll. */
.container, .container-fluid, .container-lg, .container-md, .container-sm, .container-xl {
  --bs-gutter-x: 1.5rem;
  max-width: 1280px;
}
@media (min-width: 576px) { .container { --bs-gutter-x: 2rem; } }
@media (min-width: 992px) { .container { --bs-gutter-x: 3rem; } }
@media (min-width: 1400px) { .container { max-width: 1280px; } }

/* ==========================================================================
   2. FLUID TYPE SCALE
   Overrides the fixed px scale from cohere-tokens.css so every size
   interpolates smoothly between 360px phones and 1440px+ desktops.
   ========================================================================== */

.cohere-hero-display    { font-size: clamp(2.25rem, 6.4vw, 6rem);      letter-spacing: -0.02em; }
.cohere-product-display { font-size: clamp(2rem, 5vw, 4.5rem);         letter-spacing: -0.02em; }
.cohere-section-display { font-size: clamp(1.875rem, 4.4vw, 3.75rem);  letter-spacing: -0.02em; }
.cohere-section-heading { font-size: clamp(1.625rem, 3.4vw, 3rem);     letter-spacing: -0.01em; line-height: 1.15; }
.cohere-card-heading    { font-size: clamp(1.5rem, 2.6vw, 2rem);       letter-spacing: -0.01em; }
.cohere-feature-heading { font-size: clamp(1.125rem, 1.5vw, 1.5rem); }
.cohere-body-large      { font-size: clamp(1rem, 1.15vw, 1.125rem);    line-height: 1.5; }
.cohere-body            { font-size: clamp(0.9375rem, 1vw, 1rem); }
.cohere-caption         { font-size: 0.875rem; }
.cohere-micro           { font-size: 0.75rem; }
.cohere-mono-label      { font-size: clamp(0.75rem, 0.95vw, 0.875rem); }

/* Balanced ragging on large display copy */
.cohere-hero-display, .cohere-section-heading, .cohere-card-heading {
  text-wrap: balance;
}
p { text-wrap: pretty; }

html { scroll-behavior: smooth; }
body.cohere { overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Anchor targets clear the sticky nav */
section[id], div[id="beranda"] { scroll-margin-top: calc(var(--nav-h) + 16px); }

/* ==========================================================================
   3. LAYOUT PRIMITIVES
   ========================================================================== */

.section { padding: var(--sec-pad) 0; }
.section--tight { padding: var(--sec-pad-tight) 0; }
.section--hero { padding-top: clamp(32px, 4.5vw, 64px); padding-bottom: var(--sec-pad); }
.section--stone-top { border-top: 1px solid var(--cohere-hairline); }

.section__head { max-width: 780px; margin-bottom: clamp(28px, 3.5vw, 48px); }
.section__head .cohere-mono-label { color: var(--cohere-slate); margin-bottom: 12px; }
.section__head .cohere-section-heading { margin-bottom: 16px; }
.section__lead { color: var(--cohere-body-muted); }
.section__head.row { max-width: none; }

.section__cta { margin-top: clamp(28px, 3.5vw, 48px); }
.section__cta--left { text-align: left; }
.section__cta-note { color: var(--cohere-slate); }

/* ==========================================================================
   4. COMPONENTS
   ========================================================================== */

/* ---------- Announcement bar ---------- */
.cohere-announcement-bar.bar {
  height: auto;
  min-height: 36px;
  padding: 8px 0;
  display: block;
}
.bar__text { color: var(--cohere-on-dark); padding-right: 28px; }
.bar__text a { color: var(--cohere-on-dark); text-decoration: underline; text-underline-offset: 2px; }
.bar__close {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: var(--cohere-on-dark);
  font-size: 12px;
  line-height: 1;
  padding: 6px 8px;
  cursor: pointer;
  opacity: 0.75;
}
.bar__close:hover { opacity: 1; }
.bar.is-hidden { display: none !important; }

/* ---------- Nav ----------
   NOTE: the header uses `.site-nav`, never `.nav` — Bootstrap owns `.nav`
   as a flex list component and it would collapse the navbar. */
.site-nav {
  background: var(--cohere-canvas);
  border-bottom: 1px solid var(--cohere-hairline);
}
.site-nav .navbar { min-height: var(--nav-h); }
.nav__logo { text-decoration: none; color: var(--cohere-ink); }
.nav__logo-img { width: clamp(48px, 7vw, 76px); height: auto; display: block; }
.nav__wordmark {
  border-left: 1px solid var(--cohere-black);
  padding-left: clamp(8px, 1.2vw, 12px);
  line-height: 1.15;
}
.nav__kicker { color: var(--cohere-slate); text-transform: uppercase; letter-spacing: 0.06em; }
.nav__name {
  font-family: var(--cohere-font-display);
  font-size: clamp(0.9375rem, 1.5vw, 1.125rem);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav__links { gap: clamp(4px, 1.6vw, 28px); }
.nav__links .nav-link {
  color: var(--cohere-ink);
  padding: 8px 0;
  position: relative;
}
.nav__links .nav-link:hover { color: var(--cohere-black); }
.nav__links .nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: var(--cohere-black);
}
.nav__link-cta { text-decoration: underline; text-underline-offset: 3px; }

.nav__cta { align-items: center; white-space: nowrap; }
.nav__cta, .nav__cta span { color: var(--cohere-on-primary) !important; }

.nav__toggle {
  border: 1px solid var(--cohere-hairline);
  border-radius: var(--cohere-radius-lg);
  width: 44px; height: 44px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  background: transparent;
}
.nav__toggle-bar {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--cohere-ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:first-child { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar:last-child { transform: translateY(-4px) rotate(-45deg); }

/* Mobile menu panel */
@media (max-width: 991.98px) {
  #navMobile { border-top: 1px solid var(--cohere-hairline); margin-top: 0; }
  #navMobile .navbar-nav { padding: 12px 0 20px; gap: 2px; }
  #navMobile .nav-link { padding: 12px 0; font-size: 1rem; border-bottom: 1px solid var(--cohere-card-border); }
  #navMobile .nav-item:last-child .nav-link { border-bottom: 0; }
}

/* ---------- Hero ---------- */
.hero__head {  margin-bottom: clamp(28px, 4vw, 56px); }
.hero__eyebrow { color: var(--cohere-slate); margin-bottom: 16px; }
.hero__title { margin-bottom: clamp(16px, 2vw, 24px); }
.hero__lead { color: var(--cohere-body-muted); max-width: 700px; margin-bottom: clamp(20px, 2.4vw, 32px); }

.hero__cta .cohere-button-primary { text-align: center; }
.hero__cta .cohere-button-secondary { text-align: center; }

.hero__chips {
  display: flex;
  gap: 8px;
  margin: clamp(20px, 2.4vw, 28px) 0 0;
  padding: 0 0 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.hero__chips::-webkit-scrollbar { display: none; }
.hero__chips > li { flex: 0 0 auto; }
.hero__chips a { text-decoration: none; white-space: nowrap; }
.hero__chips a:hover { background: var(--cohere-soft-stone); }
@media (min-width: 768px) { .hero__chips { flex-wrap: wrap; overflow: visible; } }

/* Stone frame around the console */
.media-frame {
  background: var(--cohere-soft-stone);
  padding: clamp(16px, 2.2vw, 28px);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.6vw, 20px);
}
.media-frame__top .cohere-mono-label { color: var(--cohere-primary); }
.media-frame__meta { color: var(--cohere-slate); }

.console { flex: 1; display: flex; flex-direction: column; }
.console__head { padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.console__label { color: var(--cohere-on-dark); }
.console__chip {
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--cohere-radius-full);
  padding: 3px 10px;
  color: var(--cohere-on-dark);
  white-space: nowrap;
}
.console__list { margin: 0; padding: 4px 0 0; flex: 1; }
.console__row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: clamp(12px, 1.5vw, 16px) 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.console__row:last-child { border-bottom: 0; }
.console__icon { color: rgba(255,255,255,0.7); display: block; }
.console__icon svg { width: 22px; height: 22px; display: block; }
.console__text { color: var(--cohere-on-dark); }
.console__state {
  border-radius: var(--cohere-radius-full);
  padding: 3px 10px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.console__state[data-state="ok"]    { color: #a7e8c0; border-color: rgba(167,232,192,0.4); }
.console__state[data-state="risk"]  { color: var(--cohere-coral-soft); border-color: rgba(255,173,155,0.45); }
.console__state[data-state="watch"] { color: #ffd9a0; border-color: rgba(255,217,160,0.42); }
.console__foot { color: var(--cohere-muted); margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.1); }

/* Signal card */
.hero__signal {
  background: var(--cohere-pale-green);
  border-radius: var(--cohere-radius-lg);
  padding: clamp(20px, 2.6vw, 32px);
  display: flex;
  flex-direction: column;
}
.hero__signal-label { color: var(--cohere-primary); margin-bottom: 20px; }
.signal-list { margin: 0; padding: 0; flex: 1; }
.signal-list__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,60,51,0.14);
}
.signal-list__row:last-child { border-bottom: 0; }
.signal-list__num {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border: 1px solid var(--cohere-primary);
  border-radius: var(--cohere-radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}
.signal-note {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(0,60,51,0.2);
}
.signal-note__tag { color: var(--cohere-deep-green); margin-bottom: 6px; }
.signal-note__body { color: var(--cohere-body-muted); }

/* ---------- Trust strip ---------- */
.trust__caption { color: var(--cohere-slate); margin-bottom: clamp(16px, 2vw, 24px); }
.cohere-trust-logo-strip.trust { gap: clamp(24px, 5vw, 64px); }
.trust__item { display: inline-flex; align-items: center; }
.trust__logo { height: clamp(24px, 3.4vw, 36px); width: auto; max-width: 160px; object-fit: contain; }
.trust__text { color: var(--cohere-slate); }

/* ---------- Capability cards ---------- */
.capability-grid { margin-bottom: clamp(28px, 3.5vw, 48px); }
.capability {
  padding: clamp(20px, 2.2vw, 24px) clamp(0px, 1.6vw, 24px) clamp(20px, 2.2vw, 24px) 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.capability__icon { color: var(--cohere-primary); }
.capability__icon svg { width: 32px; height: 32px; display: block; }
.capability__body { color: var(--cohere-body-muted); }

@media (min-width: 768px) {
  .capability-grid .capability { border-left: 1px solid var(--cohere-hairline); padding-left: clamp(16px, 2vw, 24px); }
  .capability-grid .col:nth-child(odd) .capability { border-left: 0; padding-left: 0; }
}
@media (min-width: 1200px) {
  .capability-grid .col:nth-child(odd) .capability { border-left: 1px solid var(--cohere-hairline); padding-left: clamp(16px, 2vw, 24px); }
  .capability-grid .col:nth-child(4n+1) .capability { border-left: 0; padding-left: 0; }
}

/* ---------- Rule list ---------- */
.rule-list { margin: 0; }
.rule-list__item {
  border-top: 1px solid var(--cohere-hairline);
  padding: 20px 16px 20px 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.rule-list__idx { color: var(--cohere-muted); flex: 0 0 auto; }

/* ---------- Tier / product cards ---------- */
.tier { display: flex; flex-direction: column; padding: clamp(20px, 2.8vw, 32px); }
.tier__tag { color: var(--cohere-deep-green); margin-bottom: 16px; }
.tier__cap { color: var(--cohere-body-muted); margin-bottom: 4px; }
.tier__amount { margin-bottom: 20px; }
.tier .cohere-button-pill-outline { align-self: flex-start; }
.tier__rule { margin: 24px 0; border-top-color: rgba(33,33,33,0.16); }
.tier__list { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tier__list li { display: flex; align-items: flex-start; gap: 10px; }
.tier__check { flex: 0 0 auto; color: var(--cohere-deep-green); margin-top: 1px; }
.tier__check svg { width: 20px; height: 20px; display: block; }
.tier--featured { background: var(--cohere-pale-green); }

/* ---------- Dark feature band ---------- */
.band { padding: var(--band-pad); }
.band__label { color: var(--cohere-coral-soft); margin-bottom: 16px; }
.band__title { color: var(--cohere-on-dark); margin-bottom: 16px; }
.band__lead { color: rgba(255,255,255,0.78); margin-bottom: clamp(20px, 2.4vw, 28px); }
.band__cta .cohere-button-primary { display: inline-block; }
.band__card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--cohere-radius-sm);
  padding: clamp(16px, 2vw, 24px);
}
.band__card .cohere-mono-label { color: var(--cohere-on-dark); }
.band__card-body { color: rgba(255,255,255,0.72); }
.band__secondary { color: var(--cohere-on-dark) !important; text-decoration-color: rgba(255,255,255,0.5); }

/* ---------- FAQ accordion ---------- */
.faq__container { max-width: 1080px; }
.faq__aside { color: var(--cohere-body-muted); }

.accordion.faq {
  --bs-accordion-bg: transparent;
  --bs-accordion-border-width: 0;
  --bs-accordion-border-radius: 0;
  --bs-accordion-inner-border-radius: 0;
  --bs-accordion-btn-padding-x: 0;
  --bs-accordion-btn-padding-y: clamp(16px, 2vw, 24px);
  --bs-accordion-btn-color: var(--cohere-ink);
  --bs-accordion-btn-bg: transparent;
  --bs-accordion-active-bg: transparent;
  --bs-accordion-active-color: var(--cohere-black);
  --bs-accordion-body-padding-x: 0;
  --bs-accordion-body-padding-y: 0;
  --bs-accordion-btn-icon-width: 16px;
  --bs-accordion-btn-icon-transform: none;
  --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23212121' stroke-width='1.25' stroke-linecap='round'%3e%3cpath d='M8 2.5v11M2.5 8h11'/%3e%3c/svg%3e");
  --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23212121' stroke-width='1.25' stroke-linecap='round'%3e%3cpath d='M2.5 8h11'/%3e%3c/svg%3e");
}
.faq__item { border-top: 1px solid var(--cohere-hairline) !important; }
.faq__item:last-child { border-bottom: 1px solid var(--cohere-hairline) !important; }
.accordion.faq .accordion-button {
  font-family: var(--cohere-font-body);
  font-weight: 400;
  text-align: left;
  gap: 16px;
  align-items: flex-start;
}
.accordion.faq .accordion-button::after { margin-top: 4px; }
.faq__ans { color: var(--cohere-body-muted); padding-bottom: clamp(16px, 2vw, 24px); max-width: 860px; }
.faq__flow {
  color: var(--cohere-deep-green);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--cohere-hairline);
  overflow-wrap: anywhere;
}

/* ---------- Lead form ---------- */
.form { padding: clamp(20px, 2.8vw, 32px); }
.field .form-label { color: var(--cohere-body-muted); display: block; margin-bottom: 6px; }
.field__req { color: var(--cohere-error); }
.form-control {
  border-radius: var(--cohere-radius-xs);
  border-color: var(--cohere-border-light);
  font-size: 1rem; /* 16px: prevents iOS input zoom */
}
.form-control:focus { border-color: var(--cohere-form-focus); }
.form-control::placeholder { color: var(--cohere-muted); }
.form textarea { resize: vertical; min-height: 76px; }
.form__actions { margin-top: 24px; }
/* The form card is a WHITE surface sitting inside a dark band, so the
   `.cohere-on-dark-surface` pill inversion must be undone here. */
.cohere-on-dark-surface .cohere-contact-form-card .cohere-button-primary,
.cohere-on-dark-surface .form .cohere-button-primary {
  background: var(--cohere-primary);
  color: var(--cohere-on-primary);
}
.form__actions .cohere-button-primary { flex: 0 0 auto; white-space: nowrap; }
.form__legal { color: var(--cohere-muted); }
.form__warn {
  color: var(--cohere-error);
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(179,0,0,0.3);
  border-radius: var(--cohere-radius-xs);
  background: rgba(179,0,0,0.04);
}
.form__done {
  color: var(--cohere-deep-green);
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(0,60,51,0.25);
  border-radius: var(--cohere-radius-xs);
  background: var(--cohere-pale-green);
}
.form__wa { display: inline-block; margin-top: 8px; }
.is-invalid-cohere { border-color: var(--cohere-error) !important; }

/* ---------- Footer ---------- */
.footer { padding: var(--sec-pad) 0; }
.footer__label { margin-bottom: 12px; }
.footer__headline { color: var(--cohere-on-dark); margin-bottom: 20px; max-width: 24ch; }
.footer__wa { color: var(--cohere-on-dark) !important; text-decoration: underline; text-underline-offset: 3px; }
.footer__cols { margin: 0; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col-title { color: var(--cohere-on-dark); margin-bottom: 4px; }
.footer__col a:hover { color: var(--cohere-on-dark); }
.footer__static { color: var(--cohere-muted); }
.footer__rule { border: 0; border-top: 1px solid rgba(255,255,255,0.16); margin: clamp(28px, 3.5vw, 48px) 0 clamp(20px, 2.4vw, 28px); }
.footer__logos { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); flex-wrap: wrap; }
.footer__logo { height: clamp(22px, 3vw, 30px); width: auto; max-width: 150px; object-fit: contain; filter: grayscale(1) brightness(0) invert(1); opacity: 0.85; }
.footer__legal { color: var(--cohere-muted); max-width: 60ch; }

/* ---------- Mobile sticky CTA ---------- */
.mobile-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1030;
  display: flex;
  gap: 8px;
  padding: 10px clamp(1rem, 4vw, 1.5rem);
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--cohere-hairline);
  transform: translateY(120%);
  transition: transform 0.25s ease;
}
.mobile-cta.is-visible { transform: translateY(0); }
.mobile-cta .cohere-button-primary { flex: 1 1 auto; text-align: center; }
.mobile-cta__ghost {
  flex: 1 1 auto;
  background: transparent;
  border: 1px solid var(--cohere-primary);
  border-radius: var(--cohere-radius-pill);
  color: var(--cohere-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 16px;
  cursor: pointer;
}
@media (max-width: 991.98px) { body.cohere { padding-bottom: 72px; } }

/* ---------- ROI drawer (offcanvas) ---------- */
.drawer {
  --bs-offcanvas-width: 100%;
  --bs-offcanvas-padding-x: clamp(1rem, 4vw, 2rem);
  --bs-offcanvas-padding-y: clamp(1rem, 2.4vw, 1.5rem);
  --bs-offcanvas-border-width: 0;
  --bs-offcanvas-bg: var(--cohere-canvas);
}
@media (min-width: 576px) { .drawer { --bs-offcanvas-width: 480px; } }
@media (min-width: 992px) { .drawer { --bs-offcanvas-width: 560px; } }

.drawer__head {
  align-items: flex-start;
  border-bottom: 1px solid var(--cohere-hairline);
  gap: 16px;
}
.drawer__sub { color: var(--cohere-body-muted); max-width: 44ch; }
.drawer__close {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  border: 1px solid var(--cohere-hairline);
  border-radius: var(--cohere-radius-full);
  background: transparent;
  color: var(--cohere-ink);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.drawer__close:hover { background: var(--cohere-soft-stone); }
.drawer__body { padding-bottom: clamp(2rem, 6vw, 3rem); }

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: clamp(16px, 2vw, 20px) 0 clamp(16px, 2vw, 24px);
  border: 0;
}
.tabs .nav-item { display: flex; }
.tab { white-space: nowrap; }
.tab.active { background: var(--cohere-primary); color: var(--cohere-on-primary); }

.drawer .group { color: var(--cohere-slate); margin: clamp(20px, 2.6vw, 28px) 0 12px; padding-top: 16px; border-top: 1px solid var(--cohere-hairline); }
.drawer .tab-pane > .row:first-of-type + .group,
.drawer .group:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.drawer .group__note { color: var(--cohere-body-muted); margin: -4px 0 12px; }
.drawer .field .form-label { margin-bottom: 4px; }
/* Labels + hints wrap to different heights in a 2-up row, so pin the
   inputs to the bottom of each cell to keep them on one baseline. */
.drawer .field { display: flex; flex-direction: column; }
.drawer .field .form-control { margin-top: auto; }
.drawer .hint { color: var(--cohere-muted); display: block; margin-bottom: 6px; }
.drawer .form-control { padding: 10px 12px; }

.helper-total {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--cohere-soft-stone);
  border-radius: var(--cohere-radius-sm);
  color: var(--cohere-body-muted);
}

/* Result block */
.result {
  margin-top: clamp(24px, 3vw, 32px);
  padding-top: clamp(20px, 2.6vw, 28px);
  border-top: 1px solid var(--cohere-primary);
}
.result__title { color: var(--cohere-primary); margin-bottom: 12px; }
.result__table { font-size: 1rem; }
.result__table > tbody > tr > th,
.result__table > tbody > tr > td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--cohere-hairline);
  font-weight: 400;
  background: transparent;
  color: var(--cohere-ink);
  vertical-align: middle;
}
.result__table > tbody > tr > th { text-align: left; color: var(--cohere-body-muted); }
.result__table > tbody > tr > td {
  text-align: right;
  font-family: var(--cohere-font-display);
  white-space: nowrap;
  color: var(--cohere-ink);
}
.result__hint { display: block; color: var(--cohere-muted); }
.result__row--key > td { color: var(--cohere-error) !important; }
.result__row--target > td { color: var(--cohere-deep-green) !important; }
.result__row--key > th, .result__row--target > th { color: var(--cohere-ink); }
/* Beat `.cohere-research-table td:last-child`, which greys out the last cell. */
.result .result__table > tbody > tr > td { color: var(--cohere-ink); }

.note {
  margin-top: 16px;
  color: var(--cohere-body-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}
.note:empty { display: none; }
.note ul { margin: 0; padding-left: 18px; }
.note li + li { margin-top: 6px; }
.note--warn {
  padding: 12px 14px;
  border: 1px solid rgba(179,0,0,0.28);
  background: rgba(179,0,0,0.04);
  border-radius: var(--cohere-radius-sm);
  color: var(--cohere-error);
}
.note--ok {
  padding: 12px 14px;
  border: 1px solid rgba(0,60,51,0.2);
  background: var(--cohere-pale-green);
  border-radius: var(--cohere-radius-sm);
  color: var(--cohere-deep-green);
}

.result__gmv { margin-top: 20px; }
.result__gmv-card {
  background: var(--cohere-soft-stone);
  border-radius: var(--cohere-radius-sm);
  padding: 16px;
}
.result__gmv-card .cohere-mono-label { color: var(--cohere-slate); }
.result__gmv-card .cohere-feature-heading { font-family: var(--cohere-font-display); overflow-wrap: anywhere; }
.result__actions { margin-top: 24px; }
.result__actions .cohere-button-primary { width: 100%; text-align: center; }

/* ---------- Sample report modal ---------- */
.sample { --bs-modal-border-radius: var(--cohere-radius-lg); --bs-modal-border-width: 0; }
.sample__content { border-radius: var(--cohere-radius-lg); border: 1px solid var(--cohere-hairline); }
.sample__head {
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid var(--cohere-hairline);
  padding: clamp(1rem, 2.4vw, 1.5rem) clamp(1rem, 3vw, 2rem);
}
.sample__sub { color: var(--cohere-body-muted); }
.sample__body { padding: clamp(1rem, 3vw, 2rem); }
.sample__disclaimer {
  color: var(--cohere-body-muted);
  background: var(--cohere-soft-stone);
  border-radius: var(--cohere-radius-sm);
  padding: 12px 14px;
  margin-bottom: 24px;
}
.sample__list { margin: 0; padding: 0; }
.sample__item { padding: clamp(16px, 2vw, 20px) 0; border-top: 1px solid var(--cohere-hairline); }
.sample__item:first-child { border-top: 0; padding-top: 0; }
.sample__idx { color: var(--cohere-slate); display: block; margin-bottom: 8px; }
.sample__title { margin-bottom: 8px; }
.sample__body-text { color: var(--cohere-body-muted); }
.sample__metrics { margin-top: 16px; }
.sample__metric {
  border: 1px solid var(--cohere-hairline);
  border-radius: var(--cohere-radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
}
.sample__metric .cohere-micro { color: var(--cohere-slate); }
.sample__metric .cohere-feature-heading { color: var(--cohere-muted); font-family: var(--cohere-font-display); }
.sample__flags { margin: 16px 0 0; display: flex; flex-direction: column; gap: 10px; }
.sample__flags li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sample__flags .console__state[data-state="ok"]    { color: var(--cohere-deep-green); border-color: rgba(0,60,51,0.3); }
.sample__flags .console__state[data-state="risk"]  { color: #b5502f; border-color: rgba(181,80,47,0.35); }
.sample__flags .console__state[data-state="watch"] { color: #8a5a00; border-color: rgba(138,90,0,0.3); }
.sample__foot {
  border-top: 1px solid var(--cohere-hairline);
  padding: clamp(1rem, 2.4vw, 1.5rem) clamp(1rem, 3vw, 2rem);
  gap: 12px;
  justify-content: flex-start;
}

/* ==========================================================================
   5. BREAKPOINT REFINEMENTS
   ========================================================================== */

/* --- Phone (< 576px) --- */
@media (max-width: 575.98px) {
  .hero__cta > * { width: 100%; }
  .cohere-button-primary { padding: 13px 20px; }
  .media-frame { border-radius: var(--cohere-radius-md); }
  .console__row { grid-template-columns: 22px minmax(0, 1fr); row-gap: 6px; }
  .console__state { grid-column: 2; justify-self: start; }
  .console__icon svg { width: 20px; height: 20px; }
  .band { border-radius: var(--cohere-radius-md); }
  .tier__amount { margin-bottom: 16px; }
  .footer__bottom { align-items: flex-start; }
  .sample__foot { flex-direction: column; align-items: stretch; }
  .sample__foot > * { width: 100%; text-align: center; }
  .result__table > tbody > tr > th,
  .result__table > tbody > tr > td { padding: 10px 4px; }
}

/* --- Tablet portrait (iPad 768–991px) --- */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero__head { max-width: 100%; }
  .hero__signal { border-radius: var(--cohere-radius-lg); }
  .band__cards .band__card { height: 100%; }
  .nav__cta { padding: 10px 18px; }
}

/* --- Tablet landscape / small laptop --- */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .nav__links { gap: 16px; }
  .band { padding: clamp(32px, 4.5vw, 56px); }
}

/* --- Desktop --- */
@media (min-width: 1200px) {
  .hero__lead { font-size: 1.125rem; }
}

/* --- Landscape phones: keep the sticky CTA out of the way --- */
@media (max-height: 480px) and (orientation: landscape) {
  .mobile-cta { display: none !important; }
  body.cohere { padding-bottom: 0; }
}

/* --- Touch targets --- */
@media (hover: none) {
  .cohere-button-pill-outline, .nav__links .nav-link { min-height: 40px; display: inline-flex; align-items: center; }
  .hero__chips a { min-height: 40px; }
}

/* --- Print --- */
@media print {
  .bar, .site-nav, .mobile-cta, .offcanvas, .modal, .band__cta, .section__cta { display: none !important; }
  body.cohere { padding-bottom: 0; }
  .band { background: #fff !important; color: #000 !important; border: 1px solid #ccc; }
  .band__title, .band__lead, .band__card-body { color: #000 !important; }
}
