/* ============================================================
   LAWKING DESIGN FOUNDATION — Pengacara-ku
   Warm ivory / espresso luxe. Serif editorial (Fraunces + Newsreader).
   One rare cool accent: periwinkle-grey.
   Loaded after styles.css — this file has final say on the theme.
   ============================================================ */

:root {
  /* ---- Surfaces (warm, earthy) ---- */
  --ink: #f9ebd3;            /* dominant canvas — warm ivory            */
  --ink-raised: #efe7d6;     /* raised surface / cards — off-white      */
  --ink-soft: #eae2cf;       /* soft surface — cream                    */
  --tan: #ddcfb6;            /* tan / beige plate                       */
  --greige: #bcb4a2;         /* greige fill / texture                   */
  --sage: #988f7d;           /* deep greige                             */
  --field: #fffdf6;          /* input fields — warm white               */

  /* ---- Ink (foreground) ---- */
  --paper: #28160a;          /* primary text — espresso (near-black)    */
  --paper-muted: #6a5844;    /* muted body text (~5.3:1 on ivory)       */
  --paper-faint: #877461;    /* faint meta text (large only)            */
  --cream-ink: #f6efe0;      /* text on espresso surfaces               */

  /* ---- Espresso emphasis (buttons, active, key numbers) ---- */
  --espresso: #28160a;
  --espresso-2: #3a2414;     /* hover                                   */
  --espresso-3: #1c0f06;

  /* ---- The one cool accent — used rarely ---- */
  --peri: #9f9caa;           /* fills / dots / small badges             */
  --peri-ink: #56535f;       /* accessible cool text for the rare link  */

  /* ---- Hairlines ---- */
  --rule: rgba(40, 22, 10, 0.12);
  --rule-strong: rgba(40, 22, 10, 0.24);

  /* ---- Functional accents ---- */
  --oxblood: #9a4a4a;

  /* ---- Type faces ---- */
  --display-face: "Fraunces", "Newsreader", Georgia, "Times New Roman", serif;
  --body-face: "Newsreader", Georgia, "Times New Roman", serif;
  --meta-face: "Newsreader", Georgia, serif;

  /* ---- Legacy alias tokens (kept so older rules resolve on-theme) ---- */
  --brass: #28160a;
  --brass-light: #3a2414;
  --brass-dark: #1c0f06;
}

/* ============================================================
   SKIP LINK — hidden until keyboard focus (WCAG 2.4.1)
   ============================================================ */
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9999;
  padding: 0.55rem 1rem;
  background: var(--espresso);
  color: var(--cream-ink);
  font-family: var(--body-face);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  transform: translateY(-130%);
  transition: transform 0.15s ease;
}
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--espresso);
  outline-offset: 2px;
}

/* ============================================================
   BASE
   ============================================================ */
html {
  background: var(--ink);
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background: var(--ink) !important;
  color: var(--paper);
  font-family: var(--body-face);
  font-optical-sizing: auto;
  letter-spacing: 0;
  line-height: 1.6;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
  font-family: var(--body-face);
}

/* Faint warm paper tooth — barely there */
body::before {
  position: fixed;
  inset: 0;
  z-index: 250;
  pointer-events: none;
  content: "";
  opacity: 0.04;
  background-image:
    repeating-radial-gradient(circle at 20% 30%, #28160a 0 0.4px, transparent 0.6px 4px),
    repeating-radial-gradient(circle at 75% 65%, #28160a 0 0.3px, transparent 0.5px 5px);
  background-size: 9px 11px, 13px 15px;
  mix-blend-mode: multiply;
}

::selection {
  color: var(--cream-ink);
  background: var(--espresso);
}

.counter { font-variant-numeric: tabular-nums; }

a,
button,
input,
select,
textarea {
  transition: border-color 220ms ease, background-color 220ms ease,
    color 220ms ease, opacity 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--espresso) !important;
  outline-offset: 3px;
  border-radius: 3px;
}

button:active,
a[role="button"]:active {
  transform: translateY(1px) !important;
}

/* Headings — high-contrast serif display */
.font-display,
h1,
h2,
h3,
h4 {
  font-family: var(--display-face) !important;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 120, "SOFT" 0, "WONK" 0;
}

/* ============================================================
   LAWKING PRIMITIVES  (reusable foundation)
   ============================================================ */

/* Frosted-glass card — the signature "expensive" surface */
.lk-glass {
  position: relative;
  border: 1px solid rgba(40, 22, 10, 0.14);
  border-radius: 16px;
  background: rgba(249, 235, 211, 0.6);
  -webkit-backdrop-filter: blur(18px) saturate(118%);
  backdrop-filter: blur(18px) saturate(118%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 30px 60px -34px rgba(40, 22, 10, 0.5),
    0 4px 14px -10px rgba(40, 22, 10, 0.35);
}

/* Bento tile — solid rounded surface */
.lk-tile {
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: var(--ink-raised);
}

/* Framed editorial photograph — a gallery print on the ivory wall */
.lk-figure {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 16px;
  background: var(--espresso-3);
  box-shadow:
    inset 0 0 0 1px rgba(246, 239, 224, 0.06),
    0 30px 60px -36px rgba(40, 22, 10, 0.55);
}

.lk-figure img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Elegant hairline divider */
.lk-rule {
  height: 1px;
  margin: 0;
  border: 0;
  background: var(--rule);
}

/* Eyebrow / label — serif, wide tracking, quiet */
.lk-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--meta-face);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--peri-ink);
}

/* Display scale — Fraunces, tuned for punch */
.lk-display {
  font-family: var(--display-face);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--paper);
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  text-wrap: balance;
}

/* Pills — primary espresso, secondary outline */
.lk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border: 1px solid var(--espresso);
  border-radius: 999px;
  background: var(--espresso);
  color: var(--cream-ink);
  font-family: var(--body-face);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 12px 26px -16px rgba(40, 22, 10, 0.7);
}

.lk-btn:hover {
  background: var(--espresso-2);
  transform: translateY(-1px);
  box-shadow: 0 16px 32px -16px rgba(40, 22, 10, 0.6);
}

.lk-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font-family: var(--body-face);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.lk-btn-outline:hover {
  border-color: var(--espresso);
  background: rgba(40, 22, 10, 0.04);
}

/* ============================================================
   NAV + PROVENANCE
   ============================================================ */
.site-nav {
  background: rgba(249, 235, 211, 0.82) !important;
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  border-color: var(--rule) !important;
  box-shadow: 0 1px 0 var(--rule);
}

/* Refined monochrome scales mark in the nav */
.site-nav a[href="/"] svg rect,
.site-nav a[href="/"] svg circle,
.site-nav a[href="/"] svg path {
  fill: var(--espresso);
  stroke: var(--espresso);
}
.site-nav a[href="/"] svg path[fill="none"] { fill: none; }

.site-nav .font-display {
  color: var(--paper) !important;
  font-weight: 600 !important;
  letter-spacing: -0.015em;
}

.site-nav a:not(.glow-btn) {
  color: var(--paper-muted);
}

.site-nav a:not(.glow-btn):hover {
  color: var(--espresso);
}

.site-nav button:not(.glow-btn) {
  color: var(--paper) !important;
}

#nav-stats { color: var(--paper-faint) !important; }
#nav-stats .bg-green-400 { background: #5c7a4f !important; }

.mobile-menu { border-color: var(--rule) !important; }
.mobile-menu a:not(.glow-btn) { color: var(--paper-muted) !important; }

.provenance-bar {
  background: var(--ink-soft) !important;
  border-color: var(--rule) !important;
  color: var(--paper-muted);
}

.provenance-bar > div {
  justify-content: flex-start;
  color: var(--paper-muted) !important;
  font-family: var(--meta-face);
  letter-spacing: 0.01em;
}

.provenance-bar a {
  color: var(--paper) !important;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 2px;
}
.provenance-bar a:hover { text-decoration-color: var(--espresso); }
.provenance-bar .underline { text-decoration-color: var(--rule-strong); }

/* ============================================================
   HERO — ivory editorial stage
   ============================================================ */
.chambers-hero {
  position: relative;
  background:
    radial-gradient(130% 100% at 92% 4%, rgba(221, 207, 182, 0.85), transparent 58%),
    linear-gradient(180deg, #fbefda 0%, var(--ink) 42%, #f4e6cd 100%) !important;
  background-size: auto !important;
  animation: none !important;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

/* Editorial plate behind the console: warm tan glow + engraved scales watermark */
.chambers-hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 46%;
  pointer-events: none;
  z-index: 0;
  border-left: 1px solid var(--rule);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 210'%3E%3Cg fill='none' stroke='%2328160a' stroke-opacity='0.12' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='100' y1='40' x2='100' y2='168'/%3E%3Cline x1='60' y1='168' x2='140' y2='168'/%3E%3Cline x1='40' y1='60' x2='160' y2='60'/%3E%3Cpath d='M14 66 Q40 104 66 66'/%3E%3Cline x1='40' y1='60' x2='14' y2='66'/%3E%3Cline x1='40' y1='60' x2='66' y2='66'/%3E%3Cpath d='M134 66 Q160 104 186 66'/%3E%3Cline x1='160' y1='60' x2='134' y2='66'/%3E%3Cline x1='160' y1='60' x2='186' y2='66'/%3E%3C/g%3E%3Ccircle cx='100' cy='40' r='7' fill='%2328160a' fill-opacity='0.12'/%3E%3C/svg%3E"),
    radial-gradient(125% 85% at 80% 24%, rgba(221, 207, 182, 0.92) 0%, rgba(234, 226, 207, 0.45) 44%, rgba(249, 235, 211, 0) 72%);
  background-repeat: no-repeat;
  background-position: 52% 33%, center;
  background-size: 29% auto, cover;
  -webkit-mask-image: linear-gradient(to left, #000 54%, transparent);
  mask-image: linear-gradient(to left, #000 54%, transparent);
}

.hero-shell {
  position: relative;
  z-index: 1;
  padding-top: clamp(4.5rem, 8vw, 7.5rem) !important;
  padding-bottom: clamp(4rem, 7vw, 6.5rem) !important;
}

.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(31rem, 0.98fr);
  column-gap: clamp(3rem, 7vw, 7rem);
  row-gap: 1.35rem;
  align-items: start;
  max-width: none !important;
  min-width: 0;
}

.hero-stage > * { min-width: 0; }

.mobile-answer-break { display: inline; }

/* Eyebrow */
.hero-kicker {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
  justify-self: start;
  margin-bottom: 0 !important;
  padding: 0 0 0.8rem !important;
  border: 0 !important;
  border-bottom: 1px solid var(--rule-strong) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.hero-kicker .docket-mark {
  color: var(--peri-ink);
  font-family: var(--display-face);
  font-size: 0.95rem;
}

.hero-kicker .gradient-text {
  font-family: var(--meta-face);
  font-size: 0.72rem !important;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--peri-ink) !important;
}

/* Headline — Fraunces high contrast */
.hero-heading {
  grid-column: 1;
  grid-row: 2;
  max-width: 13ch;
  margin: 0 !important;
  color: var(--paper) !important;
  font-family: var(--display-face) !important;
  font-weight: 400 !important;
  font-size: clamp(3.4rem, 5.4vw, 5.35rem) !important;
  line-height: 0.95 !important;
  letter-spacing: -0.025em !important;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  text-wrap: balance;
}

.hero-heading .gradient-text-hero {
  color: var(--paper) !important;
  -webkit-text-fill-color: var(--paper) !important;
  background: none !important;
}

/* Second line — italic Fraunces for editorial lift */
.hero-heading .gradient-text {
  display: inline;
  color: var(--espresso) !important;
  -webkit-text-fill-color: var(--espresso) !important;
  background: none !important;
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 4, "WONK" 1;
}

.hero-lede {
  grid-column: 1;
  grid-row: 3;
  max-width: 34rem !important;
  margin: 0 !important;
  color: var(--paper-muted) !important;
  font-size: clamp(1rem, 1.15vw, 1.12rem) !important;
  line-height: 1.72;
  text-wrap: pretty;
}

.hero-lede .font-semibold,
.hero-lede span {
  color: var(--paper) !important;
  font-weight: 600;
}

/* Left-column assurances — fills the void beneath the lede (honest, on-page facts) */
.hero-assurances {
  grid-column: 1;
  grid-row: 4;
  align-self: start;
  max-width: 32rem;
  margin: 0.35rem 0 0 !important;
  padding-top: 1.3rem;
  border-top: 1px solid var(--rule-strong);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.72rem;
}
.hero-assurances li {
  display: flex;
  gap: 0.65rem;
  margin: 0;
  color: var(--paper-muted);
  font-family: var(--meta-face);
  font-size: 0.94rem;
  line-height: 1.5;
}
.hero-assurances li .lede-mark {
  flex-shrink: 0;
  color: var(--espresso);
  font-weight: 700;
}

/* Mode toggles — pills */
.research-modes {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  max-width: none !important;
  margin: 0 !important;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule-strong);
}

.research-modes button {
  min-height: 36px;
  padding: 0.45rem 0.9rem !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: var(--paper-muted) !important;
  font-family: var(--meta-face);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.research-modes button[aria-pressed="true"] {
  background: var(--espresso) !important;
  color: var(--cream-ink) !important;
  border-color: var(--espresso) !important;
  font-weight: 600;
}

.research-modes button[aria-pressed="false"]:hover,
.research-modes button[aria-pressed="false"]:focus-visible {
  background: rgba(40, 22, 10, 0.05) !important;
  color: var(--paper) !important;
  border-color: var(--rule) !important;
}

/* ---- Research console: frosted glass over the editorial plate ---- */
.research-console,
#simulasi-section {
  grid-column: 2;
  grid-row: 2 / span 3;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: clamp(1.5rem, 2vw, 2rem) !important;
  border: 1px solid rgba(40, 22, 10, 0.16) !important;
  border-radius: 16px !important;
  background: rgba(249, 235, 211, 0.62) !important;
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  backdrop-filter: blur(20px) saturate(120%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 34px 70px -36px rgba(40, 22, 10, 0.55),
    0 6px 18px -12px rgba(40, 22, 10, 0.3) !important;
}

/* Floating status chip — the rare periwinkle touch */
.research-console::before,
#simulasi-section::before {
  position: absolute;
  top: 0;
  right: 1.25rem;
  padding: 0.32rem 0.6rem;
  content: "RISET LANGSUNG";
  transform: translateY(-50%);
  border: 1px solid rgba(159, 156, 170, 0.55);
  border-radius: 999px;
  background: rgba(159, 156, 170, 0.22);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--peri-ink);
  font: 600 0.58rem/1 var(--meta-face);
  letter-spacing: 0.16em;
}

#simulasi-section::before { content: "SIMULASI · BETA"; }

.research-console label,
#simulasi-section label {
  color: var(--paper) !important;
  font-family: var(--body-face);
  font-weight: 600;
}

.research-console input,
.research-console select,
#simulasi-section input,
#simulasi-section select,
#simulasi-section textarea {
  border-color: var(--rule-strong) !important;
  border-radius: 10px !important;
  background: var(--field) !important;
  color: var(--paper) !important;
}

.research-console input::placeholder,
#simulasi-section input::placeholder,
#simulasi-section textarea::placeholder {
  color: var(--paper-faint) !important;
}

.research-console input { min-height: 52px; font-size: 0.96rem; }

#search-input:focus,
.research-console input:focus,
.research-console select:focus,
#simulasi-section textarea:focus {
  border-color: var(--espresso) !important;
  box-shadow: 0 0 0 3px rgba(40, 22, 10, 0.12) !important;
}

/* Rate-limit / trial badges */
#rate-limit-badge {
  background: rgba(40, 22, 10, 0.05) !important;
  border-color: var(--rule-strong) !important;
  color: var(--paper-muted) !important;
}
#trial-banner {
  color: #7a5a1e !important;
  background: rgba(180, 140, 60, 0.12) !important;
  border-color: rgba(180, 140, 60, 0.3) !important;
}

/* "Coba:" example chips + filter row */
.research-console .border-t { border-color: var(--rule) !important; }
.research-console span { color: var(--paper-muted); }

.research-console > div:last-child button,
.research-console button[onclick^="setQuery"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--rule-strong) !important;
  border-radius: 999px !important;
  background: rgba(40, 22, 10, 0.03) !important;
  color: var(--paper-muted) !important;
}

.research-console > div:last-child button:hover,
.research-console button[onclick^="setQuery"]:hover {
  border-color: var(--espresso) !important;
  background: rgba(40, 22, 10, 0.06) !important;
  color: var(--paper) !important;
}

/* Simulasi accents */
#simulasi-section .text-accent-400,
#simulasi-section svg { color: var(--peri-ink) !important; }
#simulasi-section .bg-accent-400\/10 {
  background: rgba(159, 156, 170, 0.2) !important;
  color: var(--peri-ink) !important;
  border-color: rgba(159, 156, 170, 0.4) !important;
}
#simulasi-section p { color: var(--paper-muted) !important; }

/* ---- Primary CTA (glow-btn) → espresso pill ---- */
.glow-btn {
  border: 1px solid var(--espresso) !important;
  border-radius: 999px !important;
  background: var(--espresso) !important;
  color: var(--cream-ink) !important;
  font-weight: 600 !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 12px 26px -16px rgba(40, 22, 10, 0.7) !important;
  text-shadow: none;
}

.glow-btn svg { color: var(--cream-ink) !important; }

.glow-btn:hover {
  background: var(--espresso-2) !important;
  box-shadow: 0 16px 32px -16px rgba(40, 22, 10, 0.6) !important;
  transform: translateY(-1px);
}

/* Neutralize the old gradient text everywhere else */
.gradient-text,
.gradient-text-hero {
  background: none !important;
  color: var(--paper) !important;
  -webkit-text-fill-color: var(--paper) !important;
}

/* ---- Hero video demo card ---- */
.hero-demo {
  grid-column: 2;
  grid-row: 5;
  width: 100%;
  height: 8.5rem;
  margin-top: 0.85rem;
  margin-bottom: 0 !important;
}

.hero-demo-card {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 14px;
  background: var(--ink-raised);
  cursor: pointer;
  box-shadow: 0 20px 44px -30px rgba(40, 22, 10, 0.5);
}

.hero-demo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  filter: saturate(1.03) contrast(1.02) brightness(1.02);
}

/* Subtle warm vignette so the play button + caption stay legible over the editorial still */
.hero-demo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(80% 120% at 50% 46%, rgba(24, 13, 5, 0) 40%, rgba(24, 13, 5, 0.32) 100%),
    linear-gradient(180deg, rgba(24, 13, 5, 0.12), transparent 34%);
}

.hero-demo-play,
.hero-demo-caption { z-index: 2; }

.hero-demo-play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }

.hero-demo-play > span {
  display: grid;
  width: 3.4rem;
  height: 3.4rem;
  place-items: center;
  border: 1px solid var(--espresso);
  border-radius: 50%;
  background: var(--espresso);
  color: var(--cream-ink);
  box-shadow: 0 10px 24px -10px rgba(40, 22, 10, 0.7);
}

.hero-demo-caption {
  position: absolute;
  right: 0.85rem;
  bottom: 0;
  left: 0.85rem;
  padding: 1.6rem 0 0.7rem;
  color: rgba(246, 239, 224, 0.9);
  font-size: 0.78rem;
  font-family: var(--body-face);
  text-align: left;
  background: linear-gradient(to top, rgba(20, 11, 4, 0.9), transparent);
}

.hero-demo-caption b { color: var(--cream-ink); font-weight: 700; }

/* ---- Metrics row ---- */
.hero-metrics {
  grid-column: 1 / -1;
  grid-row: 6;
  margin-top: clamp(2.5rem, 5vw, 4.25rem);
  padding: 1.4rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.hero-metrics > span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 10rem;
  color: var(--paper-muted);
  font-size: 0.85rem;
}

.hero-metrics > span strong {
  color: var(--espresso);
  font-family: var(--display-face);
  font-weight: 500;
  font-size: 1.5rem;
  font-variation-settings: "opsz" 90;
}

/* ============================================================
   SECTIONS (light re-tone — polished later)
   ============================================================ */
.glass-card {
  border-color: var(--rule) !important;
  background: var(--ink-raised) !important;
  box-shadow: none;
}

#features-section,
#pricing-section,
#whitelabel-section,
#stats-section,
#support-section,
#chat-section,
.wid-band {
  background: var(--ink) !important;
  border-color: var(--rule) !important;
}

#features-section,
#pricing-section,
#whitelabel-section,
#stats-section {
  padding-top: clamp(5rem, 9vw, 8rem) !important;
  padding-bottom: clamp(5.5rem, 10vw, 9rem) !important;
}

/* Stats section runs short — pull its floor in so the chart feels grounded */
#stats-section { padding-bottom: clamp(3.5rem, 6vw, 5.5rem) !important; }

.section-intro {
  display: grid;
  grid-template-columns: minmax(9rem, 0.32fr) minmax(0, 0.78fr);
  column-gap: 2rem;
  align-items: start;
  text-align: left !important;
}

.section-intro .section-index {
  grid-row: 1 / span 2;
  padding-top: 0.55rem;
  color: var(--peri-ink);
  font: 500 0.68rem/1.4 var(--meta-face);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-intro h2 {
  max-width: 18ch;
  margin-bottom: 0.85rem !important;
  color: var(--paper) !important;
  font-family: var(--display-face) !important;
  font-size: clamp(2.35rem, 4vw, 4rem) !important;
  font-weight: 400 !important;
  line-height: 1.02;
  letter-spacing: -0.02em !important;
  text-wrap: balance;
}

.section-intro p {
  max-width: 42rem !important;
  margin: 0 !important;
  color: var(--paper-muted) !important;
  line-height: 1.65;
}

/* ---- Features: editorial bento ---- */
.features-bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(0.85rem, 1.35vw, 1.15rem);
}

/* Lady Justice anchor — tall framed print, spans two tile rows */
.feat-figure {
  grid-column: span 4;
  grid-row: span 2;
  min-height: 23rem;
}
.feat-figure img { filter: saturate(1.03) contrast(1.02); }
.feat-figure-cap {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 2.6rem 1.4rem 1.3rem;
  background: linear-gradient(to top, rgba(18, 10, 4, 0.92), rgba(18, 10, 4, 0.42) 52%, transparent);
}
.feat-figure-cap .lk-eyebrow { color: rgba(246, 239, 224, 0.72); }
.feat-figure-line {
  color: var(--cream-ink);
  font-family: var(--display-face);
  font-size: 1.06rem;
  line-height: 1.3;
  font-variation-settings: "opsz" 40, "SOFT" 3;
  text-wrap: balance;
}

/* Feature tiles */
.feat-tile {
  display: flex;
  flex-direction: column;
  grid-column: span 4;
  padding: 1.65rem 1.5rem;
}
.feat-tile--wide {
  grid-column: span 8;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 3.5vw, 3rem);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(221, 207, 182, 0.4), transparent 60%),
    var(--ink-raised);
}
.feat-tile--wide .feat-ic { margin-bottom: 0; align-self: center; }
.feat-tile--wide .feat-h { flex: 0 0 auto; max-width: 11ch; margin-bottom: 0; }
.feat-tile--wide .feat-p { flex: 1 1 0; max-width: none; margin: 0; }
.feat-tile:hover { border-color: var(--rule-strong); background: var(--ink-soft); }
.feat-tile--wide:hover {
  border-color: var(--rule-strong);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(221, 207, 182, 0.5), transparent 60%),
    var(--ink-soft);
}

.feat-ic {
  display: inline-grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  margin-bottom: 1.05rem;
  border: 1px solid var(--rule-strong);
  border-radius: 9px;
  color: var(--espresso);
}
.feat-ic svg { width: 1.25rem; height: 1.25rem; }
.feat-tile--wide .feat-ic { width: 2.9rem; height: 2.9rem; border-radius: 11px; }
.feat-tile--wide .feat-ic svg { width: 1.45rem; height: 1.45rem; }

.feat-h {
  margin-bottom: 0.5rem;
  color: var(--paper);
  font-family: var(--display-face);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.feat-tile--wide .feat-h { font-size: clamp(1.6rem, 2.4vw, 1.95rem); }
.feat-p {
  max-width: 44ch;
  color: var(--paper-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.feat-tile--wide .feat-p { font-size: 1.02rem; }

#answer-box .glass-card,
#chat-section .glass-card { border-radius: 14px !important; }

#answer-box .absolute.bg-primary-600\/10 { display: none; }

.prose-answer h2,
.chat-md h4 {
  color: var(--espresso) !important;
  font-family: var(--display-face) !important;
}

.bar-gradient { background: var(--espresso) !important; }

/* Pricing */
#pricing-section .grid {
  align-items: stretch;
  max-width: 68rem !important;
  gap: 0 !important;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

#pricing-section .grid > .glass-card {
  display: flex;
  flex-direction: column;
  padding: 2rem !important;
  border: 0 !important;
  border-right: 1px solid var(--rule) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

#pricing-section .grid > .glass-card:last-child { border-right: 0 !important; }

#pricing-section .grid > .glass-card:nth-child(2) {
  background: rgba(40, 22, 10, 0.045) !important;
  box-shadow: inset 0 3px 0 var(--espresso) !important;
  animation: none !important;
}

#pricing-section .grid > .glass-card ul { flex: 1; }

#pricing-section .grid > .glass-card button,
#pricing-section .grid > .glass-card a { border-radius: 999px !important; }

#pricing-section .grid > .glass-card > .absolute {
  top: 0 !important;
  border-radius: 0 0 8px 8px !important;
  background: var(--espresso) !important;
  color: var(--cream-ink) !important;
}

#pricing-section .plan-row { min-height: 31rem; }
#pricing-section .plan-row button,
#pricing-section .plan-row > a { margin-top: auto; }

/* White-label */
#whitelabel-section {
  background:
    linear-gradient(90deg, rgba(40, 22, 10, 0.03), transparent 44%),
    var(--ink-soft) !important;
}

#whitelabel-section .glass-card {
  border-radius: 16px !important;
  background: var(--ink-raised) !important;
}

#whitelabel-section .rounded-full,
.wid-band .rounded-full { border-radius: 999px !important; }

/* White-label "mood" print — chambers library */
.wl-figure {
  margin-bottom: 1.6rem;
  height: clamp(9rem, 15vw, 11rem);
}
.wl-figure img { filter: saturate(1.02) contrast(1.02); }
.wl-figure-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem 1.2rem 0.95rem;
  color: var(--cream-ink);
  font-family: var(--display-face);
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  background: linear-gradient(to top, rgba(18, 10, 4, 0.9), rgba(18, 10, 4, 0.15) 60%, transparent);
}

/* ============================================================
   EDITORIAL BAND — classical portico divider
   ============================================================ */
.lk-band {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  min-height: clamp(13rem, 25vw, 19rem);
  background: var(--ink);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.lk-band-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  /* mild sepia warms the sliver of blue sky toward tan, keeps stone golden */
  filter: saturate(0.82) sepia(0.16) contrast(1.03) brightness(1.02);
}

.lk-band-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 135% at 100% -12%, rgba(84, 56, 26, 0.78) 0%, rgba(84, 56, 26, 0) 62%),
    linear-gradient(90deg, rgba(24, 13, 5, 0.92) 0%, rgba(24, 13, 5, 0.66) 32%, rgba(24, 13, 5, 0.18) 60%, rgba(24, 13, 5, 0) 82%),
    linear-gradient(180deg, rgba(249, 235, 211, 0.5) 0%, transparent 15%, transparent 84%, rgba(249, 235, 211, 0.55) 100%);
}

.lk-band-inner {
  position: relative;
  width: 100%;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.lk-band-eyebrow {
  margin-bottom: 0.9rem;
  color: rgba(246, 239, 224, 0.74) !important;
}

.lk-band-quote {
  max-width: 22ch;
  margin: 0;
  color: var(--cream-ink);
  font-family: var(--display-face);
  font-weight: 400;
  font-size: clamp(1.6rem, 3vw, 2.65rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lk-band-quote em {
  font-style: italic;
  color: rgba(246, 239, 224, 0.82);
  font-variation-settings: "opsz" 144, "SOFT" 4, "WONK" 1;
}

/* Stats */
#stats-section .grid.grid-cols-2 > .glass-card {
  border: 0 !important;
  border-top: 1px solid var(--rule-strong) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

#stats-section .counter {
  color: var(--espresso) !important;
  font-family: var(--display-face);
  font-weight: 500 !important;
}

/* Support + chat inputs */
#support-form { border-radius: 16px !important; }

#support-form input,
#support-form textarea,
#chat-section input,
#chat-section textarea {
  border-color: var(--rule-strong) !important;
  border-radius: 10px !important;
  background: var(--field) !important;
  color: var(--paper) !important;
}

.wid-band { background: var(--ink-soft) !important; }
.wid-band .glass-card { border-radius: 16px !important; background: transparent !important; }

footer {
  background: var(--ink-soft) !important;
  border-color: var(--rule) !important;
  color: var(--paper-muted);
}

footer h4 {
  color: var(--paper-faint) !important;
  font-family: var(--meta-face);
  font-size: 0.68rem !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

footer a { color: var(--paper-muted); }
footer a:hover { color: var(--espresso) !important; }

/* Cookie banner */
#cookie-banner {
  border-color: var(--rule) !important;
  background: rgba(249, 235, 211, 0.96) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 -18px 50px -24px rgba(40, 22, 10, 0.35);
  padding: 0.75rem 1rem !important;
}
#cookie-banner > div { gap: 0.75rem; }
#cookie-banner .text-xs { color: var(--paper-muted) !important; font-size: 0.8rem; }
#cookie-banner button { border-radius: 999px !important; }

/* Premium badge */
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: rgba(40, 22, 10, 0.06);
  color: var(--paper) !important;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#chat-scroll-btn {
  position: absolute;
  right: 1.25rem;
  bottom: 5rem;
  z-index: 5;
  display: none;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule-strong) !important;
  border-radius: 50%;
  background: var(--ink-raised) !important;
  color: var(--espresso) !important;
  cursor: pointer;
}
#chat-scroll-btn.visible { display: flex; }

/* ============================================================
   LIGHT-THEME COMPLETION
   Retone sections/modals the foundation left using dark-mode
   utilities so every state is legible on ivory.
   .glow-btn (espresso pill) + .bg-black (Apple button) excluded.
   ============================================================ */
:is(#pricing-section, #stats-section, #support-section, #whitelabel-section, .wid-band, footer, #chat-section, #auth-modal, #whitelabel-modal, #upgrade-modal, #dashboard-modal)
  :is(.text-white, .text-white\/90, .text-white\/80, .text-white\/70):not(.glow-btn):not(.bg-black) {
  color: var(--paper) !important;
}
:is(#pricing-section, #stats-section, #support-section, #whitelabel-section, .wid-band, footer, #chat-section, #auth-modal, #whitelabel-modal, #upgrade-modal, #dashboard-modal)
  :is(.text-white\/60, .text-white\/50):not(.glow-btn) {
  color: var(--paper-muted) !important;
}
:is(#pricing-section, #stats-section, #support-section, #whitelabel-section, .wid-band, footer, #chat-section, #auth-modal, #whitelabel-modal, #upgrade-modal, #dashboard-modal)
  :is(.text-white\/40, .text-white\/30, .text-white\/25, .text-white\/20):not(.glow-btn):not(a) {
  color: var(--paper-faint) !important;
}

/* Purple / teal accents → espresso */
:is(#pricing-section, #stats-section, #support-section, #whitelabel-section, .wid-band, footer, #chat-section, #whitelabel-modal, #upgrade-modal, #dashboard-modal)
  :is(.text-primary-400, .text-primary-300, .text-secondary-400, .text-accent-400):not(.glow-btn) {
  color: var(--espresso) !important;
}

/* Hover-to-white variants stay readable on ivory */
:is(#pricing-section, #whitelabel-section, .wid-band, footer)
  :is(.hover\:text-white, .hover\:text-primary-400, .hover\:text-primary-300):hover:not(.glow-btn) {
  color: var(--espresso) !important;
}

/* Success checks → readable sage */
:is(#pricing-section, #whitelabel-section, #stats-section, footer) .text-green-400 { color: #54703f !important; }

/* Surfaces + borders */
:is(#pricing-section, #whitelabel-section, .wid-band, footer, #auth-modal, #whitelabel-modal)
  :is(.bg-white\/\[0\.08\], .bg-white\/\[0\.06\], .bg-white\/\[0\.04\], .bg-white\/5, .bg-white\/10):not(input):not(textarea) {
  background: rgba(40, 22, 10, 0.045) !important;
}
:is(#whitelabel-section, .wid-band) :is(.bg-primary-500\/10, .bg-primary-500\/20) { background: rgba(40, 22, 10, 0.06) !important; }
:is(#pricing-section, #stats-section, #whitelabel-section, .wid-band, footer, #auth-modal, #whitelabel-modal)
  :is(.border-white\/20, .border-white\/15, .border-white\/10, .border-white\/5) { border-color: var(--rule) !important; }
:is(#whitelabel-section, .wid-band, #pricing-section)
  :is(.border-primary-500\/40, .border-primary-500\/30, .border-primary-500\/20) { border-color: var(--rule-strong) !important; }

/* Footer links → muted (win over the faint tier's :not(a)) */
footer ul a { color: var(--paper-muted) !important; }
footer ul a:hover { color: var(--espresso) !important; }

/* Pricing WhatsApp secondary links */
#pricing-section .plan-row a[href^="https://wa.me"] { color: var(--paper-faint) !important; }

/* Inverted WiD logo → neutral dark mark on ivory (no cool brand blue) */
:is(.wid-band, footer) img.brightness-200 { filter: grayscale(1) brightness(0.42) contrast(1.05) !important; opacity: 0.82 !important; }

/* Pricing controls */
#pricing-section #free-plan-cta { border-color: var(--rule-strong) !important; color: var(--paper) !important; }
#pricing-section #free-plan-cta:hover { border-color: var(--espresso) !important; color: var(--espresso) !important; background: rgba(40, 22, 10, 0.04) !important; }
#pricing-section .plan-row:last-child > button {
  background: var(--tan) !important;
  border: 1px solid var(--rule-strong) !important;
  color: var(--espresso) !important;
}
#pricing-section .plan-row:last-child > button:hover { background: var(--greige) !important; }

/* Trial badge → warmer, readable */
#pricing-section .bg-amber-500\/15 { color: #7a5a1e !important; background: rgba(180, 140, 60, 0.14) !important; border-color: rgba(180, 140, 60, 0.32) !important; }

/* Modal inputs → warm field */
:is(#auth-modal, #whitelabel-modal) :is(input, textarea) {
  background: var(--field) !important;
  border-color: var(--rule-strong) !important;
  color: var(--paper) !important;
}
:is(#auth-modal, #whitelabel-modal) :is(input, textarea)::placeholder { color: var(--paper-faint) !important; }
#support-form input::placeholder,
#support-form textarea::placeholder { color: var(--paper-faint) !important; }

/* ============================================================
   RESULTS / CHAT / PROSE (light)
   ============================================================ */
.results-area { min-height: 0; }

.results-area .glass-card,
#chat-section .glass-card,
#simulasi-section .glass-card { border-color: var(--rule) !important; }

.prose-answer,
.chat-md,
#simulasi-section p { color: var(--paper-muted); }

.prose-answer p,
.prose-answer li { color: var(--paper-muted); line-height: 1.7; }
.prose-answer p { margin-bottom: 0.75rem; }
.prose-answer ul,
.prose-answer ol { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.prose-answer li { margin-bottom: 0.35rem; }
.prose-answer strong { color: var(--paper); }

.chat-md h4 {
  margin: 0.75rem 0 0.375rem;
  color: var(--espresso);
  font: 600 0.95rem/1.3 var(--display-face);
}
.chat-md strong { color: var(--paper); font-weight: 700; }
.chat-md ul,
.chat-md ol { padding-left: 1.25rem; margin: 0.375rem 0; }
.chat-md li { margin-bottom: 0.25rem; line-height: 1.5; }
.chat-md p { margin-bottom: 0.5rem; line-height: 1.55; }
.chat-md code { padding: 0.125rem 0.375rem; border-radius: 4px; background: rgba(40, 22, 10, 0.07); font-size: 0.78rem; }

.chat-cursor::after {
  margin-left: 2px;
  content: "▋";
  color: var(--espresso);
  animation: blink 1s step-end infinite;
}

#chat-input { min-height: 42px; max-height: 160px; }
#chat-messages { scroll-behavior: smooth; }
#chat-messages::-webkit-scrollbar { width: 6px; }
#chat-messages::-webkit-scrollbar-track { background: transparent; }
#chat-messages::-webkit-scrollbar-thumb { background: rgba(40, 22, 10, 0.18); border-radius: 3px; }

/* ============================================================
   FUNCTIONAL STATES
   ============================================================ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pulse-dot { 0%, 80%, 100% { transform: scale(0); opacity: 0.42; } 40% { transform: scale(1); opacity: 1; } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
@keyframes blink { 50% { opacity: 0; } }

.fade-up { animation: fadeUp 260ms ease-out both; }

.scroll-reveal { opacity: 1; transform: none; }
.js-loaded .scroll-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 240ms ease-out, transform 240ms ease-out;
}
.js-loaded .scroll-reveal.visible { opacity: 1; transform: none; }

.loading-dots { display: inline-flex; align-items: center; gap: 0.3rem; }
.loading-dots span {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--espresso);
  animation: pulse-dot 1.4s infinite ease-in-out both;
}
.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

.skeleton {
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(40, 22, 10, 0.05) 25%, rgba(40, 22, 10, 0.1) 50%, rgba(40, 22, 10, 0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.chunk-expandable {
  position: relative;
  max-height: 80px;
  overflow: hidden;
  transition: opacity 180ms ease-out;
}
.chunk-expandable.expanded { max-height: 2000px; }
.chunk-expandable:not(.expanded)::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 40px;
  content: "";
  pointer-events: none;
  background: linear-gradient(transparent, var(--ink-raised));
}

.score-ring { width: 44px; height: 44px; }
.score-ring circle {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
}
.score-ring .bg { stroke: rgba(40, 22, 10, 0.12); }
.score-ring .fill { stroke: var(--espresso); transition: stroke-dashoffset 260ms ease-out; }

/* Case-type badges (light tints, readable) */
.badge-agama { background: rgba(120, 148, 122, 0.16); color: #3f5a41; border: 1px solid rgba(120, 148, 122, 0.4); }
.badge-pidana { background: rgba(154, 74, 74, 0.14); color: #7a2f2f; border: 1px solid rgba(154, 74, 74, 0.35); }
.badge-perdata,
.badge-tun,
.badge-militer,
.badge-lainnya { background: rgba(40, 22, 10, 0.06); color: var(--paper); border: 1px solid var(--rule-strong); }

select option { background: var(--field); color: var(--paper); }

.mobile-menu {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 180ms ease-out, transform 180ms ease-out, visibility 0s linear 180ms;
  visibility: hidden;
}
.mobile-menu.open {
  max-height: 400px;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
  visibility: visible;
}

body.premium-mode [data-premium-hide] { display: none !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1023px) {
  .hero-stage {
    grid-template-columns: minmax(0, 0.9fr) minmax(24rem, 1.1fr);
    column-gap: 2.5rem;
  }
  .hero-heading { font-size: clamp(3rem, 5.8vw, 4rem) !important; }
  .chambers-hero::after { width: 42%; }

  /* Features bento → two columns, figure stays a tall left anchor */
  .features-bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .feat-figure { grid-column: span 3; min-height: 20rem; }
  .feat-tile,
  .feat-tile--wide { grid-column: span 3; }
  /* Half-width wide tile → back to a vertical stack so it doesn't cramp */
  .feat-tile--wide { flex-direction: column; align-items: flex-start; }
  .feat-tile--wide .feat-ic { margin-bottom: 1.05rem; }
  .feat-tile--wide .feat-h { font-size: 1.5rem; margin-bottom: 0.5rem; }
  .feat-tile--wide .feat-p { max-width: 44ch; }
}

/* Widen mode-toggle 44px touch target to small tablets (was only ≤520px) */
@media (max-width: 640px) {
  .research-modes button { min-height: 44px; }
}

@media (max-width: 767px) {
  .chambers-hero::after {
    top: 0;
    bottom: auto;
    right: 0;
    left: 0;
    width: 100%;
    height: 34%;
    border-left: 0;
    border-bottom: 1px solid var(--rule);
    -webkit-mask-image: linear-gradient(to top, #000 24%, transparent);
    mask-image: linear-gradient(to top, #000 24%, transparent);
    background-position: 82% 42%, center;
    background-size: 30% auto, cover;
    opacity: 0.35;
  }

  .provenance-bar > div { overflow: hidden; white-space: nowrap; }
  .provenance-bar > div > span:last-child { display: none; }

  .hero-shell { padding-top: 3.5rem !important; padding-bottom: 3.5rem !important; }

  .hero-stage {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    width: 100%;
    max-width: 100% !important;
    min-width: 0;
  }

  .hero-kicker { order: 1; }

  .hero-heading {
    order: 2;
    width: 100%;
    max-width: 100%;
    font-size: clamp(2.75rem, 12vw, 3.6rem) !important;
    overflow-wrap: anywhere;
  }

  .mobile-answer-break { display: block; }

  .hero-lede { order: 3; margin-top: 0.25rem !important; font-size: 0.98rem !important; }

  .hero-assurances {
    order: 3;
    max-width: 100%;
    margin-top: 0.5rem !important;
    padding-top: 1.1rem;
  }
  .hero-assurances li { font-size: 0.9rem; }

  .research-modes {
    order: 4;
    width: 100%;
    max-width: 100% !important;
    min-width: 0;
    margin-top: 1.1rem !important;
  }

  .research-console,
  #simulasi-section {
    order: 5;
    width: 100%;
    max-width: 100% !important;
    min-width: 0;
  }

  .hero-demo { order: 6; width: 100%; height: auto; margin-top: 1rem; }
  .hero-demo-card { aspect-ratio: 16 / 9; height: auto; }
  .hero-demo img { height: auto !important; aspect-ratio: 16 / 9 !important; }

  .hero-metrics {
    order: 7;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: 0.75rem !important;
    margin-top: 1.75rem;
  }
  .hero-metrics > span {
    display: block;
    min-width: 0;
    font-size: 0.76rem;
    line-height: 1.35;
  }
  .hero-metrics > span strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1.35rem;
  }

  .section-intro { display: block; }
  .section-intro .section-index { display: block; margin-bottom: 1.5rem; }
  .section-intro h2 { font-size: clamp(2.25rem, 11vw, 3.2rem) !important; }

  /* Features bento → single column stack */
  .features-bento { grid-template-columns: 1fr; gap: 0.85rem; }
  .feat-figure {
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
    aspect-ratio: 4 / 5;
    max-height: 30rem;
  }
  .feat-tile,
  .feat-tile--wide { grid-column: auto; }
  .feat-tile--wide .feat-h { font-size: 1.5rem; }

  /* Editorial band → stronger scrim, text over darkened image */
  .lk-band { min-height: clamp(11rem, 44vw, 15rem); }
  .lk-band-veil {
    background:
      linear-gradient(180deg, rgba(24, 13, 5, 0.36) 0%, rgba(24, 13, 5, 0.5) 45%, rgba(24, 13, 5, 0.86) 100%),
      linear-gradient(180deg, rgba(249, 235, 211, 0.4) 0%, transparent 12%);
  }
  .lk-band-inner { padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .lk-band-quote { max-width: 100%; }

  #pricing-section .grid { display: block; border-bottom: 0; }
  #pricing-section .grid > .glass-card {
    border-right: 0 !important;
    border-bottom: 1px solid var(--rule) !important;
  }
  #pricing-section .plan-row { min-height: 0; }

  #chat-sidebar { display: none; }
  #chat-sidebar.open {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 10;
    display: block;
    max-height: 60%;
  }
}

@media (max-width: 520px) {
  .research-console .flex.gap-2.sm\:gap-3 { flex-direction: column; }
  #search-btn { justify-content: center; width: 100%; }

  /* Console header: stack the long label above the quota badge so neither cramps */
  .research-console .flex.items-center.justify-between.mb-3 {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .research-modes {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem !important;
  }
  .research-modes button {
    min-width: 0;
    min-height: 44px;
    padding-inline: 0.4rem !important;
    font-size: 0.72rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #cookie-banner > div { align-items: stretch; }
  #cookie-banner .flex.items-center { justify-content: flex-end; }
}

/* Narrowest phones — keep "Simulasi Kasus" from clipping to an ellipsis */
@media (max-width: 400px) {
  .research-modes button {
    font-size: 0.66rem !important;
    padding-inline: 0.3rem !important;
    letter-spacing: 0;
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .js-loaded .scroll-reveal { opacity: 1; transform: none; transition: none; }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
