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

:root {
    --bg: #fafaf9;
    --surface: #ffffff;
    --surface-muted: #f6f6f5;
    --border: #d4d4d4;
    --border-strong: #b5b5b5;
    --text: #1a1a1a;
    --text-muted: #6b6b6b;
    --text-faint: #9a9a9a;
    --accent: #27272a;
    --accent-hover: #18181b;
    --accent-soft: rgba(39, 39, 42, 0.08);
    --link: #2f6feb;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow: 0 1px 2px rgba(15, 15, 15, 0.06), 0 1px 3px rgba(15, 15, 15, 0.04);
    --shadow-hover: 0 6px 18px rgba(15, 15, 15, 0.08), 0 2px 4px rgba(15, 15, 15, 0.05);
    --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: "ss01", "cv11";
    background: var(--bg) !important;
    color: var(--text) !important;
    letter-spacing: -0.005em;
}

main {
    line-height: 1.65;
}

h1, h2, h3, h4 {
    letter-spacing: -0.02em;
}
h1 { font-weight: 600 !important; }
h2 { font-weight: 600 !important; }
h3 { font-weight: 600 !important; }

code, pre, kbd, samp {
    font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 0.92em;
}

p code, li code, td code {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.08em 0.38em;
}

::selection {
    background: rgba(47, 111, 235, 0.18);
    color: var(--text);
}

*:focus { outline: none; }
*:focus-visible {
    outline: 2px solid var(--link);
    outline-offset: 2px;
    border-radius: 6px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 8px;
    border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

header.bg-white {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-color: var(--border) !important;
    position: sticky;
    top: 0;
    z-index: 50;
}

header a.text-blue-600 {
    color: var(--text) !important;
    letter-spacing: -0.02em;
    font-weight: 600 !important;
}
header a.text-blue-600:hover { color: var(--accent-hover) !important; }

header nav a,
header nav button {
    color: var(--text-muted) !important;
    transition: color var(--transition);
}
header nav a:hover,
header nav button:hover {
    color: var(--text) !important;
}

.border-gray-200 { border-color: var(--border) !important; }
.border-gray-100 { border-color: var(--border) !important; }

.bg-gray-50 { background: var(--bg) !important; }
.bg-gray-100 { background: var(--surface-muted) !important; }

.shadow-sm, .shadow-md {
    box-shadow: var(--shadow) !important;
}

.rounded-xl, .rounded-2xl {
    border-radius: var(--radius-lg) !important;
}

a.block.p-6.bg-white,
a.block.bg-white {
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
a.block.p-6.bg-white:hover,
a.block.bg-white:hover {
    border-color: var(--border-strong) !important;
    box-shadow: var(--shadow-hover) !important;
    transform: translateY(-1px);
}
a.block.p-6.bg-white:hover h2 {
    color: var(--accent-hover) !important;
}

.text-blue-500,
.text-blue-600,
.text-blue-700 {
    color: var(--link) !important;
}
.hover\:text-blue-500:hover,
.hover\:text-blue-600:hover,
.hover\:text-blue-700:hover {
    color: var(--accent-hover) !important;
}

.bg-blue-600,
.bg-blue-700 {
    background: var(--accent) !important;
}
.hover\:bg-blue-700:hover,
.hover\:bg-blue-600:hover {
    background: var(--accent-hover) !important;
}

.text-blue-200 { color: rgba(255, 255, 255, 0.7) !important; }
.text-blue-700.bg-white { color: var(--accent) !important; }
.hover\:bg-blue-50:hover { background: var(--surface-muted) !important; }

button.bg-blue-600,
button.bg-blue-700,
a[class*="bg-blue-6"],
a[class*="bg-blue-7"] {
    box-shadow: none !important;
    transition: background var(--transition), transform var(--transition);
    letter-spacing: -0.01em;
}
button.bg-blue-600:hover,
a[class*="bg-blue-6"]:hover {
    transform: translateY(-1px);
}

button:disabled.bg-blue-600,
button:disabled.disabled\:bg-gray-300 {
    background: var(--surface-muted) !important;
    color: var(--text-faint) !important;
    transform: none !important;
}

.accent-blue-600 { accent-color: var(--accent) !important; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    transition: border-color var(--transition), box-shadow var(--transition);
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: var(--text) !important;
    box-shadow: 0 0 0 3px var(--accent-soft) !important;
    outline: none !important;
}

.option-btn {
    border-width: 1px !important;
    border-color: var(--border) !important;
    background: var(--surface) !important;
    transition: border-color var(--transition), background var(--transition), transform var(--transition);
    letter-spacing: -0.005em;
}
.option-btn:hover:not(:disabled) {
    border-color: var(--border-strong) !important;
    background: var(--surface-muted) !important;
    transform: translateY(-1px);
}

.text-gray-400 { color: var(--text-faint) !important; }
.text-gray-500 { color: var(--text-muted) !important; }
.text-gray-600 { color: var(--text-muted) !important; }
.text-gray-700,
.text-gray-800 { color: var(--text) !important; }

nav.text-sm a:hover { color: var(--accent-hover) !important; }
nav.text-sm .mx-2 { color: var(--text-faint); }

footer {
    border-color: var(--border) !important;
    margin-top: 6rem !important;
}
footer .text-gray-400 { color: var(--text-faint) !important; }
footer a:hover { color: var(--text) !important; }

.prose {
    max-width: 70ch;
    line-height: 1.72;
    color: var(--text);
}
.prose h2 { margin-top: 2.2em; margin-bottom: 0.6em; }
.prose h3 { margin-top: 1.8em; margin-bottom: 0.5em; }
.prose p { margin-bottom: 1.1em; }
.prose pre {
    background: #1a1a1a;
    color: #f5f5f5;
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    overflow-x: auto;
    font-size: 0.88em;
    line-height: 1.55;
    border: 1px solid #2a2a2a;
}
.prose pre code {
    background: transparent;
    border: 0;
    padding: 0;
    color: inherit;
}

table {
    border-collapse: separate;
    border-spacing: 0;
}
th, td {
    border-color: var(--border) !important;
}

img { max-width: 100%; height: auto; }

.honeypot {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
