:root {
    --ws-canvas: #f8f4ec;
    --ws-surface: #ffffff;
    --ws-ink: #121212;
    --ws-muted: #6f6f68;
    --ws-forest: #073d2d;
    --ws-yellow: #f5b82e;
    --ws-border: #e5ded2;
    --ws-display: "Iowan Old Style", "Palatino Linotype", "Songti SC", Georgia, serif;
    --ws-ui: Inter, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;

    /* Accessible aliases for the legacy detail-page palettes. */
    --stone-gray: #5e5d59;
    --terracotta: #9a4429;
    --coral: #963f27;
    --focus-blue: #075e9e;
    --green: #176b38;
    --purple: #6340a4;
    --applegray: #59595f;
    --appleblue: #0057b8;
    --applegreen: #147a35;
    --appleorange: #9a4a00;
    --applepurple: #6d3aa5;
    --applered: #b4231a;
}

.ws-project-bar {
    position: relative;
    z-index: 1000;
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px clamp(16px, 4vw, 48px);
    border-bottom: 1px solid var(--ws-border);
    background: rgba(248, 244, 236, 0.96);
    color: var(--ws-forest);
    font-family: var(--ws-ui);
}

.ws-brand,
.ws-project-bar__links,
.ws-project-footer__links {
    display: flex;
    align-items: center;
}

.ws-brand {
    min-height: 44px;
    gap: 14px;
    color: var(--ws-forest);
    text-decoration: none;
}

.ws-brand__mark {
    width: 64px;
    height: 42px;
    flex: 0 0 auto;
}

.ws-brand__name {
    display: flex;
    align-items: center;
    gap: 16px;
    line-height: 1;
}

.ws-brand__wordmark {
    display: grid;
    gap: 5px;
}

.ws-brand__wordmark strong {
    font-size: 15px;
    letter-spacing: 0.26em;
    text-transform: uppercase;
}

.ws-brand__wordmark strong:last-child {
    font-size: 13px;
    letter-spacing: 0.48em;
}

.ws-brand__project {
    display: grid;
    min-height: 34px;
    align-content: center;
    gap: 3px;
    padding-left: 16px;
    border-left: 1px solid #c9c2b6;
    color: var(--ws-muted);
    font-size: 12px;
    line-height: 1.15;
}

.ws-brand__project small {
    color: var(--ws-muted);
    font-size: 11px;
}

.ws-project-bar__links {
    gap: 8px;
}

.ws-project-bar__links a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    border-radius: 999px;
    padding: 8px 14px;
    color: var(--ws-forest);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.ws-project-bar__links a:last-child {
    background: var(--ws-yellow);
    color: var(--ws-forest);
}

.ws-project-bar a:focus-visible,
.ws-project-footer a:focus-visible {
    outline: 3px solid #075e9e;
    outline-offset: 3px;
}

.archive-detail-nav a {
    min-height: 44px !important;
    align-items: center;
}

.archive-decision-title {
    margin: 0 0 8px;
    color: var(--ws-ink);
    font-family: var(--ws-ui);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.35;
}

/* Legacy visualizations use several pale status colors as small text. Keep
   their category backgrounds, but use one high-contrast foreground system. */
.tag,
.skill-tag,
.badge,
.philosophy-badge {
    color: var(--ws-forest) !important;
    font-weight: 700 !important;
}

.badge {
    background: var(--ws-border) !important;
}

.bad {
    color: #ffb4ab !important;
}

.range span {
    color: #d8d5cb !important;
}

.archive-dark-footer #chat > .section-header > p,
.archive-dark-footer footer:not(.ws-project-footer) p {
    color: #b0aea5 !important;
}

.archive-superpowers .chat-bubble .chat-name {
    color: #d8d5cb !important;
}

.archive-superpowers .chat-bubble .chat-text {
    color: #f5f4ed !important;
}

.archive-superpowers .chat-message {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
}

.animate-in {
    opacity: 1 !important;
    transform: none !important;
}

main p a,
section p a,
.content p a {
    text-decoration: underline !important;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.16em;
}

.ws-project-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: end;
    padding: 36px clamp(18px, 5vw, 64px);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    background: var(--ws-forest);
    color: #fff;
    font-family: var(--ws-ui);
}

.ws-project-footer strong {
    display: block;
    margin-bottom: 8px;
    font-family: var(--ws-display);
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.ws-project-footer p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1.7;
}

.ws-project-footer__links {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px 20px;
}

.ws-project-footer__links a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 680px) {
    .ws-project-bar {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        padding-block: 10px;
    }

    .ws-project-bar__links {
        width: 100%;
        justify-content: space-between;
    }

    .ws-brand__mark {
        width: 52px;
        height: 35px;
    }

    .ws-brand__wordmark strong {
        font-size: 13px;
    }

    .ws-brand__wordmark strong:last-child {
        font-size: 11px;
    }

    .ws-brand__project {
        padding-left: 12px;
        font-size: 11px;
    }

    .ws-project-footer {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .ws-project-footer__links {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
