html, body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, "Segoe UI", sans-serif;
}

body {
    color: #0f172a;
}

a {
    color: inherit;
}

h1, h2, h3, p {
    margin-top: 0;
}

.editorial-page {
    display: grid;
    gap: 1.5rem;
}

.editorial-page__heading {
    max-width: 56rem;
}

.editorial-page__heading h1:focus,
.editorial-page__heading h1:focus-visible {
    outline-color: transparent;
}

.eyebrow {
    color: #c2410c;
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.metric-grid,
.editorial-grid,
.editorial-form-grid {
    display: grid;
    gap: 1rem;
}

.metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.editorial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editorial-grid--wide {
    grid-template-columns: 1.2fr 1fr;
}

.metric-card,
.editorial-surface {
    background: white;
    border: 1px solid #dbe3ef;
    border-radius: 1.25rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06);
    padding: 1.5rem;
}

.metric-card {
    display: grid;
    gap: 0.5rem;
}

.metric-card span,
.subtle {
    color: #64748b;
}

.commitment-line {
    white-space: nowrap;
}

.metric-card strong {
    font-size: 2rem;
}

.editorial-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.editorial-form-grid__full {
    grid-column: 1 / -1;
}

.editorial-form-grid label {
    display: grid;
    gap: 0.45rem;
}

.editorial-form-grid input,
.editorial-form-grid select,
.editorial-form-grid textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 0.9rem;
    padding: 0.85rem 0.95rem;
    font: inherit;
    background: #f8fafc;
}

.editorial-form-grid textarea {
    min-height: 7rem;
    resize: vertical;
}

.editorial-button {
    border: none;
    background: linear-gradient(135deg, #f97316, #fb7185);
    color: white;
    border-radius: 999px;
    padding: 0.85rem 1.2rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.application-details__archive-button {
    margin-top: 1rem;
}

.notice {
    padding: 1rem;
    border-radius: 1rem;
    margin-top: 1rem;
}

.notice--error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

.notice--success {
    background: #dcfce7;
    border: 1px solid #86efac;
}

.notice--info {
    background: #eff6ff;
    border: 1px solid #93c5fd;
}

.badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
}

.badge--active {
    background: #dcfce7;
    color: #166534;
}

.badge--pending {
    background: #fef9c3;
    color: #854d0e;
}

.badge--expired {
    background: #f1f5f9;
    color: #64748b;
}

.link--danger {
    color: #dc2626;
}

.link--danger:hover {
    color: #991b1b;
}

.keyword-add-success {
    animation: keyword-success-pop 0.55s ease-out;
}

.keyword-add-progress {
    animation: keyword-saving-pulse 1.2s ease-in-out infinite;
}

.keyword-row-added {
    animation: keyword-row-flash 1.8s ease-out;
}

@keyframes keyword-success-pop {
    0% {
        transform: translateY(3px) scale(0.985);
        opacity: 0.85;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes keyword-saving-pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.62;
    }
}

@keyframes keyword-row-flash {
    0% {
        background: #fef9c3;
    }

    100% {
        background: transparent;
    }
}

.editorial-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    align-items: center;
}

.editorial-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 0.75rem;
}

.editorial-table thead th {
    text-align: left;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    padding: 0 0.75rem 0.7rem;
    border-bottom: 1px solid #dbe3ef;
    white-space: nowrap;
}

.editorial-table tbody td {
    text-align: left;
    vertical-align: middle;
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
}

.status-report__details-cell {
    max-width: 34rem;
}

.status-report__details-summary {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.editorial-table tbody tr:hover {
    background: #f8fafc;
}

.editorial-table th:first-child,
.editorial-table td:first-child {
    white-space: nowrap;
}

.editorial-table th:last-child,
.editorial-table td:last-child {
    width: 6rem;
}

.editorial-table td a {
    color: #0f172a;
    font-weight: 600;
    text-decoration: none;
}

.editorial-table td a:hover {
    text-decoration: underline;
}

.notice code {
    display: block;
    margin-top: 0.75rem;
    white-space: pre-wrap;
    word-break: break-all;
    background: rgba(15, 23, 42, 0.06);
    border-radius: 0.75rem;
    padding: 0.75rem;
}

.token-row {
    display: grid;
    gap: 0.35rem;
    padding: 0.85rem 0;
    border-top: 1px solid #e2e8f0;
}

.token-row:first-of-type {
    border-top: none;
    padding-top: 0;
}

@media (max-width: 960px) {
    .metric-grid,
    .editorial-grid,
    .editorial-grid--wide,
    .editorial-form-grid {
        grid-template-columns: 1fr;
    }
}
