:root {
    --navy-950: #071a2f; --navy-900: #0b2542; --navy-800: #12395f;
    --blue-700: #155eef; --blue-600: #2970ff; --blue-100: #dbeafe; --blue-50: #eff6ff;
    --slate-950: #101828; --slate-700: #344054; --slate-600: #475467; --slate-500: #667085;
    --slate-300: #d0d5dd; --slate-200: #e4e7ec; --slate-100: #f2f4f7; --slate-50: #f8fafc;
    --white: #fff; --teal: #0e9384; --gold: #dc6803; --danger: #d92d20; --success: #067647;
    --shadow-sm: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
    --shadow-lg: 0 18px 45px rgba(8,31,56,.12); --radius-sm: 8px; --radius-md: 12px; --radius-lg: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; min-width: 320px; min-height: 100vh; color: var(--slate-950);
    background: radial-gradient(circle at 12% 4%, rgba(41,112,255,.08), transparent 28rem), var(--slate-50);
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(41,112,255,.32); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 14px; color: var(--white); background: var(--navy-950); border-radius: var(--radius-sm); transform: translateY(-150%); transition: transform .2s ease; }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.app-shell { width: min(1480px, 100%); margin: 0 auto; padding: 24px; }

.hero {
    position: relative; overflow: hidden; min-height: 360px; padding: 24px clamp(24px,5vw,72px) 42px; color: var(--white);
    background: linear-gradient(120deg, rgba(7,26,47,.98), rgba(11,54,91,.95)), var(--navy-950);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.hero::before, .hero::after { content: ""; position: absolute; pointer-events: none; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.hero::before { width: 520px; height: 520px; right: -160px; top: -280px; }
.hero::after { width: 300px; height: 300px; right: 30px; top: -155px; }
.topbar { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; color: #7fb0ff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; }
.brand-mark svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .01em; }
.brand small { color: rgba(255,255,255,.62); font-size: 12px; }
.source-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; color: rgba(255,255,255,.8); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; font-size: 12px; font-weight: 600; }
.source-pill i { width: 7px; height: 7px; background: #47cd89; border-radius: 50%; box-shadow: 0 0 0 4px rgba(71,205,137,.12); }
.hero-content { position: relative; z-index: 1; max-width: 740px; margin: 54px auto 30px; text-align: center; }
.eyebrow, .section-label { margin: 0 0 8px; color: #84adff; font-size: 12px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(34px,4.6vw,58px); line-height: 1.08; letter-spacing: -.045em; }
.hero-copy { max-width: 620px; margin: 18px auto 0; color: rgba(255,255,255,.7); font-size: clamp(15px,2vw,18px); }
.search-panel { position: relative; z-index: 2; display: flex; align-items: center; width: min(780px,100%); margin: 0 auto; color: var(--slate-600); background: var(--white); border: 1px solid rgba(255,255,255,.7); border-radius: 14px; box-shadow: 0 16px 36px rgba(2,15,29,.28); }
.search-icon { flex: 0 0 auto; width: 22px; height: 22px; margin-left: 18px; color: var(--slate-500); }
.search-panel input { min-width: 0; flex: 1; height: 58px; padding: 0 14px; color: var(--slate-950); background: transparent; border: 0; outline: 0; font-size: 16px; }
.search-panel input::placeholder { color: #98a2b3; }
.search-panel kbd { flex: 0 0 auto; margin-right: 14px; padding: 4px 8px; color: var(--slate-500); background: var(--slate-100); border: 1px solid var(--slate-200); border-bottom-width: 2px; border-radius: 6px; font-family: inherit; font-size: 11px; }
.clear-button { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; margin-right: 12px; padding: 0; color: var(--slate-500); background: var(--slate-100); border: 0; border-radius: 50%; }
.clear-button:hover { color: var(--navy-900); background: var(--slate-200); }
.clear-button svg { width: 17px; height: 17px; }
.search-hint { position: relative; z-index: 1; margin: 14px 0 0; color: rgba(255,255,255,.5); text-align: center; font-size: 12px; }
.search-hint strong { color: rgba(255,255,255,.75); font-weight: 600; }

.metrics { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; width: min(980px,calc(100% - 48px)); margin: -22px auto 30px; }
.metric-card { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 18px; background: rgba(255,255,255,.96); border: 1px solid var(--slate-200); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); backdrop-filter: blur(8px); }
.metric-icon { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 10px; }
.metric-icon svg { width: 22px; height: 22px; }
.metric-icon--blue { color: var(--blue-700); background: var(--blue-50); }
.metric-icon--teal { color: var(--teal); background: #f0fdfa; }
.metric-icon--gold { color: var(--gold); background: #fffaeb; }
.metric-card strong, .metric-card span { display: block; }
.metric-card div { min-width: 0; }
.metric-card strong { font-size: 22px; line-height: 1.2; letter-spacing: -.03em; }
.metric-card div > span { overflow: hidden; margin-top: 2px; color: var(--slate-500); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.catalog-card { overflow: hidden; background: var(--white); border: 1px solid var(--slate-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 30px 22px; }
.catalog-toolbar h2 { margin: 0; font-size: 24px; line-height: 1.25; letter-spacing: -.025em; }
.catalog-toolbar .section-label { color: var(--blue-700); }
.result-count { margin: 5px 0 0; color: var(--slate-500); font-size: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; transition: border-color .15s, background .15s, transform .15s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button svg { width: 17px; height: 17px; }
.button--secondary { color: var(--slate-700); background: var(--white); border: 1px solid var(--slate-300); box-shadow: var(--shadow-sm); }
.button--secondary:hover:not(:disabled) { background: var(--slate-50); }
.button--primary { color: var(--white); background: var(--blue-700); border: 1px solid var(--blue-700); }
.filters { display: flex; align-items: end; gap: 12px; padding: 18px 30px; background: var(--slate-50); border-top: 1px solid var(--slate-200); border-bottom: 1px solid var(--slate-200); }
.filters label { display: grid; gap: 6px; min-width: 0; }
.filters label:nth-child(2) { flex: 1; max-width: 360px; }
.filters label > span { color: var(--slate-700); font-size: 11px; font-weight: 700; letter-spacing: .025em; }
.filters select { width: 100%; height: 40px; max-width: 100%; padding: 0 34px 0 11px; color: var(--slate-700); background: var(--white); border: 1px solid var(--slate-300); border-radius: var(--radius-sm); font-size: 13px; }
.text-button { min-height: 40px; padding: 0 8px; color: var(--blue-700); background: transparent; border: 0; font-size: 13px; font-weight: 600; }
.text-button:hover { text-decoration: underline; }

.table-region { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { padding: 12px 14px; color: var(--slate-500); background: var(--white); border-bottom: 1px solid var(--slate-200); text-align: left; font-size: 10px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
th:nth-child(1) { width: 18%; } th:nth-child(2) { width: 26%; } th:nth-child(3) { width: 11%; }
th:nth-child(4) { width: 20%; } th:nth-child(5) { width: 19%; } th:nth-child(6) { width: 6%; }
.sort-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; color: inherit; background: transparent; border: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.sort-button:hover, .sort-button[aria-sort] { color: var(--blue-700); }
.sort-button span { font-size: 13px; }
td { overflow: hidden; padding: 16px 14px; color: var(--slate-600); border-bottom: 1px solid var(--slate-100); font-size: 12px; text-overflow: ellipsis; vertical-align: middle; }
tbody tr { transition: background .14s; }
tbody tr:hover { background: #f9fbff; }
tbody tr:last-child td { border-bottom: 0; }
.series-code { display: inline-block; max-width: 100%; overflow: hidden; color: var(--blue-700); font-family: "Cascadia Code","SFMono-Regular",Consolas,monospace; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.series-name { color: var(--slate-950); font-weight: 550; }
.cell-text { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.frequency-badge { display: inline-flex; max-width: 100%; padding: 4px 8px; overflow: hidden; color: var(--navy-800); background: #eef4ff; border-radius: 999px; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.copy-button { display: grid; place-items: center; width: 32px; height: 32px; margin-left: auto; padding: 0; color: var(--slate-500); background: transparent; border: 1px solid transparent; border-radius: 7px; }
.copy-button:hover { color: var(--blue-700); background: var(--blue-50); border-color: var(--blue-100); }
.copy-button svg { width: 17px; height: 17px; }

.state-panel { display: flex; min-height: 330px; padding: 54px 24px; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.state-panel strong { margin-top: 12px; color: var(--slate-950); font-size: 16px; }
.state-panel p { max-width: 440px; margin: 5px 0 16px; color: var(--slate-500); font-size: 13px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--blue-100); border-top-color: var(--blue-700); border-radius: 50%; animation: spin .75s linear infinite; }
.state-symbol { display: grid; place-items: center; width: 42px; height: 42px; color: var(--danger); background: #fef3f2; border-radius: 50%; font-size: 20px; font-weight: 700; }
.state-symbol--search { color: var(--slate-500); background: var(--slate-100); }
.state-symbol svg { width: 22px; height: 22px; }
@keyframes spin { to { transform: rotate(360deg); } }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 66px; padding: 13px 30px; border-top: 1px solid var(--slate-200); }
.pagination p { margin: 0; color: var(--slate-500); font-size: 12px; }
.pagination > div { display: flex; align-items: center; gap: 10px; }
#pageIndicator { min-width: 90px; color: var(--slate-700); text-align: center; font-size: 12px; font-weight: 600; }
.page-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: var(--slate-600); background: var(--white); border: 1px solid var(--slate-300); border-radius: 8px; }
.page-button:hover:not(:disabled) { color: var(--blue-700); background: var(--blue-50); }
.page-button:disabled { cursor: not-allowed; opacity: .4; }
.page-button svg { width: 17px; height: 17px; }
.footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px 8px 8px; color: var(--slate-500); font-size: 11px; }
.footer p { margin: 0; } .footer strong { color: var(--slate-700); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; display: flex; align-items: center; gap: 10px; max-width: min(400px,calc(100vw - 32px)); padding: 12px 16px; color: var(--white); background: var(--navy-950); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; box-shadow: 0 18px 36px rgba(7,26,47,.25); font-size: 13px; font-weight: 600; opacity: 0; pointer-events: none; transform: translateY(18px); transition: opacity .22s, transform .22s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-check { display: grid; place-items: center; width: 20px; height: 20px; color: #d1fadf; background: var(--success); border-radius: 50%; font-size: 12px; }

@media (max-width: 1000px) {
    .app-shell { padding: 16px; } .hero { border-radius: 16px; }
    th:nth-child(4), td:nth-child(4) { display: none; }
    th:nth-child(1) { width: 23%; } th:nth-child(2) { width: 31%; } th:nth-child(3) { width: 14%; } th:nth-child(5) { width: 25%; } th:nth-child(6) { width: 7%; }
}
@media (max-width: 720px) {
    .app-shell { padding: 0; }
    .hero { min-height: 390px; padding: 20px 18px 40px; border-radius: 0 0 20px 20px; }
    .source-pill { display: none; } .hero-content { margin-top: 48px; } .hero h1 { font-size: 38px; } .hero-copy { font-size: 15px; } .search-panel kbd { display: none; }
    .metrics { gap: 8px; width: calc(100% - 28px); margin-bottom: 18px; }
    .metric-card { display: block; padding: 12px; text-align: center; }
    .metric-icon { width: 36px; height: 36px; margin: 0 auto 8px; }
    .metric-card strong { font-size: 18px; } .metric-card div > span { font-size: 10px; }
    .catalog-card { margin: 0 12px; border-radius: 14px; }
    .catalog-toolbar { align-items: flex-start; padding: 22px 18px 18px; } .catalog-toolbar h2 { font-size: 20px; }
    .button--secondary { width: 40px; padding: 0; font-size: 0; }
    .filters { display: grid; grid-template-columns: 1fr 1fr; padding: 14px 18px; }
    .filters label:nth-child(2) { grid-column: 1 / -1; grid-row: 1; max-width: none; }
    .filters label:nth-child(3) { display: none; } .text-button { justify-self: start; }
    table, tbody { display: block; } thead { display: none; } tbody { padding: 6px 14px; }
    tbody tr { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; padding: 16px 38px 16px 2px; border-bottom: 1px solid var(--slate-200); }
    tbody tr:last-child { border-bottom: 0; }
    td { display: block !important; grid-column: 1 / -1; padding: 0; border: 0; overflow: visible; }
    td:nth-child(1) { grid-row: 2; grid-column: 1; } td:nth-child(2) { grid-row: 1; } td:nth-child(3) { grid-row: 2; grid-column: 2; }
    td:nth-child(4), td:nth-child(5) { display: none !important; }
    td:nth-child(6) { position: absolute; top: 50%; right: 0; transform: translateY(-50%); }
    .series-name { font-size: 13px; }
    .pagination { padding: 13px 18px; } .pagination p { display: none; } .pagination > div { width: 100%; justify-content: space-between; }
    .footer { display: block; padding: 18px 20px 24px; text-align: center; } .footer p + p { margin-top: 5px; }
    .toast { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
