:root {
  --accent: #f5c400;
  --accent-ink: #1a1a1a;
  --bg: #ffffff;
  --surface: #f6f6f4;
  --text: #16181d;
  --muted: #6b6f78;
  --line: #e7e7e3;
  --up: #0a8f4f;
  --down: #d23a2c;
  --radius: 12px;
  --font-head: 'Barlow Semi Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #111317;
  --surface: #1b1e24;
  --text: #eceef2;
  --muted: #9aa0ab;
  --line: #2a2e36;
  --up: #2ecc71;
  --down: #ff6b5e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: #c79f00; }
:root[data-theme="dark"] a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .4em; font-weight: 700; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--accent); padding: 8px 12px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 60px; }
.top-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font: 700 1.6rem/1 var(--font-head); letter-spacing: -.01em; }
.logo img { height: 40px; width: auto; }
.logo .logo-dark { display: none; }
:root[data-theme="dark"] .logo .logo-light { display: none; }
:root[data-theme="dark"] .logo .logo-dark { display: block; }
.offcanvas .logo img { height: 36px; }
.site-footer .logo img { height: 44px; margin-bottom: 8px; }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-style: italic; transform: rotate(-6deg); }
.icon-btn { background: none; border: 0; color: var(--text); width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; border-radius: 8px; }
.icon-btn:hover { background: var(--surface); }
.burger, .burger::before, .burger::after { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; position: relative; }
.burger::before, .burger::after { content: ''; position: absolute; left: 0; }
.burger::before { top: -7px; width: 16px; }
.burger::after { top: 7px; width: 12px; }
.theme-toggle { width: 46px; height: 24px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); position: relative; cursor: pointer; }
.theme-toggle span { position: absolute; top: 2px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); transition: transform .2s; }
:root[data-theme="dark"] .theme-toggle span { transform: translateX(21px); background: #fff; }
.search-drop { padding-bottom: 12px; }
.search-drop input, .oc-search input, .big-search input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }

.mainnav { border-top: 1px solid var(--line); }
.scroll-x { display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.scroll-x::-webkit-scrollbar { display: none; }
.mainnav a { padding: 11px 0; font-weight: 600; font-size: .95rem; border-bottom: 3px solid transparent; }
.mainnav a.active { border-color: var(--accent); }
.mainnav a.cta { margin-left: auto; }

.ticker { display: flex; align-items: center; gap: 12px; padding-top: 8px; padding-bottom: 8px; border-top: 1px solid var(--line); }
.ticker-label { flex: none; font-size: .78rem; font-weight: 600; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; }
.ticker-viewport { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-track { display: flex; gap: 40px; width: max-content; animation: ticker 60s linear infinite; }
.ticker-track a { font-weight: 600; font-size: .9rem; white-space: nowrap; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.stock-ticker { padding-top: 6px; padding-bottom: 6px; }
.stock-ticker .ticker-label { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stock-ticker .ticker-track { gap: 28px; animation-duration: 75s; }
.stock-ticker .stock { display: inline-flex; gap: 6px; align-items: baseline; font-size: .82rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.stock-ticker .stock b { font-weight: 700; color: var(--text); }
.stock-ticker .stock span:first-of-type { color: var(--text); }
.stock-ticker .up [data-v="chg"] { color: var(--up); }
.stock-ticker .down [data-v="chg"] { color: var(--down); }
.stock-ticker .flat [data-v="chg"] { color: var(--muted); }
.stock.flash-up, .stock.flash-down { border-radius: 4px; }
@keyframes ticker { to { transform: translateX(-50%); } }

.offcanvas { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.45); }
.offcanvas-panel { width: min(320px, 85vw); height: 100%; background: var(--bg); padding: 20px; overflow-y: auto; animation: slidein .2s ease-out; }
.offcanvas-panel .close { margin-left: auto; }
.offcanvas nav { display: flex; flex-direction: column; margin-top: 16px; }
.offcanvas nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.oc-search { margin-top: 16px; }
@keyframes slidein { from { transform: translateX(-100%); } }

/* ---------- Layout ---------- */
main { padding-top: 24px; padding-bottom: 48px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
@media (min-width: 992px) { .layout { grid-template-columns: minmax(0, 1fr) 320px; } .sidebar { position: sticky; top: 170px; align-self: start; } }
.block { margin-bottom: 44px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; border-bottom: 4px solid var(--accent); padding-bottom: 6px; margin-bottom: 20px; }
.section-head h2 { font-size: 2rem; margin: 0; }
.section-head .more { font-size: .85rem; font-weight: 600; color: var(--muted); }
.page-head { margin-bottom: 24px; border-bottom: 4px solid var(--accent); padding-bottom: 12px; }
.page-head h1 { font-size: 2.4rem; margin: 0; }
.page-head p { margin: 4px 0 0; }

/* ---------- Kartu ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: .78rem; color: var(--muted); margin-top: 6px; }
.meta a { color: var(--text); font-weight: 600; }
.meta .clock::before { content: '◷ '; }

.card-hero { position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; background: #222; }
.card-hero .thumb img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform .4s; }
.card-hero:hover img { transform: scale(1.03); }
.card-hero .overlay { position: absolute; inset: auto 0 0 0; padding: 28px 24px 22px; background: linear-gradient(transparent, rgba(0,0,0,.85)); color: #fff; }
.card-hero h2 { font-size: clamp(1.5rem, 3.2vw, 2.4rem); margin: 8px 0 0; }
.card-hero h2 a:hover { color: var(--accent); }
.card-hero .badge, .card-hero .meta, .card-hero .meta a { color: #fff; }

.card-list { display: grid; grid-template-columns: 1fr 42%; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.card-list:last-child { border-bottom: 0; }
.card-list h3 { font-size: 1.25rem; margin: 6px 0 0; }
.card-list .thumb img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; }
@media (min-width: 640px) { .card-list { grid-template-columns: 1fr 240px; } .card-list h3 { font-size: 1.4rem; } }

.card-grid .thumb img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; margin-bottom: 10px; }
.card-grid h3 { font-size: 1.15rem; margin: 6px 0 0; }
.card-grid .excerpt { color: var(--muted); font-size: .9rem; margin: 6px 0 0; }
.grid-3 { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.carousel { overflow: hidden; }
.carousel .track { display: flex; transition: transform .35s ease; }
.carousel .slide { flex: 0 0 100%; }
.carousel-nav { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.carousel-nav button, .pagination a, .pagination span { border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 8px; padding: 6px 12px; font: 600 .85rem var(--font-body); cursor: pointer; }
.carousel-nav button:disabled { opacity: .4; cursor: default; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.pagination .current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- Sidebar ---------- */
.widget { margin-bottom: 32px; }
.widget-title { font-size: 1.4rem; border-bottom: 3px solid var(--accent); padding-bottom: 4px; }
.rank-list { list-style: none; padding: 0; margin: 0; }
.card-rank { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.card-rank .num { font: 700 2rem/1 var(--font-head); color: var(--accent); min-width: 28px; }
.card-rank h4 { font-size: 1.05rem; margin: 0; }
.newsletter-box { background: var(--surface); padding: 18px; border-radius: var(--radius); }
.newsletter-box p { margin-top: 0; font-size: .9rem; color: var(--muted); }
.nl-form { display: flex; gap: 6px; }
.nl-form input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; font-size: .9rem; }
.nl-form button, .btn { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 10px 16px; font: 600 .9rem var(--font-body); cursor: pointer; display: inline-block; }
.btn:hover, .nl-form button:hover { filter: brightness(.95); color: var(--accent-ink); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tags a { font-size: .8rem; padding: 5px 10px; background: var(--surface); border-radius: 99px; }

/* ---------- Isi artikel dari editor (tabel, embed, gambar, kode) ---------- */
.post-content table { width: 100% !important; border-collapse: collapse; margin: 1.4em 0; font: .95rem/1.5 var(--font-body); display: block; overflow-x: auto; }
.post-content th, .post-content td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.post-content th, .post-content thead td { background: var(--surface); font-weight: 600; }
.post-content table.table-striped tr:nth-child(even) td { background: var(--surface); }
.post-content table caption { caption-side: bottom; font-size: .8rem; color: var(--muted); padding-top: 6px; }
.post-content figure { margin: 1.4em auto; max-width: 100%; }
.post-content figure img { margin: 0 auto; }
.post-content figcaption { font: .8rem/1.4 var(--font-body); color: var(--muted); text-align: center; margin-top: 6px; }
.post-content img[style*="float"] { max-width: 50%; }
.post-content .embed { position: relative; aspect-ratio: 16 / 9; margin: 1.4em 0; }
.post-content .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
.post-content hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.post-content pre { background: var(--surface); padding: 14px 16px; border-radius: 8px; overflow-x: auto; font: .88rem/1.6 ui-monospace, Consolas, monospace; }
.post-content code { font-family: ui-monospace, Consolas, monospace; font-size: .9em; }
.post-content ul, .post-content ol { padding-left: 1.4em; }
.post-content h3 { font-size: 1.4rem; margin-top: 1.3em; }
.post-content h4 { font-size: 1.2rem; margin-top: 1.2em; }
.post-content::after { content: ''; display: block; clear: both; }
.preview-bar { background: var(--accent); color: var(--accent-ink); text-align: center; font-weight: 600; padding: 8px 12px; border-radius: 8px; margin-bottom: 20px; }

/* ---------- Artikel ---------- */
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 12px; }
.post-title { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-top: 8px; }
.lead { font-size: 1.1rem; color: var(--muted); margin-top: 0; }
.post-meta { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 700 1.1rem var(--font-head); }
.avatar.lg { width: 64px; height: 64px; font-size: 1.6rem; }
.post-image img { width: 100%; border-radius: var(--radius); aspect-ratio: 16/9; object-fit: cover; }
.post-image { margin: 0 0 16px; }
.post-image figcaption { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.post-content { font-size: 1.08rem; line-height: 1.8; }
.post-content h2 { font-size: 1.7rem; margin-top: 1.4em; }
.post-content img { border-radius: 10px; height: auto; }
.post-content blockquote { border-left: 4px solid var(--accent); margin: 1.2em 0; padding: .2em 1em; color: var(--muted); font-style: italic; }
.post-content a { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; font-size: .85rem; }
.share a, .share button { border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; background: var(--bg); color: var(--text); font: 600 .8rem var(--font-body); cursor: pointer; }
.author-box { display: flex; gap: 16px; align-items: center; background: var(--surface); padding: 18px; border-radius: var(--radius); margin: 28px 0; }
.author-box p { margin: 4px 0 0; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 40px; }
.prevnext a { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font: 600 1.05rem/1.3 var(--font-head); }
.prevnext a small { display: block; font: 500 .75rem var(--font-body); color: var(--muted); margin-bottom: 4px; }
.prevnext .r { text-align: right; }
.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment p { margin: 4px 0 0; }

/* ---------- Form ---------- */
.form { display: grid; gap: 12px; margin-bottom: 24px; }
.form input, .form textarea, .form select { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; }
.form .btn { justify-self: start; }
.row2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } }
.big-search { display: flex; gap: 8px; margin-top: 14px; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-weight: 500; }
.alert-ok { background: #e8f7ee; color: #0b6b3a; }
.alert-err { background: #fdecea; color: #a02a1e; }
:root[data-theme="dark"] .alert-ok { background: #13321f; color: #8fe0b0; }
:root[data-theme="dark"] .alert-err { background: #3a1714; color: #ffb4ab; }
.empty, .notfound { text-align: center; padding: 48px 16px; color: var(--muted); }
.notfound h1 { font-size: 6rem; color: var(--accent); margin: 0; }
.notfound .big-search { max-width: 480px; margin: 20px auto; }
.contact-info { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); background: var(--surface); padding: 18px; border-radius: var(--radius); margin-bottom: 24px; }
.contact-info p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }

/* ---------- Data pasar ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.market { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
.market th, .market td { padding: 10px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.market th { background: var(--surface); font-weight: 600; color: var(--muted); }
.market th:first-child, .market td:first-child { text-align: left; position: sticky; left: 0; background: var(--bg); }
.market th:first-child { background: var(--surface); }
.market td small { display: block; color: var(--muted); font-size: .72rem; }
.market tr:last-child td { border-bottom: 0; }
.up { color: var(--up); font-weight: 600; }
.down { color: var(--down); font-weight: 600; }
.flash-up { animation: fu 1s; } .flash-down { animation: fd 1s; }
@keyframes fu { from { background: rgba(10,143,79,.2); } } @keyframes fd { from { background: rgba(210,58,44,.2); } }

/* ---------- Lowongan ---------- */
.jobs { display: grid; gap: 12px; }
.job { display: flex; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.job:hover { border-color: var(--accent); color: inherit; }
.job h3 { font-size: 1.3rem; margin: 0; }
.job p { margin: 2px 0 6px; }
.job-logo { flex: none; width: 52px; height: 52px; border-radius: 10px; background: var(--surface); display: grid; place-items: center; font: 700 1.4rem var(--font-head); }
.pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 10px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); }

/* ---------- Iklan ---------- */
.ad-slot { margin: 0 auto 28px; text-align: center; }
.ad-label { display: block; font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad-body { display: flex; justify-content: center; overflow: hidden; }
.ad-body img { max-width: 100%; height: auto; border-radius: 6px; }
.ad-header_top { margin-bottom: 24px; }
.ad-header_top img, .ad-footer_top img, .ad-home_middle img, .ad-listing_top img, .ad-article_top img, .ad-article_bottom img { max-height: 250px; }
.ad-sidebar_top, .ad-sidebar_bottom { margin-bottom: 32px; }
.post-content .ad-slot { margin: 1.6em auto; }
.ad-mobile_sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0; padding: 6px 40px 6px 8px; background: var(--bg); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
.ad-mobile_sticky .ad-label { display: none; }
.ad-mobile_sticky img { max-height: 100px; }
.ad-close { position: absolute; top: 6px; right: 8px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
@media (max-width: 767px) { .ad-only-desktop { display: none; } body:has(.ad-mobile_sticky) .to-top { bottom: 120px; } }
@media (min-width: 768px) { .ad-only-mobile, .ad-mobile_sticky { display: none; } }

/* ---------- Footer ---------- */
.site-footer { background: #101215; color: #d6d8dd; padding: 48px 0 20px; }
.site-footer .logo { color: #fff; }
.site-footer .muted { color: #9aa0ab; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-grid h4 { color: #fff; font-size: 1.2rem; }
.footer-grid > div > a:not(.logo) { display: block; padding: 4px 0; font-size: .9rem; }
.footer-grid a:hover { color: var(--accent); }
.site-footer .nl-form input { background: #1b1e24; border-color: #2a2e36; color: #fff; }
.socials { display: flex; gap: 8px; margin-top: 12px; }
.socials a { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #2a2e36; border-radius: 50%; font-size: .75rem; font-weight: 700; }
.copyright { border-top: 1px solid #2a2e36; margin-top: 32px; padding-top: 16px; font-size: .8rem; color: #9aa0ab; }
.to-top { position: fixed; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 1.2rem; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top.show { opacity: 1; pointer-events: auto; }

@media (max-width: 640px) {
  .section-head h2 { font-size: 1.6rem; }
  .card-hero .overlay { padding: 20px 16px 16px; }
  .card-list h3 { font-size: 1.1rem; }
  .prevnext { grid-template-columns: 1fr; }
  .logo { font-size: 1.35rem; }
}
