.en-tool {
    --en-ink: #172334;
    --en-muted: #5b6878;
    --en-border: #dce3eb;
    --en-accent: #164e8a;
    --en-soft: #f4f8fc;
    color: var(--en-ink);
    font-family: inherit;
    margin: 1.5rem auto;
    max-width: 880px;
}
.en-tool *,
.en-tool *::before,
.en-tool *::after { box-sizing: border-box; }
.en-card {
    background: #fff;
    border: 1px solid var(--en-border);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(23, 35, 52, .07);
    margin: 0 0 1.25rem;
    padding: clamp(1.1rem, 4vw, 2rem);
}
.en-card-heading { margin-bottom: 1.4rem; }
.en-card-heading h2 { color: var(--en-ink); font-size: clamp(1.35rem, 3vw, 1.8rem); line-height: 1.2; margin: .2rem 0 .55rem; }
.en-card-heading p { color: var(--en-muted); margin: .35rem 0; }
.en-eyebrow { color: var(--en-accent) !important; font-size: .78rem; font-weight: 700; letter-spacing: .08em; margin: 0 !important; text-transform: uppercase; }
.en-fields { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.en-field label { display: block; font-size: .95rem; font-weight: 650; margin-bottom: .4rem; }
.en-field input {
    background: #fff;
    border: 1px solid #aebaca;
    border-radius: 8px;
    color: var(--en-ink);
    font: inherit;
    min-height: 48px;
    padding: .65rem .8rem;
    width: 100%;
}
.en-field input:focus-visible,
.en-tool button:focus-visible { outline: 3px solid #78b8fa; outline-offset: 2px; }
.en-result {
    align-items: center;
    background: var(--en-soft);
    border-radius: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: .3rem 1rem;
    margin: 1.2rem 0 .6rem;
    min-height: 88px;
    padding: 1rem 1.2rem;
}
.en-result-label { color: var(--en-muted); font-weight: 650; }
.en-result-context { color: var(--en-muted); font-size: .92rem; margin-left: auto; }
.en-threshold { color: var(--en-muted); font-size: .92rem; margin: .2rem 0 0; }
.en-exigency-field { border: 0; margin: 1.1rem 0 0; min-width: 0; padding: 0; }
.en-exigency-field legend { font-size: .95rem; font-weight: 650; margin-bottom: .4rem; padding: 0; }
.en-exigency-controls { align-items: center; display: flex; flex-wrap: wrap; gap: .5rem .9rem; }
.en-exigency-presets { display: flex; gap: .4rem; }
.en-tool .en-exigency-presets .en-exig-preset {
    background: #fff;
    border: 1px solid var(--en-border);
    border-radius: 999px;
    color: var(--en-ink);
    font-weight: 600;
    min-height: 40px;
    min-width: 64px;
    padding: .4rem .9rem;
    width: auto;
}
.en-tool .en-exigency-presets .en-exig-preset:hover:not(:disabled) { background: var(--en-soft); border-color: var(--en-accent); color: var(--en-accent); }
.en-tool .en-exigency-presets .en-exig-preset[aria-pressed="true"],
.en-tool .en-exigency-presets .en-exig-preset[aria-pressed="true"]:hover:not(:disabled) { background: var(--en-accent); border-color: var(--en-accent); color: #fff; }
.en-exigency-custom { align-items: center; display: inline-flex; font-size: .95rem; gap: .4rem; margin: 0; }
.en-exigency-custom input {
    background: #fff;
    border: 1px solid #aebaca;
    border-radius: 8px;
    color: var(--en-ink);
    font: inherit;
    min-height: 40px;
    padding: .4rem .6rem;
    width: 6.5rem;
}
.en-exigency-custom input:focus-visible { outline: 3px solid #78b8fa; outline-offset: 2px; }
.en-exigency-custom input[aria-invalid="true"] { border-color: #a33030; }
.en-exigency-help { color: var(--en-muted); font-size: .85rem; margin: .45rem 0 0; }
.en-exigency-message { color: #a33030; font-size: .9rem; margin: .25rem 0 0; min-height: 1.1em; }
.en-table-summary { color: var(--en-muted); font-size: .9rem; margin: 0 0 .6rem; }
.en-table-total-field { max-width: 320px; }
.en-grade { color: var(--en-accent); font-size: 2.6rem; font-weight: 800; line-height: 1; }
.en-status { font-weight: 700; }
.en-status.is-passing { color: #17633c; }
.en-status.is-failing { color: #a33030; }
.en-message { color: #a33030; min-height: 1.2em; margin: .35rem 0; }
.en-actions, .en-table-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin: 1rem 0; }
.en-tool button {
    background: var(--en-accent);
    border: 1px solid var(--en-accent);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 650;
    min-height: 44px;
    padding: .62rem 1rem;
}
.en-tool button:hover:not(:disabled) { background: #103c6b; }
.en-tool button:disabled { cursor: not-allowed; opacity: .55; }
.en-tool .en-reset { background: #fff; color: var(--en-accent); }
.en-disclaimer { color: var(--en-muted); font-size: .88rem; line-height: 1.5; margin: .9rem 0 0; }
.en-table-wrap { overflow-x: auto; }
.en-grade-table { border-collapse: collapse; font-size: .95rem; min-width: 440px; width: 100%; }
.en-grade-table th, .en-grade-table td { border-bottom: 1px solid var(--en-border); padding: .7rem .8rem; text-align: left; }
.en-grade-table th { background: var(--en-soft); font-weight: 700; }
.en-grade-table tbody tr:hover { background: #f8fafc; }
.en-ad-slot { min-height: 90px; margin: 1rem 0; }
.en-sr-only {
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}
@media (max-width: 560px) {
    .en-fields { grid-template-columns: 1fr; }
    .en-result { align-items: flex-start; flex-direction: column; }
    .en-result-context { margin-left: 0; }
    .en-tool button { width: 100%; }
    .en-grade-table { font-size: .9rem; min-width: 0; }
    .en-grade-table th, .en-grade-table td { padding: .6rem .45rem; }
    .en-exigency-presets { flex: 1 1 100%; }
    .en-tool .en-exigency-presets .en-exig-preset { flex: 1; }
}
@media print {
    body * { visibility: hidden !important; }
    .en-tool, .en-tool * { visibility: visible !important; }
    .en-tool { left: 0; margin: 0; max-width: none; position: absolute; top: 0; width: 100%; }
    body.en-print-active .en-tool:not(.en-printing) { display: none !important; }
    body.en-print-active .en-printing .en-card:not(.en-table-card) { display: none !important; }
    .en-actions, .en-table-actions, .en-field, .en-exigency-field, .en-ad-slot { display: none !important; }
    .en-table-summary { color: #000; font-weight: 600; }
    .en-card { border: 0; box-shadow: none; break-inside: avoid; }
    .en-table-wrap { overflow: visible; }
    .en-grade-table { font-size: 9pt; min-width: 0; }
}
