/* Soft Editorial theme — academic pages (topics, articles, papers).
   Built by tools/site/build.py; edit here, then rebuild. */
:root {
    --paper: #F2EEDF;
    --paper-2: #ECE6D2;
    --ink: #2A241B;
    --ink-soft: #5C5345;
    --pink: #E1A4C2;
    --lemon: #D6DD63;
    --blush: #E8C9B6;
    --sage: #B7C7A8;
    --lilac: #C9BEDC;
    --card-fill: rgba(255,255,255,0.55);
    --rule-soft: rgba(42,36,27,0.18);
    --rule-medium: rgba(42,36,27,0.35);
    --sidebar-width: 260px;
    --toc-width: 260px;
}

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

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

.site-layout {
    display: grid;
    grid-template-columns: var(--toc-width) minmax(0, 1fr) var(--sidebar-width);
    justify-content: center;
    align-items: start;
    gap: 1.5rem;
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.doc-content { min-width: 0; width: 100%; }

/* ---- Breadcrumbs ---- */
.breadcrumbs {
    font-size: 0.9rem;
    color: var(--ink-soft);
    margin-bottom: 1.25rem;
    padding: 0.5rem 0.9rem;
    background-color: var(--paper-2);
    border: 1px solid var(--rule-soft);
    border-radius: 20px;
    display: inline-block;
}
.breadcrumbs a { color: var(--ink-soft); border-bottom: 1px dotted transparent; }
.breadcrumbs a:hover { color: var(--ink); border-bottom-color: var(--pink); }
.breadcrumbs .separator { margin: 0 0.45rem; color: var(--rule-medium); }
.breadcrumbs .current { color: var(--ink); font-weight: 500; }

.section-badge {
    display: inline-block;
    background-color: var(--paper-2);
    color: var(--ink);
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    border: 1px solid var(--rule-soft);
}
.section-badge a { color: inherit; text-decoration: none; border-bottom: none; }
.section-badge a:hover { color: var(--pink); }

/* ---- Topic / listing index pages ---- */
.topic-index h1 { margin-bottom: 1.5rem; }
.topic-description {
    font-size: 1.1rem; color: var(--ink-soft);
    margin-bottom: 2rem; line-height: 1.7;
}
.topic-articles { display: flex; flex-direction: column; gap: 1rem; }
.topic-article-card {
    background: var(--paper-2); border: 1px solid var(--rule-soft);
    border-radius: 16px; padding: 1.25rem 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}
/* stretch the title link over the whole card so it acts as one button */
.topic-article-card h3 a::after { content: ""; position: absolute; inset: 0; }
.topic-article-card:hover {
    border-color: var(--pink);
    box-shadow: 0 4px 12px rgba(42,36,27,0.08);
}
.topic-article-card h3 {
    margin: 0 0 0.35rem 0; font-size: 1.2rem;
    background: none; border: none; padding: 0; position: static;
}
.topic-article-card p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }
.topic-article-card a { color: var(--ink); border-bottom: 1px dotted var(--pink); }
.topic-article-card a:hover { color: var(--pink); border-bottom-style: solid; }

.content-card {
    background-color: var(--card-fill); border-radius: 24px; padding: 2rem;
    margin: 1.5rem 0; border: 1px solid var(--rule-soft);
}
.content-card > h1:first-child { margin-top: 0; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cormorant Garamond', serif; font-weight: 500; color: var(--ink);
    margin-top: 2.5rem; margin-bottom: 1rem; line-height: 1.3;
    padding: 0.6rem 0.9rem; background-color: var(--card-fill);
    border-left: 4px solid var(--sage); border-radius: 0 6px 6px 0;
    scroll-margin-top: 2rem;
}
h1 { font-size: 2.2rem; border-bottom: 2px solid var(--rule-medium); padding-bottom: 0.6rem; }
h2 { font-size: 1.9rem; color: var(--ink); }
h3 { font-size: 1.6rem; color: var(--ink-soft); }
h4 { font-size: 1.35rem; color: var(--ink); }

p { margin-bottom: 1.25rem; font-size: 1.05rem; }

.highlight { background-color: var(--lemon); padding: 0.15rem 0.35rem; border-radius: 3px; font-weight: 500; }
blockquote { border-left: 4px solid var(--pink); padding-left: 1.25rem; margin: 1.5rem 0; font-style: italic; color: var(--ink-soft); }
ul, ol { margin-bottom: 1.25rem; padding-left: 1.75rem; }
li { margin-bottom: 0.4rem; }

.section-rule { border: none; border-top: 1px solid var(--rule-soft); margin: 1.75rem 0; }

a { color: var(--pink); text-decoration: none; border-bottom: 1px dotted var(--pink); }
a:hover { border-bottom-style: solid; }

/* ---- Tables, code, figures ---- */
table {
    width: 100%; border-collapse: collapse; margin: 1.5rem 0;
    font-size: 0.95rem; background-color: var(--card-fill);
    border: 1px solid var(--rule-soft); border-radius: 8px; overflow: hidden;
}
th, td { padding: 0.6rem 0.9rem; border: 1px solid var(--rule-soft); text-align: left; vertical-align: top; }
th { background-color: var(--paper-2); font-weight: 500; }
tr:nth-child(even) td { background-color: rgba(255,255,255,0.35); }

pre {
    background-color: var(--paper-2); border: 1px solid var(--rule-soft);
    border-radius: 10px; padding: 1rem 1.25rem; overflow-x: auto;
    margin: 1.5rem 0; font-size: 0.9rem; line-height: 1.5;
}
code { font-family: 'JetBrains Mono', Consolas, monospace; font-size: 0.92em; }
p code, li code, td code {
    background-color: var(--paper-2); padding: 0.1rem 0.35rem;
    border-radius: 4px; border: 1px solid var(--rule-soft);
}

img { max-width: 100%; height: auto; border-radius: 8px; }
figure { margin: 1.5rem 0; text-align: center; }
figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 0.5rem; }

/* ---- Citations and references ---- */
a.citation {
    font-family: 'Work Sans', sans-serif; font-size: 0.8em;
    color: var(--ink-soft); vertical-align: super; line-height: 1;
    border-bottom: none; padding: 0 0.1rem;
}
a.citation:hover { color: var(--pink); }

ol.references { padding-left: 2rem; font-size: 0.95rem; }
ol.references li {
    margin-bottom: 0.75rem; color: var(--ink-soft);
    line-height: 1.55; scroll-margin-top: 2rem;
}
ol.references li:target {
    background-color: var(--lemon); border-radius: 6px;
    padding: 0.3rem 0.5rem; color: var(--ink);
}
ol.references a { word-break: break-all; font-size: 0.9em; }
ol.references strong { color: var(--ink); font-weight: 500; }

/* ---- Related links, prev/next ---- */
.related-block {
    background-color: var(--paper-2); border: 1px solid var(--rule-soft);
    border-radius: 16px; padding: 1.25rem 1.5rem; margin: 2rem 0;
}
.related-block h2 {
    margin-top: 0; font-size: 1.3rem; background: none;
    border-left: none; padding: 0 0 0.5rem 0;
    border-bottom: 1px solid var(--rule-soft); border-radius: 0;
}
.related-block ul { margin: 0.75rem 0 0; padding-left: 1.25rem; }

.page-siblings {
    display: flex; justify-content: space-between; gap: 1rem;
    margin: 2.5rem 0 1rem; font-size: 0.95rem;
}
.page-siblings a {
    display: inline-block; padding: 0.6rem 1rem;
    background-color: var(--paper-2); border: 1px solid var(--rule-soft);
    border-radius: 12px; color: var(--ink-soft); border-bottom: none;
    max-width: 46%;
}
.page-siblings a:hover { color: var(--ink); border-color: var(--pink); }
.page-siblings .next { margin-left: auto; text-align: right; }

.site-footer {
    width: 100%;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--rule-soft);
    color: var(--ink-soft);
    font-size: 0.85rem;
    text-align: center;
    background-color: var(--paper-2);
}
.site-footer a { color: var(--ink-soft); }

@media (max-width: 1200px) {
    .site-layout { grid-template-columns: 1fr; gap: 1rem; padding: 1rem; }
}


/* ---- Panel tint for the shared panels.css ---- */
:root {
    --panel-width: var(--toc-width);
    --panel-bg-a: #FBF8EE;
    --panel-bg-b: var(--paper-2);
    --panel-border: var(--rule-soft);
    --panel-shadow: rgba(42, 36, 27, 0.07);
    --panel-heading-font: 'Cormorant Garamond', serif;
    --panel-heading-color: var(--ink);
    --panel-accent: var(--sage);
    --panel-fg: var(--ink);
    --panel-fg-soft: var(--ink-soft);
    --panel-btn-a: var(--paper-2);
    --panel-btn-b: var(--blush);
    --panel-btn-fg: var(--ink);
    --panel-chevron-bg: var(--sage);
    --panel-chevron-fg: #FFFFFF;
    --panel-hover: var(--card-fill);
    --panel-active-a: rgba(214, 221, 99, 0.35);
    --panel-active-b: rgba(225, 164, 194, 0.2);
    --panel-active-accent: var(--pink);
}
