/* Article Notion List / Detail (Content → Artikel). Template-independent: every rule is scoped to .an-* and colours
   fall back from the site's Theme Color tokens, so other templates can load this file unchanged later. No inline
   styles anywhere: the public CSP is style-src 'self'. */
.an-section {
    --an-text: var(--theme-text, #1f2328);
    --an-heading: var(--theme-dark, #111418);
    --an-muted: var(--theme-muted, #6b7280);
    --an-border: var(--theme-border, #e6e8eb);
    --an-surface: var(--theme-surface, #ffffff);
    --an-soft: var(--theme-surface-alt, #f6f7f8);
    --an-accent: var(--theme-primary, #2563eb);
    --an-radius: 14px;
    --an-max: 1180px;
    padding: 56px 0 72px;
    color: var(--an-text);
    background: var(--an-surface);
}
.an-container { width: min(100% - 32px, var(--an-max)); margin-inline: auto; }
/* Two classes deep on purpose: templates style ".site a" after this file loads, and article titles stay dark. */
.an-section.an-list a, .an-section.an-detail a { color: inherit; }
.an-section .an-card-title a, .an-section .an-panel-title { color: var(--an-heading); }
.an-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Category tones: soft tint + readable text (WCAG AA on the tint). */
.an-tone-0 { --an-tone-bg: #fdebec; --an-tone-fg: #9f2f2d; }
.an-tone-1 { --an-tone-bg: #e7f3f8; --an-tone-fg: #1f6c9f; }
.an-tone-2 { --an-tone-bg: #fbf3db; --an-tone-fg: #7a5a00; }
.an-tone-3 { --an-tone-bg: #edf3ec; --an-tone-fg: #346538; }
.an-tone-4 { --an-tone-bg: #f4f0f7; --an-tone-fg: #6940a5; }
.an-tone-5 { --an-tone-bg: #faecdd; --an-tone-fg: #8c4b14; }
.an-label { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; letter-spacing: .01em; line-height: 1.4;
    background: var(--an-tone-bg, var(--an-soft)); color: var(--an-tone-fg, var(--an-muted)); text-decoration: none; }
a.an-label:hover, a.an-label:focus-visible { filter: brightness(.96); text-decoration: underline; }
.an-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .55rem; background: var(--an-tone-fg); flex: none; }

/* ---------- List: two panels ---------- */
.an-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
/* min-width: 0 lets the panel shrink below its content, so the scrolling chip row on phones cannot widen the page. */
.an-panel { position: sticky; top: 24px; min-width: 0; }
.an-cats { min-width: 0; max-width: 100%; }
.an-section .an-panel-title { margin: 0 0 .75rem; font-size: clamp(2rem, 1.6rem + 1.4vw, 2.75rem); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; color: var(--an-heading); }
.an-section .an-panel-intro { margin: 0 0 1.75rem; color: var(--an-muted); font-size: .98rem; }
.an-cats ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.an-cat { display: flex; align-items: center; padding: .5rem .75rem; border-radius: 8px; color: var(--an-muted) !important; text-decoration: none; font-weight: 500; }
.an-cat:hover, .an-cat:focus-visible { background: var(--an-soft); color: var(--an-heading) !important; }
.an-cat.is-active { background: var(--an-soft); color: var(--an-heading) !important; font-weight: 700; }

.an-main { min-width: 0; }
.an-empty { padding: 3rem 1.5rem; border: 1px dashed var(--an-border); border-radius: var(--an-radius); text-align: center; color: var(--an-muted); }

.an-card { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.an-card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--an-radius); background: var(--an-soft); border: 1px solid var(--an-border); }
.an-card-media a { display: block; width: 100%; height: 100%; }
.an-card-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.an-card:hover .an-card-img { transform: scale(1.03); }
.an-card-noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 1rem; text-align: center;
    background: var(--an-tone-bg); color: var(--an-tone-fg); font-size: 1.35rem; font-weight: 700; }
.an-card-body { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.an-section .an-card-title { margin: 0; font-size: 1.22rem; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; color: var(--an-heading); }
.an-section .an-card-title a { text-decoration: none; }
.an-section .an-card-title a:hover, .an-section .an-card-title a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.an-section .an-card-excerpt { margin: 0; color: var(--an-muted); font-size: .97rem; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.an-section .an-meta { margin: .15rem 0 0; display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .88rem; color: var(--an-muted); }
.an-author { font-weight: 600; color: var(--an-text); }
.an-meta .an-author + .an-date::before { content: "·"; margin-right: .5rem; color: var(--an-muted); }
.an-avatar { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; flex: none;
    background: var(--an-heading); color: var(--an-surface); font-size: .78rem; font-weight: 700; }
.an-avatar-lg { width: 44px; height: 44px; font-size: 1.05rem; }

.an-card-featured { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 2rem; align-items: center; padding-bottom: 2.5rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--an-border); }
.an-section .an-card-featured .an-card-title { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem); line-height: 1.2; }
.an-section .an-card-featured .an-card-excerpt { font-size: 1.05rem; -webkit-line-clamp: 4; line-clamp: 4; }

.an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 2rem; }
.an-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.an-pager { margin-top: 3rem; }
.an-pager ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.an-pager a, .an-pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 .75rem; border-radius: 8px; border: 1px solid var(--an-border); text-decoration: none; font-weight: 600; }
.an-pager a:hover, .an-pager a:focus-visible { background: var(--an-soft); }
.an-pager span[aria-current] { background: var(--an-heading); border-color: var(--an-heading); color: var(--an-surface); }

/* ---------- Detail ---------- */
.an-read { max-width: 720px; margin-inline: auto; }
.an-back { display: inline-block; margin-bottom: 2rem; color: var(--an-muted) !important; text-decoration: none; font-weight: 500; }
.an-back:hover, .an-back:focus-visible { color: var(--an-heading) !important; text-decoration: underline; }
.an-preview-note { margin: 0 0 1.5rem; padding: .75rem 1rem; border-radius: 10px; background: #fff8e1; color: #6b4e00; border: 1px solid #f3dc8f; }
.an-section .an-detail-cat { margin: 0 0 1rem; }
.an-section .an-title { margin: 0 0 1.5rem; font-size: clamp(2rem, 1.5rem + 2vw, 3rem); line-height: 1.12; font-weight: 700; letter-spacing: -.025em; color: var(--an-heading); }
.an-lead { color: var(--an-muted); font-size: 1.1rem; }
.an-byline { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.25rem; }
.an-byline .an-author { display: block; }
.an-byline-meta { display: block; color: var(--an-muted); font-size: .92rem; }
.an-share { list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.an-share a { display: inline-flex; align-items: center; height: 34px; padding: 0 .85rem; border-radius: 999px; border: 1px solid var(--an-border); font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--an-text) !important; }
.an-share a:hover, .an-share a:focus-visible { background: var(--an-soft); }
.an-section .an-share-copy { display: inline-flex; align-items: center; height: 34px; padding: 0 .85rem; border-radius: 999px; border: 1px solid var(--an-border);
    background: transparent; font: inherit; font-size: .85rem; font-weight: 600; color: var(--an-text); cursor: pointer; }
.an-share-copy[hidden] { display: none; }
.an-share-copy:hover, .an-share-copy:focus-visible { background: var(--an-soft); }
.an-share-copy.is-copied { border-color: #2f855a; color: #276749; background: #f0fff4; }
.an-copy-buffer { position: fixed; top: -1000px; left: -1000px; opacity: 0; }
/* Copy feedback (created by article-notion.js). Bottom centre, above floating buttons, never blocks the page. */
.an-toast { position: fixed; left: 50%; bottom: 24px; z-index: 1080; max-width: min(92vw, 440px); padding: .8rem 1.1rem; border-radius: 12px;
    background: #111418; color: #fff; font-size: .95rem; line-height: 1.45; box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
    opacity: 0; visibility: hidden; transform: translate(-50%, 12px); transition: opacity .2s ease, transform .2s ease, visibility .2s; pointer-events: none; }
.an-toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.an-toast.is-error { background: #7f1d1d; }
.an-toast:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .an-toast { transition: none; } }
.an-share-end { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--an-border); color: var(--an-muted); font-weight: 600; }
.an-share-end .an-share { margin: 0; }
.an-hero { max-width: 960px; margin: 0 auto 2.5rem; border-radius: var(--an-radius); overflow: hidden; border: 1px solid var(--an-border); }
.an-hero-img { width: 100%; height: auto; display: block; }

.an-body { font-size: 1.125rem; line-height: 1.78; overflow-wrap: anywhere; }
.an-body > :first-child { margin-top: 0; }
.an-section .an-body p { margin: 0 0 1.25em; }
.an-section .an-body h2 { margin: 2em 0 .6em; font-size: 1.65rem; line-height: 1.25; letter-spacing: -.015em; color: var(--an-heading); }
.an-section .an-body h3 { margin: 1.7em 0 .5em; font-size: 1.32rem; line-height: 1.3; color: var(--an-heading); }
.an-section .an-body h4 { margin: 1.5em 0 .5em; font-size: 1.12rem; color: var(--an-heading); }
.an-body a { color: var(--an-accent); text-decoration: underline; text-underline-offset: 3px; }
.an-body ul, .an-body ol { margin: 0 0 1.25em; padding-left: 1.5em; }
.an-body li { margin: .3em 0; }
.an-body blockquote { margin: 1.75em 0; padding: .25em 0 .25em 1.25em; border-left: 4px solid var(--an-heading); font-size: 1.2rem; color: var(--an-heading); }
.an-body pre { margin: 1.5em 0; padding: 1rem 1.15rem; border-radius: 10px; background: #0f172a; color: #e2e8f0; font-size: .92rem; line-height: 1.6; overflow-x: auto; white-space: pre; }
.an-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.an-body :not(pre) > code { padding: .1em .35em; border-radius: 5px; background: var(--an-soft); }
.an-body img { max-width: 100%; height: auto; display: block; margin: 1.75em 0; border-radius: 10px; }
.an-body img.a-center { margin-inline: auto; }
.an-body figure { margin: 1.75em 0; }
.an-body figcaption { margin-top: .5rem; color: var(--an-muted); font-size: .9rem; text-align: center; }
.an-body figure.article-video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.an-body figure.article-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.an-body table { width: 100%; margin: 1.75em 0; border-collapse: collapse; font-size: .98rem; display: block; overflow-x: auto; }
.an-body th, .an-body td { padding: .6rem .8rem; border: 1px solid var(--an-border); text-align: left; vertical-align: top; }
.an-body th { background: var(--an-soft); font-weight: 700; }
.an-body hr { margin: 2.5em 0; border: 0; border-top: 1px solid var(--an-border); }
.an-body .a-left { text-align: left; } .an-body .a-center { text-align: center; } .an-body .a-right { text-align: right; } .an-body .a-justify { text-align: justify; }
.an-section .an-credit { margin: 2.5rem 0 0; padding: 1rem 1.15rem; border-radius: 10px; background: var(--an-soft); color: var(--an-muted); font-size: .95rem; }
.an-credit a { color: var(--an-accent); }

.an-related { margin-top: 4.5rem; padding-top: 3rem; border-top: 1px solid var(--an-border); }
.an-section .an-related-title { margin: 0 0 1.75rem; font-size: 1.5rem; color: var(--an-heading); }
.an-section .an-related .an-card-title { font-size: 1.08rem; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .an-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .an-panel { position: static; }
    .an-cats ul { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: .4rem; padding-bottom: .25rem; scrollbar-width: thin; }
    .an-cat { white-space: nowrap; border: 1px solid var(--an-border); border-radius: 999px; padding: .4rem .9rem; }
    .an-card-featured { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    .an-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .an-section { padding: 36px 0 56px; }
    .an-grid, .an-grid-3 { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .an-body { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) { .an-card-img { transition: none; } .an-card:hover .an-card-img { transform: none; } }

/* ---------- Template offsets ----------
   Katalog Produk-1 has a FIXED header (--header-h tall) that overlays the page, so the first section on a page starts
   below it, as .cm-first does for the Content modules. The templates with a sticky header keep the sticky category
   panel clear of it. */
.an-v-katalog-produk-1.an-first { padding-top: calc(var(--header-h, 74px) + 48px); }
.an-v-katalog-produk-1 .an-panel { top: calc(var(--header-h, 74px) + 24px); }
.an-v-katalog-produk-2 .an-panel { top: 112px; }
.an-v-choir-shc .an-panel { top: calc(var(--header-h, 76px) + 24px); }
@media (max-width: 991.98px) { .an-v-katalog-produk-1 .an-panel, .an-v-katalog-produk-2 .an-panel, .an-v-choir-shc .an-panel { top: auto; } }
@media (max-width: 575.98px) { .an-v-katalog-produk-1.an-first { padding-top: calc(var(--header-h, 68px) + 36px); } }
