:root {
    --ink: #141923;
    --paper: #FAFAFA;
    --paper-warm: #F3F4F6;
    --accent: #2DD4BF;
    --accent-light: #5EEAD4;
    --muted: #8C96A5;
    --body: #4B5563;
    --rule: #E1E4E8;
    --rule-dark: #D1D5DB;
}

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

html {
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- Top rule ---- */
.top-rule {
    height: 4px;
    background: var(--accent);
    width: 100%;
}

/* ---- Header ---- */
.header {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 2rem 0;
    width: 100%;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1rem;
}

.wordmark {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.wordmark-logo {
    height: 3rem;
    width: auto;
    object-fit: contain;
    display: block;
}

.nav {
    display: flex;
    gap: 1.5rem;
    align-items: baseline;
}

.nav a {
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
    padding-bottom: 0.35rem;
    border-bottom: 1.5px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

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

.nav a.active {
    color: var(--ink);
    border-bottom-color: var(--ink);
}

.header-rule {
    width: 100%;
    height: 1px;
    background: var(--rule);
    margin-top: 0.75rem;
}

/* ---- Main ---- */
.main {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 2rem 2.5rem;
    width: 100%;
    flex: 1;
}

.tagline {
    font-family: 'Poppins', sans-serif;
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--ink);
    max-width: 560px;
    margin-bottom: 2rem;
}

.description {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--body);
    max-width: 540px;
    margin-bottom: 3rem;
}

/* ---- Live benchmark module ---- */
.benchmark-module {
    margin-bottom: 3rem;
    padding: 2rem 0;
    border-top: 1px solid var(--rule-dark);
    border-bottom: 1px solid var(--rule-dark);
}

.benchmark-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
}

.benchmark-widget {
    margin-top: 0.75rem;
    line-height: 0;
}

.benchmark-widget iframe {
    max-width: 100%;
    border: none;
    display: block;
}

.benchmark-explore {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.76rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

.benchmark-explore:hover {
    color: var(--accent-light);
}

/* ---- Flagship metric card ---- */
.metric-card {
    border: 1px solid var(--rule-dark);
    padding: 2.25rem 2rem;
    margin-bottom: 2.5rem;
    background: var(--paper-warm);
}

.metric-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.metric-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.metric-desc {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--body);
    margin-bottom: 1.75rem;
}

.metric-link {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--accent);
    padding: 0.5rem 1rem;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.metric-link:hover {
    background: var(--accent);
    color: var(--paper);
    border-color: var(--accent);
}

/* ---- Email signup ---- */
.signup-card {
    border: 1px solid var(--rule);
    padding: 2rem;
    margin-bottom: 2.5rem;
    background: var(--paper);
}

.signup-card .metric-label {
    margin-bottom: 0.5rem;
}

.signup-text {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--body);
    margin-bottom: 1.25rem;
}

.signup-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.signup-form input[type="email"] {
    flex: 1;
    min-width: 200px;
    padding: 0.6rem 0.85rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    border: 1px solid var(--rule-dark);
    background: var(--paper-warm);
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s;
}

.signup-form input[type="email"]:focus {
    border-color: var(--accent);
}

.signup-form button {
    padding: 0.6rem 1.25rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--accent);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.signup-form button:hover {
    background: #14b8a6;
}

.signup-privacy {
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 0.75rem;
}

/* ---- Sections ---- */
.section-rule {
    width: 40px;
    height: 1px;
    background: var(--rule-dark);
    margin-bottom: 1.5rem;
}

.section-heading {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
}

/* ---- Page heading (for subpages) ---- */
.page-heading {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--body);
    max-width: 540px;
    margin-bottom: 2.5rem;
}

/* ---- Methodology / prose ---- */
.methodology,
.prose {
    font-size: 0.88rem;
    line-height: 1.75;
    color: var(--ink);
    max-width: 540px;
    margin-bottom: 2.5rem;
}

.methodology strong,
.prose strong {
    font-weight: 600;
}

.prose h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 1rem;
    margin-top: 0.25rem;
}

.prose p {
    margin-bottom: 1rem;
}

.prose ul {
    margin-bottom: 1rem;
    padding-left: 1.25rem;
}

.prose li {
    margin-bottom: 0.4rem;
}

.prose code {
    font-size: 0.82rem;
    background: var(--paper-warm);
    padding: 0.15rem 0.4rem;
    border: 1px solid var(--rule);
}

/* ---- Formula block ---- */
.formula-block {
    background: var(--paper-warm);
    border: 1px solid var(--rule);
    padding: 1.5rem 1.75rem;
    margin: 1.25rem 0 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.formula-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    color: var(--ink);
    white-space: nowrap;
    min-width: max-content;
}

.formula-label {
    font-weight: 600;
}

.formula-eq {
    color: var(--muted);
}

.formula-fraction {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.formula-num {
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--ink);
    font-size: 0.95rem;
}

.formula-den {
    padding-top: 0.25rem;
    font-size: 0.95rem;
}

.formula-mult {
    color: var(--muted);
}

/* ---- Prose content groups ---- */
.prose-group {
    background: var(--paper-warm);
    border-left: 2px solid var(--rule-dark);
    padding: 1.25rem 1.5rem;
    margin: 1rem 0 1.25rem;
}

.prose-group p:last-child,
.prose-group ul:last-child {
    margin-bottom: 0;
}

.prose-group ul {
    padding-left: 1rem;
}

/* ---- About / Founder ---- */
.about {
    font-size: 0.88rem;
    line-height: 1.75;
    color: var(--ink);
    max-width: 540px;
    margin-bottom: 2.5rem;
}

.about a,
.prose a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.about a:hover,
.prose a:hover {
    border-bottom-color: var(--accent);
}

/* ---- Contact ---- */
.contact {
    font-size: 0.88rem;
    color: var(--body);
    margin-bottom: 1rem;
}

.contact-block {
    padding-top: 0.5rem;
    margin-bottom: 1rem;
}

.contact a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.contact a:hover {
    border-bottom-color: var(--accent);
}

/* ---- Publication cards ---- */
.publications-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.pub-card {
    border: 1px solid var(--rule-dark);
    padding: 2rem;
    background: var(--paper-warm);
}

.pub-type {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.pub-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.5rem;
}

.pub-title a {
    color: var(--ink);
    text-decoration: none;
    transition: color 0.2s;
}

.pub-title a:hover {
    color: var(--accent);
}

.pub-desc {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--body);
    margin-bottom: 1.25rem;
}

/* ---- Footer ---- */
.footer {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    width: 100%;
}

.footer-rule {
    width: 100%;
    height: 1px;
    background: var(--rule-dark);
    margin-bottom: 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.footer-copy {
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--ink);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    html { font-size: 16px; }
    .header { padding: 1.5rem 1.25rem 0; }
    .header-top { flex-direction: column; gap: 0.6rem; }
    .nav { gap: 1.25rem; }
    .main { padding: 1.25rem 1.25rem 2rem; }
    .footer { padding: 2rem 1.25rem; }
    .wordmark-logo { height: 2.5rem; }
    .tagline { font-size: 1.15rem; }
    .formula-block { padding: 1.25rem; }
    .formula-row { font-size: 0.95rem; }
    .formula-num,
    .formula-den { font-size: 0.85rem; }
    .prose-group { padding: 1rem 1.25rem; }
    .metric-card,
    .signup-card { padding: 1.5rem; }
    .footer-content { flex-direction: column; }
    .footer-links { flex-wrap: wrap; gap: 1rem; }
}

/* ---- Fade in ---- */
.fade-in {
    opacity: 0;
    transform: translateY(8px);
    animation: fadeUp 0.6s ease forwards;
}

.fade-in:nth-child(2) { animation-delay: 0.1s; }
.fade-in:nth-child(3) { animation-delay: 0.2s; }
.fade-in:nth-child(4) { animation-delay: 0.3s; }
.fade-in:nth-child(5) { animation-delay: 0.35s; }
.fade-in:nth-child(6) { animation-delay: 0.4s; }
.fade-in:nth-child(7) { animation-delay: 0.45s; }

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
