/* === Color Variables (AAA Contrast for Text) === */
:root {
    --color-primary: #2A5D3F;
    /* Darker Green for AAA text */
    --color-secondary: #5F8F6B;
    /* Original lighter green for decoration */
    --color-accent: #8C5A0C;
    /* Darker Gold for AAA text */
    --color-bg-light: #F9F9F7;
    --color-text-dark: #1F1F1F;
    --color-neutral-mid: #6E6E6E;
    --color-border: #D1D5DB;
}

/* === Base Styles === */
html {
    font-size: 16px;
}

body {
    font-family: 'Atkinson Hyperlegible', sans-serif;
    line-height: 1.6;
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    font-weight: 700;
}

/* Typography Scale (Exact Matches to Global System) */
h1 {
    font-size: 40px;
}

h2 {
    font-size: 34px;
}

h3 {
    font-size: 28px;
    font-weight: 600;
}

h4 {
    font-size: 22px;
    font-weight: 600;
}

h5 {
    font-size: 18px;
    font-weight: 600;
}

h6 {
    font-size: 16px;
    font-weight: 600;
}

a {
    color: var(--color-primary);
    text-decoration: underline;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--color-accent);
}

blockquote {
    font-style: italic;
    color: var(--color-neutral-mid);
    border-left: 4px solid var(--color-secondary);
    padding-left: 1rem;
    margin-left: 0;
}

/* ... (rest of utils) ... */

/* Text Sizing Utilities - Aligned to Global Hierarchy */
.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

/* 18px */
.text-xl {
    font-size: 1.375rem;
}

/* Matches H4 (22px) roughly */
.text-2xl {
    font-size: 2.125rem;
}

/* Matches H2 (34px) - Override for Demos */
.text-4xl {
    font-size: 2.5rem;
}

/* Matches H1 (40px) */

a {
    color: var(--color-primary);
    text-decoration: underline;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--color-accent);
}

blockquote {
    font-style: italic;
    color: var(--color-neutral-mid);
    border-left: 4px solid var(--color-secondary);
    padding-left: 1rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* === Components from Main Site === */
.cta-button {
    background-color: var(--color-primary);
    color: white;
    font-weight: bold;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease-in-out;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--color-secondary);
}

.link-social {
    color: white;
    transition: color 0.2s ease-in-out;
}

.link-social:hover {
    color: var(--color-accent);
}

/* === Styles for Demo Pages === */
.highlight {
    background-color: #fef3c7;
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 500;
}

/* NEW/UPDATED: Utility class to remove list styles */
.list-none {
    list-style-type: none;
    padding: 0;
}

.footer-social-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
}

.footer-social-list li {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.gap-2 {
    gap: 0.5rem;
}

/* Remove list bullets from main navigation */
nav[role="navigation"] ul {
    list-style: none;
    padding: 0;
    /* Also remove default padding */
}

/* Table styles */
table {
    border-collapse: collapse;
    border: 1px solid var(--color-border);
    width: 100%;
    text-align: left;
    margin-top: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    overflow: hidden;
}

table caption {
    font-size: 1.25rem;
    font-weight: 500;
    padding: 0.5rem;
    color: var(--color-primary);
}

table thead {
    background-color: #f9fafb;
    /* gray-50 */
}

table th,
table td {
    border: 1px solid var(--color-border);
    padding: 0.5rem;
}

table th {
    font-weight: bold;
}

/* Styles for Dynamic Widgets */
[role="tab"] {
    cursor: pointer;
    padding: 0.5rem 1rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 0.5rem 0.5rem 0 0;
    margin-bottom: -1px;
}

[role="tab"][aria-selected="true"] {
    border-color: var(--color-border);
    background-color: var(--color-bg-light);
    color: var(--color-primary);
}

[role="tabpanel"] {
    border: 1px solid var(--color-border);
    padding: 1.5rem;
    border-radius: 0 0 0.5rem 0.5rem;
}

details>summary {
    cursor: pointer;
    color: var(--color-primary);
    font-weight: 500;
}

details[open]>summary {
    margin-bottom: 0.5rem;
}

/* Featured Talks video player — maintain 16:9 ratio */
.video-player-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 aspect ratio */
    background-color: #000;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}


/* === STYLES FOR BAD_EXAMPLE.HTML === */
/* BAD: Fake heading styles */
.fake-h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.fake-h2 {
    font-size: 1.5rem;
    font-weight: 700;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.fake-h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* BAD: Low contrast text */
.low-contrast {
    color: #aaaaaa;
}

.hidden-content {
    display: none;
}


/* === Semantic Layout Classes === */

/* Header & Nav */
.demo-header {
    background-color: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.header-content {
    max-width: 80rem;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.demo-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
}

.landmark-label {
    font-size: 0.875rem;
    color: var(--color-neutral-mid);
    margin: 0;
}

.demo-nav {
    background-color: #f9fafb;
    border-bottom: 1px solid var(--color-border);
}

.nav-content {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0.5rem 1rem;
}

.nav-list {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.landmark-label.right {
    text-align: right;
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

/* Main Content Area */
.main-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 1rem;
}

@media (min-width: 768px) {
    .main-container {
        padding: 2rem;
    }
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .content-wrapper {
        flex-direction: row;
    }
}

.primary-column {
    flex-grow: 1;
    max-width: 75ch;
}

.secondary-column {
    flex-shrink: 0;
    align-self: flex-start;
}

@media (min-width: 1024px) {
    .secondary-column {
        width: 25%;
    }
}

/* Sections */
.section-block {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.section-subtitle {
    font-size: 1.5rem;
    font-weight: 700;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

/* Widgets & Components */
.figure-block {
    margin: 1rem 0;
}

.figure-caption {
    font-size: 0.875rem;
    text-align: center;
    color: var(--color-neutral-mid);
    margin-top: 0.5rem;
}

.demo-form {
    background-color: #fff;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-item,
.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-footer {
    padding-top: 1rem;
}

.sidebar-box {
    background-color: #fff;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.search-form {
    margin-top: 1.5rem;
}

.search-wrapper {
    position: relative;
    margin-top: 0.25rem;
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

/* Bad Example Specifics */
.bad-container {
    padding: 2rem 1rem;
    max-width: 56rem;
    margin: 0 auto;
}

.fake-nav {
    display: flex;
    gap: 1.5rem;
}

.bad-table-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid #ccc;
    margin-top: 1rem;
}

.bad-form-box {
    background-color: #fff;
    padding: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}