/* ==========================================================================
   GiaKreasi — Stylesheet Utama
   Portal Konektivitas & Gaya Hidup Digital Indonesia

   Struktur:
   1. Token desain (light + dark)
   2. Reset & dasar
   3. Layout
   4. Komponen
   5. Slot iklan
   6. Responsif
   7. Preferensi pengguna (motion, kontras, cetak)
   ========================================================================== */

/* ==========================================================================
   1. TOKEN DESAIN
   ========================================================================== */
:root {
  color-scheme: light dark;

  /* --- Palet merek (tetap di light & dark) --- */
  --brand-900: #06253f;
  --brand-800: #0a3763;
  --brand-700: #0d4a86;
  --brand-600: #1263ad;
  --brand-500: #1a7fd4;
  --brand-400: #4da3e8;
  --brand-100: #e3f0fb;
  --brand-50:  #f2f8fd;

  --accent-600: #d97706;
  --accent-500: #f59e0b;
  --accent-100: #fef3c7;

  --ok-600: #059669;
  --ok-100: #d1fae5;

  /* --- Token semantik (di-override oleh dark mode) --- */
  --bg:            #ffffff;   /* latar halaman */
  --bg-tint:       #f8fafc;   /* latar section selang-seling */
  --bg-brand:      #f2f8fd;   /* latar section beraksen merek */
  --surface:       #ffffff;   /* kartu, widget, form */
  --surface-2:     #f1f5f9;   /* callout netral, kode, header tabel */
  --border:        #e2e8f0;
  --border-strong: #cbd5e1;

  --text:          #0f172a;   /* judul */
  --text-body:     #334155;   /* paragraf */
  --text-muted:    #64748b;   /* keterangan */
  --text-faint:    #94a3b8;   /* label iklan, caption */

  --link:          #1263ad;
  --link-hover:    #0d4a86;

  --callout-bg:     #f2f8fd;
  --callout-border: #e3f0fb;
  --warn-bg:        #fffbeb;
  --warn-border:    #fef3c7;
  --warn-text:      #92400e;

  --on-dark:       #ffffff;
  --on-dark-soft:  rgba(255, 255, 255, .86);
  --on-dark-faint: rgba(255, 255, 255, .62);
  --on-dark-line:  rgba(255, 255, 255, .18);
  --on-dark-fill:  rgba(255, 255, 255, .12);

  /* --- Bentuk & bayangan --- */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow:    0 4px 12px rgba(15, 23, 42, .07), 0 12px 28px rgba(15, 23, 42, .06);
  --shadow-lg: 0 18px 50px rgba(6, 37, 63, .14);

  /* --- Ukuran --- */
  --wrap: 1160px;
  --wrap-narrow: 820px;
  --header-h: 68px;
  --gutter: 20px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* --- Dark mode: hanya token yang berubah, bukan struktur --- */
@media (prefers-color-scheme: dark) {
  :root {
    --brand-100: #163a5c;
    --brand-50:  #10273f;

    --bg:            #0b1220;
    --bg-tint:       #111a2b;
    --bg-brand:      #101d31;
    --surface:       #131c2e;
    --surface-2:     #1b273d;
    --border:        #26334b;
    --border-strong: #37475f;

    --text:          #f1f5f9;
    --text-body:     #cbd5e1;
    --text-muted:    #94a3b8;
    --text-faint:    #7c8ba1;

    --link:          #6cb4ef;
    --link-hover:    #9acbf5;

    --callout-bg:     #10273f;
    --callout-border: #1d3c5c;
    --warn-bg:        #2b2210;
    --warn-border:    #4a3a14;
    --warn-text:      #fcd34d;

    --ok-100: #0d3b2e;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow:    0 4px 12px rgba(0, 0, 0, .45), 0 12px 28px rgba(0, 0, 0, .35);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .6);
  }
}

/* ==========================================================================
   2. RESET & DASAR
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Jarak aman agar heading tidak tertutup header sticky saat lompat anchor */
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-body);
  background: var(--bg);
  /* Tidak memakai overflow-x:hidden — akar masalah overflow diperbaiki
     langsung agar bug tidak tersembunyi dan position:sticky tetap bekerja. */
}

img, svg, video, canvas, iframe { max-width: 100%; display: block; }
img, video { height: auto; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  line-height: 1.25;
  margin: 0 0 .6em;
  font-weight: 700;
  letter-spacing: -.02em;
  /* Cadangan agar anchor dari daftar isi tidak tertutup header */
  scroll-margin-top: calc(var(--header-h) + 24px);
  /* Judul panjang tanpa spasi tidak boleh melebarkan grid */
  overflow-wrap: break-word;
}
h1 { font-size: clamp(1.85rem, 1.35rem + 2.4vw, 3.1rem); }
h2 { font-size: clamp(1.42rem, 1.16rem + 1.3vw, 2.15rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .55vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p { margin: 0 0 1.15em; overflow-wrap: break-word; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.4em; }
li { margin-bottom: .45em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

blockquote {
  margin: 1.8rem 0;
  padding: 1rem 1.4rem;
  border-left: 4px solid var(--brand-500);
  background: var(--callout-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-body);
  font-style: italic;
}

code, kbd, samp {
  background: var(--surface-2);
  color: var(--text);
  padding: .15em .4em;
  border-radius: 4px;
  font-size: .88em;
  /* Nama domain panjang di dalam <code> tidak boleh merusak layout */
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Fokus keyboard yang selalu terlihat di light maupun dark */
:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--brand-500); color: #fff; }

/* ==========================================================================
   3. LAYOUT
   ========================================================================== */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow { max-width: var(--wrap-narrow); }

.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }
.section-tint { background: var(--bg-tint); }
.section-brand { background: var(--bg-brand); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* minmax(0, 1fr) mencegah kolom melebar karena konten tak terpotong
   (tabel lebar, kata panjang). Tanpa ini, 1fr = minmax(auto, 1fr)
   yang punya lantai min-content dan menyebabkan overflow horizontal. */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.lead {
  font-size: 1.14rem;
  color: var(--text-muted);
  max-width: 68ch;
}
.center .lead { margin-inline: auto; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-600);
  background: var(--brand-100);
  padding: .35em .9em;
  border-radius: 999px;
  margin-bottom: 1rem;
}
@media (prefers-color-scheme: dark) {
  .eyebrow { color: var(--brand-400); }
}

/* ==========================================================================
   4. KOMPONEN
   ========================================================================== */

/* ---------- Skip link ---------- */
/* Teknik clip: elemen tetap terbaca pembaca layar tanpa menambah
   kotak tata letak di luar viewport (left:-9999px melebarkan dokumen). */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: auto;
  height: auto;
  margin: 0;
  padding: .8em 1.2em;
  overflow: visible;
  clip: auto;
  clip-path: none;
  background: var(--brand-800);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: color-mix(in srgb, var(--bg) 93%, transparent);
  border-bottom: 1px solid var(--border);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { backdrop-filter: saturate(180%) blur(12px); }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text);
  font-size: 1.18rem;
  letter-spacing: -.03em;
  flex: none;
}
.logo:hover { text-decoration: none; color: var(--text); }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo span em { font-style: normal; color: var(--brand-500); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text-body);
  font-size: .94rem;
  font-weight: 600;
  padding: .55em .85em;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.nav a:hover {
  background: var(--surface-2);
  color: var(--link-hover);
  text-decoration: none;
}
.nav a[aria-current="page"] { color: var(--link); background: var(--brand-100); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex: none;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 19px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
  transition: transform .22s ease, background .22s ease, top .22s ease;
}
.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font-family: inherit;
  font-weight: 700;
  font-size: .96rem;
  line-height: 1.2;
  /* min-height 44px = target sentuh yang nyaman di layar sentuh */
  min-height: 44px;
  padding: .8em 1.6em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: transform .16s ease, box-shadow .16s ease,
              background .16s ease, border-color .16s ease;
}
.btn:hover { text-decoration: none; }
/* Efek angkat hanya untuk perangkat berpenunjuk — di layar sentuh
   state :hover tersangkut setelah tap. */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); }
}
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 6px 18px rgba(18, 99, 173, .28);
}
.btn-primary:hover { background: var(--brand-700); color: #fff; }

.btn-ghost { background: transparent; color: var(--link); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--brand-500); background: var(--brand-100); color: var(--link-hover); }

.btn-light { background: #fff; color: var(--brand-800); }
.btn-light:hover { background: #eaf3fb; color: var(--brand-900); }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-outline-light:hover { background: rgba(255, 255, 255, .14); color: #fff; }

.btn-block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.center .btn-row { justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--brand-900) 0%, var(--brand-700) 55%, var(--brand-600) 100%);
  color: var(--on-dark);
  padding: 84px 0 76px;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 82% 18%, rgba(245, 158, 11, .22), transparent 42%),
    radial-gradient(circle at 12% 88%, rgba(26, 127, 212, .35), transparent 46%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: var(--on-dark); max-width: 17ch; }
.hero .lead { color: var(--on-dark-soft); font-size: 1.18rem; max-width: 60ch; }
.hero .eyebrow { background: var(--on-dark-fill); color: var(--on-dark); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 46px;
  align-items: center;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 42px;
  padding-top: 28px;
  border-top: 1px solid var(--on-dark-line);
}
.hero-stats strong {
  display: block;
  font-size: 1.7rem;
  color: var(--on-dark);
  line-height: 1.2;
}
.hero-stats span { font-size: .86rem; color: var(--on-dark-faint); }

.hero-card {
  background: var(--on-dark-fill);
  border: 1px solid var(--on-dark-line);
  border-radius: var(--radius-lg);
  padding: 28px;
}
@supports (backdrop-filter: blur(1px)) {
  .hero-card { backdrop-filter: blur(8px); }
}
.hero-card h2 { color: var(--on-dark); font-size: 1.15rem; margin-bottom: 1rem; }
.hero-card ul { list-style: none; padding: 0; margin: 0; }
.hero-card li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 11px 0;
  border-bottom: 1px solid var(--on-dark-line);
  color: var(--on-dark-soft);
  font-size: .95rem;
  line-height: 1.5;
}
.hero-card li:last-child { border-bottom: 0; }
.hero-card li::before {
  content: "✓";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-top: 2px;
}

/* ---------- Header halaman dalam ---------- */
.page-head {
  background: linear-gradient(155deg, var(--brand-900), var(--brand-700));
  color: var(--on-dark);
  padding: 56px 0 48px;
}
.page-head h1 { color: var(--on-dark); margin-bottom: .35em; }
.page-head p { color: var(--on-dark-soft); max-width: 66ch; margin: 0; }
.page-head .eyebrow { background: var(--on-dark-fill); color: var(--on-dark); }

/* ---------- Remah roti ---------- */
.breadcrumb { font-size: .85rem; padding: 14px 0; color: var(--text-muted); }
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .3em .45em;
  padding: 0;
  margin: 0;
}
.breadcrumb li { margin: 0; }
.breadcrumb li::after { content: "›"; margin-left: .5em; color: var(--text-faint); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--text-muted); }

/* ---------- Kartu ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--brand-400);
  }
}
.card h3 { margin-bottom: .5rem; font-size: 1.15rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-100);
  color: var(--brand-600);
  margin-bottom: 16px;
}
.card-icon svg { width: 24px; height: 24px; }
@media (prefers-color-scheme: dark) {
  .card-icon { color: var(--brand-400); }
}

.feature-list { list-style: none; padding: 0; }
.feature-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.feature-list li::before {
  content: "✓";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ok-100);
  color: var(--ok-600);
  font-size: .74rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-top: 4px;
}
@media (prefers-color-scheme: dark) {
  .feature-list li::before { color: #34d399; }
}

/* ---------- Langkah bernomor ---------- */
/* counter-reset dipasang di .steps DAN sebagai cadangan di setiap
   pembungkus grid, agar .step tetap bernomor benar meski dipakai
   di luar .steps. */
.steps, .grid:has(> .step) { counter-reset: step; }

.step {
  position: relative;
  padding-left: 62px;
  margin-bottom: 30px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-600);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
}
.step h3 { margin-bottom: .3rem; }
.step p:last-child { margin-bottom: 0; }
.step p { color: var(--text-muted); }

/* ---------- Kartu artikel ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--brand-400);
  }
}

.post-thumb-link { display: block; line-height: 0; }

/* width dan height pada <img> menetapkan rasio sebelum berkas terunduh,
   sehingga tinggi kartu tidak berubah saat gambar masuk. */
.post-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface-2);
}

/* Gambar utama artikel.
   Rasio 16:9 pada kolom selebar 800px menghasilkan tinggi 450px — cukup
   untuk mendorong seluruh teks keluar dari layar pertama. Tingginya
   dibatasi, dengan object-fit memotong bagian atas dan bawah. */
.article-hero {
  margin: 0 0 28px;
}
.article-hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-2);
}
@media (max-width: 760px) {
  .article-hero { margin-bottom: 20px; }
  .article-hero img { max-height: 220px; }
}

.post-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-cat {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--link);
  margin-bottom: 8px;
}
.post-body h3 { font-size: 1.1rem; line-height: 1.4; margin-bottom: .5rem; }
.post-body h3 a { color: var(--text); }
.post-body h3 a:hover { color: var(--link); text-decoration: none; }
.post-body p { font-size: .94rem; color: var(--text-muted); flex: 1; }

.post-meta {
  font-size: .82rem;
  color: var(--text-faint);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* ---------- Isi artikel ---------- */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: start;
}

.article-body { font-size: 1.06rem; }
.article-body > h2 { margin-top: 2.2em; padding-top: .2em; }
.article-body > h3 { margin-top: 1.7em; }
.article-body > *:first-child { margin-top: 0; }
.article-body img { border-radius: var(--radius); margin: 1.6rem 0; }
.article-body figure { margin: 1.8rem 0; }
.article-body figcaption {
  font-size: .88rem;
  color: var(--text-faint);
  text-align: center;
  margin-top: .6rem;
}

/* Tabel: dibungkus .table-wrap agar bisa digeser mendatar di layar sempit
   tanpa merusak lebar halaman. Tanpa ini, tabel 5–7 kolom memaksa
   scroll horizontal pada seluruh dokumen. */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.8rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  /* Petunjuk visual bahwa area ini bisa digeser */
  background:
    linear-gradient(to right, var(--surface) 30%, transparent),
    linear-gradient(to left,  var(--surface) 30%, transparent) 100% 0,
    radial-gradient(farthest-side at 0 50%, rgba(15, 23, 42, .12), transparent),
    radial-gradient(farthest-side at 100% 50%, rgba(15, 23, 42, .12), transparent) 100% 0;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
  background-color: var(--surface);
}
.table-wrap:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 2px; }

.article-body table,
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: .95rem;
  background: transparent;
}
.article-body th, .article-body td {
  border-bottom: 1px solid var(--border);
  padding: .72em .9em;
  text-align: left;
  vertical-align: top;
}
.article-body th {
  background: var(--surface-2);
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.article-body tbody tr:last-child td { border-bottom: 0; }
.article-body td { min-width: 8ch; }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  font-size: .88rem;
  color: var(--text-muted);
  padding: 14px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.article-meta .tag {
  background: var(--brand-100);
  color: var(--link);
  padding: .25em .8em;
  border-radius: 999px;
  font-weight: 700;
  font-size: .78rem;
}

.toc {
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin: 0 0 32px;
}
.toc h2 {
  font-size: .95rem;
  margin: 0 0 .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}
.toc ol { margin: 0; padding-left: 1.2em; font-size: .95rem; }
.toc li { margin-bottom: .3em; }

.callout {
  border: 1px solid var(--callout-border);
  border-left: 4px solid var(--brand-500);
  background: var(--callout-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 1.8rem 0;
}
.callout strong { color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.callout.warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  border-left-color: var(--accent-500);
}
.callout.warn strong { color: var(--warn-text); }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 14px;
  background: var(--surface);
}
.faq-item h3 { font-size: 1.02rem; margin-bottom: .45rem; margin-top: 0; }
.faq-item p:last-child { margin-bottom: 0; color: var(--text-muted); font-size: .97rem; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  /* Jika isi sidebar lebih tinggi dari viewport, sticky akan macet.
     Batasi tinggi dan izinkan gulir internal. */
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 24px;
}
.widget:last-child { margin-bottom: 0; }
.widget h2 {
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.widget ul { list-style: none; padding: 0; margin: 0; font-size: .94rem; }
.widget li { padding: 9px 0; border-bottom: 1px solid var(--border); line-height: 1.5; }
.widget li:last-child { border-bottom: 0; }
.widget p:last-child { margin-bottom: 0; }

/* ---------- Band ajakan bertindak ---------- */
.cta-band {
  background: linear-gradient(140deg, var(--brand-800), var(--brand-600));
  color: var(--on-dark);
  border-radius: var(--radius-lg);
  padding: 52px 44px;
  text-align: center;
}
.cta-band h2 { color: var(--on-dark); }
.cta-band p { color: var(--on-dark-soft); max-width: 58ch; margin-inline: auto; }

/* ---------- Kotak penulis ---------- */
.author-box {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: var(--bg-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin: 40px 0 0;
}
.author-avatar {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 50%;
  background: var(--brand-600);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.2rem;
}
.author-box h3 { font-size: 1rem; margin-bottom: .25rem; margin-top: 0; }
.author-box p { font-size: .92rem; margin-bottom: 0; color: var(--text-muted); }

.related { margin-top: 48px; }
.related h2 { font-size: 1.3rem; }

.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 1.2rem; }
.badge {
  font-size: .8rem;
  font-weight: 700;
  padding: .35em .9em;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-body);
}

/* ---------- Formulir ---------- */
.form-grid { display: grid; gap: 18px; }

.field label {
  display: block;
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
  margin-bottom: .4em;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .8em 1em;
  font: inherit;
  font-size: .96rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  min-height: 44px;
}
.field textarea { resize: vertical; min-height: 140px; }
/* Checkbox & radio tidak boleh ikut aturan width:100% di atas */
.field input[type="checkbox"],
.field input[type="radio"] {
  width: auto;
  min-height: 0;
  /* target sentuh tetap memadai */
  inline-size: 20px;
  block-size: 20px;
  margin-top: 3px;
  flex: none;
  accent-color: var(--brand-600);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand-500);
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-100);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-faint); }
.field small { color: var(--text-muted); font-size: .82rem; }

.field-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  font-size: .92rem;
  color: var(--text-body);
}
.form-note { font-size: .86rem; color: var(--text-muted); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-900);
  color: var(--on-dark-faint);
  padding: 58px 0 26px;
  font-size: .94rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 36px;
}
.site-footer h3 {
  color: var(--on-dark);
  font-size: .88rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1rem;
}
.site-footer a { color: var(--on-dark-soft); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .25em; }
/* Target sentuh yang memadai untuk tautan footer di ponsel */
.site-footer li a {
  display: inline-block;
  padding: .35em 0;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--on-dark);
  font-weight: 800;
  font-size: 1.12rem;
  margin-bottom: 1rem;
}
.footer-logo:hover { text-decoration: none; color: #fff; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--on-dark-line);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  font-size: .86rem;
  color: var(--on-dark-faint);
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Banner persetujuan ---------- */
.consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 900;
  max-width: 880px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 22px 24px;
  display: none;
  /* Aman untuk perangkat dengan area gestur di bawah layar */
  margin-bottom: env(safe-area-inset-bottom, 0);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
.consent.is-open { display: block; }
.consent h2 { font-size: 1.05rem; margin-bottom: .5rem; }
.consent p { font-size: .9rem; color: var(--text-muted); margin-bottom: 1rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.consent .btn { padding: .7em 1.3em; font-size: .9rem; }

/* ==========================================================================
   5. SLOT IKLAN
   ========================================================================== */
.ad-slot {
  margin: 32px auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  /* Slot tidak boleh memaksa halaman melebar bila kreatif lebih lebar
     dari kolomnya (mis. 970px pada layar 800px). */
  max-width: 100%;
  overflow: hidden;
}
.ad-slot--inline { max-width: 728px; }
.ad-slot--sidebar { margin: 0 0 24px; }

.ad-label {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 700;
  line-height: 1;
}

.ad-slot > div[id^="gk-ad"] { margin-inline: auto; max-width: 100%; }

/* Ruang cadangan agar tidak terjadi pergeseran tata letak (CLS).
   Nilai disesuaikan per breakpoint mengikuti ukuran kreatif yang
   didaftarkan di ads.js. */
.ad-reserve-970 { min-height: 250px; width: 100%; }
.ad-reserve-728 { min-height: 90px;  width: 100%; }
.ad-reserve-336 { min-height: 280px; width: 100%; }
.ad-reserve-300 { min-height: 250px; width: 100%; }

/* ==========================================================================
   6. RESPONSIF
   ========================================================================== */

/* --- Laptop kecil --- */
@media (max-width: 1080px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; }
}

/* --- Tablet --- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .hero h1 { max-width: none; }

  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }
  /* Di layar sempit sidebar menjadi baris — tampilkan berdampingan
     agar tidak menjadi kolom panjang yang membosankan. */
  .sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .sidebar .ad-slot { grid-column: 1 / -1; }

  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
  .section { padding: 60px 0; }
}

/* --- Ponsel --- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 48px 0; }
  .section-sm { padding: 36px 0; }

  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px var(--gutter) 20px;
    display: none;
    box-shadow: var(--shadow);
    /* Menu panjang tetap bisa digulir pada layar pendek */
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .75em .9em; }
  .nav .btn { margin-top: 8px; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .sidebar { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; }

  .hero { padding: 60px 0 54px; }
  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    text-align: left;
  }
  .hero-stats strong { font-size: 1.35rem; }
  .hero-stats span { font-size: .78rem; }

  .page-head { padding: 44px 0 38px; }
  .cta-band { padding: 38px 24px; }
  .author-box { flex-direction: column; }
  .card { padding: 22px; }
  .toc { padding: 18px 20px; }
  .callout { padding: 16px 18px; }

  .step { padding-left: 52px; }
  .step::before { width: 38px; height: 38px; font-size: .95rem; }

  .article-body { font-size: 1.02rem; }
  .article-body th, .article-body td { padding: .6em .7em; font-size: .92rem; }

  .consent { padding: 18px; left: 10px; right: 10px; bottom: 10px; }
  .consent-actions .btn { flex: 1 1 auto; }

  /* Ukuran cadangan slot iklan mengikuti kreatif mobile */
  .ad-reserve-970 { min-height: 100px; }
  .ad-reserve-728 { min-height: 100px; }
  .ad-slot { margin: 26px auto; }
}

/* --- Ponsel kecil --- */
@media (max-width: 400px) {
  :root { --gutter: 16px; }
  .hero-stats { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .btn { padding: .75em 1.2em; font-size: .92rem; }
  .btn-row { gap: 10px; }
  .btn-row .btn { flex: 1 1 100%; }
}

/* ==========================================================================
   7. PREFERENSI PENGGUNA
   ========================================================================== */

/* --- Kurangi gerak --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover, .card:hover, .post-card:hover { transform: none; }
}

/* --- Kontras tinggi --- */
@media (prefers-contrast: more) {
  :root {
    --border: #94a3b8;
    --border-strong: #475569;
    --text-body: #1e293b;
    --text-muted: #334155;
  }
  a { text-decoration: underline; }
  .btn-ghost { border-color: currentColor; }
}

/* --- Cetak --- */
@media print {
  .site-header,
  .site-footer,
  .ad-slot,
  .consent,
  .sidebar,
  .breadcrumb,
  .related,
  .btn-row,
  .skip-link { display: none !important; }

  body { font-size: 11pt; color: #000; background: #fff; }
  .article-layout { grid-template-columns: 1fr; }
  .hero, .page-head, .cta-band {
    background: none !important;
    color: #000 !important;
    padding: 0 0 16pt;
  }
  .hero h1, .page-head h1, .hero .lead, .page-head p { color: #000 !important; }
  .table-wrap { overflow: visible; border: 0; background: none; }
  .article-body th, .article-body td { border: 1px solid #999; }
  h2, h3 { break-after: avoid; }
  table, figure, .callout { break-inside: avoid; }
  /* Tampilkan alamat tautan agar berguna di kertas */
  .article-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
    word-break: break-all;
  }
}

/* ==========================================================================
   8. UTILITAS KECIL
   ========================================================================== */
/* Header seksi: judul di kiri, tautan "lihat semua" di kanan.
   Menumpuk otomatis di layar sempit. */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 34px;
}
.section-head > div { min-width: 0; }

.head-center { margin-bottom: 44px; }
.split { align-items: center; gap: 52px; }
.stack-sm { gap: 18px; }
.text-sm { font-size: .86rem; }
.text-sm-2 { font-size: .94rem; }
.m-0 { margin: 0; }

@media (max-width: 760px) {
  .section-head { margin-bottom: 26px; }
  .head-center { margin-bottom: 32px; }
  .split { gap: 32px; }
}
.mt-28 { margin-top: 28px; }
.mt-32 { margin-top: 32px; }
.section-lg { padding: 96px 0; }
.meta-updated { color: var(--text-faint); margin-bottom: 1.5rem; }
@media (max-width: 760px) { .section-lg { padding: 60px 0; } }
.split-top { gap: 48px; align-items: start; }
@media (max-width: 760px) { .split-top { gap: 30px; } }
.text-left { text-align: left; }

/* Status pengiriman formulir kontak */
.form-note.is-success {
  color: var(--ok-600);
  font-weight: 600;
}
.form-note.is-error {
  color: #b91c1c;
  font-weight: 600;
}
@media (prefers-color-scheme: dark) {
  .form-note.is-success { color: #34d399; }
  .form-note.is-error   { color: #f87171; }
}
