:root {
    --scn-ink: #173a36;
    --scn-muted: #69817d;
    --scn-line: #dfeae7;
    --scn-surface: #ffffff;
    --scn-soft: #f5faf8;
    --scn-species: #168a74;
    --scn-species-dark: #0d6a59;
    --scn-compound: #d86662;
    --scn-compound-dark: #ad4543;
    --scn-selected: #f2c94c;
}

.scn-page {
    width: min(1720px, calc(100% - 40px));
    margin: 28px auto 42px;
    color: var(--scn-ink);
}

.scn-page [hidden] {
    display: none !important;
}

.scn-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding: 32px 34px;
    border: 1px solid #d8e9e4;
    border-radius: 24px;
    background:
        radial-gradient(circle at 83% 15%, rgba(29, 148, 121, .13), transparent 30%),
        linear-gradient(135deg, #f7fcfa 0%, #eef8f5 58%, #f8fbfa 100%);
    box-shadow: 0 18px 45px rgba(24, 74, 65, .07);
}

.scn-hero::after {
    content: "";
    position: absolute;
    right: 5%;
    bottom: -95px;
    width: 240px;
    height: 240px;
    border: 36px solid rgba(15, 122, 93, .05);
    border-radius: 50%;
    pointer-events: none;
}

.scn-hero__copy {
    position: relative;
    z-index: 1;
    max-width: 820px;
}

.scn-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #0f7a5d;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.scn-hero h1 {
    margin: 0;
    color: #123d34;
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 800;
    letter-spacing: -.035em;
}

.scn-hero p {
    max-width: 760px;
    margin: 12px 0 0;
    color: #5b746f;
    font-size: 1rem;
    line-height: 1.7;
}

.scn-legend {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    min-width: 290px;
}

.scn-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid rgba(15, 122, 93, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    color: #48645f;
    font-size: .82rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(28, 78, 69, .05);
}

.scn-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.scn-dot--species { background: var(--scn-species); }
.scn-dot--group { background: #d9a441; }
.scn-dot--compound { background: var(--scn-compound); }
.scn-dot--selected { background: var(--scn-selected); }
.scn-dot--taxon-high { background: #315f86; }
.scn-dot--taxon-low { background: #c46d4d; }

.scn-view-switch {
    display: inline-flex;
    gap: 6px;
    margin-top: 18px;
    padding: 5px;
    border: 1px solid var(--scn-line);
    border-radius: 15px;
    background: #f7faf9;
    box-shadow: 0 8px 22px rgba(19, 62, 55, .04);
}

.scn-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 15px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #5f7772;
    font-size: .84rem;
    font-weight: 800;
    transition: .16s ease;
}

.scn-mode-btn:hover {
    background: #edf5f2;
    color: #0f7a5d;
}

.scn-mode-btn.is-active {
    background: #0f7a5d;
    color: #fff;
    box-shadow: 0 7px 18px rgba(15, 122, 93, .2);
}

.scn-toolbar {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
    padding: 14px;
    border: 1px solid var(--scn-line);
    border-radius: 18px;
    background: var(--scn-surface);
    box-shadow: 0 10px 28px rgba(19, 62, 55, .05);
}

.scn-search-wrap {
    position: relative;
}

.scn-search-wrap > i {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #829590;
    font-size: 1rem;
    pointer-events: none;
}

.scn-search {
    width: 100%;
    height: 44px;
    padding: 0 46px 0 42px;
    border: 1px solid #d9e5e2;
    border-radius: 12px;
    outline: none;
    background: #fbfdfc;
    color: #173a36;
    font-size: .94rem;
    transition: .18s ease;
}

.scn-search:focus {
    border-color: rgba(15, 122, 93, .55);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(15, 122, 93, .08);
}

.scn-search-clear {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 32px;
    height: 32px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #748984;
}

.scn-search-clear:hover {
    background: #edf5f2;
    color: #0f7a5d;
}

.scn-density {
    display: flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
    color: #607772;
    font-size: .83rem;
    font-weight: 700;
}

.scn-density select {
    height: 42px;
    min-width: 88px;
    padding: 0 30px 0 12px;
    border: 1px solid #d9e5e2;
    border-radius: 11px;
    background-color: #fbfdfc;
    color: #234b45;
    font-weight: 700;
}

.scn-toolbar__actions {
    display: flex;
    gap: 7px;
}

.scn-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid #d8e5e1;
    border-radius: 11px;
    background: #fff;
    color: #355d56;
    font-size: .83rem;
    font-weight: 700;
    transition: .16s ease;
}

.scn-tool-btn:hover {
    border-color: #bcd8d1;
    background: #f2f9f6;
    color: #0f7a5d;
}

.scn-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.scn-stats article {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 88px;
    padding: 16px 18px;
    border: 1px solid var(--scn-line);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(20, 66, 58, .045);
}

.scn-stat__icon {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #edf7f4;
    color: #0f7a5d;
    font-size: 1.15rem;
}

.scn-stat__icon--species {
    background: rgba(22, 138, 116, .11);
    color: var(--scn-species);
}

.scn-stat__icon--compound {
    background: rgba(216, 102, 98, .11);
    color: var(--scn-compound);
}

.scn-stats strong {
    display: block;
    color: #163e37;
    font-size: 1.45rem;
    line-height: 1.05;
}

.scn-stats span:not(.scn-stat__icon) {
    display: block;
    margin-top: 5px;
    color: #718680;
    font-size: .78rem;
    line-height: 1.25;
}

.scn-rank-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.scn-rank-strip > span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #e0e9e7;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff, #f9fbfa);
    color: #657d78;
    font-size: .76rem;
    font-weight: 700;
}

.scn-rank-strip b {
    color: #163e37;
    font-size: .92rem;
}

.scn-status {
    margin-top: 12px;
    padding: 11px 14px;
    border: 1px solid #f1ddb0;
    border-radius: 12px;
    background: #fff9e9;
    color: #765f24;
    font-size: .84rem;
}

.scn-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 14px;
    margin-top: 14px;
    min-height: 720px;
}

.scn-canvas-shell,
.scn-detail-panel {
    border: 1px solid var(--scn-line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(18, 62, 54, .055);
}

.scn-canvas-shell {
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.scn-canvas-heading {
    position: absolute;
    z-index: 8;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    min-height: 52px;
    padding: 9px 12px 9px 15px;
    border: 1px solid rgba(215, 231, 226, .9);
    border-radius: 14px;
    background: rgba(255, 255, 255, .91);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(22, 64, 57, .06);
    pointer-events: none;
}

.scn-canvas-heading > div:first-child {
    min-width: 0;
}

.scn-canvas-heading strong {
    display: block;
    color: #173f38;
    font-size: .9rem;
}

.scn-canvas-heading span {
    display: block;
    margin-top: 2px;
    color: #778b87;
    font-size: .75rem;
}

.scn-hint {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #78908a;
    white-space: nowrap;
}

.scn-hint i {
    color: #0f7a5d;
}

.scn-graph {
    width: 100%;
    height: 720px;
    background:
        radial-gradient(circle at 25% 18%, rgba(15, 122, 93, .04), transparent 28%),
        linear-gradient(#fdfefe, #fbfdfc);
}

.scn-graph--radial {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 48%, rgba(255, 255, 255, .98) 0%, rgba(248, 252, 250, .96) 58%, rgba(243, 249, 247, .98) 100%);
    cursor: grab;
}

.scn-graph--bundle {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .99) 0%, rgba(248, 252, 250, .97) 55%, rgba(241, 248, 245, .98) 100%);
    cursor: grab;
}

.scn-graph--bundle:active {
    cursor: grabbing;
}

.scn-graph--sankey {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(22, 138, 116, .035), transparent 27%, rgba(217, 164, 65, .035) 50%, transparent 73%, rgba(216, 102, 98, .035)),
        linear-gradient(#fdfefe, #fbfdfc);
    cursor: grab;
}

.scn-graph--sankey:active {
    cursor: grabbing;
}

.scn-sankey-svg {
    display: block;
    width: 100%;
    height: 100%;
    user-select: none;
}

.scn-sankey-column-labels text {
    fill: #80938e;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .11em;
}

.scn-sankey-links path {
    fill: none;
    stroke-opacity: .22;
    mix-blend-mode: multiply;
    transition: stroke-opacity .14s ease, opacity .14s ease;
}

.scn-sankey-links path.is-related,
.scn-sankey-links path.is-hover-related {
    stroke-opacity: .82;
}

.scn-sankey-links path.is-muted,
.scn-sankey-links path.is-hover-muted {
    stroke-opacity: .035;
}

.scn-sankey-links path.is-focus-hidden {
    opacity: .015;
}

.scn-sankey-node {
    cursor: pointer;
    transition: opacity .14s ease;
}

.scn-sankey-node rect {
    stroke: rgba(255, 255, 255, .98);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
    transition: stroke .14s ease, stroke-width .14s ease, opacity .14s ease;
}

.scn-sankey-node.is-selected rect {
    stroke: #6d5a17;
    stroke-width: 2.5;
}

.scn-sankey-node.is-related rect,
.scn-sankey-node.is-hover-related rect {
    stroke: #173a36;
    stroke-width: 1.6;
}

.scn-sankey-node.is-muted,
.scn-sankey-node.is-hover-muted {
    opacity: .13;
}

.scn-sankey-node.is-focus-hidden {
    opacity: .02;
    pointer-events: none;
}

.scn-sankey-label {
    fill: #49655f;
    font-family: Arial, sans-serif;
    font-size: 7.5px;
    font-weight: 650;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, .98);
    stroke-width: 2.5px;
    stroke-linejoin: round;
    cursor: pointer;
    transition: opacity .14s ease, font-size .14s ease;
}

.scn-sankey-label--species {
    fill: #0f715f;
    font-style: italic;
}

.scn-sankey-label--group {
    fill: #8d6c21;
    font-size: 8.5px;
    font-weight: 900;
}

.scn-sankey-label--compound,
.scn-sankey-label--other-compounds {
    fill: #a74f4d;
}

.scn-sankey-label.labels-hidden {
    opacity: 0;
    pointer-events: none;
}

.scn-sankey-label.is-selected,
.scn-sankey-label.is-related,
.scn-sankey-label.is-hover-related {
    opacity: 1 !important;
    font-size: 8.6px;
    font-weight: 850;
    pointer-events: auto;
}

.scn-sankey-label.is-muted,
.scn-sankey-label.is-hover-muted {
    opacity: .08;
}

.scn-sankey-label.is-focus-hidden {
    opacity: .01 !important;
    pointer-events: none;
}

.scn-bundle-svg {
    display: block;
    width: 100%;
    height: 100%;
    user-select: none;
}

.scn-bundle-guide {
    fill: none;
    stroke: #dce8e4;
    stroke-width: 1;
    stroke-dasharray: 3 5;
    vector-effect: non-scaling-stroke;
}

.scn-bundle-guide--inner {
    stroke: #e7efed;
    stroke-dasharray: 2 5;
}

.scn-bundle-links path {
    fill: none;
    stroke-width: .9;
    stroke-opacity: .16;
    vector-effect: non-scaling-stroke;
    transition: stroke-opacity .16s ease, stroke-width .16s ease, opacity .16s ease;
}

.scn-bundle-links path.is-related,
.scn-bundle-links path.is-hover-related {
    stroke-opacity: .92;
    stroke-width: 1.9;
}

.scn-bundle-links path.is-muted,
.scn-bundle-links path.is-hover-muted {
    stroke-opacity: .025;
}

.scn-bundle-links path.is-focus-hidden {
    opacity: .01;
}

.scn-bundle-leaf {
    cursor: pointer;
    transition: opacity .16s ease;
}

.scn-bundle-leaf circle {
    stroke: rgba(255, 255, 255, .98);
    stroke-width: 1.15;
    vector-effect: non-scaling-stroke;
    transition: stroke-width .16s ease, opacity .16s ease;
}

.scn-bundle-leaf.is-selected circle {
    fill: #f2c94c !important;
    stroke: #7d6719;
    stroke-width: 2.5;
}

.scn-bundle-leaf.is-related circle,
.scn-bundle-leaf.is-hover-related circle {
    stroke: #173a36;
    stroke-width: 1.8;
}

.scn-bundle-leaf.is-muted,
.scn-bundle-leaf.is-hover-muted {
    opacity: .12;
}

.scn-bundle-leaf.is-focus-hidden {
    opacity: .015;
    pointer-events: none;
}

.scn-bundle-label {
    font-family: Arial, sans-serif;
    font-size: 7.4px;
    font-weight: 600;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, .98);
    stroke-width: 2.5px;
    stroke-linejoin: round;
    cursor: pointer;
    transition: opacity .16s ease, font-size .16s ease;
}

.scn-bundle-label--species {
    fill: #0e715f;
    font-style: italic;
}

.scn-bundle-label--compound {
    fill: #b64f4c;
}

.scn-bundle-label.labels-hidden {
    opacity: 0;
    pointer-events: none;
}

.scn-bundle-label.is-related,
.scn-bundle-label.is-hover-related,
.scn-bundle-label.is-selected {
    opacity: 1 !important;
    font-size: 8.5px;
    font-weight: 800;
    pointer-events: auto;
}

.scn-bundle-label.is-muted,
.scn-bundle-label.is-hover-muted {
    opacity: .08;
}

.scn-bundle-label.is-focus-hidden {
    opacity: .01 !important;
    pointer-events: none;
}

.scn-bundle-group-arcs path {
    vector-effect: non-scaling-stroke;
}

.scn-bundle-group-label {
    font-family: Arial, sans-serif;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .01em;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, .98);
    stroke-width: 3px;
    stroke-linejoin: round;
}

.scn-bundle-side-label {
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, .99);
    stroke-width: 3.5px;
}

.scn-bundle-center-title {
    fill: #254f47;
    font-size: 12px;
    font-weight: 900;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, .98);
    stroke-width: 4px;
}

.scn-bundle-center-subtitle {
    fill: #7c928d;
    font-size: 8px;
    font-weight: 700;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, .98);
    stroke-width: 3px;
}

.scn-graph--radial:active {
    cursor: grabbing;
}

.scn-radial-svg {
    display: block;
    width: 100%;
    height: 100%;
    user-select: none;
}

.scn-radial-rings circle {
    fill: none;
    stroke: #dfe8e5;
    stroke-width: 1;
    stroke-dasharray: 3 5;
    vector-effect: non-scaling-stroke;
}

.scn-radial-rings circle.is-leaf-ring {
    stroke: #cddbd7;
    stroke-dasharray: 2 4;
}

.scn-radial-rings circle.is-outer-guide {
    stroke: rgba(216, 102, 98, .6);
    stroke-width: 1.15;
    stroke-dasharray: 3 4;
}

.scn-radial-rings circle.is-outer-guide--far {
    stroke: rgba(22, 138, 116, .55);
    stroke-dasharray: 4 4;
}

.scn-radial-rings text {
    fill: #9aacaa;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .04em;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, .96);
    stroke-width: 3px;
}

.scn-radial-links path {
    fill: none;
    stroke-width: 1.05;
    stroke-opacity: .72;
    vector-effect: non-scaling-stroke;
    transition: opacity .16s ease, stroke-width .16s ease;
}

.scn-radial-nodes circle {
    stroke: #fff;
    stroke-width: 1.1;
    vector-effect: non-scaling-stroke;
    transition: opacity .16s ease, r .16s ease, stroke-width .16s ease;
}

.scn-radial-node {
    cursor: pointer;
}

.scn-radial-node.is-hovered circle {
    r: 5px;
    stroke: #173a36;
    stroke-width: 1.7;
}

.scn-radial-node.is-selected circle {
    fill: #f2c94c !important;
    stroke: #8d7217;
    stroke-width: 2.4;
}

.scn-radial-node.is-related circle {
    opacity: 1;
}

.scn-radial-node.is-muted,
.scn-radial-labels text.is-muted,
.scn-radial-links path.is-muted {
    opacity: .09;
}

.scn-radial-node.is-focus-hidden,
.scn-radial-labels text.is-focus-hidden,
.scn-radial-links path.is-focus-hidden {
    opacity: .015;
    pointer-events: none;
}

.scn-radial-links path.is-related {
    stroke-opacity: .98;
    stroke-width: 2;
}

.scn-radial-core {
    fill: #fff;
    fill-opacity: .98;
    stroke: #d3dfdc;
    stroke-width: 1.4;
    vector-effect: non-scaling-stroke;
}

.scn-radial-core-label {
    fill: #9aacaa;
    font-family: Arial, sans-serif;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .04em;
    pointer-events: none;
}

.scn-radial-labels text {
    font-family: Arial, sans-serif;
    font-size: 7.5px;
    font-style: italic;
    font-weight: 600;
    letter-spacing: -.01em;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, .95);
    stroke-width: 2.4px;
    stroke-linejoin: round;
    transition: opacity .16s ease;
}

.scn-radial-labels text.is-related {
    font-size: 8.6px;
    font-weight: 800;
}

.scn-radial-leaf-ticks line {
    stroke-width: 1.25;
    stroke-opacity: .9;
    vector-effect: non-scaling-stroke;
}

.scn-radial-arcs path {
    vector-effect: non-scaling-stroke;
}

.scn-radial-group-label {
    font-family: Arial, sans-serif;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .02em;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, .98);
    stroke-width: 3px;
    stroke-linejoin: round;
}

.scn-loading,
.scn-empty {
    position: absolute;
    z-index: 7;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    background: rgba(252, 254, 253, .93);
}

.scn-loading strong,
.scn-empty strong {
    margin-top: 14px;
    color: #204b44;
    font-size: 1rem;
}

.scn-loading small,
.scn-empty p {
    max-width: 430px;
    margin: 6px 0 0;
    color: #748a85;
    font-size: .84rem;
}

.scn-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid #d7e9e4;
    border-top-color: #0f7a5d;
    border-radius: 50%;
    animation: scn-spin .8s linear infinite;
}

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

.scn-empty > span {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 17px;
    background: #edf6f3;
    color: #0f7a5d;
    font-size: 1.4rem;
}

.scn-detail-panel {
    position: relative;
    padding: 22px;
    overflow: auto;
}

.scn-detail-empty {
    display: flex;
    min-height: 620px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding-top: 74px;
    text-align: left;
}

.scn-detail-empty__icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #eef7f4;
    color: #0f7a5d;
    font-size: 1.35rem;
}

.scn-detail-empty h2 {
    margin: 16px 0 7px;
    color: #264d46;
    font-size: 1rem;
}

.scn-detail-empty p {
    margin: 0;
    color: #7a8f8a;
    font-size: .83rem;
    line-height: 1.55;
}

.scn-overview-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 22px;
}

.scn-overview-heading {
    margin-bottom: 2px;
    color: #607872;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.scn-overview-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 10px 11px;
    border: 1px solid #e2ece9;
    border-radius: 11px;
    background: #fbfdfc;
    color: #365d56;
    text-align: left;
    font-size: .79rem;
    transition: .15s ease;
}

.scn-overview-item:hover {
    border-color: #bdd9d2;
    background: #f2f8f6;
    color: #0d6d56;
}

.scn-overview-item strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.scn-overview-item span {
    color: #879994;
    font-size: .72rem;
    white-space: nowrap;
}

.scn-detail__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.scn-detail-type {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(22, 138, 116, .11);
    color: var(--scn-species-dark);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.scn-detail-type.is-compound {
    background: rgba(216, 102, 98, .11);
    color: var(--scn-compound-dark);
}

.scn-detail-close {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: #f4f7f6;
    color: #728580;
}

.scn-detail-close:hover {
    background: #eaf3f0;
    color: #0f7a5d;
}

.scn-detail-panel h2 {
    margin: 17px 0 18px;
    color: #173d36;
    font-size: 1.25rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.scn-detail-subtitle {
    margin: -9px 0 17px;
    color: #7b908b;
    font-size: .8rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.scn-detail-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 14px;
    border: 1px solid #e0ebe8;
    border-radius: 13px;
    background: #f8fbfa;
}

.scn-detail-metric span {
    color: #6b827d;
    font-size: .8rem;
    font-weight: 700;
}

.scn-detail-metric strong {
    color: #0f7a5d;
    font-size: 1.2rem;
}

.scn-related {
    margin-top: 22px;
}

.scn-related__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.scn-related__heading h3 {
    margin: 0;
    color: #375c55;
    font-size: .84rem;
    font-weight: 800;
}

.scn-related__heading span {
    color: #8a9b97;
    font-size: .74rem;
}

.scn-related-list {
    display: flex;
    max-height: 420px;
    flex-direction: column;
    gap: 7px;
    overflow: auto;
    padding-right: 3px;
}

.scn-related-item {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid #e1ebe8;
    border-radius: 11px;
    background: #fff;
    color: #355d56;
    text-align: left;
    font-size: .8rem;
    line-height: 1.35;
    transition: .15s ease;
}

.scn-related-item:hover {
    border-color: #bdd9d2;
    background: #f4faf8;
    color: #0f6f57;
}

.scn-detail-actions {
    display: grid;
    gap: 8px;
    margin-top: 22px;
}

.scn-focus-btn,
.scn-detail-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: .83rem;
    font-weight: 800;
    text-decoration: none !important;
}

.scn-focus-btn {
    border: 1px solid #cfe1dc;
    background: #f5faf8;
    color: #24584d;
}

.scn-focus-btn:hover,
.scn-focus-btn.is-active {
    border-color: #8fc1b5;
    background: #e8f4f0;
    color: #0b6a52;
}

.scn-detail-link {
    background: #0f7a5d;
    color: #fff !important;
}

.scn-detail-link:hover {
    background: #0c684f;
}

@media (max-width: 1180px) {
    .scn-toolbar {
        grid-template-columns: 1fr auto;
    }

    .scn-toolbar__actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .scn-workspace {
        grid-template-columns: minmax(0, 1fr) 290px;
    }
}

@media (max-width: 900px) {
    .scn-page {
        width: min(100% - 24px, 1720px);
        margin-top: 18px;
    }

    .scn-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 25px 22px;
    }

    .scn-legend {
        min-width: 0;
        justify-content: flex-start;
    }

    .scn-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .scn-rank-strip {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .scn-workspace {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .scn-detail-panel {
        min-height: 0;
    }

    .scn-detail-empty {
        min-height: 180px;
        padding-top: 18px;
    }

    .scn-related-list {
        max-height: 300px;
    }
}

@media (max-width: 640px) {
    .scn-view-switch {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .scn-mode-btn {
        justify-content: center;
        padding: 0 9px;
        text-align: center;
    }

    .scn-toolbar {
        grid-template-columns: 1fr;
    }

    .scn-density,
    .scn-toolbar__actions {
        grid-column: auto;
    }

    .scn-density {
        justify-content: space-between;
    }

    .scn-toolbar__actions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .scn-tool-btn {
        padding: 0 8px;
    }

    .scn-tool-btn span {
        display: none;
    }

    .scn-stats {
        grid-template-columns: 1fr;
    }

    .scn-rank-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .scn-stats article {
        min-height: 72px;
    }

    .scn-canvas-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .scn-hint {
        white-space: normal;
    }

    .scn-graph {
        height: 620px;
    }
}
