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

.hc-shell {
    max-width: 780px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 4rem;
}

.hc-lead {
    font-size: 1.05rem;
    color: #4a5c6e;
    margin: 0 0 2rem;
    max-width: 56ch;
}

/* ── Mode toggle ─────────────────────────────────────────── */
.hc-mode-toggle {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.5rem;
}

.hc-mode-btn {
    padding: .45rem 1.1rem;
    font-size: .875rem;
    font-weight: 600;
    border: 2px solid #d0d8e0;
    border-radius: 999px;
    background: #ffffff;
    color: #4a5c6e;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s;
}

.hc-mode-btn.active {
    background: #2d3f52;
    border-color: #2d3f52;
    color: #ffffff;
}

.hc-mode-btn:focus-visible {
    outline: 3px solid #005fa3;
    outline-offset: 2px;
}

/* ── Input ───────────────────────────────────────────────── */
.hc-input-group { margin-bottom: 1.25rem; }

.hc-label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: .4rem;
}

.hc-input-row {
    display: flex;
    gap: .75rem;
    align-items: stretch;
}

.hc-url-input {
    flex: 1;
    padding: .75rem 1rem;
    font-size: 1rem;
    border: 2px solid #d0d8e0;
    border-radius: 10px;
    background: #ffffff;
    color: #0f1923;
    transition: border-color .15s, box-shadow .15s;
    min-width: 0;
}

.hc-url-input::placeholder { color: #8fa0b0; }

.hc-url-input:focus {
    outline: none;
    border-color: #005fa3;
    box-shadow: 0 0 0 3px rgba(0,95,163,.15);
}

.hc-multi-input {
    width: 100%;
    min-height: 120px;
    padding: .75rem 1rem;
    font-size: .9rem;
    font-family: inherit;
    border: 2px solid #d0d8e0;
    border-radius: 10px;
    background: #ffffff;
    color: #0f1923;
    resize: vertical;
    transition: border-color .15s, box-shadow .15s;
}

.hc-multi-input:focus {
    outline: none;
    border-color: #005fa3;
    box-shadow: 0 0 0 3px rgba(0,95,163,.15);
}

.hc-hint {
    font-size: .8rem;
    color: #4a5c6e;
    margin: .35rem 0 .75rem;
}

.hc-run-btn {
    padding: .75rem 1.5rem;
    font-size: .95rem;
    font-weight: 700;
    background: #e0f0fb;
    color: #0c4e7a;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, transform .1s;
    box-shadow: 0 1px 4px rgba(15,25,35,.08);
}

.hc-run-btn:hover    { background: #b8d9f0; }
.hc-run-btn:active   { transform: scale(.97); }
.hc-run-btn:disabled { background: #8fa0b0; cursor: not-allowed; }

.hc-run-btn:focus-visible {
    outline: 3px solid #e0f0fb;
    outline-offset: 3px;
}

/* ── Error ───────────────────────────────────────────────── */
.hc-error {
    display: none;
    margin-top: .5rem;
    padding: .65rem 1rem;
    background: #fde8e8;
    color: #b91c1c;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 500;
    line-height: 1.5;
}

/* ── Progress ────────────────────────────────────────────── */
.hc-progress {
    display: none;
    margin: 1.5rem 0;
    background: #ffffff;
    border: 1px solid #d0d8e0;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 4px rgba(15,25,35,.08);
}

.hc-progress-title {
    font-size: .9rem;
    font-weight: 600;
    color: #0f1923;
    margin: 0 0 .75rem;
}

.hc-multi-bar-wrap {
    height: 8px;
    background: #d0d8e0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: .75rem;
}

.hc-multi-bar {
    height: 100%;
    background: #005fa3;
    border-radius: 999px;
    width: 0%;
    transition: width .4s ease;
}

.hc-progress-status {
    font-size: .85rem;
    color: #0f1923;
    margin: 0;
}

.hc-dots { display: flex; gap: .35rem; align-items: center; margin-top: .5rem; }
.hc-dot  { width: 8px; height: 8px; border-radius: 50%; background: #005fa3; animation: hc-pulse 1.2s ease-in-out infinite; }
.hc-dot:nth-child(2) { animation-delay: .2s; }
.hc-dot:nth-child(3) { animation-delay: .4s; }
@keyframes hc-pulse {
    0%, 80%, 100% { transform: scale(.6); opacity: .4; }
    40%            { transform: scale(1);  opacity: 1;  }
}

/* ── Summary bar ─────────────────────────────────────────── */
.hc-summary-bar {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    align-items: center;
    background: #2d3f52;
    color: #ffffff;
    border-radius: 12px;
    padding: 1.1rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 16px rgba(15,25,35,.10);
}

.hc-summary-bar h2 {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
    color: #ffffff;
    flex: 1;
    min-width: 140px;
}

.hc-sum-pill {
    font-size: .78rem;
    font-weight: 700;
    padding: .25rem .7rem;
    border-radius: 999px;
}

.hc-sum-pill.ok   { background: rgba(74,222,128,.25); color: #ffffff; }
.hc-sum-pill.warn { background: rgba(245,158,11,.35); color: #ffffff; }
.hc-sum-pill.crit { background: rgba(239,68,68,.35);  color: #ffffff; }
.hc-sum-pill.info { background: rgba(255,255,255,.15); color: #ffffff; }

/* ── URL accordion ───────────────────────────────────────── */
.hc-url-accordion { margin-top: .25rem; }

.hc-url-item {
    border: 1px solid #d0d8e0;
    border-radius: 10px;
    margin-bottom: .75rem;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(15,25,35,.06);
}

.hc-url-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1.25rem;
    cursor: pointer;
    background: #ffffff;
    border: none;
    width: 100%;
    text-align: left;
    transition: background .15s;
}

.hc-url-head:hover         { background: #f4f6f8; }
.hc-url-head:focus-visible { outline: 3px solid #005fa3; outline-offset: -3px; }

.hc-url-status-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.hc-url-status-dot.ok   { background: #1a6b35; }
.hc-url-status-dot.warn { background: #d97706; }
.hc-url-status-dot.crit { background: #b91c1c; }
.hc-url-status-dot.info { background: #4a5c6e; }

.hc-url-text {
    flex: 1;
    font-size: .875rem;
    font-weight: 600;
    color: #0f1923;
    word-break: break-all;
}

.hc-url-verdict {
    font-size: .78rem;
    font-weight: 700;
    padding: .2rem .6rem;
    border-radius: 999px;
    flex-shrink: 0;
    white-space: nowrap;
}

.hc-url-verdict.ok   { background: #1e6e3a; color: #ffffff; border: 1px solid #155a2e; }
.hc-url-verdict.warn { background: #7a4a00; color: #ffffff; border: 1px solid #5c3700; }
.hc-url-verdict.crit { background: #991515; color: #ffffff; border: 1px solid #7a0f0f; }
.hc-url-verdict.info { background: #1e2d3d; color: #ffffff; border: 1px solid #0f1923; }

.hc-url-chevron {
    width: 20px; height: 20px;
    flex-shrink: 0;
    color: #4a5c6e;
    transition: transform .25s;
}

.hc-url-item.open .hc-url-chevron { transform: rotate(180deg); }

.hc-url-body {
    display: none;
    border-top: 1px solid #d0d8e0;
    padding: 1.25rem;
    background: #f0f4f8;
}

.hc-url-item.open .hc-url-body { display: block; }

/* ── Check items ─────────────────────────────────────────── */
.check-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
    margin-bottom: .75rem;
}

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

.check-item {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .65rem .85rem;
    border-radius: 8px;
    font-size: .875rem;
}

/* WCAG AA compliant — all text/bg combos verified at 4.5:1 minimum */
.check-item.is-ok   { background: #d4edda; border-left: 3px solid #2d7a4f; }
.check-item.is-warn { background: #fff0c2; border-left: 3px solid #7a4a00; }
.check-item.is-crit { background: #fcd9d9; border-left: 3px solid #991515; }
.check-item.is-info { background: #dbeeff; border-left: 3px solid #004f8c; }

.check-icon { flex-shrink: 0; font-size: 1rem; }

.check-body { flex: 1; }

.check-title {
    font-weight: 700;
    color: #0f1923;
    margin: 0 0 .1rem;
    font-size: .875rem;
}

.check-desc {
    color: #0f1923;
    margin: 0;
    font-size: .85rem;
    line-height: 1.5;
}

.check-detail {
    margin-top: .25rem;
    font-size: .8rem;
    color: #1e2d3d !important;
    font-family: monospace;
    word-break: break-all;
}

/* ── Redirect chain ──────────────────────────────────────── */
.redirect-chain {
    margin-top: .5rem;
    padding: .5rem .75rem;
    background: #ffffff;
    border: 1px solid #b0bec8;
    border-radius: 6px;
    font-size: .8rem;
    font-family: monospace;
    color: #0f1923;
    line-height: 1.8;
    word-break: break-all;
}

.redirect-chain .hop     { color: #1e2d3d; }
.redirect-chain .hop-url { color: #004f8c; }
.redirect-chain .hop-final { color: #1a5c2e; font-weight: 700; }

/* ── Overall verdict banner ──────────────────────────────── */
.verdict-banner {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .75rem 1rem;
    border-radius: 8px;
    margin-bottom: .85rem;
    font-size: .9rem;
    font-weight: 700;
}

/* Dark backgrounds with white text — all exceed 4.5:1 */
.verdict-banner.ok   { background: #1e6e3a; color: #ffffff; border: 1px solid #155a2e; }
.verdict-banner.warn { background: #7a4a00; color: #ffffff; border: 1px solid #5c3700; }
.verdict-banner.crit { background: #991515; color: #ffffff; border: 1px solid #7a0f0f; }

/* ── Print ───────────────────────────────────────────────── */
.hc-print-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1.25rem;
    padding: .55rem 1.25rem;
    font-size: .875rem;
    font-weight: 600;
    background: #2d3f52;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
}

.hc-print-btn:hover { background: #1e2d3d; }

/* ── Explainer ───────────────────────────────────────────── */
.hc-explainer {
    border: 1px solid #d0d8e0;
    border-radius: 10px;
    margin-top: 1.5rem;
    background: #ffffff;
    overflow: hidden;
}

.hc-explainer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: .9rem 1.25rem;
    background: #ffffff;
    border: none;
    cursor: pointer;
    font-size: .95rem;
    font-weight: 700;
    color: #0f1923;
    text-align: left;
    transition: background .15s;
}

.hc-explainer-head:hover { background: #f4f6f8; }

.hc-explainer-head svg {
    width: 18px; height: 18px;
    flex-shrink: 0;
    transition: transform .2s;
}

.hc-explainer-head[aria-expanded="true"] svg { transform: rotate(180deg); }

.hc-explainer-body {
    display: none;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid #d0d8e0;
}

.hc-explainer-body h3 {
    font-size: .9rem;
    font-weight: 700;
    margin: 1rem 0 .25rem;
    color: #0f1923;
}

.hc-explainer-body h3:first-child { margin-top: 0; }

.hc-explainer-body p {
    font-size: .875rem;
    margin: 0 0 .25rem;
    line-height: 1.5;
    color: #0f1923;
}

/* ── Disclaimer ──────────────────────────────────────────── */
.hc-disclaimer {
    margin-top: 1.5rem;
    padding: .9rem 1.1rem;
    background: #e0f0fb;
    border: 1px solid #90cff0;
    border-radius: 10px;
    font-size: .8rem;
    color: #0c4e7a;
    line-height: 1.5;
}

.hc-disclaimer p { color: #0c4e7a; margin: 4px 0; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 560px) {
    .hc-input-row  { flex-direction: column; }
    .hc-run-btn    { width: 100%; }
    .hc-url-text   { font-size: .8rem; }
}

@media print {
    nav, header, footer, .hc-run-btn, .hc-print-btn,
    .hc-disclaimer, .hc-hint, .hc-url-chevron,
    .hc-mode-toggle, textarea { display: none !important; }
    .hc-url-body { display: block !important; }
    .hc-url-item { box-shadow: none; border: 1px solid #ccc; margin-bottom: .5rem; }
    .hc-summary-bar { background: #2d3f52 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    body { font-size: 11pt; }
}

.check-item.is-ok .check-title,
.check-item.is-ok .check-desc   { color: #0f1923; }

.check-item.is-warn .check-title,
.check-item.is-warn .check-desc { color: #0f1923; }

.check-item.is-crit .check-title,
.check-item.is-crit .check-desc { color: #0f1923; }

.check-item.is-info .check-title,
.check-item.is-info .check-desc { color: #0f1923; }

.hc-progress-title { color: #1e2d3d; }
.hc-progress-status { color: #1e2d3d; }

.hc-progress { color: #1e2d3d; }

div#hc-progress p,
#hc-progress-title,
#hc-progress-status { color: #1e2d3d !important; }
.hc-explainer-body { color: #1e2d3d !important; }