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

:root, [data-theme="light"] {
    --bg: #F8F7F4;
    --surface: #FFFFFF;
    --surface2: #F1F0EC;
    --line: #E7E5E4;
    --text: #1C1917;
    --muted: #78716C;
    --primary: #186F6B;
    --primary-hover: #135955;
    --inverse: #FFFFFF;
    --shadow: 0 1px 2px rgba(0,0,0,0.05);
    --r: 4px;
    --font: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

[data-theme="dark"] {
    --bg: #0C0A09;
    --surface: #1C1917;
    --surface2: #262220;
    --line: #44403C;
    --text: #F5F5F4;
    --muted: #A8A29E;
    --primary: #186F6B;
    --primary-hover: #1DA39D;
    --inverse: #FFFFFF;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

.container {
    width: min(1440px, calc(100% - 48px));
    margin: auto;
}

/* Header & Nav */
.header {
    position: sticky;
    top: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
    letter-spacing: -0.05em;
    padding: 16px 0;
}

.brand svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

nav {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: none;
}

nav::-webkit-scrollbar {
    display: none;
}

.navlink, .toggle, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 24px;
    border-radius: var(--r);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn.primary {
    background: var(--primary);
    color: var(--inverse);
    border-color: var(--primary);
}

.btn.primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Hero & Sections */
.hero {
    padding: 48px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
}

@media (max-width: 960px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 16px;
}

h1, h2, h3 {
    margin: 0 0 16px;
    font-weight: 700;
    letter-spacing: -0.05em;
}

h1 {
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.1;
}

h2 {
    font-size: 1.75rem;
}

.lede {
    color: var(--muted);
    font-size: 1.125rem;
    max-width: 65ch;
    margin-bottom: 32px;
}

/* Cards & Grid */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.subgrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 600px) {
    .grid, .subgrid, .results {
        grid-template-columns: 1fr !important;
    }
}

/* Forms */
.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.input {
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--line);
    background: transparent;
    min-height: 48px;
    transition: border-color 0.2s;
}

.input:focus-within {
    border-color: var(--primary);
}

.input span {
    padding: 0 8px;
    color: var(--muted);
    font-size: 16px;
}

.input input, .input select, select {
    width: 100%;
    padding: 12px 8px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 18px;
    font-family: inherit;
    font-weight: 500;
    outline: none;
}

/* Results */
.results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.metric {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--surface2);
}

.metric .k {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.metric .v {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 64px 0;
    margin-top: 96px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 64px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.mini-links a {
    font-size: 14px;
    padding: 6px 12px;
    background: var(--surface2);
    border: 1px solid var(--line);
    border-radius: var(--r);
    font-weight: 500;
}

/* Utils */
details {
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
}

summary {
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
}

summary::after {
    content: '+';
    font-weight: 400;
}

details[open] summary::after {
    content: '−';
}

