:root {
    --bg: #f8fafc;
    --text: #172033;
    --muted: #667085;
    --card: #ffffff;
    --line: #d9e1ec;
    --soft: #eef4f8;
    --primary: #142033;
    --primary-contrast: #ffffff;
    --brand: #11966e;
    --brand-dark: #087957;
    --accent: #2563eb;
    --danger: #b42318;
    --success-bg: #e7f8f0;
    --success-text: #087957;
    --error-bg: #fff0ee;
    --error-text: #b42318;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--accent);
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(217, 225, 236, 0.8);
    background: rgba(248, 250, 252, 0.92);
    backdrop-filter: blur(12px);
}

.header-inner,
.footer-inner {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: var(--radius);
    background: var(--primary);
    color: var(--primary-contrast);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 14px;
}

.brand small {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.main-nav,
.site-footer nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 0 18px;
    font-weight: 700;
    text-align: center;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--brand);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--brand-dark);
    color: #ffffff;
}

.btn-dark {
    background: var(--primary);
    color: #ffffff;
}

.btn-dark:hover {
    background: #22304a;
    color: #ffffff;
}

.btn-outline {
    border-color: var(--line);
    background: #ffffff;
    color: var(--text);
}

.btn-outline:hover {
    border-color: #b9c6d6;
    color: var(--text);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
}

.btn-ghost:hover {
    background: var(--soft);
    color: var(--text);
}

.btn-large {
    min-height: 50px;
    padding-inline: 22px;
    font-size: 16px;
}

.btn-small {
    min-height: 36px;
    padding-inline: 12px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.flash {
    margin-top: 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 12px 14px;
    font-size: 14px;
}

.flash strong,
.flash span {
    display: block;
}

.flash-success {
    border-color: rgba(17, 150, 110, 0.2);
    background: var(--success-bg);
    color: var(--success-text);
}

.flash-error {
    border-color: rgba(180, 35, 24, 0.2);
    background: var(--error-bg);
    color: var(--error-text);
}

.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(37, 99, 235, 0.08), transparent 52%),
        var(--bg);
}

.hero-inner {
    padding: 80px 0 72px;
    text-align: center;
}

.pill,
.eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    background: rgba(17, 150, 110, 0.1);
    color: var(--brand-dark);
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 800;
}

.pill-inverse {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.eyebrow {
    margin: 0 0 10px;
    border-radius: 6px;
    background: var(--soft);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.eyebrow.accent {
    color: var(--accent);
}

.hero h1 {
    max-width: 930px;
    margin: 20px auto 0;
    font-size: clamp(40px, 6vw, 68px);
    line-height: 1.02;
    letter-spacing: 0;
}

.hero h1 span {
    color: var(--accent);
}

.hero-copy {
    max-width: 720px;
    margin: 24px auto 0;
    color: var(--muted);
    font-size: 18px;
}

.hero-copy strong {
    color: var(--text);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 34px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    max-width: 820px;
    margin: 48px auto 0;
}

.stat-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.74);
    padding: 18px 14px;
}

.stat-card strong {
    display: block;
    color: var(--accent);
    font-size: 28px;
    line-height: 1;
}

.stat-card span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section {
    padding: 76px 0;
}

.section-muted {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #f1f6fa;
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 40px;
    text-align: center;
}

.section-heading h2,
.sample-panel h2,
.cart-layout h2 {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.sample-panel p,
.muted {
    color: var(--muted);
}

.cards-grid {
    display: grid;
    gap: 16px;
}

.cards-grid.four {
    grid-template-columns: repeat(4, 1fr);
}

.info-card,
.feature-card,
.price-card,
.cart-card,
.explorer,
.detail-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.info-card {
    padding: 22px;
}

.card-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: var(--radius);
    background: var(--primary);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
}

.info-card h3,
.feature-card h3 {
    margin: 14px 0 6px;
    font-size: 15px;
}

.info-card p,
.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.feature-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 28px;
}

.feature-card {
    display: flex;
    gap: 14px;
    padding: 18px;
}

.feature-card > span {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--brand), var(--accent));
}

.feature-card h3 {
    margin-top: 0;
}

.sample-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    gap: 36px;
    align-items: center;
    border-radius: var(--radius);
    background: var(--primary);
    color: #ffffff;
    padding: 42px;
    box-shadow: var(--shadow);
}

.sample-panel p {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.78);
}

.spreadsheet-preview {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.06);
    padding: 16px;
}

.spreadsheet-title {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 12px;
    color: rgba(255, 255, 255, 0.86);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

.spreadsheet-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    overflow: hidden;
    margin-top: 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
}

.spreadsheet-grid span {
    min-width: 0;
    background: #192842;
    padding: 7px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spreadsheet-grid .head {
    color: #ffffff;
    font-weight: 800;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.price-card {
    position: relative;
    padding: 30px;
}

.price-card.featured {
    border: 2px solid rgba(17, 150, 110, 0.3);
}

.price-label {
    position: absolute;
    top: 20px;
    right: 20px;
    border-radius: 999px;
    background: var(--brand);
    color: #ffffff;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 800;
}

.price-card h3 {
    margin: 0;
    font-size: 25px;
}

.price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 24px 0;
}

.price strong {
    font-size: 50px;
    line-height: 1;
}

.price span,
.selected-province p span,
.mini-stats span {
    color: var(--muted);
    font-size: 13px;
}

.check-list {
    display: grid;
    gap: 10px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding-left: 24px;
    font-size: 14px;
}

.check-list li::before {
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--brand);
    content: "✓";
    font-weight: 900;
}

.form-actions,
.cart-actions {
    display: grid;
    gap: 10px;
}

.province-selector {
    display: grid;
    gap: 8px;
    margin-top: 24px;
}

.province-selector label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.inline-form,
.search-form {
    display: flex;
    gap: 10px;
}

select,
input[type="search"] {
    min-height: 44px;
    width: 100%;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    color: var(--text);
    padding: 0 12px;
}

select:focus,
input[type="search"]:focus {
    border-color: var(--accent);
    outline: 3px solid rgba(37, 99, 235, 0.15);
}

.selected-province {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 24px 0 14px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
}

.selected-province span,
.selected-province small {
    display: block;
    color: var(--muted);
}

.selected-province strong {
    display: block;
    font-size: 22px;
}

.selected-province p {
    margin: 0;
    text-align: right;
}

.selected-province p strong {
    font-size: 34px;
}

.mini-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.mini-stats div {
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.mini-stats span,
.mini-stats strong {
    display: block;
}

.cart-section {
    padding-top: 58px;
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(360px, 1fr);
    gap: 42px;
    align-items: start;
}

.cart-card {
    padding: 24px;
}

.empty-cart {
    margin: 0 0 18px;
    color: var(--muted);
    text-align: center;
}

.cart-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cart-list li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.cart-list span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.cart-item-actions {
    display: grid;
    justify-items: end;
    gap: 6px;
    white-space: nowrap;
}

.text-button {
    border: 0;
    background: none;
    color: var(--muted);
    padding: 0;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.text-button:hover {
    color: var(--accent);
}

.cart-totals {
    display: grid;
    gap: 8px;
    margin: 22px 0;
}

.cart-totals p {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 0;
}

.cart-totals span {
    color: var(--muted);
}

.cart-totals .total {
    border-top: 1px solid var(--line);
    padding-top: 12px;
    font-size: 18px;
}

.explorer {
    overflow: hidden;
}

.explorer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    padding: 18px;
}

.explorer-toolbar p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.search-form {
    width: min(100%, 620px);
    align-items: center;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
}

th {
    background: var(--soft);
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

tbody tr:hover {
    background: #fbfdff;
}

.number {
    text-align: right;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--soft);
    color: var(--text);
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    background: #ffffff;
    padding: 26px 0;
}

.footer-brand .brand-mark {
    background: var(--primary);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.58);
    padding: 28px;
}

.municipality-modal {
    width: min(1020px, 100%);
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg);
    box-shadow: 0 26px 80px rgba(15, 23, 42, 0.32);
}

.modal-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    background: var(--primary);
    color: #ffffff;
    padding: 28px 32px;
}

.modal-header h2,
.modal-header p {
    margin: 0;
}

.modal-header h2 {
    margin-top: 8px;
    font-size: 34px;
}

.modal-header > div:first-child > p:last-child {
    color: rgba(255, 255, 255, 0.72);
}

.quality {
    min-width: 140px;
    text-align: right;
}

.quality span {
    display: block;
    color: rgba(255, 255, 255, 0.62);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.quality strong {
    color: #fbbf24;
    font-size: 18px;
    letter-spacing: 0;
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 800;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 24px;
}

.detail-card {
    padding: 20px;
}

.detail-card h3 {
    margin: 0 0 10px;
    color: var(--text);
    font-size: 15px;
}

dl {
    display: grid;
    gap: 0;
    margin: 0;
}

dt,
dd {
    border-top: 1px solid var(--line);
    padding: 10px 0;
    font-size: 14px;
}

dt {
    grid-column: 1;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

dd {
    grid-column: 2;
    margin: 0;
    text-align: right;
    font-weight: 700;
}

dd a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gender-bar {
    display: flex;
    overflow: hidden;
    height: 9px;
    margin-top: 14px;
    border-radius: 999px;
    background: var(--soft);
}

.gender-bar span:first-child {
    background: #fb7185;
}

.gender-bar span:last-child {
    background: #0ea5e9;
}

.small {
    font-size: 13px;
}

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

@media (max-width: 960px) {
    .main-nav {
        display: none;
    }

    .stats-grid,
    .cards-grid.four,
    .feature-row,
    .pricing-grid,
    .sample-panel,
    .cart-layout,
    .modal-grid {
        grid-template-columns: 1fr;
    }

    .cart-layout {
        gap: 24px;
    }

    .hide-lg {
        display: none;
    }
}

@media (max-width: 720px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .header-inner {
        min-height: auto;
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .header-actions {
        width: 100%;
    }

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

    .hero-inner {
        padding: 54px 0 48px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .section {
        padding: 54px 0;
    }

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

    .sample-panel,
    .price-card,
    .cart-card {
        padding: 22px;
    }

    .inline-form,
    .search-form,
    .explorer-toolbar,
    .selected-province,
    .cart-list li {
        flex-direction: column;
        align-items: stretch;
    }

    .explorer-toolbar p,
    .selected-province p,
    .cart-item-actions {
        text-align: left;
        justify-items: start;
    }

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

    .hide-md {
        display: none;
    }

    .modal-backdrop {
        padding: 12px;
    }

    .modal-header {
        flex-direction: column;
        padding: 24px 18px;
    }

    .modal-header h2 {
        font-size: 28px;
    }

    .quality {
        text-align: left;
    }

    .modal-grid {
        padding: 14px;
    }

    dt,
    dd {
        grid-column: auto;
        text-align: left;
    }

    dt {
        padding-bottom: 0;
    }

    dd {
        border-top: 0;
        padding-top: 2px;
    }
}
