:root {
    --cn-teal: #14817A;
    --cn-teal-mid: #1A7570;
    --cn-teal-dark: #0B5651;
    --cn-gold: #CEA661;
    --cn-gold-light: #DBB978;
    --cn-black: #0a0a0a;
    --cn-black-mid: #121212;
    --cn-black-soft: #1a1a1a;
    --cn-bg: #D4DFDB;
    --cn-surface: #C6D5D1;
    --cn-border: #9AADA8;
    --cn-text: #1A3330;
    --cn-text-body: #3D5A55;
    --cn-text-muted: #5A726D;
    --cn-node-family: #13817b;
    --cn-node-corporate: #CEA661;
    --cn-node-factory: #b45309;
}

.site-logo {
    height: 2.35rem;
    width: auto;
    display: block;
    flex-shrink: 0;
}
@media (min-width: 640px) {
    .site-logo { height: 2.65rem; }
}
@media (min-width: 768px) {
    .site-header .site-logo {
        height: 3.125rem;
    }
}
@media (min-width: 1024px) {
    .site-header .site-logo {
        height: 3.5rem;
    }
}
@media (min-width: 1280px) {
    .site-header .site-logo {
        height: 3.75rem;
    }
}
.site-logo--age-gate {
    height: 4.75rem;
}
@media (min-width: 640px) {
    .site-logo--age-gate {
        height: 5.5rem;
    }
}
.site-tagline {
    border-left: 1px solid rgba(206, 166, 97, 0.35);
    padding-left: 0.75rem;
    line-height: 1.25;
    max-width: 11rem;
    color: rgba(220, 220, 220, 0.78);
}

body { 
    font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--cn-bg);
    background-image:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(10, 10, 10, 0.06), transparent 55%),
        radial-gradient(ellipse 80% 50% at 80% 0%, rgba(206, 166, 97, 0.06), transparent 50%),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    background-attachment: fixed;
}

h1, h2, .font-display,
#drawer-title,
#drawer-title-mobile,
.site-header .font-semibold.text-2xl {
    font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header: deep black so transparent logo reads clearly */
.site-header {
    position: relative;
    background: linear-gradient(180deg, #1c1c1c 0%, #111111 52%, #0a0a0a 100%);
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.42);
    color: #f5f5f5;
}

.site-header .site-logo {
    filter:
        drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45))
        drop-shadow(0 0 12px rgba(206, 166, 97, 0.12));
}

/* Bigger logo on desktop without growing the header bar */
@media (min-width: 768px) {
    .site-header > div {
        padding-top: 0.625rem;
        padding-bottom: 0.625rem;
    }
}
@media (min-width: 1024px) {
    .site-header > div {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}
@media (min-width: 1280px) {
    .site-header > div {
        padding-top: 0.4375rem;
        padding-bottom: 0.4375rem;
    }
}

.site-header input[type="text"],
.site-header #search {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #ececec !important;
    border: 1px solid rgba(206, 166, 97, 0.28) !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35) !important;
}

.site-header input[type="text"]::placeholder,
.site-header #search::placeholder {
    color: rgba(180, 180, 180, 0.62) !important;
}

.site-header input[type="text"]:focus,
.site-header #search:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(206, 166, 97, 0.55) !important;
}

.site-header #search-clear {
    color: #CEA661 !important;
}

.site-header #search-clear:hover {
    color: #DBB978 !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.site-header .nav-link--active {
    color: #CEA661 !important;
}

.site-header a.nav-link:not(.nav-link--active),
.site-header button#search-mobile-open {
    color: rgba(220, 220, 220, 0.88) !important;
}

/* Gloss highlight just inside the top edge */
.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18) 30%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0.18) 70%, transparent);
    pointer-events: none;
}

.site-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #CEA661 20%, #DBB978 50%, #CEA661 80%, transparent 100%);
    opacity: 0.85;
}

/* Footer: deep black, mirrors site header; grows to fill page bottom */
.site-footer {
    position: relative;
    flex-grow: 1;
    width: 100%;
    padding-top: 3rem;
    background: linear-gradient(180deg, #1c1c1c 0%, #111111 52%, #0a0a0a 100%);
    box-shadow: 0 -4px 28px rgba(0, 0, 0, 0.42);
    color: rgba(220, 220, 220, 0.78);
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #CEA661 20%, #DBB978 50%, #CEA661 80%, transparent 100%);
    opacity: 0.85;
    pointer-events: none;
}

.site-footer a {
    color: rgba(220, 220, 220, 0.88);
    transition: color 0.15s ease;
}

.site-footer a:hover {
    color: #CEA661;
}

.nav-link--active {
    background-color: rgba(255, 255, 255, 0.12);
}
.nav-link:not(.nav-link--active):hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.site-brand {
    color: inherit;
    text-decoration: none;
}
.site-brand:hover .site-logo,
.site-brand:focus-visible .site-logo {
    opacity: 0.92;
}
.site-brand:focus-visible {
    outline: 2px solid #CEA661;
    outline-offset: 2px;
}

.node {
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
    transform-box: fill-box;
    transform-origin: center;
}

.link { 
    stroke: #7A9A94; 
    stroke-width: 1.6px;
    stroke-opacity: 0.45; 
    transition: stroke 0.2s ease, stroke-opacity 0.2s ease, stroke-width 0.2s ease;
}

/* Ownership links: thicker, solid, dark */
.link[data-type="owned by"],
.link[data-type="subsidiary of"],
.link[data-type="owns"] {
    stroke-width: 2.2px;
    stroke-opacity: 0.6;
}

/* Contract/manufacturing: dashed, medium */
.link[data-type*="manufactur"],
.link[data-type*="contract"],
.link[data-type*="produced"] {
    stroke-dasharray: 5 3;
    stroke-width: 1.4px;
    stroke-opacity: 0.5;
}

/* Partnership/blending: dotted, lighter */
.link[data-type*="partner"],
.link[data-type*="blended"],
.link[data-category="partnership"] {
    stroke-dasharray: 2 4;
    stroke-width: 1.4px;
    stroke-opacity: 0.45;
}

/* Category-aligned link strokes (matches legend swatches) */
.link[data-category="ownership"] {
    stroke-width: 2.2px;
    stroke-opacity: 0.6;
}
.link[data-category="production"] {
    stroke-dasharray: 5 3;
    stroke-width: 1.4px;
    stroke-opacity: 0.5;
}

/* Link trace pulse: flows from clicked node toward connected node (rollback: delete this block) */
@media (prefers-reduced-motion: no-preference) {
    .link.link-trace {
        transition: none;
        stroke-linecap: round;
        stroke-opacity: 1;
        animation: link-trace-flow var(--link-trace-duration, 680ms) ease-out forwards;
        filter: drop-shadow(0 0 4px rgba(206, 166, 97, 0.55));
    }
    .link.link-trace--reverse {
        animation-name: link-trace-flow-reverse;
    }
    .link.link-trace--ownership { stroke: #CEA661; }
    .link.link-trace--production { stroke: #DBB978; }
    .link.link-trace--partnership { stroke: #E8D4A8; }
    .link.link-trace--other { stroke: #9EC4BC; }

    @keyframes link-trace-flow {
        0% {
            stroke-dasharray: 7 93;
            stroke-dashoffset: 100;
        }
        100% {
            stroke-dasharray: 7 93;
            stroke-dashoffset: 0;
        }
    }
    @keyframes link-trace-flow-reverse {
        0% {
            stroke-dasharray: 7 93;
            stroke-dashoffset: -100;
        }
        100% {
            stroke-dasharray: 7 93;
            stroke-dashoffset: 0;
        }
    }
}

.drawer-profile-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

.drawer-profile-link,
.drawer-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.2;
    font-weight: 500;
    border-radius: 1rem;
    white-space: nowrap;
    box-sizing: border-box;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.drawer-profile-link {
    border: 1px solid rgba(206, 166, 97, 0.5);
    color: #CEA661;
    text-decoration: none;
}
.drawer-profile-link:hover {
    background: rgba(206, 166, 97, 0.1);
    border-color: #CEA661;
}
.drawer-profile-link:active {
    transform: scale(0.985);
}

.drawer-share-btn {
    border: 1px solid #CFE0DC;
    color: #14817A;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
}
.drawer-share-btn:hover {
    background: rgba(20, 129, 122, 0.08);
    border-color: rgba(20, 129, 122, 0.45);
}
.drawer-share-btn:active {
    transform: scale(0.985);
}

.drawer-share-btn__icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    display: block;
}

.drawer-share-btn__label {
    line-height: 1;
}

.drawer-share-btn--copied {
    border-color: #14817A !important;
    background: rgba(20, 129, 122, 0.1) !important;
    color: #0D5A55 !important;
}

/* Quiet tertiary action: sits with Share / Profile without competing */
.drawer-report-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.35rem 0.55rem;
    min-height: 2rem;
    font-size: 0.75rem;
    line-height: 1.2;
    font-weight: 400;
    color: #6B8A84;
    text-decoration: none;
    border-radius: 1rem;
    white-space: nowrap;
    box-sizing: border-box;
    transition: color 0.15s ease, background-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.drawer-report-link:hover {
    color: #14817A;
    background: rgba(20, 129, 122, 0.06);
}
.drawer-report-link:active {
    color: #0D5A55;
    background: rgba(20, 129, 122, 0.1);
}
.drawer-report-link:focus-visible {
    outline: 2px solid rgba(20, 129, 122, 0.45);
    outline-offset: 2px;
}
.drawer-report-link__icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    opacity: 0.85;
}
.drawer-report-link__label {
    line-height: 1;
}

/* On narrow drawers, keep report on its own row so primary CTAs stay crisp */
@media (max-width: 380px) {
    .drawer-report-link {
        flex-basis: 100%;
        justify-content: flex-start;
        padding-left: 0.15rem;
        margin-top: 0.1rem;
    }
}

.drawer { transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1); }

.filter-chip {
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.filter-chip.filter-active {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    color: #E8E0D0;
    border-color: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(206, 166, 97, 0.15);
}
.filter-chip.filter-active::before {
    content: '✓';
    font-size: 10px;
    margin-right: 4px;
    opacity: 0.85;
}

@media (max-width: 480px) {
    .filter-chip.filter-active::before {
        display: none;
    }
}

.filter-chip.filter-active .chip-count {
    background-color: rgba(206, 166, 97, 0.22);
    color: #DBB978;
}
.filter-chip:hover:not(.filter-active) {
    border-color: #7A9490;
    background-color: #D6E2DF;
}

/* Filter chip idle tints (legend-aligned) */
.filter-chip[data-key="family"]:not(.filter-active) {
    background-color: #F0F7F6;
    border-color: #A8D4CF;
}
.filter-chip[data-key="corporate"]:not(.filter-active) {
    background-color: #FDF8EE;
    border-color: #E8D4A8;
}
.filter-chip[data-key="nicaragua"]:not(.filter-active) {
    background-color: #f0f6f0;
    border-color: #9cc49c;
}
.filter-chip[data-key="dominican"]:not(.filter-active) {
    background-color: #f0f4fa;
    border-color: #a8c4e8;
}
.filter-chip[data-key="honduras"]:not(.filter-active) {
    background-color: #faf6f0;
    border-color: #e8c99c;
}
.filter-chip[data-key="boutique"]:not(.filter-active) {
    background-color: #f0f3fa;
    border-color: #a8b8e8;
}
.filter-chip[data-key="factory"]:not(.filter-active) {
    background-color: #faf5f0;
    border-color: #e8c4a0;
}

/* Attractive connection cards (used in drawer + generated node pages) */
.connection-item {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.connection-item:hover {
  border-color: #CEA661;
  box-shadow: 0 1px 3px rgba(206, 166, 97, 0.12);
}

/* Mobile refinements */
@media (max-width: 1023px) {
    #drawer {
        z-index: 50;
        max-height: 75vh;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        box-shadow: 0 -10px 30px -10px rgba(20, 129, 122, 0.25);
    }
    
    .filter-chip {
        font-size: 13px;
        padding-left: 14px;
        padding-right: 14px;
        padding-top: 6px;
        padding-bottom: 6px;
    }
}

/* Filter result feedback */
.filter-status {
    margin-top: 0.5rem;
    padding: 0 0.125rem;
    font-size: 11px;
    font-weight: 500;
    color: #6B8A84;
    line-height: 1.4;
}
.filter-status__clear {
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-weight: 600;
    color: #14817A;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.filter-status__clear:hover {
    color: #0D5A55;
}

/* Map watermark: faint transparent logo behind nodes (rollback: delete .graph-watermark block) */
.graph-watermark {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
}
.graph-watermark img {
    width: min(72%, 540px);
    max-height: 78%;
    height: auto;
    object-fit: contain;
    opacity: var(--map-watermark-opacity, 0.06);
    filter: saturate(0.9);
    user-select: none;
    -webkit-user-drag: none;
}

/* Graph canvas layer: keep SVG behind floating controls/legend */
#graph {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
}

/* Graph view controls */
.graph-controls {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 12;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 58%;
    pointer-events: auto;
}
.graph-control-btn {
    padding: 0.5rem 0.875rem;
    border-radius: 1rem;
    border: 1px solid rgba(168, 189, 184, 0.75);
    background-color: rgba(214, 226, 223, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 1px 3px rgba(10, 10, 10, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 600;
    color: #14817A;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}
.graph-control-btn:hover {
    background-color: rgba(255, 255, 255, 0.95);
}
.graph-control-btn:active {
    transform: scale(0.985);
}
.graph-control-btn--accent {
    background: #CEA661;
    border-color: #b38c4f;
    color: #14817A;
}
.graph-control-btn--accent:hover {
    background: #DBB978;
}

/* Graph legend: shared */
.graph-legend {
    padding: 0.5rem 0.75rem;
    background: rgba(236, 244, 242, 0.97);
    border: 1px solid #CFE0DC;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(20, 129, 122, 0.12);
}

/* Mobile: in-flow strip above the map (reliable on real devices) */
.graph-legend--flow {
    display: block;
    margin-bottom: 0.5rem;
}

/* Desktop: overlaid on graph */
.graph-legend--overlay {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    left: auto;
    z-index: 12;
    pointer-events: auto;
    min-width: 0;
    max-width: calc(100% - 1.25rem);
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}
.graph-legend__expand-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.875rem;
    border-radius: 1rem;
    border: 1px solid rgba(168, 189, 184, 0.75);
    background-color: rgba(214, 226, 223, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 1px 3px rgba(10, 10, 10, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 600;
    color: #14817A;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.graph-legend__expand-toggle:hover,
.graph-legend__expand-toggle:focus-visible {
    background-color: rgba(255, 255, 255, 0.95);
    outline: none;
}
.graph-legend__expand-toggle:active {
    transform: scale(0.985);
}
.graph-legend--overlay .graph-legend__body {
    display: none;
}
.graph-legend--overlay.graph-legend--expanded {
    min-width: 9.5rem;
    padding: 0.625rem 1rem;
    background: rgba(236, 244, 242, 0.97);
    border: 1px solid #CFE0DC;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(20, 129, 122, 0.12);
}
.graph-legend--overlay.graph-legend--expanded .graph-legend__expand-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 0;
    margin-bottom: 0.25rem;
    border: none;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #6B8A84;
    border-radius: 0;
}
.graph-legend--overlay.graph-legend--expanded .graph-legend__expand-toggle:hover {
    color: #14817A;
    background: none;
}
.graph-legend--overlay.graph-legend--expanded .graph-legend__body {
    display: block;
}
.graph-legend__title,
.graph-legend__links-heading,
.graph-legend__links-toggle {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #6B8A84;
}
.graph-legend__title {
    margin-bottom: 0.25rem;
}
.graph-legend__nodes {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.3rem 0.75rem;
    font-size: 11px;
    line-height: 1.35;
    color: #14817A;
}
.graph-legend__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.graph-legend__dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 9999px;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(248, 245, 240, 0.9), 0 1px 3px rgba(0, 0, 0, 0.15);
}
.graph-legend__links {
    margin-top: 0.375rem;
    padding-top: 0.375rem;
    border-top: 1px solid rgba(207, 224, 220, 0.8);
}
.graph-legend__links-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.graph-legend__links-toggle:hover,
.graph-legend__links-toggle:focus-visible {
    color: #14817A;
    outline: none;
}
.graph-legend__chevron {
    font-size: 10px;
    line-height: 1;
    flex-shrink: 0;
}
.graph-legend__links-heading {
    margin-bottom: 0.25rem;
}

.graph-legend--flow .graph-legend__links-heading {
    display: none;
}
.graph-legend__links-rows {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.3rem;
    font-size: 11px;
    line-height: 1.35;
    color: #14817A;
}
.graph-legend__links-rows .graph-legend__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.legend-link-swatch {
    flex-shrink: 0;
    display: block;
}
@media (min-width: 640px) {
    .graph-legend--overlay.graph-legend--expanded {
        max-width: 15rem;
    }
    .graph-legend__nodes {
        grid-template-columns: 1fr 1fr;
        font-size: 12px;
    }
    .graph-legend__links-rows {
        font-size: 12px;
    }
}

/* Mobile flow legend: compact 3-column node row */
@media (max-width: 1023px) {
    .graph-legend--flow .graph-legend__nodes {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }
    .graph-legend--flow .graph-legend__links-panel {
        display: none;
    }
    .graph-legend--flow .graph-legend__links-panel.graph-legend__links-panel--open {
        display: block;
        margin-top: 0.35rem;
    }
}

@media (min-width: 1024px) {
    .graph-legend--flow {
        display: none;
    }
    .graph-legend--overlay {
        display: block;
    }
}

/* Very small screens: improve legend readability */
@media (max-width: 480px) {
    .graph-controls {
        top: 0.65rem;
        left: 0.65rem;
        max-width: 56%;
        gap: 0.35rem;
    }
    .graph-control-btn {
        padding: 0.4rem 0.7rem;
        font-size: 11px;
    }
    .graph-legend--flow {
        padding: 8px 10px;
    }
    .graph-legend--flow .graph-legend__nodes,
    .graph-legend--flow .graph-legend__links-rows {
        gap: 4px 8px;
        font-size: 10.5px;
    }
}

/* === Targeted Cleanup for Desktop/Mobile Issues === */
/* Hide duplicate stray drawers that are causing floating/misalignment */
.max-w-screen-xl > div.hidden.lg\\:block.lg\\:w-80:not(:first-of-type) {
    display: none !important;
}

/* Force proper desktop two-column when possible */
@media (min-width: 1024px) {
    .max-w-screen-xl > div.lg\\:flex {
        display: flex !important;
    }
}

/* On mobile, hide the desktop sidebar drawer */
@media (max-width: 1023px) {
    .max-w-screen-xl > div.hidden.lg\\:block {
        display: none !important;
    }
}

/* Premium graph container + dot grid */
#graph-container {
    position: relative;
    isolation: isolate;
    border: 1px solid var(--cn-border);
    background-color: #CCD8D4;
    background-image:
        radial-gradient(ellipse 90% 70% at 50% 50%, rgba(255, 255, 255, 0.22), transparent 70%),
        radial-gradient(circle, rgba(70, 90, 86, 0.22) 1px, transparent 1px),
        linear-gradient(145deg, #D4DFDB 0%, #C4D0CC 100%);
    background-size: 100% 100%, 22px 22px, 100% 100%;
    background-position: center, 0 0, center;
    box-shadow:
        inset 0 0 60px 10px rgba(10, 10, 10, 0.08),
        inset 0 2px 12px rgba(70, 90, 86, 0.14),
        inset 0 -2px 8px rgba(10, 10, 10, 0.06),
        0 20px 60px -15px rgba(10, 10, 10, 0.22);
}

/* Selected graph node: gold ring */
.node-group.node-selected .node {
    stroke: #CEA661 !important;
    stroke-width: 3.5px !important;
    filter: drop-shadow(0 0 6px rgba(206, 166, 97, 0.65)) brightness(1.06) saturate(1.08);
}
.node-group.node-selected .node-label {
    font-weight: 600;
    fill: #14817A;
}

/* Nicer node hover: circle is .node inside g.node-group */
.node-group:hover .node {
    filter: brightness(1.12) saturate(1.15) drop-shadow(0 0 5px rgba(206, 166, 97, 0.5));
    transform: scale(1.08);
}

/* Subtle gold accents */
.gold-accent {
    color: #CEA661;
}

/* Mobile fixes */
@media (max-width: 1023px) {
    #graph-container {
        min-height: 420px !important;
        height: 58vh !important;
    }
    
    /* Force the main graph to be visible and have height on mobile */
    #graph-container {
        display: block !important;
        visibility: visible !important;
    }

    #graph {
        display: block !important;
        visibility: visible !important;
    }

    .graph-legend--flow {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Make sure mobile drawer content is always visible when open */
    #drawer-mobile:not(.hidden) {
        display: flex !important;
        flex-direction: column;
    }
    
    #drawer-mobile .p-5.flex-1 {
        flex: 1 1 auto;
        overflow-y: auto;
        min-height: 150px;
        padding-bottom: 20px;
    }
}

/* Age Gate Styling */
#age-gate {
    background: rgba(10, 10, 10, 0.97) !important;
    animation: fadeIn 0.2s ease-out forwards;
}

#age-gate .site-logo--age-gate {
    filter: drop-shadow(0 2px 8px rgba(20, 129, 122, 0.12));
}

#age-yes {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%) !important;
    color: #CEA661 !important;
    border: 1px solid rgba(206, 166, 97, 0.35) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(206, 166, 97, 0.12);
}

#age-yes:hover {
    background: linear-gradient(135deg, #252525 0%, #141414 100%) !important;
    color: #DBB978 !important;
}

#age-gate #age-no {
    background: #fff !important;
    border: 1px solid #A8D4CF !important;
    color: #13817b !important;
    -webkit-text-fill-color: #13817b;
    box-shadow: 0 1px 3px rgba(20, 129, 122, 0.08);
    -webkit-tap-highlight-color: transparent;
}

#age-gate #age-no:focus,
#age-gate #age-no:focus-visible {
    background: #fff !important;
    border-color: #13817b !important;
    color: #13817b !important;
    -webkit-text-fill-color: #13817b;
    outline: 2px solid rgba(19, 129, 123, 0.35);
    outline-offset: 2px;
}

@media (hover: hover) {
    #age-gate #age-no:hover {
        background: #F0F7F6 !important;
        border-color: #13817b !important;
        color: #0B5651 !important;
        -webkit-text-fill-color: #0B5651;
    }
}

@media (hover: none) {
    #age-gate #age-no:active {
        background: #F0F7F6 !important;
        border-color: #13817b !important;
        color: #0B5651 !important;
        -webkit-text-fill-color: #0B5651;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#age-gate > div {
    animation: scaleIn 0.25s ease-out forwards;
}

/* Filter chips above graph - more prominent header + mobile polish */
#filter-chips {
    padding-bottom: 2px;
}
.filter-chip .chip-count {
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* Onboarding "Start Here" example pills (sidebar + mobile sheet) */
.example-pill {
    transition: all 0.12s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(20, 129, 122, 0.06);
}
.example-pill:active {
    transform: translateY(1px);
}
.example-pill:hover {
    border-color: #CEA661;
    background-color: #F8FBFA;
}

/* Mobile refinements for the prominent filters + larger example targets */
@media (max-width: 640px) {
    .filter-chip {
        font-size: 12.5px;
        padding-left: 12px;
        padding-right: 12px;
        padding-top: 7px;
        padding-bottom: 7px;
    }
    .filter-chip .chip-count {
        font-size: 10px;
    }
    #filter-chips {
        gap: 6px;
    }
    .example-pill {
        font-size: 14.5px;
        min-height: 58px;
    }
}

/* Desktop sidebar example buttons */
#drawer .example-pill {
    min-height: 52px;
}

/* The new "How to explore" trigger button (top-left of graph) */
.graph-control-btn--accent {
    font-size: 11px;
    padding-left: 10px;
    padding-right: 10px;
}

/* Desktop drag hint: one-time micro-tooltip (rollback: delete this block) */
.drag-hint {
    position: absolute;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    z-index: 14;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.5rem 0.45rem 0.75rem;
    border-radius: 9999px;
    border: 1px solid rgba(206, 166, 97, 0.45);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 18px -6px rgba(20, 129, 122, 0.28),
                inset 0 1px 0 rgba(255, 255, 255, 0.85);
    color: #14817A;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    pointer-events: auto;
    animation: dragHintIn 0.4s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}
.drag-hint.hidden {
    display: none !important;
}
.drag-hint__icon {
    flex-shrink: 0;
    color: #CEA661;
    opacity: 0.9;
}
.drag-hint__text {
    line-height: 1;
    white-space: nowrap;
}
.drag-hint__dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    margin-left: 0.1rem;
    border: none;
    border-radius: 9999px;
    background: transparent;
    color: #6B8A84;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.drag-hint__dismiss:hover {
    color: #14817A;
    background: rgba(20, 129, 122, 0.08);
}
@keyframes dragHintIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
@media (max-width: 1023px) {
    .drag-hint {
        display: none !important;
    }
}

/* Mobile welcome: floats over map bottom (no document-flow shift / CLS) */
.mobile-welcome--overlay {
    position: absolute;
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 20;
    pointer-events: none;
}
.mobile-welcome--overlay:not(.hidden) {
    pointer-events: auto;
    animation: welcomeOverlayIn 0.45s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}
.mobile-welcome__card {
    pointer-events: auto;
}
@keyframes welcomeOverlayIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Map + footer breathing room */
.map-section {
    margin-bottom: 3rem;
}

/* Desktop map + drawer breathing room */
@media (min-width: 1024px) {
    .map-section {
        gap: 2rem;
    }
}

/* Mobile map section spacing + graph control breathing room */
@media (max-width: 1023px) {
    .map-section {
        margin-top: 2px;
    }
    .graph-controls {
        top: 0.65rem;
        left: 0.65rem;
    }
    .graph-legend--overlay {
        top: 0.65rem;
        right: 0.65rem;
        left: auto;
    }
}

/* How-to sheet: floated card with gap from screen edge (not flush with map) */
.drawer-panel--mobile.drawer-panel--howto {
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    max-height: min(68vh, calc(100dvh - 7rem));
    border-radius: 1.5rem;
    box-shadow: 0 -10px 40px -8px rgba(20, 129, 122, 0.28),
                0 4px 24px rgba(20, 129, 122, 0.12);
}
.drawer-panel--mobile.drawer-panel--howto.drawer-open {
    animation: howtoSheetUp 0.42s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}
@keyframes howtoSheetUp {
    from {
        transform: translateY(calc(100% + 1rem));
        opacity: 0.5;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .graph-control-btn--accent {
        display: none; /* welcome card + node taps cover onboarding on small phones */
    }
}

@keyframes scaleIn {
    from { 
        transform: scale(0.95); 
        opacity: 0; 
    }
    to { 
        transform: scale(1); 
        opacity: 1; 
    }
}

/* ============================================
   DRAWER & "HOW TO EXPLORE" VISUAL POLISH
   Same warm cigar-lounge feel, just more attractive
   ============================================ */

/* Mobile bottom sheet drag handle */
#drawer-mobile > div:first-child > div {
    background: linear-gradient(90deg, transparent, #C4B896 20%, #CEA661 50%, #C4B896 80%, transparent);
    width: 44px;
    height: 4px;
    border-radius: 9999px;
    opacity: 0.7;
    transition: opacity 0.2s ease, width 0.2s ease;
}

#drawer-mobile > div:first-child:hover > div {
    opacity: 1;
    width: 56px;
}

/* Clip drawer children to rounded outline (header bg was breaking corner borders) */
#drawer,
#drawer-mobile {
    overflow: hidden;
}

/* Drawer header shelf: distinct from scrollable content */
#drawer > div.p-5.border-b,
#drawer-mobile > div.p-5.border-b {
    background: linear-gradient(to bottom, #F8FBFA 0%, #ECF4F2 100%);
    border-bottom-color: #D9CDB0;
}

#drawer > div.p-5.border-b {
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
}

/* Drawer content area - subtle depth */
#drawer .p-5.flex-1,
#drawer-mobile .p-5.flex-1 {
    background: linear-gradient(to bottom, #ECF4F2 0%, #E6EFEC 100%);
    overflow-x: hidden; /* prevent horizontal overflow from long text */
}

/* Affiliate disclosure footer */
.affiliate-tracking-pixel {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.node-affiliate-block {
    position: relative;
}

#drawer-affiliate,
#drawer-affiliate-mobile {
    background: linear-gradient(to bottom, rgba(232, 217, 195, 0.6), rgba(226, 208, 184, 0.8));
    border-top: 1px solid #D9CDB0;
    font-style: italic;
    letter-spacing: 0.2px;
    text-align: center;
}

/* Section headers inside drawer (Connections, Notable Cigars, Find These Cigars) */
#drawer .text-xs.font-semibold.text-\[\#6B8A84\],
#drawer-mobile .text-xs.font-semibold.text-\[\#6B8A84\] {
    color: #3D5A55;
    font-weight: 700;
    letter-spacing: 1.5px;
    position: relative;
    padding-left: 10px;
    margin-bottom: 6px;
}

#drawer .text-xs.font-semibold.text-\[\#6B8A84\]::before,
#drawer-mobile .text-xs.font-semibold.text-\[\#6B8A84\]::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    bottom: 2px;
    width: 3px;
    background: linear-gradient(#CEA661, #DBB978);
    border-radius: 2px;
}

/* ============================================
   CONNECTIONS SECTION - CLEAN COMPACT LAYOUT
   (Designed for narrow sidebar + mobile sheet)
   ============================================ */

#drawer-connections,
#drawer-connections-mobile {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.connection-item {
    transition: all 0.12s ease;
    box-shadow: 0 1px 2px rgba(20, 129, 122, 0.05);
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.connection-item:hover {
    background-color: #F8FBFA;
    border-color: #CEA661;
    box-shadow: 0 2px 6px rgba(20, 129, 122, 0.1);
}

.connection-item:active {
    transform: translateY(1px);
}

/* Relationship type - small, subtle pill that can wrap for long text */
.connection-type {
    font-size: 9.5px;
    line-height: 1.25;
    background-color: #ECF4F2;
    color: #6B8A84;
    border: 1px solid #CFE0DC;
    padding: 2px 6px;
    border-radius: 6px;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

/* Match graph link palette: ownership */
.connection-type[data-rel*="owned"],
.connection-type[data-rel*="subsidiary"] {
    background-color: #F0F7F6;
    color: #0F6A64;
    border-color: #A8D4CF;
}

/* Manufacturing / contract */
.connection-type[data-rel*="manufactur"],
.connection-type[data-rel*="contract"],
.connection-type[data-rel*="produced"] {
    background-color: #F5F0E8;
    color: #7a4a20;
    border-color: #E0D0B0;
}

/* Partnership / blending / founded */
.connection-type[data-rel*="partner"],
.connection-type[data-rel*="blended"],
.connection-type[data-rel*="founded"] {
    background-color: #F8FBFA;
    color: #8B7355;
    border-color: #CEA661;
}

/* The clickable name - full width on its own line, can wrap nicely */
.connection-name {
    font-size: 13px;
    line-height: 1.4;
    color: #1A3330;
    transition: color 0.1s ease;
    display: block;
    overflow-wrap: break-word;
    word-break: break-word;
}

.connection-name:hover {
    color: #14817A;
    text-decoration: underline;
    text-underline-offset: 1.5px;
}

/* Subtle arrow in the type row */
.connection-item .flex > span.text-\[\#CEA661\] {
    opacity: 0.65;
    flex-shrink: 0;
}

/* Type row should respect container width */
.connection-item > .flex {
    max-width: 100%;
}



/* Product line / Notable Cigars tags */
#drawer-product-lines span,
#drawer-product-lines-mobile span {
    transition: all 0.15s ease;
    border-color: #CEA661;
    box-shadow: 0 1px 2px rgba(20, 129, 122, 0.06);
}

#drawer-product-lines span:hover,
#drawer-product-lines-mobile span:hover {
    background-color: #ECF4F2;
    border-color: #14817A;
    color: #14817A;
}

/* Buy / "Find These Cigars" action buttons */
#drawer-buy a,
#drawer-buy-mobile a {
    transition: all 0.15s ease;
    box-shadow: 0 2px 4px rgba(20, 129, 122, 0.25);
    position: relative;
    overflow: hidden;
}

#drawer-buy a:hover,
#drawer-buy-mobile a:hover {
    background-color: #0D5A55;
    box-shadow: 0 3px 8px rgba(20, 129, 122, 0.35);
    transform: translateY(-1px);
}

#drawer-buy a:active,
#drawer-buy-mobile a:active {
    transform: translateY(0);
}

/* ============================================
   "HOW TO EXPLORE" INTRO ENHANCEMENTS
   ============================================ */

/* Richer example pills in the intro */
.example-pill {
    box-shadow: 0 2px 5px rgba(20, 129, 122, 0.1),
                0 0 0 1px rgba(206, 166, 97, 0.15) inset;
    border-color: #CFE0DC;
}

.example-pill:hover {
    box-shadow: 0 4px 12px rgba(20, 129, 122, 0.15),
                0 0 0 1px rgba(206, 166, 97, 0.35) inset;
    border-color: #CEA661;
    background: linear-gradient(to bottom, #F8FBFA 0%, #F2EBE0 100%);
}

.example-pill:active {
    box-shadow: 0 1px 3px rgba(20, 129, 122, 0.1);
    transform: translateY(1px);
}

/* Make the example names stand out a bit more in the intro */
.example-pill > *:first-child {
    font-weight: 600;
    letter-spacing: -0.1px;
}

/* The small tip text under the examples */
#drawer-connections > div.mt-3,
#drawer-connections-mobile > div.mt-3 {
    font-style: italic;
    opacity: 0.85;
}

/* Intro description text - slightly warmer and more readable */
#drawer-description,
#drawer-description-mobile {
    line-height: 1.55;
}

/* Subtle gold accent line under "START HERE" labels in intro */
#drawer .text-xs.font-semibold.text-\[\#6B8A84\],
#drawer-mobile .text-xs.font-semibold.text-\[\#6B8A84\] {
    padding-bottom: 2px;
}

/* ============================================
   DRAWER LOGO IMPROVEMENTS - Cohesive Layout
   ============================================ */

/* ============================================
   DRAWER LOGO - Mimic example.jpg layout
   ============================================ */

/* Logo container - clean white box like in the example */
#drawer-logo-container,
#drawer-logo-container-mobile {
    background: #fff;
    border: 1px solid #CFE0DC;
    box-shadow: 0 2px 6px rgba(20, 129, 122, 0.1);
    transition: all 0.2s ease;
}

#drawer-logo-container:hover,
#drawer-logo-container-mobile:hover {
    box-shadow: 0 4px 12px rgba(20, 129, 122, 0.15);
}

/* The actual logo image inside the box */
#drawer-logo,
#drawer-logo-mobile {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Desktop logo box */
#drawer-logo-container {
    min-height: 110px;
}

/* Mobile logo box */
#drawer-logo-container-mobile {
    min-height: 85px;
}

/* Person portraits in drawer: same card treatment, circular crop (any source size/aspect) */
#drawer-logo-container.drawer-image-container--person,
#drawer-logo-container-mobile.drawer-image-container--person {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    min-height: 0;
}

#drawer-logo-container.drawer-image-container--person #drawer-logo,
#drawer-logo-container-mobile.drawer-image-container--person #drawer-logo-mobile {
    flex-shrink: 0;
    aspect-ratio: 1;
    border-radius: 9999px;
    object-fit: cover;
    /* Upper-third bias works for headshots and wider full-body portraits */
    object-position: center 25%;
}

#drawer-logo-container.drawer-image-container--person #drawer-logo {
    width: 120px;
    height: 120px;
    max-width: 120px;
    max-height: 120px;
}

#drawer-logo-container-mobile.drawer-image-container--person #drawer-logo-mobile {
    width: 96px;
    height: 96px;
    max-width: 96px;
    max-height: 96px;
}

/* ============================================
   SPICE PACK: Meta pills, drawer motion, about card
   ============================================ */

.meta-pill {
    display: inline-block;
    padding: 2px 10px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.35;
    border-radius: 9999px;
    border: 1px solid;
    text-transform: capitalize;
}
.meta-pill--family {
    color: var(--cn-node-family);
    background: #F0F7F6;
    border-color: #A8D4CF;
}
.meta-pill--corporate {
    color: #8B6914;
    background: #FDF8EE;
    border-color: #E8D4A8;
}
.meta-pill--boutique {
    color: #1e3a8a;
    background: #eff6ff;
    border-color: #93c5fd;
}
.meta-pill--factory {
    color: #92400e;
    background: #fffbeb;
    border-color: #fcd34d;
}
.meta-pill--nicaragua {
    color: #166534;
    background: #f0fdf4;
    border-color: #86efac;
}
.meta-pill--dominican {
    color: #1e40af;
    background: #eff6ff;
    border-color: #93c5fd;
}
.meta-pill--honduras {
    color: #9a3412;
    background: #fff7ed;
    border-color: #fdba74;
}
.meta-pill--neutral,
.meta-pill--guide {
    color: #14817A;
    background: #ECF4F2;
    border-color: #CEA661;
}

/* Drawer open animations */
.drawer-panel {
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1),
                opacity 0.28s ease,
                box-shadow 0.28s ease;
}
.drawer-panel.drawer-open:not(.drawer-panel--mobile) {
    animation: drawerContentIn 0.35s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}
.drawer-panel--mobile {
    transform: translateY(100%);
    opacity: 0;
}
.drawer-panel--mobile.drawer-open {
    transform: translateY(0);
    opacity: 1;
    animation: drawerSheetUp 0.38s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}
@keyframes drawerContentIn {
    from {
        opacity: 0.92;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes drawerSheetUp {
    from {
        transform: translateY(100%);
        opacity: 0.6;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#drawer.drawer-open > .p-5:first-of-type,
#drawer-mobile.drawer-open > .p-5.border-b {
    animation: drawerHeaderIn 0.4s ease forwards;
}
@keyframes drawerHeaderIn {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

#drawer-connections .connection-item,
#drawer-connections-mobile .connection-item {
    animation: connectionStagger 0.35s ease backwards;
}
#drawer-connections .connection-item:nth-child(1),
#drawer-connections-mobile .connection-item:nth-child(1) { animation-delay: 0.04s; }
#drawer-connections .connection-item:nth-child(2),
#drawer-connections-mobile .connection-item:nth-child(2) { animation-delay: 0.08s; }
#drawer-connections .connection-item:nth-child(3),
#drawer-connections-mobile .connection-item:nth-child(3) { animation-delay: 0.12s; }
#drawer-connections .connection-item:nth-child(4),
#drawer-connections-mobile .connection-item:nth-child(4) { animation-delay: 0.16s; }
#drawer-connections .connection-item:nth-child(n+5),
#drawer-connections-mobile .connection-item:nth-child(n+5) { animation-delay: 0.2s; }
@keyframes connectionStagger {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#drawer-backdrop {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: opacity 0.25s ease;
}

/* Mobile search overlay */
.search-overlay {
    background-color: var(--cn-bg) !important;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation: searchOverlayIn 0.22s ease-out forwards;
}

.search-overlay__header {
    background: linear-gradient(180deg, #1c1c1c 0%, #0a0a0a 100%) !important;
    border-bottom-color: rgba(206, 166, 97, 0.25) !important;
    color: #f5f5f5;
}

.search-overlay__header .text-sm.font-semibold.text-\[\#1A3330\] {
    color: #ececec !important;
}

.search-overlay__header button {
    color: #CEA661 !important;
}

.search-overlay__header button:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #DBB978 !important;
}

.search-overlay__results {
    -webkit-overflow-scrolling: touch;
}

.search-result-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 1px solid #CFE0DC;
    background: #fff;
    box-shadow: 0 1px 2px rgba(20, 129, 122, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.search-result-item:active {
    transform: scale(0.985);
}

.search-result-item:hover,
.search-result-item:focus-visible {
    border-color: #CEA661;
    box-shadow: 0 2px 8px rgba(206, 166, 97, 0.18);
    outline: none;
}

.search-result-item__name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    color: #1A3330;
}

.search-result-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

@keyframes searchOverlayIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section header gold rule */
#drawer .text-xs.font-semibold.text-\[\#6B8A84\],
#drawer-mobile .text-xs.font-semibold.text-\[\#6B8A84\] {
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(206, 166, 97, 0.35);
    margin-bottom: 2px;
}

/* About page content card */
.about-card {
    background: linear-gradient(to bottom, #E8EFEC 0%, #DDE6E3 100%);
    border: 1px solid var(--cn-border);
    border-radius: 1.5rem;
    padding: 2rem 2.25rem;
    box-shadow: 0 12px 40px -12px rgba(10, 10, 10, 0.14),
                inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
@media (max-width: 640px) {
    .about-card {
        padding: 1.5rem 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .drawer-panel,
    .drawer-panel.drawer-open,
    .drawer-panel--mobile.drawer-open,
    #drawer-connections .connection-item,
    #drawer-connections-mobile .connection-item,
    .search-overlay,
    .search-result-item,
    .mobile-welcome,
    .drag-hint,
    .drawer-panel--mobile.drawer-panel--howto.drawer-open,
    #age-gate,
    #age-gate > div {
        animation: none !important;
        transition: none !important;
    }
    .drawer-panel--mobile.drawer-open {
        transform: translateY(0);
        opacity: 1;
    }
}