/* ============================================================
   VARIABLES
============================================================ */

:root {
    --bg: #06070a;

    --surface: rgba(16, 18, 23, 0.85);
    --surface-soft: rgba(255, 255, 255, 0.028);
    --surface-hover: rgba(255, 255, 255, 0.05);

    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.15);

    --text: #f5f7fa;
    --text-soft: #aeb5c0;
    --text-muted: #727b87;

    --accent: #c58cff;
    --accent-soft: rgba(197, 140, 255, 0.11);
    --accent-border: rgba(197, 140, 255, 0.3);

    --fts: #62cfa1;
    --fts-soft: rgba(98, 207, 161, 0.1);

    --fuzzy: #c58cff;
    --fuzzy-soft: rgba(197, 140, 255, 0.11);

    --blue: #71aaff;

    --warning: #efc66f;
    --danger: #ff7c8a;

    --mark-bg: rgba(197, 140, 255, 0.2);
    --mark-text: #fff8ff;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --shadow:
        0 24px 90px rgba(0, 0, 0, 0.36);

    --max-width: 1380px;
}



/* ============================================================
   RESET
============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;

    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% -15%,
            rgba(197, 140, 255, 0.11),
            transparent 38%
        ),
        var(--bg);

    color: var(--text);

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.6;

    overflow-x: hidden;
}


button,
input {
    font: inherit;
}


button {
    color: inherit;
}


a {
    color: inherit;

    text-decoration: none;
}


code,
pre {
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;
}


.hidden {
    display: none !important;
}



/* ============================================================
   BACKGROUND
============================================================ */

.background-grid {
    position: fixed;

    inset: 0;

    z-index: -5;

    pointer-events: none;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.024) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.024) 1px,
            transparent 1px
        );

    background-size: 48px 48px;

    mask-image:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.8),
            transparent 75%
        );
}


.background-glow {
    position: fixed;

    width: 520px;
    height: 520px;

    border-radius: 50%;

    filter: blur(135px);

    opacity: 0.08;

    pointer-events: none;

    z-index: -4;
}


.glow-left {
    top: 120px;
    left: -280px;

    background: var(--fuzzy);
}


.glow-right {
    top: 430px;
    right: -280px;

    background: var(--fts);
}



/* ============================================================
   APP
============================================================ */

.app-shell {
    width:
        min(
            calc(100% - 40px),
            var(--max-width)
        );

    margin: 0 auto;
}



/* ============================================================
   HEADER
============================================================ */

.site-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    min-height: 84px;

    border-bottom:
        1px
        solid
        var(--border);
}


.brand {
    display: flex;

    align-items: center;

    gap: 12px;
}


.brand-mark {
    display: grid;

    place-items: center;

    width: 42px;
    height: 42px;

    border:
        1px
        solid
        var(--accent-border);

    border-radius: 12px;

    background: var(--accent-soft);

    color: #ead7ff;

    font-size: 12px;
    font-weight: 850;

    letter-spacing: 0.08em;
}


.brand-copy {
    display: flex;

    flex-direction: column;
}


.brand-copy strong {
    font-size: 14px;
}


.brand-copy span {
    color: var(--text-muted);

    font-size: 11px;
}


.header-meta {
    display: flex;

    gap: 8px;
}


.version-chip,
.engine-chip {
    display: inline-flex;

    align-items: center;

    min-height: 30px;

    padding:
        0
        11px;

    border:
        1px
        solid
        var(--border);

    border-radius: 999px;

    background: var(--surface-soft);

    color: var(--text-soft);

    font-size: 10px;
    font-weight: 750;
}


.version-chip {
    border-color: var(--accent-border);

    background: var(--accent-soft);

    color: #ead7ff;
}



/* ============================================================
   HERO
============================================================ */

.hero {
    padding:
        92px
        0
        62px;

    text-align: center;
}


.hero-badge {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 22px;

    padding:
        7px
        12px;

    border:
        1px
        solid
        var(--border);

    border-radius: 999px;

    background: var(--surface-soft);

    color: var(--text-soft);

    font-size: 11px;
}


.hero-badge > span {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--fuzzy);

    box-shadow:
        0 0 18px rgba(197, 140, 255, 0.8);
}


.hero h1 {
    max-width: 950px;

    margin:
        0
        auto
        20px;

    font-size:
        clamp(
            42px,
            7vw,
            82px
        );

    line-height: 0.98;

    letter-spacing: -0.055em;
}


.hero h1 span {
    display: block;

    color: var(--text-muted);
}


.hero > p {
    max-width: 760px;

    margin:
        0
        auto
        38px;

    color: var(--text-soft);

    font-size: 15px;
}



/* ============================================================
   SEARCH PANEL
============================================================ */

.search-panel {
    max-width: 930px;

    margin: 0 auto;

    padding: 12px;

    border:
        1px
        solid
        var(--border);

    border-radius: 22px;

    background: rgba(11, 13, 17, 0.85);

    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.34);

    backdrop-filter: blur(18px);
}


.search-form {
    display: flex;

    gap: 10px;
}


.search-input-wrapper {
    position: relative;

    flex: 1;
}


.search-icon {
    position: absolute;

    top: 50%;
    left: 18px;

    transform: translateY(-50%);

    color: var(--text-muted);

    font-size: 21px;
}


.search-input-wrapper input {
    width: 100%;
    height: 58px;

    padding:
        0
        52px
        0
        50px;

    border:
        1px
        solid
        var(--border);

    border-radius: 14px;

    outline: none;

    background: rgba(255, 255, 255, 0.035);

    color: var(--text);

    transition:
        border-color 150ms ease,
        box-shadow 150ms ease,
        background 150ms ease;
}


.search-input-wrapper input::placeholder {
    color: #626a76;
}


.search-input-wrapper input:focus {
    border-color: var(--accent-border);

    background: rgba(255, 255, 255, 0.05);

    box-shadow:
        0 0 0 4px
        rgba(197, 140, 255, 0.08);
}


.clear-button {
    position: absolute;

    top: 50%;
    right: 12px;

    width: 34px;
    height: 34px;

    transform: translateY(-50%);

    border: 0;

    border-radius: 8px;

    background: transparent;

    color: var(--text-muted);

    font-size: 20px;

    cursor: pointer;
}


.clear-button:hover {
    background: var(--surface-hover);

    color: var(--text);
}


.primary-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 18px;

    min-width: 135px;
    height: 58px;

    padding:
        0
        20px;

    border: 0;

    border-radius: 14px;

    background: var(--text);

    color: #08080b;

    font-weight: 760;

    cursor: pointer;

    transition:
        transform 140ms ease,
        opacity 140ms ease;
}


.primary-button:hover {
    transform: translateY(-1px);
}


.primary-button:disabled {
    opacity: 0.55;

    cursor: not-allowed;
}


.search-examples {
    display: flex;

    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    padding:
        12px
        4px
        2px;
}


.example-label {
    color: var(--text-muted);

    font-size: 9px;
    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: 0.09em;
}


.query-example {
    padding:
        5px
        9px;

    border:
        1px
        solid
        transparent;

    border-radius: 7px;

    background: transparent;

    color: var(--text-muted);

    font-size: 10px;

    cursor: pointer;
}


.query-example:hover {
    border-color: var(--border);

    background: var(--surface-soft);

    color: var(--text-soft);
}



/* ============================================================
   INITIAL STATE
============================================================ */

.initial-state {
    padding:
        64px
        0
        100px;

    text-align: center;
}


.initial-symbol {
    display: grid;

    place-items: center;

    width: 62px;
    height: 62px;

    margin:
        0
        auto
        18px;

    border:
        1px
        solid
        var(--accent-border);

    border-radius: 17px;

    background: var(--accent-soft);

    color: #ead7ff;

    font-size: 28px;
    font-weight: 800;
}


.initial-state h2 {
    margin:
        0
        0
        8px;

    font-size: 22px;
}


.initial-state > p {
    max-width: 620px;

    margin:
        0
        auto
        36px;

    color: var(--text-muted);

    font-size: 13px;
}


.concept-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 10px;

    max-width: 920px;

    margin: 0 auto;

    text-align: left;
}


.concept-grid article {
    min-height: 170px;

    padding: 21px;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-md);

    background: var(--surface-soft);
}


.concept-grid article > span {
    color: var(--accent);

    font-size: 10px;
    font-weight: 850;
}


.concept-grid h3 {
    margin:
        24px
        0
        7px;

    font-size: 15px;
}


.concept-grid p {
    margin: 0;

    color: var(--text-muted);

    font-size: 12px;
}



/* ============================================================
   LOADING
============================================================ */

.loading-state {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 15px;

    min-height: 230px;

    margin-bottom: 50px;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-lg);

    background: var(--surface-soft);
}


.loading-state > div:last-child {
    display: flex;

    flex-direction: column;
}


.loading-state strong {
    font-size: 13px;
}


.loading-state span {
    color: var(--text-muted);

    font-size: 11px;
}


.spinner {
    width: 30px;
    height: 30px;

    border:
        2px
        solid
        rgba(255, 255, 255, 0.1);

    border-top-color: var(--accent);

    border-radius: 50%;

    animation:
        spin
        0.8s
        linear
        infinite;
}


@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}



/* ============================================================
   ERROR
============================================================ */

.error-state {
    display: flex;

    gap: 13px;

    margin-bottom: 40px;

    padding: 20px;

    border:
        1px
        solid
        rgba(255, 124, 138, 0.26);

    border-radius: var(--radius-md);

    background:
        rgba(255, 124, 138, 0.07);
}


.error-icon {
    display: grid;

    place-items: center;

    flex:
        0
        0
        auto;

    width: 34px;
    height: 34px;

    border-radius: 10px;

    background:
        rgba(255, 124, 138, 0.14);

    color: var(--danger);

    font-weight: 850;
}


.error-state h2 {
    margin:
        0
        0
        3px;

    font-size: 14px;
}


.error-state p {
    margin: 0;

    color: var(--text-soft);

    font-size: 12px;
}



/* ============================================================
   OUTPUT / SECTIONS
============================================================ */

.search-output {
    padding-bottom: 100px;
}


.section-card {
    margin-bottom: 22px;

    padding: 30px;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-lg);

    background:
        linear-gradient(
            160deg,
            rgba(255, 255, 255, 0.035),
            rgba(255, 255, 255, 0.015)
        );

    box-shadow: var(--shadow);
}


.section-heading {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 24px;

    margin-bottom: 26px;
}


.eyebrow {
    display: inline-block;

    margin-bottom: 5px;

    color: var(--accent);

    font-size: 9px;
    font-weight: 850;

    letter-spacing: 0.12em;
}


.section-heading h2 {
    margin: 0;

    font-size: 24px;

    letter-spacing: -0.03em;
}


.section-heading p {
    max-width: 670px;

    margin:
        7px
        0
        0;

    color: var(--text-muted);

    font-size: 12px;
}



/* ============================================================
   QUERY BOX
============================================================ */

.query-box {
    display: flex;

    flex-direction: column;

    align-items: flex-end;

    max-width: 420px;
}


.query-box span {
    color: var(--text-muted);

    font-size: 9px;

    text-transform: uppercase;

    letter-spacing: 0.09em;
}


.query-box strong {
    overflow: hidden;

    max-width: 100%;

    color: var(--text-soft);

    font-family: monospace;

    font-size: 11px;

    white-space: nowrap;

    text-overflow: ellipsis;
}



/* ============================================================
   METRICS
============================================================ */

.metrics-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 10px;
}


.metric-card {
    min-height: 145px;

    padding: 20px;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-md);

    background:
        rgba(0, 0, 0, 0.14);
}


.metric-card > span,
.card-label {
    display: block;

    color: var(--text-muted);

    font-size: 9px;
    font-weight: 850;

    text-transform: uppercase;

    letter-spacing: 0.09em;
}


.metric-card strong {
    display: block;

    margin:
        12px
        0
        4px;

    font-size: 27px;

    letter-spacing: -0.04em;
}


.metric-card small {
    color: var(--text-muted);

    font-size: 10px;
}



/* ============================================================
   STRATEGY
============================================================ */

.strategy-badge,
.plan-badge {
    display: inline-flex;

    align-items: center;

    min-height: 30px;

    padding:
        0
        11px;

    border:
        1px
        solid
        var(--border);

    border-radius: 999px;

    background: var(--surface-soft);

    color: var(--text-soft);

    font-size: 10px;
    font-weight: 750;

    white-space: nowrap;
}


.strategy-badge.fts {
    border-color:
        rgba(98, 207, 161, 0.3);

    background: var(--fts-soft);

    color: #cef4e3;
}


.strategy-badge.fuzzy {
    border-color: var(--accent-border);

    background: var(--accent-soft);

    color: #ead7ff;
}


.strategy-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 10px;
}


.strategy-card {
    min-height: 150px;

    padding: 20px;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-md);

    background:
        rgba(0, 0, 0, 0.13);
}


.strategy-card strong {
    display: block;

    margin-top: 12px;

    color: #ead7ff;

    font-family: monospace;

    font-size: 16px;

    overflow-wrap: anywhere;
}


.strategy-card p {
    margin:
        13px
        0
        0;

    color: var(--text-muted);

    font-size: 11px;
}



/* ============================================================
   FALLBACK FLOW
============================================================ */

.fallback-flow {
    display: flex;

    align-items: center;

    gap: 14px;

    margin-top: 12px;

    padding: 22px;

    overflow-x: auto;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-md);

    background:
        rgba(0, 0, 0, 0.12);
}


.fallback-step {
    display: flex;

    align-items: center;

    gap: 11px;

    min-width: 210px;

    padding: 16px;

    border:
        1px
        solid
        rgba(98, 207, 161, 0.2);

    border-radius: 13px;

    background: var(--fts-soft);
}


.step-number {
    display: grid;

    place-items: center;

    flex:
        0
        0
        auto;

    width: 28px;
    height: 28px;

    border-radius: 8px;

    background:
        rgba(98, 207, 161, 0.16);

    color: #cbf6e0;

    font-size: 9px;
    font-weight: 850;
}


.fallback-step > div {
    display: flex;

    flex-direction: column;
}


.fallback-step strong {
    font-size: 11px;
}


.fallback-step div span {
    color: var(--text-muted);

    font-size: 9px;
}


.flow-arrow {
    color: var(--text-muted);
}


.fallback-condition {
    display: grid;

    place-items: center;

    min-width: 90px;
    height: 68px;

    border:
        1px
        dashed
        var(--border-strong);

    border-radius: 50%;

    color: var(--text-soft);

    font-size: 9px;
    font-weight: 750;
}


.branch-wrapper {
    display: flex;

    flex-direction: column;

    gap: 10px;

    min-width: 220px;
}


.branch {
    display: grid;

    grid-template-columns:
        auto
        28px
        1fr;

    align-items: center;

    gap: 8px;
}


.branch-label {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 36px;
    height: 22px;

    border-radius: 999px;

    font-size: 7px;
    font-weight: 900;
}


.branch-label.success {
    background:
        rgba(98, 207, 161, 0.13);

    color: #c9f4df;
}


.branch-label.fallback {
    background: var(--fuzzy-soft);

    color: #ead7ff;
}


.branch-line {
    height: 1px;

    background: var(--border-strong);
}


.branch strong {
    font-size: 10px;
}



/* ============================================================
   TRIGRAM DEMO
============================================================ */

.trigram-demo {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto
        minmax(0, 1fr);

    align-items: center;

    gap: 20px;

    padding: 24px;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-md);

    background:
        rgba(0, 0, 0, 0.13);
}


.trigram-word {
    min-width: 0;
}


.trigram-word > span {
    color: var(--text-muted);

    font-size: 8px;

    text-transform: uppercase;

    letter-spacing: 0.1em;
}


.trigram-word > strong {
    display: block;

    margin:
        5px
        0
        15px;

    font-family: monospace;

    font-size: 20px;
}


.trigram-list {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;
}


.trigram-list code {
    padding:
        5px
        7px;

    border:
        1px
        solid
        var(--accent-border);

    border-radius: 7px;

    background: var(--accent-soft);

    color: #e8d6ff;

    font-size: 9px;
}


.similarity-symbol {
    color: var(--accent);

    font-size: 34px;
    font-weight: 750;
}



/* ============================================================
   FUZZY FIELD CARDS
============================================================ */

.fuzzy-fields-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 10px;

    margin-top: 12px;
}


.fuzzy-fields-grid article {
    min-height: 190px;

    padding: 20px;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-md);

    background:
        rgba(0, 0, 0, 0.12);
}


.field-weight {
    color: var(--accent);

    font-size: 8px;
    font-weight: 850;

    letter-spacing: 0.1em;
}


.fuzzy-fields-grid h3 {
    margin:
        19px
        0
        9px;

    font-size: 14px;
}


.fuzzy-fields-grid code {
    display: inline-block;

    padding:
        5px
        7px;

    border:
        1px
        solid
        var(--border);

    border-radius: 7px;

    background: var(--surface-soft);

    color: #ded2eb;

    font-size: 8px;
}


.fuzzy-fields-grid p {
    margin:
        14px
        0
        0;

    color: var(--text-muted);

    font-size: 10px;
}


.fuzzy-fields-grid p strong {
    color: var(--text-soft);
}



/* ============================================================
   EXECUTION REPORT
============================================================ */

.execution-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 10px;
}


.execution-card {
    min-height: 160px;

    padding: 20px;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-md);

    background:
        rgba(0, 0, 0, 0.13);
}


.operation-card {
    grid-column: span 2;
}


.operation-heading {
    display: flex;

    align-items: center;

    gap: 13px;
}


.db-icon {
    display: grid;

    place-items: center;

    width: 42px;
    height: 42px;

    border:
        1px
        solid
        var(--accent-border);

    border-radius: 12px;

    background: var(--accent-soft);

    color: #ead7ff;

    font-size: 10px;
    font-weight: 850;
}


.execution-card h3 {
    margin:
        3px
        0
        0;

    font-size: 16px;
}


.execution-card > strong {
    display: block;

    margin-top: 12px;

    font-size: 24px;

    letter-spacing: -0.04em;
}


.execution-card p {
    margin:
        15px
        0
        0;

    color: var(--text-muted);

    font-size: 11px;
}



/* ============================================================
   PIPELINE
============================================================ */

.pipeline-panel {
    margin-top: 12px;

    padding: 22px;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-md);

    background:
        rgba(0, 0, 0, 0.12);
}


.subheading {
    margin-bottom: 18px;
}


.subheading h3 {
    margin: 0;

    font-size: 16px;
}


.execution-pipeline {
    display: flex;

    align-items: stretch;

    gap: 9px;

    overflow-x: auto;

    padding-bottom: 5px;
}


.pipeline-step {
    display: flex;

    align-items: center;

    gap: 10px;

    min-width: 180px;

    padding: 14px;

    border:
        1px
        solid
        var(--border);

    border-radius: 12px;

    background: var(--surface-soft);
}


.pipeline-number {
    display: grid;

    place-items: center;

    flex:
        0
        0
        auto;

    width: 27px;
    height: 27px;

    border-radius: 8px;

    background: var(--accent-soft);

    color: #ead7ff;

    font-size: 9px;
    font-weight: 850;
}


.pipeline-step > div {
    display: flex;

    flex-direction: column;
}


.pipeline-step strong {
    font-size: 11px;
}


.pipeline-step div span {
    color: var(--text-muted);

    font-size: 9px;
}


.pipeline-arrow {
    align-self: center;

    color: var(--text-muted);
}



/* ============================================================
   RAW PANELS
============================================================ */

.raw-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 10px;

    margin-top: 12px;
}


.technical-panel,
.deep-dive {
    overflow: hidden;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-md);

    background:
        rgba(0, 0, 0, 0.14);
}


.technical-panel summary,
.deep-dive summary {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding:
        17px
        18px;

    list-style: none;

    cursor: pointer;

    color: var(--text-soft);

    font-size: 11px;
    font-weight: 750;
}


.technical-panel summary::-webkit-details-marker,
.deep-dive summary::-webkit-details-marker {
    display: none;
}


.details-icon {
    color: var(--text-muted);

    font-size: 17px;

    transition:
        transform
        150ms
        ease;
}


details[open] .details-icon {
    transform: rotate(45deg);
}


.technical-content {
    position: relative;

    border-top:
        1px
        solid
        var(--border);
}


.technical-content pre {
    max-height: 450px;

    margin: 0;

    padding: 22px;

    overflow: auto;

    background: #08090c;

    color: #bdc5cf;

    font-size: 10px;

    line-height: 1.75;

    white-space: pre-wrap;
}


.copy-button {
    position: absolute;

    top: 10px;
    right: 10px;

    z-index: 2;

    padding:
        6px
        10px;

    border:
        1px
        solid
        var(--border);

    border-radius: 8px;

    background: #13151a;

    color: var(--text-soft);

    font-size: 9px;

    cursor: pointer;
}



/* ============================================================
   COMPARISON TABLE
============================================================ */

.comparison-table-wrapper {
    overflow-x: auto;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-md);
}


.comparison-table {
    width: 100%;

    min-width: 950px;

    border-collapse: collapse;

    background:
        rgba(0, 0, 0, 0.12);
}


.comparison-table th,
.comparison-table td {
    padding:
        15px
        17px;

    border-bottom:
        1px
        solid
        var(--border);

    text-align: left;
}


.comparison-table th {
    color: var(--text-muted);

    font-size: 8px;
    font-weight: 850;

    text-transform: uppercase;

    letter-spacing: 0.09em;
}


.comparison-table td {
    color: var(--text-soft);

    font-size: 10px;
}


.comparison-table tbody tr:last-child td {
    border-bottom: 0;
}


.active-comparison-row {
    background:
        rgba(197, 140, 255, 0.045);
}


.version-pill {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 35px;
    height: 26px;

    border:
        1px
        solid
        var(--border);

    border-radius: 8px;

    font-size: 9px;
    font-weight: 850;
}


.version-pill.active {
    border-color: var(--accent-border);

    background: var(--accent-soft);

    color: #ead7ff;
}



/* ============================================================
   RESULTS
============================================================ */

.visible-count {
    display: flex;

    align-items: baseline;

    gap: 5px;

    padding:
        8px
        12px;

    border:
        1px
        solid
        var(--border);

    border-radius: 10px;

    background: var(--surface-soft);
}


.visible-count strong {
    font-size: 13px;
}


.visible-count span {
    color: var(--text-muted);

    font-size: 9px;
}


.results-list {
    display: flex;

    flex-direction: column;

    gap: 10px;
}


.result-card {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    gap: 22px;

    padding: 22px;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-md);

    background:
        rgba(0, 0, 0, 0.12);

    transition:
        transform 140ms ease,
        border-color 140ms ease,
        background 140ms ease;
}


.result-card:hover {
    transform: translateY(-1px);

    border-color: var(--border-strong);

    background: var(--surface-soft);
}


.result-main {
    min-width: 0;
}


.result-topline {
    display: flex;

    align-items: center;
    flex-wrap: wrap;

    gap: 7px;

    margin-bottom: 9px;
}


.result-brand,
.result-category,
.result-tag {
    display: inline-flex;

    align-items: center;

    min-height: 22px;

    padding:
        0
        8px;

    border:
        1px
        solid
        var(--border);

    border-radius: 999px;

    color: var(--text-muted);

    font-size: 8px;
}


.result-card h3 {
    margin:
        0
        0
        8px;

    font-size: 17px;

    letter-spacing: -0.02em;
}


.result-headline,
.result-description {
    max-width: 870px;

    margin: 0;

    color: var(--text-soft);

    font-size: 11px;

    line-height: 1.75;
}


.result-headline mark,
.result-description mark {
    padding:
        1px
        3px;

    border-radius: 4px;

    background: var(--mark-bg);

    color: var(--mark-text);
}


.result-meta {
    display: flex;

    flex-wrap: wrap;

    gap: 12px;

    margin-top: 14px;

    color: var(--text-muted);

    font-size: 9px;
}


.result-side {
    display: flex;

    flex-direction: column;

    align-items: flex-end;

    gap: 12px;

    min-width: 130px;
}


.result-price {
    font-size: 18px;
    font-weight: 760;

    letter-spacing: -0.03em;
}


.rank-box,
.fuzzy-score-box {
    min-width: 105px;

    padding:
        10px
        12px;

    border:
        1px
        solid
        var(--accent-border);

    border-radius: 10px;

    background: var(--accent-soft);

    text-align: right;
}


.rank-box span,
.fuzzy-score-box span {
    display: block;

    color: var(--text-muted);

    font-size: 7px;

    text-transform: uppercase;

    letter-spacing: 0.08em;
}


.rank-box strong,
.fuzzy-score-box strong {
    color: #ead7ff;

    font-family: monospace;

    font-size: 11px;
}


.stock-status {
    color: var(--text-muted);

    font-size: 8px;
}


.see-more-wrapper {
    display: flex;

    justify-content: center;

    margin-top: 20px;
}


.secondary-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 11px;

    min-height: 44px;

    padding:
        0
        17px;

    border:
        1px
        solid
        var(--border);

    border-radius: 11px;

    background: var(--surface-soft);

    color: var(--text-soft);

    font-size: 10px;
    font-weight: 750;

    cursor: pointer;
}


.secondary-button:hover {
    border-color: var(--border-strong);

    background: var(--surface-hover);
}



/* ============================================================
   DOCS
============================================================ */

.docs-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 10px;
}


.docs-card {
    min-height: 220px;

    padding: 22px;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-md);

    background:
        rgba(0, 0, 0, 0.12);
}


.docs-card > span {
    color: var(--accent);

    font-size: 9px;
    font-weight: 850;
}


.docs-card h3 {
    margin:
        24px
        0
        8px;

    font-size: 15px;
}


.docs-card p {
    margin:
        0
        0
        17px;

    color: var(--text-muted);

    font-size: 11px;
}


.docs-card > code {
    display: inline-block;

    padding:
        6px
        8px;

    border:
        1px
        solid
        var(--border);

    border-radius: 7px;

    background: var(--surface-soft);

    color: #ead7ff;

    font-size: 9px;
}



/* ============================================================
   DEEP DIVE
============================================================ */

.deep-dive {
    margin-top: 10px;
}


.deep-dive-content {
    padding: 22px;

    border-top:
        1px
        solid
        var(--border);
}


.architecture-comparison {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 10px;
}


.architecture-comparison article {
    min-height: 190px;

    padding: 20px;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-md);

    background: var(--surface-soft);
}


.architecture-comparison article:first-child {
    border-color:
        rgba(98, 207, 161, 0.18);
}


.architecture-comparison article:last-child {
    border-color: var(--accent-border);
}


.architecture-comparison span {
    color: var(--text-muted);

    font-size: 8px;
    font-weight: 850;

    letter-spacing: 0.1em;
}


.architecture-comparison h3 {
    margin:
        21px
        0
        8px;

    font-size: 15px;
}


.architecture-comparison p {
    margin: 0;

    color: var(--text-muted);

    font-size: 11px;
}


.architecture-message {
    margin-top: 10px;

    padding: 20px;

    border:
        1px
        solid
        var(--border);

    border-radius: var(--radius-md);

    background:
        rgba(0, 0, 0, 0.12);
}


.architecture-message strong {
    font-size: 13px;
}


.architecture-message p {
    margin:
        7px
        0
        0;

    max-width: 760px;

    color: var(--text-muted);

    font-size: 11px;
}



/* ============================================================
   FOOTER
============================================================ */

.site-footer {
    display: flex;

    align-items: center;
    justify-content: space-between;

    min-height: 100px;

    border-top:
        1px
        solid
        var(--border);

    color: var(--text-muted);

    font-size: 9px;
}



/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 1100px) {

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


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


    .operation-card {
        grid-column: span 2;
    }


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

}



@media (max-width: 820px) {

    .app-shell {
        width:
            min(
                calc(100% - 24px),
                var(--max-width)
            );
    }


    .site-header {
        min-height: 72px;
    }


    .brand-copy span,
    .engine-chip {
        display: none;
    }


    .hero {
        padding:
            68px
            0
            44px;
    }


    .hero h1 {
        font-size:
            clamp(
                40px,
                13vw,
                64px
            );
    }


    .search-form {
        flex-direction: column;
    }


    .primary-button {
        width: 100%;
    }


    .concept-grid,
    .raw-grid,
    .docs-grid,
    .architecture-comparison {
        grid-template-columns: 1fr;
    }


    .section-card {
        padding: 21px;
    }


    .section-heading {
        flex-direction: column;
    }


    .query-box {
        align-items: flex-start;

        max-width: 100%;
    }


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


    .trigram-demo {
        grid-template-columns: 1fr;

        text-align: center;
    }


    .trigram-list {
        justify-content: center;
    }


    .similarity-symbol {
        transform: rotate(90deg);
    }


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


    .operation-card {
        grid-column: span 1;
    }


    .result-card {
        grid-template-columns: 1fr;
    }


    .result-side {
        flex-direction: row;

        align-items: center;
        justify-content: space-between;
    }

}



@media (max-width: 600px) {

    .metrics-grid,
    .fuzzy-fields-grid {
        grid-template-columns: 1fr;
    }


    .hero > p {
        font-size: 13px;
    }


    .search-examples {
        display: none;
    }


    .search-panel {
        padding: 8px;
    }


    .section-card {
        border-radius: 18px;
    }


    .fallback-flow {
        align-items: flex-start;
    }


    .site-footer {
        flex-direction: column;

        align-items: flex-start;
        justify-content: center;

        gap: 4px;
    }

}