:root {
    --color-brand: #7c2d12;
    --color-cta: #f5a623;
    --text-muted: #777;
    --border: #ddd;
}

.cat-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.cat-hero {
    background-color: var(--color-brand);
    padding: 64px 24px;
    text-align: center;
}

.cat-hero h1,
.cat-hero h2,
.cat-hero h3,
.cat-hero h4,
.cat-hero h5,
.cat-hero h6,
.cat-hero p,
.cat-hero li,
.cat-hero dt,
.cat-hero dd,
.cat-hero td,
.cat-hero th,
.cat-hero span,
.cat-hero label,
.cat-hero strong,
.cat-hero em,
.cat-hero blockquote,
.cat-hero a:not(.btn) {
    color: #fff;
}

.cat-hero__inner {
    max-width: 800px;
    margin: 0 auto;
}

.cat-hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.6;
    margin: 0 0 16px;
}

.cat-hero__subtitle {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #e8d5c8;
    margin: 0;
}

.cat-articles {
    padding: 48px 0;
    background-color: #fff;
}

.cat-articles h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-brand);
    margin: 0 0 32px;
    line-height: 1.6;
}

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

.cat-card {
    grid-column: span 4;
    min-width: 0;
    background: #fff;
    border: 1px solid #e8ddd5;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.cat-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.cat-card--featured {
    grid-column: span 8;
}

.cat-articles__grid .cat-card:only-child {
    grid-column: span 12;
}

.cat-card img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.cat-card__body {
    padding: 20px;
}

.cat-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.6;
    margin: 0 0 8px;
}

.cat-card h3 a {
    color: var(--color-brand);
    text-decoration: none;
}

.cat-card h3 a:hover {
    text-decoration: underline;
}

.cat-card h3 a:focus {
    outline: 2px solid var(--color-cta);
    outline-offset: 2px;
}

.cat-card__desc {
    font-size: 0.9375rem;
    color: #555;
    line-height: 1.6;
    margin: 0 0 12px;
}

.cat-card__date {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: block;
}

.cat-empty {
    font-size: 1rem;
    color: var(--text-muted);
    text-align: center;
    padding: 48px 24px;
    line-height: 1.6;
}

.cat-subcats {
    padding: 48px 0;
    background-color: #faf7f5;
}

.cat-subcats h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-brand);
    margin: 0 0 12px;
    line-height: 1.6;
}

.cat-subcats__intro {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin: 0 0 24px;
    max-width: 700px;
}

.cat-mega {
    border: 1px solid #e8ddd5;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.cat-mega__toggle {
    display: block;
    padding: 16px 24px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-brand);
    cursor: pointer;
    background: #fff;
    border: none;
    width: 100%;
    text-align: left;
    line-height: 1.6;
    list-style: none;
}

.cat-mega__toggle::-webkit-details-marker {
    display: none;
}

.cat-mega__toggle::after {
    content: '\25B8';
    float: right;
    transition: transform 0.2s;
}

details[open] > .cat-mega__toggle::after {
    transform: rotate(90deg);
}

.cat-mega__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 0 24px 24px;
}

.cat-mega__item {
    padding: 20px;
    border: 1px solid #e8ddd5;
    border-top: 3px solid var(--color-brand);
    border-radius: 6px;
    background: #faf7f5;
}

.cat-mega__item svg {
    color: var(--color-brand);
    margin-bottom: 12px;
    display: block;
}

.cat-mega__item strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-brand);
    margin-bottom: 8px;
    line-height: 1.6;
}

.cat-mega__item p {
    font-size: 0.875rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.cat-calc {
    padding: 48px 0;
    background: #fff;
}

.cat-calc__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.cat-calc__info h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-brand);
    margin: 0 0 16px;
    line-height: 1.6;
}

.cat-calc__info p {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin: 0 0 12px;
}

.cat-calc__form {
    background: #faf7f5;
    border: 1px solid #e8ddd5;
    border-radius: 8px;
    padding: 24px;
}

.cat-calc__field {
    margin-bottom: 16px;
}

.cat-calc__field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-brand);
    margin-bottom: 6px;
    line-height: 1.6;
}

.cat-calc__field select,
.cat-calc__field input {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #333;
    box-sizing: border-box;
    line-height: 1.6;
    font-family: inherit;
}

.cat-calc__field select:focus,
.cat-calc__field input:focus {
    outline: 2px solid var(--color-brand);
    outline-offset: -2px;
    border-color: var(--color-brand);
}

.cat-calc__btn {
    width: 100%;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 700;
    background-color: var(--color-cta);
    color: #111;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    line-height: 1.6;
    font-family: inherit;
}

.cat-calc__btn:hover {
    background-color: #da9520;
}

.cat-calc__btn:focus {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}

.cat-calc__result {
    margin-top: 16px;
    padding: 16px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e8ddd5;
    font-weight: 700;
    color: var(--color-brand);
    font-size: 1.0625rem;
    line-height: 1.6;
}

.cat-data {
    padding: 48px 0;
    background: #faf7f5;
}

.cat-data h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-brand);
    margin: 0 0 12px;
    line-height: 1.6;
}

.cat-data__intro {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin: 0 0 24px;
}

.cat-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 16px;
}

.cat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.cat-table thead th {
    background-color: var(--color-brand);
    color: #fff;
    font-weight: 700;
    padding: 12px 16px;
    text-align: left;
    line-height: 1.6;
    white-space: nowrap;
}

.cat-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #e8ddd5;
    color: #333;
    line-height: 1.6;
}

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

.cat-table tbody tr:hover {
    background: #f5ece5;
}

.cat-table-note {
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.cat-disclaimer {
    padding: 32px 0;
    background: #fff;
}

.cat-disclaimer p {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
    max-width: 800px;
}

@media (max-width: 768px) {
    .cat-hero {
        padding: 48px 16px;
    }

    .cat-hero h1 {
        font-size: 1.75rem;
    }

    .cat-hero__subtitle {
        font-size: 1rem;
    }

    .cat-articles {
        padding: 32px 0;
    }

    .cat-articles h2 {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }

    .cat-articles__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .cat-card {
        grid-column: span 1;
    }

    .cat-card--featured {
        grid-column: span 2;
    }

    .cat-subcats {
        padding: 32px 0;
    }

    .cat-subcats h2 {
        font-size: 1.5rem;
    }

    .cat-mega__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 0 16px 16px;
    }

    .cat-mega__toggle {
        padding: 14px 16px;
    }

    .cat-calc {
        padding: 32px 0;
    }

    .cat-calc__layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cat-calc__info h2 {
        font-size: 1.5rem;
    }

    .cat-data {
        padding: 32px 0;
    }

    .cat-data h2 {
        font-size: 1.5rem;
    }

    .cat-disclaimer {
        padding: 24px 0;
    }
}

@media (max-width: 480px) {
    .cat-hero {
        padding: 32px 16px;
    }

    .cat-hero h1 {
        font-size: 1.5rem;
    }

    .cat-articles__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cat-card,
    .cat-card--featured {
        grid-column: span 1;
    }

    .cat-mega__grid {
        grid-template-columns: 1fr;
    }

    .cat-mega__item {
        padding: 16px;
    }

    .cat-calc__form {
        padding: 16px;
    }

    .cat-table {
        font-size: 0.8125rem;
    }

    .cat-table thead th,
    .cat-table tbody td {
        padding: 8px 12px;
    }
}