/* simce-results-entry.css: entry point to Resultados SIMCE from the /simce landing and from SIMCE posts.
   One component, two surfaces: --brand (purple card, landing) and --soft (lavender card, post).
   Self-contained on purpose: resultados-simce.css weighs 148 KB and this block needs about 8 KB unminified.
   The colours repeat the hub's tokens (#5d3874 / #3f2452) so the visitor lands on the same identity. */

.simce-entry {
    --se-ink: #2f3747;
    --se-ink-soft: #4a5262;
    --se-muted: #646b78;
    --se-brand: #5d3874;
    --se-brand-deep: #3f2452;
    --se-accent: #ffc24d;
    --se-soft: #f8f4fa;
    --se-soft-line: #e3d6ec;
    --se-control-line: #7a8496;
    --se-chip-line: #8f72a6;
    --se-chip-hover: #f1e9f6;
    --se-radius: 20px;

    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: var(--se-radius);
    font-family: "Nunito", "Nunito Metric Arial", "Nunito Metric Helvetica", sans-serif;
    text-align: left;
}

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

/* ---- Copy ---- */

/* Sentence case, normal tracking: the label stands out by weight and colour, never by capitals. */
.simce-entry__eyebrow {
    display: block;
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.3;
}

.simce-entry__title {
    margin: 0 0 10px;
    font-family: inherit;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.simce-entry__lead {
    margin: 0 0 16px;
    font-size: 1.05rem;
    line-height: 1.55;
}

.simce-entry__hub {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.simce-entry__hub span {
    white-space: nowrap;
}

/* The theme sizes inline SVGs globally; the arrow keeps its own box. */
.simce-entry__hub svg {
    flex: none;
    width: 16px;
    height: 16px;
    transition: transform 180ms ease;
}

.simce-entry__hub:hover svg {
    transform: translateX(3px);
}

/* ---- Search bar: one white pill holding the field and the button, like the hub's ---- */

.simce-entry__label {
    display: block;
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.3;
}

.simce-entry__bar {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 56px;
    padding: 6px 6px 6px 20px;
    border-radius: 999px;
    background: #ffffff;
    transition: box-shadow 180ms ease;
}

.simce-entry__bar:focus-within {
    box-shadow: 0 0 0 3px var(--se-focus-ring);
}

.simce-entry__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--se-ink);
    font: inherit;
    font-size: 1rem;
}

.simce-entry__input::placeholder {
    color: var(--se-muted);
    opacity: 1;
}

/* The bar draws the field's focus ring; the native one would be clipped by the pill. */
.simce-entry__input:focus-visible {
    outline: 0;
}

.simce-entry__input::-webkit-search-cancel-button {
    cursor: pointer;
}

.simce-entry__button {
    flex: none;
    min-height: 44px;
    padding: 10px 22px;
    border: 0;
    border-radius: 999px;
    background: var(--se-brand);
    color: #ffffff;
    font: inherit;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.5;
    cursor: pointer;
    transition: background-color 180ms ease;
}

.simce-entry__button:hover {
    background: var(--se-brand-deep);
}

.simce-entry__button:focus-visible {
    outline: 3px solid var(--se-brand);
    outline-offset: 2px;
}

/* ---- Examples: real links to school sheets ---- */

.simce-entry__examples {
    margin: 18px 0 0;
}

.simce-entry__examples-label {
    margin: 0 0 8px;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
}

.simce-entry__examples ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.simce-entry__examples li {
    margin: 0;
}

.simce-entry__chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 14px;
    border: 1px solid;
    /* 18 px, not a pill: a name that wraps at 320 px keeps a calm shape. */
    border-radius: 18px;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color 180ms ease, border-color 180ms ease;
}

.simce-entry__chip:hover,
.simce-entry__chip:focus {
    text-decoration: none;
}

.simce-entry a:focus-visible {
    outline: 3px solid var(--se-focus-ring);
    outline-offset: 2px;
}

/* ---- Brand surface: /simce landing ---- */

.simce-entry--brand {
    --se-focus-ring: var(--se-accent);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 28px 20px;
    background: linear-gradient(115deg, var(--se-brand), var(--se-brand-deep));
    color: #ffffff;
    box-shadow: 0 18px 40px rgba(63, 36, 82, 0.22);
}

/* A teal glow from the bottom right ties the hub's purple to the landing's green. It never reaches the
   eyebrow: the yellow keeps 5.7:1 on the plain gradient. */
.simce-entry--brand::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse 70% 80% at 100% 100%, rgba(28, 199, 166, 0.18), transparent 70%);
    pointer-events: none;
}

.simce-entry--brand .simce-entry__eyebrow {
    color: var(--se-accent);
}

.simce-entry--brand .simce-entry__title {
    color: #ffffff;
    font-size: 1.6rem;
}

.simce-entry--brand .simce-entry__lead {
    color: rgba(255, 255, 255, 0.86);
}

.simce-entry--brand .simce-entry__hub,
.simce-entry--brand .simce-entry__hub:hover,
.simce-entry--brand .simce-entry__label,
.simce-entry--brand .simce-entry__examples-label {
    color: #ffffff;
}

.simce-entry--brand .simce-entry__chip {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.simce-entry--brand .simce-entry__chip:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

@media (min-width: 768px) {
    .simce-entry--brand {
        padding: 40px;
    }

    .simce-entry--brand .simce-entry__title {
        font-size: 1.85rem;
    }
}

@media (min-width: 992px) {
    .simce-entry--brand {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
        align-items: center;
        gap: 48px;
        padding: 48px 56px;
    }

    .simce-entry--brand .simce-entry__lead {
        margin-bottom: 0;
    }
}

/* ---- Soft surface: end of a SIMCE post ---- */

.simce-entry--soft {
    --se-focus-ring: var(--se-brand);
    margin: 40px 0 32px;
    padding: 24px 20px;
    border: 1px solid var(--se-soft-line);
    background: var(--se-soft);
    color: var(--se-ink-soft);
}

.simce-entry--soft .simce-entry__eyebrow {
    color: var(--se-brand);
}

.simce-entry--soft .simce-entry__title {
    color: var(--se-brand-deep);
    font-size: 1.35rem;
}

.simce-entry--soft .simce-entry__lead {
    color: var(--se-ink-soft);
    font-size: 1rem;
}

.simce-entry--soft .simce-entry__label,
.simce-entry--soft .simce-entry__examples-label {
    color: var(--se-ink);
}

.simce-entry--soft .simce-entry__bar {
    border: 1px solid var(--se-control-line);
    min-height: 58px;
}

.simce-entry--soft .simce-entry__hub,
.simce-entry--soft .simce-entry__hub:hover {
    color: var(--se-brand);
}

.simce-entry--soft .simce-entry__chip {
    border-color: var(--se-chip-line);
    background: #ffffff;
    color: var(--se-brand);
}

.simce-entry--soft .simce-entry__chip:hover {
    background: var(--se-chip-hover);
    color: var(--se-brand-deep);
}

.simce-entry__hub {
    margin-top: 12px;
}

@media (min-width: 768px) {
    .simce-entry--soft {
        padding: 32px 36px;
    }

    .simce-entry--soft .simce-entry__title {
        font-size: 1.5rem;
    }
}

/* 320 px: the button keeps its 44 px target and the field keeps room for the placeholder. */
@media (max-width: 359.98px) {
    .simce-entry__bar {
        padding-left: 16px;
    }

    .simce-entry__button {
        padding: 10px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .simce-entry *,
    .simce-entry *::before,
    .simce-entry *::after {
        transition: none !important;
    }
}
