/* /check hub — landing redesign 2026-04-20.
   Uses design tokens from main.css (--accent, --surface, --border, etc). */

.check-hub {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 0 64px;
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.check-hub__hero {
    padding: 56px 32px 40px;
    margin: 16px 0 40px;
    background: linear-gradient(180deg, var(--surface2) 0%, transparent 100%);
    border-radius: 16px;
    text-align: center;
}
.check-hub__title {
    font-size: clamp(1.8rem, 3vw + 1rem, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0 0 12px;
}
.check-hub__subtitle {
    font-size: 1rem;
    color: var(--muted2);
    max-width: 600px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

/* ── Search ───────────────────────────────────────────────────────── */
.check-hub__search {
    max-width: 560px;
    margin: 0 auto 32px;
}
.check-hub__form {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.check-hub__form input[type="text"] {
    flex: 1;
    padding: 14px 18px;
    font-size: 16px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border2);
    color: var(--text);
}
.check-hub__form input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    outline: none;
}
.check-hub__submit {
    padding: 14px 24px !important;
    font-size: 15px !important;
    white-space: nowrap;
}

/* ── Stats strip ──────────────────────────────────────────────────── */
.check-hub__stats {
    display: flex;
    justify-content: center;
    gap: 36px;
    flex-wrap: wrap;
}
.check-hub__stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}
.check-hub__stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.check-hub__stat-unit {
    font-size: 0.85rem;
    color: var(--muted2);
    margin-left: 2px;
}
.check-hub__stat-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Section spacing ──────────────────────────────────────────────── */
.check-hub__h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 18px;
}
.check-hub__featured,
.check-hub__recent,
.check-hub__top {
    margin-bottom: 40px;
}

/* ── Featured category tiles ──────────────────────────────────────── */
.check-hub__tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}
.check-hub__tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 16px;
    transition: border-color .15s, transform .15s;
}
.check-hub__tile:hover {
    border-color: var(--accent-glow-30, rgba(91, 138, 248, .3));
    transform: translateY(-1px);
}
.check-hub__tile-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.check-hub__tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: linear-gradient(135deg, rgba(91, 138, 248, .18), rgba(124, 96, 245, .14));
    color: var(--accent);
    flex: 0 0 36px;
}
.check-hub__tile-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}
.check-hub__tile-label {
    font-weight: 700;
    color: var(--text);
    font-size: 0.95rem;
    flex: 1;
}
.check-hub__tile-label--link {
    text-decoration: none;
    transition: color .15s;
}
.check-hub__tile-label--link:hover {
    color: var(--accent);
}
.check-hub__tile-count {
    font-size: 0.72rem;
    color: var(--muted);
    background: var(--surface2);
    padding: 2px 7px;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
}
.check-hub__tile-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.check-hub__tile-link {
    display: block;
    padding: 6px 8px;
    margin-left: -8px;
    color: var(--text);
    font-size: 13px;
    text-decoration: none;
    border-radius: 6px;
    font-family: var(--mono, monospace);
    transition: background .12s, color .12s;
}
.check-hub__tile-link:hover {
    background: var(--accent-glow-08, rgba(91, 138, 248, .08));
    color: var(--accent);
}
.check-hub__tile-link--disabled {
    color: var(--muted);
    cursor: default;
}
.check-hub__tile-link--disabled:hover {
    background: transparent;
    color: var(--muted);
}

/* Rich tile rows — domain + favicon + response-time + grade chip. */
.check-hub__tile-rows {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 2px -6px 0;
}
.check-hub__tile-row {
    display: grid;
    grid-template-columns: 22px 1fr auto auto;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 7px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    transition: background .12s, transform .12s;
}
.check-hub__tile-row:hover {
    background: var(--accent-glow-08, rgba(91, 138, 248, .08));
    transform: translateX(2px);
}
.check-hub__tile-row--disabled {
    grid-template-columns: 1fr auto;
    color: var(--muted);
    cursor: default;
    padding-left: 30px;
}
.check-hub__tile-row--disabled:hover {
    background: transparent;
    transform: none;
}
.check-hub__tile-fav {
    position: relative;
    width: 22px;
    height: 22px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.check-hub__tile-fav.is-letter {
    background: hsl(var(--hue, 220), 35%, 22%);
}
.check-hub__tile-fav img {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: block;
}
.check-hub__tile-letter {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    font: 600 12px/1 var(--sans, system-ui);
    color: hsl(var(--hue, 220), 80%, 78%);
}
.check-hub__tile-fav.is-letter .check-hub__tile-letter {
    display: flex;
}
.check-hub__tile-dom {
    font-family: var(--mono, monospace);
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.check-hub__tile-rt {
    font: 500 11px/1 var(--mono, monospace);
    color: var(--muted);
    white-space: nowrap;
}
.check-hub__tile-muted {
    color: var(--muted);
    font-size: 11px;
    font-style: italic;
}
.check-hub__tile-grade {
    font: 700 11px/1 var(--mono, monospace);
    padding: 3px 7px;
    border-radius: 5px;
    min-width: 28px;
    text-align: center;
}
.check-hub__tile-grade--ok    { background: rgba(52,211,153,.15);  color: var(--green,  #34d399); }
.check-hub__tile-grade--warn  { background: rgba(251,191,36,.15);  color: var(--yellow, #fbbf24); }
.check-hub__tile-grade--err   { background: rgba(248,113,113,.15); color: var(--red,    #f87171); }
.check-hub__tile-grade--muted { background: var(--surface2);        color: var(--muted); }

/* ── FAQ block (hub) ──────────────────────────────────────────────── */
.check-hub__faq {
    margin: 48px 0 28px;
}
.check-hub__faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 820px;
}
.check-hub__faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    transition: border-color .15s;
}
.check-hub__faq-item[open] { border-color: var(--accent); }
.check-hub__faq-q {
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
    list-style: none;
    position: relative;
    padding-right: 24px;
}
.check-hub__faq-q::-webkit-details-marker { display: none; }
.check-hub__faq-q::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 0;
    color: var(--muted);
    font-weight: 400;
    font-size: 18px;
    transition: transform .15s;
}
.check-hub__faq-item[open] .check-hub__faq-q::after { content: '−'; }
.check-hub__faq-a {
    margin-top: 10px;
    color: var(--muted2);
    font-size: 14px;
    line-height: 1.65;
}

/* ── Trust grid (hub bottom) ──────────────────────────────────────── */
.check-hub__trust {
    margin: 28px 0 12px;
}
.check-hub__trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}
.check-hub__trust-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
}
.check-hub__trust-item h3 { margin: 0 0 8px; font-size: 14px; color: var(--accent); }
.check-hub__trust-item p  { margin: 0; color: var(--muted2); font-size: 13px; line-height: 1.6; }

/* ── Category page: "Other categories" cross-link grid ───────────── */
.check-cat__related {
    margin: 48px 0 28px;
}
.check-cat__related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.check-cat__related-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background .15s, border-color .15s, transform .15s;
}
.check-cat__related-card:hover {
    background: var(--accent-glow-08, rgba(91, 138, 248, .08));
    border-color: var(--accent);
    transform: translateY(-1px);
}
.check-cat__related-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.check-cat__related-arrow {
    color: var(--muted);
    font-size: 16px;
    flex-shrink: 0;
    transition: color .15s, transform .15s;
}
.check-cat__related-card:hover .check-cat__related-arrow {
    color: var(--accent);
    transform: translateX(3px);
}
.check-cat__back {
    margin-top: 24px;
    text-align: center;
}
.check-cat__back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--surface2);
    border: 1px solid var(--border2);
    border-radius: 8px;
    color: var(--muted2);
    text-decoration: none;
    font-size: 14px;
    transition: color .15s, border-color .15s;
}
.check-cat__back-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

@media (max-width: 600px) {
    .check-cat__related-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .check-cat__related-card { padding: 10px 12px; font-size: 13px; }
}

/* ── Recently checked list ────────────────────────────────────────── */
.check-hub__recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.check-hub__recent-item {
    border-bottom: 1px solid var(--border);
}
.check-hub__recent-item:last-child { border-bottom: none; }
.check-hub__recent-item a {
    display: grid;
    grid-template-columns: 52px 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    transition: background .12s;
}
.check-hub__recent-item a:hover {
    background: var(--accent-glow-04, rgba(91, 138, 248, .04));
}
.check-hub__recent-status {
    font-family: var(--mono, monospace);
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    padding: 3px 0;
    border-radius: 6px;
}
.check-hub__recent-status--ok {
    background: rgba(52, 211, 153, .12);
    color: var(--green, #34d399);
}
.check-hub__recent-status--err {
    background: rgba(248, 113, 113, .12);
    color: var(--red, #f87171);
}
.check-hub__recent-domain {
    font-family: var(--mono, monospace);
    font-size: 14px;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.check-hub__recent-rt {
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    color: var(--muted2);
}
.check-hub__recent-ago {
    font-size: 12px;
    color: var(--muted);
    min-width: 80px;
    text-align: right;
}

/* ── Most-checked grid (existing, visual refresh) ─────────────────── */
.check-hub__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}
.check-hub__card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.check-hub__card:hover {
    border-color: var(--accent-glow-30, rgba(91, 138, 248, .3));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--black-20, rgba(0, 0, 0, .2));
}
.check-hub__card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.check-hub__card-icon {
    position: relative;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
/* Tinted fallback only when the real favicon failed to load. */
.check-hub__card-icon.is-letter {
    background: hsl(var(--hue, 220), 35%, 22%);
}
.check-hub__card-fav {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: block;
}
.check-hub__card-letter {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    font: 600 14px/1 var(--sans, system-ui);
    color: hsl(var(--hue, 220), 80%, 78%);
    letter-spacing: 0;
}
.check-hub__card-icon.is-letter .check-hub__card-letter {
    display: flex;
}
.check-hub__card-domain {
    font-family: var(--mono, monospace);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.check-hub__card-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.check-hub__status {
    font-family: var(--mono, monospace);
    font-weight: 700;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 6px;
}
.check-hub__status--ok {
    background: rgba(52, 211, 153, .12);
    color: var(--green, #34d399);
}
.check-hub__status--err {
    background: rgba(248, 113, 113, .12);
    color: var(--red, #f87171);
}
.check-hub__rt {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--muted2);
}
.check-hub__health {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
    margin-left: auto;
}
.check-hub__health--ok   { background: rgba(52, 211, 153, .15); color: var(--green, #34d399); }
.check-hub__health--warn { background: rgba(251, 191, 36, .15); color: var(--yellow, #fbbf24); }
.check-hub__health--err  { background: rgba(248, 113, 113, .15); color: var(--red, #f87171); }
.check-hub__health--muted{ background: var(--surface2); color: var(--muted); }

.check-hub__note {
    margin-top: 20px;
    text-align: center;
    font-size: 13px;
}

/* ── Filter bar (client-side domain search + grade chips) ─────────── */
.check-hub__filter {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0 20px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius, 12px);
}
.check-hub__filter-search {
    flex: 1 1 220px;
    min-width: 180px;
    padding: 9px 12px;
    font: inherit;
    color: var(--text);
    background: var(--surface2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-sm, 8px);
    outline: none;
    transition: border-color .15s, background .15s;
}
.check-hub__filter-search:focus {
    border-color: var(--accent);
    background: var(--bg);
}
.check-hub__filter-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.check-hub__chip {
    padding: 7px 12px;
    font: 500 13px/1 var(--sans, system-ui);
    color: var(--muted2);
    background: var(--surface2);
    border: 1px solid var(--border2);
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    letter-spacing: .01em;
}
.check-hub__chip:hover {
    background: var(--surface);
    color: var(--text);
    border-color: var(--accent);
}
.check-hub__chip.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.check-hub__filter-count {
    margin-left: auto;
    font: 500 12px/1 var(--mono, monospace);
    color: var(--muted);
    white-space: nowrap;
}
.check-hub__sort {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted2);
}
.check-hub__sort-label { white-space: nowrap; }
.check-hub__sort-select {
    padding: 6px 28px 6px 10px;
    font: inherit;
    color: var(--text);
    background: var(--surface2)
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M3 5l3 3 3-3' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>")
        no-repeat right 8px center;
    border: 1px solid var(--border2);
    border-radius: var(--radius-sm, 8px);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    outline: none;
}
.check-hub__sort-select:focus,
.check-hub__sort-select:hover { border-color: var(--accent); }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .check-hub__hero { padding: 36px 18px 28px; }
    .check-hub__stats { gap: 20px; }
    .check-hub__form { flex-direction: column; }
    .check-hub__submit { width: 100%; }
    .check-hub__recent-item a {
        grid-template-columns: 48px 1fr auto;
        gap: 10px;
    }
    .check-hub__recent-ago { grid-column: 2 / -1; text-align: left; min-width: 0; }
    .check-hub__tile-link { font-size: 12px; }
    .check-hub__filter { padding: 10px; }
    .check-hub__filter-count { width: 100%; margin-left: 0; text-align: right; }
    .check-hub__chip { padding: 6px 10px; font-size: 12px; }
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-xs, 4px);
}
