/* ==========================================================================
   Macam Travel — long-form article

   The travel guides carry the organic traffic, so they get a real editorial
   layout rather than a wall of <p>: a sticky contents rail, an at-a-glance box,
   itinerary blocks with times, price tables, callouts, and an FAQ built on
   <details> so it needs no JavaScript at all.

   Every class used inside an article body is whitelisted in RichText.cs —
   nothing here can be summoned by an author who has not been given the vocabulary.
   ========================================================================== */

/* ── Reading progress ───────────────────────────────────────────────────── */

.read-progress {
    position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 90;
    transform: scaleX(0); transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--mt-mint), var(--mt-green) 45%, var(--mt-amber));
}
@supports (animation-timeline: scroll()) {
    .read-progress { animation: readBar linear both; animation-timeline: scroll(root); }
    @keyframes readBar { to { transform: scaleX(1); } }
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

.article-layout {
    display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px;
    align-items: start; max-width: 1060px; margin: 0 auto; padding: 0 22px;
}
@media (max-width: 940px) {
    /* minmax(0, 1fr), not 1fr: a bare 1fr track has an auto minimum, so a wide table or an unbreakable contents entry widened the column past the viewport (4px on phones). */
    .article-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
}

.toc { position: sticky; top: 96px; }
.toc h2 {
    font-family: var(--ob-font); font-size: 12px; font-weight: 800;
    letter-spacing: .1em; text-transform: uppercase; color: var(--ob-faint); margin-bottom: 14px;
}
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a {
    display: block; padding: 7px 0 7px 26px; position: relative;
    font-size: 13.5px; font-weight: 600; line-height: 1.4;
    color: var(--ob-muted); text-decoration: none; overflow-wrap: anywhere;
    border-left: 2px solid var(--ob-line); margin-left: -2px;
    transition: color .25s ease, border-color .25s ease;
}
.toc a::before {
    content: counter(toc, decimal-leading-zero);
    position: absolute; left: 10px; top: 7px;
    font-size: 10.5px; font-weight: 700; color: var(--ob-faint); letter-spacing: .04em;
}
.toc a:hover { color: var(--ob-ink); text-decoration: none; }
.toc a.is-active { color: var(--mt-green); border-left-color: var(--mt-green); }
.toc a.is-active::before { color: var(--mt-green); }

@media (max-width: 940px) {
    .toc { position: static; border: 1px solid var(--ob-line); border-radius: var(--mt-r); padding: 18px 20px; background: #fff; }
}

/* ── Article head ───────────────────────────────────────────────────────── */

.article-head { max-width: 1060px; margin: 0 auto; padding: 0 22px; }
.article-head h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 20ch; }
.article-head .standfirst {
    font-size: clamp(1.05rem, 1.7vw, 1.28rem); line-height: 1.55;
    color: var(--ob-muted); max-width: 58ch; margin: 0 0 22px;
}

.article-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
    padding: 16px 0; border-top: 1px solid var(--ob-line); border-bottom: 1px solid var(--ob-line);
    font-size: 13px; color: var(--ob-muted);
}
.article-meta .who { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; color: var(--ob-ink); }
.article-meta .avatar {
    width: 30px; height: 30px; border-radius: 50%; flex: none;
    background: linear-gradient(135deg, var(--mt-mint), var(--mt-amber));
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: #0d3a2e;
}
.article-meta .sep { color: var(--ob-faint); }
.article-meta .checked {
    display: inline-flex; align-items: center; gap: 6px;
    background: #eef8f3; color: #0d6b4f; border-radius: 999px; padding: 4px 11px;
    font-size: 12px; font-weight: 700;
}

/* ── At a glance ────────────────────────────────────────────────────────── */

.glance {
    background: linear-gradient(140deg, #12352B, #1b4d3f);
    color: #fff; border-radius: var(--mt-r-lg); padding: 26px 28px; margin: 0 0 34px;
    position: relative; overflow: hidden;
}
.glance::after {
    content: ""; position: absolute; right: -14%; top: -55%;
    width: 340px; height: 340px; pointer-events: none;
    background: radial-gradient(circle, rgba(94,212,179,.24), transparent 62%);
}
.glance h2 {
    font-family: var(--ob-font); font-size: 12px; font-weight: 800; letter-spacing: .1em;
    text-transform: uppercase; color: var(--mt-mint); margin: 0 0 16px;
}
.glance dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px 26px; margin: 0; }
.glance dt {
    font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
    color: rgba(255,255,255,.55); margin-bottom: 4px;
}
.glance dd { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4; }

/* ── Prose ──────────────────────────────────────────────────────────────── */

.article-body { font-size: 17.5px; line-height: 1.78; color: #23262e; overflow-wrap: break-word; }
.article-body > p:first-of-type::first-letter {
    float: left; font-family: var(--mt-display); font-size: 3.5em; line-height: .84;
    font-weight: 600; padding: .06em .12em 0 0; color: var(--mt-green);
}
.article-body p { margin: 0 0 1.15em; }
.article-body .lead { font-size: 1.12em; color: var(--ob-ink); }

.article-body h2 {
    font-family: var(--mt-display); font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600;
    margin: 2.2em 0 .6em; scroll-margin-top: 96px; position: relative; padding-top: .5em;
}
.article-body h2::before {
    content: ""; position: absolute; top: 0; left: 0; width: 46px; height: 3px; border-radius: 2px;
    background: linear-gradient(90deg, var(--mt-mint), var(--mt-amber));
}
.article-body h3 { font-size: 1.2rem; font-weight: 700; margin: 1.9em 0 .5em; }

.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.3em; }
.article-body li { margin-bottom: .5em; }
.article-body a { color: var(--mt-green); text-decoration: underline; text-underline-offset: 3px; }
.article-body hr { border: 0; border-top: 1px solid var(--ob-line); margin: 2.6em 0; }

.article-body blockquote {
    margin: 1.8em 0; padding: 2px 0 2px 22px; border-left: 3px solid var(--mt-mint);
    font-family: var(--mt-display); font-size: 1.22em; line-height: 1.5; color: var(--ob-ink);
}
.article-body blockquote p:last-child { margin-bottom: 0; }

.article-body figure { margin: 2em 0; }
.article-body figure img { width: 100%; border-radius: var(--mt-r); display: block; }
.article-body figcaption {
    font-size: 13px; color: var(--ob-muted); margin-top: 10px; padding-left: 14px;
    border-left: 2px solid var(--ob-line); line-height: 1.5;
}
.article-body .figure-wide { margin-left: -40px; margin-right: -40px; }
@media (max-width: 940px) { .article-body .figure-wide { margin-left: 0; margin-right: 0; } }

/* ── Callouts ───────────────────────────────────────────────────────────── */

.article-body .callout {
    border-radius: var(--mt-r); padding: 18px 22px; margin: 1.8em 0;
    border: 1px solid var(--ob-line); background: #fff; font-size: .95em;
    position: relative; padding-left: 54px;
}
.article-body .callout p:last-child { margin-bottom: 0; }
.article-body .callout::before {
    position: absolute; left: 20px; top: 17px; font-size: 18px; line-height: 1;
}
.article-body .callout.tip   { background: #f0f9f4; border-color: #cbe8d9; }
.article-body .callout.tip::before   { content: "💡"; }
.article-body .callout.warn  { background: #fff8ec; border-color: #f0dcb8; }
.article-body .callout.warn::before  { content: "⚠️"; }
.article-body .callout.money { background: #f2f7fd; border-color: #cfdff2; }
.article-body .callout.money::before { content: "💰"; }
.article-body .callout.note::before  { content: "📌"; }

/* ── Itinerary blocks ───────────────────────────────────────────────────── */

.article-body .plan { margin: 1.8em 0; border-left: 2px solid var(--ob-line); padding-left: 0; }
.article-body .plan-step {
    display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 20px;
    padding: 0 0 26px 24px; position: relative;
}
.article-body .plan-step::before {
    content: ""; position: absolute; left: -7px; top: 6px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--mt-green); border: 3px solid var(--mt-bg);
}
.article-body .plan-step:last-child { padding-bottom: 0; }
.article-body .plan-time {
    font-weight: 800; font-size: 13.5px; letter-spacing: .02em; color: var(--mt-green);
    padding-top: 3px; font-variant-numeric: tabular-nums;
}
.article-body .plan-body p:last-child { margin-bottom: 0; }
.article-body .plan-body strong { display: block; margin-bottom: 2px; }

@media (max-width: 600px) {
    .article-body .plan-step { grid-template-columns: 1fr; gap: 4px; }
}

/* ── Tables ─────────────────────────────────────────────────────────────── */

.article-body table {
    width: 100%; border-collapse: collapse; margin: 1.8em 0; font-size: .92em;
    display: block; overflow-x: auto;
}
.article-body th {
    text-align: left; font-size: 11.5px; font-weight: 800; letter-spacing: .06em;
    text-transform: uppercase; color: var(--ob-faint);
    padding: 10px 14px; border-bottom: 2px solid var(--ob-line); white-space: nowrap;
}
.article-body td { padding: 12px 14px; border-bottom: 1px solid var(--ob-line); vertical-align: top; }
.article-body tbody tr:last-child td { border-bottom: 0; }
.article-body tfoot td {
    font-weight: 800; border-top: 2px solid var(--ob-line); border-bottom: 0;
    background: #faf8f4;
}
.article-body .price-table td:last-child,
.article-body .price-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Lists with intent ──────────────────────────────────────────────────── */

.article-body .checklist { list-style: none; padding-left: 0; }
.article-body .checklist li { position: relative; padding-left: 30px; }
.article-body .checklist li::before {
    content: ""; position: absolute; left: 4px; top: .45em; width: 14px; height: 7px;
    border-left: 2.4px solid var(--mt-green); border-bottom: 2.4px solid var(--mt-green);
    transform: rotate(-45deg);
}

.article-body .do-dont { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 1.8em 0; }
.article-body .do-dont > div { border-radius: var(--mt-r); padding: 18px 20px; border: 1px solid var(--ob-line); }
.article-body .do-dont .do { background: #f0f9f4; border-color: #cbe8d9; }
.article-body .do-dont .dont { background: #fdf3f3; border-color: #f2d5d5; }
.article-body .do-dont ul { margin: 0; padding-left: 1.15em; font-size: .94em; }
@media (max-width: 600px) { .article-body .do-dont { grid-template-columns: 1fr; } }

/* ── FAQ — native details, no JavaScript ────────────────────────────────── */

.faq { margin: 48px 0 0; }
.faq h2 { font-family: var(--mt-display); font-size: 1.7rem; font-weight: 600; margin-bottom: 18px; }
.faq details {
    border-bottom: 1px solid var(--ob-line);
}
.faq summary {
    list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative;
    font-weight: 700; font-size: 16px; line-height: 1.45;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: ""; position: absolute; right: 8px; top: 26px;
    width: 9px; height: 9px; border-right: 2px solid var(--ob-muted); border-bottom: 2px solid var(--ob-muted);
    transform: rotate(45deg); transition: transform .3s var(--ease-out, ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details[open] summary { color: var(--mt-green); }
.faq .answer { padding: 0 0 20px; color: var(--ob-muted); line-height: 1.7; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ── Share + footer ─────────────────────────────────────────────────────── */

.share { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 36px; }
.share span { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ob-faint); }

.disclosure {
    margin-top: 40px; padding: 18px 22px; border-radius: var(--mt-r);
    background: #faf8f4; border: 1px solid var(--ob-line);
    font-size: 13px; line-height: 1.6; color: var(--ob-muted);
}
.disclosure strong { color: var(--ob-ink); }
