/* === 1. FONT IMPORTS === */
@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500&family=JetBrains+Mono:wght@400;500&display=swap');

/* === 2. DESIGN TOKENS === */
:root {
    /* Colors */
    --color-dark-blue: #010120;
    --color-brand-magenta: #ef2cc1;
    --color-brand-orange: #fc4c02;
    --color-lavender: #bdbbff;
    --color-white: #ffffff;
    --color-black: #000000;

    /* Surfaces */
    --glass-light: rgba(255, 255, 255, 0.12);
    --glass-dark: rgba(0, 0, 0, 0.08);
    --black-40: rgba(0, 0, 0, 0.40);
    --black-8: rgba(0, 0, 0, 0.08);
    --white-60: rgba(255, 255, 255, 0.6);
    --white-40: rgba(255, 255, 255, 0.4);
    --white-30: rgba(255, 255, 255, 0.3);
    --white-12: rgba(255, 255, 255, 0.12);

    /* Borders */
    --border-light: rgba(0, 0, 0, 0.08);
    --border-dark: rgba(255, 255, 255, 0.12);

    /* Shadows */
    --shadow: rgba(1, 1, 32, 0.1) 0px 4px 10px;

    /* Radius */
    --radius-sharp: 4px;
    --radius-comfortable: 8px;

    /* Typography */
    --font-primary: 'Inter Tight', 'The Future', Arial, sans-serif;
    --font-mono: 'JetBrains Mono', 'PP Neue Montreal Mono', monospace;

    /* Spacing (base 8px) */
    --space-1: 1px;
    --space-2: 2px;
    --space-4: 4px;
    --space-8: 8px;
    --space-10: 10px;
    --space-12: 12px;
    --space-16: 16px;
    --space-20: 20px;
    --space-24: 24px;
    --space-32: 32px;
    --space-44: 44px;
    --space-48: 48px;
    --space-80: 80px;
    --space-100: 100px;
    --space-120: 120px;

    /* Container */
    --container-max: 1200px;

    /* Breakpoints (doc only) */
    --bp-mobile: 479px;
    --bp-tablet: 768px;
    --bp-desktop: 992px;
}

/* === 3. RESET & BASE === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    font-size: 16px; /* 16px base */
    font-weight: 400;
    line-height: 1.30;
    letter-spacing: -0.16px;
    background-color: var(--color-white);
    color: var(--color-black);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

/* === 4. TYPOGRAPHY SCALE === */
h1, h2, h3, h4 {
    font-weight: 500;
}

/* Display / Hero — 64px, -1.92px */
h1, .t-display {
    font-size: 64px; /* 64px */
    font-weight: 500;
    line-height: 1.10;
    letter-spacing: -1.92px;
}

/* Section Heading — 40px, -0.8px */
h2, .t-section-heading {
    font-size: 40px; /* 40px */
    font-weight: 500;
    line-height: 1.20;
    letter-spacing: -0.8px;
}

/* Sub-heading — 28px, -0.42px */
h3, .t-sub-heading {
    font-size: 28px; /* 28px */
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.42px;
}

/* Feature Title — 22px, -0.22px */
h4, .t-feature-title {
    font-size: 22px; /* 22px */
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.22px;
}

/* Body Large — 18px, -0.18px */
.t-body-large {
    font-size: 18px; /* 18px */
    font-weight: 400;
    line-height: 1.30;
    letter-spacing: -0.18px;
}

/* Caption — 14px, normal */
.t-caption {
    font-size: 14px; /* 14px */
    font-weight: 400;
    line-height: 1.40;
    letter-spacing: normal;
}

/* Mono Label — 16px, uppercase, 0.08px */
.t-mono-label {
    font-family: var(--font-mono);
    font-size: 16px; /* 16px */
    font-weight: 500;
    line-height: 1.00;
    letter-spacing: 0.08px;
    text-transform: uppercase;
}

/* Mono Small — 11px, uppercase, 0.055px */
.t-mono-small {
    font-family: var(--font-mono);
    font-size: 11px; /* 11px */
    font-weight: 500;
    line-height: 1.40;
    letter-spacing: 0.055px;
    text-transform: uppercase;
}

/* Mono Micro — 10px, uppercase, 0.05px */
.t-mono-micro {
    font-family: var(--font-mono);
    font-size: 10px; /* 10px */
    font-weight: 400;
    line-height: 1.40;
    letter-spacing: 0.05px;
    text-transform: uppercase;
}

/* === 5. COMPONENTS: BUTTONS === */
/* Dark Solid — primary CTA on light surfaces */
.btn-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-dark-blue);
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: 16px; /* 16px */
    font-weight: 500;
    letter-spacing: -0.16px;
    border: none;
    border-radius: var(--radius-sharp);
    padding: var(--space-12) var(--space-24);
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.btn-dark:hover {
    opacity: 0.85;
}

/* Glass on Dark — frosted glass button */
.btn-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--glass-light);
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: 16px; /* 16px */
    font-weight: 500;
    letter-spacing: -0.16px;
    border: none;
    border-radius: var(--radius-sharp);
    padding: var(--space-12) var(--space-24);
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.btn-glass:hover {
    background-color: rgba(255, 255, 255, 0.20);
}

/* Outlined Light — secondary on light surfaces */
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: var(--color-black);
    font-family: var(--font-primary);
    font-size: 16px; /* 16px */
    font-weight: 500;
    letter-spacing: -0.16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sharp);
    padding: var(--space-12) var(--space-24);
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.btn-outline:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* === 6. COMPONENTS: CARD === */
.card {
    background-color: var(--color-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-comfortable);
    box-shadow: var(--shadow);
    padding: var(--space-24);
}

/* === 7. COMPONENTS: BADGE === */
.badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--color-black);
    font-family: var(--font-mono);
    font-size: 16px; /* 16px */
    font-weight: 500;
    letter-spacing: 0.08px;
    text-transform: uppercase;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sharp);
    padding: var(--space-2) var(--space-8);
}

/* === 8. FORM STYLES === */
label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px; /* 11px */
    font-weight: 500;
    letter-spacing: 0.055px;
    text-transform: uppercase;
    margin-bottom: var(--space-8);
    color: var(--color-black);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="search"],
input[type="number"],
input,
textarea,
select {
    display: block;
    width: 100%;
    font-family: var(--font-primary);
    font-size: 16px; /* 16px */
    font-weight: 400;
    letter-spacing: -0.16px;
    color: var(--color-black);
    background-color: var(--color-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sharp);
    padding: var(--space-12) var(--space-16);
    outline: none;
    transition: border-color 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-lavender);
}

input::placeholder,
textarea::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

/* === 9. DARK SECTION UTILITY === */
.section-dark {
    background-color: var(--color-dark-blue);
    color: var(--color-white);
}

.section-dark .badge {
    background-color: var(--white-12);
    border-color: var(--border-dark);
    color: var(--color-white);
}

.section-dark .card {
    background-color: transparent;
    border-color: var(--border-dark);
    box-shadow: none;
}

.section-dark .btn-outline {
    border-color: var(--border-dark);
    color: var(--color-white);
}

.section-dark .btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.section-dark .btn-glass:hover {
    background-color: rgba(255, 255, 255, 0.20);
}

.section-dark label {
    color: var(--color-white);
}

.section-dark input,
.section-dark textarea,
.section-dark select {
    background-color: transparent;
    border-color: var(--border-dark);
    color: var(--color-white);
}

.section-dark input:focus,
.section-dark textarea:focus,
.section-dark select:focus {
    border-color: var(--color-lavender);
}

.section-dark input::placeholder,
.section-dark textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

/* === 10. LAYOUT === */
.container {
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-24);
    padding-right: var(--space-24);
}

/* === 10b. TEXT COLORS === */
/* Light surfaces */
.text-dim { color: rgba(0, 0, 0, 0.7); }
.text-secondary { color: rgba(0, 0, 0, 0.6); }
.text-muted { color: rgba(0, 0, 0, 0.5); }
.text-faint { color: rgba(0, 0, 0, 0.4); }
.text-faded { color: rgba(0, 0, 0, 0.45); }
.text-ghost { color: rgba(0, 0, 0, 0.35); }
.text-ether { color: rgba(0, 0, 0, 0.2); }

/* Dark section */
.text-white-muted { color: var(--white-60); }
.text-white-faint { color: var(--white-40); }
.text-white-ghost { color: var(--white-30); }

/* === 10c. SPACING UTILITIES === */
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-20 { margin-top: var(--space-20); }
.mt-24 { margin-top: var(--space-24); }
.mt-32 { margin-top: var(--space-32); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }
.mb-20 { margin-bottom: var(--space-20); }
.mb-24 { margin-bottom: var(--space-24); }
.mb-32 { margin-bottom: var(--space-32); }
.mb-44 { margin-bottom: var(--space-44); }
.mb-48 { margin-bottom: var(--space-48); }

/* === 10d. SURFACE UTILITIES === */
.bg-subtle { background-color: rgba(0, 0, 0, 0.02); }
.bg-faint { background-color: rgba(0, 0, 0, 0.04); }

/* === 10e. SECTION SPACING === */
.section-py-hero { padding: var(--space-80) 0 var(--space-48); }
.section-py-center { padding: var(--space-80) 0; }
.section-py-hero-lg { padding: var(--space-80) 0 var(--space-100); }
.section-py-100 { padding: var(--space-100) 0; }
.section-pb-100 { padding-bottom: var(--space-100); }
.section-pb-80 { padding-bottom: var(--space-80); }

/* === 10f. INLINE STYLE EXTRACTIONS === */
.u-page-shell {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 var(--space-24);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.u-max-w-400 { max-width: 400px; }
.u-max-w-480 { max-width: 480px; }
.u-max-w-560 { max-width: 560px; }
.u-max-w-600 { max-width: 600px; }
.u-max-w-640 { max-width: 640px; }
.u-max-w-800 { max-width: 800px; }

.u-mx-auto { margin-left: auto; margin-right: auto; }
.u-center { text-align: center; }
.u-block { display: block; }
.u-inline-block { display: inline-block; }
.u-inline-flex-center {
    display: inline-flex;
    align-items: center;
}

.u-flex-col-gap-20 {
    display: flex;
    flex-direction: column;
    gap: var(--space-20);
}

.u-flex-gap-12 {
    display: flex;
    gap: var(--space-12);
}

.u-flex-between-center {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.u-p-16 { padding: var(--space-16); }
.u-p-48 { padding: var(--space-48); }
.u-p-0 { padding: 0; }
.u-py-80 { padding: var(--space-80) 0; }
.u-px-24 { padding-left: var(--space-24); padding-right: var(--space-24); }
.u-py-48-80 { padding-top: var(--space-48); padding-bottom: var(--space-80); }
.u-py-48-px-24 { padding: var(--space-48) var(--space-24); }

.u-body-bg-white { background-color: var(--color-white); }
.u-brand-wordmark {
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 18px;
    letter-spacing: -0.18px;
    text-decoration: none;
    color: var(--color-black);
    display: inline-block;
}

.u-dark-blue { color: var(--color-dark-blue); }
.u-link-lavender {
    color: var(--color-lavender, #6366f1);
    text-decoration: underline;
}

.u-link-no-decoration { text-decoration: none; }
.u-link-dark-blue { color: var(--color-dark-blue); }
.u-link-danger-muted {
    color: #dc2626;
    text-decoration: none;
    opacity: 0.6;
}

.u-border-light {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-comfortable);
}

.u-border-top-light { border-top: 1px solid var(--border-light); }
.u-overflow-hidden { overflow: hidden; }

.u-filter-box { padding: var(--space-20); }
.u-filter-control {
    font-size: 13px;
    padding: 6px 8px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sharp);
    background: var(--color-white);
}

.u-filter-control-multi { min-height: 36px; }
.u-btn-text-13 { font-size: 13px; }

.u-badge-filter {
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.u-badge-filter-exclude {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.u-empty-state {
    text-align: center;
    padding: var(--space-80) 0;
}

.u-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-24);
    border-radius: var(--radius-comfortable);
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.u-empty-text {
    max-width: 400px;
    margin: 0 auto var(--space-32);
}

.u-hero-gradient {
    background: radial-gradient(ellipse 80% 60% at 70% 30%, rgba(189, 187, 255, 0.12) 0%, transparent 60%),
                radial-gradient(ellipse 60% 50% at 30% 60%, rgba(239, 44, 193, 0.05) 0%, transparent 50%),
                radial-gradient(ellipse 50% 40% at 80% 70%, rgba(252, 76, 2, 0.04) 0%, transparent 50%);
}

.u-stat-number {
    font-size: 48px;
    letter-spacing: -1.2px;
}

.u-stat-label {
    font-size: 11px;
    letter-spacing: 0.055px;
}

.u-avatar-40 {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sharp);
    background: var(--color-lavender);
    opacity: 0.3;
}

.u-avatar-24 {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sharp);
    background: var(--color-lavender);
    opacity: 0.3;
}

.u-name-strong {
    font-weight: 500;
    font-size: 16px;
    letter-spacing: -0.16px;
}

.u-badge-10 { font-size: 10px; }
.u-badge-11 { font-size: 11px; }
.u-badge-9 { font-size: 9px; }

.u-badge-category {
    background-color: rgba(189, 187, 255, 0.15);
    color: var(--color-dark-blue);
}

.u-badge-required {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.u-badge-public {
    background-color: rgba(189, 187, 255, 0.15);
    color: var(--color-dark-blue);
}

.u-badge-private {
    background-color: rgba(239, 44, 193, 0.08);
    color: var(--color-brand-magenta);
}

.u-badge-optional {
    background-color: rgba(252, 76, 2, 0.08);
    color: var(--color-brand-orange);
}

.u-install-box {
    background: var(--color-dark-blue);
    border-radius: var(--radius-sharp);
    padding: var(--space-16);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-lavender);
    line-height: 1.6;
    overflow-x: auto;
}

.u-pre-wrap {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.u-config-wrap {
    white-space: pre-wrap;
    line-height: 1.7;
}

.u-card-center {
    text-align: center;
    padding: var(--space-48);
}

.u-rating-value {
    font-size: 32px;
    line-height: 1;
}

.u-card-optional {
    background-color: rgba(252, 76, 2, 0.02);
    border-color: rgba(252, 76, 2, 0.12);
}

.u-install-inline {
    background: var(--color-dark-blue);
    border-radius: var(--radius-sharp);
    padding: var(--space-12) var(--space-16);
}

.u-install-inline code {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-lavender);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
}

.u-code-chip {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: var(--radius-sharp);
}

.u-install-box-scroll {
    max-height: 320px;
    overflow-y: auto;
}

.u-hidden { display: none; }

.u-stack-tool-item {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sharp);
    padding: var(--space-16);
}

.u-btn-outline-small {
    font-size: 13px;
    padding: var(--space-8) var(--space-12);
}

.u-btn-outline-compact {
    font-size: 14px;
    padding: var(--space-8) var(--space-16);
}

.u-btn-danger {
    color: var(--color-brand-magenta);
    border-color: var(--color-brand-magenta);
}

.u-text-brand-magenta {
    color: var(--color-brand-magenta);
    font-size: 14px;
}

.u-btn-full { width: 100%; }

/* === PAGINATION === */
.u-pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 var(--space-10);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.14px;
    color: rgba(0, 0, 0, 0.6);
    background: var(--color-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sharp);
    cursor: pointer;
    transition: all 0.15s ease;
}

.u-pagination-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--color-black);
}

.u-quick-exclude {
    font-size: 11px;
    padding: 3px 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sharp);
    background: var(--color-white);
    cursor: pointer;
    transition: background 0.15s;
}

.u-quick-exclude:hover { background: rgba(0, 0, 0, 0.05); }

.u-footer-padding { padding: var(--space-80) 0 var(--space-48); }
.u-border-top-dark { border-top: 1px solid var(--border-dark); }
.u-pt-24 { padding-top: var(--space-24); }

.u-status-approved { background: rgba(189, 187, 255, 0.2); }
.u-status-rejected { background: rgba(239, 44, 193, 0.08); }
.u-status-pending { background: rgba(0, 0, 0, 0.04); }

.u-flash {
    border: 1px solid var(--border-light);
}

.u-flash-error {
    background: rgba(239, 44, 193, 0.06);
    color: var(--color-brand-magenta);
}

.u-flash-success {
    background: rgba(189, 187, 255, 0.15);
    color: var(--color-dark-blue);
}

.u-flash-default { background: rgba(0, 0, 0, 0.03); }

.u-table {
    width: 100%;
    border-collapse: collapse;
}

.u-table-row-border { border-bottom: 1px solid var(--border-light); }

.u-table-cell {
    padding: var(--space-12) var(--space-16);
    text-align: left;
}

.u-table-cell-right {
    text-align: right;
    white-space: nowrap;
}

.u-table-description {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.u-nav {
    border-bottom: 1px solid var(--border-light);
}

.u-nav-bar { height: 64px; }

.u-nav-logo {
    font-weight: 500;
    font-size: 18px;
    letter-spacing: -0.18px;
}

.u-nav-link { letter-spacing: -0.16px; }

.u-nav-mobile {
    border-top: 1px solid var(--border-light);
    padding: var(--space-16) var(--space-24) var(--space-24);
}

.u-nav-divider {
    border-top: 1px solid var(--border-light);
    margin: var(--space-12) 0;
}

.u-nav-spacer { height: 64px; }

/* === TAG TOGGLE BUTTONS === */
.u-filter-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
    padding: 2px 0;
}

.u-filter-tag {
    font-family: var(--font-primary);
    font-size: 12px;
    letter-spacing: -0.12px;
    padding: 4px 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sharp);
    background: var(--color-white);
    color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    transition: all 0.15s ease;
}

.u-filter-tag:hover {
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--color-black);
    background: rgba(0, 0, 0, 0.02);
}

.u-filter-tag-active {
    font-family: var(--font-primary);
    font-size: 12px;
    letter-spacing: -0.12px;
    padding: 4px 10px;
    border: 1px solid var(--color-lavender);
    border-radius: var(--radius-sharp);
    background: rgba(189, 187, 255, 0.15);
    color: var(--color-dark-blue);
    cursor: pointer;
    transition: all 0.15s ease;
}

.u-filter-tag-active:hover {
    background: rgba(189, 187, 255, 0.25);
}

.u-filter-tag-exclude-active {
    font-family: var(--font-primary);
    font-size: 12px;
    letter-spacing: -0.12px;
    padding: 4px 10px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sharp);
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    cursor: pointer;
    transition: all 0.15s ease;
}

.u-filter-tag-exclude-active:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* === 11. RESPONSIVE === */
/* Tablet: ≤991px — 2-column grids begin */
@media (max-width: 991px) {
    h1, .t-display {
        font-size: 40px; /* 40px tablet */
    }

    h2, .t-section-heading {
        font-size: 28px; /* 28px tablet */
    }

    h3, .t-sub-heading {
        font-size: 22px; /* 22px tablet */
    }
}

/* Mobile: <768px — single column */
@media (max-width: 767px) {
    h1, .t-display {
        font-size: 28px; /* 28px mobile */
    }

    h2, .t-section-heading {
        font-size: 24px; /* 24px mobile */
    }

    .container {
        padding-left: var(--space-16);
        padding-right: var(--space-16);
    }
}

/* Large Mobile: ≤479px — compact layout */
@media (max-width: 479px) {
    .container {
        padding-left: var(--space-16);
        padding-right: var(--space-16);
    }
}
