/* =================================================================
 * Skeleton Theme — frontend-layout.css
 * =================================================================
 * Core structural stylesheet for the Marsho CMS.
 *
 * Provides CSS custom properties (design tokens), a complete
 * typography scale, the column-layout scaffolding for six
 * layout configurations, grid patterns, navigation, footer,
 * section spacing, and responsive breakpoints.
 *
 * Layout Column System
 * --------------------
 * The frontend layout component defines six column arrangements
 * via the $layout blade variable. Each row uses CSS flexbox with
 * gap-compensated flex-basis widths.
 *
 *   ┌──────────────────────────────────────────────────────────────┐
 *   │ 1-column                │ layout-col-full     │ 100%         │
 *   ├─────────────────────────┼─────────────────────┼──────────────┤
 *   │ 2-column                │ layout-col-50 ×2    │ 50% / 50%    │
 *   │ 2-column-33-67          │ layout-col-33 + 67  │ 33% / 67%    │
 *   │ 2-column-67-33          │ layout-col-67 + 33  │ 67% / 33%    │
 *   ├─────────────────────────┼─────────────────────┼──────────────┤
 *   │ 3-column                │ layout-col-33 ×3    │ 33%/33%/33%  │
 *   │ 3-column-25-50-25       │ layout-col-25+50+25 │ 25%/50%/25%  │
 *   └─────────────────────────┴─────────────────────┴──────────────┘
 *
 * Responsive cascade:
 *   ≤ 768 px → 3-col drops to 2-col (last column goes full-width)
 *   ≤ 480 px → all layouts collapse to single column
 */

/* =================================================================
   1. CSS Custom Properties (Design Tokens)
   ================================================================= */
:root {
    /* --- Typography --- */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    --font-serif: Georgia, 'Times New Roman', serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Courier New', monospace;

    /* Legacy alias — still referenced in component styles */
    --font: var(--font-sans);

    --font-base-size: 16px;
    --line-height: 1.7;

    /* Type scale (modular: 1.25 ratio) */
    --fs--2: 0.64rem;
    --fs--1: 0.80rem;
    --fs-0:  1.00rem;
    --fs-1:  1.25rem;
    --fs-2:  1.563rem;
    --fs-3:  1.953rem;
    --fs-4:  2.441rem;
    --fs-5:  3.052rem;

    --fw-normal:   400;
    --fw-medium:   500;
    --fw-semibold: 600;
    --fw-bold:     700;
    --fw-extrabold: 800;
    --fw-black:    900;

    /* --- Spacing (8 px base) --- */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.5rem;
    --space-6:  2rem;
    --space-7:  2.5rem;
    --space-8:  3rem;
    --space-9:  4rem;
    --space-10: 5rem;
    --space-11: 6.25rem;
    --space-12: 7.5rem;

    /* --- Colors (neutral skeleton palette) --- */
    --color-white:    #ffffff;
    --color-gray-50:  #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    --color-black:    #030712;

    /* Semantic color roles */
    --color-primary:       #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-accent:        #7c3aed;
    --color-success:       #10b981;
    --color-warning:       #f59e0b;
    --color-danger:        #ef4444;
    --color-info:          #06b6d4;

    /* Surfaces */
    --surface-body:   var(--color-white);
    --surface-raised: var(--color-white);
    --surface-subtle: var(--color-gray-50);
    --surface-hover:  var(--color-gray-100);

    /* Text */
    --text-heading:     var(--color-gray-900);
    --text-body:        var(--color-gray-700);
    --text-muted:       var(--color-gray-500);
    --text-link:        #000000;
    --text-link-hover:  #e53935;
    --text-inverse:     var(--color-white);

    /* Borders */
    --border-color:     var(--color-gray-200);
    --border-radius:    8px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.12);

    /* Layout */
    --layout-max-width:   1100px;
    --layout-gutter:      24px;
    --layout-column-gap:  20px;

    /* --- Legacy aliases (referenced by existing component styles) --- */
    --gray-border: var(--border-color);
    --black:       var(--color-gray-900);
    --white:       var(--color-white);
    --text:        var(--text-body);
    --red:         #e53935;
    --red-soft:    #fce4ec;
}

/* =================================================================
   2. Reset & Base Body
   ================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: var(--font-base-size);
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    font-family: var(--font-sans);
    font-size: var(--fs-0);
    line-height: var(--line-height);
    color: var(--text-body);
    background-color: var(--surface-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =================================================================
   3. Typography Scale
   ================================================================= */
h1, .h1 {
    font-size: clamp(40px, 7vw, 84px);
    font-weight: var(--fw-black);
    color: var(--text-heading);
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: var(--space-5);
}

h1 span { color: var(--color-primary); }

h2, .h2 {
    font-size: var(--fs-4);
    font-weight: var(--fw-extrabold);
    line-height: 1.2;
    color: var(--text-heading);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-4);
}

h3, .h3 {
    font-size: var(--fs-3);
    font-weight: var(--fw-bold);
    line-height: 1.3;
    color: var(--text-heading);
    margin-bottom: var(--space-3);
}

h4, .h4 {
    font-size: var(--fs-2);
    font-weight: var(--fw-bold);
    line-height: 1.35;
    color: var(--text-heading);
    margin-bottom: var(--space-2);
}

h5, .h5 {
    font-size: var(--fs-1);
    font-weight: var(--fw-semibold);
    line-height: 1.4;
    color: var(--text-heading);
    margin-bottom: var(--space-2);
}

h6, .h6 {
    font-size: var(--fs-0);
    font-weight: var(--fw-semibold);
    line-height: 1.5;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2);
}

p {
    margin-bottom: var(--space-4);
}

a {
    color: var(--text-link);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

a:visited {
    color: var(--text-link);
}

a:hover {
    color: var(--text-link-hover);
}

small, .text-small {
    font-size: var(--fs--1);
}

.text-caption {
    font-size: var(--fs--2);
    color: var(--text-muted);
}

strong, b {
    font-weight: var(--fw-semibold);
    color: var(--text-heading);
}

:not(pre) > code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background-color: var(--surface-subtle);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    color: var(--color-accent);
}

pre {
    background-color: var(--color-gray-900);
    color: var(--color-gray-100);
    padding: var(--space-5);
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin-bottom: var(--space-5);
    font-size: 0.9rem;
}

pre code {
    font-family: var(--font-mono);
    background: none;
    padding: 0;
    border: none;
    color: inherit;
}

blockquote {
    border-left: 4px solid var(--border-color);
    padding-left: var(--space-5);
    margin: var(--space-5) 0;
    color: var(--text-muted);
    font-style: italic;
}

blockquote p:last-child {
    margin-bottom: 0;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: var(--space-7) 0;
}

ul, ol {
    margin-bottom: var(--space-4);
    padding-left: var(--space-5);
}

li {
    margin-bottom: var(--space-2);
}

li:last-child {
    margin-bottom: 0;
}

img {
    max-width: 100%;
    height: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-5);
}

th, td {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

th {
    font-weight: var(--fw-semibold);
    color: var(--text-heading);
    background-color: var(--surface-subtle);
}

tr:last-child td {
    border-bottom: none;
}

/* =================================================================
   4. Markdown Body Styles
   ================================================================= */
.markdown-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-body);
}

.markdown-body > *:first-child { margin-top: 0; }
.markdown-body > *:last-child  { margin-bottom: 0; }

.markdown-body h1 {
    font-size: 2.5rem;
    font-weight: var(--fw-bold);
    color: var(--text-heading);
    margin-bottom: 20px;
    line-height: 1.2;
}

.markdown-body h2 {
    font-size: 1.875rem;
    font-weight: var(--fw-bold);
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--text-heading);
}

.markdown-body h3 {
    font-size: 1.5rem;
    font-weight: var(--fw-semibold);
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-heading);
}

.markdown-body p {
    margin-bottom: 20px;
}

.markdown-body ul,
.markdown-body ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.markdown-body li {
    margin-bottom: 10px;
}

.markdown-body a {
    color: var(--text-link);
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 30px 0;
}

.markdown-body blockquote {
    border-left: 4px solid var(--border-color);
    padding-left: 20px;
    margin: 30px 0;
    color: var(--text-muted);
    font-style: italic;
}

.markdown-body code {
    background-color: var(--surface-subtle);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

.markdown-body pre {
    background-color: var(--color-gray-800);
    color: var(--color-gray-200);
    padding: 20px;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 30px 0;
}

.markdown-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* =================================================================
   5. Article Styles
   ================================================================= */
.article-body {
    max-width: 800px;
    margin: 0 auto;
}
.article-header {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.article-header h1 {
    font-size: 2.5rem;
    font-weight: var(--fw-bold);
    color: var(--text-heading);
    margin-bottom: 15px;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.featured-image {
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: var(--surface-subtle);
    color: var(--color-gray-600);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* =================================================================
   6. Page Content Section
   ================================================================= */
.page-content {
    padding: var(--space-7) 0;
}

.article-content {
    padding: var(--space-7) 0;
}

/* =================================================================
   7. Section Spacing Helpers
   ================================================================= */
.section-flush { padding: 0; }
.section-sm     { padding: var(--space-7) 0; }
.section-md     { padding: var(--space-11) 0; }
.section-lg     { padding: var(--space-12) 0; }

.section-header {
    text-align: center;
    margin-bottom: var(--space-9);
}

.section-header h2 {
    font-size: 36px;
    font-weight: var(--fw-extrabold);
    color: var(--text-heading);
    margin-bottom: var(--space-3);
}

.section-header p {
    color: var(--text-muted);
    font-size: var(--fs-1);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* =================================================================
   8. Page Container & Column Layout (Flex System)
   ================================================================= */
.layout-container {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: 0 var(--layout-gutter);
    gap: var(--layout-column-gap);
}

.layout-container.full-width {
    max-width: none;
}

/* 1-Col */
.layout-1-col .layout-col-full,
.layout-1-column .layout-col-full {
    flex-basis: 100%;
    width: 100%;
}

/* 2-Col (50/50) */
.layout-2-col .layout-col-50,
.layout-2-column .layout-col-50 {
    flex-basis: calc(50% - 10px);
    width: calc(50% - 10px);
}

/* 2-Col (33/67) */
.layout-2-col-33-67 .layout-col-33,
.layout-2-column-33-67 .layout-col-33 {
    flex-basis: calc(33.333% - 10px);
    width: calc(33.333% - 10px);
}

.layout-2-col-33-67 .layout-col-67,
.layout-2-column-33-67 .layout-col-67 {
    flex-basis: calc(66.667% - 10px);
    width: calc(66.667% - 10px);
}

/* 2-Col (67/33) */
.layout-2-col-67-33 .layout-col-67,
.layout-2-column-67-33 .layout-col-67 {
    flex-basis: calc(66.667% - 10px);
    width: calc(66.667% - 10px);
}

.layout-2-col-67-33 .layout-col-33,
.layout-2-column-67-33 .layout-col-33 {
    flex-basis: calc(33.333% - 10px);
    width: calc(33.333% - 10px);
}

/* 3-Col (33/33/33) */
.layout-3-col .layout-col-33,
.layout-3-column .layout-col-33 {
    flex-basis: calc(33.333% - 14px);
    width: calc(33.333% - 14px);
}

/* 3-Col (25/50/25) */
.layout-3-col-25-50-25 .layout-col-25,
.layout-3-column-25-50-25 .layout-col-25 {
    flex-basis: calc(25% - 14px);
    width: calc(25% - 14px);
}

.layout-3-col-25-50-25 .layout-col-50,
.layout-3-column-25-50-25 .layout-col-50 {
    flex-basis: calc(50% - 14px);
    width: calc(50% - 14px);
}

/* =================================================================
   9. Grid-Based Section Layouts
   ================================================================= */

/* 2-Column Grid */
.layout-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

/* 3-Column Grid (Bento) */
.layout-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.layout-grid-3col .layout-col-wide {
    grid-column: span 2;
}

/* =================================================================
   10. Flex Row Sections
   ================================================================= */
.layout-flex-row {
    display: flex;
    gap: 40px;
    justify-content: space-between;
    align-items: center;
}

/* =================================================================
   11. Hero / Section Wrappers
   ================================================================= */
.layout-section-hero {
    padding: 120px 0 80px;
    text-align: center;
}

.layout-section {
    padding: 100px 0;
}

.hero {
    padding: 120px 0 80px;
    text-align: center;
}

.hero p {
    font-size: 20px;
    max-width: 650px;
    margin: 0 auto 40px;
    color: var(--text-body);
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--red-soft);
    color: var(--red);
    border-radius: 100px;
    font-weight: var(--fw-bold);
    font-size: 12px;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-box {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
    background: var(--color-white);
    padding: 8px;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-border);
}

.cta-box input {
    flex: 1;
    border: none;
    padding: 0 16px;
    outline: none;
    font-size: 16px;
    font-family: var(--font);
}

.btn-red,
a.btn-red {
    background: var(--red);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: var(--fw-bold);
    cursor: pointer;
    transition: 0.2s;
}

.btn-red:hover,
a.btn-red:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(229, 57, 53, 0.2);
}

/* =================================================================
   12. Intro / Problem-Solution Section
   ================================================================= */
.intro-grid {
    padding: 100px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.intro-text h2 {
    font-size: 42px;
    font-weight: var(--fw-extrabold);
    color: var(--text-heading);
    line-height: 1.2;
    margin-bottom: 24px;
}

.intro-text p {
    font-size: 18px;
    margin-bottom: 20px;
}

.check-list {
    list-style: none;
}

.check-list li {
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
    font-weight: var(--fw-semibold);
    color: var(--text-heading);
}

.check-list li::before {
    content: '\2713';
    color: var(--color-primary);
    font-weight: var(--fw-black);
}

/* =================================================================
   13. Feature Bento
   ================================================================= */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 100px;
}

.bento-card {
    background: var(--surface-subtle);
    border: 1px solid var(--gray-border);
    padding: 40px;
    border-radius: 24px;
    transition: 0.3s;
}

.bento-card:hover {
    background: var(--color-white);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.bento-card h3 {
    font-size: 22px;
    margin-bottom: 16px;
    color: var(--text-heading);
}

.bento-card.wide {
    grid-column: span 2;
}

.icon {
    width: 48px;
    height: 48px;
    background: var(--color-white);
    border: 1px solid var(--gray-border);
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* =================================================================
   14. Hosted Banner
   ================================================================= */
.hosted-banner {
    background: var(--color-gray-900);
    color: white;
    border-radius: 32px;
    padding: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.hosted-banner h2 {
    font-size: 32px;
    font-weight: var(--fw-extrabold);
    margin-bottom: 16px;
}

.hosted-banner p {
    color: #94a3b8;
    font-size: 18px;
}

/* =================================================================
   15. Navigation (Structural)
   ================================================================= */
nav, .site-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    border-bottom: 1px solid var(--gray-border);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-weight: var(--fw-black);
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-heading);
    text-decoration: none;
}

.logo img {
    height: 28px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-body);
    font-weight: var(--fw-semibold);
    font-size: 14px;
    margin-left: var(--space-5);
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-heading);
}

.nav-links a.active,
.nav-links a[aria-current="page"] {
    color: var(--color-primary);
}

/* =================================================================
   16. Footer (Structural)
   ================================================================= */
footer {
    padding: 80px 0 40px;
    border-top: 1px solid var(--gray-border);
    margin-top: 100px;
}

.footer-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-wrap .logo {
    font-weight: var(--fw-black);
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-heading);
    text-decoration: none;
}

.footer-wrap .logo img {
    height: 28px;
    width: auto;
}

.copyright {
    font-size: var(--fs--1);
    color: var(--text-muted);
}

.footer-nav {
    text-align: center;
    margin-top: var(--space-5);
}

.footer-nav a {
    color: var(--text-body);
    text-decoration: none;
    font-weight: var(--fw-semibold);
    font-size: 14px;
    margin: 0 var(--space-3);
    transition: color 0.15s ease;
}

.footer-nav a:hover {
    color: var(--text-heading);
}

/* =================================================================
   17. Container & Embedded Media
   ================================================================= */
.container img {
    max-width: 100%;
    height: auto;
}

.layout-column img {
    max-width: 100%;
    height: auto;
}

.layout-column table {
    width: 100%;
    overflow-x: auto;
    display: block;
}

/* =================================================================
   18. Responsive — Tablet (≤ 768 px)
   ================================================================= */
@media (max-width: 768px) {
    .layout-container,
    .layout-1-column,
    .layout-1-col {
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-top: 15px;
        padding-bottom: 15px;
        gap: 15px;
    }

    /* 2-col and 3-col last-child → single column */
    .layout-2-col .layout-col-50,
    .layout-2-column .layout-col-50,
    .layout-2-col-33-67 .layout-col-33,
    .layout-2-col-33-67 .layout-col-67,
    .layout-2-column-33-67 .layout-col-33,
    .layout-2-column-33-67 .layout-col-67,
    .layout-2-col-67-33 .layout-col-67,
    .layout-2-col-67-33 .layout-col-33,
    .layout-2-column-67-33 .layout-col-67,
    .layout-2-column-67-33 .layout-col-33,
    .layout-3-col .layout-col-33:last-child,
    .layout-3-column .layout-col-33:last-child {
        flex-basis: 100%;
        width: 100%;
    }

    /* 3-col → 2 columns at 768px (last goes full) */
    .layout-3-col .layout-col-33,
    .layout-3-column .layout-col-33 {
        flex-basis: calc(50% - 7.5px);
        width: calc(50% - 7.5px);
    }

    /* Grid sections → single column */
    .layout-grid-2col,
    .layout-grid-3col {
        grid-template-columns: 1fr;
    }

    /* Flex banners → stacked */
    .layout-flex-row {
        flex-direction: column;
    }

    /* Navigation */
    .site-navigation {
        height: auto;
        min-height: 60px;
    }

    .site-navigation .container {
        padding-top: var(--space-3);
        padding-bottom: var(--space-3);
        flex-wrap: wrap;
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    .site-navigation .logo { order: 1; }

    .mobile-menu-toggle {
        display: block !important;
        order: 3;
    }

    .nav-links {
        order: 4;
        display: none !important;
        flex-direction: column;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid var(--gray-border);
        padding: var(--space-3) 0;
        align-items: stretch;
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-links a {
        padding: var(--space-3) var(--space-5);
        font-size: 15px;
        text-align: left;
        margin-left: 0;
        border-bottom: 1px solid var(--gray-border);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    /* Hero */
    .hero {
        padding: 80px 0 60px;
    }

    .hero p { font-size: 18px; }

    .cta-box { flex-direction: column; }

    /* Intro grid → single column */
    .intro-grid {
        padding: 60px 0;
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .intro-text h2 { font-size: 32px; }

    /* Bento grid → single column */
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-card.wide {
        grid-column: span 1;
    }

    /* Banner → stacked */
    .hosted-banner {
        padding: 40px;
        flex-direction: column;
        text-align: center;
    }

    /* Sections tighten */
    .section-lg   { padding: var(--space-11) 0; }
    .section-md   { padding: var(--space-9) 0; }
    .section-sm   { padding: var(--space-6) 0; }
    .page-content { padding: var(--space-5) 0; }
    .article-content { padding: 20px 0; }

    .section-header { margin-bottom: var(--space-7); }
    .section-header p { font-size: var(--fs-0); }

    /* Typography scale reduces */
    h1, .h1 { font-size: var(--fs-4); }
    h2, .h2 { font-size: var(--fs-3); }
    h3, .h3 { font-size: var(--fs-2); }

    .article-header h1 { font-size: 2rem; }
    .markdown-body { font-size: 1rem; }
    .markdown-body h1 { font-size: 2rem; }

    /* Footer */
    footer {
        padding: 40px 0 20px;
        margin-top: 60px;
    }

    .footer-wrap {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }
}

/* =================================================================
   19. Responsive — Phone (≤ 480 px)
   ================================================================= */
@media (max-width: 480px) {
    .layout-container,
    .layout-1-column,
    .layout-1-col {
        padding-left: 20px !important;
        padding-right: 20px !important;
        padding-top: 12px;
        padding-bottom: 12px;
        gap: 10px;
    }

    /* Everything → single column */
    .layout-2-col .layout-col-50,
    .layout-2-column .layout-col-50,
    .layout-2-col-33-67 .layout-col-33,
    .layout-2-col-33-67 .layout-col-67,
    .layout-2-column-33-67 .layout-col-33,
    .layout-2-column-33-67 .layout-col-67,
    .layout-2-col-67-33 .layout-col-67,
    .layout-2-col-67-33 .layout-col-33,
    .layout-2-column-67-33 .layout-col-67,
    .layout-2-column-67-33 .layout-col-33,
    .layout-3-col .layout-col-33,
    .layout-3-column .layout-col-33,
    .layout-3-col-25-50-25 .layout-col-25,
    .layout-3-col-25-50-25 .layout-col-50,
    .layout-3-column-25-50-25 .layout-col-25,
    .layout-3-column-25-50-25 .layout-col-50 {
        flex-basis: 100%;
        width: 100%;
    }

    h1, .h1 { font-size: var(--fs-3); }
    h2, .h2 { font-size: var(--fs-2); }

    .section-lg   { padding: var(--space-9) 0; }
    .section-md   { padding: var(--space-7) 0; }
    .page-content { padding: var(--space-4) 0; }
}

/* =================================================================
   20. Tablet-Up Overrides
   ================================================================= */
@media (min-width: 769px) {
    .layout-column table {
        display: table;
    }
}

/* =================================================================
   21. Utility Classes
   ================================================================= */

/* Container */
.container {
    max-width: var(--layout-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--layout-gutter);
    padding-right: var(--layout-gutter);
}

/* Layout gap modifiers */
.layout-container.no-gap    { gap: 0; }
.layout-container.small-gap { gap: 10px; }
.layout-container.large-gap { gap: 40px; }

/* Layout column padding modifiers */
.layout-column.no-padding    { padding: 0; }
.layout-column.small-padding  { padding: 10px; }
.layout-column.medium-padding { padding: 20px; }
.layout-column.large-padding  { padding: 40px; }

/* Component block spacer */
.component-block {
    margin-bottom: var(--space-5);
}

/* Visually hidden (accessibility) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Text alignment */
.text-left   { text-align: left; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* Font weight helpers */
.fw-normal   { font-weight: var(--fw-normal); }
.fw-medium   { font-weight: var(--fw-medium); }
.fw-semibold { font-weight: var(--fw-semibold); }
.fw-bold     { font-weight: var(--fw-bold); }
.fw-black    { font-weight: var(--fw-black); }

/* Truncate */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
