/*
Theme Name: Torti News
Theme URI: https://example.com/torti-news
Author: Torti News
Author URI: https://example.com
Description: Tema portal berita modern terinspirasi tirto.id: header hitam sticky, grid editorial, pilihan editor, flash news, mode gelap, dukungan block editor, dan responsif.
Version: 1.0.1
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tortinews
Domain Path: /languages
*/

/* ============================================================
   1. VARIABEL & DASAR
   ============================================================ */
:root {
    --tn-bg: #ffffff;
    --tn-surface: #ffffff;
    --tn-soft: #f5f7f8;
    --tn-ink: #15171a;
    --tn-muted: #6b7280;
    --tn-border: #e5e8ea;
    --tn-border-strong: #d5dadd;
    --tn-accent: #1769d2;
    --tn-accent-dark: #0f4fa5;
    --tn-header-bg: #0b0b0c;
    --tn-header-ink: #ffffff;
    --tn-danger: #dc2626;
    --tn-radius: 4px;
    --tn-container: 1060px;
    --tn-gap: 20px;
    --tn-font: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html[data-theme="dark"] {
    --tn-bg: #101215;
    --tn-surface: #171a1e;
    --tn-soft: #1c2025;
    --tn-ink: #f2f4f6;
    --tn-muted: #9aa4ae;
    --tn-border: #2b3037;
    --tn-border-strong: #3a414a;
    --tn-accent: #7db3ff;
    --tn-accent-dark: #a7cbff;
    --tn-header-bg: #000000;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--tn-font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--tn-ink);
    background: var(--tn-bg);
    text-wrap: pretty;
    overflow-x: hidden;
}

html[data-txtsize="large"] body,
html[data-txtsize="large"] .tn-article-body { font-size: 18px; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--tn-accent); }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; line-height: 1.25; color: var(--tn-ink); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em 1.2em; }
button, input, select, textarea { font: inherit; }
.screen-reader-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100000;
    background: #fff; color: #000; padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; }

::selection { background: var(--tn-accent); color: #fff; }

:focus-visible {
	outline: 2px solid var(--tn-accent);
	outline-offset: 2px;
}

/* ============================================================
   2. LAYOUT
   ============================================================ */
.tn-container {
    width: 100%;
    max-width: var(--tn-container);
    margin: 0 auto;
    padding: 0 16px;
}

.tn-grid { display: grid; gap: var(--tn-gap); }
.tn-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tn-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tn-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tn-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.tn-section { padding: 22px 0 8px; }
.tn-section + .tn-section { padding-top: 14px; }
.tn-main { min-height: 50vh; }

.tn-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 28px;
    align-items: start;
}

.tn-sticky { position: sticky; top: 82px; }

/* ============================================================
   3. HEADER
   ============================================================ */
.tn-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--tn-header-bg);
    color: var(--tn-header-ink);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}
.admin-bar .tn-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .tn-header { top: 46px; } }

.tn-header__inner {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 56px;
}

.tn-brand { display: flex; align-items: center; flex: 0 0 auto; }
.tn-brand .custom-logo { max-height: 36px; width: auto; }
.tn-brand__text {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.055em;
    line-height: 1;
    color: var(--tn-header-ink);
}
.tn-brand__text span { color: #e53935; }
.tn-brand:hover { color: var(--tn-header-ink); opacity: .85; }

.tn-header__search { position: relative; flex: 0 1 290px; max-width: 290px; margin-left: auto; }
.tn-search-input {
    width: 100%;
    height: 34px;
    padding: 0 12px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--tn-radius);
    outline: none;
}
.tn-search-input::placeholder { color: rgba(255, 255, 255, .62); }
.tn-search-input:focus { border-color: var(--tn-accent); background: rgba(255, 255, 255, .16); }

.tn-nav { margin-left: 0; }
.tn-header-date {
    margin-right: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tn-header-ink);
    white-space: nowrap;
    opacity: .78;
}
.tn-nav-index {
    margin-right: 6px;
    padding: 7px 11px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tn-header-ink);
    white-space: nowrap;
    border-radius: var(--tn-radius);
}
.tn-nav-index:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.tn-nav ul {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tn-nav li { position: relative; }
.tn-nav a {
    display: block;
    padding: 7px 11px;
    font-size: 14px;
    font-weight: 600;
    color: inherit;
    white-space: nowrap;
    border-radius: var(--tn-radius);
}
.tn-nav a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.tn-nav .current-menu-item > a,
.tn-nav .current_page_item > a { color: var(--tn-accent); }
.tn-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%; left: 0;
    z-index: 950;
    min-width: 190px;
    padding: 6px 0;
    background: var(--tn-header-bg);
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
}
.tn-nav li:hover > .sub-menu,
.tn-nav li:focus-within > .sub-menu { display: block; }
.tn-nav .sub-menu a { font-weight: 400; padding: 6px 14px; }
.tn-nav .sub-menu .sub-menu { top: -6px; left: 100%; }

.tn-header__tools { display: flex; align-items: center; gap: 2px; }
.tn-icon-btn, .tn-menu-btn, .tn-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.tn-icon-btn:hover, .tn-menu-btn:hover, .tn-search-toggle:hover { background: rgba(255, 255, 255, .12); }
.tn-icon-btn svg, .tn-menu-btn svg, .tn-search-toggle svg { width: 21px; height: 21px; fill: currentColor; }
.tn-search-toggle { display: none; }
.tn-icon-btn.is-on { color: var(--tn-accent); }

/* Drawer / menu mobile */
.tn-overlay {
    position: fixed; inset: 0; z-index: 970;
    background: rgba(0, 0, 0, .5);
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease;
}
.tn-drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    z-index: 980;
    width: min(360px, 88vw);
    padding: 16px;
    background: var(--tn-surface);
    color: var(--tn-ink);
    border-left: 1px solid var(--tn-border);
    overflow-y: auto;
    transform: translateX(102%);
    transition: transform .25s ease;
}
body.tn-drawer-open { overflow: hidden; }
body.tn-drawer-open .tn-overlay { opacity: 1; visibility: visible; }
body.tn-drawer-open .tn-drawer { transform: translateX(0); }
.tn-drawer__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tn-drawer__top strong { font-size: 18px; }
.tn-drawer__close {
    width: 34px; height: 34px; display: grid; place-items: center;
    background: var(--tn-soft); border: 0; border-radius: 50%; cursor: pointer;
    font-size: 22px; line-height: 1; color: var(--tn-ink);
}
.tn-drawer__label {
    font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
    color: var(--tn-muted); margin: 18px 0 6px;
}
.tn-drawer ul { list-style: none; margin: 0; padding: 0; }
.tn-drawer li a {
    display: block; padding: 9px 10px; border-bottom: 1px solid var(--tn-border);
    font-size: 15px; font-weight: 600; color: var(--tn-ink);
}
.tn-drawer .sub-menu { padding-left: 14px; display: none; }
.tn-drawer .sub-menu.is-open { display: block; }
.tn-drawer .sub-menu a { font-weight: 400; color: var(--tn-muted); }
.tn-drawer__cats { display: flex; flex-wrap: wrap; gap: 6px; }
.tn-drawer__cats a {
    padding: 5px 10px; border: 1px solid var(--tn-border); border-radius: 20px;
    font-size: 13px; font-weight: 500; border-bottom: 1px solid var(--tn-border);
}

/* Sorotan / spotlight bar */
.tn-spotlight {
    border-bottom: 1px solid var(--tn-border);
    background: var(--tn-surface);
}
.tn-spotlight__inner {
    display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
    min-height: 42px;
}
.tn-spotlight__inner::-webkit-scrollbar { display: none; }
.tn-spotlight__label {
    display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
    padding: 6px 12px; margin-right: 4px; font-weight: 700; white-space: nowrap;
}
.tn-spotlight a {
    flex: 0 0 auto; padding: 5px 11px; border-radius: var(--tn-radius);
    font-size: 14px; white-space: nowrap; color: var(--tn-ink);
}
.tn-spotlight a:hover { background: var(--tn-soft); color: var(--tn-accent); }
.tn-spotlight .tn-nav li:first-child a { padding-left: 0; }
.tn-spotlight .tn-nav .sub-menu {
    background: var(--tn-surface);
    border-color: var(--tn-border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}
.tn-spotlight .tn-nav .sub-menu a:hover { background: var(--tn-soft); color: var(--tn-accent); }

/* ============================================================
   4. JUDUL BAGIAN
   ============================================================ */
.tn-section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; padding: 8px 0;
    border-top: 1px solid var(--tn-border-strong);
    border-bottom: 1px dashed var(--tn-border-strong);
    margin-bottom: 16px;
}
.tn-section-head h2 {
    font-size: 22px; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; margin: 0;
}
.tn-section-head h2 a:hover { color: var(--tn-accent); }
.tn-section-more {
    flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--tn-accent);
}
.tn-section-more:hover { text-decoration: underline; }
.tn-kicker {
    display: inline-block; margin-bottom: 6px; font-size: 12px; font-weight: 700;
    color: var(--tn-accent); letter-spacing: .01em;
}

/* ============================================================
   5. KARTU BERITA
   ============================================================ */
.tn-card { position: relative; min-width: 0; }
.tn-card__thumb {
    display: block; position: relative; overflow: hidden;
    aspect-ratio: 16 / 9; margin-bottom: 9px;
    background: var(--tn-soft);
    border: 1px solid var(--tn-border);
}
.tn-card__thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .35s ease;
}
.tn-card__thumb::after {
    content: ''; position: absolute; inset: auto 0 0; height: 62%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .82));
    opacity: 0; pointer-events: none;
}
.tn-card__overlay,
.tn-card__overlay-title,
.tn-card__overlay-meta { display: none; }
.tn-card:hover .tn-card__thumb img { transform: scale(1.035); }
.tn-noimg {
    display: grid; place-items: center; width: 100%; height: 100%;
    color: var(--tn-muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
    background: repeating-linear-gradient(135deg, var(--tn-soft), var(--tn-soft) 8px, var(--tn-bg) 8px, var(--tn-bg) 16px);
}
.tn-card__meta {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-bottom: 4px; font-size: 12px; color: var(--tn-muted);
}
.tn-card__label { font-weight: 700; color: var(--tn-accent); }
.tn-card__meta .tn-sep { color: var(--tn-border-strong); }
.tn-card__title {
    font-size: 15px; line-height: 1.35; font-weight: 600; letter-spacing: -.01em;
    margin: 0;
}
.tn-card__title a:hover { color: var(--tn-accent); }
.tn-card__excerpt {
    margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--tn-muted);
}
.tn-card--display .tn-card__title { font-size: 22px; line-height: 1.28; font-weight: 700; }
.tn-card--display .tn-card__excerpt { font-size: 14px; }
.tn-card--sm .tn-card__title {
    font-size: 14px; line-height: 1.35; font-weight: 600;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    min-height: calc(1.35em * 3);
}
.tn-card--sm .tn-card__meta { margin-bottom: 2px; }
.tn-card--sm .tn-card__thumb { margin-bottom: 7px; }
.tn-pin {
    position: absolute; top: 6px; left: 6px; z-index: 2;
    width: 28px; height: 28px; display: grid; place-items: center;
    border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff;
    transform: rotate(28deg); font-size: 14px;
}

/* Hero */
.tn-hero { padding-bottom: 8px; }
.tn-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 24px;
}
.tn-hero__side {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px; align-content: start;
}
.tn-editorpick {
    padding: 16px;
    margin: 16px -16px 8px;
    background: var(--tn-surface);
    border: 1px solid var(--tn-border);
}
.tn-editorpick .tn-section-head { border-top: 0; margin-top: 0; }
.tn-editorpick h2 { font-size: 16px; }

/* Daftar kecil (flash news, terbaru) */
.tn-list { list-style: none; margin: 0; padding: 0; }
.tn-list-item {
    display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px;
    padding: 11px 0; border-bottom: 1px solid var(--tn-border);
}
.tn-list-item:first-child { padding-top: 0; }
.tn-list-item:last-child { border-bottom: 0; }
.tn-list-item__thumb { aspect-ratio: 1 / 1; overflow: hidden; background: var(--tn-soft); }
.tn-list-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tn-list-item__title {
    font-size: 13px; line-height: 1.4; font-weight: 600; margin: 0 0 3px;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
    overflow: hidden; text-overflow: ellipsis;
}
.tn-list-item__title a:hover { color: var(--tn-accent); }
.tn-list-item__meta { font-size: 11px; color: var(--tn-muted); }
.tn-list-item__meta .tn-card__label { font-size: 11px; }

/* Populer bernomor */
.tn-populer { list-style: none; margin: 0; padding: 0; counter-reset: jnpop; }
.tn-populer li {
    counter-increment: jnpop; position: relative;
    padding: 10px 0 10px 38px; border-bottom: 1px solid var(--tn-border);
}
.tn-populer li:last-child { border-bottom: 0; }
.tn-populer li::before {
    content: counter(jnpop);
    position: absolute; left: 0; bottom: 12px;
    width: 26px; height: 26px; display: grid; place-items: center;
    border: 2px solid var(--tn-border-strong); border-radius: 50%;
    font-size: 14px; font-weight: 700; color: var(--tn-muted); line-height: 1;
}
.tn-populer li:nth-child(-n+3)::before { border-color: var(--tn-accent); color: var(--tn-accent); }
.tn-populer a { font-size: 13px; line-height: 1.4; font-weight: 600; }
.tn-populer .tn-list-item__meta { margin-top: 2px; }

/* Baris dua kolom dengan pemisah */
.tn-split {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px;
}
.tn-split > * + * { border-left: 1px solid var(--tn-border); padding-left: 24px; }
.tn-split .tn-list-item { grid-template-columns: 88px minmax(0, 1fr); }

/* ============================================================
   6. ARTIKEL / HALAMAN
   ============================================================ */
.tn-breadcrumbs {
    padding: 12px 0; font-size: 12px; color: var(--tn-muted);
    border-bottom: 1px solid var(--tn-border);
}
.tn-breadcrumbs a { color: var(--tn-muted); }
.tn-breadcrumbs a:hover { color: var(--tn-accent); }
.tn-breadcrumbs .tn-sep { margin: 0 6px; color: var(--tn-border-strong); }

.tn-article { padding-top: 20px; }
.tn-article__head { max-width: 780px; margin-bottom: 20px; }
.tn-article__title {
    font-size: var(--tn-title-desktop-size, 34px); line-height: var(--tn-title-desktop-lh, 41px); font-weight: 700;
    letter-spacing: -.028em; margin: 8px 0 12px;
}
.tn-article__subtitle {
    margin: -4px 0 12px; font-size: 19px; line-height: 1.3;
    font-weight: 500; color: var(--tn-muted);
}
.tn-article__meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    font-size: 13px; color: var(--tn-muted);
}
.tn-article__meta strong { color: var(--tn-ink); font-weight: 600; }
.tn-article__meta--sub { margin-top: -2px; }
.tn-donate-btn {
    display: inline-flex; align-items: center; gap: 5px;
    margin-left: auto; padding: 5px 11px;
    font-size: 12px; font-weight: 700; color: #fff;
    background: var(--tn-accent); border-radius: var(--tn-radius);
    text-decoration: none;
}
.tn-donate-btn svg { width: 13px; height: 13px; fill: currentColor; }
.tn-donate-btn:hover { color: #fff; background: var(--tn-accent-dark); }
.tn-article__cover { margin: 0 0 18px; }
.tn-article__cover img {
    display: block; width: 100%; max-width: 100%; height: auto;
    aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0;
}
.tn-article__cover figcaption {
    padding-left: 12px; margin-top: 6px; position: relative;
    font-size: 12px; color: var(--tn-muted);
}
.tn-article__cover figcaption::before {
    content: ''; position: absolute; left: 0; top: 2px;
    width: 7px; height: 7px; border-left: 1px solid var(--tn-muted);
    border-bottom: 1px solid var(--tn-muted);
}
/* Ajakan menjadi sumber pilihan di Google */
.tn-google-source {
    display: flex; align-items: center; gap: 12px;
    margin: -6px 0 22px; padding: 10px 12px;
    border: 1px solid #4285f4;
    border-radius: var(--tn-radius);
    background: var(--tn-soft); color: var(--tn-ink); text-decoration: none;
}
.tn-google-source:hover { border-color: #1a73e8; }
.tn-google-source:focus-visible { outline: 2px solid #4285f4; outline-offset: 2px; }
.tn-google-source__icon { display: flex; flex: 0 0 28px; width: 28px; height: 28px; }
.tn-google-source__icon svg { display: block; width: 100%; height: 100%; }
.tn-google-source__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.tn-google-source__text strong { font-size: 14px; font-weight: 700; }
.tn-google-source__text > span { font-size: 12px; color: var(--tn-muted); }
.tn-google-source__plus {
    display: grid; place-items: center; flex: 0 0 30px;
    width: 30px; height: 30px; margin-left: auto;
    border: 1px solid #4285f4; border-radius: var(--tn-radius);
    background: var(--tn-bg); color: #4285f4;
}
.tn-google-source__plus svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.tn-article-body {
    font-size: var(--tn-body-text-size, 16px);
    line-height: var(--tn-body-text-lh, 1.75);
}
.tn-article-body p, .tn-article-body ul, .tn-article-body ol { margin: 0 0 1.15em; }
.tn-article-summary {
    margin: 0 0 22px; padding: 14px 16px;
    border-left: 3px solid var(--tn-accent);
    background: var(--tn-soft); border-radius: 4px;
}
.tn-article-summary p {
    margin: 0; font-size: 1.05em; line-height: 1.65; color: var(--tn-ink); font-weight: 700;
}
.tn-article-summary p + p { margin-top: .6em; }
.tn-article-body h2 { font-size: 1.35em; margin: 1.6em 0 .6em; }
.tn-article-body h3 { font-size: 1.15em; margin: 1.5em 0 .6em; }
.tn-article-body blockquote {
    margin: 1.5em 0; padding: .35em 0 .35em 1.3em;
    border-left: 3px solid var(--tn-accent);
    font-size: 1.1em; font-weight: 600;
}
.tn-article-body figcaption { font-size: 12px; color: var(--tn-muted); margin-top: 6px; }
.tn-article-body img { height: auto; }
.tn-article-body .wp-block-image, .tn-article-body iframe { max-width: 100%; }
/* Gambar di dalam artikel (editor klasik & blok) tidak boleh melebihi lebar kolom. */
.tn-article-body figure,
.tn-article-body .wp-caption,
.tn-article-body img { max-width: 100%; }
.tn-article-body .wp-caption.aligncenter { margin-left: auto; margin-right: auto; }
.tn-article-body .alignleft { float: left; margin: 0 16px 12px 0; }
.tn-article-body .alignright { float: right; margin: 0 0 12px 16px; }

/* Ajakan dukung kami di bawah artikel */
.tn-support {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
    margin: 18px 0 0; padding: 14px 16px;
    border: 2px solid transparent; border-radius: var(--tn-radius);
    background:
        linear-gradient(var(--tn-soft), var(--tn-soft)) padding-box,
        linear-gradient(135deg, var(--tn-accent), #7c3aed 55%, #ec4899) border-box;
}
.tn-support__copy { min-width: 0; }
.tn-support__title { margin: 0 0 4px; font-size: 15px; font-weight: 700; line-height: 1.3; }
.tn-support__text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--tn-muted); }
.tn-support__btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 14px; font-size: 13px; font-weight: 700; color: #fff;
    background: var(--tn-accent); border-radius: var(--tn-radius); text-decoration: none;
}
.tn-support__btn svg { width: 15px; height: 15px; fill: currentColor; }
.tn-support__btn:hover { background: var(--tn-accent-dark); color: #fff; }
.tn-support + .tn-share { margin-top: 12px; }

.tn-share {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 14px 0; margin: 18px 0 0;
    border-top: 1px solid var(--tn-border); border-bottom: 1px solid var(--tn-border);
}
.tn-share__title { font-size: 13px; font-weight: 700; margin-right: 4px; }
.tn-share a {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 34px; height: 32px; padding: 0 10px;
    font-size: 12px; font-weight: 700; color: #fff;
    background: var(--tn-muted); border-radius: var(--tn-radius);
}
.tn-share a svg { width: 14px; height: 14px; fill: currentColor; flex: 0 0 auto; }
.tn-share a:hover { opacity: .85; color: #fff; }
.tn-share .tn-share-fb { background: #1877f2; }
.tn-share .tn-share-x { background: #111; }
.tn-share .tn-share-wa { background: #25d366; color: #062e17; }
.tn-share .tn-share-threads { background: #000; }

@media (max-width: 767px) {
    .tn-support { display: block; }
    .tn-support__btn { width: 100%; margin-top: 10px; }
    .tn-share__label { display: none; }
    .tn-share a { min-width: 26px; width: 26px; height: 26px; padding: 0; border-radius: 50%; }
    .tn-share a svg { width: 14px; height: 14px; }
}

.tn-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.tn-tags a {
    padding: 4px 10px; font-size: 12px; font-weight: 600;
    background: var(--tn-soft); border: 1px solid var(--tn-border); border-radius: 20px;
}
.tn-tags a:hover { border-color: var(--tn-accent); color: var(--tn-accent); }

.tn-author {
    display: flex; gap: 14px; padding: 16px; margin: 18px 0;
    background: var(--tn-soft); border: 1px solid var(--tn-border);
}
.tn-author__avatar { width: 56px; height: 56px; border-radius: 50%; }
.tn-author h3 { font-size: 15px; margin: 0 0 2px; }
.tn-author p { font-size: 13px; color: var(--tn-muted); margin: 0; }

.tn-related { padding-top: 24px; }
.tn-related .tn-card__meta { flex-wrap: nowrap; }
.tn-related .tn-card__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tn-related .tn-card__meta .tn-sep,
.tn-related .tn-card__meta time { flex-shrink: 0; }
.tn-archive-title {
    padding: 16px 0; margin-bottom: 18px;
    border-top: 1px solid var(--tn-border-strong);
    border-bottom: 1px dashed var(--tn-border-strong);
}
.tn-archive-title h1 { font-size: 28px; letter-spacing: -.025em; margin: 0; }
.tn-archive-title p { margin: 6px 0 0; color: var(--tn-muted); font-size: 14px; }

/* Paginasi */
.tn-pagination {
    display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
    margin: 28px 0 8px; padding-top: 18px; border-top: 1px solid var(--tn-border);
}
.tn-pagination .page-numbers {
    display: inline-grid; place-items: center; min-width: 34px; height: 34px;
    padding: 0 9px; font-size: 13px; font-weight: 600;
    border: 1px solid var(--tn-border); border-radius: var(--tn-radius);
}
.tn-pagination .page-numbers:hover { border-color: var(--tn-accent); color: var(--tn-accent); }
.tn-pagination .current { background: var(--tn-accent); border-color: var(--tn-accent); color: #fff; }
.tn-pagination .current:hover { color: #fff; }

/* Komentar */
.tn-comments { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--tn-border); }
.tn-comments h2, .tn-comments h3 { font-size: 18px; }
.tn-comment-list { list-style: none; margin: 0 0 24px; padding: 0; }
.tn-comment-list li { padding: 12px 0; border-bottom: 1px solid var(--tn-border); }
.tn-comment-list .comment-body { font-size: 14px; }
.tn-comment-list .comment-author { font-weight: 700; }
.tn-comment-list .comment-meta { font-size: 12px; color: var(--tn-muted); }
.tn-comment-list .children { margin-left: 20px; list-style: none; padding: 0; }
.tn-comment-form textarea,
.tn-comment-form input[type="text"],
.tn-comment-form input[type="email"],
.tn-comment-form input[type="url"] {
    width: 100%; padding: 9px 11px; margin-bottom: 10px;
    border: 1px solid var(--tn-border-strong); border-radius: var(--tn-radius);
    background: var(--tn-surface); color: var(--tn-ink);
}
.tn-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 9px 18px; font-size: 14px; font-weight: 700;
    color: #fff; background: var(--tn-accent); border: 0;
    border-radius: var(--tn-radius); cursor: pointer;
}
.tn-btn:hover { background: var(--tn-accent-dark); color: #fff; }

/* ============================================================
   7. SIDEBAR & WIDGET
   ============================================================ */
.tn-widget { margin-bottom: 26px; }
.tn-widget__title {
    display: block; padding: 7px 0; margin: 0 0 12px;
    font-size: 15px; font-weight: 700;
    border-top: 2px solid #000;
    border-bottom: 1px solid var(--tn-border);
}
html[data-theme="dark"] .tn-widget__title { border-top-color: var(--tn-ink); }
.tn-widget ul { list-style: none; margin: 0; padding: 0; }
.tn-widget ul li { padding: 8px 0; border-bottom: 1px solid var(--tn-border); font-size: 13px; }
.tn-widget ul li:last-child { border-bottom: 0; }
.tn-widget .tn-list li.tn-list-item { padding: 11px 0; }
/* Widget daftar berita: thumbnail di kanan, teks di kiri */
.tn-widget .tn-list-item { grid-template-columns: minmax(0, 1fr) 76px; }
.tn-widget .tn-list-item__thumb { order: 2; }
.tn-widget .tn-list-item > div { order: 1; }
.tn-widget select { max-width: 100%; padding: 6px; }
.tn-ad {
    min-height: 90px; display: grid; place-items: center; margin: 18px 0;
    border: 1px dashed var(--tn-border-strong); background: var(--tn-soft);
    font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--tn-muted);
}
.tn-ad--leaderboard { min-height: 100px; margin: 10px 0 22px; }
.tn-ad--live { display: block; min-height: 0; margin: 12px 0; padding: 0; background: transparent; border: 0; }
.tn-ad > * { max-width: 100%; }
.tn-ad img { display: block; max-width: 100%; height: auto; }
.tn-ad .tn-widget { margin-bottom: 0; }
/* Iklan inline di bawah daftar berita: tampil di desktop dan mobile */
.tn-ad--list { margin: 16px 0 4px; text-align: center; }
.tn-ad--list img { margin-inline: auto; }
.tn-list-ad { list-style: none; margin: 0; padding: 0; border: 0; }
/* Iklan dalam artikel: atas, tengah, dan bawah */
.tn-ad--article-top,
.tn-ad--article-middle,
.tn-ad--article-bottom { margin: 18px auto; text-align: center; }
.tn-ad--article-top img,
.tn-ad--article-middle img,
.tn-ad--article-bottom img { margin-inline: auto; }
/* Iklan di sidebar artikel */
.tn-ad--sidebar { margin: 0 0 18px; text-align: center; }
.tn-ad--sidebar img { margin-inline: auto; }
/* Iklan leaderboard di bawah menu: desktop saja, terpusat */
.tn-ad--header { max-width: 728px; margin: 10px auto 4px; }
/* Slot iklan khusus layar kecil: disembunyikan di desktop */
.tn-header-ad--mobile { display: none; }
.tn-ad--header-mobile { max-width: 100%; margin: 10px 0 4px; text-align: center; }

/* ============================================================
   8. FOOTER
   ============================================================ */
.tn-footer {
    --tn-bg: #000000;
    --tn-soft: #0f1113;
    --tn-surface: #0f1113;
    --tn-ink: #ffffff;
    --tn-muted: #9aa4ae;
    --tn-border: rgba(255,255,255,.14);
    --tn-border-strong: rgba(255,255,255,.24);
    --tn-accent: #7db3ff;
    --tn-accent-dark: #a7cbff;
    margin-top: 36px; padding: 28px 0 24px;
    background: #000000; border-top: 1px solid rgba(255,255,255,.1);
    color: var(--tn-ink); font-size: 13px;
}

/* Ikuti / bagikan (gaya tirto.id) */
.tn-footer__follow {
    padding-bottom: 20px; margin-bottom: 22px;
    border-bottom: 1px solid var(--tn-border); text-align: center;
}
.tn-footer__follow-label { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: #fff; }
.tn-footer__social { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tn-social-btn {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 38px; padding: 7px 12px;
    border: 1px solid var(--tn-border-strong); border-radius: var(--tn-radius);
    background: rgba(255,255,255,.04); color: #fff;
    font-size: 13px; font-weight: 600; line-height: 1.2;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.tn-social-btn svg { width: 18px; height: 18px; flex: 0 0 auto; fill: currentColor; }
.tn-social-btn:hover { border-color: var(--tn-accent); background: rgba(125,179,255,.12); color: var(--tn-accent); }
.tn-social-btn--instagram svg { fill: #e1306c; }
.tn-social-btn--threads svg { fill: #fff; }
.tn-social-btn--tiktok svg { fill: #25f4ee; }
.tn-social-btn--facebook svg { fill: #1877f2; }
.tn-social-btn:hover svg { fill: currentColor; }

.tn-footer__top { display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: 24px; }
.tn-footer__brand { display: inline-flex; align-items: center; font-size: 22px; font-weight: 700; letter-spacing: -.05em; color: #fff; }
.tn-footer__brand span { color: #e53935; }
.tn-footer__brand img { display: block; width: auto; max-width: 180px; height: auto; max-height: 48px; object-fit: contain; }
.tn-footer__tagline { margin: 6px 0 10px; color: var(--tn-muted); font-style: italic; }
.tn-footer__desc { margin: 0; color: #c7cdd3; }
.tn-footer__address { margin: 0; color: #c7cdd3; font-size: 13px; line-height: 1.6; }
.tn-footer .tn-widget__title { border-top-color: #fff; }
.tn-footer h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #fff; }
.tn-footer ul { list-style: none; margin: 0; padding: 0; }
.tn-footer li { padding: 3px 0; }
.tn-footer a:hover { color: var(--tn-accent); }
.tn-footer__bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px;
    margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--tn-border);
    font-size: 12px; color: var(--tn-muted);
}
.tn-footer__copy { display: flex; flex-direction: column; gap: 2px; }
.tn-footer__copy-tagline { color: #e8ebee; font-weight: 600; }
.tn-footer__to-top { color: var(--tn-muted); font-weight: 600; }
.tn-footer__to-top:hover { color: #fff; }
.tn-to-top {
    position: fixed; right: 16px; bottom: 16px; z-index: 800;
    width: 38px; height: 38px; display: grid; place-items: center;
    background: var(--tn-ink); color: var(--tn-bg);
    border-radius: 50%; opacity: 0; visibility: hidden;
    transition: opacity .2s ease; cursor: pointer; font-size: 18px;
}
.tn-to-top.is-visible { opacity: .9; visibility: visible; }
.tn-to-top:hover { opacity: 1; }

/* ============================================================
   9. RESPONSIF
   ============================================================ */
/* Iklan header mepet dengan kartu pertama di desktop */
@media (min-width: 970px) {
    .tn-hero { padding-top: 8px; }
}

@media (max-width: 969px) {
    .tn-nav { display: none; }
    .tn-ad-slot { display: none; }
    .tn-ad-slot.tn-header-ad--mobile { display: block; }
    .tn-header__search { max-width: none; flex-basis: 260px; }
    .tn-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; }
    .tn-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    :root { --tn-gap: 16px; }
    .tn-layout { grid-template-columns: minmax(0, 1fr); }
    .tn-layout > * { min-width: 0; }
    .tn-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
    .tn-hero { padding-bottom: 0; }
    .tn-hero__grid {
        display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch;
        gap: 12px; margin: 0 -16px; padding: 0 16px;
        scroll-snap-type: x mandatory; scroll-padding-left: 16px;
        scrollbar-width: none; -ms-overflow-style: none;
    }
    .tn-hero__grid::-webkit-scrollbar { display: none; }
    .tn-hero__side { display: contents; }
    .tn-hero__grid > .tn-card,
    .tn-hero__side > .tn-card { flex: 0 0 280px; max-width: calc(100vw - 76px); scroll-snap-align: start; }
    .tn-card--display .tn-card__title { font-size: 15px; line-height: 1.35; font-weight: 600; }
    .tn-card__excerpt { display: none; }

    /* Judul + meta hero ditaruh di atas gambar dengan gradien hitam */
    .tn-hero .tn-card__thumb { border-radius: 8px; }
    .tn-hero .tn-card__thumb::after { border-radius: 0 0 8px 8px; }
    .tn-hero .tn-card__thumb::after { opacity: 1; z-index: 0; }
    .tn-hero .tn-card__overlay {
        position: absolute; inset: 0 0 auto; aspect-ratio: 16 / 9;
        z-index: 2; display: flex; flex-direction: column; justify-content: flex-end;
        padding: 0 10px 8px; pointer-events: none;
    }
    .tn-hero .tn-card__overlay-title {
        display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
        overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px;
        color: #fff; font-size: 14px; line-height: 1.25; font-weight: 700;
        text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
    }
    .tn-hero .tn-card__overlay-meta { display: block; pointer-events: auto; }
    .tn-hero .tn-card__overlay-meta .tn-card__meta {
        gap: 5px; font-size: 10px; line-height: 1.2;
    }
    .tn-hero .tn-card__overlay-meta .tn-card__label {
        color: rgba(255, 255, 255, .92); font-size: 10px;
    }
    .tn-hero .tn-card__overlay-meta time { color: rgba(255, 255, 255, .78); }
    .tn-hero .tn-card__overlay-meta .tn-sep { color: rgba(255, 255, 255, .5); }
    .tn-hero .tn-card > .tn-card__meta,
    .tn-hero .tn-card__title { display: none; }
    .tn-editorpick {
        margin: 8px 0 0; padding: 0;
        background: transparent; border: 0;
    }
    .tn-editorpick .tn-card__thumb { border-radius: 8px; }
    .tn-editorpick .tn-grid {
        display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch;
        gap: 12px; margin: 0 -16px; padding: 0 16px;
        scroll-snap-type: x mandatory; scroll-padding-left: 16px;
        scrollbar-width: none; -ms-overflow-style: none;
    }
    .tn-editorpick .tn-grid::-webkit-scrollbar { display: none; }
    .tn-editorpick .tn-grid > .tn-card { flex: 0 0 240px; scroll-snap-align: start; }
    .tn-grid-4, .tn-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tn-split { grid-template-columns: 1fr; }
    .tn-split > * + * { border-left: 0; padding-left: 0; border-top: 1px solid var(--tn-border); padding-top: 16px; }
    .tn-article { padding-top: 10px; }
    .tn-article__title { font-size: var(--tn-title-tablet-size, 26px); line-height: var(--tn-title-tablet-lh, 30px); letter-spacing: -.028em; margin-top: 0; }
    .tn-article-body { font-size: var(--tn-body-text-tablet-size, 16px); line-height: var(--tn-body-text-tablet-lh, 1.75); }
    .tn-article__subtitle { margin-top: 0; font-size: 15px; line-height: 1.35; }
    .tn-article__meta { line-height: 1.35; }
    .tn-article__meta--sub { margin-top: -4px; }
    .tn-donate-btn { padding: 4px 9px; font-size: 11px; }
    .tn-sticky { position: static; }

    /* Tutup bar kosong agar breadcrumb mepet header */
    .tn-spotlight { display: none; }
    .tn-breadcrumbs { padding: 8px 0; }

    /* Sudut bulat untuk thumbnail di mobile (gambar utama artikel tetap kotak) */
    .tn-card__thumb,
    .tn-list-item__thumb { border-radius: 8px; }

    /* Daftar berita gaya tirto: thumbnail kotak lebih besar */
    .tn-list-item { grid-template-columns: 72px minmax(0, 1fr); }
    .tn-widget .tn-list-item { grid-template-columns: minmax(0, 1fr) 72px; }
    .tn-list-item__thumb { border-radius: 8px; }
    .tn-split .tn-list-item { grid-template-columns: minmax(0, 1fr) 96px; }
    .tn-split .tn-list-item__thumb { order: 2; }
    .tn-split .tn-list-item > div { order: 1; }

    /* Bacaan terkait digeser horizontal seperti tirto */
    .tn-related .tn-grid {
        display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch;
        gap: 12px; margin: 0; padding: 0;
        scroll-snap-type: x mandatory;
        scrollbar-width: none; -ms-overflow-style: none;
    }
    .tn-related .tn-grid::-webkit-scrollbar { display: none; }
    .tn-related .tn-grid > .tn-card { flex: 0 0 220px; scroll-snap-align: start; }

    /* Footer: brand penuh, 2 kolom, tombol sosial hanya ikon */
    .tn-footer__top { grid-template-columns: 1fr 1fr; }
    .tn-footer__top > .tn-widget:first-child { grid-column: 1 / -1; }
    .tn-footer__social { justify-content: space-around; }
    .tn-social-btn { min-width: 0; padding: 12px; background: rgba(255,255,255,.08); }
    .tn-social-btn svg { width: 24px; height: 24px; }
    .tn-social-btn span { display: none; }
    .tn-footer h3 { margin-bottom: 8px; }
    .tn-footer .tn-widget ul li { padding: 1px 0; line-height: 1.35; }
}

@media (max-width: 767px) {
    /* Header mobile: toggle — logo — ikon pencarian */
    .tn-header__inner {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        grid-template-areas:
            "toggle brand searchbtn"
            "searchform searchform searchform";
        align-items: center;
        min-height: 48px;
        padding: 6px 0;
        row-gap: 0;
    }
    .tn-header__tools { display: contents; }
    .tn-header-date,
    .tn-nav-index,
    #tn-text-toggle,
    #tn-theme-toggle { display: none; }
    .tn-menu-btn { grid-area: toggle; justify-self: start; }
    .tn-brand { grid-area: brand; justify-self: center; }
    .tn-brand .custom-logo { max-height: 24px; }
    .tn-brand__text { font-size: 20px; }
    .tn-menu-btn, .tn-search-toggle { width: 30px; height: 30px; }
    .tn-menu-btn svg, .tn-search-toggle svg { width: 18px; height: 18px; }
    .tn-search-toggle { grid-area: searchbtn; justify-self: end; display: inline-flex; }

    .tn-header__search {
        grid-area: searchform;
        display: none;
        width: 100%;
        max-width: none;
        margin: 6px 0 0;
        flex: none;
    }
    body.tn-search-open .tn-header__search { display: block; }
}

@media (max-width: 560px) {
    .tn-section-head h2 { font-size: 19px; }
    .tn-grid-2, .tn-grid-3, .tn-grid-4, .tn-grid-5 { grid-template-columns: 1fr 1fr; }
    .tn-hero__side { gap: 14px; }
    .tn-card--sm .tn-card__title,
    .tn-card--display .tn-card__title { font-size: 13px; }
    .tn-editorpick { padding: 0; margin: 8px 0 0; background: transparent; border: 0; }
    .tn-editorpick .tn-grid-5 { gap: 12px; }
    .tn-sidebar { grid-template-columns: 1fr; }
    .tn-article__title { font-size: var(--tn-title-mobile-size, 24px); line-height: var(--tn-title-mobile-lh, 28px); }
    .tn-article-body { font-size: var(--tn-body-text-mobile-size, 16px); line-height: var(--tn-body-text-mobile-lh, 1.75); }
    .tn-google-source { gap: 10px; padding: 9px 10px; }
    .tn-google-source__text > span { font-size: 11px; }
    .tn-to-top { right: 10px; bottom: 10px; }
}

@media print {
    .tn-header, .tn-drawer, .tn-overlay, .tn-footer, .tn-share, .tn-to-top, .tn-ad-slot, .tn-ad { display: none !important; }
    .tn-layout { display: block; }
    body { color: #000; background: #fff; }
}
