.fivew2h-context-chip,
.fivew2h-board-card-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.76rem;
    font-weight: 700;
    border: 1px solid rgba(67, 187, 189, 0.18);
    background: rgba(67, 187, 189, 0.08);
    color: var(--text-main);
}

.fivew2h-library-hero,
.fivew2h-detail-card,
.fivew2h-workspace {
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        radial-gradient(circle at top right, rgba(255, 183, 77, 0.08), transparent 24%),
        var(--surface-card);
}

.fivew2h-library-hero.app-themeable,
.fivew2h-detail-card.app-themeable,
.fivew2h-workspace.app-themeable,
.fivew2h-board-card.app-themeable {
    border-color: var(--app-border-color);
}

.fivew2h-library-hero.app-themeable,
.fivew2h-detail-card.app-themeable,
.fivew2h-workspace.app-themeable {
    background:
        radial-gradient(circle at top right, rgba(var(--app-secondary-rgb), 0.12), transparent 28%),
        radial-gradient(circle at 0 0, rgba(var(--app-accent-rgb), 0.08), transparent 26%),
        var(--surface-card);
}

.fivew2h-library-hero,
.fivew2h-detail-card {
    padding: 16px 20px;
    display: grid;
    gap: 10px 20px;
    align-items: start;
}

.fivew2h-library-hero {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas: "copy actions";
}

.fivew2h-detail-card {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas: "main side";
}

.fivew2h-library-copy,
.fivew2h-detail-main,
.fivew2h-detail-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.fivew2h-library-copy {
    grid-area: copy;
}

.fivew2h-detail-main {
    grid-area: main;
    align-content: start;
}

.fivew2h-detail-side {
    grid-area: side;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    justify-self: end;
    min-width: max-content;
}

.fivew2h-library-copy h2,
.fivew2h-detail-copy h2 {
    margin: 0;
    max-width: none;
}

.fivew2h-detail-copy .app-hero-title {
    letter-spacing: -0.03em;
    line-height: 0.98;
}

.fivew2h-library-hero.app-title-scale--compact .app-hero-title,
.fivew2h-detail-card.app-title-scale--compact .app-hero-title {
    font-size: clamp(1.72rem, 2.15vw, 2.4rem);
}

.fivew2h-library-hero.app-title-scale--normal .app-hero-title,
.fivew2h-detail-card.app-title-scale--normal .app-hero-title {
    font-size: clamp(1.92rem, 2.4vw, 2.7rem);
}

.fivew2h-library-copy p,
.fivew2h-detail-copy p {
    margin: 0;
    max-width: 62ch;
    color: var(--text-muted);
    line-height: 1.45;
}

.fivew2h-library-tags,
.fivew2h-board-meta-tags,
.fivew2h-detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.fivew2h-detail-actions .btn {
    min-height: 42px;
    padding-inline: 14px;
}

.fivew2h-detail-actions .btn .icon-wrap,
.fivew2h-library-actions .btn .icon-wrap,
.fivew2h-workspace-actions .btn .icon-wrap {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
}

.fivew2h-library-tags,
.fivew2h-board-meta-tags {
    margin-top: 6px;
}

.fivew2h-library-actions {
    grid-area: actions;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.fivew2h-board-catalog {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 360px));
    gap: 20px;
    justify-content: start;
    align-items: stretch;
}

.fivew2h-board-card {
    width: min(100%, 360px);
    border: 1px solid var(--line);
    border-radius: 24px;
    background:
        radial-gradient(circle at 100% 0%, rgba(67, 187, 189, 0.18), transparent 34%),
        radial-gradient(circle at 0% 100%, rgba(255, 183, 77, 0.14), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    color: var(--text-main);
    text-align: left;
    font: inherit;
    padding: 22px;
    display: grid;
    gap: 16px;
    align-content: start;
    min-height: 292px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
    box-shadow:
        0 10px 24px rgba(12, 34, 52, 0.08),
        0 2px 6px rgba(12, 34, 52, 0.05);
}

.fivew2h-board-card:hover,
.fivew2h-board-card:focus-visible {
    outline: none;
    transform: translateY(-3px);
    border-color: rgba(67, 187, 189, 0.5);
    box-shadow:
        0 24px 44px rgba(4, 18, 30, 0.16),
        0 8px 18px rgba(9, 121, 185, 0.08);
}

.fivew2h-board-card-head,
.fivew2h-board-card-foot,
.fivew2h-board-card-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.fivew2h-board-card-kicker,
.fivew2h-board-card-date {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.fivew2h-board-card-copy {
    display: grid;
    gap: 10px;
}

.fivew2h-board-card-copy strong {
    font-size: 1.42rem;
    line-height: 1.06;
}

.fivew2h-board-card-copy p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.fivew2h-board-card-link strong {
    font-size: 1.18rem;
}

.fivew2h-board-card-link-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    border: 1px solid rgba(67, 187, 189, 0.18);
    background: rgba(67, 187, 189, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
}

.fivew2h-board-card-link-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.fivew2h-workspace {
    padding: 18px 20px;
    display: grid;
    gap: 18px;
}

.fivew2h-workspace-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.fivew2h-workspace-copy {
    display: grid;
    gap: 4px;
}

.fivew2h-workspace-copy strong {
    font-size: 1rem;
}

.fivew2h-workspace-copy span {
    color: var(--text-muted);
    line-height: 1.5;
}

.fivew2h-workspace-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.fivew2h-table-shell {
    width: 100%;
    overflow: auto;
    border: 1px solid rgba(67, 187, 189, 0.14);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.38));
}

.fivew2h-table {
    width: 100%;
    min-width: 1040px;
    border-collapse: separate;
    border-spacing: 0;
}

.fivew2h-table th,
.fivew2h-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(67, 187, 189, 0.08);
    vertical-align: top;
    text-align: left;
}

.fivew2h-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.fivew2h-table td {
    line-height: 1.5;
}

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

.fivew2h-cell-how {
    min-width: 280px;
}

.fivew2h-row-actions-cell {
    width: 88px;
}

.fivew2h-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fivew2h-row-action-btn {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(67, 187, 189, 0.18);
    background: rgba(67, 187, 189, 0.08);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.fivew2h-row-action-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.fivew2h-row-action-btn.is-danger {
    border-color: rgba(240, 90, 90, 0.24);
    background: rgba(240, 90, 90, 0.08);
    color: #c74d5d;
}

.fivew2h-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}

.fivew2h-modal-field {
    display: grid;
    gap: 8px;
}

@media (max-width: 1220px) {
    .fivew2h-library-hero,
    .fivew2h-detail-card {
        grid-template-columns: 1fr;
        grid-template-areas:
            "copy"
            "actions";
    }

    .fivew2h-detail-card {
        grid-template-areas:
            "main"
            "side";
    }

    .fivew2h-library-actions,
    .fivew2h-detail-side {
        justify-content: flex-start;
        justify-self: start;
        min-width: 0;
    }

    .fivew2h-board-catalog {
        grid-template-columns: minmax(0, 1fr);
    }

    .fivew2h-board-card {
        width: 100%;
        min-height: 0;
    }

    .fivew2h-modal-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .fivew2h-detail-actions {
        gap: 8px;
    }

    .fivew2h-detail-actions .btn {
        min-width: 44px;
        height: 44px;
        padding: 0 12px;
        justify-content: center;
    }

    .fivew2h-detail-actions .btn .icon-wrap {
        margin: 0;
    }

    .fivew2h-detail-actions .btn .icon-wrap + span {
        display: none;
    }
}

html[data-theme='dark'] .fivew2h-table-shell {
    background: rgba(6, 18, 32, 0.54);
    border-color: rgba(150, 212, 224, 0.12);
}

html[data-theme='dark'] .fivew2h-table th {
    background: rgba(8, 24, 41, 0.88);
}

html[data-theme='dark'] .fivew2h-row-action-btn {
    background: rgba(8, 24, 41, 0.74);
    border-color: rgba(150, 212, 224, 0.14);
}

html[data-theme='dark'] .fivew2h-row-action-btn.is-danger {
    background: rgba(130, 25, 45, 0.22);
    border-color: rgba(240, 90, 90, 0.28);
    color: #ff8d98;
}
