:root {
    --bg-color: #f9f9f9;
    --text-color: #333;
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --container-bg: #fff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

header h1 {
    margin: 0 0 1rem 0;
    font-size: 2.5rem;
    font-weight: 700;
}

header p.subtitle {
    font-size: 1.25rem;
    margin: 0;
    opacity: 0.9;
}

header p.byline {
    margin: 1.25rem 0 0 0;
    font-size: 0.95rem;
    opacity: 0.85;
}

header p.byline a {
    color: white;
    text-decoration: underline;
}

.container {
    max-width: 900px;
    margin: -2rem auto 2rem auto;
    background: var(--container-bg);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-top: 2.5rem;
}

h3 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
}

.abstract {
    font-size: 1.1rem;
    font-style: italic;
    color: #555;
    background: #f1f8ff;
    padding: 1.5rem;
    border-left: 4px solid var(--accent-color);
    border-radius: 4px;
}

.example {
    background: #fff8ec;
    border-left: 4px solid #e67e22;
    padding: 1.25rem 1.5rem;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.example strong {
    color: #b9650a;
}

.nav {
    text-align: center;
    padding-bottom: 2rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #eaeaea;
}

.derivation-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

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

.card {
    background: #fafafa;
    border: 1px solid #eaeaea;
    padding: 1.5rem;
    border-radius: 6px;
}

.card h4 {
    margin-top: 0;
    color: var(--accent-color);
}

.flow {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.75rem;
    margin: 1.5rem 0 0.75rem 0;
}

.flow-step {
    flex: 1 1 200px;
    background: #fafafa;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    padding: 1.25rem;
}

.flow-step h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.flow-step p {
    margin: 0 0 0.5rem 0;
}

.flow-step p.needs {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0;
}

.flow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #b0bec5;
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .flow {
        flex-direction: column;
    }
    .flow-arrow {
        transform: rotate(90deg);
    }
}

.caption-note {
    font-size: 0.9rem;
    color: #666;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 1rem;
}

table.hyp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

table.hyp-table th,
table.hyp-table td {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #eaeaea;
    vertical-align: top;
}

table.hyp-table th {
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    white-space: nowrap;
}

table.hyp-table td.status {
    white-space: nowrap;
    font-weight: 600;
    color: var(--secondary-color);
}

.lean-badge {
    display: inline-block;
    background-color: #27ae60;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 0.9rem;
}

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

a:hover {
    text-decoration: underline;
}

.button {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: bold;
    margin-top: 1.5rem;
    text-decoration: none;
    transition: background 0.2s;
}

.button:hover {
    background: #2980b9;
    text-decoration: none;
}

.button-secondary {
    background: var(--secondary-color);
}

.button-secondary:hover {
    background: #1a252f;
}

.link-note {
    font-size: 0.95rem;
    color: #555;
    max-width: 760px;
    margin: 1.25rem auto 0 auto;
    text-align: left;
}

.fixed-points {
    counter-reset: fixed-point;
    list-style: none;
    padding-left: 0;
    margin-top: 1.5rem;
}

.fixed-points li {
    counter-increment: fixed-point;
    position: relative;
    background: #f4f9fc;
    border: 1px solid #dceaf3;
    border-left: 4px solid var(--accent-color);
    border-radius: 6px;
    padding: 1.1rem 1.4rem 1.1rem 3.4rem;
    margin-bottom: 1rem;
}

.fixed-points li::before {
    content: counter(fixed-point);
    position: absolute;
    left: 1.25rem;
    top: 1.1rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--accent-color);
}

.fixed-points strong {
    color: var(--primary-color);
}

.prediction {
    background: #f2fbf5;
    border-left: 4px solid #27ae60;
    padding: 1.25rem 1.5rem;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.prediction strong {
    color: #1e8449;
}

/* Switcher between the two papers' pages, above each page's header. */
.site-nav {
    background-color: var(--secondary-color);
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
}

.site-nav a {
    color: white;
    opacity: 0.75;
    text-decoration: none;
    margin: 0 0.9rem;
    display: inline-block;
}

.site-nav a:hover {
    opacity: 1;
}

.site-nav a[aria-current="page"] {
    opacity: 1;
    font-weight: 600;
    border-bottom: 2px solid white;
}
