.as-stage-detail,
.as-stage-preview {
    display: grid;
    gap: 1rem;
    color: var(--hpc-theme-content-text, var(--tenant-content-text, #1f2937));
}

.as-stage-detail__hero,
.as-stage-preview__banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--hpc-theme-border, var(--tenant-border, #d7e3ef));
    border-radius: 1rem;
    background: var(--hpc-theme-panel-bg, var(--tenant-panel-bg, #ffffff));
    color: var(--hpc-theme-panel-text, var(--tenant-panel-text, #1f2937));
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}

.as-stage-detail__hero-copy { min-width: 0; }
.as-stage-detail__hero h1,
.as-stage-preview__banner strong,
.as-stage-panel h1,
.as-stage-panel h2,
.as-stage-panel h3 {
    margin: 0;
    color: var(--hpc-theme-heading-text, var(--tenant-heading-text, #102a43));
}
.as-stage-detail__hero h1 { font-size: clamp(1.35rem, 2.2vw, 2rem); line-height: 1.15; }
.as-stage-detail__hero p,
.as-stage-preview__banner p,
.as-stage-panel__header p,
.as-stage-helper { margin: .35rem 0 0; color: color-mix(in srgb, var(--hpc-theme-content-text, #334155) 70%, transparent); }
.as-stage-detail__eyebrow { margin-bottom: .45rem; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--hpc-theme-primary, var(--tenant-primary, #1d4ed8)); }
.as-stage-detail__actions,
.as-stage-preview__banner-actions,
.as-stage-row-actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }

.as-stage-detail__badges,
.as-stage-chip-list,
.as-stage-progress-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; }
.as-stage-chip,
.as-stage-chip-list > span,
.as-stage-progress-chips > span {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: .25rem .62rem;
    border: 1px solid var(--hpc-theme-border, #d7e3ef);
    border-radius: 999px;
    background: var(--hpc-theme-soft-bg, var(--tenant-soft-bg, #eef4fa));
    color: var(--hpc-theme-content-text, #334155);
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.2;
}
.as-stage-chip--primary { background: var(--hpc-theme-primary, #1d4ed8); color: var(--hpc-theme-primary-text, #fff); border-color: transparent; }
.as-stage-chip--role { background: color-mix(in srgb, var(--hpc-theme-secondary, #0e7490) 12%, white); color: var(--hpc-theme-secondary, #0e7490); }

.as-stage-kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; }
.as-stage-kpi-grid article,
.as-stage-preview__context-grid article {
    padding: .9rem;
    border: 1px solid var(--hpc-theme-border, #d7e3ef);
    border-radius: .85rem;
    background: var(--hpc-theme-panel-bg, #fff);
}
.as-stage-kpi-grid span,
.as-stage-preview__context-grid span { display: block; font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: color-mix(in srgb, var(--hpc-theme-content-text, #334155) 62%, transparent); }
.as-stage-kpi-grid strong { display: block; margin-top: .2rem; font-size: 1.45rem; color: var(--hpc-theme-heading-text, #102a43); }

.as-stage-detail__grid,
.as-stage-preview__identity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.as-stage-panel {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--hpc-theme-border, #d7e3ef);
    border-radius: 1rem;
    background: var(--hpc-theme-panel-bg, #fff);
    color: var(--hpc-theme-panel-text, #1f2937);
    box-shadow: 0 5px 18px rgba(15, 23, 42, .035);
}
.as-stage-panel__header { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--hpc-theme-border, #d7e3ef); }
.as-stage-panel__header h2 { font-size: 1rem; }
.as-stage-panel__header p { font-size: .78rem; }

.as-stage-definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; padding: .4rem 1.1rem 1rem; }
.as-stage-definition-grid > div { min-width: 0; padding: .75rem .35rem; border-bottom: 1px dashed color-mix(in srgb, var(--hpc-theme-border, #d7e3ef) 80%, transparent); }
.as-stage-definition-grid dt { font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: color-mix(in srgb, var(--hpc-theme-content-text, #334155) 60%, transparent); }
.as-stage-definition-grid dd { margin: .2rem 0 0; overflow-wrap: anywhere; font-size: .86rem; font-weight: 700; color: var(--hpc-theme-panel-text, #1f2937); }
.as-stage-definition-grid code { white-space: normal; overflow-wrap: anywhere; }

.as-stage-copy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; padding: 0 1.1rem 1rem; }
.as-stage-copy-grid article,
.as-stage-list-block,
.as-stage-link-box { padding: .85rem; border-radius: .8rem; background: var(--hpc-theme-soft-bg, #eef4fa); }
.as-stage-copy-grid h3,
.as-stage-list-block h3 { margin: 0 0 .4rem; font-size: .78rem; }
.as-stage-copy-grid p { margin: 0; white-space: pre-wrap; font-size: .82rem; line-height: 1.55; }
.as-stage-link-box { margin: 0 1.1rem 1rem; display: grid; gap: .25rem; }
.as-stage-link-box span { font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.as-stage-link-box a { overflow-wrap: anywhere; color: var(--hpc-theme-primary, #1d4ed8); font-size: .8rem; font-weight: 700; }
.as-stage-list-block { margin: 0 1.1rem 1rem; }

.as-stage-table-wrap { overflow-x: auto; }
.as-stage-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.as-stage-table th,
.as-stage-table td { padding: .75rem .85rem; border-bottom: 1px solid var(--hpc-theme-border, #d7e3ef); text-align: left; vertical-align: top; }
.as-stage-table th { background: var(--hpc-theme-soft-bg, #eef4fa); color: var(--hpc-theme-heading-text, #102a43); font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; }
.as-stage-table td strong,
.as-stage-table td small { display: block; }
.as-stage-table td small { margin-top: .18rem; color: color-mix(in srgb, var(--hpc-theme-content-text, #334155) 65%, transparent); }
.as-stage-row-actions a { display: inline-flex; padding: .35rem .55rem; border: 1px solid var(--hpc-theme-border, #d7e3ef); border-radius: .55rem; color: var(--hpc-theme-content-text, #334155); font-weight: 700; text-decoration: none; white-space: nowrap; }
.as-stage-row-actions a.is-preview { background: var(--hpc-theme-primary, #1d4ed8); color: var(--hpc-theme-primary-text, #fff); border-color: transparent; }
.as-stage-empty { padding: 1.25rem; text-align: center; color: color-mix(in srgb, var(--hpc-theme-content-text, #334155) 65%, transparent); }

.as-stage-question-list { display: grid; gap: .75rem; padding: 1rem; }
.as-stage-question-list > article { padding: .9rem; border: 1px solid var(--hpc-theme-border, #d7e3ef); border-radius: .8rem; background: var(--hpc-theme-content-bg, #f8fafc); }
.as-stage-question-list header { display: flex; gap: .65rem; align-items: flex-start; }
.as-stage-question-list header > span { display: grid; place-items: center; flex: 0 0 1.8rem; height: 1.8rem; border-radius: .55rem; background: var(--hpc-theme-primary, #1d4ed8); color: var(--hpc-theme-primary-text, #fff); font-size: .72rem; font-weight: 900; }
.as-stage-question-list header strong,
.as-stage-question-list header small { display: block; }
.as-stage-question-list header small { margin-top: .12rem; color: color-mix(in srgb, var(--hpc-theme-content-text, #334155) 60%, transparent); }
.as-stage-question-list p { margin: .65rem 0; white-space: pre-wrap; line-height: 1.5; }
.as-stage-question-list ol { margin: .5rem 0 0 1.3rem; display: grid; gap: .3rem; }
.as-stage-helper { padding: 0 1rem 1rem; font-size: .75rem; }

.as-stage-preview__banner { border-left: .35rem solid var(--hpc-theme-primary, #1d4ed8); }
.as-stage-preview__banner > div:first-child > span { display: block; margin-bottom: .25rem; font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--hpc-theme-primary, #1d4ed8); }
.as-stage-preview__banner strong { display: block; font-size: 1.25rem; }
.as-stage-preview-notice { display: flex; flex-wrap: wrap; gap: .35rem .7rem; align-items: center; padding: .85rem 1rem; border: 1px solid var(--hpc-theme-border, #d7e3ef); border-radius: .8rem; font-size: .8rem; }
.as-stage-preview-notice--neutral { background: var(--hpc-theme-soft-bg, #eef4fa); }
.as-stage-preview-notice--warning { border-color: #f0c36a; background: #fff8e8; color: #7c4a03; }

.as-stage-tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; padding: 1rem; }
.as-stage-tool-grid article { display: flex; align-items: center; gap: .55rem; padding: .75rem; border: 1px solid var(--hpc-theme-border, #d7e3ef); border-radius: .75rem; background: var(--hpc-theme-soft-bg, #eef4fa); }
.as-stage-tool-grid article span { display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 999px; background: var(--hpc-theme-primary, #1d4ed8); color: var(--hpc-theme-primary-text, #fff); font-size: .7rem; }
.as-stage-tool-grid article strong { font-size: .78rem; }

.as-stage-preview__workspace { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); min-height: 440px; }
.as-stage-preview__workspace > aside { padding: 1rem; border-right: 1px solid var(--hpc-theme-border, #d7e3ef); background: var(--hpc-theme-soft-bg, #eef4fa); }
.as-stage-preview__stage-card { display: grid; gap: .22rem; padding: .85rem; border-radius: .8rem; background: var(--hpc-theme-primary, #1d4ed8); color: var(--hpc-theme-primary-text, #fff); }
.as-stage-preview__stage-card span,
.as-stage-preview__stage-card small { font-size: .68rem; opacity: .8; }
.as-stage-preview__workspace aside dl { display: grid; gap: .55rem; margin-top: 1rem; }
.as-stage-preview__workspace aside dl div { padding-bottom: .55rem; border-bottom: 1px dashed var(--hpc-theme-border, #d7e3ef); }
.as-stage-preview__workspace aside dt { font-size: .66rem; font-weight: 800; text-transform: uppercase; opacity: .65; }
.as-stage-preview__workspace aside dd { margin: .15rem 0 0; font-size: .78rem; font-weight: 700; }
.as-stage-preview__content { display: grid; align-content: start; gap: .85rem; padding: 1rem; background: var(--hpc-theme-content-bg, #f8fafc); }
.as-stage-preview__content > section { padding: .9rem; border: 1px solid var(--hpc-theme-border, #d7e3ef); border-radius: .8rem; background: var(--hpc-theme-panel-bg, #fff); }
.as-stage-preview__content h3 { margin: 0 0 .55rem; font-size: .86rem; }
.as-stage-preview__content p { margin: 0; white-space: pre-wrap; line-height: 1.55; }
.as-stage-preview__fake-control,
.as-stage-preview__answer-placeholder { padding: .75rem; border: 1px dashed var(--hpc-theme-border, #d7e3ef); border-radius: .65rem; background: var(--hpc-theme-soft-bg, #eef4fa); color: color-mix(in srgb, var(--hpc-theme-content-text, #334155) 70%, transparent); font-size: .78rem; }
.as-stage-preview-question { padding: .75rem 0; border-bottom: 1px solid var(--hpc-theme-border, #d7e3ef); }
.as-stage-preview-question:last-child { border-bottom: 0; }
.as-stage-preview-options { display: grid; gap: .35rem; margin-top: .55rem; }
.as-stage-preview-options span { padding: .55rem .65rem; border: 1px solid var(--hpc-theme-border, #d7e3ef); border-radius: .55rem; background: var(--hpc-theme-content-bg, #f8fafc); font-size: .78rem; }
.as-stage-preview__context-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.as-stage-preview__context-grid strong { display: block; margin-top: .2rem; overflow-wrap: anywhere; font-size: .8rem; }
.as-stage-preview__roster { display: grid; gap: .45rem; }
.as-stage-preview__roster article { display: flex; justify-content: space-between; gap: .7rem; padding: .65rem; border: 1px solid var(--hpc-theme-border, #d7e3ef); border-radius: .6rem; }
.as-stage-preview__roster strong,
.as-stage-preview__roster small { display: block; }
.as-stage-preview__roster small { margin-top: .12rem; opacity: .65; }
.as-stage-preview__roster article > span { align-self: center; font-size: .7rem; font-weight: 800; }
.as-stage-preview__fake-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .75rem; }
.as-stage-preview__fake-actions span { padding: .45rem .65rem; border-radius: .55rem; background: var(--hpc-theme-primary, #1d4ed8); color: var(--hpc-theme-primary-text, #fff); font-size: .72rem; font-weight: 800; }

@media (max-width: 1100px) {
    .as-stage-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .as-stage-preview__context-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .as-stage-detail__hero,
    .as-stage-preview__banner { flex-direction: column; }
    .as-stage-detail__grid,
    .as-stage-preview__identity-grid,
    .as-stage-preview__workspace { grid-template-columns: 1fr; }
    .as-stage-preview__workspace > aside { border-right: 0; border-bottom: 1px solid var(--hpc-theme-border, #d7e3ef); }
    .as-stage-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .as-stage-definition-grid,
    .as-stage-copy-grid,
    .as-stage-tool-grid,
    .as-stage-preview__context-grid { grid-template-columns: 1fr; }
}
