/* Project Assistant V2 — scoped consultation workspace. Do not restyle Quote .choice. */

.assistant-panel {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 1.1rem;
    background: rgba(8, 9, 9, 0.72);
    color: var(--paper);
}
.assistant-panel[hidden] { display: none !important; }

.asst-shell {
    display: grid;
    grid-template-columns: minmax(15.5rem, 32%) minmax(0, 1fr);
    width: min(94vw, 1280px);
    height: min(94vh, 900px);
    margin: auto;
    background: var(--fac-cinema);
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.asst-shell:focus { outline: none; }
.asst-shell > * { min-height: 0; }

.asst-visual {
    position: relative;
    min-height: 0;
    overflow: hidden;
    background: var(--fac-deep);
}
.asst-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 58% 30%;
    filter: saturate(0.86) brightness(0.78) contrast(1.04);
    transition: opacity 0.45s ease;
}
.asst-visual img.is-swap { opacity: 0.65; }
.asst-visual-veil {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(13, 14, 14, 0.18) 0%, rgba(13, 14, 14, 0.42) 46%, rgba(13, 14, 14, 0.88) 100%),
        linear-gradient(90deg, rgba(13, 14, 14, 0.12), transparent 40%);
    pointer-events: none;
}
.asst-visual-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.6rem 1.45rem 1.3rem;
}
.asst-visual-title {
    font-family: var(--sans);
    font-weight: 500;
    font-size: clamp(1.55rem, 2.1vw, 2.15rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
    color: var(--paper);
    margin: 0 0 0.85rem;
}
.asst-visual-lede {
    margin: 0 0 auto;
    max-width: 22ch;
    font-size: 0.92rem;
    line-height: 1.55;
    color: rgba(243, 239, 230, 0.72);
}
.asst-reassures {
    list-style: none;
    margin: 1.6rem 0 1.1rem;
    padding: 0;
    display: grid;
    gap: 0.95rem;
}
.asst-reassures li {
    display: grid;
    grid-template-columns: 1.15rem 1fr;
    gap: 0.7rem;
    align-items: start;
}
.asst-reassures svg,
.asst-privacy svg {
    width: 1.15rem;
    height: 1.15rem;
    color: var(--metal);
    margin-top: 0.12rem;
}
.asst-reassures strong {
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--paper);
    margin-bottom: 0.15rem;
}
.asst-reassures span {
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(243, 239, 230, 0.62);
}
.asst-privacy {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    color: rgba(243, 239, 230, 0.48);
}
.asst-privacy svg { margin-top: 0; }

.asst-workspace {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    background:
        linear-gradient(180deg, var(--fac-graph) 0%, var(--fac-deep) 100%);
}

.asst-kicker {
    margin: 0;
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--metal);
}
.asst-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.6rem 0.85rem;
    flex: 0 0 auto;
}
.asst-close {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: none;
    border: 0;
    color: rgba(243, 239, 230, 0.72);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.64rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.25rem 0;
}
.asst-close span {
    font-size: 1.05rem;
    line-height: 1;
    color: var(--paper);
}
.asst-close:hover { color: var(--metal-hi); }
.asst-close:focus { outline: none; }
.asst-close:focus-visible {
    outline: 1px solid var(--metal);
    outline-offset: 4px;
}

.asst-progress {
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin: 0;
    padding: 0 1.6rem 0.35rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.asst-progress::-webkit-scrollbar { display: none; }
.asst-progress li {
    position: relative;
    flex: 1 1 0;
    min-width: 4.6rem;
}
.asst-progress li + li::before {
    content: "";
    position: absolute;
    left: -12%;
    top: 0.62rem;
    width: 24%;
    border-top: 1px dotted rgba(243, 239, 230, 0.18);
}
.asst-progress button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.28rem;
    width: 100%;
    background: none;
    border: 0;
    padding: 0.15rem 0.2rem 0.35rem;
    color: rgba(243, 239, 230, 0.34);
    cursor: default;
    text-align: left;
}
.asst-progress button.is-done { cursor: pointer; color: rgba(243, 239, 230, 0.62); }
.asst-progress button.is-active { color: var(--metal-hi); cursor: default; }
.asst-progress-num {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    font-weight: 600;
}
.asst-progress-label {
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.asst-progress button.is-active .asst-progress-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    height: 1.2rem;
    padding: 0 0.28rem;
    background: var(--metal);
    color: var(--fac-cinema);
}
.asst-progress button.is-done .asst-progress-num {
    color: var(--metal);
}
.asst-progress button:focus-visible {
    outline: 1px solid var(--metal);
    outline-offset: 3px;
}

.asst-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    overflow: hidden;
}
.asst-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 0.4rem 1.6rem 0.4rem;
    max-width: 46rem;
}
.assistant-panel .assistant-step h2,
.asst-question {
    font-family: var(--sans);
    font-weight: 500;
    font-size: clamp(1.55rem, 2.4vw, 2.35rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
    text-transform: none;
    color: var(--paper);
    margin: 0 0 0.55rem;
}
.asst-question em {
    font-style: normal;
    color: var(--metal-hi);
}
.asst-question:focus { outline: none; }
.asst-step-index {
    margin: 0 0 0.45rem;
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(243, 239, 230, 0.42);
}
.asst-why {
    margin: 0 0 1.25rem;
    max-width: 42ch;
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(243, 239, 230, 0.62);
}

.asst-options {
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 0.7rem;
}
.asst-options--project { grid-template-columns: 1fr 1fr; }
.asst-options--project .asst-option:last-child { grid-column: 1 / -1; }
.asst-options--material,
.asst-options--style { grid-template-columns: 1fr 1fr; }

.asst-option {
    position: relative;
    display: grid;
    grid-template-columns: 1.7rem minmax(0, 1fr) 1rem;
    gap: 0.8rem;
    align-items: center;
    padding: 0.95rem 1rem;
    background: var(--fac-warm);
    border: 1px solid rgba(243, 239, 230, 0.08);
    border-radius: 6px;
    cursor: pointer;
    min-height: 4.4rem;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.asst-option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}
.asst-option-icon {
    width: 1.7rem;
    height: 1.7rem;
    color: var(--metal);
    display: flex;
}
.asst-option-icon svg {
    width: 100%;
    height: 100%;
}
.asst-option-copy { min-width: 0; display: grid; gap: 0.18rem; }
.asst-option-title {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--paper);
}
.asst-option-hint {
    display: block;
    font-size: 0.78rem;
    line-height: 1.35;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(243, 239, 230, 0.52);
}
.asst-option-check {
    width: 0.95rem;
    height: 0.95rem;
    color: var(--metal-hi);
    opacity: 0;
    transform: scale(0.86);
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.asst-option-check svg { width: 100%; height: 100%; }
.asst-option:hover {
    border-color: rgba(207, 168, 59, 0.28);
    background: var(--fac-raised);
}
.asst-option:has(input:checked) {
    border-color: var(--metal);
    background: var(--fac-raised);
    box-shadow: 0 0 0 1px rgba(207, 168, 59, 0.22);
}
.asst-option:has(input:checked) .asst-option-title,
.asst-option:has(input:checked) .asst-option-icon { color: var(--metal-hi); }
.asst-option:has(input:checked) .asst-option-check {
    opacity: 1;
    transform: scale(1);
}
.asst-option:focus-within {
    outline: 1px solid var(--metal);
    outline-offset: 2px;
}

.asst-fields {
    display: grid;
    gap: 1.15rem;
    max-width: 34rem;
}
.asst-field {
    display: grid;
    gap: 0.35rem;
}
.asst-field > span,
.asst-file-label {
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(243, 239, 230, 0.55);
}
.asst-field em,
.asst-file-label em {
    font-style: normal;
    letter-spacing: 0.08em;
    text-transform: none;
    color: rgba(243, 239, 230, 0.34);
}
.assistant-panel input,
.assistant-panel select,
.assistant-panel textarea {
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(243, 239, 230, 0.16);
    background: transparent;
    border-radius: 0;
    padding: 0.8rem 0 0.7rem;
    font-size: 1.05rem;
    color: var(--paper);
}
.assistant-panel input:focus,
.assistant-panel select:focus,
.assistant-panel textarea:focus {
    outline: none;
    border-bottom-color: var(--metal);
}
.assistant-panel textarea { min-height: 5.5rem; resize: vertical; }
.asst-field--file { position: relative; }
.asst-field--file input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.asst-file {
    display: grid;
    gap: 0.2rem;
    padding: 1rem 1.05rem;
    background: var(--fac-warm);
    border: 1px solid rgba(243, 239, 230, 0.1);
    border-radius: 6px;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
    color: inherit;
}
.asst-file-title {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--paper);
}
.asst-file-hint,
.asst-file-name {
    font-size: 0.8rem;
    color: rgba(243, 239, 230, 0.5);
}
.asst-file:hover,
.asst-field--file:focus-within .asst-file {
    border-color: var(--metal);
}

.asst-summary {
    display: grid;
    gap: 0.55rem 1.5rem;
    grid-template-columns: max-content 1fr auto;
    align-items: baseline;
    margin: 0 0 1.5rem;
    padding: 0 0 1.1rem;
    border-bottom: 1px solid rgba(243, 239, 230, 0.08);
}
.asst-summary:empty { display: none; }
.asst-summary div {
    display: contents;
}
.asst-summary dt {
    margin: 0;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(243, 239, 230, 0.42);
}
.asst-summary dd {
    margin: 0;
    font-size: 0.95rem;
    color: var(--paper);
}
.asst-summary button {
    background: none;
    border: 0;
    padding: 0;
    color: var(--metal);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.58rem;
    cursor: pointer;
}
.asst-summary button:hover { color: var(--metal-hi); }
.asst-summary button:focus-visible {
    outline: 1px solid var(--metal);
    outline-offset: 3px;
}

.asst-done { padding-top: 1.2rem; max-width: 28rem; }
.asst-ref {
    margin: 1.1rem 0 1.6rem;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--metal);
}
.asst-done-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.4rem;
}

.asst-error {
    margin: 0 1.6rem 0.4rem;
    max-width: 46rem;
}

.asst-nav {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 0.95rem 1.6rem 1.25rem;
    max-width: 46rem;
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--fac-deep), var(--fac-cinema));
}
.asst-back,
.asst-text-action {
    background: none;
    border: 0;
    color: rgba(243, 239, 230, 0.62);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.66rem;
    font-weight: 500;
    padding: 0.4rem 0;
    cursor: pointer;
}
.asst-back:hover,
.asst-text-action:hover { color: var(--paper); }
.asst-back:focus-visible,
.asst-text-action:focus-visible {
    outline: 1px solid var(--metal);
    outline-offset: 4px;
}
.asst-next {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.92rem 1.3rem;
    border: 0;
    background: linear-gradient(180deg, var(--metal-hi) 0%, var(--metal) 55%, var(--metal-deep) 100%);
    color: var(--fac-cinema);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.66rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border-radius: 0;
    transition: filter 0.2s ease, gap 0.2s ease, opacity 0.2s ease;
}
.asst-next--link { margin-left: 0; }
.asst-next-arrow { display: inline-block; transition: transform 0.2s ease; }
.asst-next:hover:not(:disabled) {
    filter: brightness(1.06);
    gap: 0.8rem;
}
.asst-next:hover:not(:disabled) .asst-next-arrow { transform: translateX(4px); }
.asst-next:disabled,
.asst-next[aria-disabled="true"] {
    background: var(--fac-raised);
    color: rgba(243, 239, 230, 0.38);
    opacity: 1;
    cursor: not-allowed;
    filter: none;
    gap: 0.55rem;
}
.asst-next:focus-visible {
    outline: 1px solid var(--metal-hi);
    outline-offset: 3px;
}

body.asst-open { overflow: hidden; }

@media (max-width: 1099px) {
    .asst-shell {
        grid-template-columns: minmax(13rem, 28%) minmax(0, 1fr);
        width: min(96vw, 1100px);
        height: min(96vh, 860px);
    }
    .asst-visual-lede,
    .asst-privacy { display: none; }
    .asst-reassures { margin-top: auto; }
}

@media (max-width: 899px) {
    .assistant-panel { padding: 0; background: var(--fac-cinema); }
    .asst-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        width: 100%;
        height: 100%;
        max-height: none;
    }
    .asst-visual { height: 7.2rem; }
    .asst-visual img { object-position: 50% 28%; filter: saturate(0.8) brightness(0.62); }
    .asst-visual-copy {
        padding: 0.9rem 1.15rem;
        justify-content: flex-end;
    }
    .asst-visual-title,
    .asst-visual-lede,
    .asst-reassures,
    .asst-privacy { display: none; }
    .asst-head { padding: 0.95rem 1.15rem 0.55rem; }
    .asst-progress { padding: 0 1.15rem 0.2rem; }
    .asst-body,
    .asst-nav,
    .asst-error { padding-left: 1.15rem; padding-right: 1.15rem; }
    .asst-options--project .asst-option:last-child { grid-column: auto; }
}

@media (max-width: 640px) {
    .asst-options--project,
    .asst-options--style { grid-template-columns: 1fr; }
    .asst-options--material { grid-template-columns: 1fr 1fr; }
    .asst-option { min-height: 4.1rem; padding: 0.85rem 0.85rem; }
    .asst-option-hint { display: none; }
    .asst-progress li { min-width: 3.6rem; flex: 0 0 auto; }
    .asst-question { font-size: clamp(1.4rem, 7vw, 1.85rem); }
    .asst-nav { padding-bottom: max(1.1rem, env(safe-area-inset-bottom)); }
}

@media (max-width: 430px) {
    .asst-visual { height: 5.4rem; }
    .asst-progress-label { display: none; }
    .asst-option-title { font-size: 0.74rem; }
}

@media (prefers-reduced-motion: reduce) {
    .asst-visual img,
    .asst-option,
    .asst-option-check,
    .asst-next,
    .asst-next-arrow { transition: none; }
}
