:root {
    /* PREMIUM EDI ARCHITECT PALETTE */
    --bg-body: #0b1015;
    /* Deep Slate Blue */
    --bg-card: rgba(22, 27, 34, 0.7);
    /* Glassy Card */
    --bg-nav: rgba(13, 17, 23, 0.85);
    /* Glassy Nav */
    --border-color: rgba(48, 54, 61, 0.6);

    --text-primary: #e6edf3;
    --text-secondary: #8b949e;

    /* Neon Data Accents */
    --accent-blue: #2f81f7;
    /* Structural/Links */
    --accent-green: #3fb950;
    /* Success/Live */
    --accent-orange: #d29922;
    /* Attention */
    --accent-red: #f85149;
    /* Error */
    --accent-teal: #1f6feb;
    /* Connectivity */

    --text-muted: #6e7681;
    --font-mono: 'Fira Code', monospace;
    --font-sans: 'Inter', sans-serif;
    --nav-height: 60px;

    --glass-blur: blur(12px);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
    background-color: var(--bg-body);
    /* Detailed EDI Stream Background - Ensures expertise visibility */
    background-image: url('assets/bg-stream.svg');
    background-size: 400px 400px;
    background-attachment: fixed;

    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
.mono-font {
    font-family: var(--font-mono);
}

a {
    text-decoration: none;
    color: var(--accent-blue);
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.accent-green {
    color: var(--accent-green);
}

.accent-blue {
    color: var(--accent-blue);
}

/* UI Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Widen nav container */
.top-nav .container {
    max-width: 1400px;
}

.mono-tag {
    font-family: var(--font-mono);
    color: var(--accent-green);
    background: rgba(126, 231, 135, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Glassmorphism Navigation */
.top-nav {
    background: var(--bg-nav);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    height: var(--nav-height);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-orange);
    font-size: 1.2rem;
}

/* Dashboard Header - Daha Belirgin */
.dashboard-header {
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--accent-blue);
    border-radius: 8px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(47, 129, 247, 0.2);
}

.dashboard-header .logo {
    font-size: 1.5rem;
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
}

.dashboard-header .nav-links {
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.dashboard-header .nav-link {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    height: auto;
    background: rgba(47, 129, 247, 0.1);
    border: 1px solid transparent;
}

.dashboard-header .nav-link:hover {
    background: rgba(47, 129, 247, 0.2);
    border: 1px solid var(--accent-blue);
}


.nav-links {
    display: flex;
    align-items: center;
    gap: 1px;
    min-width: 0;
}

.nav-link {
    color: var(--text-secondary);
    padding: 0 0.7rem;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    transition: all 0.2s;
    border-right: 1px solid transparent;
    border-left: 1px solid transparent;
    white-space: nowrap;
}

/* ... existing hover styles ... */

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    /* Slight highlight */
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.05);
    border-top: 2px solid var(--accent-orange);
    color: var(--text-primary);
}

/* Page Headers */
.nav-btn-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 0.85rem;
    margin-left: 0.75rem;
    border: 1px solid var(--text-secondary);
    border-radius: 4px;
    white-space: nowrap;
    width: auto;
    flex-shrink: 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.nav-btn-switch:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(47, 129, 247, 0.1);
    text-decoration: none;
}

.nav-path-reset {
    display: inline-flex;
    align-items: center;
    margin-left: 0.65rem;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    opacity: 0.75;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.nav-path-reset:hover {
    color: var(--accent-blue);
    opacity: 1;
    text-decoration: underline;
}

.page-header {
    padding: 4rem 0 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
}

/* Glassmorphism Cards */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.tech-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

a.tech-card {
    color: inherit;
    text-decoration: none;
    display: block;
}

a.tech-card:hover {
    text-decoration: none;
}

.tech-card p {
    color: var(--text-secondary);
}

.tech-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-blue);
    box-shadow: 0 12px 40px rgba(47, 129, 247, 0.15);
}

.tech-card h3 {
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

/* Diagram Specifics */
.tech-card .mermaid {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    /* Darken bg for diagram contrast */
    border-radius: 6px;
    transition: background 0.2s;
}

.tech-card[onclick]:hover .mermaid {
    background: rgba(47, 129, 247, 0.1);
    cursor: zoom-in;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-blue);
    color: #fff;
}

.btn-primary:hover {
    background: #3a8ee6;
}

.btn-outline {
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    background: rgba(0, 0, 0, 0.4);
    font-weight: 600;
}

.btn-outline:hover {
    border-color: var(--accent-blue);
    color: #ffffff;
    background: rgba(47, 129, 247, 0.3);
}

.hero-header {
    border: none;
    padding: 4.75rem 0 2.75rem;
}

.hero-status {
    display: inline-block;
    margin-bottom: 0.85rem;
    min-height: 1.5em;
}

.hero-name {
    font-size: clamp(2.1rem, 6vw, 3.6rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 0.65rem;
}

.hero-role {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
    font-weight: 400;
}

.hero-lead {
    margin-bottom: 1.75rem;
    max-width: 34rem;
    line-height: 1.55;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-actions .btn:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 3px;
}

/* Hub modules — one section, less dashboard chrome */
.hub-modules {
    padding: 0 0 3.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

.hub-modules__title {
    margin: 2.75rem 0 1.5rem;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.pro-site .grid-cards {
    gap: 1.35rem;
    margin: 0;
}

.pro-site a.tech-card {
    padding: 1.45rem 1.5rem 1.55rem;
    border-radius: 10px;
    transition:
        transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.pro-site a.tech-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.65rem;
    letter-spacing: -0.01em;
}

.pro-site a.tech-card p {
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 0;
}

.pro-site a.tech-card:hover {
    transform: translateY(-3px);
    border-color: rgba(47, 129, 247, 0.55);
    box-shadow: 0 10px 28px rgba(47, 129, 247, 0.12);
    background: rgba(47, 129, 247, 0.04);
}

.pro-site a.tech-card:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 3px;
    border-color: var(--accent-blue);
}

.pro-site .nav-link:focus-visible,
.pro-site .nav-btn-switch:focus-visible,
.pro-site .nav-path-reset:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.pro-site .nav-btn-switch {
    border-radius: 6px;
}

@media (max-width: 768px) {
    .hub-modules__title {
        margin: 2rem 0 1.15rem;
    }

    .hub-modules {
        padding-bottom: 2.5rem;
    }
}

.theme-switcher {
    display: flex;
    align-items: center;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

#theme-select {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    cursor: pointer;
    outline: none;
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    /* Must stay BELOW .top-nav (z-index:100) so the drawer inside the nav
       stacking context remains tappable — same-z + later DOM was eating clicks. */
    z-index: 90;
    pointer-events: none;
}

.nav-overlay.active {
    display: block;
    pointer-events: auto;
}

body.nav-open {
    overflow: hidden;
}

body.nav-open .top-nav {
    z-index: 110;
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 130;
    margin-left: 1rem;
    position: relative;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== TABLET / MOBILE NAV ===== */
@media (max-width: 1200px) {
    .hamburger {
        display: flex;
    }

    .top-nav {
        height: var(--nav-height);
        position: sticky;
        top: 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: min(280px, 86vw);
        height: 100vh;
        height: 100dvh;
        background: var(--bg-nav);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 5rem 1.5rem 2rem;
        gap: 0;
        border-left: 1px solid var(--border-color);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 120;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        align-items: stretch;
        visibility: hidden;
        pointer-events: none;
    }

    .nav-links.active {
        transform: translateX(0);
        visibility: visible;
        pointer-events: auto;
    }

    .nav-link {
        width: 100%;
        padding: 1.25rem 0;
        font-size: 1rem;
        height: auto;
        min-height: 48px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        justify-content: flex-start;
        position: relative;
        z-index: 1;
        pointer-events: auto;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-link:hover,
    .nav-link.active {
        background: transparent;
        border-top: none;
        color: var(--accent-orange);
    }

    .nav-btn-switch {
        margin: 2rem 0 0.75rem;
        width: 100%;
        height: 44px;
        pointer-events: auto;
    }

    .nav-path-reset {
        margin: 0 0 1rem;
        width: 100%;
        display: flex;
        min-height: 44px;
        pointer-events: auto;
    }

    .lang-switcher {
        margin-top: 1rem;
        width: 100%;
    }

    .lang-switcher select {
        width: 100%;
        padding: 0.8rem;
    }

    .theme-switcher {
        margin-top: 1rem;
        width: 100%;
        margin-left: 0;
    }

    #theme-select {
        width: 100%;
        padding: 0.8rem;
    }
}

@media (max-width: 768px) {

    /* Base Container */
    .container {
        padding: 0.75rem;
        max-width: 100%;
    }

    /* Navigation stays sticky; drawer styles come from the 1200px breakpoint */
    .top-nav {
        padding: 0;
        height: var(--nav-height);
        position: sticky;
        top: 0;
    }

    .nav-container {
        flex-direction: row;
        gap: 0.5rem;
        align-items: center;
    }

    .logo {
        font-size: 0.95rem;
        flex-shrink: 0;
    }

    .page-header {
        padding: 1.5rem 0 1.5rem;
    }

    .hero-header {
        padding: 2.5rem 0 1.5rem;
    }

    .hero {
        padding-top: 1rem;
    }

    .page-title {
        font-size: 1.75rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }

    .page-subtitle {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Hero Section */
    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .hero p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Tech Cards Grid */
    .grid-cards,
    .tech-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tech-card {
        padding: 1.25rem;
    }

    .tech-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .tech-card p,
    .tech-card li {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Dashboard Header */
    .dashboard-header {
        padding: 1rem;
    }

    .dashboard-header>div {
        flex-direction: column;
        gap: 1rem;
    }

    .dashboard-header .logo {
        font-size: 1.1rem;
    }

    .dashboard-header .nav-links {
        width: 100%;
        flex-direction: column;
    }

    /* Dashboard Filter Controls */
    .filter-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }

    .date-input {
        font-size: 0.75rem;
        padding: 0.4rem;
    }

    /* Buttons */
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .btn-sm {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }

    /* Login Box */
    .login-box {
        padding: 2rem 1.25rem;
        max-width: 95%;
    }

    .login-box h2 {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }

    .login-input {
        padding: 0.9rem 1rem;
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .login-btn {
        padding: 0.9rem;
        font-size: 0.9rem;
    }

    /* Tool Container (EDI Parser) */
    .tool-container {
        grid-template-columns: 1fr !important;
        height: auto !important;
        gap: 1rem;
    }

    .editor-box {
        min-height: 250px;
    }

    .editor-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
        padding: 0.75rem;
    }

    .editor-header>div {
        width: 100%;
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .editor-header select,
    .editor-header button {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    /* Tables */
    table {
        font-size: 0.75rem;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    th,
    td {
        padding: 0.4rem !important;
        min-width: 80px;
    }

    /* Contact Form */
    form input,
    form select,
    form textarea {
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    form label {
        font-size: 0.85rem;
    }

    /* Terminal Window */
    .terminal-window {
        margin: 1rem 0;
        max-width: 100%;
    }

    .terminal-body {
        padding: 0.75rem;
        height: 250px;
        font-size: 0.85rem;
    }

    .terminal-input-line {
        padding: 0.75rem;
    }

    #wizard-input {
        font-size: 0.85rem;
    }

    /* Command Palette */
    .cmd-modal {
        max-width: 95%;
    }

    .cmd-header {
        padding: 0.75rem 1rem;
    }

    #cmd-input {
        font-size: 0.95rem;
    }

    .cmd-item {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Prevent Text Overflow */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    p,
    li,
    span,
    a {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Code blocks */
    pre,
    code {
        font-size: 0.75rem;
        overflow-x: auto;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

    /* Lightbox */
    #diagram-lightbox {
        padding: 1rem;
    }

    #lightbox-content {
        padding: 1rem;
        width: 95vw;
        height: 90vh;
    }
}

@media (max-width: 480px) {

    /* Extra small screens */
    .container {
        padding: 0.5rem;
    }

    .logo {
        font-size: 0.9rem;
    }

    /* Page Elements */
    .hero h1,
    .page-title {
        font-size: 1.4rem;
        line-height: 1.2;
    }

    .hero p,
    .page-subtitle {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .tech-card {
        padding: 1rem;
    }

    .tech-card h3 {
        font-size: 1rem;
    }

    .tech-card p,
    .tech-card li {
        font-size: 0.85rem;
    }

    /* Forms */
    form input,
    form select,
    form textarea {
        font-size: 0.85rem;
        padding: 0.65rem;
    }

    form label {
        font-size: 0.8rem;
    }

    /* Buttons */
    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .btn-sm {
        padding: 0.3rem 0.5rem;
        font-size: 0.7rem;
    }

    .filter-btn {
        font-size: 0.7rem;
        padding: 0.35rem 0.6rem;
    }

    /* Login */
    .login-box {
        padding: 1.5rem 1rem;
    }

    .login-box h2 {
        font-size: 1.2rem;
    }

    .login-input,
    .login-btn {
        font-size: 0.85rem;
        padding: 0.75rem;
    }

    /* Tables */
    table {
        font-size: 0.7rem;
    }

    th,
    td {
        padding: 0.3rem !important;
        min-width: 60px;
    }

    /* Terminal */
    .terminal-body {
        height: 200px;
        font-size: 0.75rem;
        padding: 0.5rem;
    }

    /* Command Palette */
    #cmd-input {
        font-size: 0.85rem;
    }

    .cmd-item {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}


/* Command Palette */
.cmd-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
    opacity: 1;
    transition: opacity 0.2s;
}

.cmd-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
}

.cmd-modal {
    background: var(--bg-card);
    width: 600px;
    max-width: 90%;
    border-radius: 8px;
    border: 1px solid var(--accent-blue);
    box-shadow: 0 0 30px rgba(100, 255, 218, 0.15);
    overflow: hidden;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cmd-header {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

#cmd-input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Fira Code', monospace;
    font-size: 1.1rem;
    flex: 1;
    outline: none;
}

.cmd-results {
    padding: 0.5rem;
}

.cmd-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    margin-bottom: 2px;
    transition: all 0.2s;
    border-left: 2px solid transparent;
}

.cmd-item:hover {
    background: rgba(100, 255, 218, 0.05);
    border-left-color: var(--accent-blue);
}

.cmd-item-title {
    color: var(--text-primary);
    font-weight: 500;
}

.cmd-item-type {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* Terminal Wizard */
.terminal-window {
    background: #0a192f;
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-family: 'Fira Code', monospace;
    margin: 2rem 0;
    max-width: 800px;
}

.terminal-bar {
    background: #172a45;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
    height: 12px;
    width: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.terminal-body {
    padding: 1rem;
    height: 350px;
    overflow-y: auto;
    color: var(--text-primary);
}

.msg.system {
    color: var(--accent-blue);
}

.msg.user {
    color: #fff;
    opacity: 0.9;
    margin-left: 1rem;
    border-left: 2px solid var(--text-muted);
    padding-left: 0.5rem;
}

.terminal-input-line {
    display: flex;
    padding: 1rem;
    background: rgba(100, 255, 218, 0.05);
    align-items: center;
}

#wizard-input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: 'Fira Code', monospace;
    flex: 1;
    outline: none;
}

/* Typewriter */
.typing-cursor {
    display: inline-block;
    width: 8px;
    background-color: var(--accent-green);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Humanized EDI */
.edi-label {
    display: block;
    font-size: 0.6rem;
    color: var(--accent-orange);
    text-transform: uppercase;
    font-family: var(--font-sans);
}

.humanized .ele {
    display: none;
}

.humanized .segment-node {
    align-items: flex-start;
}

.humanized .ele-val-wrapper {
    display: inline-flex;
    flex-direction: column;
    margin-right: 0.8rem;
    vertical-align: top;
}

/* --- MULTI-THEME GLASS DEFINITIONS (The User Requested Consistency) --- */

/* 1. MATRIX (Hacker Glass) */
body.theme-matrix {
    --bg-body: #000000;
    --bg-card: rgba(0, 20, 0, 0.75);
    --bg-nav: rgba(0, 15, 0, 0.9);
    --border-color: #004400;
    --text-primary: #00cc00;
    --text-secondary: #008800;
    --accent-blue: #00ff00;
    --accent-green: #00ff00;
    --accent-orange: #00aa00;
    --text-muted: #004400;
    --glass-button: inset 0 0 10px rgba(0, 255, 0, 0.2);
}

body.theme-matrix .nav-link:hover {
    background: rgba(0, 255, 0, 0.15);
    box-shadow: var(--glass-button);
}

body.theme-matrix .tech-card:hover {
    border-color: #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
}

/* 2. NORD (Arctic Glass) */
body.theme-nord {
    --bg-body: #242933;
    --bg-card: rgba(46, 52, 64, 0.75);
    --bg-nav: rgba(46, 52, 64, 0.9);
    --border-color: #4c566a;
    --text-primary: #d8dee9;
    --text-secondary: #81a1c1;
    --accent-blue: #88c0d0;
    --accent-green: #a3be8c;
    --accent-orange: #d08770;
    --text-muted: #4c566a;
}

body.theme-nord .nav-link:hover {
    background: rgba(136, 192, 208, 0.15);
}

body.theme-nord .tech-card:hover {
    border-color: #88c0d0;
}

/* 3. SOLARIZED (Warm Glass) */
body.theme-solar {
    --bg-body: #002b36;
    --bg-card: rgba(7, 54, 66, 0.75);
    --bg-nav: rgba(7, 54, 66, 0.9);
    --border-color: #586e75;
    --text-primary: #839496;
    --text-secondary: #586e75;
    --accent-blue: #268bd2;
    --accent-green: #859900;
    --accent-orange: #cb4b16;
    --text-muted: #586e75;
}

body.theme-solar .nav-link:hover {
    background: rgba(38, 139, 210, 0.15);
}

body.theme-solar .tech-card:hover {
    border-color: #268bd2;
}

/* --- LIGHTBOX (For Diagrams) --- */
#diagram-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    z-index: 100000;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

#diagram-lightbox:not(.hidden) {
    display: flex;
}

#lightbox-content {
    background: var(--bg-body);
    border: 1px solid var(--accent-blue);
    border-radius: 8px;
    padding: 2rem;
    width: 90vw;
    /* Force width to be large */
    height: 85vh;
    /* Force height to be large */
    display: flex;
    /* Center SVG */
    align-items: center;
    justify-content: center;
    overflow: auto;
    position: relative;
    box-shadow: 0 0 50px rgba(47, 129, 247, 0.2);
}

#lightbox-content svg {
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
}

/* --- LOGIN BOX STYLES (Added for Dashboard) --- */
.login-box {
    background: rgba(17, 34, 64, 0.95);
    border: 1px solid var(--accent-blue);
    border-radius: 12px;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
    box-shadow: 0 0 40px rgba(47, 129, 247, 0.15);
    backdrop-filter: blur(12px);
}

.login-box h2 {
    color: var(--accent-blue);
    margin-bottom: 2rem;
    font-family: var(--font-mono);
    font-size: 1.5rem;
}

.login-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    padding: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
    border-radius: 6px;
    outline: none;
    transition: all 0.2s;
}

.login-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(47, 129, 247, 0.2);
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent-blue);
    color: #000;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-mono);
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.login-btn:hover {
    background: #58a6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 129, 247, 0.3);
}

.exit-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.2s;
}

.exit-link:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --- MODERN LOGIN BOX STYLES --- */
.login-box {
    background: linear-gradient(135deg, rgba(13, 17, 23, 0.98) 0%, rgba(22, 27, 34, 0.95) 100%);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
    border-radius: 16px;
    padding: 3.5rem 3rem;
    width: 100%;
    max-width: 460px;
    text-align: center;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(47, 129, 247, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

.login-box::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-green));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.6;
    z-index: -1;
}

.login-box h2 {
    color: var(--accent-blue);
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 0 20px rgba(47, 129, 247, 0.3);
}

.login-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(139, 148, 158, 0.3);
    padding: 1.1rem 1.2rem;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.login-input::placeholder {
    color: rgba(139, 148, 158, 0.6);
}

.login-input:focus {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 0 3px rgba(47, 129, 247, 0.15),
        inset 0 1px 3px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.login-btn {
    width: 100%;
    padding: 1.1rem;
    background: linear-gradient(135deg, var(--accent-blue), #58a6ff);
    color: #000;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-mono);
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 12px rgba(47, 129, 247, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #58a6ff, var(--accent-green));
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(47, 129, 247, 0.4),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.login-btn:active {
    transform: translateY(0);
    box-shadow:
        0 2px 8px rgba(47, 129, 247, 0.3),
        inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.exit-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid rgba(139, 148, 158, 0.3);
    border-radius: 6px;
    transition: all 0.2s;
    font-family: var(--font-mono);
}

.exit-link:hover {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
    background: rgba(47, 129, 247, 0.1);
    transform: translateY(-1px);
}

/* —— AI in the workflow (hub + dedicated page) —— */
.pro-site {
    --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-display: 'Syne', system-ui, sans-serif;
}

.pro-site .hero-name,
.pro-site .ai-practice-title,
.pro-site .page-title {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

.ai-practice {
    position: relative;
    padding: 0.5rem 0 0.25rem;
    max-width: 46rem;
}

.ai-practice::before {
    content: '';
    position: absolute;
    inset: -1.5rem -1.25rem -1rem;
    border-radius: 18px;
    background:
        radial-gradient(ellipse 80% 60% at 0% 0%, rgba(47, 129, 247, 0.12), transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 100%, rgba(63, 185, 80, 0.08), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.ai-practice > * {
    position: relative;
    z-index: 1;
}

.ai-practice-kicker {
    margin-bottom: 1rem;
    animation: ai-fade-up 0.55s ease both;
}

.ai-practice-title {
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
    animation: ai-fade-up 0.6s ease 0.06s both;
}

.ai-practice-lead {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 2.25rem;
    max-width: 38rem;
    animation: ai-fade-up 0.65s ease 0.12s both;
}

.ai-practice-lanes {
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--border-color);
}

.ai-lane {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 1rem 1.25rem;
    padding: 1.35rem 0;
    border-bottom: 1px solid var(--border-color);
    align-items: start;
    animation: ai-fade-up 0.7s ease both;
}

.ai-lane:nth-child(1) { animation-delay: 0.16s; }
.ai-lane:nth-child(2) { animation-delay: 0.22s; }
.ai-lane:nth-child(3) { animation-delay: 0.28s; }
.ai-lane:nth-child(4) { animation-delay: 0.34s; }

.ai-lane-label {
    color: var(--accent-green);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding-top: 0.2rem;
}

.ai-lane h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    font-family: var(--font-sans, 'Plus Jakarta Sans', system-ui, sans-serif);
}

.ai-lane p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0;
}

.ai-practice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    animation: ai-fade-up 0.7s ease 0.4s both;
}

.ai-page {
    padding-bottom: 4rem;
}

.ai-page-header {
    max-width: 42rem;
}

.ai-story {
    max-width: 40rem;
    margin-bottom: 3rem;
}

.ai-story-title {
    font-family: var(--font-display, 'Syne', system-ui, sans-serif);
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.ai-story p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1rem;
    font-size: 1.02rem;
}

.ai-practice--page {
    max-width: 46rem;
    margin-bottom: 3rem;
}

.ai-practice--page::before {
    inset: -0.5rem -0.75rem;
}

.ai-closing {
    max-width: 40rem;
    padding-top: 0.5rem;
}

.ai-closing-line {
    font-family: var(--font-display, 'Syne', system-ui, sans-serif);
    font-size: clamp(1.15rem, 2.8vw, 1.45rem);
    line-height: 1.45;
    color: var(--text-primary);
    margin-bottom: 1.75rem;
}

@keyframes ai-fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .ai-lane {
        grid-template-columns: 1fr;
        gap: 0.35rem;
        padding: 1.15rem 0;
    }

    .ai-lane-label {
        padding-top: 0;
    }

    .ai-practice::before {
        inset: -0.75rem -0.5rem;
        border-radius: 12px;
    }
}



.ai-roster {
    margin: 0 0 2rem;
    padding: 1.35rem 0 0.25rem;
    border-top: 1px solid var(--border-color);
    animation: ai-fade-up 0.7s ease 0.36s both;
}

.ai-roster-title {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 0 0 1.1rem;
}

.ai-roster-groups {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.ai-roster-heading {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.65rem;
    font-family: var(--font-sans, 'Plus Jakarta Sans', system-ui, sans-serif);
}

.ai-roster-tags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.55rem;
}

.ai-roster-tags .mono-tag {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
    border: 1px solid rgba(126, 231, 135, 0.22);
    background: rgba(126, 231, 135, 0.08);
}

.ai-roster-group--create .mono-tag {
    color: var(--accent-blue);
    background: rgba(47, 129, 247, 0.1);
    border-color: rgba(47, 129, 247, 0.25);
}

.ai-roster-note {
    margin: 1.15rem 0 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
    max-width: 36rem;
}

@media (prefers-reduced-motion: reduce) {
    .ai-practice-kicker,
    .ai-practice-title,
    .ai-practice-lead,
    .ai-lane,
    .ai-practice-actions,
    .ai-roster {
        animation: none;
    }
}


/* Skip link + hub value/resume strips (site enrich) */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 1000;
    padding: 0.65rem 1rem;
    background: var(--accent-blue);
    color: #061018;
    font-weight: 600;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}
.btn-ghost {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    font-weight: 600;
}
.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--border-color);
}
.value-props { margin: 0 0 3rem; }
.value-props-title {
    font-family: var(--font-display, 'Syne', sans-serif);
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 0.75rem 0 0.5rem;
    letter-spacing: -0.02em;
}
.value-props-lead {
    color: var(--text-secondary);
    max-width: 42rem;
    margin-bottom: 1.75rem;
}
.value-props-list {
    list-style: none;
    display: grid;
    gap: 0;
    border-top: 1px solid var(--border-color);
    padding: 0;
    margin: 0;
}
.value-prop {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: 0.35rem 1.25rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color);
    align-items: start;
}
.value-prop h3 { grid-column: 2; margin: 0; font-size: 1.1rem; }
.value-prop p {
    grid-column: 2;
    margin: 0;
    color: var(--text-secondary);
    max-width: 40rem;
}
.value-prop-tag {
    color: var(--accent-green);
    font-size: 0.8rem;
    padding-top: 0.25rem;
}
.resume-strip {
    display: grid;
    gap: 1.25rem;
    padding: 1.75rem 0 2.5rem;
    margin-bottom: 2.5rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.resume-strip-copy h2 {
    font-family: var(--font-display, 'Syne', sans-serif);
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    margin: 0.5rem 0;
    letter-spacing: -0.02em;
}
.resume-strip-copy p:last-child {
    color: var(--text-secondary);
    max-width: 36rem;
    margin: 0;
}
.resume-strip-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (min-width: 800px) {
    .resume-strip {
        grid-template-columns: 1.4fr auto;
        align-items: center;
    }
}


/* —— Insight essays (editorial index + post) —— */
.insights-page {
    padding-bottom: 4rem;
}

.insights-hero {
    display: grid;
    gap: 1.75rem;
    align-items: end;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.insights-hero::before {
    content: '';
    position: absolute;
    inset: -1.5rem -1rem auto;
    height: 12rem;
    background:
        radial-gradient(ellipse 70% 80% at 10% 40%, rgba(47, 129, 247, 0.14), transparent 60%),
        radial-gradient(ellipse 50% 60% at 90% 20%, rgba(63, 185, 80, 0.08), transparent 55%);
    pointer-events: none;
    z-index: 0;
}

.insights-hero > * {
    position: relative;
    z-index: 1;
}

.insights-hero-copy .page-subtitle {
    max-width: 36rem;
}

.insights-hero-visual {
    margin: 0;
    overflow: hidden;
    border-radius: 6px;
}

.insights-hero-visual img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    object-position: center;
    animation: essay-fade-up 0.7s ease both;
}

.essay-index-head,
.insights-reference .section-head {
    margin-bottom: 1.5rem;
}

.insights-page .section-lead {
    color: var(--text-secondary);
    max-width: 36rem;
    margin: 0.5rem 0 0;
    font-size: 1.02rem;
    line-height: 1.6;
}

.essay-index h2,
.insights-reference h2 {
    font-family: var(--font-display, 'Syne', sans-serif);
    font-size: clamp(1.45rem, 3vw, 1.9rem);
    letter-spacing: -0.02em;
    margin: 0;
}

.essay-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-color);
    margin-bottom: 3.5rem;
}

.essay-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: background 0.25s ease, transform 0.25s ease;
    animation: essay-fade-up 0.65s ease both;
}

.essay-row:nth-child(1) { animation-delay: 0.05s; }
.essay-row:nth-child(2) { animation-delay: 0.1s; }
.essay-row:nth-child(3) { animation-delay: 0.15s; }
.essay-row:nth-child(4) { animation-delay: 0.2s; }
.essay-row:nth-child(5) { animation-delay: 0.25s; }

.essay-row:hover {
    transform: translateX(4px);
}

.essay-row-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
}

.essay-row-body h3 {
    font-family: var(--font-display, 'Syne', sans-serif);
    font-size: clamp(1.15rem, 2.5vw, 1.4rem);
    margin: 0 0 0.4rem;
    letter-spacing: -0.015em;
    color: var(--text-primary);
}

.essay-row-body p {
    margin: 0;
    color: var(--text-secondary);
    max-width: 40rem;
    line-height: 1.55;
}

.essay-row-cta {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-green);
    align-self: end;
}

.reference-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--border-color);
}

.reference-note {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.reference-note h3 {
    font-family: var(--font-display, 'Syne', sans-serif);
    font-size: 1.25rem;
    margin: 0 0 0.75rem;
}

.reference-note p {
    color: var(--text-secondary);
    margin: 0.75rem 0 0;
    max-width: 42rem;
}

.essay-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.code-snippet {
    background: #000;
    padding: 1rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #d29922;
    margin-top: 1rem;
}

.essay-page {
    max-width: 48rem;
    padding-bottom: 4rem;
}

.pro-essay-header {
    margin-bottom: 1.75rem;
    animation: essay-fade-up 0.55s ease both;
}

.pro-essay-header .page-title {
    margin: 0.5rem 0 1rem;
}

.essay-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0.75rem 0 0;
}

.pro-essay-hero {
    margin: 0 0 2rem;
    overflow: hidden;
    border-radius: 6px;
    animation: essay-fade-up 0.65s ease 0.08s both;
}

.pro-essay-hero img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: cover;
}

.pro-essay-body {
    font-size: 1.05rem;
    line-height: 1.75;
    animation: essay-fade-up 0.7s ease 0.14s both;
}

.pro-essay-body p {
    color: var(--text-secondary);
    margin: 0 0 1.35rem;
}

.essay-fundamentals {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    border-top: 1px solid var(--border-color);
}

.essay-fundamentals li {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.essay-fundamentals strong {
    color: var(--text-primary);
}

.essay-closing {
    font-style: italic;
    color: var(--text-primary) !important;
    border-left: 2px solid var(--accent-green);
    padding-left: 1rem;
}

.essay-back {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.essay-back a {
    font-family: var(--font-mono);
    color: var(--accent-blue);
    text-decoration: none;
}

.essay-back a:hover {
    text-decoration: underline;
}

@keyframes essay-fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 860px) {
    .insights-hero {
        grid-template-columns: 1.2fr 0.8fr;
    }

    .essay-row {
        grid-template-columns: 8.5rem 1fr auto;
        align-items: center;
    }

    .essay-row-cta {
        opacity: 0;
        transform: translateX(-6px);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .essay-row:hover .essay-row-cta {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 640px) {
    .insights-hero-visual img {
        max-height: 160px;
    }

    .pro-essay-hero img {
        max-height: 200px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .essay-row,
    .insights-hero-visual img,
    .pro-essay-header,
    .pro-essay-hero,
    .pro-essay-body {
        animation: none;
    }

    .essay-row:hover {
        transform: none;
    }
}
