/* Indeks Desa — style utama
   Palet: hijau hutan, krem hangat, aksen kuning padi. */

:root {
    --bg: #f4f6f1;
    --bg-deep: #edf1ea;
    --surface: #ffffff;
    --surface-soft: #f8faf6;
    --ink: #17231d;
    --ink-soft: #35473e;
    --muted: #64736b;
    --line: #dfe6df;
    --line-strong: #cbd7cd;
    --brand: #0d5c49;
    --brand-deep: #083f32;
    --brand-mid: #14745b;
    --brand-soft: #e6f2ec;
    --accent: #d7a53f;
    --accent-deep: #a97616;
    --accent-soft: #fbf2dc;
    --danger: #b42318;
    --danger-soft: #fef0ed;
    --blue: #1f5fa8;
    --blue-soft: #eaf1fb;
    --radius: 18px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --shadow: 0 14px 38px rgba(20, 50, 38, 0.08);
    --shadow-soft: 0 6px 18px rgba(20, 50, 38, 0.06);
    --font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: Georgia, "Times New Roman", serif;
    --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --header-h: 78px;
}

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

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

body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.nav-open,
body.admin-nav-open {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

img,
svg {
    max-width: 100%;
}

a {
    color: var(--brand);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--brand-deep);
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h1,
h2,
h3,
h4 {
    line-height: 1.2;
    letter-spacing: -0.015em;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    background: var(--bg-deep);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 1px 6px;
}

::selection {
    background: var(--accent);
    color: var(--brand-deep);
}

:focus-visible {
    outline: 3px solid rgba(215, 165, 63, 0.8);
    outline-offset: 2px;
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: 200;
    background: var(--brand-deep);
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 0 10px 10px;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 0;
    color: #fff;
}

.container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.container.narrow {
    width: min(720px, calc(100% - 48px));
}

.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    display: inline-block;
    vertical-align: -0.15em;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 0.84rem;
}

.nowrap {
    white-space: nowrap;
}

.display {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.04;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 10px;
    color: var(--brand-mid);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow-dot,
.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-block;
    box-shadow: 0 0 0 4px rgba(215, 165, 63, 0.16);
}

.eyebrow-light {
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Buttons ===== */

.btn {
    --btn-bg: var(--brand);
    --btn-ink: #ffffff;
    --btn-line: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 19px;
    border: 1px solid var(--btn-line);
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-ink);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.2;
    transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 4px 12px rgba(13, 92, 73, 0.14);
}

.btn:hover {
    transform: translateY(-1px);
    color: var(--btn-ink);
    box-shadow: 0 8px 20px rgba(13, 92, 73, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    --btn-bg: var(--brand);
    --btn-line: var(--brand);
    --btn-ink: #fff;
}

.btn-ghost {
    --btn-bg: transparent;
    --btn-ink: var(--brand);
    --btn-line: var(--line-strong);
    box-shadow: none;
}

.btn-ghost:hover {
    --btn-bg: var(--brand-soft);
    --btn-line: var(--brand);
    color: var(--brand-deep);
    box-shadow: none;
}

.btn-danger {
    --btn-bg: var(--danger);
    --btn-line: var(--danger);
    --btn-ink: #fff;
}

.btn-small {
    min-height: 38px;
    padding: 7px 14px;
    font-size: 0.82rem;
}

.btn-block {
    width: 100%;
}

.btn[disabled] {
    opacity: 0.62;
    cursor: not-allowed;
    transform: none;
}

.btn.is-loading .icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.text-link .icon {
    width: 16px;
    height: 16px;
    transition: transform 0.15s ease;
}

.text-link:hover .icon {
    transform: translateX(2px);
}

/* ===== Header ===== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(250, 251, 248, 0.9);
    border-bottom: 1px solid rgba(203, 215, 205, 0.7);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--brand-deep);
    text-decoration: none;
    min-width: 0;
}

.brand:hover {
    color: var(--brand-deep);
}

.brand-mark {
    width: 41px;
    height: 41px;
    flex: 0 0 auto;
    color: var(--brand);
    filter: drop-shadow(0 4px 9px rgba(13, 92, 73, 0.18));
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.brand-copy strong {
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.brand-copy small {
    color: var(--muted);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    border-radius: 10px;
    color: var(--ink-soft);
    font-size: 0.87rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-link .icon {
    width: 17px;
    height: 17px;
    color: var(--muted);
}

.nav-link:hover,
.nav-link.is-active {
    background: var(--brand-soft);
    color: var(--brand-deep);
}

.nav-link.is-active .icon,
.nav-link:hover .icon {
    color: var(--brand);
}

.nav-admin {
    margin-left: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 12px;
    color: var(--brand-deep);
    align-items: center;
    justify-content: center;
}

/* ===== Flashes & toast ===== */

.flash-stack {
    position: fixed;
    right: 20px;
    top: 94px;
    z-index: 120;
    width: min(430px, calc(100% - 40px));
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
    animation: flash-in 0.25s ease;
}

.flash.is-leaving {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

@keyframes flash-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash p {
    margin: 0;
    font-size: 0.87rem;
    flex: 1;
    line-height: 1.45;
}

.flash-icon {
    color: var(--brand);
    margin-top: 1px;
}

.flash-success { border-left-color: #0f8a66; }
.flash-success .flash-icon { color: #0f8a66; }
.flash-error { border-left-color: var(--danger); }
.flash-error .flash-icon { color: var(--danger); }
.flash-warning { border-left-color: var(--accent-deep); }
.flash-warning .flash-icon { color: var(--accent-deep); }
.flash-info { border-left-color: var(--blue); }
.flash-info .flash-icon { color: var(--blue); }

.flash-close {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 0;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
}

.flash-close .icon {
    width: 16px;
    height: 16px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translate(-50%, 12px);
    z-index: 300;
    background: var(--brand-deep);
    color: #fff;
    padding: 11px 18px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(8, 63, 50, 0.28);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ===== Hero ===== */

.hero {
    position: relative;
    overflow: hidden;
    color: #f3f8f4;
    background:
        radial-gradient(circle at 78% 18%, rgba(215, 165, 63, 0.18), transparent 34%),
        radial-gradient(circle at 12% 86%, rgba(72, 177, 143, 0.22), transparent 38%),
        linear-gradient(132deg, #073a2e 0%, #0b5242 52%, #0e644e 100%);
    padding: 78px 0 108px;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.hero-orbit {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
    pointer-events: none;
}

.hero-orbit-one {
    width: 640px;
    height: 640px;
    right: -230px;
    top: -260px;
}

.hero-orbit-two {
    width: 360px;
    height: 360px;
    left: -160px;
    bottom: -190px;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
    gap: 64px;
    align-items: center;
}

.hero-copy .eyebrow {
    color: #b9d9cc;
}

.hero-copy .eyebrow-dot {
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(215, 165, 63, 0.18);
}

.hero h1 {
    color: #fbf8ef;
    font-size: clamp(2.45rem, 5vw, 4.15rem);
    margin-bottom: 22px;
    max-width: 14ch;
}

.hero h1 em {
    color: #e7bf72;
    font-style: italic;
}

.hero-lede {
    max-width: 62ch;
    margin-bottom: 30px;
    color: rgba(239, 248, 242, 0.82);
    font-size: 1.04rem;
    line-height: 1.68;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.hero .btn-primary {
    --btn-bg: var(--accent);
    --btn-line: var(--accent);
    --btn-ink: #25301f;
    box-shadow: 0 8px 22px rgba(215, 165, 63, 0.28);
}

.hero .btn-primary:hover {
    color: #25301f;
}

.hero .btn-ghost {
    --btn-ink: #e9f4ee;
    --btn-line: rgba(255, 255, 255, 0.28);
}

.hero .btn-ghost:hover {
    --btn-bg: rgba(255, 255, 255, 0.1);
    --btn-line: rgba(255, 255, 255, 0.45);
    color: #fff;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    color: rgba(235, 246, 239, 0.68);
    font-size: 0.78rem;
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.hero-meta .icon {
    width: 15px;
    height: 15px;
    color: #a9cdbd;
}

.hero-card {
    position: relative;
    background: #fbfcf9;
    color: var(--ink);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    padding: 26px;
    box-shadow: 0 30px 70px rgba(3, 31, 24, 0.32);
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.hero-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.hero-card-label {
    display: block;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.hero-card h2 {
    margin: 0 0 4px;
    font-size: 1.55rem;
}

.hero-location {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.hero-location .icon {
    width: 14px;
    height: 14px;
}

.code-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-soft);
    color: var(--ink-soft);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.code-badge-lg {
    padding: 7px 12px;
    font-size: 0.8rem;
}

.hero-score {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 0;
}

.hero-score .score-ring {
    width: 132px;
}

.hero-score-copy p {
    margin: 8px 0 2px;
    font-size: 0.86rem;
}

.hero-score-copy .muted {
    font-size: 0.78rem;
}

.mini-scores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-soft);
}

.mini-score {
    padding: 10px 12px;
    border-right: 1px solid var(--line);
}

.mini-score:last-child {
    border-right: 0;
}

.mini-score span {
    display: block;
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.mini-score strong {
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}

.hero-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}

.hero-card .empty-inline {
    padding: 20px 0 4px;
}

.empty-inline {
    text-align: center;
    padding: 28px 0;
}

.empty-inline h2 {
    font-size: 1.3rem;
    margin: 8px 0;
}

.empty-inline p {
    color: var(--muted);
    font-size: 0.86rem;
    margin-bottom: 14px;
}

/* ===== Status badges ===== */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--badge-line, var(--line));
    border-radius: 999px;
    background: var(--badge-bg, var(--surface-soft));
    color: var(--badge-ink, var(--ink-soft));
    font-size: 0.71rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
}

.status-lg {
    padding: 6px 13px;
    font-size: 0.8rem;
}

.status-mandiri { --badge-bg: #e8f5ef; --badge-ink: #0a624d; --badge-line: #bce2d2; }
.status-maju { --badge-bg: #eaf1fb; --badge-ink: #1d5a9f; --badge-line: #c3d8f2; }
.status-berkembang { --badge-bg: #fbf3df; --badge-ink: #986313; --badge-line: #eedaad; }
.status-tertinggal { --badge-bg: #fdf0e7; --badge-ink: #a34b14; --badge-line: #f1cfb7; }
.status-sangat-tertinggal { --badge-bg: #fcebea; --badge-ink: #a62b21; --badge-line: #efc5c1; }
.status-netral { --badge-bg: #f0f3f1; --badge-ink: #5d6b64; --badge-line: #d9e0da; }

/* ===== Score ring ===== */

.score-ring {
    --ring-value: 0;
    --ring-color: #0f766e;
    width: 168px;
    aspect-ratio: 1;
    flex: 0 0 auto;
    border-radius: 50%;
    background: conic-gradient(var(--ring-color) calc(var(--ring-value) * 1%), #e6ece7 0);
    display: grid;
    place-items: center;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(13, 92, 73, 0.04);
}

.score-ring::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 0 1px 6px rgba(13, 50, 38, 0.08);
    pointer-events: none;
}

.score-ring-inner {
    width: calc(100% - 22px);
    height: calc(100% - 22px);
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 14px rgba(13, 50, 38, 0.08);
}

.score-ring-label {
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.score-ring-inner strong {
    font-size: 1.9rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.score-ring-sub {
    color: var(--muted);
    font-size: 0.6rem;
}

.score-ring-empty .score-ring-inner strong {
    font-size: 2rem;
    color: var(--muted);
}

/* ===== Stats strip ===== */

.stats-strip {
    position: relative;
    z-index: 3;
    margin-top: -58px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.stat {
    padding: 21px 24px;
    border-right: 1px solid var(--line);
}

.stat:last-child {
    border-right: 0;
}

.stat-label {
    display: block;
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.stat strong {
    display: block;
    font-size: 1.65rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.stat .stat-date {
    font-size: 1.15rem;
}

.stat small {
    color: var(--muted);
    font-size: 0.72rem;
}

/* ===== Sections ===== */

.section {
    padding: 78px 0;
}

.section-soft {
    background: linear-gradient(180deg, var(--bg-deep), #f7f9f4);
    border-top: 1px solid rgba(203, 215, 205, 0.55);
    border-bottom: 1px solid rgba(203, 215, 205, 0.55);
}

.section-heading {
    max-width: 720px;
    margin-bottom: 34px;
}

.section-heading.centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-heading.centered .eyebrow {
    justify-content: center;
}

.section-heading h2 {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3.4vw, 2.7rem);
    margin-bottom: 10px;
    color: var(--ink);
}

.section-heading p {
    color: var(--muted);
    margin-bottom: 0;
}

.split-heading {
    max-width: none;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 26px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    min-width: min(340px, 100%);
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 0 15px;
    box-shadow: var(--shadow-soft);
}

.search-box > .icon {
    width: 18px;
    height: 18px;
    color: var(--muted);
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 12px 10px;
    outline: none;
    font-size: 0.87rem;
}

.search-box input::placeholder {
    color: #8b9890;
}

.search-clear {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    color: var(--muted);
    background: var(--bg-deep);
}

.search-clear .icon {
    width: 14px;
    height: 14px;
}

.featured-row {
    margin-bottom: 22px;
}

.featured-label {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.village-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.village-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
    box-shadow: var(--shadow-soft);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.village-card:hover {
    transform: translateY(-3px);
    border-color: #b8cfc1;
    box-shadow: var(--shadow);
    color: var(--ink);
}

.village-card-featured {
    background: linear-gradient(120deg, #ffffff, #f5faf6 70%);
    border-color: #c5dccf;
}

.village-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.village-avatar {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--brand-soft);
    color: var(--brand-deep);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.village-avatar.large {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    font-size: 1.05rem;
}

.village-card-title {
    flex: 1;
    min-width: 0;
}

.village-card-title h3 {
    margin: 1px 0 4px;
    font-size: 1.08rem;
}

.village-card-title p {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.4;
}

.village-card-title .icon {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
}

.village-card-body {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
}

.village-score-label {
    display: block;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.village-score strong {
    font-size: 1.7rem;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.village-status {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.village-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.year-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.year-chip {
    display: inline-flex;
    padding: 3px 7px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 600;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

a.year-chip:hover,
.year-chip.is-active {
    background: var(--brand-soft);
    border-color: #b7d7c8;
    color: var(--brand-deep);
}

.filter-empty {
    color: var(--muted);
    text-align: center;
    padding: 26px;
}

.add-more-card {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
    padding: 20px 22px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.55);
}

.add-more-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--brand);
}

.add-more-card h3 {
    margin: 0 0 3px;
    font-size: 1rem;
}

.add-more-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.83rem;
}

.add-more-card .btn {
    margin-left: auto;
    flex: 0 0 auto;
}

.empty-state {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 54px 30px;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.empty-state.compact {
    padding: 38px 24px;
}

.empty-state h1,
.empty-state h2,
.empty-state h3 {
    margin-bottom: 8px;
}

.empty-state p {
    max-width: 560px;
    margin: 0 auto 18px;
    color: var(--muted);
}

.empty-state .eyebrow {
    justify-content: center;
}

.empty-icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
}

.empty-icon .icon {
    width: 28px;
    height: 28px;
}

.empty-icon.small {
    width: 46px;
    height: 46px;
    margin-bottom: 10px;
}

.empty-icon.small .icon {
    width: 21px;
    height: 21px;
}

.empty-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* ===== Steps ===== */

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.step-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.step-number {
    position: absolute;
    top: 16px;
    right: 20px;
    color: #dfe8df;
    font-family: var(--font-display);
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1;
}

.step-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    margin-bottom: 16px;
}

.step-icon .icon {
    width: 23px;
    height: 23px;
}

.step-icon.iks { background: #e7f3ed; color: #0d6b54; }
.step-icon.ike { background: #fbf0d8; color: #9a6a16; }
.step-icon.ikl { background: #e9f0fa; color: #245d9e; }

.step-card h3 {
    margin-bottom: 7px;
    font-size: 1.05rem;
}

.step-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
}

.source-banner {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 28px;
    border-radius: var(--radius);
    color: #f2f8f4;
    background:
        radial-gradient(circle at 90% 20%, rgba(215, 165, 63, 0.2), transparent 40%),
        linear-gradient(120deg, #0b4a3b, #0e624d);
    box-shadow: var(--shadow);
}

.source-banner-copy {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.source-banner-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #e9c580;
}

.source-banner h3 {
    margin: 0 0 4px;
    color: #fbf8ef;
    font-size: 1.13rem;
}

.source-banner p {
    margin: 0;
    color: rgba(236, 247, 240, 0.74);
    font-size: 0.86rem;
}

.source-banner .btn-primary {
    --btn-bg: var(--accent);
    --btn-line: var(--accent);
    --btn-ink: #25301f;
    flex: 0 0 auto;
}

/* ===== Trend ===== */

.chart-card,
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.chart-card {
    padding: 24px 26px 14px;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    color: var(--muted);
    font-size: 0.76rem;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.legend-score {
    background: var(--brand-mid);
}

.legend-line {
    width: 20px;
    height: 0;
    border-top: 2px dashed var(--accent-deep);
    display: inline-block;
}

.trend-svg {
    width: 100%;
    height: auto;
    display: block;
    margin-top: 8px;
    overflow: visible;
}

.trend-grid {
    stroke: #e3eae3;
    stroke-width: 1;
}

.trend-axis {
    fill: #7b8981;
    font-family: var(--font-sans);
    font-size: 11px;
}

.trend-target {
    stroke: var(--accent-deep);
    stroke-width: 1.5;
    stroke-dasharray: 6 5;
    opacity: 0.75;
}

.trend-target-label {
    fill: var(--accent-deep);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
}

.trend-area {
    fill: rgba(20, 116, 91, 0.09);
}

.trend-line {
    fill: none;
    stroke: var(--brand-mid);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trend-point-label {
    fill: var(--ink-soft);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
}

.trend-year {
    fill: var(--muted);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
}

.trend-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

.trend-empty-icon {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    margin-bottom: 10px;
}

.trend-empty-icon .icon {
    width: 24px;
    height: 24px;
}

.chart-note {
    margin: 2px 0 10px;
    font-size: 0.72rem;
}

.trend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.year-pill {
    display: inline-flex;
    padding: 7px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.year-pill:hover,
.year-pill.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.year-pill-small {
    padding: 5px 11px;
    font-size: 0.76rem;
    gap: 7px;
}

.year-pill-small span {
    opacity: 0.7;
    font-weight: 500;
}

/* ===== Footer ===== */

.site-footer {
    margin-top: 0;
    background: #0a3529;
    color: rgba(235, 247, 239, 0.75);
    padding: 54px 0 22px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr 0.8fr;
    gap: 48px;
    padding-bottom: 34px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-footer {
    color: #f5faf6;
    margin-bottom: 14px;
}

.brand-footer:hover {
    color: #fff;
}

.brand-footer .brand-mark {
    color: #1a7c62;
}

.brand-footer .brand-copy small {
    color: rgba(235, 247, 239, 0.55);
}

.footer-brand p {
    max-width: 420px;
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.65;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.footer-links h2 {
    margin: 0 0 5px;
    color: #f7fbf8;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.footer-links a {
    color: rgba(235, 247, 239, 0.72);
    font-size: 0.84rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-links .icon {
    width: 13px;
    height: 13px;
}

.footer-note {
    margin: 6px 0 0;
    color: rgba(235, 247, 239, 0.48);
    font-size: 0.75rem;
    line-height: 1.55;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 18px;
    color: rgba(235, 247, 239, 0.45);
    font-size: 0.72rem;
}

.footer-bottom p {
    margin: 0;
}

/* ===== Village page ===== */

.village-hero {
    background:
        radial-gradient(circle at 85% 20%, rgba(215, 165, 63, 0.12), transparent 32%),
        linear-gradient(120deg, #f7faf5, #edf3ec);
    border-bottom: 1px solid var(--line);
    padding: 28px 0 38px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 0.76rem;
    margin-bottom: 24px;
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--brand);
    text-decoration: underline;
}

.village-hero-grid {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.village-hero h1 {
    font-size: clamp(2.2rem, 4.2vw, 3.5rem);
    margin-bottom: 8px;
    color: var(--brand-deep);
}

.village-location {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.village-location .icon {
    color: var(--brand-mid);
}

.village-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.meta-chip .icon {
    width: 14px;
    height: 14px;
}

.village-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.village-content {
    padding-top: 32px;
    padding-bottom: 74px;
}

.year-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    margin-bottom: 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.year-toolbar > div {
    display: flex;
    align-items: center;
    gap: 13px;
    flex-wrap: wrap;
}

.toolbar-label {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.year-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.toolbar-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.76rem;
    text-align: right;
}

.score-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 18px;
    margin-bottom: 22px;
}

.score-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow-soft);
}

.score-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.score-panel-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.7rem;
}

.score-main {
    display: flex;
    align-items: center;
    gap: 26px;
}

.score-detail {
    flex: 1;
    min-width: 0;
}

.score-detail-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 0.82rem;
}

.score-detail-row:last-child {
    border-bottom: 0;
}

.score-detail-row span {
    color: var(--muted);
}

.score-detail-row strong {
    font-variant-numeric: tabular-nums;
}

.positive { color: #0b7a5d; }
.negative { color: var(--danger); }

.score-progress {
    margin-top: 20px;
}

.score-progress-track {
    position: relative;
    height: 9px;
    border-radius: 999px;
    background: #e9eee9;
    overflow: visible;
}

.score-progress-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #1b8a6d, #0d5c49);
}

.score-progress-target {
    position: absolute;
    top: -5px;
    width: 2px;
    height: 19px;
    background: var(--accent-deep);
}

.score-progress-target i {
    position: absolute;
    top: 0;
    left: -2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-deep);
}

.score-progress-target small {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--accent-deep);
    font-size: 0.62rem;
    white-space: nowrap;
}

.score-progress-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    color: var(--muted);
    font-size: 0.62rem;
}

.subscore-grid {
    display: grid;
    gap: 12px;
}

.subscore-card {
    position: relative;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.subscore-iks { border-left-color: #0f7a60; }
.subscore-ike { border-left-color: #c18a24; }
.subscore-ikl { border-left-color: #2f6bad; }

.subscore-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.subscore-code {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted);
}

.subscore-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink-soft);
}

.subscore-value {
    display: block;
    font-size: 1.55rem;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
}

.subscore-bar {
    height: 5px;
    border-radius: 999px;
    background: #e9eee9;
    margin: 7px 0 8px;
    overflow: hidden;
}

.subscore-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: currentColor;
}

.subscore-iks .subscore-bar span { background: #0f7a60; }
.subscore-ike .subscore-bar span { background: #c18a24; }
.subscore-ikl .subscore-bar span { background: #2f6bad; }

.subscore-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.5;
}

.dimension-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dimension-card {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--brand);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.dimension-1 { border-top-color: #0f7a60; }
.dimension-2 { border-top-color: #2f6bad; }
.dimension-3 { border-top-color: #b9821b; }
.dimension-4 { border-top-color: #7a5a9e; }
.dimension-5 { border-top-color: #0d7d8a; }
.dimension-6 { border-top-color: #a34b14; }

.dimension-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.dimension-code {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 700;
}

.dimension-name {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;
}

.dimension-score {
    display: block;
    margin-top: 5px;
    font-size: 1.65rem;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.dimension-unit {
    display: block;
    margin-top: -2px;
    color: var(--muted);
    font-size: 0.63rem;
}

.dimension-card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.69rem;
    line-height: 1.4;
}

.score-law {
    max-width: 230px;
    text-align: right;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.4;
}

.badge-soft {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-deep);
    font-size: 0.67rem;
    font-weight: 700;
    white-space: nowrap;
}

.tree-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px 16px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.76rem;
}

.tree-summary strong {
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

.tree-marker {
    background: var(--brand-deep);
    font-family: var(--font-sans);
    font-size: 0.72rem;
}

.data-table .tree-subhead td {
    padding: 9px 12px;
    border-top: 1px solid var(--line-strong);
    background: #edf5ef;
    color: var(--ink-soft);
}

.data-table .tree-grouphead td {
    padding: 8px 12px;
    border-top: 1px dashed var(--line);
    background: #f8faf6;
    color: var(--ink-soft);
}

.tree-subhead .tree-level,
.tree-grouphead .tree-level {
    display: inline-block;
    margin-right: 6px;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--brand-soft);
    color: var(--brand-deep);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tree-subhead strong,
.tree-grouphead strong {
    margin-right: 5px;
    font-family: var(--font-mono);
}

.tree-subhead .tree-score,
.tree-grouphead .tree-score {
    float: right;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
}

.tree-table .col-indicator {
    min-width: 220px;
}

.tree-table .resp-list {
    gap: 2px;
}

.tree-table .resp-badge {
    max-width: 100px;
    padding: 2px 6px;
}

.tree-table .resp-badge small {
    display: none;
}

.panel {
    padding: 26px;
    margin-bottom: 22px;
}

.panel-head {
    margin-bottom: 18px;
}

.panel-head h2 {
    margin: 0 0 5px;
    font-family: var(--font-display);
    font-size: 1.55rem;
}

.panel-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.chart-panel .trend-svg {
    margin-top: 12px;
}

.indicators-head {
    align-items: flex-end;
}

.table-filter {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 250px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 11px;
}

.table-filter > .icon {
    width: 16px;
    height: 16px;
    color: var(--muted);
}

.table-filter input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 9px 8px;
    outline: none;
    font-size: 0.82rem;
}

.filter-count {
    color: var(--muted);
    font-size: 0.7rem;
    white-space: nowrap;
}

.indicator-section {
    margin-top: 22px;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

.indicator-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    background: var(--surface-soft);
    border-bottom: 1px solid var(--line);
}

.indicator-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-marker {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 11px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
}

.section-marker.iks { background: #0f7a60; }
.section-marker.ike { background: #b9821b; }
.section-marker.ikl { background: #2f6bad; }

.indicator-section-title h3 {
    margin: 0 0 2px;
    font-size: 1rem;
}

.indicator-section-title p {
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
}

.indicator-section-score {
    text-align: right;
}

.indicator-section-score span {
    display: block;
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.indicator-section-score strong {
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
}

.table-wrap {
    width: 100%;
    overflow: auto;
    max-height: 650px;
    contain: paint;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    min-width: 940px;
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f2f6f1;
    color: var(--muted);
    text-align: left;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line-strong);
    white-space: nowrap;
}

.data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #edf1ec;
    vertical-align: top;
}

.data-table tbody tr:nth-child(even) {
    background: #fbfcfa;
}

.data-table tbody tr:hover {
    background: #f4f9f5;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table .col-no {
    width: 42px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.data-table .col-indicator {
    min-width: 185px;
    max-width: 250px;
}

.data-table .col-indicator strong {
    font-weight: 600;
    color: var(--ink);
    line-height: 1.45;
}

.data-table .col-explanation {
    min-width: 230px;
    max-width: 340px;
    color: var(--ink-soft);
    line-height: 1.5;
}

.data-table .col-score {
    width: 100px;
    white-space: nowrap;
}

.data-table .col-responsible {
    min-width: 160px;
}

.col-activity {
    min-width: 130px;
    color: var(--muted);
}

.col-value {
    width: 70px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.score-scale {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    vertical-align: middle;
}

.score-scale i {
    display: block;
    width: 7px;
    height: 14px;
    border-radius: 2px;
    background: #e2e9e2;
}

.score-scale i.on {
    background: linear-gradient(180deg, #1e8a6d, #0d5c49);
}

.score-scale-num {
    display: inline-block;
    margin-left: 6px;
    font-weight: 700;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
}

.score-empty {
    color: var(--muted);
}

.resp-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.resp-badge {
    display: inline-flex;
    flex-direction: column;
    padding: 3px 7px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    line-height: 1.25;
    max-width: 150px;
}

.resp-badge b {
    font-size: 0.62rem;
    font-weight: 700;
}

.resp-badge small {
    color: var(--muted);
    font-size: 0.62rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resp-pusat { background: #eef3fb; border-color: #d4e0f3; }
.resp-prov { background: #f2f7ef; border-color: #d8e7d4; }
.resp-kab { background: #fbf5e8; border-color: #eedfbd; }
.resp-desa { background: #eaf6f1; border-color: #c9e5da; }
.resp-csr { background: #f7eff9; border-color: #e5d2eb; }
.resp-lainnya { background: #f3f4f3; border-color: #dfe4df; }

.data-table tfoot td {
    background: #f5f8f4;
    border-top: 1px solid var(--line-strong);
    font-weight: 700;
    padding: 11px 12px;
}

.subtotal-label {
    text-align: right;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.subtotal-score {
    text-align: right;
    font-size: 0.92rem;
    font-variant-numeric: tabular-nums;
}

.table-empty-note {
    margin: 0;
    padding: 12px 18px;
    color: var(--muted);
    font-size: 0.78rem;
    background: var(--surface-soft);
}

.indicator-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.indicator-legend > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
}

.legend-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.legend-statuses {
    gap: 6px !important;
}

.provenance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.provenance-card {
    margin-bottom: 0;
}

.provenance-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--brand-soft);
    color: var(--brand);
    margin-bottom: 13px;
}

.provenance-card h2 {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 1.25rem;
}

.provenance-card p {
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.meta-list {
    margin: 0 0 16px;
}

.meta-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 0.79rem;
}

.meta-list > div:last-child {
    border-bottom: 0;
}

.meta-list dt {
    color: var(--muted);
    flex: 0 0 auto;
}

.meta-list dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
    word-break: break-word;
}

.meta-list dd a {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.meta-list .icon {
    width: 12px;
    height: 12px;
}

/* ===== Admin ===== */

.admin-body {
    background: #f0f3ee;
}

.admin-shell {
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
    width: 264px;
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    color: rgba(239, 248, 243, 0.76);
    background:
        radial-gradient(circle at 20% 0%, rgba(215, 165, 63, 0.12), transparent 32%),
        linear-gradient(175deg, #0a4335, #073428 70%);
    overflow-y: auto;
}

.admin-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 6px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-admin {
    color: #f5fbf7;
}

.brand-admin:hover {
    color: #fff;
}

.brand-admin .brand-mark {
    width: 38px;
    height: 38px;
    color: #18795f;
}

.brand-admin .brand-copy small {
    color: rgba(235, 247, 239, 0.5);
}

.admin-nav-close {
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: transparent;
    color: #fff;
    place-items: center;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 0;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 10px;
    color: rgba(236, 247, 240, 0.72);
    font-size: 0.87rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-nav-link .icon {
    width: 18px;
    height: 18px;
    color: rgba(200, 226, 214, 0.7);
}

.admin-nav-link:hover,
.admin-nav-link.is-active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-nav-link.is-active {
    box-shadow: inset 3px 0 0 var(--accent);
}

.admin-nav-link.is-active .icon {
    color: #eac57c;
}

.admin-sidebar-foot {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px 14px;
}

.avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(215, 165, 63, 0.18);
    color: #f0cd83;
    font-weight: 800;
    font-size: 0.9rem;
}

.admin-user strong {
    display: block;
    color: #f3faf6;
    font-size: 0.84rem;
}

.admin-user small {
    display: block;
    color: rgba(230, 245, 237, 0.48);
    font-size: 0.66rem;
}

.admin-side-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px;
    border-radius: 8px;
    color: rgba(235, 247, 240, 0.65);
    font-size: 0.79rem;
    text-decoration: none;
}

.admin-side-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.admin-side-link .icon {
    width: 15px;
    height: 15px;
}

.admin-side-danger:hover {
    background: rgba(180, 35, 24, 0.25);
}

.admin-content {
    margin-left: 264px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 68px;
    padding: 10px 30px;
    background: rgba(250, 251, 248, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.admin-topbar h1 {
    margin: 0;
    font-size: 1.12rem;
    letter-spacing: -0.02em;
}

.admin-topbar-actions {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.admin-nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--brand-deep);
    place-items: center;
}

.admin-main {
    flex: 1;
    padding: 28px 30px 40px;
    width: 100%;
    max-width: 1420px;
    margin: 0 auto;
    min-width: 0;
}


.admin-body .flash-stack {
    position: static;
    width: 100%;
    margin: 0 0 16px;
}
.admin-footer {
    padding: 14px 30px 22px;
    color: #849188;
    font-size: 0.7rem;
}

.admin-footer p {
    margin: 0;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.admin-stat-card {
    position: relative;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.admin-stat-card::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-color, var(--brand));
}

.accent-green { --accent-color: #0f7a60; }
.accent-blue { --accent-color: #2f6bad; }
.accent-amber { --accent-color: #c18a24; }
.accent-slate { --accent-color: #64736b; }

.admin-stat-icon {
    color: var(--accent-color);
    display: inline-flex;
    margin-bottom: 8px;
}

.admin-stat-icon .icon {
    width: 21px;
    height: 21px;
}

.admin-stat-label {
    display: block;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-stat-card strong {
    display: block;
    font-size: 1.7rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.admin-stat-card .admin-stat-text {
    font-size: 1.05rem;
}

.admin-stat-card small {
    color: var(--muted);
    font-size: 0.7rem;
}

.admin-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 18px;
    min-width: 0;
}

.admin-grid-two > *,
.admin-grid-form > *,
.admin-side-stack > *,
.admin-stats > * {
    min-width: 0;
}

.admin-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.admin-card-head h2 {
    margin: 0 0 3px;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.admin-card-head p {
    margin: 0;
}

.admin-card-head .eyebrow {
    margin-bottom: 4px;
}

.list-head {
    align-items: flex-end;
}

.admin-grid-two {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.admin-grid-wide-left {
    grid-template-columns: minmax(0, 1.5fr) minmax(310px, 0.72fr);
}

.admin-grid-form {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.7fr);
    gap: 18px;
    align-items: start;
}

.admin-side-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.admin-side-stack > .admin-card:last-child {
    margin-bottom: 0;
}

.onboarding-card {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 30px;
    align-items: center;
    background: linear-gradient(120deg, #ffffff, #f4f9f4);
    border-color: #cfe0d4;
}

.onboarding-copy h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.onboarding-copy p {
    color: var(--muted);
    font-size: 0.9rem;
}

.onboarding-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.onboarding-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.onboarding-steps li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 11px;
}

.onboarding-steps li > span {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-deep);
    font-size: 0.75rem;
    font-weight: 800;
}

.onboarding-steps strong {
    display: block;
    font-size: 0.85rem;
}

.onboarding-steps p {
    margin: 1px 0 0;
    color: var(--muted);
    font-size: 0.76rem;
}

.admin-empty {
    text-align: center;
    padding: 26px 18px;
    color: var(--muted);
}

.admin-empty.large {
    padding: 44px 20px;
}

.admin-empty h3 {
    margin: 10px 0 5px;
    color: var(--ink);
}

.admin-empty p {
    margin: 0 0 12px;
    font-size: 0.86rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.admin-table th {
    padding: 8px 9px;
    border-bottom: 1px solid var(--line-strong);
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
    background: #f7faf6;
}

.admin-table td {
    padding: 8px 9px;
    border-bottom: 1px solid #edf1ec;
    vertical-align: middle;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover {
    background: #fafcf9;
}

.table-title {
    font-weight: 700;
    color: var(--ink);
}

.table-sub {
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.4;
}

.table-actions {
    text-align: right;
    white-space: nowrap;
}

.table-actions form {
    display: inline-block;
    margin: 0;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink-soft);
    text-decoration: none;
    vertical-align: middle;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-btn .icon {
    width: 16px;
    height: 16px;
}

.icon-btn:hover {
    background: var(--brand-soft);
    border-color: #b7d7c8;
    color: var(--brand-deep);
}

.icon-danger:hover {
    background: var(--danger-soft);
    border-color: #efc5c1;
    color: var(--danger);
}

.code-inline {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 2px 5px;
}

.admin-search {
    min-width: 250px;
    box-shadow: none;
}

.check-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--line);
    font-size: 0.82rem;
}

.check-list li:last-child {
    border-bottom: 0;
}

.check-state {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    flex: 0 0 auto;
}

.check-state .icon {
    width: 13px;
    height: 13px;
}

.check-state.ok {
    background: #e8f5ef;
    color: #0b724f;
}

.check-state.bad {
    background: var(--danger-soft);
    color: var(--danger);
}

.check-list small {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.7rem;
}

.api-result {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    font-size: 0.78rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.api-result.ok {
    border-color: #bce2d2;
    background: #effaf5;
    color: #0a624d;
}

.api-result.bad {
    border-color: #efc5c1;
    background: #fdf1ef;
    color: #9f2a20;
}

.api-result strong {
    font-size: 0.82rem;
}

.api-result span,
.api-result small {
    color: var(--muted);
    font-size: 0.72rem;
}

.activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.activity-list li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
}

.activity-list li:last-child {
    border-bottom: 0;
}

.activity-list.compact li {
    padding: 8px 0;
}

.activity-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #1b8a6d;
    margin-top: 7px;
    flex: 0 0 auto;
}

.activity-dot.bad {
    background: var(--danger);
}

.activity-copy {
    flex: 1;
    min-width: 0;
}

.activity-copy strong {
    display: block;
    font-size: 0.82rem;
}

.activity-copy p {
    margin: 1px 0 0;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.4;
    word-break: break-word;
}

.activity-list time {
    color: var(--muted);
    font-size: 0.66rem;
    white-space: nowrap;
    text-align: right;
}

.api-cap {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-deep);
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

.villages-table .year-chips {
    gap: 3px;
}

.villages-table .year-chip {
    font-size: 0.6rem;
    padding: 2px 5px;
}

/* ===== Admin village page ===== */

.village-admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(120deg, #ffffff, #f3f8f3);
    box-shadow: var(--shadow-soft);
}

.village-admin-identity {
    display: flex;
    align-items: center;
    gap: 16px;
}

.village-admin-identity h2 {
    margin: 0 0 3px;
    font-family: var(--font-display);
    font-size: 1.7rem;
}

.village-admin-location {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.village-admin-location .icon {
    width: 14px;
    height: 14px;
}

.village-admin-location .code-inline {
    margin-left: 4px;
}

.village-admin-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.village-admin-facts > div {
    min-width: 82px;
    padding: 8px 12px;
    border-left: 1px solid var(--line);
}

.village-admin-facts span {
    display: block;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.village-admin-facts strong {
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

.fetch-year-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    margin-bottom: 14px;
}

.fetch-year {
    position: relative;
    cursor: pointer;
}

.fetch-year input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.fetch-year-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface-soft);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.fetch-year-box strong {
    font-size: 0.86rem;
    font-variant-numeric: tabular-nums;
}

.fetch-year-box small {
    color: var(--muted);
    font-size: 0.6rem;
}

.fetch-year input:checked + .fetch-year-box {
    border-color: var(--brand);
    background: var(--brand-soft);
    box-shadow: inset 0 0 0 1px var(--brand);
}

.fetch-year input:checked + .fetch-year-box small {
    color: var(--brand);
}

.fetch-year input:focus-visible + .fetch-year-box {
    outline: 3px solid rgba(215, 165, 63, 0.8);
    outline-offset: 2px;
}

.fetch-year.has-data .fetch-year-box {
    background: #fbfcf9;
}

.fetch-year input:checked + .fetch-year-box {
    background: var(--brand-soft);
}

.fetch-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.fetch-progress {
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
}

.fetch-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 0.78rem;
    background: var(--surface);
}

.fetch-progress-row:last-child {
    border-bottom: 0;
}

.fetch-year-label {
    width: 42px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.fetch-status {
    color: var(--muted);
}

.fetch-progress-row.is-pending .fetch-status { color: var(--blue); }
.fetch-progress-row.is-success .fetch-status { color: #0b724f; font-weight: 600; }
.fetch-progress-row.is-skipped .fetch-status { color: var(--accent-deep); }
.fetch-progress-row.is-error .fetch-status { color: var(--danger); }
.fetch-progress-row.is-success { background: #f4fbf7; }
.fetch-progress-row.is-error { background: #fdf5f3; }

.fetch-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface-soft);
    font-size: 0.78rem;
}

.fetch-summary span {
    color: var(--muted);
    flex: 1;
}

.danger-card {
    border-color: #efd6d2;
}

.danger-details summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--danger);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 0;
}

.danger-details summary .icon {
    width: 15px;
    height: 15px;
}

.danger-details[open] summary {
    margin-bottom: 8px;
}

/* ===== Forms ===== */

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.field label {
    color: var(--ink-soft);
    font-size: 0.78rem;
    font-weight: 700;
}

.required {
    color: var(--danger);
}

.field input,
.field select,
.field textarea,
.log-filter select {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 9px;
    background: var(--surface);
    padding: 9px 11px;
    font-size: 0.86rem;
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
    resize: vertical;
    min-height: 130px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    line-height: 1.5;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.log-filter select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(13, 92, 73, 0.12);
}

.field input[readonly],
.field input:disabled {
    background: var(--surface-soft);
    color: var(--muted);
}

.mono-input {
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}

.field-help {
    margin: 0;
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.45;
}

.form-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    margin-top: 2px;
}

.form-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    font-size: 0.82rem;
    margin-bottom: 14px;
    line-height: 1.45;
}

.form-alert .icon {
    width: 17px;
    height: 17px;
    margin-top: 1px;
}

.form-alert-error {
    border-color: #efc5c1;
    background: #fdf2f0;
    color: #96281e;
}

.check-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    cursor: pointer;
    font-size: 0.82rem;
}

.check-option.compact {
    padding: 9px 12px;
}

.check-option input {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    accent-color: var(--brand);
    flex: 0 0 auto;
}

.check-option strong {
    display: block;
    font-size: 0.82rem;
}

.check-option small {
    display: block;
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.4;
}

.password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrap input {
    padding-right: 42px;
}

.password-toggle {
    position: absolute;
    right: 4px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    display: grid;
    place-items: center;
}

.password-toggle:hover {
    background: var(--brand-soft);
    color: var(--brand);
}

.password-toggle .icon {
    width: 17px;
    height: 17px;
}

.password-meter {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-top: 2px;
}

.password-meter span {
    height: 4px;
    border-radius: 999px;
    background: #e3e9e3;
    transition: background 0.15s ease;
}

.password-meter[data-level="1"] span:nth-child(1) { background: #b42318; }
.password-meter[data-level="2"] span:nth-child(-n+2) { background: #c18a24; }
.password-meter[data-level="3"] span:nth-child(-n+3) { background: #2f6bad; }
.password-meter[data-level="4"] span { background: #0f7a60; }

.info-card .info-card-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--brand-soft);
    color: var(--brand);
    margin-bottom: 12px;
}

.info-card h2 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.info-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.55;
}

.code-breakdown {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}

.code-breakdown span {
    flex: 1;
    text-align: center;
    padding: 7px 4px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-soft);
}

.code-breakdown b {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.code-breakdown small {
    color: var(--muted);
    font-size: 0.56rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mini-steps {
    margin: 0;
    padding-left: 18px;
    color: var(--ink-soft);
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.code-block {
    display: block;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    word-break: break-all;
    margin: 8px 0 10px;
}

.log-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.log-filter .search-box {
    min-width: 220px;
    box-shadow: none;
    border-radius: 9px;
}

.log-filter select {
    width: auto;
    min-width: 130px;
    padding: 8px 9px;
    font-size: 0.78rem;
}

.log-table .log-action {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-deep);
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}

.log-table .log-action.bad {
    background: var(--danger-soft);
    color: var(--danger);
}

.log-detail {
    color: var(--ink-soft);
    font-size: 0.76rem;
    max-width: 420px;
    word-break: break-word;
}

/* ===== Auth ===== */

.auth-body {
    background: #eef2ec;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(360px, 0.9fr) minmax(440px, 1.1fr);
    min-height: 100vh;
}

.auth-brand-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 38px 44px;
    color: #f1f8f3;
    background:
        radial-gradient(circle at 80% 15%, rgba(215, 165, 63, 0.18), transparent 36%),
        radial-gradient(circle at 10% 88%, rgba(72, 177, 143, 0.2), transparent 40%),
        linear-gradient(145deg, #073a2e, #0b5242 55%, #0e644e);
}

.auth-brand-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, black, transparent 78%);
}

.brand-auth {
    position: relative;
    z-index: 1;
    color: #f7fbf8;
}

.brand-auth:hover {
    color: #fff;
}

.brand-auth .brand-mark {
    color: #1a7c62;
}

.brand-auth .brand-copy small {
    color: rgba(235, 247, 239, 0.55);
}

.auth-brand-copy {
    position: relative;
    z-index: 1;
    margin: auto 0;
    max-width: 470px;
    padding: 60px 0;
}

.auth-brand-copy h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 3rem);
    color: #fbf8ef;
    margin-bottom: 16px;
}

.auth-brand-copy > p:not(.eyebrow) {
    color: rgba(236, 247, 240, 0.76);
    font-size: 0.95rem;
    line-height: 1.65;
    margin-bottom: 24px;
}

.auth-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.86rem;
    color: rgba(240, 249, 243, 0.82);
}

.auth-features .icon {
    width: 18px;
    height: 18px;
    padding: 3px;
    border-radius: 50%;
    background: rgba(215, 165, 63, 0.2);
    color: #edc87d;
}

.auth-brand-foot {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(235, 247, 239, 0.42);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
}

.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background:
        radial-gradient(circle at 100% 0%, rgba(215, 165, 63, 0.08), transparent 30%),
        #f6f8f3;
}

.auth-card {
    width: min(440px, 100%);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 34px;
    box-shadow: 0 20px 50px rgba(20, 50, 38, 0.1);
}

.auth-home {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

.auth-home .icon {
    width: 14px;
    height: 14px;
}

.auth-home:hover {
    color: var(--brand);
}

.auth-card h1 {
    margin: 0 0 7px;
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--brand-deep);
}

.auth-sub {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 0.86rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form .field input {
    padding: 11px 12px;
    font-size: 0.9rem;
}

.auth-form .password-wrap input {
    padding-right: 44px;
}

.auth-foot-note {
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.5;
    text-align: center;
}

.auth-blocked {
    text-align: center;
    padding: 8px 0 4px;
}

.auth-blocked p {
    color: var(--muted);
    font-size: 0.86rem;
    margin-bottom: 16px;
}

.auth-card .flash-stack {
    position: static;
    width: 100%;
    margin-bottom: 14px;
}

/* ===== Print ===== */

@media print {
    .site-header,
    .site-footer,
    .hero-actions,
    .village-actions,
    .year-toolbar,
    .table-filter,
    .indicator-legend,
    .breadcrumb,
    .flash-stack,
    .toast,
    .admin-sidebar,
    .admin-topbar-actions {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 11px;
    }

    .village-hero {
        background: #fff;
        border: 0;
        padding: 0 0 12px;
    }

    .village-content {
        padding: 0;
    }

    .score-dashboard,
    .score-main {
        display: block;
    }

    .subscore-grid {
        grid-template-columns: repeat(3, 1fr);
        margin-top: 10px;
    }

    .panel,
    .score-panel,
    .subscore-card {
        box-shadow: none;
        border: 1px solid #bbb;
        break-inside: avoid;
    }

    .table-wrap {
        max-height: none;
        overflow: visible;
    }

    .data-table {
        min-width: 0;
        font-size: 8.5px;
    }

    .data-table th {
        position: static;
    }

    .indicator-section {
        break-inside: auto;
    }

    a {
        color: #000;
        text-decoration: none;
    }

    .trend-svg {
        max-height: 220px;
    }
}

/* ===== Reduced motion ===== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Responsive ===== */

@media (max-width: 1180px) {
    .hero-grid {
        gap: 40px;
    }

    .hero h1 {
        font-size: clamp(2.3rem, 4.6vw, 3.5rem);
    }

    .village-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .fetch-year-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1020px) {
    .hero-grid {
        grid-template-columns: 1fr;
        max-width: 760px;
    }

    .hero-card {
        max-width: 520px;
    }

    .score-dashboard {
        grid-template-columns: 1fr;
    }

    .subscore-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-grid-two,
    .admin-grid-wide-left,
    .admin-grid-form {
        grid-template-columns: 1fr;
    }

    .admin-side-stack {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .admin-side-stack > .admin-card {
        margin-bottom: 0;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.2);
    }

    .admin-nav-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-nav-close,
    .admin-nav-toggle {
        display: grid;
    }

    .admin-content {
        margin-left: 0;
    }

    .admin-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 70;
        background: rgba(5, 30, 23, 0.5);
        backdrop-filter: blur(2px);
    }

    .admin-nav-open .admin-overlay {
        display: block;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-main {
        min-height: 100vh;
    }
}

@media (max-width: 820px) {
    :root {
        --header-h: 70px;
    }

    .container,
    .container.narrow {
        width: calc(100% - 36px);
    }

    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        z-index: 70;
        flex-direction: column;
        align-items: stretch;
        gap: 3px;
        padding: 12px 18px 18px;
        background: #fbfcf9;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 18px 30px rgba(20, 50, 38, 0.12);
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.18s ease, transform 0.18s ease;
    }

    .site-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-link {
        padding: 12px;
    }

    .nav-admin {
        margin-left: 0;
        margin-top: 6px;
    }

    .hero {
        padding: 56px 0 98px;
    }

    .hero h1 {
        max-width: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat:nth-child(2) {
        border-right: 0;
    }

    .stat:nth-child(1),
    .stat:nth-child(2) {
        border-bottom: 1px solid var(--line);
    }

    .section {
        padding: 56px 0;
    }

    .split-heading {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: 0;
        width: 100%;
    }

    .village-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .source-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 4px;
    }

    .village-hero-grid {
        flex-direction: column;
        align-items: flex-start;
    }

    .year-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .toolbar-note {
        text-align: left;
    }

    .score-main {
        gap: 18px;
    }

    .subscore-grid {
        grid-template-columns: 1fr;
    }

    .dimension-grid {
        grid-template-columns: 1fr;
    }

    .tree-subhead .tree-score,
    .tree-grouphead .tree-score {
        display: block;
        float: none;
        margin-top: 2px;
    }

    .provenance-grid {
        grid-template-columns: 1fr;
    }

    .admin-main {
        padding: 20px 18px 34px;
    }

    .admin-topbar {
        padding: 9px 18px;
    }

    .admin-topbar h1 {
        font-size: 1rem;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-side-stack {
        grid-template-columns: 1fr;
    }

    .onboarding-card {
        grid-template-columns: 1fr;
    }

    .village-admin-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .village-admin-facts {
        width: 100%;
    }

    .village-admin-facts > div {
        border-left: 0;
        border-top: 1px solid var(--line);
        padding: 8px 0;
        flex: 1;
    }

    .fetch-year-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .form-grid-two {
        grid-template-columns: 1fr;
    }

    .admin-card {
        padding: 18px;
    }

    .auth-card {
        padding: 26px 20px;
    }
}

@media (max-width: 560px) {
    .container,
    .container.narrow {
        width: calc(100% - 28px);
    }

    .hero {
        padding: 44px 0 92px;
    }

    .hero h1 {
        font-size: 2.15rem;
    }

    .hero-lede {
        font-size: 0.94rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-card {
        padding: 20px;
    }

    .hero-score {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .hero-card-foot {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 15px 18px;
    }

    .stat:last-child {
        border-bottom: 0;
    }

    .score-panel,
    .panel {
        padding: 19px;
    }

    .score-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .score-detail {
        width: 100%;
    }

    .score-ring {
        width: 145px;
    }

    .score-ring-inner strong {
        font-size: 1.6rem;
    }

    .village-actions {
        width: 100%;
    }

    .village-actions .btn {
        flex: 1;
    }

    .year-picker {
        gap: 4px;
    }

    .year-pill {
        padding: 6px 10px;
        font-size: 0.76rem;
    }

    .indicator-section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .indicator-section-score {
        text-align: left;
    }

    .indicator-legend {
        align-items: flex-start;
        flex-direction: column;
    }

    .add-more-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .add-more-card .btn {
        margin-left: 0;
    }

    .flush {
        right: 14px;
    }

    .flash-stack {
        top: 80px;
        right: 14px;
        width: calc(100% - 28px);
    }

    .admin-topbar-actions .btn span,
    .admin-topbar-actions .btn .icon + span {
        display: none;
    }

    .admin-topbar-actions .btn {
        padding: 8px 11px;
        min-height: 36px;
    }

    .fetch-year-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .village-admin-facts {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .log-filter {
        width: 100%;
    }

    .log-filter .search-box {
        flex: 1;
    }
}
