@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --line: #55432f;
        --muted: rgba(240, 230, 216, 0.78);
        --surface-2: #3a2e24;
    }
}

:root[data-theme="dark"] {
    --line: #55432f;
    --muted: rgba(240, 230, 216, 0.78);
    --surface-2: #3a2e24;
}

::selection {
    background: var(--accent);
    color: var(--btn-text);
}

html {
    scroll-behavior: smooth;
}

.auth-wrap {
    display: flex;
    justify-content: center;
    padding: clamp(30px, 6vw, 70px) 0;
}

.auth-card {
    width: min(420px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 30px 28px;
    box-shadow: 0 14px 34px var(--shadow);
}

.auth-title {
    margin: 0 0 6px;
    font-size: 1.6rem;
    letter-spacing: -0.01em;
}

.auth-sub {
    margin: 0 0 22px;
    font-size: 0.95rem;
}

.auth-form {
    display: grid;
    gap: 15px;
}

.auth-label {
    display: grid;
    gap: 6px;
    font-weight: 700;
    font-size: 0.95rem;
}

.auth-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
}

.auth-input:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
    -webkit-text-fill-color: var(--text);
    caret-color: var(--text);
}

.auth-submit {
    border: 0;
    background: var(--btn-bg);
    color: var(--btn-text);
    padding: 12px 16px;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.06s ease, background-color 0.15s ease;
}

.auth-submit:active {
    transform: scale(0.98);
}

.auth-back {
    margin: 18px 0 0;
    text-align: center;
    font-size: 0.92rem;
}

.auth-back a {
    color: var(--muted);
    text-decoration: none;
}

.auth-back a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.site-main {
    padding: 12px 0 34px;
}

.site-main > :last-child {
    margin-bottom: 0;
}

.hero {
    padding: clamp(22px, 4vw, 44px) 0 4px;
    text-align: center;
}

.hero-badge {
    margin-bottom: 16px;
}

.hero h1 {
    margin-bottom: 10px;
}

.hero-tagline {
    margin: 0 auto 20px;
}

.hero-facts {
    justify-content: center;
    margin-bottom: 22px;
    gap: 10px;
}

.hero-cta {
    justify-content: center;
}

.section {
    margin: clamp(30px, 4.5vw, 48px) 0;
}

.section h2 {
    text-align: center;
    margin: 0 0 22px;
    font-size: clamp(1.35rem, 1.15rem + 1vw, 1.75rem);
    letter-spacing: -0.01em;
}

.cards {
    grid-template-columns: repeat(auto-fit, minmax(250px, 320px));
    justify-content: center;
}

.space-map {
    grid-template-columns: repeat(auto-fit, minmax(210px, 300px));
    justify-content: center;
}

.baca-toggle {
    cursor: pointer;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font: inherit;
    border-radius: 999px;
    padding: 6px 14px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.baca-toggle:hover {
    background: var(--accent-soft);
    color: var(--text);
}

.baca-toggle-small {
    padding: 3px 11px;
    font-size: 0.85rem;
}

.note-meta-context {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 0.92rem;
}

.meta-sep {
    opacity: 0.6;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 14px;
    font-size: 0.88rem;
    color: var(--muted);
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s ease;
}

.breadcrumb a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.crumb-sep {
    opacity: 0.6;
}

.crumb-current {
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 34ch;
}

.callout {
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    padding: 12px 16px;
    margin: 0 0 1em;
    background: var(--pill-bg);
}

.callout-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.callout-body {
    font-size: 0.97em;
}

.callout-info { border-left-color: #5b8bb0; }
.callout-tip { border-left-color: #6fa060; }
.callout-warning { border-left-color: #c99a63; }
.callout-danger { border-left-color: #b0503f; }

.read-resume {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    z-index: 70;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    padding: 10px 18px;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: 0.9rem;
    box-shadow: 0 12px 30px var(--shadow-hover);
    transition: background-color 0.15s ease;
}

.read-resume:hover {
    background: var(--pill-bg);
}

.garden-graph-wrap {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 24px var(--shadow);
}

.garden-graph-wrap:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

.graph-toolbar {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.graph-btn {
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    border-radius: 8px;
    padding: 4px 12px;
    cursor: pointer;
    font: inherit;
    transition: background-color 0.15s ease;
}

.graph-btn:hover {
    background: var(--pill-bg);
}

.graph-hint {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.8rem;
}

.garden-graph {
    width: 100%;
    height: auto;
    display: block;
    cursor: grab;
    touch-action: none;
}

.garden-graph.grabbing {
    cursor: grabbing;
}

.graph-edge {
    fill: none;
    stroke: var(--line);
    stroke-width: 1.2;
    stroke-opacity: 0.9;
    transition: stroke 0.15s ease;
}

.graph-edge.lit {
    stroke: var(--accent);
    stroke-width: 2;
    stroke-opacity: 1;
}

.graph-node {
    cursor: pointer;
    animation: graph-float 7s ease-in-out infinite alternate;
}

@keyframes graph-float {
    from { transform: translateY(-1.5px); }
    to { transform: translateY(1.5px); }
}

.graph-node:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

.graph-dot {
    stroke: var(--surface);
    stroke-width: 2;
    transition: stroke 0.15s ease, stroke-width 0.15s ease;
}

.graph-node:hover .graph-dot,
.graph-node.lit .graph-dot {
    stroke: var(--accent);
    stroke-width: 3;
}

.graph-label {
    fill: var(--muted);
    font-size: 11px;
    font-family: Georgia, "Times New Roman", serif;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.graph-node:hover .graph-label,
.graph-node.lit .graph-label,
.graph-label-on {
    opacity: 1;
}

.graph-legend {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.85rem;
    align-items: center;
}

.graph-legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.graph-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.note-foot {
    margin-top: 30px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px 24px;
    box-shadow: 0 10px 24px var(--shadow);
}

.note-foot-title {
    font-weight: 700;
    font-size: 0.98rem;
    margin-bottom: 10px;
}

.note-foot-hint {
    margin: 0 0 12px;
    font-size: 0.92rem;
}

.note-foot-divider {
    border: 0;
    border-top: 1px dashed var(--line);
    margin: 18px 0;
}

.note-foot-links {
    display: grid;
    gap: 16px;
}

.note-foot-link-group .note-foot-title {
    margin-bottom: 8px;
}

.share-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.12s ease;
}

.share-btn:hover {
    background: var(--pill-bg);
    transform: translateY(-1px);
}

.search-snippet {
    line-height: 1.6;
}

.search-form.big select {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

.friendly-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin: 18px 0;
}

.friendly-facts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.timeline-row {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    align-items: center;
}

.timeline-year {
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.timeline-year:hover {
    text-decoration: underline;
}

.timeline-bar {
    height: 8px;
    background: var(--surface-2);
    border-radius: 4px;
    overflow: hidden;
}

.timeline-fill {
    height: 8px;
    background: var(--accent);
    border-radius: 4px;
}

.timeline-count {
    color: var(--muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

.colophon-section {
    margin-bottom: 22px;
}

.footer-links {
    margin-top: 8px;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* =====================================================
   KOMPOSISI BACA — rumah bagi mata yang berlama-lama
   ===================================================== */

.page-head h1,
.note-head h1 {
    font-size: clamp(1.85rem, 1.45rem + 1.9vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.018em;
    text-wrap: balance;
    margin: 0 0 0.55em;
}

.page-head {
    margin-bottom: 26px;
}

.page-head p,
.hero-tagline {
    max-width: 58ch;
    line-height: 1.7;
    color: var(--muted);
}

.page-head p {
    margin: 0.4em 0 0;
}

.note-detail {
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
}

.note-content {
    font-size: clamp(1.04rem, 1rem + 0.22vw, 1.13rem);
    line-height: 1.85;
    text-rendering: optimizeLegibility;
    overflow-wrap: break-word;
}

.note-content > *:first-child {
    margin-top: 0;
}

.note-content p {
    margin: 0 0 1.3em;
    orphans: 3;
    widows: 3;
}

.note-content h2 {
    font-size: 1.35rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
    text-wrap: balance;
    margin: 2.4em 0 0.8em;
    scroll-margin-top: 90px;
}

.note-content h3 {
    font-size: 1.15rem;
    line-height: 1.35;
    margin: 2em 0 0.7em;
    scroll-margin-top: 90px;
}

.note-content h4,
.note-content h5,
.note-content h6 {
    font-size: 1rem;
    margin: 1.8em 0 0.6em;
    scroll-margin-top: 90px;
}

.note-content ul,
.note-content ol {
    padding-left: 1.4em;
    margin: 0 0 1.3em;
}

.note-content li {
    margin: 0.45em 0;
    line-height: 1.75;
}

.note-content li::marker {
    color: var(--accent);
}

.note-content blockquote {
    margin: 1.6em 0;
    padding: 0.2em 0 0.2em 1.2em;
    border-left: 3px solid var(--accent);
    background: transparent;
    border-radius: 0;
    font-style: italic;
    color: var(--muted);
}

.note-content pre {
    margin: 1.6em 0;
    padding: 1em 1.2em;
    border-radius: 12px;
    font-size: 0.9em;
    line-height: 1.65;
    overflow-x: auto;
}

.note-content code {
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 0.92em;
    padding: 0.12em 0.38em;
    border-radius: 6px;
    background: var(--chip-bg);
}

.note-content pre code {
    padding: 0;
    background: transparent;
}

.note-content img {
    display: block;
    max-width: 100%;
    margin: 1.8em auto;
    border-radius: 14px;
}

.note-content hr {
    border: 0;
    border-top: 1px dashed var(--line);
    width: 38%;
    margin: 2.6em auto;
}

.note-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--accent-soft);
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.note-content a:hover {
    text-decoration-color: var(--accent);
}

.note-content mark {
    background: var(--chip-bg);
    color: inherit;
    padding: 0 0.25em;
    border-radius: 4px;
}

.note-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    font-size: 0.95em;
}

.note-content th,
.note-content td {
    border: 1px solid var(--line);
    padding: 8px 12px;
    text-align: left;
}

.note-content th {
    background: var(--pill-bg);
}

.note-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 12px;
}

.note-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 14px;
}

body.baca .note-detail {
    max-width: 74ch;
}

body.baca .note-content {
    font-size: clamp(1.08rem, 1.02rem + 0.3vw, 1.2rem);
    line-height: 1.95;
}

body.baca .note-content p {
    margin-bottom: 1.4em;
}

body.baca .note-cover {
    max-height: 280px;
}

/* =====================================================
   KOMPOSISI BERANDA & RUANG PUBLIK
   Kepala padat, kartu seragam, kaki tidak berongga
   ===================================================== */

.site-header {
    background: var(--bg);
}

.site-header .site-nav {
    padding: 4px 20px 10px;
}

.cards {
    gap: 20px;
    align-items: stretch;
}

.note-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    border-radius: 16px;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 6px 18px var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.note-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px var(--shadow-hover);
    border-color: var(--accent-soft);
}

.note-card-title h3 {
    font-size: 1.08rem;
    line-height: 1.35;
    letter-spacing: -0.008em;
    margin: 0;
    text-wrap: balance;
}

.note-card-excerpt {
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(3 * 1.65em);
}

.note-card-meta {
    margin-top: auto;
    padding-top: 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    font-size: 0.82rem;
}

.note-card .note-tags {
    margin-top: 0;
}

.space-map {
    gap: 20px;
    align-items: stretch;
}

.space-map > * {
    padding: 20px;
    border-radius: 16px;
    display: block;
    height: 100%;
}

.space-map h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    letter-spacing: -0.008em;
}

.space-map p {
    margin: 0;
    line-height: 1.6;
    color: var(--muted);
}

footer.site-footer {
    margin-top: 44px;
}

footer.site-footer .footer-top {
    padding: 34px 20px 26px;
}

footer.site-footer .footer-base-inner {
    padding: 14px 20px;
}

/* =====================================================
   IRAMA PUBLIK — bahasa visual bersama semua halaman
   ===================================================== */

/* Pembuka halaman seragam: judul besar + deskripsi */
.site-main > .page-head,
.site-main > .archive-head,
.site-main > .cluster-head,
.site-main > .timeline-head,
.site-main > .about-head,
.site-main > .map-head,
.site-main > .search-head,
.site-main > .random-head,
.site-main > .collection-head {
    text-align: center;
    padding: clamp(24px, 5vw, 52px) 0 clamp(16px, 3vw, 28px);
    margin-bottom: clamp(24px, 4vw, 40px);
}

/* H1 generik di halaman non-beranda */
.site-main h1 {
    font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-wrap: balance;
    margin: 0 0 0.4em;
    color: var(--text);
}

/* Deskripsi pembuka */
.site-main .page-head p,
.site-main .archive-head p,
.site-main .cluster-head p,
.site-main .timeline-head p,
.site-main .about-head p,
.site-main .map-head p,
.site-main .search-head p,
.site-main > .about-wrap > p:first-of-type {
    max-width: 58ch;
    margin: 0.4em auto 0;
    line-height: 1.7;
    color: var(--muted);
    font-size: 1.05rem;
}

/* Pil fakta pembuka (mis. arsip: "39 catatan sejak 2019") */
.page-facts {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 16px auto 0;
}

.page-fact {
    padding: 6px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.88rem;
    color: var(--muted);
}

.page-fact strong {
    color: var(--text);
    font-weight: 700;
    margin-right: 4px;
}

/* Section heading (H2) — terpusat, ritmis */
.site-main h2 {
    font-size: clamp(1.35rem, 1.15rem + 1vw, 1.75rem);
    line-height: 1.25;
    letter-spacing: -0.012em;
    text-wrap: balance;
    margin: 0 0 0.8em;
    color: var(--text);
}

/* Section dengan konten */
.site-main section {
    margin-bottom: clamp(34px, 5vw, 56px);
}

/* Section tanpa heading sendiri, hanya paragraf (tentang, now) */
.site-main .prose {
    max-width: 64ch;
    margin: 0 auto clamp(24px, 4vw, 40px);
    font-size: clamp(1.04rem, 1rem + 0.22vw, 1.13rem);
    line-height: 1.85;
    color: var(--text);
}

.site-main .prose p {
    margin: 0 0 1.3em;
}

.site-main .prose h2 {
    margin-top: 2em;
}

/* Kartu generik (admin-card yang dipakai di ruang publik) */
.admin-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 6px 18px var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.admin-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px var(--shadow-hover);
    border-color: var(--accent-soft);
}

/* =====================================================
   ANIMASI TERSIDAP OTOMATIS (auto-reveal)
   ===================================================== */

.js .auto-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease,
                transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
    transition-delay: calc(var(--d, 0) * 60ms);
}

.js .auto-reveal.is-in {
    opacity: 1;
    transform: none;
}

/* Kartu berurutan: stagger otomatis */
.js .cards > .auto-reveal {
    transition-delay: calc(var(--i, 0) * 60ms);
}

.js .space-map > .auto-reveal {
    transition-delay: calc(var(--i, 0) * 70ms);
}

/* Heatmap linimasa */
.gh-heatmap-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px 20px;
    margin: 0 auto 40px;
    box-shadow: 0 8px 20px var(--shadow);
    max-width: 900px;
}

.gh-heatmap-header {
    margin-bottom: 18px;
}

.gh-heatmap-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.gh-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gh-stat strong {
    font-size: 1.4rem;
    color: var(--text);
}

.gh-stat span {
    font-size: 0.82rem;
    color: var(--muted);
}

.gh-heatmap-wrap {
    overflow-x: auto;
    padding-bottom: 8px;
}

.gh-months {
    display: flex;
    margin-left: 36px;
    margin-bottom: 4px;
    font-size: 0.75rem;
    color: var(--muted);
}

.gh-months span {
    flex: 1;
    min-width: 42px;
}

.gh-grid-container {
    display: flex;
    gap: 4px;
}

.gh-days-label {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    font-size: 0.72rem;
    color: var(--muted);
    height: 98px;
    padding-top: 2px;
}

.gh-grid {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(7, 12px);
    gap: 3px;
}

.gh-cell {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    cursor: pointer;
    transition: transform 0.1s ease, outline 0.1s ease;
}

.gh-cell:hover {
    transform: scale(1.4);
    outline: 1px solid var(--accent);
    outline-offset: 1px;
}

.gh-level-0 { background: var(--surface-2); }
.gh-level-1 { background: #c9e4b0; }
.gh-level-2 { background: #8ec96a; }
.gh-level-3 { background: #5aa842; }
.gh-level-4 { background: #2d7a1e; }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .gh-level-0 { background: #2b221b; }
    :root:not([data-theme="light"]) .gh-level-1 { background: #3a5a2a; }
    :root:not([data-theme="light"]) .gh-level-2 { background: #5a8a3a; }
    :root:not([data-theme="light"]) .gh-level-3 { background: #7ab84a; }
    :root:not([data-theme="light"]) .gh-level-4 { background: #a0d86a; }
}

:root[data-theme="dark"] .gh-level-0 { background: #2b221b; }
:root[data-theme="dark"] .gh-level-1 { background: #3a5a2a; }
:root[data-theme="dark"] .gh-level-2 { background: #5a8a3a; }
:root[data-theme="dark"] .gh-level-3 { background: #7ab84a; }
:root[data-theme="dark"] .gh-level-4 { background: #a0d86a; }

.gh-legend {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    justify-content: flex-end;
    font-size: 0.75rem;
    color: var(--muted);
}

.gh-legend-label {
    margin: 0 4px;
}

/* Linimasa publik: daftar catatan terbaru sebagai kartu */
.timeline-container {
    max-width: 900px;
    margin: 0 auto;
}

.timeline-year-block {
    margin-bottom: 36px;
}

.timeline-year-heading {
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 14px;
    border-bottom: 2px solid var(--line);
    padding-bottom: 8px;
    letter-spacing: -0.01em;
}

.timeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.timeline-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 18px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    box-shadow: 0 4px 12px var(--shadow);
}

.timeline-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px var(--shadow-hover);
    border-color: var(--accent-soft);
}

.timeline-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
}

.timeline-title:hover {
    color: var(--accent);
}

.timeline-meta {
    font-size: 0.82rem;
    color: var(--muted);
}

/* Arsip: baris tahun seragam sebagai kartu pil */
.archive-years {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.archive-year {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 14px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 12px var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    min-width: 110px;
}

.archive-year:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px var(--shadow-hover);
    border-color: var(--accent-soft);
}

.archive-year-num {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.01em;
}

.archive-year-count {
    font-size: 0.78rem;
    color: var(--muted);
}

/* Rumpun publik: kartu seragam */
.cluster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
}

.cluster-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 18px var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cluster-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px var(--shadow-hover);
    border-color: var(--accent-soft);
}

.cluster-card h3 {
    font-size: 1.08rem;
    line-height: 1.35;
    margin: 0 0 8px;
    letter-spacing: -0.008em;
}

.cluster-card h3 .hex {
    color: var(--accent);
    margin-right: 4px;
}

.cluster-card p {
    margin: 0 0 10px;
    line-height: 1.6;
    color: var(--muted);
    font-size: 0.93rem;
}

.cluster-card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.8rem;
}

/* Peta publik: pembungkus graph yang tenang */
.public-map-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 8px 20px var(--shadow);
    margin: 0 auto;
    max-width: 1200px;
}

/* Pencarian: hasil sebagai kartu */
.search-results {
    display: grid;
    gap: 14px;
    max-width: 780px;
    margin: 0 auto;
}

.search-result {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 4px 14px var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.search-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px var(--shadow-hover);
    border-color: var(--accent-soft);
}

.search-result h3 {
    margin: 0 0 6px;
    font-size: 1.08rem;
    letter-spacing: -0.008em;
}

.search-result p {
    margin: 0;
    line-height: 1.6;
    color: var(--muted);
    font-size: 0.93rem;
}

.search-empty {
    max-width: 520px;
    margin: 40px auto;
    padding: 28px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: 16px;
    color: var(--muted);
}

.search-empty h3 {
    margin: 0 0 8px;
    color: var(--text);
}

.search-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.search-suggestion {
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.search-suggestion:hover {
    background: var(--pill-bg);
    border-color: var(--accent-soft);
}

/* Nyasar: kartu kejutan besar di tengah */
.random-wrap {
    max-width: 520px;
    margin: 40px auto;
    text-align: center;
}

.random-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 32px 28px;
    box-shadow: 0 10px 30px var(--shadow);
}

.random-card h3 {
    font-size: 1.5rem;
    letter-spacing: -0.015em;
    margin: 0 0 10px;
    text-wrap: balance;
}

.random-card p {
    color: var(--muted);
    line-height: 1.7;
    margin: 0 0 18px;
}

/* Koleksi publik */
.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
}

.collection-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 6px 18px var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.collection-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px var(--shadow-hover);
    border-color: var(--accent-soft);
}

.collection-card h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    letter-spacing: -0.008em;
}

.collection-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.6;
}

/* =====================================================
   KEPALA MOBILE COMPACT
   ===================================================== */
@media (max-width: 700px) {
    .site-header {
        padding: 8px 12px 6px;
    }

    .site-header-inner {
        flex-wrap: nowrap;
        gap: 8px;
        align-items: center;
    }

    .brand {
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    .brand-icon {
        width: 22px;
        height: 22px;
    }

    .site-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 2px;
        padding-bottom: 4px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .site-nav::-webkit-scrollbar {
        display: none;
    }

    .site-nav a {
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 6px 10px;
        min-height: auto;
        flex-shrink: 0;
    }

    .site-nav .theme-menu {
        flex-shrink: 0;
    }

    .site-nav .theme-toggle {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .site-nav .link-button {
        padding: 6px 10px;
        min-height: auto;
        font-size: 0.85rem;
    }

    .site-search {
        margin-top: 6px;
        gap: 6px;
    }

    .site-search input {
        font-size: 16px;
        padding: 9px 12px;
        min-height: 40px;
    }

    .site-search button {
        padding: 9px 14px;
        min-height: 40px;
        font-size: 0.9rem;
    }

    .footer-grid {
        gap: 20px;
    }

    .footer-col {
        font-size: 0.9rem;
    }

    .note-detail {
        max-width: 100%;
    }

    .note-content {
        font-size: 1.06rem;
        line-height: 1.8;
    }

    .page-head h1,
    .note-head h1,
    .site-main h1 {
        font-size: clamp(1.6rem, 1.35rem + 2vw, 2rem);
    }

    .note-foot {
        padding: 18px;
    }

    .note-content pre {
        padding: 0.9em 1em;
    }

    .note-card {
        padding: 18px;
    }

    .timeline-year-heading {
        font-size: 1.2rem;
    }

    .gh-heatmap-stats {
        gap: 16px;
    }

    .gh-stat strong {
        font-size: 1.2rem;
    }

    .gh-cell {
        width: 10px;
        height: 10px;
    }

    .gh-grid {
        grid-template-rows: repeat(7, 10px);
        gap: 2px;
    }

    .cards,
    .space-map,
    .cluster-grid,
    .collection-grid {
        grid-template-columns: 1fr;
    }

    .archive-years {
        gap: 8px;
    }

    .archive-year {
        padding: 10px 16px;
        min-width: 90px;
    }

    .baca-toggle,
    .share-btn,
    .graph-btn {
        min-height: 44px;
    }

    .baca-toggle-small {
        min-height: 34px;
    }

    .search-form.big {
        flex-direction: column;
    }

    .search-form.big select,
    .search-form.big input {
        width: 100%;
    }

    .graph-hint {
        margin-left: 0;
        width: 100%;
    }

    .auth-card {
        padding: 24px 20px;
    }

    .crumb-current {
        max-width: 22ch;
    }
}

@media (max-width: 600px) {
    .timeline-row {
        grid-template-columns: 52px 1fr;
    }

    .timeline-count {
        grid-column: 2;
    }
}

@media print {
    .site-header,
    .site-footer,
    .skip-link,
    .breadcrumb,
    .note-foot,
    .note-tags,
    .section,
    .alert,
    .baca-toggle,
    .toast-stack,
    .read-resume,
    .auth-wrap,
    .graph-toolbar,
    .alur-actions {
        display: none !important;
    }

    body {
        background: #ffffff !important;
        color: #111111 !important;
    }

    .site-main {
        width: 100%;
        padding: 0;
    }

    .note-detail {
        max-width: 100%;
    }

    .note-content {
        background: #ffffff !important;
        border: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        color: #111111 !important;
    }

    .callout {
        background: #ffffff !important;
        border: 1px solid #bbbbbb;
        color: #111111;
    }

    .note-head h1,
    .site-main h1 {
        color: #111111;
    }

    .note-meta,
    .note-meta-context {
        color: #444444 !important;
    }

    .meta-pill,
    .badge {
        background: #ffffff !important;
        border: 1px solid #bbbbbb;
        color: #222222 !important;
    }

    .note-content a {
        color: #111111;
        text-decoration: none;
    }

    .note-content a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.82em;
        color: #555555;
        word-break: break-all;
    }

    .note-content pre {
        background: #f4f4f4 !important;
        color: #111111 !important;
        border: 1px solid #cccccc;
    }

    .note-cover {
        max-height: 240px;
    }

    .garden-graph-wrap {
        box-shadow: none !important;
        background: #ffffff !important;
        border: 1px solid #cccccc !important;
        padding: 12px !important;
        page-break-inside: avoid;
    }

    .garden-graph {
        width: 100%;
        height: auto;
    }

    .graph-edge {
        stroke: #333333 !important;
        stroke-opacity: 1 !important;
    }

    .graph-label {
        opacity: 1 !important;
        fill: #333333 !important;
    }

    .graph-node {
        animation: none !important;
    }

    .timeline-year-heading {
        color: #111111 !important;
    }

    .gh-heatmap-card {
        box-shadow: none !important;
        background: #ffffff !important;
        border: 1px solid #cccccc !important;
    }

    .gh-cell {
        border: 1px solid #cccccc !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }

    html {
        scroll-behavior: auto !important;
    }

    .gh-cell:hover,
    .share-btn:hover,
    .graph-node,
    .note-card:hover,
    .admin-card:hover,
    .cluster-card:hover,
    .timeline-item:hover,
    .archive-year:hover,
    .search-result:hover,
    .collection-card:hover {
        transform: none !important;
    }

    .js .auto-reveal {
        opacity: 1;
        transform: none;
    }
}

/* =====================================================
   PAGINATION: BERPUSAT & SERAGAM
   (blok tambahan — tempel di baris paling akhir berkas)
   ===================================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    width: 100%;
    margin: clamp(28px, 4vw, 44px) auto 0;
    padding: 0;
    list-style: none;
}

.pagination .page-link,
.pagination .page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-size: 0.92rem;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 3px 10px var(--shadow);
    transition: transform 0.15s ease,
                box-shadow 0.15s ease,
                background-color 0.15s ease,
                border-color 0.15s ease,
                color 0.15s ease;
}

.pagination .page-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px var(--shadow-hover);
    border-color: var(--accent-soft);
    color: var(--accent);
}

.pagination .page-link.current {
    background: var(--btn-bg);
    border-color: var(--btn-bg);
    color: var(--btn-text);
    font-weight: 700;
    box-shadow: 0 6px 16px var(--shadow-hover);
    cursor: default;
    transform: none;
}

.pagination .page-link.disabled,
.pagination .page-link[aria-disabled="true"] {
    opacity: 0.45;
    pointer-events: none;
    box-shadow: none;
}

.pagination .page-dots {
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
    min-width: 28px;
    padding: 0 4px;
}

/* Panah prev / next sebagai lingkaran */
.pagination .page-link.prev,
.pagination .page-link.next,
.pagination .page-link[rel="prev"],
.pagination .page-link[rel="next"] {
    border-radius: 999px;
    min-width: 40px;
    padding: 0;
}

@media (max-width: 700px) {
    .pagination {
        gap: 6px;
    }

    .pagination .page-link,
    .pagination .page-dots {
        min-width: 44px;
        height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pagination .page-link:hover {
        transform: none;
    }
}

/* =====================================================
   PERATAAN TULISAN: PARAGRAF PANJANG RATA KIRI-KANAN
   (blok tambahan — tempel di baris paling akhir berkas)
   ===================================================== */

.about-intro p,
.prose p,
.note-content p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    hyphenate-limit-chars: 6 3 2;
}

/* Baris terakhir tiap paragraf tetap rata kiri,
   agar tidak meregang canggung di ujung bab */
.about-intro p,
.prose p,
.note-content p {
    text-align-last: left;
}

/* Kolom sempit tetap rata kiri: justify di ruang sempit
   melahirkan sungai putih yang mengganggu baca */
.about-principle p,
.about-space-desc,
.note-card-excerpt,
.note-card p,
.search-result p,
.note-content li,
.footer-col a {
    text-align: left;
    hyphens: none;
}

/* Yang berpusat tetap berpusat — tidak terusik oleh perataan */
.about-section > h2,
.about-section-sub,
.about-closing,
.about-closing p,
.section h2,
.hero-tagline,
.page-head p {
    text-align: center;
    hyphens: none;
}

/* =====================================================
   PERATAAN TULISAN v2 — RATA YANG ENAK DIPANDANG
   (tempel SETELAH blok perataan sebelumnya; yang belakangan menang)
   ===================================================== */

/* Kolom baca dilebarkan: justify butuh ruang agar tidak meregang */
.about-intro {
    max-width: 68ch;
}

/* Paragraf panjang: rata kiri-kanan dengan pemenggalan yang sopan */
.about-intro p,
.prose p,
.note-content p {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    hyphenate-limit-chars: 9 4 4;
    hyphenate-limit-lines: 2 2;
    text-align-last: left;
    word-spacing: normal;
    overflow-wrap: break-word;
}

/* Kolom sempit: rata kiri dengan rag yang dirapikan —
   tiada kata yatim di ujung paragraf, tiada kata terbelah */
.about-principle p,
.about-space-desc,
.note-card-excerpt,
.note-card p,
.search-result p,
.note-content li,
.footer-col a {
    text-align: left;
    hyphens: none;
    text-wrap: pretty;
}

/* Judul & sub-baris berpusat: dua baris yang berbagi panjang adil */
.about-section > h2,
.section h2,
.hero-tagline,
.page-head p,
.about-section-sub {
    text-align: center;
    hyphens: none;
    text-wrap: balance;
}

.about-section-sub {
    max-width: 46ch;
}

/* Penutup tetap tanda tangan berpusat — tidak di-justify */
.about-closing,
.about-closing p {
    text-align: center;
    hyphens: none;
    text-wrap: balance;
}