/* ============================================================
   MARVIN — editorial dark navy (extends ../css/style.css)
   ============================================================ */

/* ---------- MARVIN landing hero ---------- */
.marvin-hero {
    margin-top: var(--nav-height);
    padding: 56px 0 44px;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--rule);
    position: relative;
    overflow: hidden;
    text-align: left;
}

.marvin-hero--compact {
    padding: 44px 0 36px;
}

.marvin-hero > .container {
    max-width: none;
    padding: 0;
}

.marvin-hero-inner {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr) 280px;
    gap: 0;
    align-items: stretch;
}

.marvin-hero-inner::before {
    content: 'M — MARVIN';
    font-family: var(--mono);
    font-size: 0.62rem;
    color: var(--text-mute);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    border-right: 1px solid var(--rule);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 0 14px;
}

.marvin-hero-copy {
    padding: 14px 56px 0;
}

.marvin-hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    border-left: 1px solid var(--rule);
}

.marvin-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.marvin-hero-eyebrow::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--accent);
}

.marvin-hero h1 {
    font-family: var(--serif);
    font-size: clamp(2.4rem, 5.5vw, 3.8rem);
    color: var(--text);
    font-weight: 400;
    letter-spacing: -0.015em;
    line-height: 1;
    margin-bottom: 16px;
}

.marvin-hero h1 .accent,
.marvin-hero h1 em {
    font-style: italic;
    font-weight: 300;
    color: var(--text-soft);
}

.marvin-home-link {
    color: inherit;
    text-decoration: none;
}

.marvin-home-link:hover {
    color: inherit;
    opacity: 0.9;
}

.marvin-hero .marvin-tagline {
    font-size: 1.02rem;
    color: var(--text);
    font-weight: 400;
    margin-bottom: 10px;
    max-width: 760px;
    line-height: 1.55;
}

.marvin-hero .marvin-sub {
    font-size: 0.92rem;
    color: var(--text-soft);
    font-weight: 400;
    max-width: 780px;
    margin: 0;
    line-height: 1.7;
}

.marvin-hero .marvin-sub em {
    color: var(--text);
    font-style: italic;
}

/* ---------- Module tabs (under MARVIN banner) ---------- */
.marvin-module-tabs {
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
}

.marvin-module-tabs > .container {
    display: grid;
    grid-template-columns: 80px repeat(3, 1fr);
    gap: 0;
    max-width: none;
    padding: 0;
}

.marvin-module-tabs > .container::before {
    content: '';
    border-right: 1px solid var(--rule);
}

.marvin-module-tab {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 22px 28px;
    color: var(--text);
    border-right: 1px solid var(--rule);
    transition: background var(--transition);
    position: relative;
    text-decoration: none;
}

.marvin-module-tab:last-child { border-right: none; }

.marvin-module-tab::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease-out);
}

.marvin-module-tab:hover {
    background: var(--surface);
    color: var(--text);
}

.marvin-module-tab:hover::before { transform: scaleX(1); }

.marvin-module-tab.active {
    background: var(--surface);
    color: var(--text);
}

.marvin-module-tab.active::before { transform: scaleX(1); }

.module-tab-kicker {
    font-family: var(--mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

.module-tab-title {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text);
}

/* ---------- Module page summary (sub-pages) ---------- */
.module-page-summary {
    padding: 40px 0 32px;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    position: relative;
}

.module-page-summary > .container {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 0;
    max-width: none;
    padding: 0;
}

.module-page-summary > .container::before { display: none; }

.module-page-summary::before {
    content: '';
    position: absolute;
    left: 80px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--rule);
}

.module-page-summary > .container > * {
    grid-column: 2;
    padding-left: 56px;
    padding-right: 56px;
}

.module-page-summary-inner {
    padding: 0 56px;
}

/* fallback layout when there is no inner wrapper */
.module-page-summary > .container > *:not(.module-page-summary-inner):not(::before) {
    padding-left: 56px;
    padding-right: 56px;
}

.module-page-summary .module-badge {
    display: inline-block;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.module-page-summary h1 {
    font-family: var(--serif);
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    font-weight: 400;
    color: var(--text);
    margin-bottom: 12px;
}

.module-page-summary .tool-tagline {
    color: var(--text-soft);
    font-size: 0.96rem;
    max-width: 760px;
    margin: 0;
    line-height: 1.7;
}

/* ---------- Module index (MARVIN landing) ---------- */
.module-grid {
    display: block;
    margin-top: 0;
    border-top: 1px solid var(--rule);
}

.module-card {
    display: grid;
    grid-template-columns: 80px 60px minmax(140px, 220px) 1fr auto;
    gap: 22px;
    align-items: center;
    padding: 28px 56px 28px 0;
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid var(--rule);
    background: transparent;
    color: var(--text);
    transition: background var(--transition);
    position: relative;
    overflow: visible;
    box-shadow: none;
    text-decoration: none;
}

.module-card::before {
    content: '';
    border-right: 1px solid var(--rule);
    align-self: stretch;
}

.module-card:hover {
    background: var(--surface);
    color: var(--text);
}

.module-card .module-icon {
    width: 48px;
    height: 48px;
    border-radius: 0;
    background: var(--bg-alt);
    border: 1px solid var(--rule);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.module-card .module-icon svg {
    width: 30px;
    height: 30px;
    filter: saturate(0.6) brightness(1.1);
    opacity: 0.85;
}

.module-card .module-subtitle {
    font-family: var(--mono);
    font-size: 0.6rem;
    color: var(--accent);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 4px;
}

.module-card .module-title {
    font-family: var(--serif);
    font-size: 1.3rem;
    margin: 0;
    font-weight: 500;
    color: var(--text);
    line-height: 1.2;
}

.module-card .module-desc {
    font-size: 0.88rem;
    color: var(--text-soft);
    line-height: 1.7;
    margin: 0;
}

.module-card .module-arrow {
    display: inline-flex;
    align-items: center;
    color: var(--accent);
    gap: 8px;
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity var(--transition), transform var(--transition);
}

.module-card:hover .module-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ---------- Tool detail hero ---------- */
.tool-hero {
    margin-top: var(--nav-height);
    padding: 56px 0 36px;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--rule);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.tool-hero > .container {
    max-width: var(--container);
    padding: 0 28px;
}

.tool-hero .tool-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.tool-hero .tool-eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent);
}

.tool-hero .tool-eyebrow a {
    color: var(--accent);
    transition: color var(--transition);
}

.tool-hero .tool-eyebrow a:hover { color: var(--accent-hover); }

.tool-hero h1 {
    font-family: var(--serif);
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    color: var(--text);
    font-weight: 400;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
}

.tool-hero .tool-tagline {
    color: var(--text-soft);
    font-size: 0.96rem;
    max-width: 720px;
    margin: 0 0 24px;
    line-height: 1.7;
}

.tool-hero .tool-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 0;
    font-family: var(--mono);
    font-size: 0.66rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #0d1117;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #0d1117;
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
    border-color: var(--rule-dark);
}

.btn-ghost:hover {
    background: var(--surface);
    border-color: var(--accent);
    color: var(--accent);
}

/* hero actions stack */
.marvin-hero-actions .btn {
    border: none;
    border-bottom: 1px solid var(--rule);
    padding: 22px 26px;
    font-size: 0.62rem;
    background: transparent;
    color: var(--text-soft);
    justify-content: flex-start;
    text-align: left;
}

.marvin-hero-actions .btn:last-child {
    border-bottom: none;
}

.marvin-hero-actions .btn-primary {
    color: var(--accent);
    background: var(--accent-soft);
}

.marvin-hero-actions .btn-primary:hover {
    color: var(--accent-hover);
    background: rgba(224, 124, 138, 0.18);
}

.marvin-hero-actions .btn-ghost:hover {
    background: var(--surface);
    color: var(--accent);
}

/* ---------- Two-column overview ---------- */
.tool-overview {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 56px;
    align-items: start;
    margin-bottom: 80px;
}

.marvin-about-overview {
    margin-bottom: 48px;
}

.marvin-about-metrics {
    grid-template-columns: 1fr;
    margin-top: 0;
}

.marvin-about-metrics .feature-card {
    border-right: none;
}

.marvin-about-metrics .feature-card:not(:last-child) {
    border-bottom: 1px solid var(--rule);
}

.tool-overview-text p {
    margin-bottom: 16px;
    line-height: 1.8;
    color: var(--text-soft);
    font-size: 1rem;
}

.tool-overview-text p:last-child { margin-bottom: 0; }

.tool-overview-text strong {
    color: var(--text);
    font-weight: 600;
}

.tool-overview-text em { color: var(--text); font-style: italic; }

/* ---------- Visual block (icon-on-canvas) ---------- */
.tool-visual {
    aspect-ratio: 4 / 3;
    border-radius: 0;
    border: 1px solid var(--rule);
    background: var(--bg-alt);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.tool-visual svg {
    width: 60%;
    height: 60%;
    max-width: 280px;
    max-height: 280px;
    position: relative;
    z-index: 1;
}

/* ---------- Feature grid ---------- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin-top: 32px;
    border: 1px solid var(--rule);
}

.feature-card {
    padding: 28px 30px;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background: transparent;
    box-shadow: none;
    transition: background var(--transition);
}

.feature-card:nth-child(2n) { border-right: none; }
.feature-card:nth-last-child(-n+2) { border-bottom: none; }
.feature-card:hover { background: var(--surface); }

.feature-card .feature-icon {
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 14px;
    display: block;
}

.feature-card h4 {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-soft);
    line-height: 1.7;
    margin: 0;
}

/* ---------- Method blocks ---------- */
.method-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 32px;
    border: 1px solid var(--rule);
}

.method-card {
    padding: 32px 28px;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--rule);
    background: transparent;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    transition: background var(--transition);
}

.method-card:last-child { border-right: none; }
.method-card:hover { background: var(--surface); }

.method-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--accent);
    opacity: 0.4;
}

.method-card .method-tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin-bottom: 12px;
}

.method-card h4 {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 10px;
}

.method-card p {
    font-size: 0.9rem;
    color: var(--text-soft);
    line-height: 1.75;
    margin: 0;
}

.method-card code {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: var(--text);
    background: var(--bg-alt);
    padding: 1px 6px;
}

/* ---------- Quadrant grid ---------- */
.quadrant-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin-top: 24px;
    border: 1px solid var(--rule);
}

.quadrant-card {
    padding: 24px 26px;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background: transparent;
    box-shadow: none;
    border-left: 3px solid transparent;
    transition: background var(--transition);
}

.quadrant-card:nth-child(2n) { border-right: none; }
.quadrant-card:nth-last-child(-n+2) { border-bottom: none; }
.quadrant-card:hover { background: var(--surface); }

.quadrant-card .quadrant-label {
    font-family: var(--mono);
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-mute);
    margin-bottom: 8px;
    display: block;
}

.quadrant-card h4 {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.quadrant-card p {
    font-size: 0.88rem;
    color: var(--text-soft);
    margin: 0;
    line-height: 1.7;
}

.quadrant-card.q-good { border-left-color: #5cba7e; }
.quadrant-card.q-tradeoff { border-left-color: #e0a96d; }
.quadrant-card.q-low { border-left-color: var(--text-mute); }
.quadrant-card.q-bad { border-left-color: var(--accent); }

/* ---------- Citation block ---------- */
.citation-block {
    margin-top: 32px;
    padding: 28px 32px;
    border-radius: 0;
    background: var(--bg-alt);
    border: none;
    border-left: 3px solid var(--accent);
    font-size: 0.94rem;
    line-height: 1.75;
    color: var(--text-soft);
}

.citation-block .citation-label {
    display: block;
    font-family: var(--mono);
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin-bottom: 12px;
}

.citation-block strong { color: var(--text); }
.citation-block em { color: var(--text-mute); font-style: italic; }
.citation-block a { word-break: break-all; font-weight: 500; color: var(--accent); }

/* ---------- Step list (workflow) ---------- */
.step-list {
    counter-reset: step-counter;
    list-style: none;
    margin-top: 32px;
    padding: 0;
    border: 1px solid var(--rule);
}

.step-list li {
    position: relative;
    padding: 22px 26px 22px 80px;
    margin: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--rule);
    counter-increment: step-counter;
    transition: background var(--transition);
}

.step-list li:last-child { border-bottom: none; }
.step-list li:hover { background: var(--surface); }

.step-list li::before {
    content: counter(step-counter, decimal-leading-zero);
    position: absolute;
    left: 26px;
    top: 26px;
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 500;
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--accent);
    letter-spacing: 0.16em;
    line-height: 1;
}

.step-list li strong {
    color: var(--text);
    font-weight: 500;
    display: block;
    margin-bottom: 4px;
    font-family: var(--serif);
    font-size: 1.2rem;
}

.step-list li span {
    font-size: 0.9rem;
    color: var(--text-soft);
    line-height: 1.75;
}

.step-list li em { color: var(--text); font-style: italic; }

/* ---------- Section heading variant ---------- */
.section-heading {
    text-align: left;
    margin-bottom: 16px;
}

.section-heading h2 {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

.section-heading p {
    color: var(--text-soft);
    font-size: 0.96rem;
    line-height: 1.7;
    max-width: 720px;
}

/* ---------- Landing section frame (matches Scholarship/CV grid treatment) ---------- */
.marvin-framed-section {
    padding: 0;
}

.marvin-framed-section .pub-category {
    border-top: 1px solid var(--rule);
}

.marvin-framed-section .pub-category-body {
    padding-top: 48px;
    padding-bottom: 56px;
}

/* ---------- Cross-link to other tools ---------- */
.related-tools {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin-top: 32px;
    border: 1px solid var(--rule);
}

.related-tool {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 28px;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--rule);
    background: transparent;
    color: var(--text);
    transition: background var(--transition);
    box-shadow: none;
    text-decoration: none;
}

.related-tool:last-child { border-right: none; }

.related-tool:hover {
    background: var(--surface);
    color: var(--text);
}

.related-tool .related-icon {
    width: 44px;
    height: 44px;
    border-radius: 0;
    background: var(--bg-alt);
    border: 1px solid var(--rule);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.related-tool .related-icon svg {
    width: 26px;
    height: 26px;
    filter: saturate(0.6) brightness(1.1);
    opacity: 0.85;
}

.related-tool .related-text { flex: 1; min-width: 0; }

.related-tool .related-label {
    font-family: var(--mono);
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin-bottom: 4px;
}

.related-tool h4 {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
}

.related-tool p {
    font-size: 0.84rem;
    color: var(--text-mute);
    margin: 0;
    line-height: 1.55;
}

.related-tool .related-arrow {
    color: var(--accent);
    font-size: 0.8rem;
    transition: transform var(--transition);
    flex-shrink: 0;
}

.related-tool:hover .related-arrow { transform: translateX(4px); }

/* ============================================================
   Tool sub-tabs (per module: Overview / Org / Tutorial / etc.)
   ============================================================ */
.tool-tabs {
    background: var(--bg);
    position: sticky;
    top: var(--nav-height);
    z-index: 50;
    border-bottom: 1px solid var(--rule);
    transition: background var(--transition);
}

.tool-tabs > .container {
    display: grid;
    grid-template-columns: 80px repeat(5, 1fr);
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: none;
    padding: 0;
}

.tool-tabs > .container::before {
    content: '';
    border-right: 1px solid var(--rule);
}

.tool-tabs > .container::-webkit-scrollbar { display: none; }

.tool-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 18px;
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-mute);
    border-bottom: 2px solid transparent;
    border-right: 1px solid var(--rule);
    white-space: nowrap;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
    text-decoration: none;
}

.tool-tab:last-child { border-right: none; }

.tool-tab i {
    font-size: 0.85em;
    color: var(--text-mute);
    transition: color var(--transition);
}

.tool-tab:hover {
    color: var(--text);
    background: var(--surface);
}

.tool-tab:hover i { color: var(--accent); }

.tool-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: var(--surface);
}

.tool-tab.active i { color: var(--accent); }

/* ============================================================
   Tool page header (sub-page banner)
   ============================================================ */
.tool-page-header {
    margin-top: var(--nav-height);
    padding: 56px 0 36px;
    background: var(--nav-bg);
    text-align: left;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--rule);
}

.tool-page-header > .container {
    max-width: var(--container);
    padding: 0 28px;
}

.tool-page-header .module-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    background: transparent;
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.tool-page-header .module-badge::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent);
}

.tool-page-header h1 {
    font-family: var(--serif);
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    color: var(--text);
    font-weight: 400;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}

.tool-page-header .tool-tagline {
    color: var(--text-soft);
    font-size: 0.96rem;
    max-width: 720px;
    margin: 0 0 24px;
    line-height: 1.7;
}

.tool-page-header .tool-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

/* ============================================================
   Content section — generic prose
   ============================================================ */
.content-section {
    display: grid;
    grid-template-columns: 80px 1fr;
    border-top: 1px solid var(--rule);
    padding: 0;
    position: relative;
}

.content-section::before {
    content: '';
    position: absolute;
    left: 80px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--rule);
}

.content-section > .container {
    grid-column: 2;
    max-width: none;
    padding: 56px 56px;
    width: 100%;
    min-width: 0;
}

.content-section > .container > * {
    padding-left: 0;
    padding-right: 0;
}

.content-section h2 {
    font-family: var(--serif);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 500;
    margin-bottom: 14px;
    color: var(--text);
}

.content-section h3 {
    font-family: var(--serif);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--text);
    margin: 32px 0 12px;
}

.content-section p {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--text-soft);
    max-width: 760px;
    margin-bottom: 16px;
}

.content-section ul,
.content-section ol {
    color: var(--text-soft);
    line-height: 1.85;
    padding-left: 22px;
    margin-bottom: 18px;
    max-width: 760px;
}

.content-section ul li,
.content-section ol li {
    margin-bottom: 6px;
}

.content-section ul li::marker,
.content-section ol li::marker {
    color: var(--text-mute);
}

.content-section strong { color: var(--text); font-weight: 600; }
.content-section em { color: var(--text); font-style: italic; }

.content-section a { color: var(--accent); }
.content-section a:hover { color: var(--accent-hover); }

.content-section .lead {
    font-family: var(--serif);
    font-size: 1.32rem;
    line-height: 1.55;
    color: var(--text);
    font-weight: 400;
    margin-bottom: 28px;
    max-width: 760px;
}

/* Draft / placeholder banners */
.draft-banner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 22px;
    border-radius: 0;
    background: var(--bg-alt);
    border: none;
    border-left: 3px solid var(--accent);
    margin-bottom: 32px;
    max-width: 760px;
}

.draft-banner i {
    color: var(--accent);
    font-size: 0.9rem;
    margin-top: 4px;
    flex-shrink: 0;
}

.draft-banner div {
    font-size: 0.9rem;
    color: var(--text-soft);
    line-height: 1.7;
}

.draft-banner strong {
    color: var(--text);
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

/* Case study cards */
.case-study {
    padding: 32px 32px;
    border-radius: 0;
    border: 1px solid var(--rule);
    background: transparent;
    box-shadow: none;
    margin-bottom: 22px;
    transition: background var(--transition);
}

.case-study:hover { background: var(--surface); }

.case-study-tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    margin-bottom: 12px;
}

.case-study h3 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text);
    margin: 0 0 10px;
}

.case-study p {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.8;
    margin-bottom: 12px;
    max-width: none;
}

.case-study p:last-child { margin-bottom: 0; }

.case-study .case-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--rule);
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-mute);
    letter-spacing: 0.06em;
}

.case-study .case-meta strong {
    color: var(--text);
    font-weight: 500;
}

/* Literature reference list */
.lit-list {
    list-style: none;
    counter-reset: lit-counter;
    padding: 0;
    margin: 0;
    max-width: none;
}

.lit-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 18px;
    padding: 18px 22px 18px 0;
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.75;
    color: var(--text-soft);
    border-left: 2px solid transparent;
    border-bottom: 1px solid var(--rule);
    transition: background var(--transition), border-left-color var(--transition), padding-left var(--transition);
    counter-increment: lit-counter;
}

.lit-item:last-child { border-bottom: none; }

.lit-item::before {
    content: counter(lit-counter, decimal-leading-zero);
    font-family: var(--mono);
    font-size: 0.6rem;
    color: var(--text-mute);
    letter-spacing: 0.08em;
    padding-top: 4px;
    text-align: right;
}

.lit-item:hover {
    background: var(--surface);
    border-left-color: var(--accent);
    padding-left: 18px;
}

.lit-item strong { color: var(--text); font-weight: 600; }
.lit-item em { color: var(--text-mute); font-style: italic; }

.lit-item .lit-link {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    font-size: 0.78rem;
    color: var(--accent);
    opacity: 0.65;
    transition: opacity var(--transition);
}

.lit-item:hover .lit-link { opacity: 1; }

.lit-category {
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin: 36px 0 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--rule);
    display: flex;
    align-items: center;
    gap: 14px;
}

.lit-category::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rule);
}

.lit-category:first-child { margin-top: 0; }

/* Tutorial step blocks */
.tutorial-step {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 22px;
    padding: 28px 0;
    border-bottom: 1px solid var(--rule);
}

.tutorial-step:last-child { border-bottom: none; }

.tutorial-step-num {
    font-family: var(--serif);
    font-size: 2.4rem;
    font-weight: 400;
    line-height: 1;
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--accent);
}

.tutorial-step-body h3 {
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text);
    margin: 0 0 8px;
}

.tutorial-step-body p {
    font-size: 0.96rem;
    color: var(--text-soft);
    line-height: 1.8;
    margin-bottom: 12px;
    max-width: none;
}

.tutorial-step-body p:last-child { margin-bottom: 0; }

.screenshot-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    border-radius: 0;
    border: 1px dashed var(--rule-dark);
    background: var(--bg-alt);
    color: var(--text-mute);
    font-family: var(--mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 14px 0 0;
    flex-direction: column;
    gap: 8px;
}

.screenshot-placeholder i {
    font-size: 1.5rem;
    color: var(--text-mute);
    opacity: 0.7;
}

/* People / org cards */
.people-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin-top: 24px;
    border: 1px solid var(--rule);
}

.person-card {
    display: flex;
    gap: 18px;
    padding: 24px 26px;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    background: transparent;
    box-shadow: none;
    transition: background var(--transition);
}

.person-card:nth-child(2n) { border-right: none; }
.person-card:nth-last-child(-n+2) { border-bottom: none; }
.person-card:hover { background: var(--surface); }

.person-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 0;
    background: var(--bg-alt);
    border: 1px solid var(--rule);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.15rem;
}

.person-card h4 {
    font-family: var(--sans);
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 2px;
}

.person-card .person-role {
    font-family: var(--mono);
    font-size: 0.62rem;
    color: var(--accent);
    margin: 0 0 8px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.person-card .person-affil {
    font-size: 0.84rem;
    color: var(--text-mute);
    line-height: 1.55;
    margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .marvin-hero { padding: 44px 0 36px; }
    .marvin-hero-inner {
        grid-template-columns: 1fr;
    }
    .marvin-hero-inner::before { display: none; }
    .marvin-hero-copy { padding: 0 28px; }
    .marvin-hero-actions {
        flex-direction: row;
        flex-wrap: wrap;
        border-left: none;
        border-top: 1px solid var(--rule);
        margin-top: 28px;
    }
    .marvin-hero-actions .btn {
        flex: 1;
        border-bottom: none;
        border-right: 1px solid var(--rule);
    }
    .marvin-hero-actions .btn:last-child { border-right: none; }

    .marvin-module-tabs > .container { grid-template-columns: 1fr; }
    .marvin-module-tabs > .container::before { display: none; }
    .marvin-module-tab {
        border-right: none;
        border-bottom: 1px solid var(--rule);
        padding: 18px 28px;
    }
    .marvin-module-tab:last-child { border-bottom: none; }

    .module-page-summary > .container { grid-template-columns: 1fr; }
    .module-page-summary > .container::before { display: none; }
    .module-page-summary::before { display: none; }
    .module-page-summary .module-badge,
    .module-page-summary h1,
    .module-page-summary .tool-tagline { padding-left: 28px; padding-right: 28px; margin-left: 0; }

    .module-grid { display: block; }
    .module-card {
        grid-template-columns: 60px 1fr;
        gap: 14px 18px;
        padding: 24px 28px;
    }
    .module-card::before { display: none; }
    .module-card .module-subtitle,
    .module-card .module-title,
    .module-card .module-desc,
    .module-card .module-arrow {
        grid-column: 2;
    }

    .tool-overview { grid-template-columns: 1fr; gap: 36px; }

    .feature-grid { grid-template-columns: 1fr; }
    .feature-card { border-right: none; }
    .feature-card:last-child { border-bottom: none; }

    .method-grid { grid-template-columns: 1fr; }
    .method-card { border-right: none; border-bottom: 1px solid var(--rule); }
    .method-card:last-child { border-bottom: none; }

    .quadrant-grid { grid-template-columns: 1fr; }
    .quadrant-card { border-right: none; }

    .related-tools { grid-template-columns: 1fr; }
    .related-tool { border-right: none; border-bottom: 1px solid var(--rule); }
    .related-tool:last-child { border-bottom: none; }

    .people-grid { grid-template-columns: 1fr; }
    .person-card { border-right: none; }

    .tool-tabs > .container { grid-template-columns: 80px repeat(5, auto); display: flex; }
    .tool-tabs > .container::before { display: none; }
    .tool-tab { padding: 14px 16px; font-size: 0.6rem; }

    .tool-hero,
    .tool-page-header { padding: 44px 0 32px; }

    .content-section > .container {
        grid-column: 1;
        padding: 40px 28px;
    }

    .content-section {
        grid-template-columns: 1fr;
    }

    .content-section::before {
        display: none;
    }

    .content-section > .container > * {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 480px) {
    .marvin-hero-actions { flex-direction: column; }
    .marvin-hero-actions .btn { border-right: none; border-bottom: 1px solid var(--rule); }
    .marvin-hero-actions .btn:last-child { border-bottom: none; }
    .tool-hero .tool-actions { flex-direction: column; align-items: stretch; }
    .tool-hero .tool-actions .btn { justify-content: center; }
    .tutorial-step { grid-template-columns: 1fr; gap: 8px; }
    .tutorial-step-num { font-size: 1.8rem; }
    .case-study { padding: 24px 22px; }
}
