/* ============================================================
   pahang.co articles — block content (article page + the editor, so writing looks like the result)
   Prefix ab- (never ad-/-ad/banner/sponsor: ad blockers hide those).
   Tokens from main.css: --navy --blue --accent --pale --border --muted --charcoal
   ============================================================ */

.ab-body { font-size: 17px; line-height: 1.8; color: var(--charcoal); overflow-wrap: break-word; }
.ab-body > * + * { margin-top: 1.1em; }
.ab-body h2, .ab-body h3, .ab-body h4 { font-family: 'Playfair Display', serif; color: var(--navy); line-height: 1.25; scroll-margin-top: 76px; font-feature-settings: 'lnum' 1; }
.ab-body h2 { font-size: 26px; margin-top: 1.7em; }
.ab-body h3 { font-size: 21px; margin-top: 1.5em; }
.ab-body h4 { font-size: 18px; margin-top: 1.3em; font-family: 'DM Sans', sans-serif; font-weight: 700; }
.ab-body a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ab-body mark { background: #fef3c7; padding: 0 2px; border-radius: 3px; }
.ab-body code { background: #f1f5f9; padding: 1px 6px; border-radius: 5px; font-size: .9em; }
.ab-body strong, .ab-body b { color: var(--navy); }
[lang="zh-Hans"] .ab-body, .ab-body[lang="zh-Hans"] { line-height: 1.95; letter-spacing: .02em; }

.ab-list { padding-left: 1.3em; }
.ab-list li + li { margin-top: .35em; }
.ab-list .ab-list { margin-top: .35em; }
.ab-list.is-checklist { list-style: none; padding-left: 0; }
.ab-check { display: inline-block; width: 18px; height: 18px; border: 2px solid #cbd5e1; border-radius: 5px; vertical-align: -3px; margin-right: 10px; }
.ab-check.is-on { background: #16a34a; border-color: #16a34a; box-shadow: inset 0 0 0 3px #fff; }

.ab-quote { border-left: 4px solid var(--accent); padding: 4px 0 4px 20px; font-family: 'Playfair Display', serif; font-size: 21px; line-height: 1.5; color: var(--navy); font-style: normal; background: none; }
.ab-quote p { margin: 0; }
.ab-quote cite { display: block; font: 600 13px 'DM Sans', sans-serif; color: var(--muted); font-style: normal; margin-top: 8px; }
.ab-hr { border: 0; text-align: center; margin: 2em 0 !important; }
.ab-hr::before { content: '◆ ◆ ◆'; color: #cbd5e1; letter-spacing: 10px; font-size: 11px; }

.ab-tip { background: #fffbeb; border: 1px solid #fde68a; border-left: 4px solid var(--accent); border-radius: 12px; padding: 14px 18px; font-size: 15px; line-height: 1.65; }
.ab-tip strong { display: block; color: #92400e; margin-bottom: 4px; }
.ab-tip p { margin: 0; }

.ab-table { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.ab-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.ab-table th, .ab-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.ab-table th { background: var(--pale); color: var(--navy); font-weight: 700; }
.ab-table tr:last-child td { border-bottom: 0; }
@media (max-width: 480px) { .ab-table th, .ab-table td { padding: 9px 8px; font-size: 13px; } }

.ab-figure { margin-left: 0; margin-right: 0; }
.ab-figure img { width: 100%; height: auto; display: block; border-radius: 12px; margin: 0; }
.ab-figure.is-border img { border: 1px solid var(--border); }
.ab-figure.is-bg { background: var(--pale); padding: 16px; border-radius: 14px; }
.ab-figure.is-bg img { max-width: 70%; margin: 0 auto; }
.ab-figure figcaption, .ab-video figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; line-height: 1.5; }

.ab-video { margin-left: 0; margin-right: 0; }
.ab-video-box { position: relative; aspect-ratio: 16 / 9; background: #0f172a; border-radius: 12px; overflow: hidden; }
.ab-video-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ab-video.is-portrait .ab-video-box { aspect-ratio: 9 / 16; max-width: 340px; margin: 0 auto; }
.ab-video.is-tiktok .ab-video-box { aspect-ratio: auto; height: 740px; max-width: 340px; margin: 0 auto; background: #fff; }

/* Directory cards inside an article (markup = .pcard from articles.css) */
.ab-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; font-size: 14px; line-height: 1.4; }
.ab-cards.is-one { grid-template-columns: minmax(0, 300px); }
.ab-cards .pcard { margin: 0; }
.ab-body .ab-cards a { text-decoration: none; }
.ab-body .ab-cards .pcard-name { color: var(--navy); }
@media (min-width: 700px) { .ab-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ab-grid-block { background: var(--pale); border: 1px solid #dbeafe; border-radius: 16px; padding: 16px; }
.ab-grid-block h3 { margin: 0 0 12px !important; font-size: 18px !important; }

/* Ranking ("Top 5") */
.ab-rank { border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: #fff; }
.ab-rank-h { margin: 0 !important; padding: 14px 18px; background: var(--navy); color: #fff !important; font-size: 19px !important; }
.ab-rank ol { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.ab-rank-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 4px 14px; padding: 18px; border-top: 1px solid var(--border); }
.ab-rank-item:first-child { border-top: 0; }
.ab-rank-n {
    grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    background: var(--pale); color: var(--navy); font: 900 22px/1 'Playfair Display', serif; font-feature-settings: 'lnum' 1;
}
.ab-rank-item:first-child .ab-rank-n { background: var(--accent); color: #1f1300; }
.ab-rank-body h4 { margin: 0 !important; font: 700 19px/1.3 'DM Sans', sans-serif; color: var(--navy); }
.ab-rank-area { font-size: 13px; color: var(--muted); margin-top: 3px; }
.ab-rank-body p { margin: 8px 0 0; font-size: 16px; line-height: 1.7; }
.ab-rank-link { display: inline-block; margin-top: 8px; font-size: 14px; font-weight: 700; }
.ab-rank-card { grid-column: 2; max-width: 280px; margin-top: 10px; }
.ab-rank-card .pcard { margin: 0; }
.ab-body .ab-rank-card a { text-decoration: none; }
@media (min-width: 700px) {
    .ab-rank-item { grid-template-columns: 52px minmax(0, 1fr) 220px; align-items: start; }
    .ab-rank-n { grid-row: auto; }
    .ab-rank-card { grid-column: 3; grid-row: 1; margin-top: 0; }
}

/* Article page furniture for block articles */
.ab-toc { background: var(--pale); border: 1px solid #dbeafe; border-radius: 14px; padding: 14px 18px; margin: 0 0 24px; }
.ab-toc summary { font-weight: 700; color: var(--navy); cursor: pointer; font-size: 14px; }
.ab-toc ol { margin: 10px 0 0 18px; font-size: 14px; line-height: 1.9; }
.ab-toc a { color: var(--blue); text-decoration: none; }
.ab-toc a:hover { text-decoration: underline; }
.ab-spot { margin: 1.6em 0; }
.ab-draft { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.ab-draft a { color: var(--blue); font-weight: 700; }
