/* ==========================================================================
   Halaman artikel (/artikel dan /artikel/<slug>).
   Sepadan dengan landing.css (tema gelap yang sama), di-scope di .ar.
   ========================================================================== */

.ar {
  --ar-w: 1080px;
  --ar-r: 14px;
  --ar-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ar-narrow: 720px;
}
.ar-wrap { max-width: var(--ar-w); margin: 0 auto; padding: 0 18px; width: 100%; }
.ar-narrow { max-width: var(--ar-narrow); margin: 0 auto; }

/* --- Kepala halaman --- */
.ar-head { padding: 40px 0 8px; }
.ar-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--green); margin-bottom: 12px;
}
.ar-eyebrow::before { content: ""; width: 16px; height: 1px; background: var(--green); }
.ar-h1 { font-size: 32px; line-height: 1.2; letter-spacing: -.025em; font-weight: 800; margin-bottom: 12px; }
.ar-lead { color: var(--muted); font-size: 13.5px; line-height: 1.8; max-width: 62ch; }

/* --- Saringan tag --- */
.ar-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 6px; }
.ar-tag {
  font-size: 11.5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--panel2); color: var(--muted); text-decoration: none;
}
.ar-tag:hover { border-color: var(--blue); color: var(--blue); }
.ar-tag.on { border-color: var(--green); color: var(--green); background: var(--green-bg); font-weight: 700; }

/* --- Daftar artikel --- */
.ar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
.ar-card {
  display: flex; flex-direction: column; gap: 9px; text-decoration: none; color: inherit;
  border: 1px solid var(--border); border-radius: var(--ar-r); padding: 18px 17px;
  background: var(--panel); transition: transform .16s ease, border-color .16s ease;
}
.ar-card:hover { transform: translateY(-2px); border-color: var(--green); }
.ar-card-ic { font-size: 20px; line-height: 1; }
.ar-card time { font-family: var(--ar-mono); font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }
.ar-card h2 { font-size: 15px; line-height: 1.45; letter-spacing: -.01em; }
.ar-card p { color: var(--muted); font-size: 12.5px; line-height: 1.75; flex: 1; }
.ar-card .more { font-size: 12px; font-weight: 700; color: var(--green); }
.ar-card .kt { display: flex; gap: 6px; flex-wrap: wrap; }
.ar-card .kt span {
  font-size: 11px; color: var(--muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 7px;
}
.ar-kosong { color: var(--muted); font-size: 13px; padding: 40px 0; text-align: center; }

/* --- Navigasi halaman --- */
.ar-pager { display: flex; gap: 10px; justify-content: center; align-items: center; margin: 26px 0 8px; }
.ar-pager a, .ar-pager span {
  font-size: 12.5px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border);
  color: var(--text); text-decoration: none;
}
.ar-pager a:hover { border-color: var(--blue); color: var(--blue); }
.ar-pager .now { color: var(--muted); border-style: dashed; }

/* --- Halaman detail --- */
.ar-crumb { font-size: 11.5px; color: var(--muted); padding: 26px 0 0; line-height: 1.7; }
.ar-crumb a { color: var(--muted); text-decoration: none; }
.ar-crumb a:hover { color: var(--blue); text-decoration: underline; }
.ar-article { padding: 18px 0 10px; }
.ar-title { font-size: 34px; line-height: 1.18; letter-spacing: -.03em; font-weight: 800; margin-bottom: 14px; }
.ar-meta {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; color: var(--muted);
  font-size: 11.5px; padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.ar-meta .mono { font-family: var(--ar-mono); }
.ar-meta .pill { border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; }

/* Isi artikel (HTML dari admin) */
.ar-body { font-size: 15px; line-height: 1.9; color: var(--text); }
.ar-body p { margin: 0 0 18px; }
.ar-body h2 {
  font-size: 21px; line-height: 1.35; margin: 34px 0 14px; letter-spacing: -.02em;
  padding-left: 12px; border-left: 3px solid var(--green);
}
.ar-body h3 { font-size: 16.5px; margin: 26px 0 10px; }
.ar-body ul, .ar-body ol { margin: 0 0 18px 22px; }
.ar-body li { margin-bottom: 8px; }
.ar-body b, .ar-body strong { color: #fff; }
.ar-body a { color: var(--blue); }
.ar-body code { font-family: var(--ar-mono); background: var(--panel2); padding: 2px 6px; border-radius: 5px; font-size: 13px; }
.ar-body table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 13.5px; }
.ar-body th, .ar-body td { border: 1px solid var(--border); padding: 9px 11px; text-align: left; vertical-align: top; }
.ar-body th { background: var(--panel2); font-weight: 700; }
.ar-body tr:nth-child(even) td { background: rgba(28, 35, 44, .4); }
.ar-body img { max-width: 100%; height: auto; border-radius: 10px; }
.ar-body blockquote {
  border-left: 3px solid var(--blue); margin: 0 0 18px; padding: 4px 0 4px 14px; color: var(--muted);
}

/* --- Ajakan di akhir artikel --- */
.ar-cta {
  margin: 34px 0 8px; border: 1px solid var(--border); border-radius: 16px; padding: 22px 20px;
  background:
    radial-gradient(520px 180px at 10% 0%, rgba(46, 160, 67, .16), transparent 70%),
    var(--panel);
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.ar-cta h3 { font-size: 17px; margin-bottom: 6px; }
.ar-cta p { color: var(--muted); font-size: 12.5px; }
.ar-btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; border-radius: 9px;
  padding: 11px 18px; font-size: 13px; font-weight: 700; border: 1px solid transparent;
}
.ar-btn.pri { background: var(--green); color: #fff; }
.ar-btn.pri:hover { filter: brightness(1.09); }
.ar-btn.ghost { border-color: var(--border); color: var(--text); }
.ar-btn.ghost:hover { border-color: var(--blue); color: var(--blue); }

/* --- Artikel terkait --- */
.ar-rel { margin-top: 34px; }
.ar-rel h3 { font-size: 15px; margin-bottom: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.ar-rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ar-rel-grid a {
  text-decoration: none; color: inherit; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; background: var(--panel); display: flex; flex-direction: column; gap: 7px;
}
.ar-rel-grid a:hover { border-color: var(--green); }
.ar-rel-grid b { font-size: 13.5px; line-height: 1.5; }
.ar-rel-grid time { font-family: var(--ar-mono); font-size: 10.5px; color: var(--muted); }

/* --- Catatan penafian --- */
.ar-note {
  margin-top: 30px; border: 1px solid var(--border); border-left: 2px solid var(--yellow);
  border-radius: 10px; padding: 13px 15px; background: rgba(210, 153, 34, .05);
}
.ar-note p { color: var(--muted); font-size: 11.5px; line-height: 1.8; }
.ar-note a { color: var(--yellow); }

/* --- Fokus & responsif --- */
.ar a:focus-visible, .ar button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
@media (max-width: 900px) {
  .ar-grid { grid-template-columns: repeat(2, 1fr); }
  .ar-rel-grid { grid-template-columns: 1fr; }
  .ar-title { font-size: 28px; }
}
@media (max-width: 560px) {
  .ar-h1 { font-size: 25px; }
  .ar-grid { grid-template-columns: 1fr; }
  .ar-title { font-size: 23px; }
  .ar-body { font-size: 14.5px; }
  .ar-body h2 { font-size: 18.5px; }
}
