:root {
    --page: #f6f7f3;
    --surface: #fffefa;
    --surface-soft: #f7faf6;
    --ink: #1d2c29;
    --muted: #687873;
    --line: #dfe8e2;
    --primary: #0d756b;
    --primary-dark: #123c36;
    --lime: #d8f36d;
    --lemon: #ffe58f;
    --sky: #e8f4ff;
    --paper: #fff8e6;
    --shadow: 0 14px 36px rgba(38, 66, 58, 0.075);
    --shadow-soft: 0 1px 2px rgba(38, 66, 58, 0.05), 0 16px 44px rgba(38, 66, 58, 0.08);
    --radius: 10px;
}

* {
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
    scroll-padding-top: clamp(112px, 20vh, 190px);
}

body {
    margin: 0;
    min-width: 320px;
    background: linear-gradient(180deg, #fbfcf7 0, var(--page) 420px);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.45;
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    background: rgba(244, 247, 239, 0.86);
    backdrop-filter: blur(14px);
}

.brand-mark {
    display: inline-grid;
    grid-template-columns: 44px auto;
    align-items: center;
    gap: 10px;
}

.brand-mark span {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 2px solid var(--primary-dark);
    border-radius: 12px 12px 12px 5px;
    background: var(--lime);
    color: var(--primary-dark);
    font-size: 20px;
    font-weight: 900;
    transform: rotate(-4deg);
}

.brand-mark strong,
.brand-mark small {
    display: block;
    line-height: 1;
}

.brand-mark strong {
    font-size: 22px;
    letter-spacing: 0;
}

.brand-mark small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.top-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-actions a,
.history-trigger {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 253, 248, 0.78);
    color: #4f625d;
    font-size: 13px;
    font-weight: 800;
}

.top-actions a[href="#submit"] {
    border-color: transparent;
    background: var(--primary-dark);
    color: #fff;
}

.history-menu {
    position: relative;
    display: inline-flex;
}

.history-trigger {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
    cursor: pointer;
}

.history-trigger svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.history-trigger:hover,
.history-trigger:focus-visible,
.history-menu.open .history-trigger {
    border-color: rgba(158, 198, 181, 0.9);
    background: #fffefa;
    color: var(--primary-dark);
    outline: 0;
}

.history-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 40;
    width: min(340px, calc(100vw - 32px));
    padding: 14px;
    border: 1px solid rgba(216, 227, 220, 0.92);
    border-radius: 14px;
    background: rgba(255, 255, 252, 0.98);
    box-shadow: 0 22px 52px rgba(31, 78, 63, 0.14), 0 2px 8px rgba(31, 78, 63, 0.06);
    backdrop-filter: blur(18px);
}

.history-popover::before {
    position: absolute;
    top: -7px;
    right: 16px;
    width: 12px;
    height: 12px;
    border-top: 1px solid rgba(216, 227, 220, 0.92);
    border-left: 1px solid rgba(216, 227, 220, 0.92);
    background: rgba(255, 255, 252, 0.98);
    content: "";
    transform: rotate(45deg);
}

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

.history-head strong {
    color: #1b302c;
    font-size: 14px;
}

.history-head button {
    padding: 4px 8px;
    border: 0;
    border-radius: 999px;
    background: #f1f7f1;
    color: #526762;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.history-head button:hover,
.history-head button:focus-visible {
    background: #e6f6ea;
    color: var(--primary);
    outline: 0;
}

.history-list {
    display: grid;
    gap: 7px;
}

.history-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    min-height: 48px;
    padding: 8px;
    border: 1px solid rgba(225, 233, 228, 0.96);
    border-radius: 12px;
    background: rgba(247, 250, 246, 0.74);
}

.history-item:hover,
.history-item:focus-visible {
    border-color: rgba(158, 198, 181, 0.95);
    background: #fffefa;
    outline: 0;
}

.history-dot {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(202, 224, 214, 0.92);
    border-radius: 11px;
    background: linear-gradient(180deg, #f5fbf3, #edf7ef);
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.history-copy {
    min-width: 0;
}

.history-copy strong,
.history-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-copy strong {
    color: #172a26;
    font-size: 13px;
}

.history-copy small {
    margin-top: 2px;
    color: #7b8984;
    font-size: 11px;
}

.history-item time {
    color: #84928d;
    font-size: 11px;
    font-weight: 800;
}

.history-empty {
    margin: 8px 4px 4px;
    color: #7b8984;
    font-size: 13px;
}

.layout {
    display: grid;
    grid-template-columns: 276px minmax(0, 1fr);
    gap: 20px;
    padding: 6px 0 46px;
}

.floating-dock {
    margin: 0 0 18px;
}

.leftbar {
    position: sticky;
    top: 128px;
    align-self: start;
    display: grid;
    gap: 12px;
    max-height: calc(100vh - 148px);
    overflow: auto;
    padding-right: 2px;
}

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

@media (min-width: 1200px) {
    .page {
        width: min(1516px, calc(100% - 32px));
    }

    .layout {
        padding: 6px 88px 46px 0;
    }

    .floating-dock {
        position: fixed;
        top: 128px;
        right: max(16px, calc((100vw - 1516px) / 2));
        z-index: 18;
        width: 70px;
        max-height: calc(100vh - 152px);
        overflow: visible;
        margin: 0;
    }

    .site-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1501px) {
    .layout {
        grid-template-columns: 276px minmax(0, 1132px);
        padding-right: 88px;
    }

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

.finder {
    position: relative;
    display: grid;
    gap: 10px;
    overflow: hidden;
    min-height: 188px;
    padding: 24px 26px 22px;
    border: 1px solid rgba(220, 232, 223, 0.9);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.finder > * {
    position: relative;
    z-index: 1;
}

.finder-copy {
    max-width: 720px;
}

.quick-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    padding: 6px 11px;
    border: 1px solid #b9dfd4;
    border-radius: 999px;
    background: rgba(255, 253, 248, 0.9);
    color: #126a66;
    font-size: 13px;
    font-weight: 900;
}

.quick-pill::before {
    content: "K";
    font-size: 13px;
    font-weight: 900;
}

.finder h1 {
    margin: 0 0 6px;
    color: var(--primary-dark);
    font-size: 38px;
    line-height: 1;
    letter-spacing: 0;
}

.finder p {
    max-width: 700px;
    margin: 0;
    color: #536963;
    font-size: 14px;
}

.searchbar {
    display: grid;
    width: min(850px, 100%);
    grid-template-columns: minmax(0, 1fr) 48px;
    align-items: center;
    padding: 5px;
    border: 1px solid #b8ded0;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: none;
}

.searchbar input {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 14px;
    border: 0;
    outline: 0;
    color: var(--ink);
}

.searchbar button {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: var(--primary-dark);
    color: transparent;
    cursor: pointer;
    font-size: 0;
}

.searchbar button::before {
    color: #fff;
    content: "⌕";
    font-size: 24px;
    font-weight: 900;
}

.finder-notes,
.search-engines {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.finder-notes span,
.search-engines button {
    padding: 5px 9px;
    border: 1px solid #dfeae5;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    color: #60726f;
    font-size: 12px;
    font-weight: 900;
}

.search-engines button {
    cursor: pointer;
}

.search-engines button:hover,
.search-engines button:focus-visible,
.search-engines button.active {
    border-color: rgba(15, 119, 108, 0.24);
    background: #f1f7f1;
    color: var(--primary);
    outline: 0;
}

.panel,
.category-dock,
.submit-panel,
.side-card {
    border: 1px solid rgba(219, 232, 227, 0.9);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.category-dock,
.resources-panel {
    padding: 16px;
}

.category-dock {
    align-self: start;
}

.floating-dock {
    isolation: isolate;
    overflow: visible;
    padding: 9px 8px 11px;
    border-color: rgba(198, 223, 214, 0.78);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(249, 253, 247, 0.78)),
        rgba(255, 255, 252, 0.68);
    box-shadow:
        0 22px 52px rgba(31, 78, 63, 0.12),
        0 2px 8px rgba(31, 78, 63, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(18px) saturate(1.05);
}

.floating-dock::before {
    position: absolute;
    inset: 5px;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(237, 248, 234, 0.22));
    content: "";
}

.floating-dock .panel-head {
    justify-content: center;
    height: 24px;
    margin-bottom: 6px;
}

.floating-dock .panel-head h2 {
    gap: 0;
    font-size: 0;
}

.floating-dock .panel-head h2 span {
    width: 22px;
    height: 22px;
    border: 1px solid rgba(196, 224, 211, 0.68);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.56);
    color: #7daf9e;
    font-size: 12px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.resources-panel {
    margin-top: 12px;
}

.resources-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid rgba(213, 228, 221, 0.9);
    border-radius: var(--radius);
    background: rgba(247, 250, 246, 0.72);
    color: #5b6f69;
    font-size: 13px;
}

.resources-summary strong {
    color: var(--primary-dark);
    font-size: 14px;
}

.resources-summary span {
    color: var(--muted);
    font-size: 12px;
}

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

.panel-head h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-size: 18px;
    letter-spacing: 0;
}

.panel-head h2 span {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 8px;
    background: #e6f6ea;
    color: var(--primary);
    font-size: 13px;
}

.panel-head p,
.sticky-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.dock-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.floating-dock .dock-grid {
    position: relative;
    justify-items: center;
    padding: 2px 0;
}

.floating-dock .dock-grid::before {
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 50%;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(16, 119, 108, 0.12), transparent);
    content: "";
    transform: translateX(-50%);
}

.dock-grid button,
.dock-grid a {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    min-height: 64px;
    gap: 9px;
    padding: 10px;
    border: 1px solid #e5ede6;
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    text-align: left;
}

.dock-grid button:hover,
.dock-grid button.active,
.dock-grid a:hover,
.dock-grid a.active {
    border-color: #b8ded0;
    background: #f7fcf4;
    box-shadow: 0 10px 24px rgba(15, 119, 108, 0.1);
    transform: translateY(-1px);
}

.dock-grid span,
.site-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 8px;
    background: #edf8ea;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.dock-grid strong,
.dock-grid small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dock-grid strong {
    font-size: 14px;
}

.dock-grid small {
    grid-column: 2;
    color: var(--muted);
    font-size: 12px;
}

.floating-dock .dock-grid button,
.floating-dock .dock-grid a {
    position: relative;
    display: grid;
    width: 48px;
    min-height: 48px;
    height: 48px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0;
    padding: 6px;
    border-color: transparent;
    border-radius: 18px;
    background: transparent;
    text-align: center;
}

.floating-dock .dock-grid button:hover,
.floating-dock .dock-grid button.active,
.floating-dock .dock-grid a:hover,
.floating-dock .dock-grid a.active {
    border-color: rgba(183, 222, 208, 0.48);
    background: rgba(255, 255, 255, 0.74);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.94),
        0 10px 22px rgba(31, 78, 63, 0.08);
    transform: none;
}

.floating-dock .dock-grid button.active,
.floating-dock .dock-grid a.active {
    background: rgba(255, 255, 255, 0.88);
}

.floating-dock .dock-grid button::before,
.floating-dock .dock-grid a::before {
    position: absolute;
    top: 50%;
    left: -6px;
    width: 4px;
    height: 24px;
    border-radius: 999px;
    background: var(--primary);
    content: "";
    opacity: 0;
    transform: translateY(-50%) scaleY(0.5);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.floating-dock .dock-grid button.active::before,
.floating-dock .dock-grid a.active::before {
    opacity: 1;
    transform: translateY(-50%) scaleY(1);
}

.floating-dock .dock-grid button::after,
.floating-dock .dock-grid a::after {
    position: absolute;
    top: 50%;
    right: calc(100% + 11px);
    z-index: 32;
    max-width: 180px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(20, 61, 54, 0.94);
    color: #fff;
    content: attr(data-tip);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translate(4px, -50%);
    transition: opacity 0.16s ease, transform 0.16s ease;
    white-space: nowrap;
}

.floating-dock .dock-grid button:hover::after,
.floating-dock .dock-grid button:focus-visible::after,
.floating-dock .dock-grid a:hover::after,
.floating-dock .dock-grid a:focus-visible::after {
    opacity: 1;
    transform: translate(0, -50%);
}

.floating-dock .dock-grid span {
    position: relative;
    z-index: 1;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(205, 231, 219, 0.78);
    border-radius: 999px;
    background: rgba(241, 249, 237, 0.9);
    color: #157268;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.74),
        inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.floating-dock .dock-grid span svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.floating-dock .dock-grid button.active span,
.floating-dock .dock-grid a.active span {
    background: var(--primary-dark);
    border-color: rgba(255, 255, 255, 0.36);
    color: #fff;
    box-shadow:
        0 7px 16px rgba(20, 61, 54, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.sticky-head {
    align-items: flex-start;
}

.category-pills {
    display: none;
    gap: 6px;
    margin: -4px 0 14px;
    max-width: 100%;
    overflow-x: auto;
    padding: 2px 2px 8px;
}

.category-pills button,
.category-pills a {
    padding: 5px 9px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #586d69;
    cursor: pointer;
    font-size: 13px;
}

.category-pills button:hover,
.category-pills button.active,
.category-pills a:hover,
.category-pills a.active {
    background: #e6f6ea;
    color: var(--primary);
    font-weight: 900;
}

.resource-list {
    display: grid;
    gap: 20px;
}

.resource-group {
    display: grid;
    gap: 8px;
    scroll-margin-top: clamp(112px, 20vh, 190px);
}

.channel-icon {
    display: inline-grid;
    flex: 0 0 auto;
    width: 25px;
    height: 25px;
    place-items: center;
    margin-right: 7px;
    border: 1px solid #cfe5d8;
    border-radius: 8px;
    background: #f2fbf0;
    color: var(--primary);
    vertical-align: -6px;
}

.channel-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.pill-channel-icon {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    border-radius: 7px;
    vertical-align: -5px;
}

.pill-channel-icon svg {
    width: 13px;
    height: 13px;
}

.crumb-channel-icon,
.eyebrow-channel-icon,
.meta-channel-icon {
    width: 20px;
    height: 20px;
    margin-right: 5px;
    border-radius: 7px;
    vertical-align: -5px;
}

.crumb-channel-icon svg,
.eyebrow-channel-icon svg,
.meta-channel-icon svg {
    width: 13px;
    height: 13px;
}

.heading-channel-icon {
    width: 42px;
    height: 42px;
    margin-right: 10px;
    border-radius: 13px;
    vertical-align: -9px;
}

.heading-channel-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.8;
}

.group-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.group-title h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.group-title h3 a {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px 3px 3px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--ink);
}

.group-title h3 a:hover,
.group-title h3 a:focus-visible {
    border-color: #c9e6d8;
    background: #f3fbf1;
    color: var(--primary-dark);
    outline: 0;
}

.group-title h3 a::after {
    margin-left: 6px;
    color: #7b928b;
    content: "›";
    font-size: 18px;
    font-weight: 900;
    opacity: 0;
    transform: translateX(-2px);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.group-title h3 a:hover::after,
.group-title h3 a:focus-visible::after {
    opacity: 1;
    transform: translateX(0);
}

.group-title h3 a .channel-icon {
    width: 34px;
    height: 34px;
    margin-right: 8px;
    border-radius: 11px;
}

.group-title h3 a .channel-icon svg {
    width: 20px;
    height: 20px;
}

.group-title nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #60726f;
    font-size: 13px;
}

.subcat-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.subcat-strip button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #315d57;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
}

.subcat-strip button:hover,
.subcat-strip button.active {
    background: #e6f6ea;
    color: var(--primary);
}

.subcat-strip small {
    display: grid;
    min-width: 16px;
    height: 16px;
    place-items: center;
    border-radius: 999px;
    background: #fff;
    color: var(--primary);
    font-size: 10px;
    line-height: 1;
}

.subcat-sections {
    display: grid;
    gap: 0;
    overflow-anchor: none;
}

.subcat-section {
    display: grid;
    gap: 0;
    overflow-anchor: none;
    scroll-margin-top: clamp(112px, 20vh, 190px);
}

.subcat-title {
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 22px;
}

.is-searching .subcat-title {
    display: flex;
    margin-bottom: 6px;
}

.subcat-title h4 {
    margin: 0;
    color: #233934;
    font-size: 14px;
}

.subcat-title h4::before {
    display: inline-block;
    width: 5px;
    height: 14px;
    margin-right: 6px;
    border-radius: 999px;
    background: var(--lime);
    vertical-align: -2px;
    content: "";
}

.subcat-title span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.site-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

@media (min-width: 1200px) and (max-width: 1500px) {
    .site-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1501px) {
    .site-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.site-card a {
    position: relative;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: auto auto;
    height: 62px;
    min-height: 62px;
    gap: 3px 8px;
    padding: 7px 8px;
    border: 1px solid #e5ede6;
    border-radius: var(--radius);
    background: #fff;
}

.site-card a:hover,
.site-card a:focus-visible {
    z-index: 12;
    border-color: #b8ded0;
    box-shadow: 0 7px 16px rgba(15, 119, 108, 0.08);
    outline: 0;
    transform: translateY(-1px);
}

.ku-score::after,
.link-status::after {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    z-index: 30;
    width: max-content;
    max-width: 260px;
    padding: 7px 9px;
    border: 1px solid #cde2d8;
    border-radius: 7px;
    background: #21322e;
    color: #fff;
    content: attr(data-tip);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.14s ease, transform 0.14s ease;
    white-space: normal;
}

.ku-score::before,
.link-status::before {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 3px);
    z-index: 21;
    border: 5px solid transparent;
    border-top-color: #21322e;
    content: "";
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.ku-score:hover::before,
.ku-score:hover::after,
.ku-score:focus-visible::before,
.ku-score:focus-visible::after,
.link-status:hover::before,
.link-status:hover::after,
.link-status:focus-visible::before,
.link-status:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.site-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #effbea, #eef7ff);
    font-size: 10px;
}

.site-copy {
    min-width: 0;
}

.site-copy strong,
.site-copy small,
.site-meta,
.site-card em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-copy strong {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0;
    color: #1d2d2a;
    font-size: 13px;
    line-height: 1.15;
    white-space: nowrap;
}

.site-copy strong b {
    display: none;
}

.site-copy strong span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-copy small {
    display: block;
    margin-top: 1px;
    color: #6e807d;
    font-size: 11px;
    line-height: 1.15;
    white-space: nowrap;
}

.site-meta {
    display: flex;
    grid-column: 2;
    min-width: 0;
    align-items: center;
    gap: 5px;
    overflow: visible;
    white-space: nowrap;
}

.site-tags {
    display: flex;
    flex: 0 0 auto;
    gap: 2px;
    overflow: visible;
    max-width: none;
}

.ku-score {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    height: 16px;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1px solid #dfead4;
    border-radius: 5px;
    background: #fffaf0;
    color: #8a6a12;
    cursor: help;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

.link-status {
    position: relative;
    display: inline-flex;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
    border: 1px solid #efd7b0;
    border-radius: 5px;
    background: #fff4df;
    color: #a76708;
    cursor: help;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

.tag-icon {
    position: relative;
    display: inline-flex;
    flex: 0 0 16px;
    width: 16px;
    min-width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8e8df;
    border-radius: 5px;
    background: #f7fbf8;
    color: #347066;
    cursor: help;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
}

.tag-icon::after {
    position: absolute;
    right: 50%;
    bottom: calc(100% + 7px);
    z-index: 30;
    width: max-content;
    max-width: 120px;
    padding: 5px 7px;
    border-radius: 6px;
    background: #21322e;
    color: #fff;
    content: attr(data-tip);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    opacity: 0;
    pointer-events: none;
    transform: translateX(50%) translateY(3px);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.tag-icon::before {
    position: absolute;
    right: 50%;
    bottom: calc(100% + 3px);
    z-index: 31;
    border: 4px solid transparent;
    border-top-color: #21322e;
    content: "";
    opacity: 0;
    pointer-events: none;
    transform: translateX(50%) translateY(3px);
    transition: opacity 0.14s ease, transform 0.14s ease;
}

.tag-icon:hover,
.tag-icon:focus-visible {
    z-index: 20;
    border-color: #b8ded0;
    background: #e6f6ea;
    color: var(--primary);
    outline: 0;
}

.tag-icon:hover::before,
.tag-icon:hover::after,
.tag-icon:focus-visible::before,
.tag-icon:focus-visible::after {
    opacity: 1;
    transform: translateX(50%) translateY(0);
}

.site-card em {
    flex: 0 1 auto;
    max-width: 76px;
    color: #8a9996;
    font-size: 9px;
    font-style: normal;
    white-space: nowrap;
}

.empty-state {
    padding: 38px;
    border: 1px dashed #bfd8cf;
    border-radius: var(--radius);
    background: #fbfefc;
    color: var(--muted);
    text-align: center;
}

.empty-state strong {
    display: block;
    color: var(--ink);
    font-size: 18px;
}

.empty-state p {
    margin: 6px 0 0;
}

.submit-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 22px 26px;
}

.submit-panel h2 {
    margin: 0 0 5px;
    font-size: 20px;
}

.submit-panel p {
    margin: 0;
    color: var(--muted);
}

code {
    padding: 2px 5px;
    border-radius: 5px;
    background: #eaf8ed;
    color: var(--primary);
}

.submit-panel a {
    flex: 0 0 auto;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--primary-dark);
    color: #fff;
    font-weight: 900;
}

.site-footer {
    display: grid;
    gap: 6px;
    margin: 18px 0 36px;
    padding: 14px 2px 0;
    border-top: 1px solid rgba(199, 218, 210, 0.75);
    color: #71827d;
    font-size: 12px;
    line-height: 1.7;
}

.site-footer strong {
    color: var(--primary-dark);
    font-size: 13px;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: var(--primary);
    font-weight: 800;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: var(--primary-dark);
    text-decoration: underline;
    outline: 0;
}

.detail-footer {
    margin-top: 22px;
    margin-bottom: 0;
}

.rightbar {
    order: -1;
    display: grid;
    gap: 12px;
}

.side-card {
    padding: 14px;
}

.radar-card {
    background: var(--surface);
}

.side-card h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.hub-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.hub-stats span {
    display: grid;
    gap: 2px;
    padding: 10px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
    color: #526965;
    font-size: 12px;
}

.hub-stats strong {
    color: var(--primary);
    font-size: 24px;
    line-height: 1;
}

.radar-card p,
.note-card p {
    margin: 0;
    color: #5c706c;
    font-size: 13px;
}

.rank-list {
    display: grid;
    gap: 8px;
}

.rank-list a {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    min-height: 36px;
    gap: 8px;
    padding: 7px 8px;
    border-radius: var(--radius);
    background: #f7fbf8;
}

.rank-list a:hover {
    background: #e6f6ea;
}

.rank-list span {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 7px;
    background: #fff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.rank-list strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.accent-card {
    background: var(--surface);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-cloud button {
    padding: 6px 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    color: #4f625e;
    cursor: pointer;
    font-size: 12px;
}

.tag-cloud button:hover {
    background: #fff;
    color: var(--primary);
}

.note-card {
    background: var(--surface);
}

.detail-body {
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(15, 119, 108, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, #fbfcf7 0, #eef3ec 100%);
    background-size: 96px 96px, auto;
}

.detail-rail {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 24;
    display: grid;
    width: 86px;
    grid-template-rows: auto 1fr;
    gap: 20px;
    padding: 18px 14px;
    border-right: 1px solid #dfe9e2;
    background: rgba(255, 253, 248, 0.9);
    backdrop-filter: blur(14px);
}

.detail-rail-brand {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 2px solid var(--primary-dark);
    border-radius: 13px 13px 13px 5px;
    background: var(--lime);
    color: var(--primary-dark);
    font-size: 20px;
    font-weight: 900;
    transform: rotate(-4deg);
}

.detail-rail nav {
    display: grid;
    align-content: start;
    gap: 8px;
}

.detail-rail nav a {
    position: relative;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 14px;
    color: #596d68;
}

.detail-rail nav a:hover,
.detail-rail nav a:focus-visible,
.detail-rail nav a.active {
    border-color: #c8e3d6;
    background: #f3fbf1;
    color: var(--primary);
    outline: 0;
}

.detail-rail nav a.active {
    background: var(--primary-dark);
    color: #fff;
}

.detail-rail nav span {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 10px;
    background: rgba(230, 246, 234, 0.72);
    font-size: 12px;
    font-weight: 900;
}

.detail-rail nav a.active span {
    background: transparent;
}

.detail-shell {
    width: min(1120px, calc(100% - 136px));
    margin: 0 auto;
    padding: 34px 0 56px 86px;
}

.detail-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 0 0 14px;
    color: #64766f;
    font-size: 13px;
    font-weight: 800;
}

.detail-crumbs a:hover {
    color: var(--primary);
}

.detail-crumbs a,
.detail-crumbs strong {
    display: inline-flex;
    align-items: center;
}

.detail-crumbs strong {
    overflow: hidden;
    max-width: min(360px, 100%);
    color: var(--ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 18px;
    align-items: start;
}

.detail-main {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.detail-sidebar {
    position: sticky;
    top: 22px;
    display: grid;
    gap: 12px;
    min-width: 0;
}

.detail-panel {
    border: 1px solid rgba(219, 232, 227, 0.95);
    border-radius: var(--radius);
    background: rgba(255, 253, 248, 0.96);
    box-shadow: var(--shadow);
}

.detail-hero {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding: 28px;
    border-top: 4px solid var(--primary-dark);
}

.detail-icon {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(135deg, #e8f8e7, #e8f5ff);
    color: var(--primary);
    font-size: 20px;
    font-weight: 900;
}

.detail-heading {
    min-width: 0;
}

.detail-eyebrow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 0 7px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.detail-heading h1,
.not-found-panel h1 {
    margin: 0;
    color: var(--primary-dark);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.05;
    letter-spacing: 0;
}

.detail-heading p:not(.detail-eyebrow) {
    margin: 8px 0 0;
    color: #5a6d68;
    font-size: 15px;
}

.detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.detail-badges span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 8px;
    border: 1px solid #d9eadc;
    border-radius: 999px;
    background: #f6fbf4;
    color: #2d665e;
    font-size: 12px;
    font-weight: 900;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.visit-button,
.copy-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 900;
    line-height: 1;
}

.visit-button {
    border: 1px solid var(--primary-dark);
    background: var(--primary-dark);
    color: #fff;
}

.visit-button:hover,
.visit-button:focus-visible {
    background: #0c5f55;
    outline: 0;
}

.copy-button {
    border: 1px solid #cfe3d9;
    background: #fff;
    color: #315d57;
}

.copy-button:hover,
.copy-button:focus-visible {
    border-color: #b8ded0;
    background: #f3fbf1;
    outline: 0;
}

.detail-section {
    padding: 24px 28px;
}

.detail-section h2,
.detail-sidebar h2 {
    margin: 0 0 12px;
    color: #223833;
    font-size: 18px;
    line-height: 1.2;
}

.detail-section p {
    margin: 0;
    color: #51645e;
    font-size: 15px;
}

.detail-section p + p {
    margin-top: 10px;
}

.detail-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.detail-facts div {
    display: grid;
    gap: 5px;
    min-height: 72px;
    padding: 12px;
    border: 1px solid #e2ece5;
    border-radius: var(--radius);
    background: #fbfefb;
}

.detail-facts span,
.detail-meta-list dt {
    color: #73837e;
    font-size: 12px;
    font-weight: 800;
}

.detail-facts strong,
.detail-meta-list dd {
    margin: 0;
    color: #203431;
    font-size: 14px;
    font-weight: 900;
}

.detail-note-box {
    padding: 16px 18px;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    background: #f7fbf8;
}

.detail-note-box + .detail-note-box {
    margin-top: 10px;
}

.detail-note-box.muted {
    border-left-color: #f0d36c;
    background: #fffaf0;
}

.detail-note-box h3 {
    margin: 0 0 8px;
    color: #243934;
    font-size: 15px;
}

.detail-note-box ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding-left: 18px;
    color: #526762;
}

.kuhub-content-panel {
    scroll-margin-top: 128px;
}

.kuhub-article-panel {
    padding: 30px 34px;
}

.kuhub-article-panel > h2 {
    position: relative;
    padding-left: 16px;
}

.kuhub-article-panel > h2::before,
.kuhub-article-block h3::before {
    position: absolute;
    left: 0;
    top: 0.15em;
    width: 5px;
    height: 1.1em;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    content: "";
}

.kuhub-article-lead {
    margin-top: 14px !important;
    color: #3f514c !important;
    font-size: 16px !important;
    line-height: 1.9;
}

.kuhub-article-body {
    display: grid;
    gap: 28px;
    margin-top: 26px;
}

.kuhub-article-block {
    position: relative;
    display: grid;
    gap: 12px;
}

.kuhub-article-block h3 {
    position: relative;
    margin: 0;
    padding-left: 16px;
    color: #203431;
    font-size: 18px;
    line-height: 1.3;
}

.kuhub-article-block p {
    color: #526762;
    font-size: 15px;
    line-height: 1.9;
}

.kuhub-article-block ul,
.kuhub-article-block ol {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 22px;
    color: #526762;
    font-size: 15px;
    line-height: 1.8;
}

.kuhub-article-block li::marker {
    color: var(--primary);
    font-weight: 900;
}

.kuhub-article-entry-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.kuhub-article-entry-grid div {
    display: grid;
    gap: 8px;
    min-height: 122px;
    padding: 16px;
    border: 1px solid #e2ece5;
    border-radius: 12px;
    background: #f7fbf8;
}

.kuhub-article-entry-grid strong {
    color: #203431;
    font-size: 15px;
}

.kuhub-article-entry-grid span {
    color: #526762;
    font-size: 14px;
    line-height: 1.75;
}

.kuhub-notes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.kuhub-note-card {
    min-height: 168px;
    padding: 16px;
    border: 1px solid #e2ece5;
    border-radius: 12px;
    background: rgba(255, 255, 252, 0.72);
}

.kuhub-note-card h3 {
    margin: 0 0 10px;
    color: #1e3430;
    font-size: 15px;
}

.kuhub-note-card ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
    color: #526762;
    font-size: 14px;
}

.kuhub-source-note {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 16px !important;
    color: #6b7d78 !important;
    font-size: 13px !important;
}

.inline-copy-button {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    padding: 5px 9px;
    border: 1px solid #cfe3d9;
    border-radius: 999px;
    background: #fff;
    color: #315d57;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.inline-copy-button:hover,
.inline-copy-button:focus-visible {
    border-color: #b8ded0;
    background: #f3fbf1;
    outline: 0;
}

.detail-sidebar .detail-panel {
    padding: 18px;
}

.detail-meta-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.detail-meta-list div {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
}

.detail-meta-list dd {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-meta-list dd.channel-meta-name {
    display: flex;
    min-width: 0;
    align-items: center;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.related-list {
    display: grid;
    gap: 8px;
}

.related-list a {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 1px 8px;
    align-items: center;
    min-height: 48px;
    padding: 8px;
    border: 1px solid #e5ede6;
    border-radius: var(--radius);
    background: #fff;
}

.related-list a:hover,
.related-list a:focus-visible {
    border-color: #b8ded0;
    background: #f7fcf4;
    outline: 0;
}

.related-list span {
    display: grid;
    width: 30px;
    height: 30px;
    grid-row: 1 / 3;
    place-items: center;
    border-radius: 9px;
    background: #edf8ea;
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
}

.related-list strong,
.related-list small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-list strong {
    color: #1d2d2a;
    font-size: 13px;
}

.related-list small {
    color: #7a8a86;
    font-size: 11px;
}

.not-found-panel {
    max-width: 640px;
    margin: 12vh auto 0;
    padding: 34px;
}

.not-found-panel p:not(.detail-eyebrow) {
    margin: 10px 0 22px;
    color: #5d706b;
}

.category-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 16% 8%, rgba(215, 244, 108, 0.18), transparent 25%),
        linear-gradient(180deg, #fbfcf7 0, #eef3ec 100%);
}

.category-shell {
    width: min(1180px, calc(100% - 136px));
    margin: 0 auto;
    padding: 34px 0 56px 86px;
}

.category-hero {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 28px;
    border-top: 4px solid var(--primary-dark);
}

.category-hero h1 {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
    color: var(--primary-dark);
    font-size: clamp(34px, 4.5vw, 52px);
    line-height: 1;
    letter-spacing: 0;
}

.category-hero p:not(.detail-eyebrow) {
    margin: 9px 0 0;
    color: #586c66;
}

.category-subnav {
    position: sticky;
    top: 12px;
    z-index: 18;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 12px 0;
    padding: 10px;
    background: rgba(255, 253, 248, 0.9);
    backdrop-filter: blur(12px);
}

.category-subnav a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #315d57;
    font-size: 13px;
    font-weight: 900;
}

.category-subnav a:hover,
.category-subnav a:focus-visible {
    background: #e6f6ea;
    color: var(--primary);
    outline: 0;
}

.category-subnav small {
    display: grid;
    min-width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 999px;
    background: #fff;
    color: var(--primary);
    font-size: 10px;
    line-height: 1;
}

.category-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 282px;
    gap: 18px;
    align-items: start;
}

.category-main {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.category-subcat {
    display: grid;
    gap: 12px;
    padding: 20px;
    scroll-margin-top: 92px;
}

.category-subcat-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.category-subcat-head h2 {
    margin: 0;
    color: #223833;
    font-size: 19px;
    line-height: 1.2;
}

.category-subcat-head p {
    margin: 4px 0 0;
    color: #6d7f79;
    font-size: 13px;
}

.category-site-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.category-sidebar {
    position: sticky;
    top: 84px;
    display: grid;
    gap: 12px;
    min-width: 0;
}

.category-sidebar .detail-panel {
    padding: 18px;
}

/* KuHub visual refresh */
body,
.detail-body,
.category-body {
    background:
        linear-gradient(180deg, rgba(255, 255, 252, 0.96) 0, rgba(247, 249, 245, 0.98) 360px, #f3f6f2 100%);
}

body::before,
.detail-body::before,
.category-body::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(18, 60, 54, 0.025) 1px, transparent 1px),
        linear-gradient(180deg, rgba(18, 60, 54, 0.02) 1px, transparent 1px);
    background-size: 72px 72px;
    content: "";
    pointer-events: none;
}

.topbar {
    padding: 14px 0;
    border-bottom: 1px solid rgba(220, 231, 224, 0.72);
    background: rgba(247, 249, 245, 0.86);
    box-shadow: 0 8px 26px rgba(38, 66, 58, 0.035);
}

.brand-mark span,
.detail-rail-brand {
    border: 1px solid rgba(18, 60, 54, 0.9);
    border-radius: 13px;
    background: linear-gradient(135deg, #e2f76f, #cdec5d);
    box-shadow: 0 8px 18px rgba(18, 60, 54, 0.12);
    transform: none;
}

.brand-mark strong {
    color: #182b27;
    font-size: 23px;
}

.brand-mark small {
    color: #72807b;
    letter-spacing: 0;
}

.top-actions a,
.history-trigger {
    border-color: rgba(210, 224, 216, 0.88);
    background: rgba(255, 255, 252, 0.82);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.88);
    color: #445a55;
}

.top-actions a:hover,
.top-actions a:focus-visible,
.history-trigger:hover,
.history-trigger:focus-visible,
.history-menu.open .history-trigger {
    border-color: rgba(158, 198, 181, 0.9);
    background: #fffefa;
    color: var(--primary-dark);
    outline: 0;
}

.top-actions a[href="#submit"],
.visit-button,
.submit-panel a {
    background: linear-gradient(180deg, #174d45, #123c36);
    box-shadow: 0 10px 22px rgba(18, 60, 54, 0.18);
}

.finder,
.panel,
.category-dock,
.submit-panel,
.side-card,
.detail-panel {
    border: 1px solid rgba(216, 227, 220, 0.86);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 252, 0.98), rgba(253, 252, 248, 0.96));
    box-shadow: var(--shadow-soft);
}

.finder {
    gap: 14px;
    min-height: 206px;
    padding: 30px 34px 28px;
}

.quick-pill,
.finder-notes span,
.search-engines button,
.detail-badges span,
.detail-tags span {
    border-color: rgba(211, 225, 217, 0.9);
    background: rgba(255, 255, 252, 0.76);
    color: #49635d;
}

.search-engines button:hover,
.search-engines button:focus-visible,
.search-engines button.active {
    border-color: rgba(15, 119, 108, 0.24);
    background: #f1f7f1;
    color: var(--primary);
}

.quick-pill {
    margin-bottom: 6px;
    color: var(--primary);
}

.finder h1,
.detail-heading h1,
.not-found-panel h1,
.category-hero h1 {
    color: #102f2a;
    letter-spacing: 0;
}

.finder h1 {
    font-size: clamp(40px, 5vw, 56px);
}

.finder p,
.category-hero p:not(.detail-eyebrow),
.detail-heading p:not(.detail-eyebrow),
.detail-section p,
.radar-card p,
.note-card p {
    color: #60736d;
}

.searchbar {
    width: min(900px, 100%);
    padding: 6px;
    border-color: rgba(177, 211, 197, 0.86);
    border-radius: 16px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(18, 60, 54, 0.035);
}

.searchbar input {
    height: 42px;
    font-size: 15px;
}

.searchbar button {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(180deg, #174d45, #123c36);
    box-shadow: 0 8px 18px rgba(18, 60, 54, 0.16);
}

.category-dock,
.resources-panel {
    padding: 20px;
}

.resources-panel {
    margin-top: 14px;
}

.panel-head {
    margin-bottom: 16px;
}

.panel-head h2 {
    color: #1b302c;
    font-size: 18px;
}

.panel-head h2 span,
.channel-icon,
.detail-icon,
.site-icon,
.related-list span {
    border: 1px solid rgba(202, 224, 214, 0.92);
    background: linear-gradient(180deg, #f5fbf3, #edf7ef);
    color: var(--primary);
}

.resource-list {
    gap: 24px;
}

.resource-group {
    gap: 10px;
}

.group-title {
    gap: 14px;
}

.group-title h3 {
    font-size: 23px;
}

.group-title h3 a {
    border-radius: 14px;
}

.group-title h3 a:hover,
.group-title h3 a:focus-visible {
    background: #f8fbf6;
}

.group-title nav {
    color: #73817c;
}

.subcat-strip {
    gap: 7px;
}

.subcat-strip button {
    padding: 4px 9px;
    color: #46635d;
    font-weight: 800;
}

.subcat-strip button:hover,
.subcat-strip button.active,
.category-pills button:hover,
.category-pills button.active,
.category-pills a:hover,
.category-pills a.active,
.category-subnav a:hover,
.category-subnav a:focus-visible {
    background: #f1f7f1;
    color: var(--primary);
}

.subcat-strip button.active {
    box-shadow: inset 0 0 0 1px rgba(15, 119, 108, 0.12);
}

.site-grid {
    gap: 10px;
}

.site-card a,
.related-list a {
    border-color: rgba(225, 233, 228, 0.96);
    border-radius: 12px;
    background: rgba(255, 255, 252, 0.96);
    box-shadow: 0 1px 0 rgba(18, 60, 54, 0.035);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.site-card a:hover,
.site-card a:focus-visible,
.related-list a:hover,
.related-list a:focus-visible {
    border-color: rgba(158, 198, 181, 0.95);
    background: #fffefa;
    box-shadow: 0 10px 24px rgba(38, 66, 58, 0.09);
}

.site-icon {
    border-radius: 10px;
}

.site-copy strong {
    color: #172a26;
}

.site-copy small,
.site-card em,
.related-list small {
    color: #7b8984;
}

.ku-score {
    border-color: #eadfb6;
    background: #fff8df;
    color: #80640e;
}

.tag-icon {
    border-color: #dce9e1;
    background: #f8fbf8;
    color: #416d64;
}

.tag-icon:hover,
.tag-icon:focus-visible {
    background: #eef7f0;
}

.side-card {
    padding: 18px;
}

.side-card h3 {
    color: #1b302c;
}

.hub-stats span,
.rank-list a {
    background: rgba(247, 250, 246, 0.82);
}

.hub-stats strong {
    color: var(--primary);
}

.rank-list a:hover {
    background: #f1f7f1;
}

.rank-list span {
    background: #fffefa;
}

.tag-cloud button {
    border: 1px solid transparent;
    background: rgba(247, 250, 246, 0.82);
}

.tag-cloud button:hover {
    border-color: rgba(202, 224, 214, 0.88);
    background: #fffefa;
}

.submit-panel {
    margin-top: 22px;
    padding: 24px 28px;
}

.detail-rail {
    border-right-color: rgba(216, 227, 220, 0.86);
    background: rgba(255, 255, 252, 0.88);
    box-shadow: 10px 0 34px rgba(38, 66, 58, 0.045);
}

.detail-rail nav a:hover,
.detail-rail nav a:focus-visible,
.detail-rail nav a.active {
    border-color: rgba(176, 210, 196, 0.9);
    background: #f8fbf6;
}

.detail-rail nav a.active {
    background: linear-gradient(180deg, #174d45, #123c36);
}

.detail-shell,
.category-shell {
    padding-top: 40px;
}

.detail-crumbs {
    color: #72817c;
}

.detail-hero,
.category-hero {
    border-top: 0;
    padding: 32px;
}

.detail-icon {
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.detail-eyebrow {
    color: var(--primary);
}

.detail-badges {
    gap: 8px;
}

.detail-section,
.category-subcat {
    padding: 26px 28px;
}

.detail-section h2,
.detail-sidebar h2,
.category-subcat-head h2 {
    color: #1b302c;
}

.detail-facts div {
    border-color: rgba(225, 233, 228, 0.96);
    border-radius: 12px;
    background: #fffefa;
}

.detail-note-box {
    border-left-width: 3px;
    background: #f8fbf7;
}

.category-subnav {
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.category-subnav a {
    color: #49635d;
}

.category-subcat-head {
    align-items: flex-start;
}

.resources-panel {
    padding: 4px 0 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.resources-panel > .panel-head {
    margin-bottom: 20px;
    padding: 0 2px;
}

.resources-panel > .panel-head h2 span {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: #f4faf2;
}

.resource-list {
    gap: 34px;
}

.resource-group {
    position: relative;
    gap: 13px;
    padding: 0 0 28px;
}

.resource-group:not(:last-child)::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(196, 216, 207, 0.82), transparent);
    content: "";
}

.group-title {
    min-height: 40px;
}

.group-title h3 a {
    padding: 2px 8px 2px 2px;
}

.subcat-strip {
    margin-top: -2px;
}

.site-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 12px;
}

.category-site-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
}

.site-card a {
    height: 70px;
    min-height: 70px;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 4px 10px;
    padding: 9px 11px;
}

.site-icon {
    width: 34px;
    height: 34px;
}

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

.site-copy small {
    margin-top: 2px;
    font-size: 12px;
}

.site-card em {
    max-width: 128px;
    font-size: 10px;
}

@media (min-width: 1501px) {
    .site-grid {
        grid-template-columns: repeat(3, minmax(260px, 1fr));
    }

    .category-site-grid {
        grid-template-columns: repeat(3, minmax(230px, 1fr));
    }
}

@media (max-width: 1199px) {
    .resources-panel {
        padding: 18px;
        border: 1px solid rgba(216, 227, 220, 0.86);
        background: linear-gradient(180deg, rgba(255, 255, 252, 0.98), rgba(253, 252, 248, 0.96));
        box-shadow: var(--shadow-soft);
    }
}

@media (min-width: 1200px) {
    .leftbar {
        position: fixed;
        top: 128px;
        left: max(16px, calc((100vw - 1516px) / 2));
        z-index: 17;
        width: 276px;
        max-height: calc(100vh - 152px);
        padding-right: 4px;
        overscroll-behavior: contain;
    }

    .main-column {
        grid-column: 2;
    }

    .leftbar {
        scrollbar-width: thin;
        scrollbar-color: rgba(18, 60, 54, 0.18) transparent;
    }
}

@media (max-width: 760px) {
    .finder {
        padding: 24px 18px 22px;
    }

    .finder h1 {
        font-size: 40px;
    }

    .category-dock,
    .resources-panel {
        padding: 18px;
    }

    .detail-rail {
        box-shadow: 0 8px 24px rgba(38, 66, 58, 0.05);
    }

    .detail-shell,
    .category-shell {
        padding-top: 18px;
    }

    .detail-hero,
    .category-hero,
    .detail-section,
    .category-subcat {
        padding: 20px;
    }

    .kuhub-notes-grid {
        grid-template-columns: 1fr;
    }

    .site-grid {
        gap: 8px;
    }
}

[hidden] {
    display: none !important;
}

@media (max-width: 1199px) {
    .floating-dock {
        display: none;
    }

    .category-pills {
        display: flex;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
}

@media (max-width: 1100px) {
    .layout {
        grid-template-columns: 248px minmax(0, 1fr);
    }

    .leftbar {
        position: static;
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

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

    .detail-shell {
        width: min(100% - 34px, 980px);
        padding-left: 86px;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .category-shell {
        width: min(100% - 34px, 980px);
        padding-left: 86px;
    }

    .category-layout {
        grid-template-columns: 1fr;
    }

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

    .category-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-sidebar .detail-panel:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .page {
        width: min(100% - 24px, 1220px);
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .top-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .top-actions a {
        flex: 1 1 0;
        text-align: center;
    }

    .history-menu {
        margin-left: auto;
    }

    .history-popover {
        right: 0;
    }

    .finder {
        min-height: 0;
        padding: 28px 16px 22px;
    }

    .finder::after {
        display: none;
    }

    .finder h1 {
        font-size: 36px;
    }

    .category-dock,
    .resources-panel {
        padding: 18px;
    }

    .main-column {
        order: 1;
    }

    .leftbar {
        order: 2;
    }

    .panel-head,
    .sticky-head,
    .submit-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-pills {
        max-width: 100%;
    }

    .layout,
    .rightbar,
    .site-grid,
    .dock-grid {
        grid-template-columns: 1fr;
    }

    .submit-panel a {
        width: 100%;
        text-align: center;
    }

    .detail-body {
        background-size: 80px 80px, auto;
    }

    .detail-rail {
        position: sticky;
        top: 0;
        width: 100%;
        height: auto;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
        border-right: 0;
        border-bottom: 1px solid #dfe9e2;
    }

    .detail-rail-brand {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .detail-rail nav {
        display: flex;
        gap: 7px;
        overflow-x: auto;
        padding: 2px 0;
    }

    .detail-rail nav a {
        flex: 0 0 auto;
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .detail-rail nav span {
        width: 28px;
        height: 28px;
    }

    .detail-shell {
        width: min(100% - 24px, 760px);
        padding: 18px 0 42px;
    }

    .category-shell {
        width: min(100% - 24px, 760px);
        padding: 18px 0 42px;
    }

    .detail-crumbs strong {
        max-width: 210px;
    }

    .detail-hero {
        grid-template-columns: 48px minmax(0, 1fr);
        padding: 20px;
    }

    .category-hero {
        grid-template-columns: 48px minmax(0, 1fr);
        padding: 20px;
    }

    .detail-icon {
        width: 48px;
        height: 48px;
        border-radius: 13px;
        font-size: 17px;
    }

    .detail-heading h1,
    .not-found-panel h1,
    .category-hero h1 {
        font-size: 30px;
    }

    .category-subnav {
        position: static;
        flex-wrap: nowrap;
        overflow-x: auto;
        margin: 10px 0;
    }

    .category-subnav a {
        flex: 0 0 auto;
    }

    .category-subcat {
        padding: 18px;
        scroll-margin-top: 86px;
    }

    .detail-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .visit-button,
    .copy-button {
        flex: 1 1 140px;
    }

    .detail-section {
        padding: 20px;
    }

    .detail-facts,
    .kuhub-article-entry-grid,
    .detail-sidebar,
    .category-site-grid,
    .category-sidebar {
        grid-template-columns: 1fr;
    }

    .kuhub-article-panel {
        padding: 22px 20px;
    }
}

@media (max-width: 460px) {
    .brand-mark strong {
        font-size: 20px;
    }

    .finder p {
        font-size: 14px;
    }

    .searchbar {
        grid-template-columns: minmax(0, 1fr) 48px;
    }

    .group-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .detail-hero {
        grid-template-columns: 1fr;
    }

    .category-hero {
        grid-template-columns: 1fr;
    }

    .detail-crumbs {
        font-size: 12px;
    }

    .detail-crumbs strong {
        max-width: 100%;
    }

    .detail-meta-list div {
        grid-template-columns: 58px minmax(0, 1fr);
    }
}

/* KuHub calm UI pass: reduce background noise, keep green for actions, and make resources lead. */
:root {
    --page: #f7f7f4;
    --surface: #ffffff;
    --surface-soft: #f8f9f6;
    --line: #e3e8e3;
    --primary: #0f756b;
    --primary-dark: #153d37;
    --shadow: 0 1px 2px rgba(31, 52, 47, 0.035), 0 12px 30px rgba(31, 52, 47, 0.055);
    --shadow-soft: 0 1px 2px rgba(31, 52, 47, 0.03), 0 10px 24px rgba(31, 52, 47, 0.045);
}

body,
.detail-body,
.category-body {
    background: linear-gradient(180deg, #fbfbf8 0, #f7f7f4 360px, #f4f5f1 100%);
}

body::before,
.detail-body::before,
.category-body::before {
    opacity: 0.22;
    background:
        linear-gradient(90deg, rgba(35, 53, 48, 0.012) 1px, transparent 1px),
        linear-gradient(180deg, rgba(35, 53, 48, 0.01) 1px, transparent 1px);
    background-size: 96px 96px;
}

.topbar {
    border-color: rgba(222, 228, 222, 0.92);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
}

.brand-mark span,
.detail-rail-brand {
    background: #dff06d;
    box-shadow: none;
}

.finder,
.panel,
.category-dock,
.submit-panel,
.side-card,
.detail-panel {
    border-color: rgba(222, 228, 222, 0.92);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
}

.finder {
    min-height: 188px;
    padding: 28px 34px 26px;
}

.finder h1 {
    color: #142d28;
}

.finder p,
.group-title nav,
.site-copy small,
.site-card em,
.related-list small,
.radar-card p,
.note-card p {
    color: #73807b;
}

.quick-pill,
.finder-notes span,
.search-engines button,
.detail-badges span,
.detail-tags span {
    border-color: #e3e8e3;
    background: #fafbf8;
    color: #54645f;
}

.search-engines button.active,
.search-engines button:hover,
.search-engines button:focus-visible,
.subcat-strip button.active,
.subcat-strip button:hover,
.category-pills button.active,
.category-pills button:hover,
.category-pills a:hover,
.category-pills a.active {
    background: #eef7f1;
    color: var(--primary);
}

.searchbar {
    border-color: #ccdcd3;
    box-shadow: none;
}

.resources-panel {
    background: transparent;
}

.resource-list {
    gap: 32px;
}

.resource-group {
    padding-bottom: 24px;
}

.resource-group:not(:last-child)::after {
    background: linear-gradient(90deg, transparent, rgba(209, 218, 211, 0.64), transparent);
}

.group-title h3 {
    color: #182e29;
}

.group-title h3 a:hover,
.group-title h3 a:focus-visible {
    border-color: transparent;
    background: transparent;
    color: #182e29;
}

.channel-icon,
.detail-icon,
.site-icon,
.related-list span {
    border-color: #dce8df;
    background: #f4faf5;
    color: #168174;
}

.site-card a,
.related-list a {
    border-color: rgba(222, 228, 222, 0.96);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: none;
}

.site-card a:hover,
.site-card a:focus-visible,
.related-list a:hover,
.related-list a:focus-visible {
    border-color: rgba(164, 193, 180, 0.9);
    background: #fff;
    box-shadow: 0 8px 18px rgba(31, 52, 47, 0.055);
    transform: translateY(-1px);
}

.site-copy strong {
    color: #142822;
    font-weight: 850;
}

.site-meta {
    opacity: 0.78;
}

.ku-score {
    border-color: #e8dfba;
    background: #fff7d8;
    color: #756017;
}

.tag-icon {
    border-color: transparent;
    background: transparent;
    color: #8a9893;
    opacity: 0.72;
}

.tag-icon:hover,
.tag-icon:focus-visible {
    background: #f3f6f2;
    color: #416d64;
    opacity: 1;
}

.side-card {
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 1px 2px rgba(31, 52, 47, 0.035);
}

.hub-stats span,
.rank-list a,
.tag-cloud button {
    background: #f8faf7;
}

.floating-dock {
    width: 56px;
    padding: 6px;
    border-color: rgba(222, 228, 222, 0.72);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.66);
    box-shadow: 0 10px 26px rgba(31, 52, 47, 0.075);
    backdrop-filter: blur(14px);
}

.floating-dock::before,
.floating-dock .dock-grid::before {
    display: none;
}

.floating-dock .panel-head {
    display: none;
}

.floating-dock .dock-grid {
    gap: 5px;
}

.floating-dock .dock-grid button,
.floating-dock .dock-grid a {
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 4px;
    border-radius: 14px;
}

.floating-dock .dock-grid span {
    width: 31px;
    height: 31px;
    border-color: transparent;
    background: transparent;
    color: #4e6c64;
    box-shadow: none;
}

.floating-dock .dock-grid span svg {
    width: 17px;
    height: 17px;
}

.floating-dock .dock-grid button:hover,
.floating-dock .dock-grid button.active,
.floating-dock .dock-grid a:hover,
.floating-dock .dock-grid a.active {
    border-color: rgba(211, 222, 215, 0.9);
    background: rgba(248, 251, 248, 0.92);
    box-shadow: none;
}

.floating-dock .dock-grid button.active::before,
.floating-dock .dock-grid a.active::before {
    left: -5px;
    width: 3px;
    height: 20px;
    background: var(--primary);
}

.floating-dock .dock-grid button.active span,
.floating-dock .dock-grid a.active span {
    border-color: transparent;
    background: transparent;
    color: var(--primary);
    box-shadow: none;
}

.detail-rail {
    background: rgba(255, 255, 255, 0.82);
    box-shadow: none;
}

/* KuHub structure pass: make the first screen denser and keep the resource list in focus. */
@media (min-width: 1200px) {
    .page {
        width: min(1460px, calc(100% - 40px));
    }

    .layout {
        grid-template-columns: 232px minmax(0, 1fr);
        gap: 22px;
        padding: 0 70px 44px 0;
    }

    .leftbar {
        left: max(20px, calc((100vw - 1460px) / 2));
        top: 128px;
        width: 232px;
        max-height: calc(100vh - 148px);
    }

    .floating-dock {
        top: 128px;
        right: max(18px, calc((100vw - 1460px) / 2));
    }
}

@media (min-width: 1501px) {
    .layout {
        grid-template-columns: 232px minmax(0, 1fr);
        padding-right: 70px;
    }

    .site-grid {
        grid-template-columns: repeat(3, minmax(260px, 1fr));
    }
}

.topbar {
    padding: 10px 0;
}

.brand-mark {
    grid-template-columns: 38px auto;
}

.brand-mark span {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 18px;
}

.brand-mark strong {
    font-size: 21px;
}

.brand-mark small {
    margin-top: 3px;
    font-size: 11px;
}

.top-actions a,
.history-trigger {
    min-height: 36px;
    padding: 7px 11px;
}

.history-trigger {
    width: 38px;
    height: 38px;
}

.finder {
    display: grid;
    grid-template-columns: minmax(230px, 0.72fr) minmax(360px, 1fr);
    align-items: center;
    gap: 18px 28px;
    min-height: 0;
    padding: 18px 26px;
}

.finder-copy {
    max-width: 520px;
}

.quick-pill {
    margin-bottom: 7px;
    padding: 5px 9px;
    font-size: 12px;
}

.finder h1 {
    margin-bottom: 5px;
    font-size: clamp(32px, 3.2vw, 42px);
}

.finder p {
    max-width: 520px;
    font-size: 12px;
    line-height: 1.5;
}

.searchbar {
    width: 100%;
    align-self: end;
    padding: 5px;
}

.searchbar input {
    height: 38px;
}

.searchbar button {
    width: 38px;
    height: 38px;
}

.search-engines {
    grid-column: 2;
    margin-top: -12px;
}

.resources-panel {
    margin-top: 18px;
}

.resource-list {
    gap: 28px;
}

.resource-group {
    gap: 10px;
    padding-bottom: 22px;
}

.group-title {
    min-height: 34px;
}

.group-title h3 {
    font-size: 21px;
}

.group-title h3 a .channel-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
}

.group-title h3 a .channel-icon svg {
    width: 18px;
    height: 18px;
}

.subcat-strip {
    gap: 6px;
}

.subcat-strip button {
    padding: 3px 8px;
    font-size: 12px;
}

.site-grid {
    gap: 9px;
}

.site-card a {
    height: 64px;
    min-height: 64px;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 3px 9px;
    padding: 8px 10px;
}

.site-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 10px;
}

.site-copy strong {
    font-size: 13px;
    line-height: 1.2;
}

.site-copy small {
    font-size: 11px;
}

.site-meta {
    gap: 4px;
    opacity: 0.68;
}

.ku-score {
    padding: 1px 5px;
    font-size: 10px;
}

.tag-icon {
    width: 16px;
    height: 16px;
    min-width: 16px;
    font-size: 10px;
}

.site-card em {
    max-width: 112px;
    font-size: 10px;
}

.side-card {
    padding: 14px;
    border-color: rgba(225, 230, 225, 0.86);
    background: rgba(255, 255, 255, 0.62);
}

.side-card h3 {
    margin-bottom: 10px;
    font-size: 14px;
}

.hub-stats {
    gap: 6px;
}

.hub-stats span {
    padding: 8px 10px;
}

.hub-stats strong {
    font-size: 20px;
}

.rank-list {
    gap: 6px;
}

.rank-list a {
    min-height: 34px;
    padding: 7px 9px;
}

.tag-cloud {
    gap: 6px;
}

.tag-cloud button {
    padding: 6px 8px;
    font-size: 12px;
}

.note-card p,
.radar-card p {
    font-size: 12px;
}

@media (max-width: 1199px) {
    .finder {
        grid-template-columns: 1fr;
    }

    .search-engines {
        grid-column: auto;
        margin-top: 0;
    }
}

/* KuHub dopamine theme: bright accents with a calm reading surface. */
:root {
    --page: #fff7fb;
    --surface: #fffefa;
    --surface-soft: #fff7fb;
    --line: #eadff0;
    --primary: #ff4d9d;
    --primary-dark: #6837ff;
    --dopamine-pink: #ff4d9d;
    --dopamine-purple: #7b4dff;
    --dopamine-blue: #21a8ff;
    --dopamine-cyan: #17d7c4;
    --dopamine-lime: #b8f243;
    --dopamine-yellow: #ffd84d;
    --dopamine-orange: #ff8a3d;
    --shadow: 0 1px 2px rgba(70, 42, 95, 0.04), 0 14px 34px rgba(116, 69, 190, 0.08);
    --shadow-soft: 0 1px 2px rgba(70, 42, 95, 0.035), 0 12px 28px rgba(116, 69, 190, 0.065);
}

body,
.detail-body,
.category-body {
    background:
        radial-gradient(circle at 12% 9%, rgba(255, 216, 77, 0.22), transparent 25%),
        radial-gradient(circle at 82% 5%, rgba(33, 168, 255, 0.14), transparent 27%),
        linear-gradient(180deg, #fffaf4 0, #fff7fb 360px, #f7fbff 100%);
}

body::before,
.detail-body::before,
.category-body::before {
    opacity: 0.18;
    background:
        linear-gradient(90deg, rgba(123, 77, 255, 0.035) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 77, 157, 0.03) 1px, transparent 1px);
    background-size: 104px 104px;
}

.topbar {
    border-color: rgba(234, 223, 240, 0.9);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow-soft);
}

.brand-mark span,
.detail-rail-brand {
    border-color: rgba(104, 55, 255, 0.88);
    background: linear-gradient(135deg, var(--dopamine-lime), var(--dopamine-yellow));
    color: #263300;
}

.brand-mark strong {
    color: #2a2034;
}

.brand-mark small {
    color: #7a6b83;
}

.top-actions a,
.history-trigger {
    border-color: rgba(234, 223, 240, 0.95);
    background: rgba(255, 255, 255, 0.82);
    color: #5b4d67;
}

.top-actions a[href="#submit"],
.visit-button,
.submit-panel a,
.searchbar button {
    background: linear-gradient(135deg, var(--dopamine-purple), var(--dopamine-pink));
    color: #fff;
    box-shadow: 0 10px 22px rgba(255, 77, 157, 0.18);
}

.top-actions a:hover,
.top-actions a:focus-visible,
.history-trigger:hover,
.history-trigger:focus-visible,
.history-menu.open .history-trigger {
    border-color: rgba(255, 77, 157, 0.32);
    background: #fff;
    color: var(--dopamine-purple);
}

.finder,
.panel,
.category-dock,
.submit-panel,
.side-card,
.detail-panel {
    border-color: rgba(234, 223, 240, 0.9);
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow-soft);
}

.finder {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.86)),
        linear-gradient(135deg, rgba(255, 216, 77, 0.22), rgba(255, 77, 157, 0.1), rgba(33, 168, 255, 0.12));
}

.finder h1,
.group-title h3,
.detail-heading h1,
.category-hero h1 {
    color: #271b36;
}

.quick-pill {
    border-color: rgba(255, 77, 157, 0.24);
    background: rgba(255, 240, 247, 0.9);
    color: #cc2476;
}

.quick-pill::before {
    color: var(--dopamine-purple);
}

.finder p,
.group-title nav,
.site-copy small,
.site-card em,
.related-list small,
.radar-card p,
.note-card p {
    color: #7b7181;
}

.searchbar {
    border-color: rgba(123, 77, 255, 0.26);
    background: rgba(255, 255, 255, 0.94);
}

.searchbar:focus-within {
    border-color: rgba(255, 77, 157, 0.42);
    box-shadow: 0 0 0 4px rgba(255, 77, 157, 0.08);
}

.search-engines button,
.finder-notes span,
.detail-badges span,
.detail-tags span {
    border-color: rgba(234, 223, 240, 0.95);
    background: rgba(255, 255, 255, 0.78);
    color: #62566d;
}

.search-engines button.active,
.search-engines button:hover,
.search-engines button:focus-visible,
.subcat-strip button.active,
.subcat-strip button:hover,
.category-pills button.active,
.category-pills button:hover,
.category-pills a:hover,
.category-pills a.active,
.category-subnav a:hover,
.category-subnav a:focus-visible {
    background: linear-gradient(135deg, rgba(255, 216, 77, 0.58), rgba(184, 242, 67, 0.44));
    color: #4f3d00;
}

.channel-icon,
.detail-icon,
.site-icon,
.related-list span {
    border-color: rgba(255, 77, 157, 0.16);
    background: linear-gradient(135deg, rgba(255, 216, 77, 0.58), rgba(255, 77, 157, 0.18));
    color: #7b2d00;
}

.site-card a,
.related-list a {
    border-color: rgba(234, 223, 240, 0.88);
    background: rgba(255, 255, 255, 0.9);
}

.site-card a::before,
.related-list a::before {
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 0;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: var(--dopamine-pink);
    content: "";
    opacity: 0.68;
}

.site-card a:hover,
.site-card a:focus-visible,
.related-list a:hover,
.related-list a:focus-visible {
    border-color: rgba(255, 77, 157, 0.26);
    box-shadow: 0 10px 22px rgba(116, 69, 190, 0.1);
}

.site-copy strong {
    color: #2b2035;
}

.ku-score {
    border-color: rgba(255, 216, 77, 0.72);
    background: #fff5bd;
    color: #775400;
}

.tag-icon {
    color: #9a8ca5;
}

.tag-icon:hover,
.tag-icon:focus-visible {
    background: rgba(255, 240, 247, 0.9);
    color: var(--dopamine-pink);
}

.subcat-strip small {
    background: rgba(255, 255, 255, 0.92);
    color: var(--dopamine-purple);
}

.hub-stats span,
.rank-list a,
.tag-cloud button {
    background: rgba(255, 255, 255, 0.62);
}

.hub-stats strong,
.rank-list span {
    color: var(--dopamine-purple);
}

.tag-cloud button:hover {
    border-color: rgba(255, 77, 157, 0.28);
    background: rgba(255, 240, 247, 0.9);
    color: #cc2476;
}

.tag-cloud button.active {
    border-color: rgba(255, 77, 157, 0.34);
    background: linear-gradient(135deg, rgba(255, 216, 77, 0.72), rgba(255, 77, 157, 0.18));
    color: #5c3a00;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.68), 0 8px 18px rgba(255, 77, 157, 0.12);
}

.floating-dock,
.detail-rail {
    border-color: rgba(234, 223, 240, 0.78);
    background: rgba(255, 255, 255, 0.68);
}

.floating-dock .dock-grid span,
.detail-rail nav span {
    color: #71647d;
}

.floating-dock .dock-grid button:hover,
.floating-dock .dock-grid button.active,
.floating-dock .dock-grid a:hover,
.floating-dock .dock-grid a.active,
.detail-rail nav a:hover,
.detail-rail nav a:focus-visible,
.detail-rail nav a.active {
    border-color: rgba(255, 77, 157, 0.24);
    background: rgba(255, 240, 247, 0.9);
}

.floating-dock .dock-grid button.active::before,
.floating-dock .dock-grid a.active::before {
    background: linear-gradient(180deg, var(--dopamine-pink), var(--dopamine-purple));
}

.floating-dock .dock-grid button.active span,
.floating-dock .dock-grid a.active span {
    color: var(--dopamine-pink);
}

.history-popover {
    border-color: rgba(234, 223, 240, 0.95);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 52px rgba(116, 69, 190, 0.16);
}

.history-popover::before {
    border-top-color: rgba(234, 223, 240, 0.95);
    border-left-color: rgba(234, 223, 240, 0.95);
    background: rgba(255, 255, 255, 0.96);
}

.history-dot {
    border-color: rgba(255, 77, 157, 0.18);
    background: linear-gradient(135deg, rgba(184, 242, 67, 0.45), rgba(33, 168, 255, 0.16));
    color: var(--dopamine-purple);
}

.site-card[data-category="1"] a::before,
.resource-group[data-group="1"] .channel-icon,
.dock-grid [data-category-jump="1"] span {
    background: linear-gradient(135deg, #21a8ff, #17d7c4);
    color: #053944;
}

.site-card[data-category="2"] a::before,
.resource-group[data-group="2"] .channel-icon,
.dock-grid [data-category-jump="2"] span {
    background: linear-gradient(135deg, #ff4d9d, #ff8ac6);
    color: #4b082c;
}

.site-card[data-category="3"] a::before,
.resource-group[data-group="3"] .channel-icon,
.dock-grid [data-category-jump="3"] span {
    background: linear-gradient(135deg, #7b4dff, #21a8ff);
    color: #fff;
}

.site-card[data-category="4"] a::before,
.resource-group[data-group="4"] .channel-icon,
.dock-grid [data-category-jump="4"] span {
    background: linear-gradient(135deg, #b8f243, #17d7c4);
    color: #173d18;
}

.site-card[data-category="5"] a::before,
.resource-group[data-group="5"] .channel-icon,
.dock-grid [data-category-jump="5"] span {
    background: linear-gradient(135deg, #ff8a3d, #ffd84d);
    color: #4d2500;
}

.site-card[data-category="6"] a::before,
.resource-group[data-group="6"] .channel-icon,
.dock-grid [data-category-jump="6"] span {
    background: linear-gradient(135deg, #ff4d9d, #7b4dff);
    color: #fff;
}

.site-card[data-category="7"] a::before,
.resource-group[data-group="7"] .channel-icon,
.dock-grid [data-category-jump="7"] span {
    background: linear-gradient(135deg, #17d7c4, #b8f243);
    color: #073b35;
}

.site-card[data-category="8"] a::before,
.resource-group[data-group="8"] .channel-icon,
.dock-grid [data-category-jump="8"] span {
    background: linear-gradient(135deg, #ffd84d, #ff4d9d);
    color: #4a2700;
}

/* Theme options */
html[data-theme="light"] {
    --page: #f4f5f2;
    --surface: #fffefa;
    --surface-soft: #f8faf7;
    --ink: #1d2c29;
    --muted: #65736f;
    --line: #dfe7e1;
    --primary: #0d756b;
    --primary-dark: #123c36;
    --lime: #dce96a;
    --shadow: 0 1px 2px rgba(38, 66, 58, 0.035), 0 14px 34px rgba(38, 66, 58, 0.06);
    --shadow-soft: 0 1px 2px rgba(38, 66, 58, 0.03), 0 12px 28px rgba(38, 66, 58, 0.055);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --page: #10131d;
    --surface: #181c29;
    --surface-soft: #202538;
    --ink: #f5f7fb;
    --muted: #aeb7c7;
    --line: rgba(255, 255, 255, 0.12);
    --primary: #7df0c6;
    --primary-dark: #9fd7ff;
    --lime: #c8ff64;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.22), 0 18px 44px rgba(0, 0, 0, 0.32);
    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.2), 0 16px 38px rgba(0, 0, 0, 0.26);
}

.theme-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 38px;
    padding: 3px;
    border: 1px solid rgba(234, 223, 240, 0.95);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
}

.theme-switcher button {
    min-height: 30px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64566f;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.theme-switcher button:hover,
.theme-switcher button:focus-visible,
.theme-switcher button.active {
    background: linear-gradient(135deg, var(--dopamine-purple), var(--dopamine-pink));
    color: #fff;
    outline: 0;
}

.detail-theme-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    margin: -4px 0 14px;
}

.detail-theme-row .history-menu {
    flex: 0 0 auto;
}

.topbar {
    margin: 10px 0 14px;
    padding: 12px 14px;
    border: 1px solid rgba(234, 223, 240, 0.9);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow-soft);
}

.resources-panel .group-title h3 {
    font-size: 22px;
}

.resources-panel .group-title nav {
    font-size: 14px;
}

.resources-panel .subcat-strip button {
    font-size: 13px;
}

.resources-panel .site-card a {
    height: 68px;
    min-height: 68px;
}

.resources-panel .site-copy strong {
    font-size: 14px;
}

.resources-panel .site-copy small {
    font-size: 12px;
}

.resources-panel .site-meta {
    font-size: 11px;
}

.resources-panel .ku-score,
.resources-panel .tag-icon,
.resources-panel .site-card em {
    font-size: 11px;
}

html[data-theme="light"] body,
html[data-theme="light"] .detail-body,
html[data-theme="light"] .category-body {
    background: linear-gradient(180deg, #fbfbf8 0, #f7f7f4 360px, #f4f5f1 100%);
    color: var(--ink);
}

html[data-theme="light"] body::before,
html[data-theme="light"] .detail-body::before,
html[data-theme="light"] .category-body::before {
    opacity: 0.12;
    background:
        linear-gradient(90deg, rgba(35, 53, 48, 0.012) 1px, transparent 1px),
        linear-gradient(180deg, rgba(35, 53, 48, 0.01) 1px, transparent 1px);
    background-size: 112px 112px;
}

html[data-theme="light"] .topbar {
    border-color: rgba(222, 228, 222, 0.92);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .brand-mark span,
html[data-theme="light"] .detail-rail-brand {
    border-color: rgba(18, 60, 54, 0.9);
    background: #dff06d;
    color: var(--primary-dark);
    box-shadow: none;
}

html[data-theme="light"] .brand-mark strong,
html[data-theme="light"] .finder h1,
html[data-theme="light"] .group-title h3,
html[data-theme="light"] .detail-heading h1,
html[data-theme="light"] .category-hero h1,
html[data-theme="light"] .site-copy strong,
html[data-theme="light"] .detail-section h2,
html[data-theme="light"] .detail-sidebar h2,
html[data-theme="light"] .category-subcat-head h2 {
    color: #1f332f;
}

html[data-theme="light"] .brand-mark small,
html[data-theme="light"] .finder p,
html[data-theme="light"] .group-title nav,
html[data-theme="light"] .site-copy small,
html[data-theme="light"] .site-card em,
html[data-theme="light"] .related-list small,
html[data-theme="light"] .radar-card p,
html[data-theme="light"] .note-card p,
html[data-theme="light"] .detail-heading p:not(.detail-eyebrow),
html[data-theme="light"] .detail-section p,
html[data-theme="light"] .category-hero p:not(.detail-eyebrow),
html[data-theme="light"] .detail-facts span,
html[data-theme="light"] .detail-meta-list dt {
    color: #60716c;
}

html[data-theme="light"] .top-actions a,
html[data-theme="light"] .history-trigger,
html[data-theme="light"] .theme-switcher {
    border-color: rgba(210, 224, 216, 0.88);
    background: rgba(255, 255, 252, 0.82);
    color: #445a55;
}

html[data-theme="light"] .theme-switcher button {
    color: #445a55;
}

html[data-theme="light"] .theme-switcher button:hover,
html[data-theme="light"] .theme-switcher button:focus-visible,
html[data-theme="light"] .theme-switcher button.active,
html[data-theme="light"] .top-actions a[href="#submit"],
html[data-theme="light"] .visit-button,
html[data-theme="light"] .submit-panel a,
html[data-theme="light"] .searchbar button {
    background: linear-gradient(180deg, #174d45, #123c36);
    color: #fff;
    box-shadow: 0 10px 22px rgba(18, 60, 54, 0.16);
}

html[data-theme="light"] .top-actions a:hover,
html[data-theme="light"] .top-actions a:focus-visible,
html[data-theme="light"] .history-trigger:hover,
html[data-theme="light"] .history-trigger:focus-visible,
html[data-theme="light"] .history-menu.open .history-trigger {
    border-color: rgba(158, 198, 181, 0.9);
    background: #fffefa;
    color: var(--primary-dark);
}

html[data-theme="light"] .finder,
html[data-theme="light"] .panel,
html[data-theme="light"] .category-dock,
html[data-theme="light"] .submit-panel,
html[data-theme="light"] .side-card,
html[data-theme="light"] .detail-panel {
    border-color: rgba(222, 228, 222, 0.92);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .finder {
    background: linear-gradient(180deg, rgba(255, 255, 252, 0.96), rgba(252, 253, 249, 0.92));
}

html[data-theme="light"] .quick-pill {
    border-color: rgba(13, 117, 107, 0.18);
    background: #f2faf2;
    color: var(--primary);
}

html[data-theme="light"] .searchbar,
html[data-theme="light"] .search-engines button,
html[data-theme="light"] .finder-notes span,
html[data-theme="light"] .detail-badges span,
html[data-theme="light"] .detail-tags span,
html[data-theme="light"] .detail-facts div {
    border-color: #e3e8e3;
    background: #fafbf8;
    color: #54645f;
}

html[data-theme="light"] .searchbar input {
    color: #1d2c29;
}

html[data-theme="light"] .searchbar input::placeholder {
    color: #8a9994;
}

html[data-theme="light"] .search-engines button.active,
html[data-theme="light"] .search-engines button:hover,
html[data-theme="light"] .search-engines button:focus-visible,
html[data-theme="light"] .subcat-strip button.active,
html[data-theme="light"] .subcat-strip button:hover,
html[data-theme="light"] .category-pills button.active,
html[data-theme="light"] .category-pills button:hover,
html[data-theme="light"] .category-pills a:hover,
html[data-theme="light"] .category-pills a.active,
html[data-theme="light"] .category-subnav a:hover,
html[data-theme="light"] .category-subnav a:focus-visible {
    background: #eef8e7;
    color: var(--primary-dark);
}

html[data-theme="light"] .channel-icon,
html[data-theme="light"] .detail-icon,
html[data-theme="light"] .site-icon,
html[data-theme="light"] .related-list span {
    border-color: #dce8df;
    background: #f4faf5;
    color: var(--primary-dark);
}

html[data-theme="light"] .site-card a,
html[data-theme="light"] .related-list a,
html[data-theme="light"] .rank-list a,
html[data-theme="light"] .hub-stats span,
html[data-theme="light"] .tag-cloud button {
    border-color: rgba(222, 228, 222, 0.92);
    background: rgba(255, 255, 255, 0.86);
}

html[data-theme="light"] .site-card a::before,
html[data-theme="light"] .related-list a::before {
    background: var(--primary);
}

html[data-theme="light"] .ku-score {
    border-color: #e0ebcf;
    background: #f4f9e8;
    color: #456015;
}

html[data-theme="light"] .tag-icon {
    color: #8b9a95;
}

html[data-theme="light"] .tag-cloud button.active {
    border-color: rgba(13, 117, 107, 0.26);
    background: #e8f6df;
    color: var(--primary-dark);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 8px 18px rgba(38, 66, 58, 0.08);
}

html[data-theme="light"] .history-popover {
    border-color: rgba(216, 227, 220, 0.94);
    background: rgba(255, 255, 252, 0.98);
    box-shadow: 0 22px 52px rgba(31, 78, 63, 0.1);
}

html[data-theme="light"] .history-popover::before {
    border-top-color: rgba(216, 227, 220, 0.94);
    border-left-color: rgba(216, 227, 220, 0.94);
    background: rgba(255, 255, 252, 0.98);
}

html[data-theme="light"] .history-dot {
    border-color: #dce8df;
    background: #f2faf2;
    color: var(--primary-dark);
}

html[data-theme="light"] .floating-dock,
html[data-theme="light"] .detail-rail {
    border-color: rgba(222, 228, 222, 0.82);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: none;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .detail-body,
html[data-theme="dark"] .category-body {
    background:
        radial-gradient(circle at 18% 6%, rgba(125, 240, 198, 0.13), transparent 28%),
        radial-gradient(circle at 84% 10%, rgba(157, 215, 255, 0.14), transparent 30%),
        linear-gradient(180deg, #121622 0, #10131d 440px, #0c0f17 100%);
    color: var(--ink);
}

html[data-theme="dark"] body::before,
html[data-theme="dark"] .detail-body::before,
html[data-theme="dark"] .category-body::before {
    opacity: 0.16;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.038) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 112px 112px;
}

html[data-theme="dark"] .topbar {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(24, 28, 41, 0.86);
    box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .brand-mark span,
html[data-theme="dark"] .detail-rail-brand {
    border-color: rgba(157, 215, 255, 0.55);
    background: linear-gradient(135deg, #7df0c6, #9fd7ff);
    color: #07121b;
}

html[data-theme="dark"] .brand-mark strong,
html[data-theme="dark"] .finder h1,
html[data-theme="dark"] .group-title h3,
html[data-theme="dark"] .detail-heading h1,
html[data-theme="dark"] .category-hero h1,
html[data-theme="dark"] .site-copy strong,
html[data-theme="dark"] .detail-section h2,
html[data-theme="dark"] .detail-sidebar h2,
html[data-theme="dark"] .category-subcat-head h2,
html[data-theme="dark"] .detail-facts strong,
html[data-theme="dark"] .detail-meta-list dd {
    color: #f5f7fb;
}

html[data-theme="dark"] .brand-mark small,
html[data-theme="dark"] .finder p,
html[data-theme="dark"] .group-title nav,
html[data-theme="dark"] .site-copy small,
html[data-theme="dark"] .site-card em,
html[data-theme="dark"] .related-list small,
html[data-theme="dark"] .radar-card p,
html[data-theme="dark"] .note-card p,
html[data-theme="dark"] .detail-heading p:not(.detail-eyebrow),
html[data-theme="dark"] .detail-section p,
html[data-theme="dark"] .category-hero p:not(.detail-eyebrow),
html[data-theme="dark"] .not-found-panel p:not(.detail-eyebrow),
html[data-theme="dark"] .detail-facts span,
html[data-theme="dark"] .detail-meta-list dt,
html[data-theme="dark"] .detail-crumbs,
html[data-theme="dark"] .category-subcat-head p {
    color: var(--muted);
}

html[data-theme="dark"] .top-actions a,
html[data-theme="dark"] .history-trigger,
html[data-theme="dark"] .theme-switcher {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #d9e1ee;
}

html[data-theme="dark"] .theme-switcher button {
    color: #d9e1ee;
}

html[data-theme="dark"] .theme-switcher button:hover,
html[data-theme="dark"] .theme-switcher button:focus-visible,
html[data-theme="dark"] .theme-switcher button.active,
html[data-theme="dark"] .top-actions a[href="#submit"],
html[data-theme="dark"] .visit-button,
html[data-theme="dark"] .submit-panel a,
html[data-theme="dark"] .searchbar button {
    background: linear-gradient(135deg, #7df0c6, #78b8ff);
    color: #07121b;
    box-shadow: 0 12px 26px rgba(125, 240, 198, 0.14);
}

html[data-theme="dark"] .top-actions a:hover,
html[data-theme="dark"] .top-actions a:focus-visible,
html[data-theme="dark"] .history-trigger:hover,
html[data-theme="dark"] .history-trigger:focus-visible,
html[data-theme="dark"] .history-menu.open .history-trigger {
    border-color: rgba(125, 240, 198, 0.36);
    background: rgba(125, 240, 198, 0.1);
    color: #9fffe0;
}

html[data-theme="dark"] .finder,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .category-dock,
html[data-theme="dark"] .submit-panel,
html[data-theme="dark"] .side-card,
html[data-theme="dark"] .detail-panel {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(24, 28, 41, 0.86);
    box-shadow: var(--shadow-soft);
}

html[data-theme="dark"] .rightbar .side-card {
    border-color: rgba(125, 240, 198, 0.16);
    background: rgba(20, 25, 38, 0.9);
}

html[data-theme="dark"] .rightbar .side-card h3 {
    color: #eef5ff;
}

html[data-theme="dark"] .rightbar .side-card p,
html[data-theme="dark"] .rightbar .hub-stats span {
    color: #c6d2df;
}

html[data-theme="dark"] .rightbar .hub-stats span {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .rightbar .hub-stats strong {
    color: #9fffe0;
    text-shadow: 0 0 18px rgba(125, 240, 198, 0.18);
}

html[data-theme="dark"] .rightbar .rank-list a {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.075);
    color: #eef5ff;
}

html[data-theme="dark"] .rightbar .rank-list a:hover {
    border-color: rgba(125, 240, 198, 0.24);
    background: rgba(125, 240, 198, 0.12);
}

html[data-theme="dark"] .rightbar .rank-list span {
    background: #eef5ff;
    color: #16846c;
}

html[data-theme="dark"] .rightbar .rank-list strong {
    color: #eef5ff;
}

html[data-theme="dark"] .rightbar .tag-cloud button {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #dce7f3;
}

html[data-theme="dark"] .rightbar .tag-cloud button:hover,
html[data-theme="dark"] .rightbar .tag-cloud button:focus-visible {
    border-color: rgba(125, 240, 198, 0.34);
    background: rgba(125, 240, 198, 0.14);
    color: #9fffe0;
}

html[data-theme="dark"] .rightbar .tag-cloud button.active {
    border-color: rgba(125, 240, 198, 0.46);
    background: rgba(125, 240, 198, 0.2);
    color: #b9ffe9;
}

html[data-theme="dark"] .finder {
    background:
        linear-gradient(90deg, rgba(24, 28, 41, 0.95), rgba(28, 33, 48, 0.88)),
        linear-gradient(135deg, rgba(125, 240, 198, 0.12), rgba(120, 184, 255, 0.1));
}

html[data-theme="dark"] .quick-pill {
    border-color: rgba(125, 240, 198, 0.24);
    background: rgba(125, 240, 198, 0.1);
    color: #9fffe0;
}

html[data-theme="dark"] .searchbar,
html[data-theme="dark"] .search-engines button,
html[data-theme="dark"] .finder-notes span,
html[data-theme="dark"] .resources-summary,
html[data-theme="dark"] .detail-badges span,
html[data-theme="dark"] .detail-tags span,
html[data-theme="dark"] .detail-facts div,
html[data-theme="dark"] .kuhub-note-card,
html[data-theme="dark"] .kuhub-article-entry-grid div,
html[data-theme="dark"] .detail-note-box,
html[data-theme="dark"] .detail-note-box.muted {
    border-color: rgba(255, 255, 255, 0.11);
    background: rgba(255, 255, 255, 0.055);
    color: #d9e1ee;
}

html[data-theme="dark"] .kuhub-article-panel > h2,
html[data-theme="dark"] .kuhub-article-block h3,
html[data-theme="dark"] .kuhub-article-entry-grid strong,
html[data-theme="dark"] .kuhub-note-card h3 {
    color: #f5f7fb;
}

html[data-theme="dark"] .kuhub-article-lead,
html[data-theme="dark"] .kuhub-article-block p,
html[data-theme="dark"] .kuhub-article-block ul,
html[data-theme="dark"] .kuhub-article-block ol,
html[data-theme="dark"] .kuhub-article-entry-grid span,
html[data-theme="dark"] .kuhub-note-card ul,
html[data-theme="dark"] .kuhub-source-note {
    color: var(--muted) !important;
}

html[data-theme="dark"] .inline-copy-button {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #d9e1ee;
}

html[data-theme="dark"] .inline-copy-button:hover,
html[data-theme="dark"] .inline-copy-button:focus-visible {
    border-color: rgba(125, 240, 198, 0.36);
    background: rgba(125, 240, 198, 0.1);
    color: #9fffe0;
}

html[data-theme="dark"] .searchbar input {
    color: #f5f7fb;
}

html[data-theme="dark"] .searchbar input::placeholder {
    color: #7f8a9b;
}

html[data-theme="dark"] .resources-summary strong {
    color: #f5f7fb;
}

html[data-theme="dark"] .resources-summary span {
    color: var(--muted);
}

html[data-theme="dark"] .searchbar:focus-within {
    border-color: rgba(125, 240, 198, 0.38);
    box-shadow: 0 0 0 4px rgba(125, 240, 198, 0.08);
}

html[data-theme="dark"] .search-engines button.active,
html[data-theme="dark"] .search-engines button:hover,
html[data-theme="dark"] .search-engines button:focus-visible,
html[data-theme="dark"] .subcat-strip button.active,
html[data-theme="dark"] .subcat-strip button:hover,
html[data-theme="dark"] .category-pills button.active,
html[data-theme="dark"] .category-pills button:hover,
html[data-theme="dark"] .category-pills a:hover,
html[data-theme="dark"] .category-pills a.active,
html[data-theme="dark"] .category-subnav a:hover,
html[data-theme="dark"] .category-subnav a:focus-visible {
    background: rgba(125, 240, 198, 0.14);
    color: #9fffe0;
}

html[data-theme="dark"] .category-pills a,
html[data-theme="dark"] .subcat-strip button,
html[data-theme="dark"] .category-subnav a {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #d9e1ee;
}

html[data-theme="dark"] .channel-icon,
html[data-theme="dark"] .detail-icon,
html[data-theme="dark"] .site-icon,
html[data-theme="dark"] .related-list span {
    border-color: rgba(125, 240, 198, 0.18);
    background: rgba(125, 240, 198, 0.12);
    color: #9fffe0;
}

html[data-theme="dark"] .site-card a,
html[data-theme="dark"] .related-list a,
html[data-theme="dark"] .rank-list a,
html[data-theme="dark"] .hub-stats span,
html[data-theme="dark"] .tag-cloud button {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.055);
    color: #f5f7fb;
}

html[data-theme="dark"] .site-card a::before,
html[data-theme="dark"] .related-list a::before {
    background: #7df0c6;
}

html[data-theme="dark"] .site-card a:hover,
html[data-theme="dark"] .site-card a:focus-visible,
html[data-theme="dark"] .related-list a:hover,
html[data-theme="dark"] .related-list a:focus-visible {
    border-color: rgba(125, 240, 198, 0.28);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .ku-score {
    border-color: rgba(125, 240, 198, 0.32);
    background: rgba(125, 240, 198, 0.12);
    color: #9fffe0;
}

html[data-theme="dark"] .tag-icon {
    color: #aeb7c7;
}

html[data-theme="dark"] .tag-icon:hover,
html[data-theme="dark"] .tag-icon:focus-visible,
html[data-theme="dark"] .tag-cloud button:hover {
    border-color: rgba(125, 240, 198, 0.28);
    background: rgba(125, 240, 198, 0.1);
    color: #9fffe0;
}

html[data-theme="dark"] .tag-cloud button.active {
    border-color: rgba(125, 240, 198, 0.38);
    background: rgba(125, 240, 198, 0.18);
    color: #9fffe0;
    box-shadow: inset 0 0 0 1px rgba(125, 240, 198, 0.08), 0 8px 18px rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .subcat-strip small {
    background: rgba(255, 255, 255, 0.08);
    color: #9fffe0;
}

html[data-theme="dark"] .hub-stats strong,
html[data-theme="dark"] .rank-list span {
    color: #9fffe0;
}

html[data-theme="dark"] .history-popover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(21, 25, 36, 0.98);
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] .history-popover::before {
    border-top-color: rgba(255, 255, 255, 0.12);
    border-left-color: rgba(255, 255, 255, 0.12);
    background: rgba(21, 25, 36, 0.98);
}

html[data-theme="dark"] .history-head strong,
html[data-theme="dark"] .history-item strong {
    color: #f5f7fb;
}

html[data-theme="dark"] .history-head button,
html[data-theme="dark"] .history-item small,
html[data-theme="dark"] .history-item time,
html[data-theme="dark"] .history-empty {
    color: var(--muted);
}

html[data-theme="dark"] .history-item {
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .history-item:hover,
html[data-theme="dark"] .history-item:focus-visible {
    background: rgba(125, 240, 198, 0.08);
}

html[data-theme="dark"] .history-dot {
    border-color: rgba(125, 240, 198, 0.22);
    background: rgba(125, 240, 198, 0.12);
    color: #9fffe0;
}

html[data-theme="dark"] .floating-dock,
html[data-theme="dark"] .detail-rail {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(16, 19, 29, 0.82);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .floating-dock .dock-grid span,
html[data-theme="dark"] .detail-rail nav span {
    color: #d9e1ee;
}

html[data-theme="dark"] .floating-dock .dock-grid button,
html[data-theme="dark"] .floating-dock .dock-grid a,
html[data-theme="dark"] .detail-rail nav a {
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.05);
}

html[data-theme="dark"] .floating-dock .dock-grid button:hover,
html[data-theme="dark"] .floating-dock .dock-grid button.active,
html[data-theme="dark"] .floating-dock .dock-grid a:hover,
html[data-theme="dark"] .floating-dock .dock-grid a.active,
html[data-theme="dark"] .detail-rail nav a:hover,
html[data-theme="dark"] .detail-rail nav a:focus-visible,
html[data-theme="dark"] .detail-rail nav a.active {
    border-color: rgba(125, 240, 198, 0.26);
    background: rgba(125, 240, 198, 0.1);
}

html[data-theme="dark"] .floating-dock .dock-grid button.active::before,
html[data-theme="dark"] .floating-dock .dock-grid a.active::before {
    background: linear-gradient(180deg, #7df0c6, #78b8ff);
}

html[data-theme="dark"] .floating-dock .dock-grid button.active span,
html[data-theme="dark"] .floating-dock .dock-grid a.active span {
    color: #9fffe0;
}

html[data-theme="dark"] code {
    color: #9fffe0;
}

html[data-theme="dark"] .site-footer {
    border-top-color: rgba(255, 255, 255, 0.12);
    color: #9aa8b7;
}

html[data-theme="dark"] .site-footer strong {
    color: #f5f7fb;
}

html[data-theme="dark"] .site-footer a {
    color: #9fffe0;
}

html[data-theme="dark"] .site-footer a:hover,
html[data-theme="dark"] .site-footer a:focus-visible {
    color: #f5f7fb;
}

html[data-theme="dopamine"] .theme-switcher button.active,
html:not([data-theme]) .theme-switcher button[data-theme-option="dopamine"] {
    background: linear-gradient(135deg, var(--dopamine-purple), var(--dopamine-pink));
    color: #fff;
}

@media (max-width: 760px) {
    .theme-switcher {
        flex: 1 1 100%;
        justify-content: space-between;
        width: 100%;
    }

    .theme-switcher button {
        flex: 1 1 0;
    }

    .detail-theme-row {
        flex-wrap: wrap;
        justify-content: stretch;
        margin-top: 0;
    }

    .detail-theme-row .history-menu {
        margin-left: auto;
    }
}
