/* ==========================================================================
   Brutal design system — shared across the new site layouts.
   Source: public/new-article-design.html + public/new-frontpage-design.html
   ========================================================================== */

/* --- 1. CSS VARIABLES (LIGHT MODE DEFAULT) --- */
:root {
    --primary: #f7b32b;
    --primary-hover: #e0a020;
    --bg-color: #fcfbf9;
    --surface-color: #f4f1ea;
    --surface-alt: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #555555;
    --border-color: #1a1a1a;
    --blue-banner: #3b82f6;

    --border-width: 2px;
    --shadow-offset: 4px;
    --shadow-offset-large: 8px;
}

/* --- 2. DARK MODE OVERRIDES (explicit, via toggle) --- */
[data-theme="dark"] {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --surface-alt: #2a2a2a;
    --text-main: #fcfbf9;
    --text-muted: #a0a0a0;
    --border-color: #fcfbf9;
}

/* --- 3. SYSTEM DARK MODE (active when toggle is on "system") --- */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-color: #121212;
        --surface-color: #1e1e1e;
        --surface-alt: #2a2a2a;
        --text-main: #fcfbf9;
        --text-muted: #a0a0a0;
        --border-color: #fcfbf9;
    }
}

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

body {
    font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.2s, color 0.2s;
}

/* --- UTILITIES --- */
.brutal-border { border: var(--border-width) solid var(--border-color); }
.brutal-shadow { box-shadow: var(--shadow-offset) var(--shadow-offset) 0px var(--border-color); }
.brutal-shadow-large { box-shadow: var(--shadow-offset-large) var(--shadow-offset-large) 0px var(--border-color); }
.mono { font-family: monospace; }

a { color: var(--text-main); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; transition: max-width 0.3s ease; }
.text-container { max-width: 800px; margin: 0 auto; }

/* --- TOP BANNER (home, tools, casparcg) --- */
.top-banner {
    background-color: var(--blue-banner);
    color: #ffffff;
    text-align: center;
    padding: 8px;
    font-family: monospace;
    font-weight: bold;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}
.top-banner .btn-small {
    background-color: var(--primary);
    color: #1a1a1a;
    padding: 2px 8px;
    border: 1px solid #1a1a1a;
    cursor: pointer;
}

/* --- HEADER --- */
header {
    padding: 10px 0;
    border-bottom: var(--border-width) solid var(--border-color);
    background-color: var(--bg-color);
    margin-bottom: 40px;
}
.navbar { display: flex; justify-content: space-between; align-items: center; max-width: 1800px; margin: 0 auto; padding: 0 20px; }

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 900;
    font-family: monospace;
    text-transform: lowercase;
    color: var(--text-main);
}
.nav-brand-highlight {
    background-color: var(--primary);
    color: #1a1a1a;
    padding: 1px 6px;
    margin-right: 0;
}

.nav-links { display: flex; align-items: center; gap: 20px; font-family: monospace; font-size: 0.9rem; text-transform: uppercase; }

.nav-btn {
    background-color: var(--primary);
    color: #1a1a1a;
    padding: 8px 16px;
    text-transform: uppercase;
    font-weight: bold;
    transition: transform 0.1s;
    text-decoration: none;
}
.nav-btn:hover { text-decoration: none; }
.nav-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0px var(--border-color); }

/* --- THEME TOGGLE BUTTON --- */
.theme-btn {
    background-color: var(--surface-alt);
    color: var(--text-main);
    border: var(--border-width) solid var(--border-color);
    width: 34px;
    height: 34px;
    padding: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s;
}
.theme-btn:active { transform: translate(2px, 2px); }
.theme-btn svg { width: 16px; height: 16px; stroke-width: 2.5; }

/* --- HERO (home) --- */
.hero { padding: 40px 0 80px; display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.hero-tag { display: inline-block; font-family: monospace; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; border: 1px solid var(--text-muted); padding: 4px 12px; margin-bottom: 30px; color: var(--text-muted); }
.hero h1 { font-size: 3.5rem; font-weight: 900; line-height: 1.1; margin-bottom: 25px; text-transform: uppercase; }
.hero h1 mark { background-color: var(--primary); color: #1a1a1a; padding: 0 10px; display: inline-block; }
.hero p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 30px; font-family: monospace; max-width: 450px; }

/* --- EDITOR WINDOW (hero panel) --- */
.editor-window { background-color: var(--surface-color); display: flex; flex-direction: column; }
.editor-header { display: flex; border-bottom: var(--border-width) solid var(--border-color); background-color: var(--surface-alt); }
.editor-tab { padding: 10px 20px; font-family: monospace; font-size: 0.85rem; border-right: var(--border-width) solid var(--border-color); font-weight: bold; }
.editor-tab.active { background-color: var(--surface-color); }
.editor-body { padding: 30px; font-family: monospace; }

.code-output-wrapper { background-color: var(--surface-alt); border: 2px dashed var(--text-muted); padding: 20px; position: relative; margin-top: 10px; }
.code-output { font-size: 1.1rem; font-weight: bold; color: var(--text-main); display: flex; justify-content: space-between; align-items: center; }
.calc-result { font-size: 1.5rem; color: var(--blue-banner); }

.hero-image-body { padding: 0; }
.hero-image { display: block; width: 100%; height: auto; image-rendering: pixelated; }

/* --- SECTIONS & CARD GRID (home) --- */
.section-container { margin-bottom: 80px; }
.section-tag { display: inline-block; background-color: var(--primary); color: #1a1a1a; padding: 4px 12px; font-family: monospace; font-weight: bold; text-transform: uppercase; margin-bottom: 25px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.card { background-color: var(--surface-color); padding: 30px; display: flex; flex-direction: column; transition: transform 0.2s ease; color: var(--text-main); }
.card:hover { transform: translate(-2px, -2px); text-decoration: none; box-shadow: 6px 6px 0px var(--border-color); }

.card-badge { background-color: var(--primary); color: #1a1a1a; display: inline-block; padding: 4px 8px; font-family: monospace; font-weight: bold; margin-bottom: 15px; align-self: flex-start; }
.card-badge.wip { background-color: var(--blue-banner); color: #ffffff; }
.card-badge.alt { background-color: var(--surface-alt); color: var(--text-main); }

.card h3 { font-size: 1.2rem; margin-bottom: 15px; text-transform: uppercase; }
.card p { color: var(--text-muted); font-size: 0.95rem; font-family: monospace; }

/* --- PAGE HEADER (tool / article pages) --- */
.page-header { margin-bottom: 40px; }
.breadcrumbs { font-family: monospace; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 15px; text-transform: uppercase; }
.breadcrumbs a { color: var(--text-muted); font-weight: normal; }
.page-title { font-size: 2.8rem; font-weight: 900; text-transform: uppercase; line-height: 1.1; margin-bottom: 15px; }
.page-desc { font-size: 1.15rem; color: var(--text-muted); font-family: monospace; margin-bottom: 25px; }

.meta-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.tag { background-color: var(--primary); color: #1a1a1a; padding: 4px 12px; font-family: monospace; font-weight: bold; font-size: 0.8rem; text-transform: uppercase; border: 1px solid var(--border-color); }
.tag.alt { background-color: var(--surface-alt); color: var(--text-main); }

/* --- APP WINDOW (tool shell) --- */
.tool-page-wrapper { display: flex; flex-direction: column; }
/* In a column flex container, cross-axis (width) stretch can size an
   auto-width item off its widest non-wrapping content (e.g. a formula
   <pre> block) instead of the container's width, overflowing the
   viewport on mobile. Forcing width:100% pins it to the wrapper's
   width; the pre's own overflow-x:auto then scrolls internally instead. */
.tool-page-wrapper > * { min-width: 0; width: 100%; }
.tool-app-window {
    background-color: var(--surface-color);
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    width: 100%;
}
.app-header {
    background-color: var(--surface-alt);
    border-bottom: var(--border-width) solid var(--border-color);
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.app-title { font-family: monospace; font-weight: bold; font-size: 0.85rem; }
.app-controls { display: flex; gap: 8px; }
.app-dot { width: 12px; height: 12px; border: 2px solid var(--border-color); border-radius: 50%; }
.app-dot.close { background-color: #ef4444; }
.app-dot.min { background-color: #f59e0b; }
.app-dot.max { background-color: #10b981; }
.app-body { padding: 40px; }

/* --- 404 PAGE --- */
.notfound-hero {
    background-image: url("/img/garden-404.webp");
    background-size: cover;
    background-position: center bottom;
    image-rendering: pixelated;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    /* Cancel the global header/footer spacing so the background reaches
       both edges — scoped to this page only, other layouts are untouched. */
    margin: -40px 0 -60px;
}
.notfound-window { max-width: 480px; width: 100%; }
.notfound-window h1 { font-size: 2.5rem; font-weight: 900; line-height: 1.1; margin: 15px 0 20px; text-transform: uppercase; }
.notfound-window h1 mark { background-color: var(--primary); color: #1a1a1a; padding: 0 10px; display: inline-block; }
.notfound-window p { font-family: monospace; color: var(--text-muted); margin-bottom: 25px; }

/* --- TOOL LAYOUT & FORM CONTROLS --- */
.tool-layout-complex { display: grid; grid-template-columns: 1fr; gap: 30px; }
@media (min-width: 1000px) {
    .tool-layout-complex { grid-template-columns: 1fr 400px; }
}

.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-family: monospace; font-weight: bold; margin-bottom: 8px; }
.input-group select, .input-group input, .input-group textarea {
    width: 100%; padding: 12px; font-family: monospace; font-size: 1rem;
    border: 2px solid var(--border-color); background: var(--surface-alt); color: var(--text-main);
}
.input-group input:focus, .input-group select:focus, .input-group textarea:focus { outline: none; border-color: var(--primary); }

.input-with-unit { display: flex; }
.input-with-unit input { flex: 1 1 auto; min-width: 0; }
.input-unit {
    display: flex; align-items: center; padding: 0 14px;
    font-family: monospace; font-weight: bold; font-size: 0.9rem;
    border: 2px solid var(--border-color); border-left: none;
    background: var(--surface-color); color: var(--text-muted);
    white-space: nowrap;
}
.input-icon-btn {
    display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
    height: auto; padding: 0 14px;
    border: 2px solid var(--border-color); border-right: none;
    background: var(--surface-color); color: var(--text-main);
    cursor: pointer;
}
.input-icon-btn svg { width: 18px; height: 18px; }
.input-icon-btn:hover, .input-icon-btn:focus-visible { background: var(--surface-alt); outline: none; }

.field-grid { display: grid; grid-template-columns: 1fr; column-gap: 20px; }
@media (min-width: 640px) {
    .field-grid { grid-template-columns: 1fr 1fr; }
}

/* --- Camera / sensor mega-dropdown (icon trigger merged into the sensor input) --- */
.camera-dropdown { position: relative; display: flex; }
.camera-dropdown.open .input-icon-btn { background: var(--primary); color: #1a1a1a; }

.camera-dropdown-panel {
    display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 30;
    width: max-content; min-width: 280px; max-width: min(640px, 90vw);
    background: var(--surface-alt); border: 2px solid var(--border-color);
    box-shadow: var(--shadow-offset-large) var(--shadow-offset-large) 0px var(--border-color);
    padding: 20px;
}
.camera-dropdown.open .camera-dropdown-panel { display: block; }

.camera-dropdown-columns { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 560px) {
    .camera-dropdown-columns { flex-direction: row; }
    .camera-dropdown-col-compact { border-left: 2px solid var(--border-color); padding-left: 20px; }
}
.camera-dropdown-col-main { flex: 1 1 60%; display: flex; flex-direction: column; gap: 4px; }
.camera-dropdown-col-compact { flex: 1 1 40%; display: flex; flex-direction: column; gap: 4px; }

.camera-option {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    width: 100%; padding: 10px 12px; font-family: monospace; font-weight: normal; text-transform: none; text-align: left;
    border: 2px solid transparent; background: transparent; color: var(--text-main);
}
.camera-option:hover, .camera-option:focus-visible { border-color: var(--border-color); background: var(--surface-color); outline: none; }
.camera-option-title { font-weight: bold; font-size: 0.95rem; }
.camera-option-sub { font-size: 0.8rem; color: var(--text-muted); }

.camera-option-compact {
    display: block; width: 100%; padding: 8px 10px; font-family: monospace; font-weight: normal; font-size: 0.9rem;
    text-transform: none; text-align: left; border: 2px solid transparent; background: transparent; color: var(--text-main);
}
.camera-option-compact:hover, .camera-option-compact:focus-visible { border-color: var(--border-color); background: var(--surface-color); outline: none; }

.history-list { list-style: none; }
.history-item {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
    padding: 12px 0; border-bottom: 2px solid var(--border-color);
}
.history-item:last-child { border-bottom: none; }
.history-item-title { font-family: monospace; font-weight: bold; font-size: 0.9rem; margin-bottom: 4px; }
.history-item-subtitle { font-family: monospace; font-size: 0.8rem; color: var(--text-muted); }
.history-item-delete {
    flex: 0 0 auto; width: 22px; height: 22px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--border-color); background: var(--surface-alt); color: var(--text-main);
    font-family: monospace; font-weight: bold; font-size: 0.8rem; line-height: 1; cursor: pointer;
}
.history-item-delete:active { transform: translate(1px, 1px); }
.history-empty { font-family: monospace; font-size: 0.9rem; color: var(--text-muted); }

.btn, .btn-run, button {
    background: var(--surface-alt); color: var(--text-main); border: 2px solid var(--border-color);
    padding: 10px 20px; font-family: monospace; font-weight: bold; font-size: 0.95rem;
    cursor: pointer; text-transform: uppercase; transition: transform 0.1s;
}
.btn:active, .btn-run:active, button:active { transform: translate(2px, 2px); }
a.btn { display: inline-block; text-decoration: none; }

.btn-run {
    background: var(--blue-banner); color: #ffffff;
    padding: 12px 24px; font-size: 1.1rem; width: 100%;
}
.btn-secondary { background: var(--surface-alt); color: var(--text-main); }

.log-window { background-color: #121212; color: #10b981; font-family: monospace; border: 2px solid var(--border-color); display: flex; flex-direction: column; }
.log-header { background-color: #2a2a2a; color: white; padding: 5px 15px; font-size: 0.8rem; text-transform: uppercase; border-bottom: 2px solid var(--border-color); }
.log-content { padding: 15px; overflow-y: auto; font-size: 0.9rem; }

/* --- Filter chips & selects generated dynamically by tool scripts --- */
.filter-item {
    display: inline-block; margin: 0 8px 8px 0; padding: 6px 14px;
    font-family: monospace; font-size: 0.85rem; font-weight: bold;
    border: 2px solid var(--border-color); background: var(--surface-alt); color: var(--text-main);
    cursor: pointer; text-transform: uppercase;
}
.filter-item.active { background: var(--primary); color: #1a1a1a; }
.dropdown { font-family: monospace; padding: 6px 10px; border: 2px solid var(--border-color); background: var(--surface-alt); color: var(--text-main); }

/* --- Tables generated dynamically inside .app-body --- */
.app-body table { border-collapse: collapse; margin-top: 20px; }
.app-body th, .app-body td { border: 1px solid var(--border-color); padding: 6px 10px; text-align: center; font-family: monospace; font-size: 0.85rem; }
.app-body th.rotate { transform: rotate(-90deg); width: 50px; white-space: nowrap; }

/* --- Custom tabs (replaces Bootstrap nav-tabs) --- */
.tab-nav { display: flex; flex-wrap: wrap; border-bottom: var(--border-width) solid var(--border-color); margin-bottom: 20px; }
.tab-btn {
    padding: 10px 20px; font-family: monospace; font-weight: bold; font-size: 0.9rem;
    background: var(--surface-alt); border: 2px solid var(--border-color); border-bottom: none;
    margin-right: 4px; margin-bottom: -2px; cursor: pointer; color: var(--text-muted); text-transform: uppercase;
}
.tab-btn.active { background: var(--surface-color); color: var(--text-main); }
.tab-btn.add-tab-btn { color: var(--text-main); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* --- Hover tooltips (small "?" icon next to a label) --- */
.tooltip-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto;
    border: 2px solid var(--border-color); background: var(--surface-alt); color: var(--text-muted);
    font-family: monospace; font-size: 0.7rem; font-weight: bold; line-height: 1;
    cursor: help; margin-left: 6px; vertical-align: middle;
}
[data-tooltip] { position: relative; }
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 40;
    width: max-content; max-width: 240px;
    background: var(--text-main); color: var(--bg-color);
    border: 2px solid var(--border-color);
    padding: 8px 10px; font-family: monospace; font-size: 0.75rem; font-weight: normal;
    text-transform: none; white-space: normal; line-height: 1.4;
    opacity: 0; pointer-events: none; transition: opacity 0.15s ease;
}
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { opacity: 1; }

/* --- Compact auto-fit field grid (dense config-style tools) --- */
.field-grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }

/* --- Compact checkbox rows --- */
.check-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.check-row input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; flex: 0 0 auto; }
.check-row label { font-family: monospace; font-weight: bold; font-size: 0.85rem; margin: 0; cursor: pointer; text-transform: none; }

/* --- Inline note / warning banner inside a tool panel --- */
.tool-note { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 30px; background: var(--surface-alt); font-family: monospace; font-size: 0.9rem; color: var(--text-muted); }

/* --- Collapsible consumer sections inside channel panels --- */
.consumer-section { border-top: 2px solid var(--border-color); padding-top: 14px; margin-top: 14px; }
.consumer-section:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.consumer-fields { margin-top: 10px; }
.consumer-fields[hidden] { display: none; }
.channel-panel-actions { display: flex; justify-content: flex-end; margin-top: 20px; }

/* --- OSC client rows --- */
.osc-client-row { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 14px; }
.osc-client-row .input-group { flex: 1 1 auto; margin-bottom: 0; }
.osc-client-row .history-item-delete { margin-bottom: 2px; }

#config-output {
    width: 100%; min-height: 320px; resize: vertical;
    font-family: monospace; font-size: 0.85rem; line-height: 1.5;
    border: 2px solid var(--border-color); background: var(--surface-alt); color: var(--text-main); padding: 14px;
}
#config-output.invalid { border-color: #ef4444; }

/* --- CGCONFIG TOOL (denser spacing than the default tool panel) --- */
.app-body:has(.cgconfig) { padding: 24px; }
.app-body:has(.fsc-wrap) { padding: 0; }
.cgconfig h3 { font-size: 1rem; text-transform: uppercase; font-family: monospace; margin: 22px 0 10px; }
.cgconfig h3:first-child { margin-top: 0; }
.cgconfig .input-group { margin-bottom: 12px; }
.cgconfig .input-group select, .cgconfig .input-group input { padding: 8px 10px; }
.cgconfig .field-grid-auto { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cgconfig .tab-nav { margin-bottom: 14px; }
.cgconfig .tab-btn { padding: 8px 14px; }
.cgconfig .check-row { margin-bottom: 6px; }
.cgconfig .consumer-section { padding-top: 10px; margin-top: 10px; }
.cgconfig .channel-panel-actions { margin-top: 12px; }
.cgconfig .osc-client-row { margin-bottom: 10px; }
.cgconfig #config-output { min-height: 220px; }

/* --- ARTICLE CONTENT (Markdown styling) --- */
.article-content { font-size: 1.1rem; color: var(--text-main); padding-bottom: 100px; }
.article-content h2 { font-size: 1.8rem; font-weight: 900; text-transform: uppercase; margin: 0 0 20px 0; border-bottom: 4px solid var(--primary); display: inline-block; padding-bottom: 5px; }
.article-content h3 { font-size: 1.4rem; font-weight: 800; margin: 40px 0 15px 0; }
.article-content p { margin-bottom: 20px; }
.article-content ul, .article-content ol { margin: 0 0 20px 40px; }
.article-content img { max-width: 100%; height: auto; }
.article-content .editor-window { margin-bottom: 30px; }

.article-content blockquote {
    background-color: var(--surface-color); border-left: 8px solid var(--blue-banner);
    padding: 20px; margin: 30px 0; font-style: italic; border: 2px solid var(--border-color);
    box-shadow: 4px 4px 0px var(--border-color);
}

.article-content pre {
    background-color: #121212; color: #f4f1ea; padding: 20px; overflow-x: auto;
    margin: 30px 0; border: 2px solid var(--border-color); box-shadow: 4px 4px 0px var(--primary); font-family: monospace; font-size: 0.9rem;
}
.article-content code { font-family: monospace; background-color: var(--surface-alt); padding: 2px 6px; border: 1px solid var(--border-color); font-size: 0.9em; }
.article-content pre code { background: transparent; border: none; padding: 0; }

/* --- ABOUT PAGE (creative one-off layout) --- */
.about-header { margin-bottom: 40px; }
.about-title { font-size: 3.2rem; font-weight: 900; text-transform: uppercase; line-height: 1.1; margin-top: 15px; }
.about-title mark { background-color: var(--primary); color: #1a1a1a; padding: 0 10px; display: inline-block; }

.about-content.article-text-container { max-width: 800px; margin-left: auto; margin-right: auto; }
.about-content .article-content { font-size: 1.15rem; column-count: 1; }
.about-content .article-content > p:first-of-type { font-family: monospace; font-size: 1.2rem; color: var(--text-muted); }

/* Full-width panorama, break out of the article's text column. The
   source image is ultra-wide so it's shown at full page width with no
   cropping — width:100% + height:auto keeps its native aspect ratio. */
.garden-wide-wrap {
    width: 100vw;
    margin-top: 40px;
    margin-bottom: 40px;
    margin-left: calc(50% - 50vw);
}
.garden-wide-image {
    display: block;
    width: 100%;
    height: auto;
    image-rendering: pixelated;
}

/* --- FOOTER --- */
.site-footer { border-top: var(--border-width) solid var(--border-color); margin-top: 60px; padding: 20px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; font-family: monospace; font-size: 0.85rem; color: var(--text-muted); flex-wrap: wrap; gap: 10px; }

/* --- FULLSCREEN TOOL LAYOUT ---
   Used by layouts/brutal-fullscreen.njk. The site header is tucked out of
   view and only slides down while the pointer sits in the top 15% of the
   viewport, so a tool can be shown chrome-free (e.g. as an OBS browser
   source) while still leaving a way back to the rest of the site. */
.fullscreen-body { margin: 0; overflow: hidden; }
.fullscreen-hover-trigger {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 15vh;
    z-index: 100;
}
.fullscreen-hover-trigger header {
    position: absolute;
    top: 0; left: 0; right: 0;
    margin-bottom: 0;
    transform: translateY(-100%);
    transition: transform 0.25s ease;
}
.fullscreen-hover-trigger:hover header,
.fullscreen-hover-trigger:focus-within header {
    transform: translateY(0);
}
.fullscreen-stage { position: fixed; inset: 0; z-index: 1; }

/* --- RESPONSIVENESS: ULTRAWIDE SCREENS --- */
@media (min-width: 1600px) {
    .container { max-width: 1700px; }
    .tool-page-wrapper { display: grid; grid-template-columns: 1fr 500px; gap: 60px; align-items: start; }
    .article-text-container { margin: 0; max-width: none; }
    .tool-app-window { margin-bottom: 0; }
}
@media (min-width: 2000px) {
    .tool-page-wrapper { grid-template-columns: 1fr 900px; }
    .article-content { column-count: 2; column-gap: 60px; }
    .article-content h2, .article-content h3, .article-content pre, .article-content blockquote, .article-content .editor-window { break-inside: avoid; margin-top: 0; }
}
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .page-title { font-size: 2.2rem; }
    .nav-links > a { display: none; }
}
