/* Asymm Systems - V14.2 (Organic Minimalism + Matter.js Circles) */

:root {
    /* Color Palette */
    --color-teal: #5295A3;
    --color-teal-light: #9CC8D1;
    --color-rose: #BA6E8F;
    --color-rose-light: #C985A3;
    --color-olive: #8FA96D;
    --color-olive-light: #AFC29C;
    --color-sand: #F8DBA9;
    --color-sand-light: #FDF5E5;
    --color-base: #F9F7F6;
    --color-white: #FFFFFF;
    --color-black: #1A1C1E;
    --color-dark-grey: #333333;

    /* Semantic Variables */
    --surface-base: var(--color-base);
    --surface-elevated: var(--color-white);
    --surface-inverted: var(--color-black);

    --text-primary: var(--color-black);
    --text-secondary: var(--color-dark-grey);
    --text-inverted: var(--color-base);

    --accent-asymmetric: var(--color-rose-light);
    --accent-brand-hover: var(--color-rose);
    --accent-brand-hover: var(--color-rose);
    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-medium: rgba(0, 0, 0, 0.03);
    --border-normal: #666666;

    --font-display: 'Proza Libre', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    --font-code: 'Fira Code', monospace;

    --layout-max-width: 1440px;
    --transition-smooth: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    background-color: var(--surface-base);
    color: var(--text-secondary);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-bottom: 35px;
}

/* IDE Status Bar Navigation */
.ide-status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35px;
    background-color: var(--surface-inverted);
    color: #888;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    font-family: 'Proza Libre', sans-serif;
    font-size: 0.8rem;
    z-index: 1000;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.ide-status-bar::-webkit-scrollbar {
    display: none;
}

.ide-status-bar a,
.ide-status-bar span {
    color: #F9F7F6;
    text-decoration: none;
    transition: color 0.2s, background-color 0.2s;
    height: 100%;
    display: inline-flex;
    align-items: center;
    padding: 0 1rem;
}

.ide-status-bar a:hover {
    color: #F9F7F6;
    background-color: rgba(255, 255, 255, 0.05);
    opacity: 1;
}

.ide-status-bar .status-left,
.ide-status-bar .status-right {
    display: flex;
    height: 100%;
    align-items: center;
}

.status-highlight {
    background-color: var(--accent-brand-hover);
    color: #F9F7F6 !important;
    font-weight: 500;
}

.status-highlight:hover {
    background-color: #a05a7a !important;
}

.status-icon {
    /* margin-right: 0.5rem; */
    font-size: 0.9em;
    padding-left: 0rem !important;
}

.status-icon-img {
    height: 14px;
    width: auto;
    vertical-align: middle;
    margin-right: 0.4rem;
    position: relative;
    top: -1px;
    /* Optical alignment */
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: 0 4vw;
}

/* Asymmetric Grid (About, Research, etc.) */
.asymm-grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.asymm-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
    align-items: start;
}

.asymm-meta {
    position: sticky;
    top: 6rem;
}

.asymm-meta h2 {
    font-size: 0.75rem;
    font-family: var(--font-code);
    /* text-transform: uppercase; */
    letter-spacing: 0.15em;
    color: var(--color-rose);
    margin: 0 0 1.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.5rem;
}

.asymm-meta-data {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.asymm-body {
    max-width: 800px;
}

.asymm-body p:first-child {
    /* font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 2rem; */
}

@media (max-width: 1024px) {
    .asymm-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .asymm-meta {
        position: static;
        border-bottom: 1px solid var(--border-subtle);
        padding-bottom: 1rem;
    }

    .asymm-body p:first-child {
        /* font-size: 1.1rem; */
    }
}

/* Minimalist Form */
form {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.form-group label {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-primary);
    /* letter-spacing: -0.01em; */
}

.form-group label .required {
    color: var(--color-rose);
    margin-left: 0.2rem;
}

.form-group label .optional {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.6;
    font-weight: 300;
}

.form-control {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    padding: 0.75rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition-smooth);
    border-radius: 2px;
    width: 100%;
    font-weight: 300;
    border-radius: 4px;
}

.form-control::placeholder {
    font-size: 0.95rem;
    color: var(--text-secondary);
    opacity: 0.4;
    font-weight: 300;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-rose);
    background: rgba(255, 255, 255, 0.04);
}

.form-control:invalid:not(:placeholder-shown) {
    border-color: var(--color-rose);
    box-shadow: 0 0 0 2px rgba(186, 110, 143, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
    border-radius: 4px;
}

/* Select Styling */
select.form-control {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23BA6E8F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    padding-right: 3rem;
}

/* Survey / Structured Form Components */
.survey-section {
    /* border: 1px solid var(--border-subtle);
    padding: 2.5rem;
    margin-bottom: 3rem;
    border-radius: 4px; */
}

/* .survey-section legend {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--color-rose);
    padding: 0 1.5rem;
    letter-spacing: -0.01em;
} */


.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-subtle);
    border-radius: 2px;
    /* background: rgba(255, 255, 255, 0.03); */
    background: #FFFFFF;
    cursor: pointer;
    position: relative;
}

.checkbox-label input[type="checkbox"]:checked {
    background: var(--color-rose);
    border-color: var(--color-rose);
}

.checkbox-label input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    color: white;
    font-size: 10px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.form-submit {
    align-self: flex-start;
    margin-top: 1rem;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.form-submit .org-link {
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.form-submit .org-link::before,
.form-submit .org-link::after {
    opacity: 1;
    /* Make brackets visible for the button */
}



/* Page Body (About, Research, etc.) */
.page-body {
    max-width: 900px;
    /* Reading-optimized width */
    margin: 0;
    /* Aligned to left of container */
}

/* --- Clinical Content Typography (Shared across Page, Grid, and Registry) --- */
.page-body h1,
.asymm-body h1,
.news-post-header h1 {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 300;
    color: var(--text-primary);
    margin: 0rem 0 1rem 0;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.page-body h2,
.asymm-body h2,
.news-content h2 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--text-primary);
    margin: 3.5rem 0 1rem 0;
    letter-spacing: -0.02em;
}

.page-body h3,
.asymm-body h3,
.news-content h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 2rem 0 1rem 0;
}

.page-body p,
.asymm-body p,
.news-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.page-body hr {
    border: 0;
    border-top: 1px solid var(--border-subtle);
    margin: 4rem 0;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.hero-content {
    text-align: left;
    z-index: 10;
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4vw, 4.2rem);
    font-weight: 300;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.hero-content p {
    font-size: clamp(1rem, 1.3vw, 1.25rem);
    font-weight: 300;
    color: var(--text-secondary);
    max-width: 480px;
    line-height: 1.6;
}

.hero-visual {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

/* Minimal Stack Sections */
.section-block {
    padding: 10rem 0;
    position: relative;
    z-index: 10;
    background: var(--surface-base);
}

.minimal-stack {
    display: flex;
    flex-direction: column;
    gap: 10rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.stack-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stack-item h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-family: var(--font-code);
}

.stack-item h2 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 300;
    margin-bottom: 2rem;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.1;
}

.stack-item p {
    font-size: 1.35rem;
    font-weight: 300;
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 3rem;
}

/* Ghost Buttons — legacy, kept for compatibility */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    padding-bottom: 4px;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-primary);
    border-bottom: 1px solid var(--text-primary);
    transition: opacity 0.3s;
}

.btn-ghost:hover {
    opacity: 0.6;
}

/* ============================================
   ORG-MODE LINK SYSTEM
   [[ text → ]]  internal (hover → rose)
   [[ text ↗ ]]  external (hover → olive)
   ============================================ */

.org-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text-primary);
    border-bottom: 1px dashed var(--text-secondary);
    padding-bottom: 0px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.org-link::before {
    /* content: "["; */
    /* margin-right: 0.3em; */
    font-family: var(--font-code);
    font-weight: 400;
    opacity: 0.6;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.org-link::after {
    font-family: var(--font-code);
    font-weight: 400;
    opacity: 0.6;
    margin-left: 0.3em;
    transition: color 0.3s ease, opacity 0.3s ease;
}

/* internal link arrow */
.org-link--internal::after {
    /* content: "\2192  ]"; */
    content: "\2192";
}

/* external link arrow */
.org-link--external::after {
    /* content: "\2197  ]"; */
    content: "\2197";
}

/* Internal hover → rose */
.org-link--internal:hover {
    color: var(--accent-brand-hover);
    border-bottom: 1px solid var(--accent-brand-hover);
}

.org-link--internal:hover::before,
.org-link--internal:hover::after {
    color: var(--accent-brand-hover);
    opacity: 1;
}

/* External hover → olive */
.org-link--external:hover {
    color: var(--color-teal);
    border-bottom: 1px solid var(--color-teal);
}

.org-link--external:hover::before,
.org-link--external:hover::after {
    color: var(--color-teal);
    opacity: 1;
}

/* CTA variant — just larger */
.org-cta {
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Hero CTA row */
.hero-cta {
    display: flex;
    gap: 1.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

/* Inline variant — NO brackets */
.org-link--inline {
    display: inline;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    border-bottom: 1px dashed var(--text-secondary);
}

.org-link--inline::before {
    content: "";
    margin-right: 0;
}

.org-link--inline.org-link--internal::after {
    content: "\2192";
    margin-left: 0.3em;
}

.org-link--inline.org-link--external::after {
    content: "\2197";
    margin-left: 0.3em;
}

/* Product Cards */
.products-section {
    padding: 8rem 0;
    position: relative;
    z-index: 10;
    background: var(--surface-base);
}

.product-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

.product-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
}

.product-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    display: block;
}

.product-card h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.product-card p {
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.product-code {
    background: var(--surface-inverted);
    color: var(--text-inverted);
    font-family: var(--font-code);
    font-size: 0.9rem;
    padding: 1rem 1.4rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.product-code code {
    color: #e2e8f0;
    white-space: nowrap;
}

.product-badge {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--accent-brand-hover);
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* Platform Story */
.platform-story {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.platform-story p {
    font-size: 1.3rem;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.platform-story-oss {
    font-size: 1.05rem !important;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Founder links row */

.founder-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* 404 links row */
.not-found-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Footer */
footer {
    background: var(--surface-inverted);
    color: var(--text-inverted);
    padding: 5rem 0;
    font-size: 0.95rem;
    font-weight: 300;
    text-align: center;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    text-align: left;
    align-items: flex-start;
}

.footer-brand p {
    max-width: 300px;
    line-height: 1.6;
}

.footer-column h4 {
    color: white;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.footer-column a {
    display: block;
    color: #888;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: white;
    opacity: 1;
}

.copyright {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #666;
    font-size: 0.85rem;
    text-align: center;
}

@media (max-width: 768px) {
    .container {
        padding: 0 6vw;
    }

    .hero {
        min-height: auto;
        padding-top: 5rem;
        padding-bottom: 4rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .hero-content {
        text-align: left;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .section-block {
        padding: 6rem 0;
    }

    .minimal-stack {
        gap: 6rem;
    }

    .stack-item h2 {
        font-size: 2.2rem;
    }

    .page-title {
        font-size: 2.2rem;
    }

    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
        padding-top: 2rem !important;
        gap: 1.5rem;
    }

    form {
        margin: 2rem 0;
    }

    .product-cards {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-card {
        padding: 2rem;
    }

    .products-section {
        padding: 5rem 0;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.8rem;
    }

    .btn-cta {
        text-align: center;
        justify-content: center;
    }

    .platform-story p {
        font-size: 1.1rem;
    }
}

/* Islamic Geometric Background Patterns */
.hero::before,
.section-block::before,
footer::before {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: 0;
    background-image: url('../images/pattern.png');
    background-size: 200px;
    background-repeat: repeat;
    opacity: 0.06;
}

/* Top-right corner spotlight */
.hero::before {
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    -webkit-mask-image: radial-gradient(ellipse 35% 40% at 90% 10%, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    mask-image: radial-gradient(ellipse 35% 40% at 90% 10%, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
}

/* Left-edge spotlight at mid-page */
.section-block::before {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-mask-image: radial-gradient(ellipse 25% 30% at 5% 50%, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    mask-image: radial-gradient(ellipse 25% 30% at 5% 50%, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
}

footer {
    position: relative;
    z-index: 10;
    overflow: hidden;
}

/* Bottom-left corner spotlight */
footer::before {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-mask-image: radial-gradient(ellipse 30% 40% at 10% 90%, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    mask-image: radial-gradient(ellipse 30% 40% at 10% 90%, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    filter: invert(1);
    opacity: 0.08;
}

/* Inner Pages */
.page-title {
    font-family: var(--font-display);
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 300;
    letter-spacing: -0.03em;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 0;
    position: relative;
    z-index: 50;
}

.nav-contact {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--text-primary);
}

.news-item {
    border-bottom: 1px solid var(--border-subtle);
    padding: 2.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.news-link {
    font-size: 1.5rem;
    font-weight: 300;
    font-family: var(--font-display);
    color: var(--text-primary);
}

.news-link:hover {
    opacity: 0.6;
}

.news-date {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Forms */
form {
    max-width: 800px;
    /* margin: 4rem 0; */
}

fieldset {
    border: none;
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    /* border-top: 1px solid var(--border-subtle);
    padding-top: 2.5rem; */
}

fieldset.survey-section {
    /* border: none;
    margin: 0;
    padding: 0 0 4rem 0; */
}

legend {
    font-size: 1.3rem;
    font-weight: 300;
    font-family: var(--font-display);
    border-top: 1px solid var(--border-subtle);
    width: 100%;
    padding-top: 2.5rem;
    margin-bottom: 2.5rem;
    color: var(--text-primary);
}

fieldset:first-child legend {
    padding-top: 0;
    border: 0;
}

.form-group {
    /* margin-bottom: 2.0rem; */
}

form label {
    font-size: 1rem;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

form label .optional {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
}

input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    /* background: transparent; */
    border: none;
    border: 1px solid var(--border-subtle);
    padding: 0.75rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    border-radius: 0;
    transition: var(--transition-smooth);
    font-weight: 300;
    border-radius: 4px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--text-primary);
}

select:invalid {
    color: #A0AEC0;
}

select option {
    color: var(--text-primary);
}

input::placeholder,
textarea::placeholder {
    color: #A0AEC0;
    font-weight: 300;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1.4;
    font-weight: 300;
}

.checkbox-label input {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
    accent-color: var(--text-primary);
}

.btn-primary {
    background: var(--text-primary);
    color: #fff;
    padding: 1.25rem 3rem;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 400;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s;
    margin-top: 2rem;
}

form .form-note {
    font-size: 0.95rem;
    margin: 0rem;
    color: var(--text-secondary);
    font-weight: 300;
    opacity: 0.6;
}

/* Submission Feedback Styles */
.form-message,
.survey-message {
    padding: 2.5rem;
    background: #FFFFFF;
    /* Sand Recess */
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    margin-top: 2rem;
}

.form-message h3,
.survey-message h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-message.success,
.survey-message.survey-success {
    border-left: 4px solid var(--color-olive);
}

.form-message.error,
.survey-message.survey-error {
    border-left: 4px solid var(--color-rose);
}

.form-message p,
.survey-message p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

/* Mobile Terminal Drawer UI */
.mobile-only {
    display: none !important;
}

.terminal-drawer {
    display: none !important;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .ide-status-bar {
        padding: 0;
    }

    .mobile-status-bar.mobile-only {
        display: flex !important;
        width: 100%;
        justify-content: space-between;
        align-items: center;
        height: 100%;
    }

    .terminal-toggle {
        background: transparent;
        border: none;
        color: #F9F7F6;
        cursor: pointer;
        padding: 0 1.2rem;
        height: 100%;
        display: flex;
        align-items: center;
        transition: background-color 0.2s;
    }

    .terminal-toggle:focus {
        outline: none;
        background-color: rgba(255, 255, 255, 0.05);
    }

    .terminal-drawer {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 85vh;
        background-color: var(--surface-inverted);
        z-index: 2000;
        flex-direction: column;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.5);
    }

    .terminal-drawer.open {
        transform: translateY(0);
    }

    .drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-height: 35px;
        height: 35px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        background-color: var(--surface-inverted);
    }

    .drawer-content {
        padding: 2rem 1.5rem;
        overflow-y: auto;
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 2.8rem;
    }

    .drawer-section {
        display: flex;
        flex-direction: column;
        gap: 1.2rem;
    }

    .drawer-label {
        font-size: 0.75rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: #666;
        font-family: var(--font-code);
        margin-bottom: 0.2rem;
    }

    .drawer-link {
        color: #F9F7F6;
        font-family: 'Proza Libre', sans-serif;
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        text-decoration: none;
        transition: opacity 0.3s;
    }

    .drawer-footer {
        margin-top: auto;
        padding-top: 2rem;
        font-family: 'Proza Libre', sans-serif;
        font-size: 0.85rem;
        color: #A0AEC0;
    }
}

/* =========================================
   INDEX PAGE: BENTO BOX & PIPELINE
========================================= */

.section-intro {
    max-width: 650px;
    margin-bottom: 4rem;
}

.section-intro h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-intro p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.section-kicker {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    display: block;
    font-weight: 500;
}

/* Products Bento */
.products-bento {
    padding: 8rem 0 4rem 0;
}

.market-context {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-subtle);
}

.market-context>p:first-child {
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 100%;
    margin-bottom: 3.5rem;
}

.market-image-wrapper {
    margin: 4rem auto;
    /* border-radius: 8px; */
    overflow: hidden;
    /* border: 1px solid var(--border-subtle); */
    /* background: #ffffff; */
    /* Typically these architecture diagrams have white backgrounds */
    /* padding: 2rem; */
    display: flex;
    justify-content: center;
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02); */
}

.market-img {
    max-width: 900px;
    width: 100%;
    height: auto;
    mix-blend-mode: multiply;
}

.stats-grid--inline {
    gap: 1.5rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1.618fr 1fr;
    gap: 2rem;
}

.bento-card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Product inline terminal */
.inline-terminal {
    background: var(--color-base);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    line-height: 1.4;
    border: 1px dashed var(--border-normal);
    border-radius: 4px;
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.inline-terminal:hover {
    /* background: var(--color-sand);
    border-color: var(--color-rose); */
}

.copy-btn {
    font-size: 0.65rem;
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.inline-terminal:hover .copy-btn {
    background: var(--color-sand);
    color: var(--surface-inverted);
}

.bento-card:hover {
    /* transform: translateY(-4px); */
    border-color: var(--color-rose);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.04);
}

.bento-watermark {
    position: absolute;
    top: 0;
    right: -130px;
    width: auto;
    /* height: 100%; */
    opacity: 0.3;
    z-index: 1;
    pointer-events: none;
    transition: transform 0.6s ease;
}

.bento-watermark-dial {
    height: 150%;
}

.bento-watermark-eliya {
    height: 100%;
    transition: transform 0.6s ease-in-out;
}

.bento-watermark.is-dialing {
    animation: dial-rotate 1.4s cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

@keyframes dial-rotate {
    0% {
        transform: rotate(0deg);
    }

    35% {
        transform: rotate(70deg);
    }

    70% {
        transform: rotate(70deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.bento-content {
    position: relative;
    z-index: 2;
    padding: 3rem;
    flex: 1;
}

.bento-content h3 {
    margin: 1rem 0 0.5rem 0;
    font-size: 1.6rem;
}

.bento-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.bento-seed {
    font-style: italic;
    font-size: 0.9rem;
    opacity: 0.7;
}

.bento-status {
    /* font-family: var(--font-code); */
    font-size: 0.65rem;
    color: var(--color-rose);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2rem !important;
}

.product-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-family: var(--font-code);
    font-size: 0.75rem;
    background: var(--color-rose-light);
    color: var(--surface-elevated);
}

.card-jdk .product-badge {
    background: var(--color-sand);
    color: var(--surface-inverted);
}



/* Pipeline Section */
.pipeline-section {
    padding: 6rem 0 8rem 0;
}

.pipeline-grid {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.pipeline-step {
    flex: 1;
    padding: 2.5rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    position: relative;
    transition: border-color 0.4s ease;
    overflow: hidden;
    z-index: 1;
}

.pipeline-step:hover {
    border-color: var(--color-rose);
}

.step-number {
    position: absolute;
    top: -5px;
    right: -5px;
    font-family: var(--font-display);
    font-size: 8rem;
    font-weight: 800;
    color: var(--border-medium);
    z-index: -1;
    pointer-events: none;
    line-height: 1;
    margin: 0;
}

.pipeline-step h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.pipeline-step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.pipeline-connector {
    flex: 0 0 30px;
    height: 2px;
    background: var(--border-normal);
    position: relative;
    top: -20px;
}

.pipeline-connector::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--border-normal);
    border-right: 2px solid var(--border-normal);
    border-bottom: none;
    border-left: none;
    transform: translateY(-50%) rotate(45deg);
}

/* OSS Banner */
.oss-banner {
    padding: 4rem 0;
    background: var(--surface-base);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.oss-content {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-secondary);
}

.oss-icon {
    font-size: 1.5rem;
}

.oss-content p {
    line-height: 1.6;
    margin: 0;
}

.oss-seed {
    margin-top: 1rem !important;
    font-style: italic;
    opacity: 0.8;
}

/* Stats Strip */
.stats-strip {
    padding: 5rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stats-source {
    margin-top: 2.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.6;
    text-align: center;
}

@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .pipeline-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .pipeline-connector {
        flex: 0 0 30px;
        width: 2px;
        height: 30px;
        margin: 0 auto;
        background: var(--border-normal);
        top: 0;
    }

    .pipeline-connector::after {
        top: auto;
        bottom: 0px;
        left: 50%;
        width: 8px;
        height: 8px;
        border-top: none;
        border-right: 2px solid var(--border-normal);
        border-bottom: 2px solid var(--border-normal);
        border-left: none;
        transform: translateX(-50%) rotate(45deg);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
}

/* --- News & Announcements --- */
.news-list {
    margin-top: 4rem;
}

.news-entry {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 2rem;
}

.news-entry:last-child {
    border-bottom: none;
}

.news-entry-date {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-rose);
    display: block;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

h2.news-entry-title {
    font-size: 1.6rem;
    margin: 0.8rem 0;
    font-family: var(--font-display);
}

.news-entry-summary {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.news-content {
    color: var(--text-secondary);
}

/* --- Error Pages (404) --- */
.error-page {
    text-align: center;
    padding-top: 10vh;
    padding-bottom: 20vh;
}

.error-code {
    font-size: 6rem;
    margin-bottom: 1rem;
    font-family: var(--font-display);
    color: var(--text-primary);
}

.error-message {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    color: var(--text-secondary);
}

.error-actions {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- News Post Layout --- */
.news-post-header {
    margin-bottom: 3rem;
}

.news-post-header h1 {
    margin-bottom: 0.6rem;
}

.news-post-meta {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--color-rose);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Product Page Specifics (Eliya) --- */
.product-hero {
    padding: 8rem 0 6rem 0;
    position: relative;
    overflow: hidden;
}

.product-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: var(--color-sand-light);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
}

.product-hero-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--color-rose);
    border-radius: 50%;
}

.product-title {
    font-size: 4.5rem;
    line-height: 1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.product-subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    max-width: 700px;
    line-height: 1.4;
    margin-bottom: 3rem;
}

/* Feature Grid */
.product-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin: 6rem 0;
}

.product-feature-card {
    padding: 2.5rem;
    background: var(--surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    transition: border-color 0.4s ease;
}

.product-feature-card:hover {
    border-color: var(--color-rose);
}

.product-feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.product-feature-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Install Tabs */
.install-section {
    margin: 8rem 0;
    padding: 6rem;
    background: var(--color-sand-light);
    border-radius: 12px;
}

.install-tabs {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-subtle);
}

.install-tab {
    padding: 1rem 0;
    background: none;
    border: none;
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.install-tab.active {
    color: var(--text-primary);
}

.install-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-rose);
}

.install-panel {
    display: none;
}

.install-panel.active {
    display: block;
}

/* Technical Inset */
.technical-inset {
    margin: 6rem 0;
    padding: 4rem;
    background: var(--surface-inverted);
    color: var(--surface-base);
    border-radius: 8px;
}

.technical-inset h3 {
    color: var(--color-rose);
    margin-bottom: 1.5rem;
}

.technical-inset p {
    opacity: 0.8;
    line-height: 1.7;
}

/* Clinical Table */
.clinical-table {
    width: 100%;
    border-collapse: collapse;
    margin: 4rem 0;
    font-size: 0.95rem;
}

.clinical-table th {
    text-align: left;
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-normal);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
}

.clinical-table td {
    padding: 1.5rem 1.2rem;
    border-bottom: 1px solid var(--border-subtle);
}

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

@media (max-width: 1024px) {
    .product-hero {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 3rem !important;
    }

    .hero-text-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .product-title {
        font-size: 3rem;
    }

    .product-features {
        grid-template-columns: 1fr;
    }

    .install-section {
        padding: 2.5rem;
    }
}

/* ============================================================
   Eliya microsite — page header, breadcrumb, right-side ToC,
   terminal panel. Used on /product/eliya/* and the long-form
   research articles that opt in via toc=true frontmatter.
   ============================================================ */

/* Page header: replaces ad-hoc <header style="margin-bottom: 4rem;"> */
.page-header {
    margin-bottom: 4rem;
}

.page-header .section-kicker {
    display: block;
    margin-bottom: 0.5rem;
}

.page-header h1 {
    margin: 0 0 1rem 0;
}

.page-header p {
    max-width: 65ch;
}

/* Terminal-style breadcrumb — matches .ide-status-bar typography */
.eliya-breadcrumb {
    font-family: var(--font-code);
    font-size: 0.85rem;
    opacity: 0.75;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
}

.eliya-breadcrumb a,
.eliya-breadcrumb .crumb-sep,
.eliya-breadcrumb .crumb-leaf {
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
}

.eliya-breadcrumb a:hover {
    color: var(--color-rose);
}

.eliya-breadcrumb .crumb-leaf {
    color: var(--color-rose);
    opacity: 0.9;
}

.eliya-breadcrumb .crumb-sep {
    opacity: 0.4;
}

.eliya-breadcrumb .crumb-collapse {
    cursor: pointer;
    padding: 0 0.3rem;
    border-radius: 3px;
    transition: background 0.15s ease;
}

.eliya-breadcrumb .crumb-collapse:hover {
    background: var(--border-subtle);
}

.eliya-breadcrumb .crumb-hidden {
    display: none;
}

.eliya-breadcrumb.expanded .crumb-hidden {
    display: inline;
}

.eliya-breadcrumb.expanded .crumb-collapse {
    display: none;
}

/* Right-side sticky ToC (IDE minimap analogue) */
.page-with-toc {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 4rem;
    align-items: start;
}

.page-toc {
    position: sticky;
    top: 2rem;
    font-family: var(--font-code);
    font-size: 0.8rem;
    padding-left: 1rem;
    border-left: 1px solid var(--border-subtle);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.page-toc .toc-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    opacity: 0.5;
    margin-bottom: 0.8rem;
    display: block;
}

.page-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-toc li {
    margin: 0.35rem 0;
    line-height: 1.4;
}

.page-toc li.toc-h3 {
    padding-left: 1rem;
    font-size: 0.75rem;
    opacity: 0.8;
}

.page-toc a {
    color: var(--text-secondary);
    text-decoration: none;
    opacity: 0.75;
    border-left: 2px solid transparent;
    padding-left: 0.6rem;
    margin-left: -0.8rem;
    display: block;
    transition: color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.page-toc a:hover {
    color: var(--color-rose);
    opacity: 1;
}

.page-toc a.toc-active {
    color: var(--color-rose);
    border-left-color: var(--color-rose);
    opacity: 1;
}

/* Terminal panel — variant of .technical-inset tuned for <pre> cadence output */
.eliya-terminal-panel {
    margin: 4rem 0;
    padding: 2.5rem 3rem;
    background: var(--surface-inverted);
    color: var(--surface-base);
    border-radius: 8px;
    overflow-x: auto;
}

.eliya-terminal-panel .terminal-prompt {
    color: var(--color-rose);
    font-family: var(--font-code);
    font-size: 0.95rem;
    display: block;
    margin-bottom: 1.5rem;
}

.eliya-terminal-panel pre {
    font-family: var(--font-code);
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--surface-base);
    opacity: 0.92;
    margin: 0;
    white-space: pre;
}

.eliya-terminal-panel .term-ok {
    color: var(--color-olive-light);
}

.eliya-terminal-panel .term-pending {
    color: var(--color-sand);
    opacity: 0.7;
}

.eliya-terminal-panel .term-current {
    color: var(--color-rose);
}

.eliya-terminal-panel .term-dim {
    opacity: 0.55;
}

/* Responsive: ToC hides on narrow viewports; grid collapses */
@media (max-width: 1024px) {
    .page-with-toc {
        grid-template-columns: 1fr;
    }

    .page-toc {
        display: none;
    }
}

@media (max-width: 768px) {
    .eliya-breadcrumb {
        font-size: 0.78rem;
    }

    .eliya-terminal-panel {
        padding: 1.5rem 1rem;
    }

    .eliya-terminal-panel pre {
        font-size: 0.75rem;
    }
}