:root {
    --brand: #016445;
    --brand-dark: #014c35;
    --ink: #1f2937;
    --muted: #6b7280;
    --bg: #f4f6f5;
    --card: #ffffff;
    --apto: #15803d;
    --noapto: #b91c1c;
    --warn: #b45309;
    --info: #1d4ed8;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
}

.skip-link {
    position: absolute;
    top: -3rem;
    left: 1rem;
    z-index: 100;
    padding: 0.5rem 1rem;
    background: var(--brand);
    color: #fff;
    border-radius: 0 0 0.5rem 0.5rem;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

.app-header {
    background: var(--brand);
    color: #fff;
    height: 64px;
    display: flex;
    align-items: center;
}

.app-header__inner {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
    display: flex;
    align-items: center;
}

.app-header__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1.05rem;
    color: #fff;
    text-decoration: none;
}

.app-header__logo {
    display: inline-block;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
}

.hero h1 {
    font-size: 1.5rem;
    margin: 0.25rem 0 0.25rem;
}

.hero p {
    color: var(--muted);
    margin: 0 0 1.25rem;
}

.search-card {
    background: var(--card);
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.search-card__label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.search-card__input {
    width: 100%;
    font-size: 1.5rem;
    padding: 0.85rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: 0.12em;
}

.search-card__input:focus {
    outline: 3px solid rgba(1, 100, 69, 0.35);
    border-color: var(--brand);
}

.search-card__button {
    display: inline-block;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background: var(--brand);
    border: 0;
    border-radius: 0.75rem;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    min-height: 48px;
}

.search-card__button:active {
    background: var(--brand-dark);
}

.result {
    margin-top: 1.25rem;
}

.result-card {
    background: var(--card);
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.result-card__title {
    font-size: 1.75rem;
    margin: 0 0 0.5rem;
    letter-spacing: 0.08em;
}

.result-card__name {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    overflow-wrap: anywhere;
}

.result-card__sub,
.result-card__text {
    color: var(--muted);
    margin: 0;
}

.result-card--apto {
    border-top: 0.4rem solid var(--apto);
}

.result-card--apto .result-card__title {
    color: var(--apto);
}

.result-card__icon {
    font-family: "Segoe UI Symbol", "Segoe UI Emoji", sans-serif;
    font-size: 7rem;
    line-height: 1;
    margin: 0 0 0.5rem;
}

.result-card__status {
    color: var(--apto);
    font-weight: 600;
    margin: 0.25rem 0;
}

.result-card--apto .result-card__icon {
    color: var(--apto);
}

.result-card--noapto {
    border-top: 0.4rem solid var(--noapto);
}

.result-card--noapto .result-card__title {
    color: var(--noapto);
}

.result-card--invalido {
    border-top: 0.4rem solid var(--warn);
}

.result-card--invalido .result-card__title {
    color: var(--warn);
}

.result-card--info {
    border-top: 0.4rem solid var(--info);
}

.result-card--info .result-card__title {
    color: var(--info);
}

.app-footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    padding: 1rem;
}

/* Pantallas medianas/grandes: el formulario se centra y el botón deja de ocupar todo el ancho. */
@media (min-width: 640px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .search-card__button {
        width: auto;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}
