:root {
    --explorer-surface: #07101f;
    --explorer-panel: rgba(15, 23, 42, 0.94);
    --explorer-border: rgba(148, 163, 184, 0.2);
    --explorer-muted: #94a3b8;
    --explorer-text: #f8fafc;
    --explorer-accent: #22d3ee;
}

body { overflow-x: hidden; }
html.trend-explorer-panel-open,
body.trend-explorer-panel-open {
    overflow: hidden;
    overscroll-behavior: none;
}

.trend-explorer-breakout {
    width: min(calc(100vw - 1.25rem), 112rem);
    margin-left: 50%;
    transform: translateX(-50%);
}

.trend-explorer-breakout.trend-explorer-lite .explorer-heading__status,
.trend-explorer-breakout.trend-explorer-lite #industryContextMenu,
.trend-explorer-breakout.trend-explorer-lite #industryDetailPanel,
.trend-explorer-breakout.trend-explorer-lite #trendDetailModal,
.trend-explorer-breakout.trend-explorer-lite #savedTrendDeck,
.trend-explorer-breakout.trend-explorer-lite #fullscreenGraphBtn {
    display: none !important;
}

.trend-explorer-breakout.trend-explorer-lite .graph-node--trend .node-label--trend {
    display: none !important;
}

.trend-explorer-breakout.trend-explorer-lite .graph-node--trend:hover .node-label--trend,
.trend-explorer-breakout.trend-explorer-lite .graph-node--trend:focus-visible .node-label--trend {
    display: none !important;
}

.trend-explorer-breakout.trend-explorer-lite .graph-stage {
    min-height: 28rem;
    height: clamp(28rem, calc(100dvh - 10.8rem), 34rem);
}

.explorer-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    padding: 0 0.5rem;
}

.explorer-heading__eyebrow {
    margin-bottom: 0.4rem;
    color: #67e8f9;
    font-size: 0.68rem;
    font-weight: 800;
}

.explorer-heading h1 {
    margin: 0;
    color: var(--explorer-text);
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.15;
}

.explorer-heading p {
    margin: 0.55rem 0 0;
    color: var(--explorer-muted);
    font-size: 0.9rem;
}

.explorer-heading__status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.55rem;
    min-height: 2rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--explorer-border);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    color: #cbd5e1;
    font-size: 0.72rem;
}

.status-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #22d3ee;
    box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.explorer-workspace {
    overflow: hidden;
    border: 1px solid rgba(71, 85, 105, 0.7);
    border-radius: 1.2rem;
    background: var(--explorer-surface);
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.38);
}

body.trend-explorer-fullscreen { overflow: hidden; }
body.trend-explorer-fullscreen .trend-explorer-breakout {
    position: fixed;
    z-index: 60;
    inset: 0;
    width: 100vw;
    margin: 0;
    transform: none;
}
body.trend-explorer-fullscreen .explorer-heading { display: none; }
body.trend-explorer-fullscreen .explorer-workspace {
    display: flex;
    width: 100%;
    height: 100dvh;
    flex-direction: column;
    border: 0;
    border-radius: 0;
}
body.trend-explorer-fullscreen .explorer-toolbar { flex: 0 0 auto; }
body.trend-explorer-fullscreen .graph-stage {
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
}

.explorer-toolbar {
    position: relative;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3.7rem;
    padding: 0.62rem 0.8rem 0.62rem 1rem;
    border-bottom: 1px solid rgba(71, 85, 105, 0.72);
    background: rgba(15, 23, 42, 0.96);
}

.toolbar-summary,
.toolbar-actions,
.toolbar-button,
.toolbar-icon-button {
    display: inline-flex;
    align-items: center;
}

.toolbar-summary {
    flex: 0 0 auto;
    gap: 0.65rem;
    color: #cbd5e1;
    font-size: 0.76rem;
    font-weight: 700;
}

.toolbar-actions { gap: 0.42rem; }
.toolbar-divider { width: 1px; height: 1.25rem; background: #334155; }

.toolbar-button,
.toolbar-icon-button {
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.35rem;
    border: 1px solid #334155;
    border-radius: 0.65rem;
    background: #111c2f;
    color: #cbd5e1;
    font-size: 0.72rem;
    font-weight: 700;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.toolbar-button { padding: 0.48rem 0.72rem; }
.toolbar-icon-button { width: 2.35rem; padding: 0; }
.toolbar-button:hover,
.toolbar-icon-button:hover,
.toolbar-button:focus-visible,
.toolbar-icon-button:focus-visible { border-color: #64748b; background: #1e293b; color: #fff; outline: none; }
.toolbar-button:disabled,
.toolbar-icon-button:disabled { cursor: not-allowed; opacity: 0.45; }
.toolbar-button.is-active { border-color: rgba(34, 211, 238, 0.5); background: rgba(8, 145, 178, 0.14); color: #a5f3fc; }
.toolbar-button svg,
.toolbar-icon-button svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.graph-stage {
    position: relative;
    height: clamp(40rem, calc(100dvh - 12.5rem), 58rem);
    min-height: 40rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 44%, rgba(14, 116, 144, 0.09), transparent 35%),
        linear-gradient(rgba(51, 65, 85, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(51, 65, 85, 0.12) 1px, transparent 1px),
        #07101f;
    background-size: auto, 42px 42px, 42px 42px, auto;
}

#trendGraph { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
#trendGraph:active { cursor: grabbing; }

.graph-link { pointer-events: none; }
.graph-link--spoke { stroke-width: 1.25; stroke-opacity: 0.42; }
.graph-link--similarity { stroke: #fbbf24; stroke-width: 1.2; stroke-dasharray: 4 7; stroke-opacity: 0.48; }
.graph-link--similarity.is-hidden { stroke-opacity: 0; }

.graph-node { cursor: pointer; outline: none; }
.graph-node circle { transition: stroke-width 0.16s ease, filter 0.16s ease, opacity 0.16s ease; }
.graph-node:focus-visible circle,
.graph-node:hover circle { stroke-width: 3.5px; filter: drop-shadow(0 0 9px var(--node-color)); }
.graph-node--industry circle { fill: #101c30; stroke: var(--node-color); stroke-width: 2.2px; }
.graph-node--industry.is-expanded circle { fill: #14243d; fill: color-mix(in srgb, var(--node-color) 18%, #0f172a); stroke-width: 3px; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--node-color) 55%, transparent)); }
.graph-node--industry.is-selected circle { stroke-width: 4px; }
.graph-node--industry.is-unavailable circle { fill: #111827; stroke: #475569; stroke-dasharray: 4 4; opacity: 0.75; }
.graph-node--trend circle { fill: #122238; fill: color-mix(in srgb, var(--node-color) 18%, #0b1323); stroke: var(--node-color); stroke: color-mix(in srgb, var(--node-color) 82%, white); stroke-width: 1.7px; }
.graph-node--trend.is-saved circle { stroke: #fbbf24; stroke-width: 3px; filter: drop-shadow(0 0 7px rgba(251, 191, 36, 0.46)); }

.node-label,
.node-key,
.node-count {
    pointer-events: none;
    fill: #f8fafc;
    text-anchor: middle;
    paint-order: stroke;
    stroke: rgba(7, 16, 31, 0.92);
    stroke-linejoin: round;
}

.node-label { font-size: 13px; font-weight: 800; stroke-width: 4px; }
.node-label--trend { fill: #dbeafe; font-size: 10px; font-weight: 700; stroke-width: 3.5px; }
.node-key { font-size: 12px; font-weight: 900; stroke-width: 3px; }
.node-count { fill: #94a3b8; font-size: 8px; font-weight: 700; stroke-width: 2px; }
.graph-viewport.is-zoomed-out .node-label--trend { opacity: 0; }
.graph-viewport.is-zoomed-out .node-count { opacity: 0; }
.graph-viewport.is-dense .node-label--trend { opacity: 0; }
.graph-viewport.is-dense .graph-link--similarity { stroke-opacity: 0.28; }
.graph-node--trend:hover .node-label--trend,
.graph-node--trend:focus-visible .node-label--trend { opacity: 1; }

.graph-legend {
    position: absolute;
    top: 0.8rem;
    left: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 0.9rem;
    max-width: calc(100% - 1.6rem);
    padding: 0.55rem 0.72rem;
    border: 1px solid rgba(71, 85, 105, 0.55);
    border-radius: 0.7rem;
    background: rgba(7, 16, 31, 0.78);
    backdrop-filter: blur(10px);
    color: #94a3b8;
    font-size: 0.64rem;
    pointer-events: none;
}

.graph-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.legend-node { display: inline-block; width: 0.65rem; height: 0.65rem; border-radius: 50%; }
.legend-node--industry { border: 2px solid #22d3ee; background: #0f172a; }
.legend-node--trend { border: 1px solid #67e8f9; background: rgba(34, 211, 238, 0.18); }
.legend-line { display: inline-block; width: 1.1rem; height: 0; border-top: 1px solid #64748b; }
.legend-line--similarity { border-top-color: #fbbf24; border-top-style: dashed; }

.industry-context-menu {
    position: absolute;
    z-index: 9;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    max-width: min(19rem, calc(100% - 1.5rem));
    padding: 0.55rem 0.55rem 0.55rem 0.8rem;
    border: 1px solid rgba(100, 116, 139, 0.8);
    border-radius: 0.8rem;
    background: rgba(15, 23, 42, 0.97);
    box-shadow: 0 14px 34px rgba(2, 6, 23, 0.46);
    transform: translate(-50%, calc(-100% - 3.3rem));
}

.industry-context-menu > div { min-width: 0; }
.industry-context-menu strong,
.industry-context-menu span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.industry-context-menu strong { color: #f8fafc; font-size: 0.76rem; }
.industry-context-menu span { margin-top: 0.12rem; color: #94a3b8; font-size: 0.62rem; }
.industry-context-menu button { flex: 0 0 auto; min-height: 2rem; padding: 0.36rem 0.65rem; border: 1px solid #0e7490; border-radius: 0.55rem; background: rgba(8, 145, 178, 0.15); color: #a5f3fc; font-size: 0.68rem; font-weight: 800; }
.industry-context-menu button:disabled { border-color: #334155; color: #64748b; cursor: not-allowed; }

.graph-state {
    position: absolute;
    inset: 0;
    z-index: 12;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(7, 16, 31, 0.88);
    text-align: center;
}

.graph-state strong { margin-top: 0.9rem; color: #e2e8f0; font-size: 1rem; }
.graph-state p { margin: 0.35rem 0 0; color: #64748b; font-size: 0.78rem; }
.graph-state button { margin-top: 1rem; min-height: 2.5rem; padding: 0.55rem 1rem; border: 1px solid #0e7490; border-radius: 0.65rem; background: #0e7490; color: white; font-size: 0.78rem; font-weight: 800; }
.graph-state__icon { display: grid; width: 2.6rem; height: 2.6rem; place-items: center; border: 1px solid #f59e0b; border-radius: 50%; color: #fbbf24; font-size: 1.2rem; font-weight: 900; }
.graph-spinner { width: 2rem; height: 2rem; border: 2px solid #334155; border-top-color: #22d3ee; border-radius: 50%; animation: explorer-spin 0.8s linear infinite; }
@keyframes explorer-spin { to { transform: rotate(360deg); } }

.saved-deck {
    position: absolute;
    z-index: 10;
    right: 0.8rem;
    bottom: 0.8rem;
    width: min(42rem, calc(100% - 1.6rem));
    overflow: hidden;
    border: 1px solid rgba(71, 85, 105, 0.8);
    border-radius: 0.9rem;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 18px 44px rgba(2, 6, 23, 0.45);
    backdrop-filter: blur(14px);
}

.saved-deck__toggle {
    display: flex;
    width: 100%;
    min-height: 3rem;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.8rem;
    background: transparent;
    color: #e2e8f0;
    text-align: left;
}

.saved-deck__mark { width: 0.55rem; height: 1.65rem; border-radius: 999px; background: #fbbf24; box-shadow: 0 0 14px rgba(251, 191, 36, 0.35); }
.saved-deck__toggle > span:nth-child(2) { display: flex; flex: 1; align-items: center; gap: 0.5rem; }
.saved-deck__toggle strong { font-size: 0.78rem; }
.saved-deck__toggle small { display: grid; min-width: 1.3rem; height: 1.3rem; place-items: center; border-radius: 999px; background: #334155; color: #f8fafc; font-size: 0.62rem; font-weight: 800; }
.saved-deck__toggle svg { width: 1rem; height: 1rem; fill: none; stroke: #94a3b8; stroke-width: 2; transition: transform 0.18s ease; }
.saved-deck__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.saved-deck__body { padding: 0 0.75rem 0.75rem; border-top: 1px solid rgba(51, 65, 85, 0.72); }
.saved-deck__empty { padding: 1rem 0.3rem 0.3rem; color: #64748b; font-size: 0.72rem; text-align: center; }
.saved-deck__cards { display: flex; gap: 0.65rem; overflow-x: auto; padding-top: 0.75rem; scroll-snap-type: x proximity; }

.saved-trend-card { position: relative; flex: 0 0 12.5rem; min-height: 7.4rem; overflow: hidden; border: 1px solid #334155; border-radius: 0.75rem; background: #0b1424; scroll-snap-align: start; }
.saved-trend-card__open { display: block; width: 100%; height: 100%; padding: 0.8rem 2rem 0.8rem 0.8rem; text-align: left; }
.saved-trend-card__meta { color: #67e8f9; font-size: 0.58rem; font-weight: 700; }
.saved-trend-card__identity { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.6rem; }
.saved-trend-card__key { display: grid; flex: 0 0 auto; min-width: 1.8rem; height: 1.8rem; padding: 0 0.35rem; place-items: center; border: 1px solid #0e7490; border-radius: 0.45rem; color: #a5f3fc; font-size: 0.75rem; font-weight: 900; }
.saved-trend-card__identity strong { display: -webkit-box; overflow: hidden; color: #f1f5f9; font-size: 0.72rem; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.saved-trend-card__definition { display: -webkit-box; overflow: hidden; margin: 0.55rem 0 0; color: #64748b; font-size: 0.62rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.saved-trend-card__remove { position: absolute; top: 0.45rem; right: 0.45rem; display: grid; width: 1.5rem; height: 1.5rem; place-items: center; border-radius: 50%; color: #64748b; font-size: 1rem; line-height: 1; }
.saved-trend-card__remove:hover,
.saved-trend-card__remove:focus-visible { background: rgba(239, 68, 68, 0.15); color: #fca5a5; outline: none; }

.panel-backdrop,
.trend-modal {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(2, 6, 23, 0.74);
    backdrop-filter: blur(4px);
}

.industry-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 72;
    display: block;
    width: min(31rem, 92vw);
    height: 100dvh;
    overflow: hidden;
    border-left: 1px solid #334155;
    background: #111c2f;
    box-shadow: -24px 0 70px rgba(2, 6, 23, 0.55);
    perspective: 1400px;
}

.industry-panel__flip-card { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.48s cubic-bezier(0.22, 0.8, 0.32, 1); }
.industry-panel__flip-card.is-flipped { transform: rotateY(-180deg); }
.industry-panel__face { position: absolute; inset: 0; display: flex; min-height: 0; flex-direction: column; overflow: hidden; background: #111c2f; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.industry-panel__back { transform: rotateY(180deg); }

.detail-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid #334155;
}

.detail-panel__header h2 { margin: 0.2rem 0 0; color: #f8fafc; font-size: 1.2rem; font-weight: 900; }
.detail-kicker { color: #67e8f9; font-size: 0.65rem; font-weight: 800; }
.detail-close-button { display: grid; flex: 0 0 auto; width: 2.35rem; height: 2.35rem; place-items: center; border-radius: 0.6rem; color: #94a3b8; font-size: 1.6rem; line-height: 1; }
.detail-close-button:hover,
.detail-close-button:focus-visible { background: #1e293b; color: white; outline: none; }
.industry-panel__body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1.25rem; -webkit-overflow-scrolling: touch; }
.industry-panel__framework { padding: 1rem; border: 1px solid rgba(14, 116, 144, 0.5); border-radius: 0.85rem; background: rgba(8, 145, 178, 0.08); }
.industry-panel__framework > span { display: block; color: #22d3ee; font-size: 0.62rem; font-weight: 800; }
.industry-panel__framework h3 { margin: 0.3rem 0 0.8rem; color: #cffafe; font-size: 1.25rem; font-weight: 900; line-height: 1.25; }
#industryPanelOverview { margin: 0; color: #cbd5e1; font-size: 0.8rem; line-height: 1.85; white-space: pre-line; }
.industry-panel__trend-heading { margin: 1.4rem 0 0.7rem; }
.industry-panel__trend-heading span { display: block; color: #64748b; font-size: 0.58rem; font-weight: 800; }
.industry-panel__trend-heading h3 { margin: 0.2rem 0 0; color: #f8fafc; font-size: 0.9rem; font-weight: 900; }
.industry-panel__trend-list { display: grid; gap: 0.55rem; }
.industry-panel__trend-list button { display: flex; align-items: flex-start; gap: 0.75rem; min-height: 4.5rem; padding: 0.75rem; border: 1px solid #334155; border-radius: 0.7rem; background: #0b1424; color: #cbd5e1; text-align: left; }
.industry-panel__trend-list button:hover,
.industry-panel__trend-list button:focus-visible { border-color: #0e7490; color: #f8fafc; outline: none; }
.industry-panel__trend-key { display: grid; flex: 0 0 auto; min-width: 2rem; height: 2rem; padding: 0 0.4rem; place-items: center; border: 1px solid rgba(14, 116, 144, 0.7); border-radius: 0.5rem; background: rgba(8, 145, 178, 0.14); color: #67e8f9; font-size: 0.72rem; font-weight: 900; }
.industry-panel__trend-copy { min-width: 0; }
.industry-panel__trend-copy small { display: block; overflow: hidden; margin-bottom: 0.18rem; color: #64748b; font-size: 0.58rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.industry-panel__trend-copy small:empty { display: none; }
.industry-panel__trend-copy strong { display: block; color: #f1f5f9; font-size: 0.76rem; line-height: 1.4; }
.industry-panel__trend-copy p { display: -webkit-box; overflow: hidden; margin: 0.35rem 0 0; color: #94a3b8; font-size: 0.68rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

.trend-modal { display: flex; align-items: center; justify-content: center; padding: 0.8rem; opacity: 0; transition: opacity 0.18s ease 0.28s; }
.trend-modal.is-open { opacity: 1; transition-delay: 0s; }
.trend-detail-stage { width: min(50rem, 100%); height: min(46rem, calc(100dvh - 1.6rem)); perspective: 1400px; }
.trend-detail-flip-card { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.48s cubic-bezier(0.22, 0.8, 0.32, 1); }
.trend-detail-flip-card.is-flipped { transform: rotateY(-180deg); }
.trend-detail-face { position: absolute; inset: 0; overflow: hidden; border: 1px solid #334155; border-radius: 1rem; background: #111c2f; box-shadow: 0 26px 76px rgba(2, 6, 23, 0.65); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.trend-detail-front { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(1.5rem, 5vw, 3.5rem); background: #0c1728; text-align: center; }
.trend-detail-front::before { position: absolute; inset: 1rem; border: 1px solid rgba(34, 211, 238, 0.16); border-radius: 0.8rem; content: ''; pointer-events: none; }
.trend-detail-front > * { position: relative; }
.trend-detail-front__industry { margin: 0 0 1.15rem; color: #67e8f9; font-size: 0.7rem; font-weight: 800; }
.trend-detail-front__key { display: grid; min-width: 4.5rem; height: 4.5rem; padding: 0 0.9rem; place-items: center; border: 1px solid #0891b2; border-radius: 0.95rem; background: rgba(8, 51, 68, 0.88); color: #cffafe; font-size: 1.8rem; font-weight: 900; box-shadow: 0 14px 36px rgba(8, 145, 178, 0.18); }
.trend-detail-front__english { margin: 1rem 0 0.35rem; color: #64748b; font-size: 0.7rem; }
.trend-detail-front h2 { margin: 0; color: #f8fafc; font-size: 1.55rem; font-weight: 900; }
.trend-detail-front__definition { display: -webkit-box; max-width: 38rem; overflow: hidden; margin: 1rem 0 0; color: #94a3b8; font-size: 0.82rem; line-height: 1.8; -webkit-box-orient: vertical; -webkit-line-clamp: 5; }
.trend-detail-back { display: flex; flex-direction: column; transform: rotateY(180deg); }
.trend-detail-heading-meta { display: flex; align-items: center; gap: 0.5rem; }
.trend-detail-key { display: grid; min-width: 1.8rem; height: 1.55rem; padding: 0 0.4rem; place-items: center; border: 1px solid #0e7490; border-radius: 0.4rem; background: rgba(8, 145, 178, 0.12); color: #a5f3fc; font-size: 0.68rem; font-weight: 900; }
.trend-detail-actions { display: flex; align-items: center; gap: 0.45rem; }
.trend-save-button { display: inline-flex; min-height: 2.35rem; align-items: center; gap: 0.4rem; padding: 0.45rem 0.7rem; border: 1px solid #475569; border-radius: 0.6rem; background: transparent; color: #cbd5e1; font-size: 0.68rem; font-weight: 800; }
.trend-save-button svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.trend-save-button.is-saved { border-color: #d97706; background: rgba(217, 119, 6, 0.12); color: #fcd34d; }
.trend-save-button.is-saved svg { fill: currentColor; }
.trend-detail-content { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1.25rem; color: #cbd5e1; font-size: 0.82rem; -webkit-overflow-scrolling: touch; }
.trend-detail-content section { margin-bottom: 1.4rem; }
.trend-detail-content section:last-child { margin-bottom: 0; }
.trend-detail-content h3 { margin: 0 0 0.55rem; color: #f8fafc; font-size: 0.82rem; font-weight: 900; }
.trend-detail-content p { margin: 0; line-height: 1.8; white-space: pre-line; }
.trend-detail-subtitle { margin-bottom: 1rem !important; color: #a5b4fc; font-size: 0.92rem; }
.trend-detail-list { display: grid; gap: 0.55rem; }
.trend-detail-list article { padding: 0.75rem; border: 1px solid #27364c; border-radius: 0.7rem; background: #0b1424; }
.trend-detail-list strong { display: block; margin-bottom: 0.25rem; color: #67e8f9; font-size: 0.7rem; }
.trend-detail-list--opportunities strong { color: #6ee7b7; }
.trend-detail-empty { color: #64748b; }

.explorer-toast { position: fixed; z-index: 90; left: 50%; bottom: 1.5rem; max-width: calc(100vw - 2rem); padding: 0.7rem 1rem; border: 1px solid #475569; border-radius: 0.7rem; background: #111827; color: #e2e8f0; box-shadow: 0 14px 34px rgba(2, 6, 23, 0.5); transform: translateX(-50%); font-size: 0.76rem; font-weight: 700; }
.is-hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 860px) {
    .trend-explorer-breakout { width: 100vw; }
    .explorer-heading { align-items: flex-start; padding: 0 1rem; }
    .explorer-heading__status { display: none; }
    .explorer-heading h1 { font-size: 1.65rem; }
    .explorer-heading p { max-width: 38rem; font-size: 0.78rem; }
    .explorer-workspace { border-right: 0; border-left: 0; border-radius: 0; }
    .explorer-toolbar { align-items: stretch; overflow-x: auto; padding: 0.55rem 0.65rem; }
    .toolbar-summary { position: sticky; left: 0; z-index: 2; padding-right: 0.45rem; background: rgba(15, 23, 42, 0.98); }
    .toolbar-actions { width: max-content; }
    .toolbar-button { white-space: nowrap; }
    .graph-stage { height: calc(100dvh - 11.5rem); min-height: 36rem; }
    .graph-legend { top: 0.55rem; left: 0.55rem; gap: 0.4rem 0.65rem; max-width: calc(100% - 1.1rem); }
    .industry-context-menu { right: 0.55rem; bottom: 4.3rem; left: 0.55rem !important; max-width: none; transform: none; }
    .saved-deck { right: 0.55rem; bottom: 0.55rem; width: calc(100% - 1.1rem); }
    .industry-panel { top: auto; bottom: 0; width: 100%; height: min(78dvh, 46rem); max-height: none; border-top: 1px solid #334155; border-left: 0; border-radius: 1rem 1rem 0 0; }
    .trend-detail-stage { height: calc(100dvh - 1rem); }
    .trend-detail-face { border-radius: 0.85rem; }
    .trend-save-button span { display: none; }
}

@media (max-width: 520px) {
    .explorer-heading { margin-bottom: 0.9rem; }
    .explorer-heading__eyebrow { font-size: 0.6rem; }
    .explorer-heading h1 { font-size: 1.45rem; }
    .toolbar-summary { font-size: 0.68rem; }
    .toolbar-divider { display: none; }
    .toolbar-button { padding: 0.42rem 0.58rem; }
    .toolbar-button svg { display: none; }
    .graph-stage { height: calc(100dvh - 10.6rem); min-height: 34rem; }
    .graph-legend span:nth-child(3),
    .graph-legend span:nth-child(4) { display: none; }
    .trend-detail-front h2 { font-size: 1.25rem; }
    .detail-panel__header { padding: 0.9rem; }
    .trend-detail-content { padding: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; }
    .graph-spinner { animation: none; }
    .trend-modal,
    .trend-detail-flip-card,
    .industry-panel__flip-card,
    .toolbar-button,
    .toolbar-icon-button,
    .saved-deck__toggle svg { transition: none !important; }
}
