/* Glosarium: halaman yang dirender server (src/glossary/render.ts). Token warna dari style.css. */
body.gl .top { padding-left: max(24px, calc((100% - 1180px) / 2 + 24px)); padding-right: max(24px, calc((100% - 1180px) / 2 + 24px)); }
.gl-main { background: var(--bg); }
.gl-main::before { content: ""; position: absolute; inset: 0 0 auto; height: 420px; z-index: -1; pointer-events: none;
  background: radial-gradient(560px 280px at 10% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    radial-gradient(480px 260px at 92% 10%, color-mix(in srgb, var(--accent-2) 9%, transparent), transparent 70%); }

/* indeks */
.gl-hero { padding-top: 56px; padding-bottom: 8px; }
.gl-hero .gl-crumb { margin-bottom: 14px; }
.gl-hero .gl-chips { margin-top: 24px; }
.gl-list > .gl-grid, .gl-list > .gl-topics { margin-top: 32px; }
.gl-lead { max-width: 62ch; color: var(--muted); font-size: 16.5px; margin: 14px 0 0; }
.gl-search { margin-top: 28px; display: flex; align-items: center; gap: 10px; max-width: 640px; padding: 0 14px; border: 1px solid var(--border); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.gl-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.gl-search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.gl-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: 500 15.5px var(--font); padding: 14px 0; }
.gl-count { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.gl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.gl-chips a, .gl-chips button { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.gl-chips a { text-decoration: none; white-space: nowrap; }
.gl-chips a:hover, .gl-chips button:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface); }
.gl-chips a.on, .gl-chips button.on { color: var(--accent-text); background: var(--accent); border-color: var(--accent); }
.gl-list { padding-top: 12px; }
.gl-sec { margin-top: 40px; }
.gl-sec-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.gl-sec-head h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.gl-sec-head p { margin: 0; font-size: 14px; color: var(--muted); }
.gl-sec-head h2 a { color: inherit; text-decoration: none; }
.gl-sec-head h2 a:hover { color: var(--accent); }
.gl-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.gl-topic { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s, box-shadow .15s; }
.gl-topic:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-1px); box-shadow: var(--shadow); }
.gl-topic-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.gl-topic-head strong { font-size: 16.5px; letter-spacing: -.015em; }
.gl-topic-head em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 99px; }
.gl-topic-desc { font-size: 14px; color: var(--muted); }
.gl-topic-terms { font-size: 12.5px; color: var(--muted); opacity: .85; margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--border); }
.gl-results { margin-top: 32px; }
.gl-card .gl-card-cat { color: var(--accent); font-weight: 600; font-size: 11.5px; }
.gl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.gl-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s, box-shadow .15s; }
.gl-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-1px); box-shadow: var(--shadow); }
.gl-card strong { font-size: 15.5px; letter-spacing: -.01em; }
.gl-card small { font-size: 12px; color: var(--muted); }
.gl-card span { font-size: 13.5px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.gl-empty { margin-top: 40px; color: var(--muted); }

/* halaman istilah: sidebar daftar isi + artikel */
.gl-doc { display: grid; grid-template-columns: 250px minmax(0, 760px); gap: 56px; align-items: start; }
.gl-side { position: sticky; top: 24px; max-height: calc(100vh - 110px); overflow-y: auto; padding: 40px 8px 24px 0; font-size: 13.5px; scrollbar-width: thin; }
.gl-side-dom { margin: 18px 0 6px; }
.gl-side-dom:first-child { margin-top: 0; }
.gl-side-dom a { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.gl-side-dom a:hover { color: var(--accent); }
.gl-side summary { cursor: pointer; padding: 5px 0; font-weight: 650; color: var(--text); list-style: none; display: flex; align-items: baseline; gap: 6px; }
.gl-side summary::-webkit-details-marker { display: none; }
.gl-side summary::before { content: ""; flex: none; width: 6px; height: 6px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-2px) rotate(-45deg); transition: transform .15s; }
.gl-side details[open] > summary::before { transform: translateY(-3px) rotate(45deg); }
.gl-side summary span { font-weight: 500; font-size: 12px; color: var(--muted); }
.gl-side ul { list-style: none; margin: 2px 0 8px 2px; padding: 0 0 0 12px; border-left: 1px solid var(--border); }
.gl-side li a { display: block; padding: 4px 8px; margin-left: -13px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.gl-side li a:hover { color: var(--text); }
.gl-side li a.on { color: var(--accent); font-weight: 650; border-left-color: var(--accent); }
.gl-term { max-width: 760px; padding-top: 40px; padding-bottom: 24px; }
.gl-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.gl-pn a { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); text-decoration: none; transition: border-color .15s; }
.gl-pn a:hover { border-color: var(--accent); }
.gl-pn small { font-size: 12px; color: var(--muted); }
.gl-pn strong { font-size: 15.5px; color: var(--accent); }
.gl-pn-next { text-align: right; }
@media (max-width: 1060px) { .gl-doc { display: block; } .gl-side { display: none; } .gl-term { margin: 0 auto; } }
.gl-crumb { display: flex; gap: 8px; font-size: 13px; color: var(--muted); }
.gl-crumb a { color: var(--accent); text-decoration: none; font-weight: 600; }
.gl-term h1 { font-size: clamp(32px, 4.4vw, 46px); line-height: 1.1; letter-spacing: -.035em; margin: 14px 0 0; }
.gl-alias { margin: 8px 0 0; color: var(--muted); font-size: 14.5px; }
.gl-def { font-size: 19px; line-height: 1.55; margin: 18px 0 0; text-wrap: pretty; }
.gl-formula { margin-top: 20px; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.gl-formula span, .gl-prompt .lbl, .gl-check .lbl { font-size: 12px; font-weight: 700; color: var(--muted); }
.gl-formula code { font: 500 14px/1.6 var(--mono); color: var(--text); white-space: pre-wrap; }
.gl-note { color: var(--muted); margin: 16px 0 0; }
.gl-term h2 { font-size: 19px; letter-spacing: -.02em; margin: 36px 0 12px; }
.gl-prompts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gl-prompt { padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); }
.gl-prompt p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.55; }
.gl-prompt.vague .lbl { color: var(--bad); }
.gl-prompt.vague p { color: var(--muted); }
.gl-prompt.precise { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.gl-prompt.precise .lbl { color: var(--ok); }
.gl-prompt .term { color: var(--accent); font-weight: 650; background: var(--accent-soft); padding: 0 3px; margin: 0 -1px; border-radius: 4px; }
.gl-why { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.gl-check { margin-top: 22px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--coach); border: 1px solid color-mix(in srgb, #3b82f6 22%, var(--border)); }
.gl-check p { margin: 6px 0 0; font-size: 14.5px; }
.gl-related { display: flex; flex-wrap: wrap; gap: 8px; }
.gl-related a { font-size: 13.5px; font-weight: 600; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; }
.gl-related a:hover { border-color: var(--accent); color: var(--accent); }
.gl-cta { margin-top: 44px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.gl-cta div { display: flex; flex-direction: column; gap: 4px; }
.gl-cta span { font-size: 13.5px; color: rgba(255, 255, 255, .7); }
.gl-btn { background: #fff; color: #111; flex: none; }
.gl-btn:hover { transform: translateY(-1px); }

@media (max-width: 560px) {
  body.gl .top { padding-left: 16px; padding-right: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .gl-hero { padding-top: 36px; }
  .gl-count { display: none; }
  .gl-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .gl-chips a, .gl-chips button { flex: none; }
  .gl-topics { grid-template-columns: 1fr; }
  .gl-prompts { grid-template-columns: 1fr; }
  .gl-cta { flex-direction: column; align-items: flex-start; }
  .gl-pn { grid-template-columns: 1fr; }
}
