:root {
  --bg: #f6f4ef; --surface: #ffffff; --surface-2: #efece5; --ink: #14181d; --ink-2: #4a525c; --muted: #6b737d;
  --line: #e1ddd3; --accent: #b8811a; --accent-ink: #0e1318; --red: #c8382c; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.05);
  --serif: "Fraunces", Georgia, serif; --sans: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0e1318; --surface: #151c23; --surface-2: #1c252e; --ink: #eef1f4; --ink-2: #b6bec7; --muted: #8590a0;
  --line: #26313c; --accent: #e8b04b; --accent-ink: #0e1318; --red: #ff5a4b; --shadow: none; color-scheme: dark; } }
:root[data-theme="dark"] { color-scheme: dark;
  --bg: #0e1318; --surface: #151c23; --surface-2: #1c252e; --ink: #eef1f4; --ink-2: #b6bec7; --muted: #8590a0;
  --line: #26313c; --accent: #e8b04b; --accent-ink: #0e1318; --red: #ff5a4b; --shadow: none;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.muted { color: var(--muted); } .small { font-size: 12.5px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--accent); color: var(--accent-ink); padding: 6px 10px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Masthead */
.masthead { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.logo { font: 700 24px/1 var(--serif); letter-spacing: -.02em; white-space: nowrap; }
.logo span { color: var(--accent); }
.tools { display: flex; align-items: center; gap: 8px; min-width: 0; }
.search { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 12px; height: 38px; min-width: 0; }
.search svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search input { border: 0; outline: 0; background: none; color: var(--ink); font: inherit; width: 220px; min-width: 0; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 17px; flex: none; }
.cats { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding-bottom: 0; }
.cats::-webkit-scrollbar { display: none; }
.cats button { background: none; border: 0; padding: 10px 12px; font-weight: 600; font-size: 14px; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.cats button:hover { color: var(--ink); }
.cats button.on { color: var(--ink); border-bottom-color: var(--accent); }
.cats .badge { font-size: 11px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 6px; margin-left: 4px; }

/* Ticker */
.ticker { background: var(--surface); border-bottom: 1px solid var(--line); }
.ticker-in { display: flex; align-items: center; gap: 12px; height: 40px; overflow: hidden; }
.ticker-label { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; letter-spacing: .06em; color: var(--red); flex: none; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.ticker-track { overflow: hidden; flex: 1; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-move { display: inline-flex; gap: 36px; white-space: nowrap; animation: scroll 90s linear infinite; font-size: 13.5px; }
.ticker-track:hover .ticker-move { animation-play-state: paused; }
.ticker-move a:hover { color: var(--accent); }
.ticker-move b { color: var(--muted); font-weight: 500; margin-right: 6px; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-move { animation: none; } }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 6px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--ink); color: var(--bg); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; font-weight: 500; white-space: nowrap; color: var(--ink-2); }
.chip.on { border-color: var(--accent); color: var(--ink); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.page-title { font: 700 30px/1.15 var(--serif); margin: 14px 0 16px; letter-spacing: -.01em; }
#notice:empty { display: none; }
.notice { margin-top: 14px; padding: 10px 14px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); font-size: 13.5px; }

/* Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.side { position: sticky; top: 120px; display: grid; gap: 16px; }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } .side { position: static; } }

/* Cards */
.thumb { position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .thumb img { transform: scale(1.03); }
.ph { position: absolute; inset: 0; display: grid; place-items: center; font: 700 26px var(--serif); color: rgba(255,255,255,.92); letter-spacing: -.02em; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.src { font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.cat-tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.lang { font-size: 10px; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.card h3 { font: 600 17px/1.3 var(--serif); margin: 6px 0 0; letter-spacing: -.005em; }
.card:hover h3 { color: var(--accent); }
.card p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card { position: relative; }
.save { position: absolute; top: 8px; right: 8px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(14,19,24,.7); color: #fff; font-size: 15px; display: grid; place-items: center; }
.save.on { background: var(--accent); color: var(--accent-ink); }

.hero { display: grid; grid-template-columns: 1.55fr 1fr; gap: 24px; margin-bottom: 36px; }
.hero .lead h3 { font-size: 30px; line-height: 1.15; letter-spacing: -.015em; }
.hero .lead p { font-size: 15.5px; -webkit-line-clamp: 4; }
.hero .lead .ph { font-size: 52px; }
.hero .stack { display: grid; gap: 18px; align-content: start; }
.hero .stack .card > a { display: grid; grid-template-columns: 120px 1fr; gap: 12px; }
.hero .stack .card h3 { font-size: 15px; margin: 0; }
.hero .stack .card .meta { margin-top: 0; margin-bottom: 4px; }
.hero .stack .thumb { aspect-ratio: 4/3; }
.hero .stack .ph { font-size: 18px; }
.hero .stack .save { width: 28px; height: 28px; font-size: 12px; top: 4px; right: auto; left: 88px; }
@media (max-width: 720px) { .hero { grid-template-columns: 1fr; } .hero .lead h3 { font-size: 24px; } .page-title { font-size: 26px; } .search input { width: 120px; } }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-top: 2px solid var(--ink); padding-top: 10px; margin-bottom: 16px; }
.sec-head h2 { font: 700 21px var(--serif); margin: 0; }
.sec-head .all { font-size: 13px; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 0; }
.cat-sec { margin-bottom: 36px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 22px; }

.latest-list { list-style: none; margin: 0; padding: 0; }
.latest-list li { border-bottom: 1px solid var(--line); }
.row > a { display: grid; grid-template-columns: 1fr 132px; gap: 16px; padding: 14px 0; }
.row .thumb { aspect-ratio: 4/3; }
.row .ph { font-size: 18px; }
.row h3 { margin-top: 2px; font-size: 16.5px; }
.row .meta { margin-top: 0; }
.row .save { top: 18px; right: 4px; width: 28px; height: 28px; font-size: 12px; }
@media (max-width: 520px) { .row > a { grid-template-columns: 1fr 96px; gap: 12px; } .row p { display: none; } }
.more { margin: 18px auto 40px; display: block; border: 1px solid var(--line); background: var(--surface); padding: 10px 22px; border-radius: 999px; font-weight: 600; }
.more[hidden] { display: none; }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }

/* Sidebar */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 12px; font: 700 16px var(--serif); }
.topics { display: flex; flex-wrap: wrap; gap: 6px; }
.topics button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 6px; padding: 4px 9px; font-size: 13px; }
.topics button:hover { border-color: var(--accent); }
.topics small { color: var(--muted); margin-left: 3px; }
.ranked { list-style: none; counter-reset: r; margin: 0; padding: 0; display: grid; gap: 12px; }
.ranked li { counter-increment: r; display: grid; grid-template-columns: 28px 1fr; gap: 8px; font: 600 14px/1.35 var(--serif); }
.ranked li::before { content: counter(r); font: 700 22px/1 var(--serif); color: var(--accent); }
.ranked a:hover { color: var(--accent); }
.ranked .meta { font-family: var(--sans); font-weight: 400; margin-top: 3px; }
.source-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.source-list li { display: flex; justify-content: space-between; gap: 8px; }
.source-list button { background: none; border: 0; padding: 0; text-align: left; }
.source-list button:hover { color: var(--accent); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: #3fb36b; }
.dot.off { background: var(--muted); }

.foot { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0 36px; margin-top: 20px; }
.foot p { max-width: 640px; color: var(--ink-2); font-size: 13.5px; }

/* Halaman artikel */
.art-nav { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; font-size: 14px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.art-nav a:hover { color: var(--accent); }
.art-wrap { display: grid; gap: 40px; padding-block: 28px 48px; max-width: 760px; }
.art h1 { font: 700 clamp(26px, 4.5vw, 38px)/1.15 var(--serif); letter-spacing: -.015em; margin: 10px 0 12px; text-wrap: balance; }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.art .meta { font-size: 13px; }
.art-fig { margin: 22px 0 0; }
.art-fig img { width: 100%; border-radius: 10px; aspect-ratio: 16/9; object-fit: cover; background: var(--surface-2); }
.art-fig figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
.art-body { font-size: 18px; line-height: 1.7; margin-top: 22px; }
.art-body p { margin: 0 0 1em; }
.art-source { margin-top: 26px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; color: var(--ink-2); }
.art-source p { margin: 0 0 12px; }
.src-link { display: inline-block; font-weight: 600; color: var(--accent-ink); background: var(--accent); padding: 8px 14px; border-radius: 999px; }
.art-related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.art-related a { display: grid; gap: 2px; font: 600 16px/1.35 var(--serif); }
.art-related a:hover { color: var(--accent); }
@media (max-width: 720px) { .art-nav { display: none; } }
.art-related .src { font-family: var(--sans); }
