* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --text-light: #666666;
    --border: #e0e0e0;
    --accent: #0066cc;
    --accent-hover: #0052a3;
    --code-bg: #f5f5f5;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #fafafa;
        --text: #1a1a1a;
        --text-light: #666666;
        --border: #e0e0e0;
    }
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 740px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-bottom: 3rem;
}

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

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--text);
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
}

h2 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem 0;
    font-family: 'JetBrains Mono', monospace;
}

h3 {
    font-size: 1.1rem;
    margin: 1.5rem 0 0.5rem 0;
    font-family: 'JetBrains Mono', monospace;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3rem 0;
}

/* Links */
a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Hero Section */
.hero {
    margin: 3rem 0;
}

.hero p {
    font-size: 1.1rem;
    max-width: 600px;
}

/* Details/Summary */
details {
    margin: 1.5rem 0;
}

summary {
    cursor: pointer;
    padding: 0.75rem 0;
    font-weight: 500;
    color: var(--text);
    list-style: none;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

summary::-webkit-details-marker {
    display: none;
}

summary::before {
    content: '▸';
    transition: transform 0.2s;
    font-size: 0.9rem;
    color: var(--text-light);
    flex-shrink: 0;
}

details[open]>summary::before {
    transform: rotate(90deg);
}

summary:hover {
    color: var(--accent);
}

.details-block {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem;
    background: var(--code-bg);
}

.details-block summary {
    font-weight: 600;
    font-size: 1.05rem;
    padding-left: 0;
}

.nested-content {
    margin-top: 1rem;
    padding-left: 1rem;
}

.subject-block {
    margin: 1rem 0;
    padding: 0.75rem;
    border-left: 2px solid var(--border);
}

.subject-block summary {
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
}

.subject-block[open] {
    border-left-color: var(--accent);
}

/* Badge */
.badge {
    display: inline-block;
    background: var(--code-bg);
    border: 1px solid var(--border);
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-light);
    margin: 0.5rem 0 1rem 0;
}

/* Lists */
ul {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

ul li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
}

ul li::before {
    content: '–';
    position: absolute;
    left: 0;
    color: var(--text-light);
}

ul li a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
}

ul li a:hover {
    text-decoration: underline;
}

/* Newsletter */
.newsletter {
    margin: 3rem 0;
}

/* Disclaimer */
.disclaimer {
    background: var(--code-bg);
    border-left: 3px solid #f59e0b;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 4px;
    font-size: 0.95rem;
    color: var(--text);
}

.disclaimer strong {
    color: #d97706;
}

.form-inline {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

input[type="email"] {
    flex: 1;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
}

input[type="email"]:focus {
    outline: none;
    border-color: var(--accent);
}

button {
    padding: 0.6rem 1.25rem;
    background: var(--text);
    color: var(--bg);
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

button:hover {
    background: var(--text-light);
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

footer a {
    color: var(--text-light);
}

footer a:hover {
    color: var(--text);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .container {
        padding: 0 16px;
    }

    header .container {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    nav {
        gap: 1.5rem;
    }

    .form-inline {
        flex-direction: column;
    }

    input[type="email"],
    button {
        width: 100%;
    }
}