:root {
    color-scheme: light;
    --bg: #f2f5f1;
    --bg-accent: #edf4ee;
    --surface: #ffffff;
    --surface-alt: #f7faf6;
    --surface-soft: #eef4ed;
    --text: #163125;
    --text-soft: #294236;
    --muted: #5d7065;
    --border: #d3ddd4;
    --border-strong: #b9c8bb;
    --primary: #1f6a4f;
    --primary-strong: #154935;
    --primary-soft: #e2f1e8;
    --accent: #b47a1a;
    --accent-soft: #fff5df;
    --danger: #a03330;
    --danger-soft: #fff0ef;
    --success: #1f6d45;
    --success-soft: #ecf8f1;
    --info: #155b78;
    --info-soft: #ebf7fb;
    --warning: #8d6118;
    --warning-soft: #fff7e8;
    --shadow-sm: 0 8px 24px rgba(22, 49, 37, 0.06);
    --shadow-md: 0 18px 50px rgba(22, 49, 37, 0.08);
    --radius-sm: 14px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --container-width: min(1180px, calc(100% - 1.25rem));
}

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

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

body {
    margin: 0;
    font-family: "Aptos", "Segoe UI", "Trebuchet MS", sans-serif;
    line-height: 1.55;
    background:
        radial-gradient(circle at top right, rgba(180, 122, 26, 0.12), transparent 24%),
        linear-gradient(180deg, #f9fbf8 0%, var(--bg) 100%);
    color: var(--text);
}

img {
    max-width: 100%;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

p,
ul,
ol {
    margin-top: 0;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.45rem;
    line-height: 1.14;
    color: var(--text);
    font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

h1 {
    font-size: clamp(2rem, 5.5vw, 3.4rem);
}

h2 {
    font-size: clamp(1.35rem, 3.5vw, 1.9rem);
}

h3 {
    font-size: clamp(1.15rem, 2.6vw, 1.35rem);
}

.shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(211, 221, 212, 0.85);
    background: rgba(249, 251, 248, 0.94);
    backdrop-filter: blur(14px);
}

.topbar-inner,
.container {
    width: var(--container-width);
    margin: 0 auto;
}

.topbar-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.brand-mark {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, #7ea86d 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.brand-text {
    min-width: 0;
}

.brand-title,
.brand-subtitle {
    margin: 0;
}

.brand-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    font-size: 0.78rem;
    color: var(--muted);
}

.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.55rem;
}

.nav-link,
.button,
button,
input[type="submit"] {
    appearance: none;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 700;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-soft);
    padding: 0.7rem 0.95rem;
}

.nav-link:hover {
    text-decoration: none;
    background: rgba(31, 106, 79, 0.08);
}

.nav-count {
    display: none;
    min-width: 1.45rem;
    height: 1.45rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
    line-height: 1;
}

.nav-count.is-visible {
    display: inline-flex;
}

.button,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 3rem;
    padding: 0.9rem 1.2rem;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.button:hover,
button:hover,
input[type="submit"]:hover {
    text-decoration: none;
    background: var(--primary-strong);
    transform: translateY(-1px);
}

.button:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(21, 91, 120, 0.24);
    outline-offset: 2px;
}

.button-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}

.button-secondary:hover {
    background: #f8fbf7;
}

.button-ghost {
    background: transparent;
    color: var(--primary);
    border: 1px solid rgba(31, 106, 79, 0.16);
    box-shadow: none;
}

.button-ghost:hover {
    background: rgba(31, 106, 79, 0.08);
    color: var(--primary-strong);
}

.button-danger {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid rgba(160, 51, 48, 0.18);
    box-shadow: none;
}

.button-danger:hover {
    background: #ffe2df;
    color: var(--danger);
}

.button-full {
    width: 100%;
}

.button-inline-form {
    margin: 0;
    display: inline-flex;
}

.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.is-submitting {
    cursor: progress;
}

.is-loading {
    opacity: 0.78;
}

.container {
    flex: 1;
    padding: 1rem 0 3rem;
}

.stack {
    display: grid;
    gap: 1rem;
}

.content-narrow,
.content-medium,
.content-wide {
    width: 100%;
    margin-inline: auto;
}

.content-narrow {
    max-width: 36rem;
}

.content-medium {
    max-width: 52rem;
}

.content-wide {
    max-width: 62rem;
}

.stack-tight {
    display: grid;
    gap: 0.75rem;
}

.grid {
    display: grid;
    gap: 1rem;
}

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

.section-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.media-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.8rem;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    background: rgba(31, 106, 79, 0.1);
    color: var(--primary-strong);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 4rem);
}

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

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

.footer-note {
    color: var(--muted);
    font-size: 0.94rem;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field label {
    font-weight: 700;
    font-size: 0.96rem;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 3.1rem;
    padding: 0.92rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    font: inherit;
}

.field textarea {
    min-height: 7.5rem;
    resize: vertical;
}

.field-hint,
.field-error {
    font-size: 0.9rem;
}

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

.field-error {
    color: var(--danger);
    font-weight: 600;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea,
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: rgba(160, 51, 48, 0.5);
    background: #fff9f8;
}

.field-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

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

.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

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

.data-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.85rem 0.7rem;
    vertical-align: top;
    border-bottom: 1px solid rgba(211, 221, 212, 0.85);
    text-align: left;
}

.data-table th {
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.preview-frame {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #fff;
}

.preview-frame img {
    display: block;
    width: 100%;
    height: auto;
}

.review-layout {
    display: grid;
    gap: 1rem;
}

.report-layout {
    display: grid;
    gap: 1rem;
}

.review-sidebar {
    display: grid;
    gap: 1rem;
}

.sticky-card,
.review-sidebar {
    align-self: start;
}

.logo-thumb {
    width: 4rem;
    height: 4rem;
    border-radius: 18px;
    object-fit: cover;
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.logo-thumb-fallback {
    display: grid;
    place-items: center;
    font-weight: 800;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.no-print {
    display: initial;
}

@media (min-width: 720px) {
    :root {
        --container-width: min(1180px, calc(100% - 2rem));
    }

    .topbar-inner {
        flex-direction: row;
        align-items: center;
    }

    .nav {
        justify-content: flex-end;
    }

    .container {
        padding-top: 1.25rem;
    }

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

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

@media (min-width: 980px) {
    .mobile-only {
        display: none;
    }

    .desktop-only {
        display: block;
    }

    .review-layout {
        grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
        align-items: start;
    }

    .report-layout {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
        align-items: start;
    }

    .review-sidebar {
        position: sticky;
        top: 5.5rem;
    }
}
