@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap");

:root {
    --bg: #090b0e;
    --bg-elevated: #11161c;
    --bg-panel: #141a22;
    --bg-soft: #1b2330;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(98, 204, 255, 0.28);
    --text-primary: #f4f7fb;
    --text-secondary: #9ca9b8;
    --text-muted: #6f7b8a;
    --accent: #63cfff;
    --accent-strong: #3fa7ff;
    --success: #4de0a8;
    --warning: #ffb857;
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "IBM Plex Sans", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(91, 205, 255, 0.12), transparent 34%),
        radial-gradient(circle at top right, rgba(140, 111, 255, 0.1), transparent 28%),
        linear-gradient(180deg, #0a0d12 0%, #090b0e 100%);
    color: var(--text-primary);
}

body.drawer-open {
    overflow: hidden;
}

a {
    color: inherit;
}

.site-shell {
    width: min(1500px, calc(100vw - 40px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.hero {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
        var(--bg-elevated);
    box-shadow: var(--shadow);
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(99, 207, 255, 0.08);
    border: 1px solid rgba(99, 207, 255, 0.16);
    color: var(--accent);
    font-size: 0.83rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1,
.section-heading h2 {
    margin: 16px 0 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.3rem, 4vw, 4.1rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.hero-subtitle {
    margin: 16px 0 0;
    max-width: 640px;
    color: var(--text-secondary);
    font-size: 1.03rem;
    line-height: 1.7;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 14px;
    min-width: 340px;
}

.stat-pill {
    position: relative;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
}

.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 10px;
    border-radius: 12px;
    background: rgba(99, 207, 255, 0.08);
    color: var(--accent);
}

.stat-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pill-value {
    display: block;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.pill-label {
    display: block;
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.top-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
    margin-bottom: 22px;
}

.nav-link {
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: 160ms ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    border-color: var(--border-strong);
    background: rgba(99, 207, 255, 0.08);
}

.content-stack {
    display: grid;
    gap: 22px;
}

.panel {
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-panel);
    box-shadow: var(--shadow);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 22px;
}

.section-heading h2 {
    font-size: 2rem;
}

.section-heading p,
.results-meta {
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 0.96rem;
}

.dataset-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.dataset-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dataset-tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.93rem;
    font-weight: 700;
    cursor: pointer;
    transition: 160ms ease;
}

.dataset-tab.active,
.dataset-tab:hover {
    border-color: var(--border-strong);
    background: rgba(99, 207, 255, 0.08);
    color: var(--text-primary);
}

.dataset-tab-count {
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-size: 0.82rem;
}

.dataset-caption {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.preset-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.preset-label {
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preset-chip {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: 160ms ease;
}

.preset-chip.active,
.preset-chip:hover {
    border-color: var(--border-strong);
    background: rgba(99, 207, 255, 0.1);
    color: var(--text-primary);
}

.control-grid {
    display: grid;
    grid-template-columns: minmax(240px, 2fr) repeat(5, minmax(150px, 1fr)) 112px;
    gap: 12px;
    margin-bottom: 18px;
}

.control {
    display: grid;
    gap: 8px;
}

.control-label {
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.control-field {
    position: relative;
    display: flex;
    align-items: center;
}

.control-field > .control-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.control-field > .control-icon svg {
    display: block;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    min-height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.control-field > .control-icon svg * {
    vector-effect: non-scaling-stroke;
}

.control input,
.control select,
.pager-size,
.control-reset {
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-soft);
    color: var(--text-primary);
    font: inherit;
}

.control input,
.control select {
    padding-left: 40px;
    line-height: 1;
}

.control select {
    padding-right: 34px;
}

.control input::placeholder {
    color: var(--text-muted);
}

.control input:focus,
.control select:focus,
.pager-size:focus,
.control-reset:focus {
    outline: none;
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 3px rgba(63, 167, 255, 0.16);
}

.control-reset {
    align-self: end;
    background: transparent;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 160ms ease;
}

.control-reset svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.control-reset:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.history-note {
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 184, 87, 0.22);
    border-radius: 12px;
    background: rgba(255, 184, 87, 0.08);
    color: #ffd79a;
    font-size: 0.92rem;
    line-height: 1.5;
}

.pagination-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #0f141b;
}

.copy-toolbar {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-right: auto;
}

.copy-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.copy-toggle input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--accent-strong);
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(99, 207, 255, 0.08);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: 160ms ease;
}

.copy-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.copy-btn:hover {
    border-color: var(--border-strong);
    background: rgba(99, 207, 255, 0.14);
    color: #dff6ff;
}

.copy-btn:focus {
    outline: none;
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 3px rgba(63, 167, 255, 0.16);
}

.export-toolbar {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: 160ms ease;
}

.action-btn svg {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    flex: 0 0 16px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.share-btn {
    background: rgba(63, 167, 255, 0.08);
}

.share-btn:hover {
    border-color: rgba(99, 207, 255, 0.36);
    background: rgba(63, 167, 255, 0.14);
    color: #dff6ff;
}

.export-btn {
    background: rgba(106, 227, 168, 0.08);
}

.export-btn:hover {
    border-color: rgba(106, 227, 168, 0.34);
    background: rgba(106, 227, 168, 0.14);
    color: #e9fff4;
}

.action-btn:focus {
    outline: none;
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 3px rgba(63, 167, 255, 0.16);
}

.action-btn:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.pagination-bottom {
    margin-top: 14px;
    margin-bottom: 0;
}

.pager-btn {
    min-width: 118px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: 160ms ease;
}

.pager-btn:hover:not(:disabled) {
    border-color: var(--border-strong);
    color: var(--accent);
}

.pager-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pager-info {
    min-width: 210px;
    text-align: center;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pager-size-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.pager-size {
    width: 92px;
}

.table-shell {
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 20px;
}

.repos-table {
    width: 100%;
    min-width: 1380px;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.01);
}

.repos-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 18px 16px;
    border-bottom: 1px solid var(--border);
    background: #10151d;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
}

.repos-table tbody td {
    padding: 18px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    font-size: 0.96rem;
}

.repos-table tbody tr:hover {
    background: rgba(99, 207, 255, 0.04);
}

.repo-row {
    cursor: pointer;
}

.repo-row:focus-visible {
    outline: 2px solid rgba(99, 207, 255, 0.6);
    outline-offset: -2px;
}

.repos-table tbody tr:last-child td {
    border-bottom: none;
}

.col-num {
    width: 70px;
    color: var(--text-secondary);
}

.col-stars,
.col-forks,
.col-date {
    width: 110px;
    white-space: nowrap;
}

.col-growth {
    width: 116px;
}

.col-category {
    width: 170px;
}

.col-repo {
    width: 240px;
}

.col-desc {
    min-width: 320px;
}

.repo-primary {
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.repo-link {
    display: inline-block;
    color: var(--text-primary);
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.repo-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.repo-open-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-secondary);
    transition: 160ms ease;
}

.repo-open-link svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.repo-open-link:hover {
    color: var(--accent);
    border-color: var(--border-strong);
}

.repo-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.desc-text {
    max-width: 480px;
    color: var(--text-secondary);
    line-height: 1.55;
}

.badge,
.language-pill,
.topic-pill,
.activity-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.language-pill {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.topic-pill {
    background: rgba(99, 207, 255, 0.08);
    color: #a4e5ff;
}

.activity-pill {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.activity-hot {
    background: rgba(77, 224, 168, 0.18);
    color: #a4f2d0;
}

.activity-active {
    background: rgba(99, 207, 255, 0.14);
    color: #bae9ff;
}

.activity-steady {
    background: rgba(255, 184, 87, 0.14);
    color: #ffd9a2;
}

.activity-quiet {
    background: rgba(255, 255, 255, 0.06);
    color: #b9c4d0;
}

.growth-stack {
    display: grid;
    gap: 4px;
}

.growth-main {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1rem;
    font-weight: 700;
}

.growth-sub {
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.growth-stack.positive .growth-main {
    color: var(--success);
}

.growth-stack.negative .growth-main {
    color: #ff8799;
}

.growth-empty {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.tone-applications {
    background: rgba(156, 95, 255, 0.22);
    color: #d7bdff;
}

.tone-ai-engineering {
    background: rgba(90, 106, 255, 0.24);
    color: #ccd3ff;
}

.tone-agents {
    background: rgba(56, 208, 166, 0.18);
    color: #93f0d4;
}

.tone-models {
    background: rgba(255, 142, 76, 0.2);
    color: #ffd0aa;
}

.tone-vision {
    background: rgba(255, 92, 136, 0.2);
    color: #ffc1d3;
}

.tone-data {
    background: rgba(84, 182, 255, 0.2);
    color: #c5ebff;
}

.tone-devtools {
    background: rgba(132, 144, 163, 0.22);
    color: #dbe2ed;
}

.tone-infra {
    background: rgba(255, 188, 66, 0.2);
    color: #ffe0a3;
}

.tone-research {
    background: rgba(120, 110, 255, 0.2);
    color: #d1cbff;
}

.tone-other {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.empty-state {
    padding: 42px 20px !important;
    color: var(--text-secondary);
    text-align: center;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.category-card {
    display: grid;
    gap: 8px;
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #10151d;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: 160ms ease;
}

.category-card:hover,
.category-card.active {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
}

.category-card-name {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
}

.category-card-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: transparent;
    backdrop-filter: none;
}

.repo-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 31;
    display: flex;
    flex-direction: column;
    width: min(720px, 100vw);
    height: 100vh;
    padding: 24px;
    border-left: 1px solid var(--border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
        #0d1218;
    box-shadow: -24px 0 80px rgba(0, 0, 0, 0.4);
    transform: translateX(104%);
    transition: transform 220ms ease;
}

.repo-drawer.open {
    transform: translateX(0);
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 28;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(99, 207, 255, 0.26);
    border-radius: 999px;
    background: rgba(15, 20, 27, 0.9);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease, border-color 160ms ease, background 160ms ease;
}

.back-to-top svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    border-color: var(--border-strong);
    background: rgba(19, 27, 37, 0.96);
}

.back-to-top:focus {
    outline: none;
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 3px rgba(63, 167, 255, 0.16), 0 18px 45px rgba(0, 0, 0, 0.28);
}

.drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.drawer-overline {
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.drawer-title {
    margin: 10px 0 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.6rem;
}

.drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: 160ms ease;
}

.drawer-close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.drawer-close:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.drawer-body {
    flex: 1;
    overflow: auto;
    padding-top: 22px;
}

.drawer-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.drawer-owner {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.drawer-hero h4 {
    margin: 10px 0 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: 2rem;
    line-height: 1;
}

.drawer-description {
    margin: 14px 0 0;
    max-width: 520px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.drawer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.drawer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: flex-start;
}

.drawer-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: transparent;
    color: var(--text-primary);
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: 160ms ease;
}

.drawer-action.primary,
.drawer-action:hover {
    border-color: var(--border-strong);
    background: rgba(99, 207, 255, 0.08);
}

.drawer-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.drawer-metric {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.drawer-metric-label {
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 600;
}

.drawer-metric strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.1rem;
}

.drawer-section-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.drawer-section {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.drawer-section h5 {
    margin: 0 0 16px;
    font-size: 1rem;
}

.drawer-meta-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.drawer-meta-list div {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 14px;
}

.drawer-meta-list dt {
    color: var(--text-secondary);
    font-weight: 600;
}

.drawer-meta-list dd {
    margin: 0;
    word-break: break-word;
}

.drawer-meta-list a {
    color: var(--accent);
    text-decoration: none;
}

.drawer-meta-list a:hover {
    text-decoration: underline;
}

.drawer-readme-wrap {
    display: grid;
    gap: 10px;
}

.drawer-readme-path {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.drawer-readme {
    margin: 0;
    max-height: 360px;
    overflow: auto;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #0a0f14;
    color: var(--text-secondary);
    font: inherit;
    font-size: 0.93rem;
    line-height: 1.65;
    white-space: pre-wrap;
}

.drawer-muted {
    color: var(--text-muted);
}

.footer {
    margin-top: 22px;
    padding: 28px 12px 0;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    text-align: center;
    font-size: 1rem;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

@media (max-width: 1080px) {
    .site-shell {
        width: min(100vw - 28px, 1500px);
    }

    .hero {
        flex-direction: column;
    }

    .hero-stats {
        min-width: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .control-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .drawer-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .site-shell {
        width: calc(100vw - 20px);
        padding-top: 20px;
    }

    .hero,
    .panel {
        padding: 20px;
    }

    .hero-stats,
    .control-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .pagination-bar {
        justify-content: center;
    }

    .copy-toolbar {
        width: 100%;
        justify-content: flex-start;
        margin-right: 0;
    }

    .export-toolbar {
        width: 100%;
    }

    .pager-btn,
    .pager-info,
    .pager-size-wrap,
    .copy-btn {
        width: 100%;
    }

    .action-btn {
        flex: 1 1 calc(33.333% - 7px);
    }

    .pager-info {
        order: -1;
    }

    .dataset-tabs,
    .preset-chips {
        width: 100%;
    }

    .dataset-tab {
        justify-content: space-between;
        width: 100%;
    }

    .repo-drawer {
        width: 100vw;
        padding: 18px;
    }

    .back-to-top {
        right: 14px;
        bottom: 14px;
    }

    .drawer-metric-grid {
        grid-template-columns: 1fr;
    }

    .drawer-meta-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}
