/* VinDevs Guild & Partner Network, surface styles.

   Load position: linked from inside the page body, so it cascades AFTER all
   four shell stylesheets (render.css -> design-system.css -> vd-console.css ->
   dev-os.css) and after light-mode.css. Namespace: every selector is prefixed
   .vn- and nothing here styles a bare element.

   Rules this file obeys:
   - Tokens only. Colour comes from --ds-* or from color-mix over them. There
     are no literal hex values in this file. Gold is premium-only and never
     appears here; Partner status is expressed with weight, border and a small
     accent mark, not with a second brand colour.
   - Light mode is a NORMAL stylesheet in this codebase (the old !important
     whitewash was deleted). So the rule that matters here is the real one:
     never set a foreground without setting its background in the same rule.
   - --ds-accent (63% L) is accent TEXT and borders. --ds-accent-solid (54% L)
     is the BUTTON FILL behind --ds-accent-ink. Using the former as a fill
     fails AA at 3.38:1.
   - .app-shell carries a transform, so position:fixed/sticky resolves against
     it and not the viewport. Sticky is only used inside a local scroller.
   - Wide content scrolls inside .vn-scroll-x. The body never scrolls sideways.
   - Version with NETWORK_ASSET_VERSION in
     src/services/GuildNetworkService/definitions.ts. Bump it and restart:
     there is no --watch in this repo. */

/* ---------------------------------------------------------------------------
   Local scale. Derived from the shell tokens, nothing invented.
   --------------------------------------------------------------------------- */

.vn-page,
.vn-hero,
.vn-section,
.vn-card,
.vn-tier,
.vn-form,
.vn-queue,
.vn-empty {
    /* Type: seven steps. 2xs is reserved for UPPERCASE tracked micro-labels,
       where caps and tracking carry the size back up; never for sentences.
       Body copy floors at base (16px). */
    --vn-text-2xs: 0.75rem;
    --vn-text-xs: 0.8125rem;
    --vn-text-sm: 0.875rem;
    --vn-text-base: 1rem;
    --vn-text-lg: 1.125rem;
    --vn-text-xl: 1.375rem;
    --vn-text-2xl: 1.75rem;

    /* Three weights. Not five. */
    --vn-weight-normal: 400;
    --vn-weight-medium: 600;
    --vn-weight-bold: 700;

    /* Two surface radii plus a pill RESERVED for status chips, which are the
       one thing here that genuinely benefits from pill geometry. */
    --vn-radius-control: var(--ds-radius-sm, 8px);
    --vn-radius-card: var(--ds-radius-md, 12px);
    --vn-radius-pill: 999px;

    /* Motion: one duration, one easing, both from the shell's character. */
    --vn-duration: 160ms;
    --vn-ease: cubic-bezier(0.2, 0, 0.13, 1);

    /* Surfaces. Three levels is enough for this feature. */
    --vn-surface: var(--ds-surface, #1b1f22);
    --vn-surface-raised: var(--ds-canvas-raised, #16191c);
    --vn-border: var(--ds-border, rgba(128, 128, 128, 0.3));
    --vn-border-strong: var(--ds-border-strong, rgba(128, 128, 128, 0.5));
    --vn-text: var(--ds-text, #f2f4f5);
    --vn-text-muted: var(--ds-text-muted, #b6bcc0);
    --vn-text-subtle: var(--ds-text-subtle, #90979c);
    --vn-accent: var(--ds-accent, oklch(63% 0.19 260));
}

.vn-page {
    display: flex;
    flex-direction: column;
    /* Section rhythm is set here once. Individual sections vary their INTERNAL
       padding, never this gap, that is what stops every section reading as
       the same height. */
    gap: var(--space-64, 64px);
    padding-block: var(--space-32, 32px) var(--space-96, 96px);
    color: var(--vn-text);
}

/* ---------------------------------------------------------------------------
   Hero. Asymmetric two-column: the offer on the left, the network's actual
   shape on the right. Not centred.
   --------------------------------------------------------------------------- */

.vn-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: var(--space-48, 48px);
    align-items: start;
    padding-block-end: var(--space-24, 24px);
    border-block-end: 1px solid var(--vn-border);
}

.vn-eyebrow {
    margin: 0 0 var(--space-12, 12px);
    font-size: var(--vn-text-2xs);
    font-weight: var(--vn-weight-medium);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--vn-text-subtle);
    background: transparent;
}

.vn-hero__title {
    margin: 0 0 var(--space-16, 16px);
    font-size: var(--type-hero, clamp(2.25rem, 1.7rem + 2.4vw, 3.25rem));
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: var(--vn-weight-bold);
    color: var(--vn-text);
    background: transparent;
    text-wrap: balance;
}

.vn-hero__body {
    margin: 0 0 var(--space-24, 24px);
    max-width: 56ch;
    font-size: var(--vn-text-lg);
    line-height: 1.55;
    color: var(--vn-text-muted);
    background: transparent;
}

.vn-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-12, 12px);
    align-items: center;
}

.vn-hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8, 8px) var(--space-24, 24px);
    margin: var(--space-24, 24px) 0 0;
    padding: 0;
    list-style: none;
    font-size: var(--vn-text-sm);
    color: var(--vn-text-subtle);
}

.vn-hero__facts li {
    background: transparent;
}

/* The network diagram: VinDevs in the middle, communities around it. This is
   the one decorative-looking element in the feature and it is load-bearing,
   it is the argument the page is making. */
.vn-shape {
    padding: var(--space-24, 24px);
    border: 1px solid var(--vn-border);
    border-radius: var(--vn-radius-card);
    background: var(--vn-surface-raised);
    color: var(--vn-text);
}

.vn-shape__title {
    margin: 0 0 var(--space-16, 16px);
    font-size: var(--vn-text-sm);
    font-weight: var(--vn-weight-medium);
    color: var(--vn-text);
    background: transparent;
}

.vn-shape__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-8, 8px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.vn-shape__node {
    padding: var(--space-8, 8px);
    border: 1px solid var(--vn-border);
    border-radius: var(--vn-radius-control);
    background: var(--vn-surface);
    color: var(--vn-text-muted);
    font-size: var(--vn-text-2xs);
    text-align: center;
}

.vn-shape__node--hub {
    grid-column: 1 / -1;
    border-color: color-mix(in oklab, var(--vn-accent) 45%, transparent);
    background: color-mix(in oklab, var(--vn-accent) 10%, var(--vn-surface));
    color: var(--vn-text);
    font-weight: var(--vn-weight-medium);
    font-size: var(--vn-text-xs);
}

.vn-shape__note {
    margin: var(--space-16, 16px) 0 0;
    font-size: var(--vn-text-xs);
    line-height: 1.5;
    color: var(--vn-text-subtle);
    background: transparent;
}

/* ---------------------------------------------------------------------------
   Sections
   --------------------------------------------------------------------------- */

.vn-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-24, 24px);
}

.vn-section__head {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-16, 16px);
    align-items: end;
    justify-content: space-between;
}

.vn-section__heading {
    max-width: 62ch;
}

.vn-section__title {
    margin: 0;
    font-size: var(--type-h2, 2rem);
    line-height: 1.15;
    letter-spacing: -0.015em;
    font-weight: var(--vn-weight-bold);
    color: var(--vn-text);
    background: transparent;
}

.vn-section__lede {
    margin: var(--space-8, 8px) 0 0;
    font-size: var(--vn-text-base);
    line-height: 1.6;
    color: var(--vn-text-muted);
    background: transparent;
}

.vn-section__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8, 8px);
    align-items: center;
    font-size: var(--vn-text-sm);
}

/* ---------------------------------------------------------------------------
   Tier comparison. Deliberately NOT two identical cards: the free tier is the
   default and reads as plain prose; the paid tier is the one with a border and
   a price. Symmetry here would imply the two are alternatives, and they are
   not, one is the entry to the network, the other is a subscription on top.
   --------------------------------------------------------------------------- */

.vn-tiers {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: var(--space-24, 24px);
    align-items: start;
}

.vn-tier {
    display: flex;
    flex-direction: column;
    gap: var(--space-16, 16px);
    padding: var(--space-24, 24px);
    border-radius: var(--vn-radius-card);
    background: transparent;
    color: var(--vn-text);
}

.vn-tier--free {
    border: 1px solid var(--vn-border);
}

.vn-tier--paid {
    border: 1px solid var(--vn-border-strong);
    background: var(--vn-surface-raised);
}

.vn-tier__name {
    margin: 0;
    font-size: var(--vn-text-xl);
    font-weight: var(--vn-weight-bold);
    letter-spacing: -0.01em;
    color: var(--vn-text);
    background: transparent;
}

.vn-tier__price {
    margin: 0;
    font-size: var(--vn-text-sm);
    font-weight: var(--vn-weight-medium);
    color: var(--vn-text-muted);
    background: transparent;
}

.vn-tier__claim {
    margin: 0;
    font-size: var(--vn-text-base);
    line-height: 1.55;
    color: var(--vn-text-muted);
    background: transparent;
}

.vn-tier__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-8, 8px);
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--vn-text-sm);
    line-height: 1.5;
    color: var(--vn-text-muted);
}

.vn-tier__list li {
    padding-inline-start: var(--space-16, 16px);
    position: relative;
    background: transparent;
}

.vn-tier__list li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--vn-border-strong);
}

.vn-tier--paid .vn-tier__list li::before {
    background: color-mix(in oklab, var(--vn-accent) 70%, transparent);
}

.vn-tier__foot {
    margin-block-start: auto;
    padding-block-start: var(--space-8, 8px);
}

/* The rule the whole program rests on. Given its own treatment because it is
   the thing a reader is most likely to assume the opposite of. */
.vn-guardrail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-24, 24px);
    padding: var(--space-24, 24px);
    border: 1px solid var(--vn-border);
    border-inline-start: 3px solid
        color-mix(in oklab, var(--vn-accent) 70%, transparent);
    border-radius: var(--vn-radius-card);
    background: var(--vn-surface-raised);
    color: var(--vn-text);
}

.vn-guardrail__col h3 {
    margin: 0 0 var(--space-8, 8px);
    font-size: var(--vn-text-sm);
    font-weight: var(--vn-weight-medium);
    color: var(--vn-text);
    background: transparent;
}

.vn-guardrail__col ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-4, 4px);
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--vn-text-sm);
    line-height: 1.5;
    color: var(--vn-text-muted);
}

.vn-guardrail__col li {
    background: transparent;
}

/* ---------------------------------------------------------------------------
   Cards, used for standards, rules and directory entries.
   --------------------------------------------------------------------------- */

.vn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-16, 16px);
}

.vn-grid--wide {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* Numbered rules read as a list, not as a card grid: they are sequential
   prose, and boxing each one would be the "icon + title + two lines" pattern
   this project treats as an AI fingerprint. */
.vn-rules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-4, 4px) var(--space-32, 32px);
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: vn-rule;
}

.vn-rule {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--space-12, 12px);
    padding-block: var(--space-12, 12px);
    border-block-end: 1px solid var(--vn-border);
    background: transparent;
}

.vn-rule__index {
    counter-increment: vn-rule;
    font-size: var(--vn-text-xs);
    font-variant-numeric: tabular-nums;
    color: var(--vn-text-subtle);
    background: transparent;
    padding-block-start: 0.2em;
}

.vn-rule__index::before {
    content: counter(vn-rule, decimal-leading-zero);
}

.vn-rule__title {
    margin: 0 0 var(--space-4, 4px);
    font-size: var(--vn-text-sm);
    font-weight: var(--vn-weight-medium);
    color: var(--vn-text);
    background: transparent;
}

.vn-rule__detail {
    margin: 0;
    font-size: var(--vn-text-sm);
    line-height: 1.55;
    color: var(--vn-text-muted);
    background: transparent;
}

.vn-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-8, 8px);
    padding: var(--space-16, 16px);
    border: 1px solid var(--vn-border);
    border-radius: var(--vn-radius-card);
    background: var(--vn-surface-raised);
    color: var(--vn-text);
}

.vn-card__title {
    margin: 0;
    font-size: var(--vn-text-base);
    font-weight: var(--vn-weight-medium);
    color: var(--vn-text);
    background: transparent;
}

.vn-card__detail {
    margin: 0;
    font-size: var(--vn-text-sm);
    line-height: 1.55;
    color: var(--vn-text-muted);
    background: transparent;
}

/* ---------------------------------------------------------------------------
   Status chips. The one place pill geometry is used.
   --------------------------------------------------------------------------- */

.vn-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-4, 4px);
    padding: 2px var(--space-8, 8px);
    border: 1px solid var(--vn-border);
    border-radius: var(--vn-radius-pill);
    background: var(--vn-surface);
    color: var(--vn-text-muted);
    font-size: var(--vn-text-2xs);
    font-weight: var(--vn-weight-medium);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Partner is a subscription, not a quality claim: it gets the accent border
   but no fill, so it never outshouts a verification mark. */
.vn-chip--partner {
    border-color: color-mix(in oklab, var(--vn-accent) 55%, transparent);
    background: color-mix(in oklab, var(--vn-accent) 10%, var(--vn-surface));
    color: var(--vn-accent);
}

.vn-chip--verified {
    border-color: color-mix(in oklab, var(--ds-success, #3fb950) 50%, transparent);
    background: color-mix(
        in oklab,
        var(--ds-success, #3fb950) 10%,
        var(--vn-surface)
    );
    color: var(--ds-success, #3fb950);
}

.vn-chip--pending {
    border-color: color-mix(in oklab, var(--ds-warning, #d29922) 45%, transparent);
    background: color-mix(
        in oklab,
        var(--ds-warning, #d29922) 10%,
        var(--vn-surface)
    );
    color: var(--ds-warning, #d29922);
}

.vn-chip--danger {
    border-color: color-mix(in oklab, var(--ds-danger, #f85149) 45%, transparent);
    background: color-mix(
        in oklab,
        var(--ds-danger, #f85149) 10%,
        var(--vn-surface)
    );
    color: var(--ds-danger, #f85149);
}

/* ---------------------------------------------------------------------------
   Directory
   --------------------------------------------------------------------------- */

.vn-directory {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-16, 16px);
}

.vn-entry {
    display: flex;
    flex-direction: column;
    gap: var(--space-12, 12px);
    padding: var(--space-16, 16px);
    border: 1px solid var(--vn-border);
    border-radius: var(--vn-radius-card);
    background: var(--vn-surface-raised);
    color: var(--vn-text);
    transition:
        border-color var(--vn-duration) var(--vn-ease),
        transform var(--vn-duration) var(--vn-ease);
}

.vn-entry:hover {
    border-color: var(--vn-border-strong);
    transform: translateY(-2px);
}

.vn-entry__head {
    display: flex;
    gap: var(--space-12, 12px);
    align-items: start;
}

.vn-entry__mark {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    overflow: hidden;
    border: 1px solid var(--vn-border);
    border-radius: var(--vn-radius-control);
    background: var(--vn-surface);
    color: var(--vn-text-muted);
    font-size: var(--vn-text-sm);
    font-weight: var(--vn-weight-bold);
}

.vn-entry__mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vn-entry__name {
    margin: 0;
    font-size: var(--vn-text-base);
    font-weight: var(--vn-weight-medium);
    line-height: 1.3;
    color: var(--vn-text);
    background: transparent;
}

.vn-entry__name a {
    color: inherit;
    background: transparent;
    text-decoration: none;
}

.vn-entry__name a:hover {
    text-decoration: underline;
}

.vn-entry__chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4, 4px);
    margin-block-start: var(--space-4, 4px);
}

.vn-entry__tagline {
    margin: 0;
    font-size: var(--vn-text-sm);
    line-height: 1.5;
    color: var(--vn-text-muted);
    background: transparent;
}

.vn-entry__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4, 4px) var(--space-12, 12px);
    margin: 0;
    padding: 0;
    margin-block-start: auto;
    padding-block-start: var(--space-8, 8px);
    border-block-start: 1px solid var(--vn-border);
    list-style: none;
    font-size: var(--vn-text-xs);
    color: var(--vn-text-subtle);
}

.vn-entry__meta li {
    background: transparent;
}

/* ---------------------------------------------------------------------------
   Forms. One input family across the whole feature.
   --------------------------------------------------------------------------- */

.vn-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-32, 32px);
    max-width: 760px;
}

.vn-fieldset {
    display: flex;
    flex-direction: column;
    gap: var(--space-16, 16px);
    margin: 0;
    padding: var(--space-24, 24px);
    border: 1px solid var(--vn-border);
    border-radius: var(--vn-radius-card);
    background: var(--vn-surface-raised);
    color: var(--vn-text);
}

.vn-fieldset__legend {
    padding: 0;
    font-size: var(--vn-text-lg);
    font-weight: var(--vn-weight-medium);
    color: var(--vn-text);
    background: transparent;
}

.vn-fieldset__note {
    margin: var(--space-4, 4px) 0 0;
    font-size: var(--vn-text-sm);
    line-height: 1.55;
    color: var(--vn-text-muted);
    background: transparent;
}

.vn-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-8, 8px);
}

.vn-field__label {
    font-size: var(--vn-text-sm);
    font-weight: var(--vn-weight-medium);
    color: var(--vn-text);
    background: transparent;
}

.vn-field__required {
    margin-inline-start: var(--space-4, 4px);
    color: var(--ds-danger, #f85149);
    background: transparent;
}

.vn-field__help {
    margin: 0;
    font-size: var(--vn-text-xs);
    line-height: 1.5;
    color: var(--vn-text-subtle);
    background: transparent;
}

.vn-field input[type="text"],
.vn-field input[type="url"],
.vn-field textarea,
.vn-field select {
    width: 100%;
    padding: 10px var(--space-12, 12px);
    border: 1px solid var(--vn-border);
    border-radius: var(--vn-radius-control);
    background: var(--vn-surface);
    color: var(--vn-text);
    font: inherit;
    font-size: var(--vn-text-sm);
    line-height: 1.5;
    transition:
        border-color var(--vn-duration) var(--vn-ease),
        box-shadow var(--vn-duration) var(--vn-ease);
}

.vn-field textarea {
    min-height: 120px;
    resize: vertical;
}

.vn-field input::placeholder,
.vn-field textarea::placeholder {
    color: var(--vn-text-subtle);
    opacity: 1;
}

.vn-field input:focus-visible,
.vn-field textarea:focus-visible,
.vn-field select:focus-visible {
    outline: none;
    border-color: color-mix(in oklab, var(--vn-accent) 60%, transparent);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--vn-accent) 22%, transparent);
}

.vn-field--invalid input,
.vn-field--invalid textarea {
    border-color: color-mix(in oklab, var(--ds-danger, #f85149) 65%, transparent);
}

.vn-field__error {
    margin: 0;
    font-size: var(--vn-text-xs);
    line-height: 1.5;
    color: var(--ds-danger, #f85149);
    background: transparent;
}

.vn-field__counter {
    align-self: flex-end;
    font-size: var(--vn-text-2xs);
    font-variant-numeric: tabular-nums;
    color: var(--vn-text-subtle);
    background: transparent;
}

/* Checkbox rows: the acceptance control and anything else binary. */
.vn-check {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--space-12, 12px);
    align-items: start;
    padding: var(--space-12, 12px);
    border: 1px solid var(--vn-border);
    border-radius: var(--vn-radius-control);
    background: var(--vn-surface);
    color: var(--vn-text);
    cursor: pointer;
}

.vn-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--ds-accent-solid, var(--vn-accent));
}

.vn-check__text {
    font-size: var(--vn-text-sm);
    line-height: 1.55;
    color: var(--vn-text-muted);
    background: transparent;
}

.vn-check__text strong {
    color: var(--vn-text);
    background: transparent;
    font-weight: var(--vn-weight-medium);
}

.vn-check:focus-within {
    border-color: color-mix(in oklab, var(--vn-accent) 55%, transparent);
}

/* Invite validation readout. Server-rendered on redisplay, updated live by
   network.js when the field loses focus. */
.vn-invite-status {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-8, 8px) var(--space-16, 16px);
    align-items: center;
    padding: var(--space-12, 12px);
    border: 1px solid var(--vn-border);
    border-radius: var(--vn-radius-control);
    background: var(--vn-surface);
    color: var(--vn-text-muted);
    font-size: var(--vn-text-sm);
}

.vn-invite-status[data-state="ok"] {
    border-color: color-mix(in oklab, var(--ds-success, #3fb950) 45%, transparent);
    background: color-mix(
        in oklab,
        var(--ds-success, #3fb950) 8%,
        var(--vn-surface)
    );
    color: var(--vn-text);
}

.vn-invite-status[data-state="error"] {
    border-color: color-mix(in oklab, var(--ds-danger, #f85149) 45%, transparent);
    background: color-mix(
        in oklab,
        var(--ds-danger, #f85149) 8%,
        var(--vn-surface)
    );
    color: var(--vn-text);
}

.vn-invite-status[data-state="checking"] {
    color: var(--vn-text-subtle);
}

.vn-invite-status__facts {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4, 4px) var(--space-12, 12px);
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: var(--vn-text-xs);
    color: var(--vn-text-subtle);
}

.vn-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-12, 12px);
    align-items: center;
}

.vn-form__note {
    margin: 0;
    font-size: var(--vn-text-sm);
    line-height: 1.55;
    color: var(--vn-text-subtle);
    background: transparent;
}

/* ---------------------------------------------------------------------------
   Feedback: banners, empty states, timelines
   --------------------------------------------------------------------------- */

.vn-banner {
    display: flex;
    flex-direction: column;
    gap: var(--space-4, 4px);
    padding: var(--space-16, 16px);
    border: 1px solid var(--vn-border);
    border-inline-start: 3px solid var(--vn-border-strong);
    border-radius: var(--vn-radius-control);
    background: var(--vn-surface-raised);
    color: var(--vn-text);
    font-size: var(--vn-text-sm);
    line-height: 1.55;
}

.vn-banner--error {
    border-inline-start-color: var(--ds-danger, #f85149);
}

.vn-banner--success {
    border-inline-start-color: var(--ds-success, #3fb950);
}

.vn-banner--warning {
    border-inline-start-color: var(--ds-warning, #d29922);
}

.vn-banner__title {
    margin: 0;
    font-size: var(--vn-text-sm);
    font-weight: var(--vn-weight-medium);
    color: var(--vn-text);
    background: transparent;
}

.vn-banner__body {
    margin: 0;
    color: var(--vn-text-muted);
    background: transparent;
}

.vn-empty {
    display: flex;
    flex-direction: column;
    gap: var(--space-8, 8px);
    padding: var(--space-32, 32px);
    border: 1px dashed var(--vn-border);
    border-radius: var(--vn-radius-card);
    background: transparent;
    color: var(--vn-text-muted);
}

.vn-empty__title {
    margin: 0;
    font-size: var(--vn-text-base);
    font-weight: var(--vn-weight-medium);
    color: var(--vn-text);
    background: transparent;
}

.vn-empty__body {
    margin: 0;
    max-width: 60ch;
    font-size: var(--vn-text-sm);
    line-height: 1.55;
    color: var(--vn-text-muted);
    background: transparent;
}

.vn-timeline {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vn-timeline__item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--space-12, 12px);
    padding-block: var(--space-12, 12px);
    border-block-end: 1px solid var(--vn-border);
    background: transparent;
}

.vn-timeline__item:last-child {
    border-block-end: none;
}

.vn-timeline__when {
    font-size: var(--vn-text-xs);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--vn-text-subtle);
    background: transparent;
}

.vn-timeline__what {
    margin: 0;
    font-size: var(--vn-text-sm);
    line-height: 1.5;
    color: var(--vn-text-muted);
    background: transparent;
}

.vn-timeline__what strong {
    color: var(--vn-text);
    background: transparent;
    font-weight: var(--vn-weight-medium);
}

/* ---------------------------------------------------------------------------
   Review queue (superuser console). Denser than the public surfaces on
   purpose: it is a working list, not a page to read.
   --------------------------------------------------------------------------- */

.vn-scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.vn-queue {
    display: flex;
    flex-direction: column;
    gap: var(--space-8, 8px);
}

.vn-queue__row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto auto;
    gap: var(--space-16, 16px);
    align-items: center;
    padding: var(--space-12, 12px) var(--space-16, 16px);
    border: 1px solid var(--vn-border);
    border-radius: var(--vn-radius-control);
    background: var(--vn-surface-raised);
    color: var(--vn-text);
    transition: border-color var(--vn-duration) var(--vn-ease);
}

.vn-queue__row:hover {
    border-color: var(--vn-border-strong);
}

.vn-queue__row[data-claimed="true"] {
    border-inline-start: 3px solid
        color-mix(in oklab, var(--vn-accent) 60%, transparent);
}

.vn-queue__name {
    margin: 0;
    font-size: var(--vn-text-sm);
    font-weight: var(--vn-weight-medium);
    color: var(--vn-text);
    background: transparent;
}

.vn-queue__name a {
    color: inherit;
    background: transparent;
    text-decoration: none;
}

.vn-queue__name a:hover {
    text-decoration: underline;
}

.vn-queue__meta {
    margin: var(--space-4, 4px) 0 0;
    font-size: var(--vn-text-xs);
    color: var(--vn-text-subtle);
    background: transparent;
}

/* Two-column review layout: the application on the left, the decision on the
   right. The decision panel sticks inside its own scroller, .app-shell's
   transform makes viewport-relative sticky unreliable. */
.vn-review {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: var(--space-24, 24px);
    align-items: start;
}

.vn-answer {
    padding-block: var(--space-16, 16px);
    border-block-end: 1px solid var(--vn-border);
    background: transparent;
}

.vn-answer__q {
    margin: 0 0 var(--space-4, 4px);
    font-size: var(--vn-text-xs);
    font-weight: var(--vn-weight-medium);
    letter-spacing: 0.02em;
    color: var(--vn-text-subtle);
    background: transparent;
}

.vn-answer__a {
    margin: 0;
    font-size: var(--vn-text-sm);
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--vn-text);
    background: transparent;
}

.vn-decision {
    display: flex;
    flex-direction: column;
    gap: var(--space-16, 16px);
    padding: var(--space-16, 16px);
    border: 1px solid var(--vn-border-strong);
    border-radius: var(--vn-radius-card);
    background: var(--vn-surface-raised);
    color: var(--vn-text);
}

.vn-decision__actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-8, 8px);
}

.vn-note {
    padding-block: var(--space-8, 8px);
    border-block-end: 1px solid var(--vn-border);
    background: transparent;
}

.vn-note__meta {
    margin: 0 0 2px;
    font-size: var(--vn-text-2xs);
    color: var(--vn-text-subtle);
    background: transparent;
}

.vn-note__body {
    margin: 0;
    font-size: var(--vn-text-sm);
    line-height: 1.5;
    white-space: pre-wrap;
    color: var(--vn-text-muted);
    background: transparent;
}

/* Definition list used for the invite facts and plan state. */
.vn-facts {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--space-4, 4px) var(--space-16, 16px);
    margin: 0;
    font-size: var(--vn-text-sm);
}

.vn-facts dt {
    color: var(--vn-text-subtle);
    background: transparent;
}

.vn-facts dd {
    margin: 0;
    color: var(--vn-text);
    background: transparent;
}

/* ---------------------------------------------------------------------------
   Dashboard
   --------------------------------------------------------------------------- */

.vn-dash {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: var(--space-24, 24px);
    align-items: start;
}

.vn-dash__aside {
    display: flex;
    flex-direction: column;
    gap: var(--space-16, 16px);
}

.vn-dash__main {
    display: flex;
    flex-direction: column;
    gap: var(--space-32, 32px);
}

.vn-switcher {
    display: flex;
    flex-direction: column;
    gap: var(--space-4, 4px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.vn-switcher a {
    display: block;
    padding: var(--space-8, 8px) var(--space-12, 12px);
    border: 1px solid transparent;
    border-radius: var(--vn-radius-control);
    background: transparent;
    color: var(--vn-text-muted);
    font-size: var(--vn-text-sm);
    text-decoration: none;
    transition:
        background var(--vn-duration) var(--vn-ease),
        color var(--vn-duration) var(--vn-ease);
}

.vn-switcher a:hover {
    background: var(--vn-surface);
    color: var(--vn-text);
}

.vn-switcher a[aria-current="page"] {
    border-color: var(--vn-border);
    background: var(--vn-surface);
    color: var(--vn-text);
    font-weight: var(--vn-weight-medium);
}

/* Metric readouts. Numbers only where a number is genuinely known, this
   feature never renders a placeholder statistic. */
.vn-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-16, 16px);
}

.vn-metric {
    padding: var(--space-16, 16px);
    border: 1px solid var(--vn-border);
    border-radius: var(--vn-radius-control);
    background: var(--vn-surface-raised);
    color: var(--vn-text);
}

.vn-metric__value {
    margin: 0;
    font-size: var(--vn-text-2xl);
    font-weight: var(--vn-weight-bold);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--vn-text);
    background: transparent;
}

.vn-metric__label {
    margin: var(--space-4, 4px) 0 0;
    font-size: var(--vn-text-xs);
    color: var(--vn-text-subtle);
    background: transparent;
}

/* ---------------------------------------------------------------------------
   Responsive. Composition changes; the system does not.
   --------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .vn-hero,
    .vn-tiers,
    .vn-review,
    .vn-dash {
        grid-template-columns: minmax(0, 1fr);
    }

    .vn-hero {
        gap: var(--space-32, 32px);
    }
}

@media (max-width: 720px) {
    .vn-page {
        gap: var(--space-48, 48px);
        padding-block-end: var(--space-64, 64px);
    }

    .vn-fieldset,
    .vn-guardrail {
        padding: var(--space-16, 16px);
    }

    /* Three columns leaves 71px per node at 375px, which wraps "Creator
       programs" onto three lines. Two columns keeps every node on one or two. */
    .vn-shape__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vn-queue__row {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--space-8, 8px);
    }

    .vn-section__head {
        align-items: start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vn-entry,
    .vn-queue__row,
    .vn-switcher a,
    .vn-field input,
    .vn-field textarea {
        transition: none;
    }

    .vn-entry:hover {
        transform: none;
    }
}

/* ---------------------------------------------------------------------------
   Light mode. A separate composition, not an inversion.

   light-mode.css is a normal stylesheet here, so these rules only need to be
   more specific than the defaults above, no !important. Every rule below sets
   a background alongside its foreground, which is the rule that made 305
   invisible-text runs go to zero across this codebase.
   --------------------------------------------------------------------------- */

html[data-color-mode="light"] .vn-page,
html[data-color-mode="light"] .vn-hero,
html[data-color-mode="light"] .vn-section,
html[data-color-mode="light"] .vn-card,
html[data-color-mode="light"] .vn-tier,
html[data-color-mode="light"] .vn-form,
html[data-color-mode="light"] .vn-queue,
html[data-color-mode="light"] .vn-empty {
    --vn-surface: var(--ds-surface, #ffffff);
    --vn-surface-raised: var(--ds-canvas-raised, #f7f8fa);
    --vn-border: var(--ds-border, rgba(20, 24, 28, 0.14));
    --vn-border-strong: var(--ds-border-strong, rgba(20, 24, 28, 0.26));
    --vn-text: var(--ds-text, #14181c);
    --vn-text-muted: var(--ds-text-muted, #48515a);
    --vn-text-subtle: var(--ds-text-subtle, #6a737c);
}

/* On light surfaces the accent needs less lightness to stay readable as text.
   Both properties move together so the pair is always legible. */
html[data-color-mode="light"] .vn-chip--partner {
    background: color-mix(in oklab, var(--vn-accent) 8%, #ffffff);
    color: color-mix(in oklab, var(--vn-accent) 82%, #000000);
}

html[data-color-mode="light"] .vn-shape__node--hub {
    background: color-mix(in oklab, var(--vn-accent) 7%, #ffffff);
    color: var(--vn-text);
}
