/* ============================================
   Recite Me Accessibility Suite - Shared Styles
   Brand & Design System v1.0 (July 2026)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Mulish:wght@400;500;600;700;800&display=swap');

/* === Global Reset & Base Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--page-bg);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 40px 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Brand Colors & Design Tokens - Recite Me Accessibility Suite */
:root {
    /* Fonts */
    --font-head: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Mulish', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Core brand */
    --navy: #16273F;
    --accent-color: #D5361F;      /* Accent Red - the single action colour */
    --accent-hover: #B92F15;
    --link-color: #215FCE;        /* Link Blue */
    --link-hover: #1E56C0;

    /* Legacy aliases remapped to new palette (navy = headings/dark surfaces) */
    --primary-color: #16273F;
    --primary-dark: #0F1B2D;
    --primary-light: #24384F;
    --secondary-color: #2F6FE0;

    /* Text */
    --text-dark: #33404F;         /* body */
    --text-medium: #5B6675;       /* sub / secondary */
    --text-light: #5B6675;
    --text-lighter: #66707E;      /* muted / placeholder */

    /* Surfaces & borders */
    --background-light: #F6F8FC;
    --background-white: #ffffff;
    --surface-fill: #F8FAFD;
    --border-color: #EAEDF3;
    --border-light: #E4E8EF;
    --row-divider: #F1F4F8;
    --page-bg: linear-gradient(180deg, #F5F3FB 0%, #F1F6F6 100%);

    /* Semantic / data */
    --info-bg: #E4F2F9;           /* teal tint */
    --info-border: #1B7FB0;
    --info-text: #1B5E86;
    --warning-bg: #FCF6E4;
    --warning-border: #E0A21E;
    --warning-text: #B5772E;
    --success-bg: #E7F7F1;
    --success-border: #1FA97A;
    --success-text: #1F8A5B;
    --danger-bg: #FCECEC;
    --danger-border: #C0392B;
    --danger-text: #C0392B;

    /* Dark code panel */
    --code-bg: #0E1B2A;
    --code-text: #B7D2EC;

    /* Radii */
    --radius-pill: 999px;
    --radius-card: 18px;
    --radius-section: 22px;
    --radius-btn: 12px;
    --radius-input: 12px;
    --radius-tile: 12px;

    /* Shadows */
    --shadow-sm: 0 4px 16px rgba(18,38,63,0.05);
    --shadow-md: 0 6px 20px rgba(18,38,63,0.08);
    --shadow-lg: 0 10px 30px rgba(18,38,63,0.10);
    --shadow-xl: 0 20px 60px rgba(16,26,40,0.16);
    --shadow-red: 0 6px 16px rgba(232,64,42,0.28);
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    line-height: 1.2;
    color: var(--navy);
    letter-spacing: -0.3px;
}

h1 { font-size: 2.6em; font-weight: 700; }
h2 { font-size: 1.9em; font-weight: 700; }
h3 { font-size: 1.4em; font-weight: 600; }
h4 { font-size: 1.2em; font-weight: 600; }

/* === Page Header / Hero === */
.header, .hero {
    background: transparent;
    color: var(--navy);
    padding: 50px 20px;
    text-align: center;
}

.header h1, .hero h1 {
    margin-bottom: 15px;
    font-weight: 700;
    color: var(--navy);
}

.header p, .hero p {
    font-size: 1.2em;
    color: var(--text-medium);
    max-width: 800px;
    margin: 0 auto;
}

.hero .version {
    display: inline-block;
    background: #EAF1FC;
    color: var(--link-color);
    padding: 7px 18px;
    border-radius: var(--radius-pill);
    font-size: 0.85em;
    font-family: var(--font-head);
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-top: 6px;
}

/* === Navigation Bar === */
.nav-bar {
    background: var(--background-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

.nav-container ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-container li {
    margin: 0;
}

.nav-container a {
    display: block;
    padding: 18px 24px;
    color: var(--navy);
    text-decoration: none;
    font-family: var(--font-head);
    font-weight: 600;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.nav-container a:hover,
.nav-container a[aria-current="page"],
.nav-container a.active {
    background: var(--background-light);
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* === Containers & Layout === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.content {
    padding: 50px 40px;
}

.section {
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-section);
    padding: 45px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

.section h2 {
    color: var(--navy);
    font-size: 1.9em;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.section h3 {
    color: var(--navy);
    font-size: 1.4em;
    margin: 35px 0 18px 0;
    padding-left: 12px;
    border-left: 4px solid var(--accent-color);
}

.section h4 {
    color: var(--text-light);
    font-size: 1.3em;
    margin: 25px 0 12px 0;
}

/* === Cards === */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.cards-three {
    grid-template-columns: repeat(3, 1fr);
}

.cards-two {
    grid-template-columns: repeat(2, 1fr);
}

.cards-two .card-wide {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .cards-three {
        grid-template-columns: 1fr;
    }
    
    .cards-two {
        grid-template-columns: 1fr;
    }

    .cards-two .card-wide {
        grid-column: auto;
    }
}

.card {
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Featured Card */
.card-featured {
    display: block;
    text-decoration: none;
    background: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 30px;
}

.card-featured:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-featured .card-featured-content {
    display: flex;
    align-items: center;
    gap: 25px;
}

.card-featured .card-icon {
    font-size: 4em;
    margin-bottom: 0;
    flex-shrink: 0;
}

.card-featured .card-featured-text {
    flex: 1;
}

.card-featured h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 2em;
}

.card-featured p {
    color: var(--text-light);
    margin-bottom: 0;
}

.card-featured .card-link {
    display: inline-block;
    margin-top: 20px;
    background: var(--accent-color);
    padding: 12px 25px;
    border-radius: var(--radius-btn);
    color: white;
    font-family: var(--font-head);
    font-weight: 700;
    box-shadow: var(--shadow-red);
    transition: background 0.3s;
}

.card-featured:hover .card-link {
    background: var(--accent-hover);
}

@media (max-width: 600px) {
    .card-featured .card-featured-content {
        flex-direction: column;
        text-align: center;
    }
}

.card-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.card h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.8em;
}

.card p {
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* === Test Cards === */
.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.test-card {
    background: var(--background-light);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s;
    position: relative;
}

.test-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(6, 51, 74, 0.15);
    transform: translateY(-4px);
}

.test-number {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 12px;
}

.test-card h3 {
    color: var(--text-dark);
    margin: 12px 0;
    font-size: 1.3em;
    padding: 0;
    border: none;
}

.test-card p {
    color: var(--text-light);
    font-size: 0.95em;
    margin-bottom: 18px;
    line-height: 1.6;
}

.test-card .config {
    background: var(--background-white);
    padding: 12px;
    border-radius: 6px;
    font-size: 0.85em;
    color: var(--text-medium);
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
}

/* === Links & Buttons === */
a {
    color: var(--link-color);
    transition: all 0.3s;
}

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

.back-link {
    display: inline-block;
    color: var(--link-color);
    text-decoration: none;
    margin-bottom: 20px;
    font-family: var(--font-head);
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

/* Primary action button - red, one per view */
.card-link, .test-card a {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border-radius: var(--radius-btn);
    text-decoration: none;
    font-family: var(--font-head);
    font-weight: 700;
    box-shadow: var(--shadow-red);
    transition: all 0.3s;
}

.card-link:hover, .test-card a:hover {
    background: var(--accent-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(232,64,42,0.34);
}

/* === Code Blocks === */
.code-block {
    background: var(--code-bg);
    color: var(--code-text);
    padding: 25px;
    border: 1px solid #1C2E42;
    border-radius: 16px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: var(--font-mono);
    font-size: 0.95em;
    line-height: 1.6;
    box-shadow: 0 10px 30px rgba(11,22,34,0.28);
}

.code-block .highlight {
    color: #F4C24E;
    font-weight: bold;
}

.code-block .comment {
    color: #6B7C90;
    font-style: italic;
}

.inline-code {
    background: var(--background-light);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--link-hover);
    border: 1px solid var(--border-color);
}

/* === Info Boxes === */
.intro {
    background: var(--background-light);
    border-left: 5px solid var(--primary-color);
    padding: 25px;
    margin-bottom: 40px;
    border-radius: 8px;
}

.intro h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.8em;
    border: none;
    padding: 0;
}

.intro-text {
    font-size: 1.15em;
    color: var(--text-medium);
    margin-bottom: 30px;
    line-height: 1.8;
}

.info-box {
    background: var(--info-bg);
    border-left: 5px solid var(--info-border);
    padding: 20px 25px;
    margin: 20px 0;
    border-radius: 6px;
}

.warning-box {
    background: var(--warning-bg);
    border-left: 5px solid var(--warning-border);
    padding: 20px 25px;
    margin: 20px 0;
    border-radius: 6px;
}

.success-box {
    background: var(--success-bg);
    border-left: 5px solid var(--success-border);
    padding: 20px 25px;
    margin: 20px 0;
    border-radius: 6px;
}

/* === Steps === */
.step {
    background: linear-gradient(135deg, var(--background-light) 0%, #e9ecef 100%);
    border-left: 5px solid var(--primary-color);
    padding: 25px;
    margin: 25px 0;
    border-radius: 8px;
}

.step-number {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    width: 38px;
    height: 38px;
    line-height: 38px;
    text-align: center;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 12px;
    font-size: 1.1em;
}

/* === Stats === */
.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: var(--font-head);
    font-size: 3em;
    font-weight: 800;
    color: var(--navy);
}

.stat-label {
    color: var(--text-lighter);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === Tables === */
.reference-table {
    width: 100%;
    margin: 25px 0;
    border-collapse: collapse;
    background: var(--background-white);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-card);
    overflow: hidden;
}

.reference-table th {
    background: var(--surface-fill);
    color: var(--text-lighter);
    padding: 15px;
    text-align: left;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.78em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.reference-table td {
    padding: 15px;
    border-bottom: 1px solid var(--row-divider);
}

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

.reference-table tr:hover {
    background: var(--background-light);
}

/* === Category Sections === */
.category {
    margin-bottom: 50px;
}

.category h2 {
    color: var(--text-dark);
    font-size: 2em;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--border-color);
}

/* === Options & Features === */
.options-grid, .feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.option-card, .feature-item {
    background: var(--background-light);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s;
}

.option-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(6, 51, 74, 0.15);
}

.option-card h4 {
    color: var(--primary-color);
    margin: 0 0 12px 0;
    font-size: 1.15em;
}

.option-card p {
    color: var(--text-light);
    font-size: 0.95em;
    margin: 0;
}

.feature-item {
    border-left: 3px solid var(--primary-color);
}

.feature-item strong {
    color: var(--primary-color);
}

/* === Config Sections === */
.config-section {
    background: #f0f4ff;
    border: 2px solid var(--primary-color);
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
}

.config-section h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
}

/* === Related Tests / Cross-references === */
.related-tests {
    background: var(--background-light);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.related-tests h3 {
    color: var(--text-medium);
    margin-bottom: 12px;
    font-size: 1.2em;
    padding: 0;
    border: none;
}

.related-tests ul {
    list-style: none;
    padding: 0;
}

.related-tests li {
    margin: 8px 0;
}

.related-tests a {
    color: var(--primary-color);
    text-decoration: none;
}

.related-tests a:hover {
    text-decoration: underline;
}

/* === Visual Examples === */
.visual-example {
    background: var(--background-light);
    border: 2px dashed var(--primary-color);
    padding: 30px;
    margin: 25px 0;
    border-radius: 8px;
    text-align: center;
}

.visual-example .label {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.mock-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s;
    margin: 10px;
}

.mock-button:hover {
    transform: translateY(-2px);
}

.mock-button img {
    width: 40px;
    height: 40px;
}

/* === Demo Areas === */
.demo-area {
    background: var(--background-light);
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
}

.demo-container {
    background: #f0f4ff;
    border: 3px solid var(--primary-color);
    padding: 30px;
    margin: 20px 0;
    border-radius: 12px;
    min-height: 150px;
}

.demo-container h3 {
    color: var(--primary-color);
    margin-top: 0;
}

.demo-container p {
    color: var(--text-medium);
}

#target-container {
    background: var(--info-bg);
    border: 2px dashed var(--info-border);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

#insert-target {
    background: #ffe8e8;
    border: 2px solid #e06c75;
    padding: 20px;
    border-radius: 8px;
    margin: 10px 0;
}

.marker {
    background: var(--success-bg);
    border: 2px dashed var(--success-border);
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    color: #155724;
    font-weight: 500;
}

/* === Footer === */
.footer {
    position: relative;
    text-align: center;
    padding: 40px 20px;
    background: var(--background-white);
    color: var(--text-light);
    margin-top: 40px;
    border-top: none;
}

/* 4px rainbow rule across the top of the footer */
.footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #E8402A, #F0862A, #F4C24E, #3FB27A, #2BA9C9);
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-nav a {
    color: var(--link-color);
    text-decoration: none;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.05em;
}

.footer-nav a:hover {
    text-decoration: underline;
}

.footer-separator {
    color: var(--text-lighter);
    margin: 0 5px;
}

.footer-credit {
    margin-top: 15px;
    color: var(--text-lighter);
    font-size: 0.9em;
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .header h1, .hero h1 {
        font-size: 2em;
    }
    
    .section {
        padding: 25px;
    }
    
    .nav-container ul {
        flex-direction: column;
    }
    
    .cards, .test-grid, .options-grid, .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .stats {
        gap: 20px;
    }
}

/* === Utilities === */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.text-center { text-align: center; }

/* ============================================
   PAGE-SPECIFIC STYLES: Home/Index Page
   Apply by adding class="page-home" to <body>
   ============================================ */
.page-home {
    min-height: 100vh;
}

.page-home .hero h1 {
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.page-home .demo-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 30px 0;
}

.page-home .demo-button {
    padding: 15px 30px;
    font-size: 1.1em;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.page-home .demo-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(6, 51, 74, 0.3);
}

.page-home .features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

@media (max-width: 900px) {
    .page-home .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .page-home .features-grid {
        grid-template-columns: 1fr;
    }
}

.page-home .code-example {
    background: #2d3748;
    color: #e2e8f0;
    padding: 25px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    margin: 20px 0;
    line-height: 1.6;
}

.page-home .code-example code {
    color: #e2e8f0;
}

.page-home .demo-section,
.page-home .features,
.page-home .quick-start,
.page-home .builder-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 40px;
}

.page-home .demo-section h2,
.page-home .features h2,
.page-home .quick-start h2,
.page-home .builder-card h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2em;
    text-align: center;
    border: none;
    padding: 0;
}

/* Builder methods inside card */
/* three columns so the interactive, quick and dev builders always sit adjacent on desktop.
   collapses to a single column at 900px, where three of these would be too cramped. */
.builder-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 900px) {
    .builder-methods {
        grid-template-columns: 1fr;
    }
}

.builder-method {
    background: var(--background-light);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 30px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
}

.builder-method:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.method-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.method-icon {
    font-size: 2.5em;
    line-height: 1;
    flex-shrink: 0;
}

.method-header h3 {
    color: var(--primary-color);
    margin: 0 0 5px 0;
    font-size: 1.4em;
}

.method-subtitle {
    color: var(--text-dark);
    font-weight: 600;
    margin: 0;
    font-size: 0.95em;
}

.method-features {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    flex-grow: 1;
}

.method-features li {
    padding: 8px 0 8px 25px;
    position: relative;
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
}

.method-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.method-link {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.05em;
    text-decoration: none;
    transition: all 0.3s;
}

.builder-method:hover .method-link {
    transform: translateX(5px);
}

.page-home .footer {
    background: var(--background-white);
    color: var(--text-light);
    border-top: 3px solid var(--border-color);
}

@media (max-width: 768px) {
    .page-home .demo-section,
    .page-home .features,
    .page-home .quick-start,
    .page-home .builder-card {
        padding: 25px;
    }

    .page-home .demo-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* ============================================
   DESIGN SYSTEM: Shared components
   ============================================ */

/* Status & priority pills - always paired with the status word (never colour alone) */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.75em;
    line-height: 1.4;
}
.pill-open       { background: #EAF1FC; color: var(--link-color); }
.pill-progress   { background: var(--warning-bg); color: var(--warning-text); }
.pill-awaiting   { background: #F1EEFC; color: #6A45C9; }
.pill-resolved   { background: var(--success-bg); color: var(--success-text); }
.pill-closed     { background: #EEF1F6; color: var(--text-medium); }
.pill-high       { background: var(--danger-bg); color: var(--danger-text); }
.pill-medium     { background: var(--warning-bg); color: var(--warning-text); }
.pill-low        { background: #EEF1F6; color: var(--text-medium); }

/* Chips - small tinted meta labels */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: #EAF1FC;
    color: var(--link-color);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.78em;
}
.chip-muted { background: #EEF1F6; color: var(--text-medium); }

/* Form controls */
input, select, textarea {
    font-family: var(--font-body);
}
input[type="text"], input[type="email"], input[type="url"], input[type="number"],
input[type="search"], select, textarea {
    background: var(--background-light);
    border: 1.6px solid #E4E9F1;
    border-radius: var(--radius-input);
    padding: 12px 14px;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="url"]:focus,
input[type="number"]:focus, input[type="search"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--link-color);
    box-shadow: 0 0 0 4px rgba(47,111,224,0.12);
}

/* Visible focus for keyboard users (WCAG 2.2 AA) */
a:focus-visible, button:focus-visible,
[role="button"]:focus-visible, .card-link:focus-visible {
    outline: 3px solid var(--link-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Floating AI button - fixed bottom-right, on primary pages */
.recite-ai-button {
    position: fixed;
    right: 26px;
    bottom: 26px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-color);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.05em;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 50% 50% 50% 8px;
    box-shadow: 0 10px 24px rgba(232,64,42,0.42);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s, background 0.2s;
}
.recite-ai-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* Respect reduced-motion (WCAG 2.2) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Subtle footer link variant (public pages) */
.footer-subtle-link {
    color: var(--link-color);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}
.footer-subtle-link:hover {
    color: var(--link-hover);
}
.footer-subtle-link:focus-visible {
    outline: 3px solid var(--link-color);
    outline-offset: 2px;
    border-radius: 3px;
}
