* {
    box-sizing: border-box;
}

:root {
    font-family: Arial, Helvetica, sans-serif;
    color: #111827;
    background: #eef2f7;
}

body {
    margin: 0;
    min-height: 100vh;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    width: min(100%, 760px);
    margin: 0 auto;
    padding: 24px 16px 48px;
}

header {
    margin-bottom: 20px;
}

.eyebrow {
    margin: 0 0 4px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 6px;
    font-size: clamp(2rem, 8vw, 3.3rem);
}

.intro {
    margin-bottom: 0;
    color: #475569;
    font-weight: 700;
}

.panel {
    background: white;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.1);
    margin-bottom: 18px;
}

.hidden {
    display: none;
}

label {
    display: block;
    margin: 18px 0 7px;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 74px;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 1.55rem;
    font-weight: 700;
    text-align: center;
}

input:focus {
    border-color: #2563eb;
    outline: 3px solid rgba(37, 99, 235, 0.18);
}

button {
    min-height: 54px;
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 700;
}

.primary-button {
    background: #111827;
    color: white;
}

.full-width {
    width: 100%;
    margin-top: 12px;
}

.status-box {
    min-height: 66px;
    margin-top: 16px;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
}

.status-box.neutral {
    background: #e2e8f0;
}

.status-box.success {
    background: #dcfce7;
    color: #166534;
}

.status-box.warning {
    background: #fef3c7;
    color: #92400e;
}

.status-box.error {
    background: #fee2e2;
    color: #991b1b;
}

.mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 5px;
    border-radius: 14px;
    background: #e2e8f0;
}

.mode-button {
    min-height: 46px;
    background: transparent;
    color: #475569;
}

.mode-button.active {
    background: white;
    color: #111827;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.label {
    margin-bottom: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #475569;
}

.result-header h2 {
    margin-bottom: 0;
    font-size: clamp(1.8rem, 8vw, 3rem);
}

.badge {
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    white-space: nowrap;
}

.badge.success {
    background: #dcfce7;
    color: #166534;
}

.badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.badge.error {
    background: #fee2e2;
    color: #991b1b;
}

.badge.neutral {
    background: #e2e8f0;
    color: #334155;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.status-card {
    border-radius: 14px;
    padding: 14px;
    background: #f1f5f9;
}

.status-card span,
.status-card strong {
    display: block;
}

.status-card span {
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-card strong {
    font-size: 1.15rem;
}

.details {
    margin-top: 18px;
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
}

.detail-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.detail-row span:first-child {
    font-weight: 700;
    color: #475569;
}

@media (max-width: 620px) {
    .status-grid {
        grid-template-columns: 1fr;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}
