:root {
    --surface: #ffffff;
    --surface-muted: #f6f8f9;
    --surface-strong: #eef7f5;
    --text: #1e2428;
    --text-muted: #66737a;
    --line: #dce4e7;
    --teal: #0f766e;
    --teal-dark: #0b5f59;
    --amber: #b7791f;
    --red: #b42318;
    --green: #13795b;
    --ink: #263238;
}

html,
body {
    min-height: 100%;
}

body {
    background: var(--surface-muted);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
}

a {
    color: var(--teal);
}

.container {
    max-width: 1180px;
}

.narrow {
    max-width: 820px;
}

.app-header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.navbar {
    min-height: 72px;
}

.navbar-brand {
    align-items: center;
    color: var(--ink);
    display: flex;
    font-weight: 750;
    gap: 0.75rem;
}

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

.brand-mark {
    align-items: center;
    background: var(--teal);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-size: 0.9rem;
    height: 36px;
    justify-content: center;
    letter-spacing: 0;
    width: 36px;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 600;
}

.nav-link.active,
.nav-link:hover {
    color: var(--teal);
}

.github-link {
    align-items: center;
    display: inline-flex;
    gap: 0.4rem;
}

.github-link svg {
    fill: currentColor;
    height: 1.15rem;
    width: 1.15rem;
}

.app-main {
    min-height: calc(100vh - 136px);
}

.app-footer {
    background: #111819;
    border-top: 1px solid var(--line);
    color: #d8e0df;
    font-size: 0.95rem;
    padding: 2rem 0;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    justify-content: space-between;
}

.footer-brand {
    max-width: 500px;
}

.footer-logo {
    color: #fff;
    display: inline-flex;
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
    text-decoration: none;
}

.footer-brand p {
    color: #b8c4c2;
    line-height: 1.6;
    margin: 0;
}

.footer-contact,
.footer-links,
.footer-legal {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.footer-contact,
.footer-links {
    font-weight: 700;
}

.app-footer a {
    color: #e8f3f1;
    text-decoration: none;
}

.app-footer a:hover {
    color: #8dded1;
}

.footer-legal {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #a9b6b4;
    flex-basis: 100%;
    font-size: 0.88rem;
    padding-top: 1rem;
}

.hero-section {
    background:
        linear-gradient(120deg, rgba(238, 247, 245, 0.95), rgba(255, 255, 255, 0.95)),
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.14), transparent 34%);
    border-bottom: 1px solid var(--line);
    padding: 4rem 0 2.25rem;
}

.eyebrow {
    color: var(--teal);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

h1,
h2,
h3 {
    color: var(--ink);
    letter-spacing: 0;
}

h1:focus {
    outline: none;
}

h1 {
    font-size: clamp(2.25rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.55rem;
    font-weight: 750;
}

h3 {
    font-size: 1rem;
    font-weight: 750;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.18rem;
    line-height: 1.65;
    max-width: 780px;
}

.regulatory-notice {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 5px solid var(--teal);
    border-radius: 8px;
    margin-top: 2rem;
    padding: 1.25rem;
}

.regulatory-notice h2 {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.regulatory-notice ul {
    color: var(--text-muted);
    margin: 0;
    padding-left: 1.2rem;
}

.regulatory-notice li + li {
    margin-top: 0.4rem;
}

.ads-box {
    align-items: center;
    background: var(--surface);
    border: 1px dashed #aebcc2;
    border-radius: 8px;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    min-height: 280px;
    padding: 1rem;
}

.ads-box-placeholder span {
    font-size: 0.95rem;
}

.validator-section,
.content-section {
    padding: 2.5rem 0 4rem;
}

.content-section p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.methodology-header {
    max-width: 900px;
    margin-bottom: 2rem;
}

.methodology-header h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

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

.methodology-card,
.methodology-summary {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(27, 31, 36, 0.05);
    padding: 1.25rem;
}

.methodology-card-header {
    align-items: flex-start;
    display: flex;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.methodology-index {
    align-items: center;
    background: var(--surface-strong);
    border: 1px solid #c5e5de;
    border-radius: 8px;
    color: var(--teal-dark);
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 850;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.methodology-card h2 {
    font-size: 1.12rem;
    margin-bottom: 0.4rem;
}

.methodology-card p {
    font-size: 0.98rem;
    line-height: 1.65;
}

.methodology-card ul {
    color: var(--text-muted);
    margin-bottom: 0;
    padding-left: 1.1rem;
}

.methodology-card li + li {
    margin-top: 0.4rem;
}

.methodology-level {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
}

.level-strong {
    background: #e9f7f1;
    color: var(--green);
}

.level-limited {
    background: #fff7e6;
    color: var(--amber);
}

.methodology-note {
    background: var(--surface-muted);
    border-radius: 8px;
    margin-top: 1rem;
    padding: 0.8rem;
}

.methodology-note.warning {
    background: #fff7e6;
    color: #6f4a11;
}

.methodology-summary {
    border-left: 5px solid var(--teal);
    margin-top: 1rem;
}

.upload-card,
.results-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(27, 31, 36, 0.06);
    padding: 1.5rem;
}

.upload-card-header,
.results-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.limit-pill {
    background: var(--surface-strong);
    border: 1px solid #c5e5de;
    border-radius: 999px;
    color: var(--teal-dark);
    font-size: 0.9rem;
    font-weight: 650;
    padding: 0.45rem 0.8rem;
    white-space: nowrap;
}

.drop-zone {
    align-items: center;
    background: #fbfcfc;
    border: 2px dashed #aebcc2;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-height: 230px;
    padding: 2rem;
    text-align: center;
    transition: border-color 140ms ease, background-color 140ms ease;
}

.drop-zone:hover {
    background: #f4faf8;
    border-color: var(--teal);
}

.drop-zone.is-drag-over {
    background: #eefaf7;
    border-color: var(--teal);
    box-shadow: inset 0 0 0 1px var(--teal);
}

.pdf-icon {
    align-items: center;
    background: #fff0ed;
    border: 1px solid #ffc9c0;
    border-radius: 8px;
    color: var(--red);
    display: inline-flex;
    font-weight: 850;
    height: 64px;
    justify-content: center;
    width: 64px;
}

.drop-title {
    color: var(--ink);
    font-size: 1.15rem;
    font-weight: 750;
}

.drop-help {
    color: var(--text-muted);
    max-width: 620px;
}

.file-input {
    max-width: 100%;
}

.upload-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.25rem;
}

.btn-primary {
    background-color: var(--teal);
    border-color: var(--teal);
    border-radius: 8px;
    font-weight: 750;
}

.btn-primary:disabled {
    background-color: #7aa8a1;
    border-color: #7aa8a1;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--teal-dark);
    border-color: var(--teal-dark);
}

.selected-count {
    color: var(--text-muted);
    font-weight: 600;
}

.results-section {
    margin-top: 2rem;
}

.result-table-wrap {
    border: 1px solid var(--line);
    border-radius: 8px;
}

.result-table {
    margin: 0;
}

.result-table th {
    background: #f3f6f7;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
}

.status-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.84rem;
    font-weight: 800;
    padding: 0.35rem 0.7rem;
}

.status-ok {
    background: #e9f7f1;
    color: var(--green);
}

.status-warning {
    background: #fff7e6;
    color: var(--amber);
}

.status-error {
    background: #fff0ed;
    color: var(--red);
}

.report-details {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

.report-detail {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.report-detail summary {
    align-items: center;
    background: #fbfcfc;
    cursor: pointer;
    display: flex;
    font-weight: 750;
    justify-content: space-between;
    padding: 1rem;
}

.metadata-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1rem;
}

.metadata-grid div {
    background: var(--surface-muted);
    border-radius: 8px;
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem;
}

.metadata-grid strong {
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.issue-list {
    padding: 0 1rem 1rem;
}

.issue-list ul {
    margin-bottom: 0;
    padding-left: 1.1rem;
}

.issue-list li + li {
    margin-top: 0.35rem;
}

.empty-issues {
    color: var(--text-muted);
    margin-bottom: 0;
}

code {
    color: var(--red);
}

@media (max-width: 768px) {
    .footer-inner,
    .upload-card-header,
    .results-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero-section {
        padding-top: 2.5rem;
    }

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

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

    .limit-pill {
        white-space: normal;
    }
}
