:root {
    --bg: #f5f0e8;
    --surface: #fffdf8;
    --surface-soft: #f8f1e8;
    --surface-strong: #fff7ee;
    --text: #1f1a17;
    --muted: #6f6157;
    --accent: #8a4f2a;
    --accent-dark: #6b3d20;
    --accent-soft: #f3e3d6;
    --border: #ddcfc3;
    --shadow: 0 12px 30px rgba(72, 54, 40, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f5f0e8 0%, #fbf8f3 100%);
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: var(--accent-dark);
    text-underline-offset: 0.12em;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(138, 79, 42, 0.28);
    outline-offset: 2px;
}

h1,
h2,
h3 {
    margin-top: 0;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

p {
    margin-top: 0;
}

.shell {
    width: min(100% - 2rem, 960px);
    margin: 0 auto;
}

.site-header,
.site-footer {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.site-header {
    background: rgba(255, 253, 248, 0.96);
}

.site-footer {
    border-top: 1px solid var(--border);
    border-bottom: 0;
    margin-top: 4rem;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 0 1.1rem;
}

.brand-block {
    display: grid;
    gap: 0.2rem;
}

.brand {
    color: var(--text);
    font-size: 1.35rem;
    font-weight: 700;
    text-decoration: none;
}

.brand-tagline {
    margin: 0;
    max-width: 34rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.site-nav a,
.button {
    text-decoration: none;
}

.site-nav a {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.5rem 0.9rem;
    color: var(--text);
}

.site-nav a:hover,
.site-nav a:focus-visible {
    background: var(--surface-soft);
    border-color: var(--border);
}

.site-nav a.is-current {
    background: var(--accent-soft);
    border-color: #d8bca9;
    color: var(--accent-dark);
}

.site-main {
    flex: 1;
    padding: 1.25rem 0 2rem;
}

.section,
.hero {
    padding: 1.25rem 0;
}

.hero {
    padding: clamp(1.75rem, 3vw, 2.6rem);
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-soft) 100%);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.eyebrow {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lede {
    max-width: 60ch;
    color: var(--muted);
    font-size: 1.1rem;
}

.section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.section-copy,
.page-meta {
    max-width: 60ch;
    color: var(--muted);
}

.meta-chip-row,
.hero-actions,
.support-actions,
.tool-card-actions,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.meta-chip-row,
.hero-actions,
.support-actions {
    margin-top: 1.25rem;
}

.meta-chip,
.tool-status,
.tag-list li {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    color: var(--muted);
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.content-panel,
.support-panel,
.card,
.result-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.content-panel,
.support-panel {
    padding: clamp(1.25rem, 3vw, 2rem);
}

.page-header {
    margin-bottom: 1.5rem;
}

.card-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card,
.result-card {
    padding: 1.25rem;
}

.tool-card {
    display: grid;
    gap: 1rem;
    align-content: start;
    height: 100%;
}

.tool-card-featured {
    border-color: #d9b89e;
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-strong) 100%);
}

.tool-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.tool-card-title {
    margin-bottom: 0;
    font-size: clamp(1.3rem, 2vw, 1.6rem);
}

.tool-card-title a {
    color: var(--text);
    text-decoration: none;
}

.tool-card-title a:hover {
    color: var(--accent-dark);
}

.tool-card-copy p:last-child {
    margin-bottom: 0;
}

.tool-detail-label {
    margin-bottom: 0.3rem;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.tool-card-actions {
    margin-top: auto;
}

.tag-list {
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.trust-page h2 {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border);
}

.trust-page h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.button,
button {
    display: inline-block;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    padding: 0.8rem 1.1rem;
    font: inherit;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.button:hover,
button:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-1px);
}

.button-secondary {
    background: rgba(255, 255, 255, 0.75);
    color: var(--accent-dark);
}

.button-secondary:hover {
    background: var(--surface-soft);
}

.card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.card-link:hover,
.card-link:focus-visible {
    transform: translateY(-2px);
    border-color: #cfb7a6;
    box-shadow: 0 14px 26px rgba(72, 54, 40, 0.12);
}

.card-link.is-current {
    border-color: var(--accent);
    background: linear-gradient(180deg, var(--surface-strong) 0%, var(--surface) 100%);
}

.result-error {
    border-color: #c96c56;
    background: #fff5f2;
}

.tool-form {
    display: grid;
    gap: 0.75rem;
    max-width: 28rem;
    margin-top: 1.25rem;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.8rem 0.9rem;
    font: inherit;
    background: #fff;
}

textarea {
    resize: vertical;
    min-height: 8rem;
}

.contact-form {
    margin-top: 1.25rem;
    max-width: 42rem;
}

.form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field {
    display: grid;
    gap: 0.45rem;
}

.form-field label {
    font-weight: 700;
}

.form-field-full {
    grid-column: 1 / -1;
}

.field-help,
.field-errors {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
}

.field-errors {
    padding-left: 1.1rem;
    color: #a04233;
}

.notice {
    margin: 1rem 0 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.1rem;
}

.notice p:last-child {
    margin-bottom: 0;
}

.notice-success {
    border-color: #b9d0b4;
    background: #f3fbf0;
}

.notice-error {
    border-color: #d8b1a6;
    background: #fff5f2;
}

.result-label {
    margin-bottom: 0.25rem;
    color: var(--muted);
}

.result-value {
    margin: 0;
    font-size: clamp(1.45rem, 8vw, 2rem);
    font-weight: 700;
    max-width: 100%;
    line-height: 1.15;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.checklist {
    padding-left: 1.2rem;
}

.checklist li + li {
    margin-top: 0.45rem;
}

.table-scroll {
    overflow-x: auto;
    margin: 1rem 0;
}

.data-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    background: var(--surface);
}

.data-table th,
.data-table td {
    border: 1px solid var(--border);
    padding: 0.75rem 0.85rem;
    text-align: left;
    vertical-align: top;
}

.data-table th {
    background: var(--surface-soft);
    color: var(--text);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem;
    padding: 2rem 0 1.25rem;
}

.footer-brand h2,
.footer-column h2 {
    margin-bottom: 0.75rem;
}

.footer-brand h2 {
    font-size: 1.4rem;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding-left: 0;
    display: grid;
    gap: 0.55rem;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1rem 0 2rem;
}

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

.prose {
    max-width: 70ch;
}

.section-tight {
    padding-top: 0.35rem;
}

@media (max-width: 720px) {
    .header-inner,
    .section-heading,
    .tool-card-top {
        align-items: flex-start;
    }

    .header-inner,
    .tool-card-top {
        flex-direction: column;
    }

    .site-nav,
    .meta-chip-row {
        width: 100%;
    }

    .site-nav a,
    .button,
    button {
        max-width: 100%;
        white-space: normal;
        text-align: center;
    }

    .hero-actions,
    .support-actions,
    .tool-card-actions {
        align-items: stretch;
        width: 100%;
    }

    .hero-actions .button,
    .support-actions .button,
    .tool-card-actions .button,
    .tool-form button {
        width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-field-full {
        grid-column: auto;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    .shell {
        width: min(100% - 1rem, 960px);
    }

    .hero,
    .content-panel,
    .support-panel,
    .card,
    .result-card {
        padding: 1rem;
    }
}

