.card {
    position: absolute;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--card-shadow, 0 1px 2px rgba(60, 40, 30, 0.04), 0 8px 22px rgba(60, 40, 30, 0.06));
    cursor: grab;
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.22s ease,
                border-color 0.22s ease,
                opacity 0.3s ease;
    min-width: 0;
    z-index: 10;
    animation: cardAppear 0.5s ease backwards;
}

body[data-theme='dark'] .card {
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px rgba(0, 0, 0, 0.28);
}

/* Cards wear their region's hue (layers.js sets data-tone): a coloured top
   edge, drawn on ::before so every card variant keeps its own background
   and shadow. Bound the accent to the stripe instead of painting a full-card
   rounded border surface while the camera scales. */
.card[data-tone]::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    border-radius: inherit;
    background: color-mix(in srgb, var(--hue) 78%, transparent);
    pointer-events: none;
}

/* The heading has no card chrome, and the experience and AI system cards
   already carry their own variant accent on the top edge. */
.card.card-selected-heading::before,
.card.experience-role-card::before,
.card.ai-system-card::before {
    display: none;
}

/* Lift on hover: the card rises off the plate it sits on, lit in its hue. */
.card:hover {
    box-shadow: 0 2px 4px rgba(60, 40, 30, 0.05), 0 18px 38px color-mix(in srgb, var(--hue, #3C281E) 18%, rgba(60, 40, 30, 0.08));
    z-index: 20;
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--hue, var(--accent)) 38%, var(--card-border));
}

body[data-theme='dark'] .card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 22px 44px rgba(0, 0, 0, 0.4);
}

.card:active:not(.dragging) {
    transform: translateY(0) scale(0.992);
}

.card.dragging {
    cursor: grabbing;
    z-index: 100;
    box-shadow: 0 16px 48px rgba(60, 40, 30, 0.18);
    transform: scale(1.025);
}

.card.is-connection-source {
    border-color: color-mix(in srgb, var(--accent) 45%, transparent);
    box-shadow: 0 0 0 1.5px var(--accent-soft), 0 14px 36px rgba(122, 35, 49, 0.14);
}

.card.is-connection-neighbor {
    border-color: color-mix(in srgb, var(--connection-secondary) 70%, transparent);
    box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--connection-secondary) 30%, transparent), 0 12px 32px rgba(59, 110, 165, 0.12);
}

.card.is-tool-selected {
    outline: 2.5px solid var(--ring);
    outline-offset: 4px;
    z-index: 25;
}

.card-heading {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

.card-title { font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.3; }
.card-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.card-body { font-size: 14px; color: var(--text-secondary); line-height: 1.8; }
.card-body p { margin-bottom: 8px; }
.card-footer { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
    color: var(--hue-ink, var(--text-secondary));
    background: color-mix(in srgb, var(--hue-wash, var(--surface-sunken)) 70%, transparent);
    border: 1px solid color-mix(in srgb, var(--hue, var(--text-muted)) 20%, transparent);
    border-radius: 999px;
    cursor: default;
}

.tag.tag-available {
    color: var(--available);
    background: color-mix(in srgb, var(--available) 12%, transparent);
    border-color: color-mix(in srgb, var(--available) 28%, transparent);
}

.tag.tag-available::before {
    content: '';
    width: 6px;
    height: 6px;
    margin-right: 6px;
    border-radius: 50%;
    background: currentColor;
}

.modal-stack-pill {
    --tone-bg: rgba(214, 234, 248, 0.8);
    --tone-border: rgba(133, 193, 233, 0.55);
    --tone-text: #4a7fb5;
}

.tag-tone-sky {
    --tone-bg: rgba(214, 234, 248, 0.84);
    --tone-border: rgba(133, 193, 233, 0.58);
    --tone-text: #4277aa;
}

.tag-tone-mint {
    --tone-bg: rgba(212, 245, 224, 0.84);
    --tone-border: rgba(125, 211, 168, 0.56);
    --tone-text: #34885f;
}

.tag-tone-amber {
    --tone-bg: rgba(253, 235, 208, 0.88);
    --tone-border: rgba(240, 178, 122, 0.54);
    --tone-text: #b3742b;
}

.tag-tone-blush {
    --tone-bg: rgba(178, 58, 72, 0.08);
    --tone-border: rgba(178, 58, 72, 0.24);
    --tone-text: #8E2C3A;
}

.tag-tone-lilac {
    --tone-bg: rgba(232, 224, 240, 0.9);
    --tone-border: rgba(184, 169, 201, 0.54);
    --tone-text: #7d6b8d;
}

.card-skills { min-width: 0; }
.skills-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.card-quote {
    background: color-mix(in srgb, var(--accent) 5%, var(--card-bg));
    border-color: color-mix(in srgb, var(--accent) 16%, var(--card-border));
}

.quote-text { font-style: italic; font-size: 14px; color: var(--text); line-height: 1.9; margin-bottom: 10px; }
.quote-author { font-size: 13px; color: var(--text-muted); }

.card-sticky { min-width: 0; padding: 18px; }
.card[data-card="sticky-agent-native"],
.card[data-card="sticky-intj"],
.card[data-card="sticky-agent"],
.card[data-card="motto"] {
    min-width: 0;
}

.sticky-yellow { background: linear-gradient(135deg, #fef9e7, #fdebd0); border-color: rgba(243,156,18,0.15); }
.sticky-blue { background: linear-gradient(135deg, #ebf5fb, #d4e6f1); border-color: rgba(52,152,219,0.15); }
.sticky-pink { background: linear-gradient(135deg, #fdedec, #fadbd8); border-color: rgba(231,76,60,0.15); }
.sticky-purple { background: linear-gradient(135deg, var(--lavender), #f0e6ff); border-color: rgba(184,169,201,0.3); }
.sticky-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.sticky-body { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }

.card-hub {
    padding: 16px 18px;
    border-style: dashed;
    box-shadow: 0 10px 28px rgba(80, 90, 120, 0.08);
}

.card-hub:hover {
    transform: translateY(-1px);
}

.card-subhub {
    padding: 14px 16px;
}

.hub-label {
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 700;
}

.card-hub .sticky-title {
    margin-bottom: 6px;
}

.card-hub .sticky-body {
    font-size: 13px;
    line-height: 1.55;
}

.card-project { min-width: 0; }
.project-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.project-header > div:last-child { min-width: 0; }

/* Icon tiles come from one renderer (data/project-icons.js) for cards,
   Timeline, List and the detail header. The host class sets the size; the
   tile look lives here once. */
.icon-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Glyph tiles take their colours from the shared hue palette (base.css). */
.icon-tile[data-icon='glyph'] {
    color: var(--hue-ink);
    background: var(--hue-wash);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hue) 22%, transparent);
}

.icon-tile svg {
    width: 52%;
    height: 52%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* The shipped icons are pale watercolour tiles; on a white card their edge
   disappears, so a hairline ring and a soft shadow give the tile its shape. */
.icon-tile[data-icon='app'] img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 19%;
    box-shadow: 0 0 0 1px rgba(60, 40, 30, 0.1), 0 4px 10px rgba(60, 40, 30, 0.1);
}

.icon-tile[data-icon='brand'] {
    color: var(--on-brand);
    background: var(--brand-fill);
    box-shadow: inset 0 0 0 1px var(--brand-edge);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.project-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-icon[data-icon='app'] {
    width: 46px;
    height: 46px;
}

.card:hover .project-icon {
    transform: translateY(-1px) scale(1.06);
}

.project-name {
    font-weight: 700;
    color: var(--text);
    font-size: 15px;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}

.project-link {
    overflow-wrap: anywhere;
}
.project-link { font-size: 12px; color: var(--pink-dark); font-weight: 500; }
.project-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 12px; }
.project-summary {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 10px;
}

.project-points {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.project-point {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.65;
}

.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-tag,
.modal-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid var(--tone-border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.46)),
        var(--tone-bg);
    color: var(--tone-text);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 6px 18px rgba(88, 93, 122, 0.06);
}

.project-tag::before,
.modal-tag::before,
.modal-stack-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.72;
}

.project-tag {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(88, 93, 122, 0.1);
}

.card-click-hint {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover .card-click-hint { opacity: 0.5; }

.card-mini {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 118px;
}

.card-pill-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.mini-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.mini-card-copy {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.card-list,
.card-soft-quote,
.card-contact-card,
.card-collab-card,
.card-stats-card,
.card-links-card,
.card-terminal-note {
    min-height: 0;
}

.simple-list {
    list-style: none;
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.simple-list li {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    padding-left: 14px;
    position: relative;
}

.simple-list li::before {
    content: '✦';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--pink-dark);
    font-size: 11px;
}

.card-soft-quote {
    background: color-mix(in srgb, var(--accent) 5%, var(--card-bg));
}

.card-soft-quote-center {
    text-align: center;
}

.card-project-compact {
    padding: 24px;
    border-radius: var(--r-lg);
    background: var(--card-bg);
    box-shadow: var(--elev-1);
}

body[data-theme='dark'] .card-project-compact {
    background: var(--card-bg);
    box-shadow: var(--elev-1);
}

.card-project-compact:focus-visible {
    outline: 2px solid var(--accent-strong);
    outline-offset: 4px;
}

.card-project-compact .project-header > div:last-child {
    min-width: 0;
}

.card-project-compact[data-curated-group='main-projects'] .project-header {
    flex-direction: column;
    gap: 16px;
}

.card-project-compact[data-curated-group='main-projects'] .project-summary {
    margin-block: 16px 20px;
}

.card-project-compact[data-curated-group='main-projects'] .project-tags {
    padding-top: 16px;
    border-top: 1px solid var(--hairline);
}

.card-project-compact[data-curated-group='main-projects'] .project-breakdown-hint {
    margin-top: 16px;
}

.card-project-compact .project-header {
    align-items: flex-start;
    margin-bottom: 12px;
}

.card-project-compact .project-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--r-md);
    font-size: 16px;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease;
}

.card-project-compact:hover .project-icon {
    transform: translateY(-1px);
    box-shadow: var(--elev-1);
}

.card-project-compact .project-name {
    font-size: 16px;
    letter-spacing: -0.025em;
    line-height: 1.35;
}

.card-project-compact .project-link {
    color: var(--text-muted);
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
}

.card-project-compact .project-summary {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 12px;
}

.card-project-compact .project-tags {
    gap: 6px;
}

.card-project-compact .project-tag {
    padding: 5px 9px;
    font-size: 11px;
}

/* Shared editorial hierarchy; role-specific accents retain the canvas identity. */
.experience-role-card {
    --experience-accent: var(--pink-dark);
    --experience-soft: var(--pink-light);
    --experience-icon-bg: var(--pink-light);
    padding-top: 24px;
    overflow: hidden;
    border-top: 2px solid var(--experience-accent);
    background: var(--card-bg);
}

.experience-role-card[data-experience-variant='featured'] {
    --experience-accent: var(--mint-dark);
    --experience-soft: var(--mint);
    --experience-icon-bg: var(--mint);
}

.experience-role-card[data-experience-variant='signal'] {
    --experience-accent: var(--lavender-dark);
    --experience-soft: var(--lavender);
    --experience-icon-bg: var(--lavender);
}

.experience-role-card[data-experience-variant='operations'] {
    --experience-accent: var(--peach-dark);
    --experience-soft: var(--peach);
    --experience-icon-bg: var(--peach);
}

.experience-role-card .project-icon {
    background: var(--experience-icon-bg);
    box-shadow: 0 4px 12px rgba(88, 93, 122, 0.1);
}

.experience-role-kicker {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
}

.experience-role-card .project-header {
    margin-bottom: 13px;
}

.experience-lead-metric {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 20px 0 16px;
    padding-block: 16px;
    border-block: 1px solid var(--hairline);
}

.experience-lead-metric strong {
    color: var(--text);
    font-size: 36px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
}

.experience-lead-metric strong span {
    color: var(--text-secondary);
    font-size: 14px;
    letter-spacing: 0;
}

.experience-lead-metric > span {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
}

.experience-role-copy {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
}

.experience-signal-proof span {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.35;
}

.experience-signal-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    margin: 1px 0 12px;
    padding: 7px 9px;
    border: 1px solid var(--hairline-soft);
    border-radius: var(--r-sm);
    background: var(--surface-sunken);
}

.experience-signal-line span {
    color: var(--text-secondary);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.experience-signal-line i {
    color: var(--text-muted);
    font-size: 12px;
    font-style: normal;
}

.experience-signal-proof {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 11px 0 12px;
}

.experience-signal-proof span {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.experience-signal-proof span::before {
    content: '';
    width: 5px;
    height: 5px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--experience-accent);
}

.experience-ops-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    margin: 1px 0 13px;
}

.experience-ops-grid span {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 7px 6px;
    border: 1px solid var(--hairline-soft);
    border-radius: var(--r-sm);
    background: var(--surface-sunken);
    color: var(--text-secondary);
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
}

.experience-ops-grid b {
    color: var(--text-secondary);
    font-size: 10px;
    letter-spacing: 0.08em;
}

.experience-ops-note {
    margin: 10px 0 12px;
    padding-left: 9px;
    border-left: 2px solid var(--experience-accent);
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.5;
}

.experience-role-card .project-tags {
    margin-top: 2px;
}

body[data-motion='reduced'] .experience-role-card:hover .project-icon {
    transform: none;
}

.contact-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.contact-row:last-child {
    margin-bottom: 0;
}

.contact-row span:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    color: var(--hue-ink, var(--accent-strong));
    background: var(--hue-wash, var(--accent-soft));
    flex-shrink: 0;
}

.contact-row span:first-child svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact-row span:last-child {
    overflow-wrap: anywhere;
}

.cta-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

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

.stat-block {
    padding: 13px 14px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--hue-wash, var(--surface-sunken)) 55%, var(--surface-solid));
    border: 1px solid color-mix(in srgb, var(--hue, var(--text-muted)) 18%, transparent);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.stat-block:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--hue, var(--accent)) 40%, transparent);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--hue, #3C281E) 14%, transparent);
}

/* Figures use the brand serif, in the card's hue. */
.stat-block strong {
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 650;
    letter-spacing: -0.02em;
    color: var(--hue-ink, var(--text));
}

.stat-block span {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
}

.quick-link-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--hairline-soft);
}

.quick-link-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.quick-link-row strong {
    display: block;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 3px;
}

.quick-link-row span {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
}

.quick-link-row em {
    font-style: normal;
    color: var(--pink-dark);
    font-weight: 700;
    margin-top: 2px;
}

/* "Currently building" reads as a note in the same family, mono only for the lines. */
.terminal-note-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.terminal-note-line {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--text-secondary);
}

@media (max-width: 1180px) {
    .card {
        padding: 16px;
    }

    .card-title {
        font-size: 16px;
    }

    .card-project-compact .project-name {
        font-size: 13.5px;
    }

    .stats-grid {
        gap: 8px;
    }

    .card-body,
    .project-desc,
    .project-summary {
        font-size: 13.5px;
    }
}

@media (max-width: 767px) {
    .card {
        padding: 18px;
        border-radius: 15px;
    }

    .card-header {
        gap: 10px;
        margin-bottom: 12px;
    }

    .card-title,
    .project-name {
        font-size: 15px;
    }

    .card-subtitle,
    .project-link {
        font-size: 12px;
    }

    .card-body,
    .project-desc,
    .project-summary,
    .project-point,
    .sticky-body {
        font-size: 13px;
        line-height: 1.7;
    }

    .tag,
    .project-tag {
        font-size: 11px;
    }
}

@keyframes cardAppear {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Signals that a card opens a case study: a quiet text link in the accent,
   not a pill, so it reads as an action rather than another tag. */
.project-breakdown-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 12.5px;
    font-weight: 650;
    color: var(--pink-dark);
}

.project-breakdown-arrow {
    line-height: 1;
    transition: transform 0.2s ease;
}

.card-project:hover .project-breakdown-hint { text-decoration: underline; text-underline-offset: 3px; }
.card-project:hover .project-breakdown-arrow { transform: translateX(3px); }

body[data-theme='dark'] .project-breakdown-hint { color: var(--pink); }

body[data-motion='reduced'] .card-project:hover .project-breakdown-arrow { transform: none; }

/* Product shots: one 16:10 frame for every product card. */
.project-shot {
    margin: 4px 0 14px;
    aspect-ratio: 16 / 10;
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--surface-sunken);
    box-shadow: inset 0 0 0 1px var(--hairline);
}

.project-shot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.card-project:hover .project-shot img { transform: scale(1.03); }
body[data-motion='reduced'] .card-project:hover .project-shot img { transform: none; }

/* One headline number per product, the same serif figures as the case studies. */
.project-metric {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.project-metric strong {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--hue-ink);
}

.project-metric span {
    font-size: 12.5px;
    color: var(--text-muted);
}

/* Selected work is a readable entry into the same canvas, with the original
   project IDs and details. Reserve media/card geometry in both languages. */
.card.card-selected-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    min-height: 96px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    backdrop-filter: none;
    cursor: default;
}
.card.card-selected-heading:hover,
.card.card-featured:hover,
.card.card-featured:active:not(.dragging) { transform: none; }
body[data-theme='dark'] .card.card-selected-heading { background: none; box-shadow: none; }
.selected-eyebrow,
.featured-kicker {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.07em;
    color: var(--text-secondary);
}
.selected-eyebrow { color: var(--accent-strong); }
.card-selected-heading h2 {
    margin: 10px 0 8px;
    color: var(--text);
    font-family: var(--font-serif);
    font-size: 44px;
    font-weight: 650;
    line-height: 1.08;
    letter-spacing: -0.025em;
}
.card-selected-heading p { color: var(--text-secondary); font-size: 14.5px; line-height: 1.6; }
/* The heading is the one place YC appears on the canvas: holding a planet,
   standing on the edge of the selected cards (their tops hide his feet). */
.motion-enhanced .card.card-selected-heading { overflow: visible; }
.card.card-selected-heading { position: absolute; }
.selected-sticker {
    position: absolute;
    right: 6px;
    bottom: -30px;
    width: auto;
    height: 168px;
    pointer-events: none;
    filter: drop-shadow(0 10px 14px rgba(60, 40, 30, 0.18));
}
.selected-overview {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-height: 40px;
    margin-right: 118px;
    padding: 0 16px;
    background: var(--surface-solid);
    border: 1px solid color-mix(in srgb, var(--hue) 34%, var(--hairline));
    border-radius: 999px;
    color: var(--hue-ink);
    font: inherit;
    font-size: 13.5px;
    font-weight: 650;
    cursor: pointer;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}
.selected-overview:hover { background: var(--hue-wash); border-color: var(--hue); }
/* Each selected card previews its region's hue, so the front door already
   shows the map's colours: sky for AI, lilac for products, mint for field. */
.card.card-featured {
    display: flex;
    flex-direction: column;
    height: 520px;
    min-height: 520px;
    padding: 24px;
    border: 1px solid color-mix(in srgb, var(--hue) 30%, var(--hairline));
    border-radius: 20px;
    background: linear-gradient(158deg, color-mix(in srgb, var(--hue-wash) 72%, var(--surface-solid)), var(--surface-solid) 62%);
    box-shadow: var(--elev-1), 0 16px 40px -18px color-mix(in srgb, var(--hue) 40%, transparent);
    backdrop-filter: none;
    cursor: default;
}
.card.card-featured:hover { border-color: color-mix(in srgb, var(--hue) 55%, var(--hairline)); }
.featured-kicker { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; margin-bottom: 12px; color: var(--hue-ink); }
.featured-status {
    padding: 4px 9px;
    border: 1px solid color-mix(in srgb, var(--hue) 30%, transparent);
    border-radius: 999px;
    font-size: 10.5px;
    letter-spacing: 0.02em;
    color: var(--hue-ink);
    background: var(--hue-wash);
}
.card.card-featured .project-header { margin: 0 0 12px; min-height: 52px; gap: 0; }
.card.card-featured .project-name { margin: 0; color: var(--text); font-family: var(--font-serif); font-size: 27px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 650; }
.card.card-featured .project-link { margin-top: 8px; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.featured-retrieval {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 0 0 140px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--sky-dark) 26%, var(--hairline));
    border-radius: 12px;
    background: radial-gradient(circle, color-mix(in srgb, var(--sky-dark) 32%, transparent) 0.7px, transparent 0.8px) 0 0 / 12px 12px,
        color-mix(in srgb, var(--sky) 22%, var(--surface-solid));
}
.retrieval-input { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-secondary); }
.retrieval-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sky-dark); }
.retrieval-branches { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 12px; }
.retrieval-branches > div { position: relative; text-align: center; padding: 10px 4px; border: 1px solid var(--hairline); border-radius: 8px; background: var(--surface-solid); }
.retrieval-branches > div::before,
.retrieval-branches > div::after { position: absolute; left: 50%; content: ''; height: 12px; width: 1px; background: var(--sky-dark); }
.retrieval-branches > div::before { bottom: 100%; }
.retrieval-branches > div::after { top: 100%; }
.retrieval-branches strong { display: block; font-size: 12px; color: var(--text); font-weight: 650; }
.retrieval-branches span { display: block; margin-top: 4px; font: 10.5px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text-secondary); }
.retrieval-output { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--text-secondary); font-size: 11px; }
.retrieval-output i { font-style: normal; color: var(--sky-dark); }
.retrieval-output strong { color: var(--text); font-weight: 600; }
/* The field card reuses the retrieval diagram in its own mint hue. */
.featured-flow {
    border-color: color-mix(in srgb, var(--hue) 30%, var(--hairline));
    background: radial-gradient(circle, color-mix(in srgb, var(--hue) 34%, transparent) 0.7px, transparent 0.8px) 0 0 / 12px 12px,
        color-mix(in srgb, var(--hue-wash) 55%, var(--surface-solid));
}
.featured-flow .retrieval-dot { background: var(--hue); }
.featured-flow .retrieval-output i { color: var(--hue-ink); }
.featured-metric { display: flex; align-items: center; gap: 14px; margin: 18px 0 10px; }
.featured-metric > strong { flex-shrink: 0; font-family: var(--font-serif); font-size: 42px; font-weight: 600; line-height: 1; letter-spacing: -0.04em; color: var(--hue-ink); font-variant-numeric: tabular-nums; }
.featured-metric > strong span { font-size: 19px; font-weight: 500; letter-spacing: -0.03em; }
.featured-metric > span { max-width: 125px; font-size: 11px; line-height: 1.5; color: var(--text-secondary); }
.featured-summary { font-size: 14px; line-height: 1.65; color: var(--text-secondary); }
.featured-footer { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 12px; }
.featured-footnote { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--text-secondary); }
.featured-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 11px 13px;
    border: 1px solid color-mix(in srgb, var(--hue) 40%, var(--hairline));
    border-radius: 999px;
    background: var(--surface-solid);
    color: var(--hue-ink);
    font: inherit;
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.16s, border-color 0.16s, box-shadow 0.16s;
}
/* The first selected card carries the canvas's one primary action, in wine. */
.featured-rag .featured-action { background: var(--brand-fill); color: var(--on-brand); border-color: var(--brand-fill); box-shadow: 0 8px 22px rgba(178, 58, 72, 0.22); }
.featured-action:hover { background: var(--hue-wash); border-color: var(--hue); }
.featured-rag .featured-action:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.featured-action:focus-visible,
.selected-overview:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.featured-preview { position: relative; margin: 0; flex: 0 0 auto; border-radius: 12px; overflow: hidden; background: var(--cream); border: 1px solid var(--hairline); }
.featured-preview img { display: block; width: 100%; height: 166px; object-fit: cover; }
.featured-preview figcaption { display: flex; justify-content: space-between; align-items: center; min-height: 29px; padding: 6px 10px; color: var(--text-secondary); font-size: 10.5px; background: var(--surface-solid); border-top: 1px solid var(--hairline); }
.featured-product-line { margin: 18px 0 8px; color: var(--text); font-size: 17px; line-height: 1.4; font-weight: 600; letter-spacing: -0.025em; }
.featured-field .featured-kicker { font-size: 10.5px; }
.card.card-featured.featured-field .project-name { font-size: 22px; }
.featured-field-result { display: flex; flex-direction: column; padding: 8px 0 0; }
.field-result-label { font-size: 12px; line-height: 1.6; color: var(--text-secondary); }
.featured-field-result > strong { margin: 8px 0 4px; color: var(--hue-ink); font-family: var(--font-serif); font-size: 60px; line-height: 1; font-weight: 600; letter-spacing: -0.05em; }
.featured-field-result > strong span { font-size: 30px; font-weight: 450; }
.featured-field-result > span:last-of-type { color: var(--text-secondary); font-size: 13px; }
body[data-selected-columns='2'] .featured-field { height: auto; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
body[data-selected-columns='2'] .featured-field .featured-kicker { grid-column: 1 / -1; }
body[data-selected-columns='2'] .featured-field .project-header { grid-column: 1; }
body[data-selected-columns='2'] .featured-field .featured-field-result { grid-column: 2; grid-row: 2 / 5; padding-top: 0; border: 0; }
body[data-selected-columns='2'] .featured-field .featured-flow { grid-column: 1; }
body[data-selected-columns='2'] .featured-field .featured-footer { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
body[data-selected-columns='2'] .featured-field .featured-action { width: auto; min-width: 210px; }
body[data-selected-columns='1'] .card.card-selected-heading { flex-direction: column; align-items: flex-start; gap: 10px; min-height: 160px; }
body[data-selected-columns='1'] .card-selected-heading h2 { max-width: calc(100% - 78px); font-size: 32px; }
body[data-selected-columns='1'] .card-selected-heading p { max-width: calc(100% - 78px); font-size: 14px; }
body[data-selected-columns='1'] .selected-sticker { top: -4px; right: -4px; bottom: auto; height: 124px; }
body[data-selected-columns='1'] .selected-overview { margin-right: 0; }
body[data-selected-columns='1'] .card.card-featured { height: 520px; min-height: 520px; padding: 22px; }
body[data-selected-columns='1'] .card.featured-orbit { height: auto; min-height: 490px; }

/* Phones already have pinch zoom and Fit in the header. Keep the floating
   desktop zoom dock clear of full-width reading cards and their actions. */
@media (max-width: 600px) {
    body[data-view='canvas'] .chrome-island.canvas-dock { display: none; }
}
