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

html, body {
    height: 100%;
}

/* Prevent iOS Safari text auto-zoom inconsistencies */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    background: #FFFFFF;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal overflow causing initial zoom */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Media elements should never exceed viewport width */
img, svg, video {
    max-width: 100%;
    height: auto;
}

/* Header */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 24px;
    width: 100%;
    background: #FFFFFF;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1392px;
    height: 40px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-svg {
    height: 32px;
    width: auto;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.logo-link:hover .logo-svg {
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 16px;
    color: rgba(0, 0, 0, 0.6);
    text-decoration: none;
    padding: 8px 0;
}





/* Main Content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 64px 0;
    max-width: 1440px;
    margin: 0 auto;
}

/* Minimal directory main - increased top padding for no hero */
.main.minimal-directory {
    padding: 64px 64px 0;
}

@media (max-width: 768px) {
    .main.minimal-directory {
        padding: 32px 16px 0;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 840px;
    border-radius: 24px;
    margin-bottom: 64px;
    overflow: hidden;
    min-height: 400px;
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./hero-background.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    padding: 56px;
    gap: 24px;
    /* background: rgba(255, 255, 255, 0.85); */
    /* backdrop-filter: blur(10px); */
    height: 100%;
}

.hero-title {
    font-weight: 700;
    font-size: 48px;
    line-height: 130%;
    color: #000000;
    margin-bottom: 16px;
}

.hero-introduction {
    font-size: 18px;
    line-height: 155%;
    color: #333333;
}

.hero-introduction .content-paragraph {
    margin-bottom: 16px;
    font-size: 18px;
    line-height: 155%;
    color: #333333;
}

.hero-introduction .content-paragraph:last-child {
    margin-bottom: 0;
}

.hero-description {
    font-size: 18px;
    line-height: 155%;
    color: #000000;
}

/* Inline explanation notes used inside paragraphs */
.explanation {
    color: rgba(0, 0, 0, 0.6);
    font-style: normal;
}

/* Table of Contents */
.table-of-contents {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 840px;
    margin-bottom: 64px;
    padding: 32px 56px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 16px;
}

.toc-title {
    font-weight: 600;
    font-size: 20px;
    line-height: 130%;
    color: #000000;
    margin-bottom: 20px;
}

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

.toc-item {
    margin-bottom: 0px;
}

.toc-link {
    display: flex;
    align-items: flex-start;
    text-decoration: none;
    color: #333333;
    font-size: 16px;
    line-height: 140%;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.toc-link:hover {
    color: #00bf30;
}

.toc-number {
    font-weight: 600;
    color: #00bf30;
    margin-right: 12px;
    min-width: 20px;
}

.toc-text {
    flex: 1;
}

/* Mobile responsive for TOC */
@media (max-width: 768px) {
    .table-of-contents {
        padding: 24px 32px;
        margin-bottom: 48px;
    }
    
    .toc-title {
        font-size: 18px;
        margin-bottom: 16px;
    }
    
    .toc-link {
        font-size: 15px;
    }
    
    .toc-number {
        min-width: 18px;
        margin-right: 10px;
    }
}

/* Content Sections */
.content-section {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 840px;
    margin-bottom: 72px;
}

/* Ensure anchor links (from TOC) are not hidden under sticky header */
.content-section, .section-header, .section-title, .subsection-title {
    scroll-margin-top: 72px;
}

.section-header {
    padding: 0 56px;
    margin-bottom: 32px;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: rgba(0, 191, 48, 0.1);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #008020;
    margin-bottom: 12px;
}

.section-title {
    font-weight: 700;
    font-size: 36px;
    line-height: 130%;
    color: #000000;
}

.section-content {
    padding: 0 56px;
}

.section-text {
    font-size: 18px;
    line-height: 155%;
    color: #000000;
    font-weight: 400;
}

.content-paragraph {
    font-size: 18px;
    line-height: 155%;
    color: #000000;
    margin-bottom: 16px;
    font-weight: 400;
}

.content-heading,
.subsection-title {
    font-size: 24px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 12px;
    margin-top: 24px;
}

/* Subsection container spacing to match text rhythm */
.subsection {
    margin-top: 16px;
    margin-bottom: 8px;
}

/* Ordered lists with improved spacing and alignment */
.content-ordered-list {
    margin: 16px 0;
    padding-left: 24px;
}

.content-ordered-list li {
    margin-bottom: 16px;
}

/* Content table styling with borders and full width */
/* Scroll container so wide tables don't inflate layout on mobile */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0;
}
.content-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 16px;
}

.content-table th,
.content-table td {
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px 16px;
    text-align: left;
}

.content-table th {
    background-color: rgba(0, 0, 0, 0.02);
    font-weight: 600;
    color: #000000;
}

.content-table td {
    color: rgba(0, 0, 0, 0.8);
}

/* Small note below tables */
.table-footnote {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.6);
}

/* Mobile table behavior: readable wrapping without page overflow */
@media (max-width: 768px) {
    .content-table {
        table-layout: fixed;      /* stable column sizing within viewport */
        font-size: 14px;          /* slightly smaller for phones */
    }
    .content-table th,
    .content-table td {
        padding: 10px 12px;       /* tighter cell padding */
        white-space: normal;      /* wrap by words */
        word-break: normal;       /* no character-by-character breaks */
        overflow-wrap: normal;    /* avoid overly aggressive breaks */
        hyphens: auto;            /* allow natural hyphenation where supported */
    }
}

.content-list {
    margin: 16px 0;
    padding-left: 24px;
}

.content-list li {
    margin-bottom: 16px;
}

.content-list-item {
    font-size: 18px;
    line-height: 155%;
    color: #000000;
    margin-bottom: 8px;
}

/* Step Cards */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0 24px;
}

.step-card {
    display: flex;
    flex-direction: column;
    padding: 32px;
    gap: 12px;
    background: #FFFFFF;
    box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.04), 0px 0px 4px rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    position: relative;
}

/* Definition content now uses step-card + step-title */
/* Step cards inside section-content should align text with regular paragraphs */
.section-content .step-card {
    margin: 0 -56px 16px -56px;
    padding: 24px 56px;
}

/*.step-card::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: rgba(0, 191, 48, 0.3);
}*/

.step-title {
    font-weight: 600;
    font-size: 20px;
    line-height: 130%;
    color: #000000;
}

.step-description {
    font-size: 16px;
    line-height: 145%;
    color: rgba(0, 0, 0, 0.7);
    font-weight: 400;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0 24px;
}

.benefit-card {
    display: flex;
    flex-direction: column;
    padding: 32px;
    gap: 32px;
    background: #FFFFFF;
    box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.04), 0px 0px 4px rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    min-height: 320px;
}

.benefit-icon {
    width: 40px;
    height: 40px;
    background: rgba(0, 191, 48, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-icon svg {
    width: 24px;
    height: 24px;
    fill: #00BF30;
}

.benefit-icon img {
    width: 24px;
    height: 24px;
    display: block;
}

.benefit-text {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.benefit-title {
    font-weight: 600;
    font-size: 20px;
    line-height: 130%;
    color: #000000;
}

.benefit-description {
    font-size: 16px;
    line-height: 145%;
    color: rgba(0, 0, 0, 0.7);
    font-weight: 400;
}

/* Key Capabilities Grid - using benefit-card layout without star icons */
.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin: 32px 0;
}

/* Flexible benefit card for Key Capabilities - removes min-height and adjusts padding */
.capabilities-grid .benefit-card {
    min-height: auto;
    padding: 24px;
    gap: 16px;
}

.capabilities-link-container {
    grid-column: 1 / -1;
    margin-top: 16px;
    text-align: center;
}

@media (max-width: 768px) {
    .capabilities-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Implementation List - Text aligned with section title */
.implementation-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0;
    margin: 0;
}

.implementation-item {
    display: flex;
    align-items: flex-start;
    position: relative;
    padding: 0;
}

.implementation-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #00BF30;
    font-weight: 400;
    flex-shrink: 0;
    margin: 0;
    position: absolute; /* Position numbers absolutely */
    left: 0; /* Align with benefit card edge */
}

.implementation-text {
    font-size: 18px;
    line-height: 155%;
    color: #000000;
    font-weight: 400;
    margin: 0;
    padding-left: 32px; /* Push text to align with "Implementation" title */
}

.implementation-text strong {
    font-weight: 600;
    color: #000000;
}

/* Keep section-level padding for overall alignment */
.content-section .implementation-list {
    padding: 0 24px;
}

/* Style for the title part within implementation text */
.implementation-title {
    font-weight: 600;
    color: #000000;
}

/* Alternative approach if you can modify the HTML structure */
.implementation-content {
    font-size: 18px;
    line-height: 155%;
    color: #000000;
}

.implementation-content .step-title {
    font-weight: 600;
    color: #000000;
    display: inline;
}

.implementation-content .step-description {
    font-weight: 400;
    color: #000000;
}

/* Tags */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 56px;
}

.tag {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    font-size: 16px;
    color: rgba(0, 0, 0, 0.7);
}

/* Breadcrumbs - Fixed for Two-Line Layout */
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping */
    gap: 4px 8px; /* Small vertical gap between lines, horizontal gap between items */
    padding: 0 56px;
    margin-bottom: 32px;
    font-size: 14px;
    line-height: 1.4;
}

.breadcrumbs a.breadcrumb-link,
.breadcrumbs span.breadcrumb-current {
    color: rgba(0, 0, 0, 0.6) !important; /* Black with 60% opacity for default state */
    text-decoration: none !important;
    white-space: nowrap; /* Keep individual items from breaking */
    display: inline-block;
    vertical-align: middle;
    position: relative;
    transition: color 0.2s ease;
    border-bottom: none !important; /* Remove any blue underlines */
    background-color: transparent !important; /* Remove any blue backgrounds */
}

.breadcrumbs a.breadcrumb-link:hover {
    color: rgba(0, 0, 0, 1.0) !important; /* Black with 100% opacity on hover */
    background-color: transparent !important;
    border-bottom: none !important;
}

/* Home icon link */
.breadcrumbs a.breadcrumb-link:first-child {
    display: inline-flex;
    align-items: center;
}

/* The circle for the home icon */
.breadcrumbs a.breadcrumb-link:first-child div {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.6) !important;
    border-radius: 50%;
    display: inline-block;
}

/* Style for the current page item */
.breadcrumbs span.breadcrumb-current {
    font-weight: 600 !important;
    color: rgba(0, 0, 0, 0.8) !important; /* Slightly darker for current page */
    text-decoration: none !important;
    border-bottom: none !important;
    background-color: transparent !important;
}

/* Breadcrumb separators - using chevron-forward.svg */
.breadcrumb-separator {
    width: 8px;
    height: 8px;
    opacity: 0.6;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0; /* Prevent separators from shrinking */
}

/* Solution Overview Links - Fixed to prevent text shifting */
.content-paragraph a,
.section-content a,
.hero-introduction a {
    color: inherit; /* Use the same color as surrounding text */
    text-decoration: underline; /* Always underlined */
    text-decoration-thickness: 1px; /* Standard underline thickness */
    font-weight: 500; /* Slightly bolder than normal text by default */
    transition: text-decoration-thickness 0.2s ease; /* Smooth transition for underline */
}

.content-paragraph a:hover,
.section-content a:hover,
.hero-introduction a:hover {
    font-weight: 500; /* Keep the same font-weight to prevent shifting */
    text-decoration: underline;
    text-decoration-thickness: 2px; /* Thicker underline on hover */
}

.content-paragraph a:visited,
.section-content a:visited,
.hero-introduction a:visited {
    color: inherit; /* Same color for visited links */
    text-decoration: underline;
    text-decoration-thickness: 1px;
    font-weight: 500; /* Same weight for visited links */
}

/* Override any existing AI task link styles in content sections */
.content-paragraph .ai-task-link,
.section-content .ai-task-link,
.hero-introduction .ai-task-link {
    color: inherit !important;
    text-decoration: underline !important;
    text-decoration-thickness: 1px !important;
    font-weight: 500 !important; /* Slightly bolder by default */
    border-bottom: none !important;
    background-color: transparent !important;
    padding: 0 !important;
    transition: text-decoration-thickness 0.2s ease !important;
}

.content-paragraph .ai-task-link:hover,
.section-content .ai-task-link:hover,
.hero-introduction .ai-task-link:hover {
    color: inherit !important;
    font-weight: 500 !important; /* Keep same weight to prevent shifting */
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important; /* Thicker underline on hover */
    background-color: transparent !important;
}

.content-paragraph .ai-task-link:visited,
.section-content .ai-task-link:visited,
.hero-introduction .ai-task-link:visited {
    color: inherit !important;
    font-weight: 500 !important;
    text-decoration-thickness: 1px !important;
}

/* Remove the external link indicator from content links */
.content-paragraph .ai-task-link:after,
.section-content .ai-task-link:after,
.hero-introduction .ai-task-link:after {
    display: none;
}

/* Mobile responsive adjustments for breadcrumbs */
@media (max-width: 768px) {
    .breadcrumbs {
        padding: 0 24px;
        gap: 2px 6px; /* Smaller gaps on mobile */
    }
}

/* Vendors Section (Figma list design) */
.vendors-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 56px;
    gap: 40px;
    width: 100%;
    max-width: 840px;
    background: #FAFAFA;
    border-radius: 24px;
    margin: 0 auto 72px;
}

.vendors-title {
    font-weight: 700;
    font-size: 28px;
    line-height: 130%;
    color: #000000;
}

.vendors-list {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.vendor-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0 12px 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-left: 3px solid transparent;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0 8px 8px 0;
}

.vendor-item:hover {
    border-left-color: rgba(0, 191, 48, 0.20);
    background: rgba(0, 191, 48, 0.06);
    padding-left: 12px;
}

.vendor-logo {
    width: 64px;
    height: 64px;
    background: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 760;
    font-size: 24px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.vendor-item:hover .vendor-logo {
    box-shadow: 0 2px 8px rgba(0, 191, 48, 0.15);
}

.vendor-info {
    flex: 1;
    min-width: 0;
}

.vendor-name {
    font-weight: 600;
    font-size: 18px;
    color: #000000;
    margin-bottom: 4px;
    transition: color 0.3s ease;
}

.vendor-item:hover .vendor-name {
    color: #00BF30;
}

.vendor-description {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.7);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .vendors-section {
        padding: 32px 16px;
        margin-bottom: 48px;
    }
}

/* Related Articles */
.related-section {
    width: 100%;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 64px;
    background: #FFFFFF;
}

@media (max-width: 768px) {
    .related-section {
        padding: 32px 16px;
    }

    .related-title {
        font-size: 28px;
        margin-bottom: 32px;
    }

    .related-card {
        min-height: auto;
    }
}

.related-wrapper {
    max-width: 1312px;
    margin: 0 auto;
}

.related-title {
    font-weight: 700;
    font-size: 36px;
    line-height: 130%;
    color: #000000;
    margin-bottom: 48px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.related-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
    min-height: 240px;
    background: linear-gradient(135deg, #E8F5E8 0%, #D4F1D4 100%);
    border-radius: 24px;
}

.related-card-title {
    font-weight: 600;
    font-size: 20px;
    line-height: 125%;
    color: #000000;
    margin-bottom: auto;
}

.related-card-category {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.6);
    margin-top: 16px;
}

.category-placeholder {
    background: #F6F6F6;
    border-radius: 24px;
    padding: 24px;
    text-align: center;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.category-title {
    font-weight: 600;
    font-size: 20px;
    color: #28AE00;
    margin: 16px 0;
}

.category-count {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 16px;
}

/* Footer */
.footer {
    display: flex;
    justify-content: center;
    padding: 24px 64px;
    width: 100%;
    background: #FFFFFF;
}

.footer-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1312px;
}

.footer-nav {
    display: flex;
    gap: 40px;
}

.footer-link {
    font-size: 16px;
    color: rgba(0, 0, 0, 0.6);
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main {
        padding: 16px;
    }

    /* Unify hero on small screens across page types */
    .hero-section {
        padding: 24px 16px;
        min-height: auto;
    }

    .hero-content {
        padding: 24px;
        gap: 16px;
    }

    .hero-title {
        font-size: 32px;
        line-height: 130%;
        margin-bottom: 8px;
    }

    .hero-introduction {
        font-size: 16px;
        line-height: 150%;
    }

    /* Remove wide negative margins from step cards on phones */
    .section-content .step-card {
        margin: 0 0 16px 0;
        padding: 16px 24px;
    }

    /* Tighter rhythm for sections on small screens */
    .section-header {
        margin-bottom: 24px;
    }

    .section-title {
        font-size: 28px;
        line-height: 130%;
    }

    .subsection-title {
        font-size: 20px;
        margin-bottom: 8px;
        margin-top: 20px;
    }

    .section-content,
    .content-paragraph {
        font-size: 16px;
        line-height: 150%;
    }

    .section-header,
    .section-content,
    .implementation-list,
    .tags-container {
        padding: 0 24px;
    }

    .vendors-section {
        padding: 32px 16px;
    }

    .nav-menu {
        display: none;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .use-cases-grid,
    .related-tasks-grid {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }

    .use-case-card,
    .related-task-card {
        padding: 24px;
        min-height: auto;
    }

    .patent-source {
        padding: 72px 24px 0px;
    }

    .content-section .implementation-list {
        padding: 0 24px;
    }
    
    .implementation-text {
        padding-left: 32px; /* Maintain text alignment on mobile */
    }
}

/* AI Task Components - Use Cases and Related Tasks */

/* Use Cases Grid - Matching Benefits Grid Style */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    padding: 0 24px;
}

.use-case-card {
    display: flex;
    flex-direction: column;
    padding: 32px;
    gap: 16px;
    background: #FFFFFF;
    box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.04), 0px 0px 4px rgba(0, 0, 0, 0.06);
    border-radius: 24px;
    min-height: 200px;
}

.use-case-title {
    font-weight: 600;
    font-size: 18px;
    line-height: 130%;
    color: #000000;
    margin-bottom: 8px;
}

.use-case-description {
    font-size: 16px;
    line-height: 145%;
    color: rgba(0, 0, 0, 0.7);
}

.use-case-industry {
    font-weight: 600;
    font-size: 18px;
    line-height: 130%;
    color: #000000;
    margin-bottom: 8px;
}

/* Related Tasks Section */
.related-tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    padding: 0 24px;
}

.related-task-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 12px;
    background: linear-gradient(135deg, #E8F5E8 0%, #D4F1D4 100%);
    border-radius: 24px;
    min-height: 160px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Some pages inline-set related-task links to block; enforce intended layout */
a.related-task-card {
    display: flex !important;
}

.related-task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.08);
}

.related-task-title {
    font-weight: 600;
    font-size: 18px;
    line-height: 125%;
    color: #000000;
}

.related-task-description {
    font-size: 14px;
    line-height: 145%;
    color: rgba(0, 0, 0, 0.7);
    flex-grow: 1;
}

.related-task-meta {
    margin-top: auto;
}

.related-task-tag {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.3);
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
}

/* AI Task Links Styling - Updated for new tab behavior */
.ai-task-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.ai-task-link:hover {
    color: #0052a3;
    border-bottom-color: #0066cc;
    background-color: rgba(0, 102, 204, 0.1);
    padding: 1px 2px;
    border-radius: 2px;
}

.ai-task-link:visited {
    color: #5a6c7d;
}

/* Add external link indicator for new tab links */
.ai-task-link:after {
    content: "↗";
    font-size: 0.8em;
    margin-left: 2px;
    opacity: 0.6;
}

/* Ensure links work well in paragraphs */
.content-paragraph .ai-task-link {
    display: inline;
    line-height: inherit;
}

/* Patent citation styles */
.patent-citation {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0.5rem 0 1.5rem 0;
   /*font-style: italic;*/
}

/* Patent source styles - Fixed version */
.patent-source {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 72px 56px 0px;
    gap: 32px;
    
    width: 100%;
    max-width: 840px;
    min-height: 118px;
    
    margin-bottom: 32px;
}

.patent-source p {
    margin: 0;
    font-size: 16px;
    color: #4b5563;
    line-height: 1.5;
}

.patent-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}

.patent-link:hover {
    color: #1f2937;
    text-decoration-thickness: 2px;
}

.patent-link:focus-visible {
    outline: 2px solid #006eff;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Directory Page Styles */
.directory-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

.stat-item {
    padding: 6px 12px;
    background: rgba(0, 191, 48, 0.1);
    border-radius: 999px;
    font-size: 14px;
    color: #008020;
}

.directory-content {
    margin-bottom: 48px;
}

/* Minimal directory content - add breathing room from header */
.directory-content.minimal {
    padding-top: 32px;
}

@media (max-width: 768px) {
    .directory-content.minimal {
        padding-top: 16px;
    }
}

.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0 24px;
    margin-bottom: 40px;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
}

.usecase-card,
.directory-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px;
    min-height: 200px;
    background: linear-gradient(135deg, #e8f5e8 0%, #d4f1d4 100%);
    border-radius: 24px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    box-shadow: none;
}

.usecase-card:hover,
.directory-card:hover {
    transform: translateY(-4px);
    box-shadow: 0px 12px 24px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: inherit;
}

.usecase-card-title,
.directory-card-title {
    margin-bottom: auto;
    font-weight: 600;
    font-size: 18px;
    line-height: 125%;
    color: #000000;
    padding-right: 8px;
}

.usecase-card-title a {
    color: #000000;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    line-height: 125%;
}

.usecase-card-title a:hover {
    color: #000000;
}

.usecase-card-meta,
.directory-card-category {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.usecase-industry,
.usecase-task,
.directory-card-category {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.6);
    background: none;
    padding: 0;
    border-radius: 0;
    text-transform: capitalize;
}

.directory-card-category::before {
    content: "🏷️ ";
    font-size: 12px;
    opacity: 0.7;
}

/* Directory card action (for CTA cards) - with arrow */
.directory-card-action {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 20px;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.6);
    background: none;
    padding: 0;
    border-radius: 0;
    text-transform: capitalize;
}

.directory-card-action::after {
    content: " →";
    margin-left: 4px;
}

.no-results {
    text-align: center;
    padding: 48px 24px;
    color: rgba(0, 0, 0, 0.6);
}

/* Pagination Styles */
.pagination-section {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 32px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.pagination-link {
    padding: 8px 16px;
    text-decoration: none;
    color: #0066cc;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-link:hover {
    background-color: rgba(0, 102, 204, 0.1);
}

.pagination-current {
    padding: 8px 16px;
    background-color: #0066cc;
    color: white;
    border-radius: 8px;
    font-weight: 600;
}

.pagination-ellipsis {
    padding: 8px 16px;
    color: rgba(0, 0, 0, 0.5);
    user-select: none;
}

/* SVG Arrow Styles */
.pagination-arrow {
    width: 16px;
    height: 16px;
    color: inherit;
}

.pagination-arrow-left {
    transform: rotate(180deg);
}

.pagination-prev {
    flex-direction: row;
}

.pagination-next {
    flex-direction: row;
}

@media (max-width: 768px) {
    .directory-stats {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .directory-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
} 

/* New styles for the homepage grid ONLY */

.homepage-capabilities-grid {
    display: grid;
    gap: 16px;
    padding: 0 24px;
    grid-template-columns: 1fr; /* Mobile default: 1 column */
}

/* Tablet: 2 columns */
@media (min-width: 640px) {
    .homepage-capabilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop: 3 columns */
@media (min-width: 840px) {
    .homepage-capabilities-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Spacing adjustment for card titles ONLY on the homepage */
.homepage-capabilities-grid .directory-card-title {
    margin-bottom: 12px; /* Increases space below the title */
}

/* Homepage v2 */

.home-hero {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: #000000;
    color: #ffffff;
    border-radius: 0;
    overflow: hidden;
    padding: 56px 24px;
    margin-bottom: 56px;
    margin-top: -32px; /* cancel `.main` top padding on homepage */
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-hero-inner {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

.home-hero-copy {
    max-width: 840px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.home-hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 130%;
    margin-bottom: 20px;
    color: #ffffff;
}

.home-hero-description {
    font-size: 18px;
    line-height: 155%;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 24px;
    max-width: 417px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.home-hero-copy .home-hero-cta {
    font-weight: 400;
}

.home-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #00bf30;
    font-size: 16px;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 191, 48, 0.35);
    padding-bottom: 2px;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.home-hero-cta:hover {
    opacity: 0.9;
    border-bottom-color: rgba(0, 191, 48, 0.7);
}

.home-hero-cta-arrow {
    font-size: 18px;
    line-height: 1;
}

.home-hero-art {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.home-case-card {
    position: absolute;
    width: 176px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0px 14px 44px rgba(0, 0, 0, 0.35);
    opacity: 0.96;
}

.home-case-card-1 {
    top: 72px;
    left: 72px;
}

.home-case-card-2 {
    top: 92px;
    right: 96px;
}

.home-case-card-3 {
    bottom: -48px;
    left: 280px;
}

.home-case-card-4 {
    bottom: -60px;
    right: 220px;
}

.section-subtitle {
    margin-top: 10px;
    font-size: 18px;
    line-height: 155%;
    color: rgba(0, 0, 0, 0.7);
    font-weight: 400;
}

.home-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0 24px;
}

.home-how-intro {
    margin-bottom: 32px;
}

.home-how-intro .content-paragraph {
    margin-bottom: 0;
}

.home-steps .step-card {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: none;
    gap: 8px;
    padding: 24px;
}

.home-steps .step-title {
    font-size: 16px;
    line-height: 140%;
}

.home-steps .step-description {
    font-size: 13px;
    line-height: 155%;
}

.home-benefits .benefit-card {
    min-height: auto;
    padding: 24px;
    gap: 16px;
}

.home-benefits .benefit-icon {
    background: transparent;
    border-radius: 0;
}

.home-benefits .benefit-icon img {
    width: 40px;
    height: 40px;
}

.home-benefits .benefit-title {
    font-size: 16px;
    line-height: 140%;
}

.home-benefits .benefit-description {
    font-size: 13px;
    line-height: 155%;
}

.home-methods-grid .step-description {
    font-size: 13px;
    line-height: 155%;
}

.home-methods-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0 24px;
}

.home-method-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px;
    min-height: 220px;
    background-color: rgba(233, 246, 220, 0.55);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.home-method-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--method-bg);
    background-size: cover;
    background-position: center;
    opacity: 0.88;
    filter: saturate(1.35) contrast(1.25) brightness(0.98);
}

.home-method-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.16) 0%,
        rgba(255, 255, 255, 0.06) 52%,
        rgba(240, 248, 231, 0.24) 100%
    );
}

.home-method-card > * {
    position: relative;
    z-index: 1;
}

.home-method-card:hover {
    transform: translateY(-3px);
    box-shadow: 0px 12px 24px rgba(0, 0, 0, 0.10);
    background-color: rgba(233, 246, 220, 0.55);
}

.home-method-card-error {
    border: 2px solid rgba(229, 62, 62, 0.35);
    background: rgba(229, 62, 62, 0.06);
}

.home-method-title {
    font-weight: 600;
    font-size: 16px;
    line-height: 140%;
    color: #000000;
    margin-bottom: 8px;
}

.home-cta-row {
    padding: 0 56px;
    margin-top: 18px;
}

.home-cta-row .content-paragraph {
    margin-bottom: 0;
}

.home-audience-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0 24px;
}

.home-audience-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    box-shadow: none;
}

.home-audience-icon {
    width: 40px;
    height: 40px;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.home-audience-icon img {
    width: 40px;
    height: 40px;
    display: block;
}

.home-audience-title {
    font-weight: 600;
    font-size: 16px;
    line-height: 140%;
    margin-bottom: 6px;
}

.home-audience-grid .step-description {
    font-size: 13px;
    line-height: 155%;
}

.home-text-list .content-paragraph:last-child {
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .home-case-card {
        width: 140px;
        height: auto;
        border-radius: 18px;
    }

    .home-case-card-1 { left: 24px; top: 120px; }
    .home-case-card-2 { right: 24px; top: 132px; }
    .home-case-card-3 { left: 180px; bottom: -56px; }
    .home-case-card-4 { right: 180px; bottom: -64px; }

    .home-hero-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .home-hero-art {
        width: 100%;
        max-width: none;
    }
}

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

    .home-audience-grid {
        grid-template-columns: 1fr;
    }

    .home-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .home-hero {
        padding: 44px 16px;
        margin-bottom: 40px;
        margin-top: -32px;
        min-height: auto;
    }

    .home-hero-title {
        font-size: 36px;
    }

    .home-hero-art {
        display: none;
    }
}

/* Final mobile overrides to prevent overflow on algorithm pages */
@media (max-width: 768px) {
    .use-cases-grid,
    .related-tasks-grid {
        grid-template-columns: 1fr;
        padding: 0 16px;
    }
}
