:root {
    color-scheme: light;
    --ink: #2d1823;
    --muted: #765d69;
    --line: #ecd6df;
    --surface: #fff9fb;
    --canvas: #f8e8ef;
    --brand: #c92f68;
    --brand-dark: #a32254;
    --soft: #fbdde9;
    --success: #137a52;
    --danger: #b63737;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
[data-temporarily-hidden] { display: none !important; }

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 85% 5%, #f5bfd3 0, transparent 30rem),
        radial-gradient(circle at 5% 45%, #fce1ea 0, transparent 25rem),
        var(--canvas);
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --ink: #f8edf3;
    --muted: #bda9b4;
    --line: #49313e;
    --surface: #211720;
    --canvas: #100c12;
    --soft: #3a1d2b;
}

:root[data-theme="dark"] body {
    background:
        radial-gradient(circle at 85% 5%, #3b1627 0, transparent 30rem),
        radial-gradient(circle at 5% 45%, #24131c 0, transparent 25rem),
        var(--canvas);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select {
    color: var(--ink);
    border-color: var(--line);
    background: #171118;
}

:root[data-theme="dark"] .brand-mark,
:root[data-theme="dark"] .mode-panel,
:root[data-theme="dark"] .landing-chat,
:root[data-theme="dark"] .chat-message > div,
:root[data-theme="dark"] .chat-composer,
:root[data-theme="dark"] .analysis-form,
:root[data-theme="dark"] .result-card,
:root[data-theme="dark"] .score-card,
:root[data-theme="dark"] .summary-card,
:root[data-theme="dark"] .opportunity-card,
:root[data-theme="dark"] .preview-card,
:root[data-theme="dark"] .feedback-card {
    color: var(--ink);
    border-color: var(--line);
    background: rgba(31, 22, 30, .95);
}

:root[data-theme="dark"] .intent-panel {
    color: var(--ink);
    border-color: var(--line);
    background: rgba(33, 23, 32, .96);
    box-shadow: 0 16px 38px rgba(0, 0, 0, .24);
}

:root[data-theme="dark"] .intent-option {
    color: var(--ink);
    border-color: #5a3a49;
    background: #181218;
}

:root[data-theme="dark"] .intent-option:hover,
:root[data-theme="dark"] .intent-option.selected {
    color: var(--ink);
    border-color: var(--brand);
    background: #3a1d2b;
}

:root[data-theme="dark"] .intent-option span {
    color: var(--muted);
}

:root[data-theme="dark"] .thought-cloud {
    color: var(--ink);
    border-color: #5a3a49;
    background: rgba(33, 23, 32, .97);
    box-shadow: 0 16px 38px rgba(0, 0, 0, .28);
}

:root[data-theme="dark"] .thought-cloud::before,
:root[data-theme="dark"] .thought-cloud::after,
:root[data-theme="dark"] .thought-dot {
    border-color: #5a3a49;
    background: #211720;
}

:root[data-theme="dark"] .thought-dot {
    box-shadow: 0 0 0 1px #5a3a49;
}

button, input, select { font: inherit; }

.shell {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 80px;
}

.hero {
    position: relative;
    padding: 28px 0 44px;
}
.hero > .hero-menu.site-menu-host {
    position: absolute;
    top: 26px;
    right: 0;
}

.hero-auth {
    position: absolute;
    z-index: 70;
    top: 26px;
    right: 0;
    display: flex;
    align-items: stretch;
    visibility: hidden;
}

.hero-auth[hidden] {
    display: none;
}

.hero-auth.is-ready {
    visibility: visible;
}

.hero-auth a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid var(--brand);
    font-size: .82rem;
    font-weight: 850;
    text-decoration: none;
}

.hero-register {
    border-radius: 13px 0 0 13px;
    color: var(--brand-dark);
    background: #fbdde9;
}

.hero-login {
    margin-left: -1px;
    border-radius: 0 13px 13px 0;
    color: white;
    background: var(--brand);
}

.hero-auth a:hover {
    color: white;
    background: var(--brand-dark);
}

:root[data-theme="dark"] .hero-register {
    color: #ffdbe9;
    background: #3a1d2b;
}

.brand {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 249, 251, .72);
    box-shadow: 0 8px 20px rgba(201, 47, 104, .16);
}

.brand-mark img {
    display: block;
    width: 34px;
    height: 34px;
    transition: transform .45s ease;
}

.brand:hover .brand-mark img {
    transform: rotate(18deg) scale(1.06);
}

.brand small {
    margin-left: 3px;
    padding: 3px 6px;
    border-radius: 6px;
    color: var(--brand-dark);
    background: var(--soft);
    font-size: .62rem;
    letter-spacing: .08em;
    vertical-align: middle;
}

.eyebrow {
    margin: 54px 0 10px;
    color: var(--brand-dark);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

h1 {
    max-width: 680px;
    margin: 0;
    font-size: clamp(2.2rem, 4.8vw, 4rem);
    line-height: 1.02;
    letter-spacing: -.045em;
}

.intro {
    max-width: 680px;
    margin: 20px 0 12px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.65;
}

.intent-panel {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(220px, .65fr) minmax(0, 1.35fr);
    gap: 22px;
    align-items: center;
    margin: 22px 0 18px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 249, 251, .82);
    box-shadow: 0 16px 38px rgba(128, 42, 77, .08);
}

.intent-panel h2 { margin: 0; font-size: 1.35rem; }
.intent-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.intent-option {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #e7c9d5;
    border-radius: 15px;
    color: var(--ink);
    background: white;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.intent-option:hover, .intent-option.selected {
    border-color: var(--brand);
    background: #fff1f6;
    box-shadow: 0 8px 20px rgba(201,47,104,.1);
}
.intent-option strong { font-size: .92rem; }
.intent-option span { color: var(--muted); font-size: .78rem; line-height: 1.45; }
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.landing-chat{margin-top:30px;padding:clamp(22px,4vw,42px);border:1px solid var(--border);border-radius:28px;background:rgba(255,253,254,.88);box-shadow:0 26px 70px rgba(112,42,72,.10)}
.chat-heading{display:flex;align-items:end;justify-content:space-between;gap:25px;margin-bottom:25px}
.chat-heading h2{margin:2px 0 0;font-size:clamp(1.7rem,3vw,2.5rem)}
.brief-progress{width:min(220px,35%);height:6px;overflow:hidden;border-radius:999px;background:#f2dce5}
.brief-progress span{display:block;width:5%;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--brand),#e987aa);transition:width .45s ease}
.chat-messages{display:flex;flex-direction:column;gap:16px;max-height:520px;min-height:190px;padding:8px 5px 20px;overflow-y:auto;scroll-behavior:smooth}
.chat-message{display:flex;align-items:flex-start;gap:11px}
.chat-message>div{max-width:min(76%,680px);padding:14px 17px;border-radius:7px 20px 20px 20px;background:#fff;border:1px solid #efd5df;box-shadow:0 8px 22px rgba(88,35,58,.06)}
.chat-message p{margin:0;line-height:1.62;white-space:normal}
.chat-message.user{justify-content:flex-end}
.chat-message.user>div{color:#fff;background:var(--brand);border-color:var(--brand);border-radius:20px 7px 20px 20px}
.chat-message.user p{white-space:pre-wrap}
.chat-avatar{display:block;flex:0 0 46px;width:46px;height:46px;padding:0;background:transparent}
.chat-avatar img{display:block;width:100%;height:100%}
.chat-message.is-thinking>div{display:flex;gap:5px;padding-block:20px}
.chat-message.is-thinking i{width:7px;height:7px;border-radius:50%;background:var(--brand);animation:chat-dot 1s ease-in-out infinite}
.chat-message.is-thinking i:nth-child(2){animation-delay:.14s}.chat-message.is-thinking i:nth-child(3){animation-delay:.28s}
@keyframes chat-dot{0%,100%{transform:translateY(0);opacity:.4}50%{transform:translateY(-5px);opacity:1}}
.chat-composer{display:grid;grid-template-columns:1fr auto;gap:10px;padding:8px;border:1px solid #e5c5d2;border-radius:20px;background:#fff}
.chat-composer:focus-within{border-color:var(--brand);box-shadow:0 0 0 3px rgba(201,47,104,.11)}
.chat-composer textarea{width:100%;min-height:50px;max-height:150px;padding:12px 10px;resize:vertical;border:0;outline:0;background:transparent;color:var(--ink);font:inherit}
.chat-composer button,.build-landing-page{align-self:end;min-height:48px;padding:0 23px;border:0;border-radius:14px;color:#fff;background:var(--brand);font-weight:800;cursor:pointer}
.chat-composer button:disabled{opacity:.6;cursor:wait}.chat-note{margin:10px 4px 0;color:var(--muted);font-size:.76rem}
.chat-footer-note{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.learning-consent{display:flex;align-items:flex-start;gap:8px;max-width:430px;margin-top:10px;color:var(--muted);font-size:.72rem;line-height:1.45;cursor:pointer}
.learning-consent input{flex:0 0 auto;margin-top:2px;accent-color:var(--brand)}
.build-landing-page{display:block;width:100%;margin-top:18px;background:linear-gradient(100deg,var(--brand),#8d3fc7)}

.assistant-guide {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
    gap: 24px;
    align-items: center;
    margin: 4px 0 18px;
}

.assistant-orb-wrap {
    display: grid;
    min-height: 244px;
    place-items: center;
}

.ai-singularity {
    position: relative;
    width: 214px;
    height: 214px;
    transform: translateZ(0);
    transform-origin: center;
    filter: drop-shadow(0 22px 28px rgba(121, 27, 69, .18));
}

.singularity-core,
.energy-shell,
.energy-ribbon,
.energy-orbit,
.idea-particle {
    position: absolute;
    display: block;
}

.singularity-core {
    z-index: 5;
    inset: 66px;
    border: 1px solid rgba(255, 199, 220, .82);
    border-radius: 50%;
    background:
        radial-gradient(circle at 38% 32%, #27202b 0, #09070c 48%, #000 76%);
    box-shadow:
        0 0 12px rgba(255, 255, 255, .75),
        0 0 30px rgba(239, 77, 145, .68),
        inset -7px -9px 18px #000;
    animation: core-idle 3.8s ease-in-out infinite;
}

.energy-shell {
    z-index: 3;
    inset: 39px;
    border-radius: 48% 52% 44% 56% / 58% 43% 57% 42%;
    background: conic-gradient(
        from 20deg,
        transparent 0 8%,
        #f45f9a 18%,
        #ffd6e4 29%,
        #fff 34%,
        #ef4b91 48%,
        transparent 61%,
        #9f3cf0 76%,
        #53d9ff 88%,
        transparent 100%
    );
    filter: blur(1.2px);
    opacity: .86;
    -webkit-mask: radial-gradient(circle, transparent 48%, #000 53% 70%, transparent 75%);
    mask: radial-gradient(circle, transparent 48%, #000 53% 70%, transparent 75%);
}

.energy-shell-one {
    animation: energy-spin 5.8s linear infinite, energy-morph 3.4s ease-in-out infinite;
}

.energy-shell-two {
    inset: 50px;
    opacity: .7;
    transform: rotate(120deg);
    animation: energy-spin-reverse 4.6s linear infinite,
        energy-morph-alt 2.9s ease-in-out infinite;
}

.energy-ribbon {
    z-index: 4;
    top: 81px;
    left: 35px;
    width: 144px;
    height: 55px;
    border: 3px solid transparent;
    border-top-color: #ffb9d3;
    border-right-color: #f4488c;
    border-radius: 50%;
    filter: drop-shadow(0 0 8px rgba(240, 55, 132, .9));
}

.energy-ribbon-one {
    transform: rotate(14deg);
    animation: ribbon-sweep 3.2s ease-in-out infinite;
}

.energy-ribbon-two {
    transform: rotate(104deg) scale(.78);
    border-top-color: #65dfff;
    border-right-color: #9e55f3;
    animation: ribbon-sweep-alt 2.7s ease-in-out infinite;
}

.energy-orbit {
    z-index: 2;
    border: 1px solid rgba(202, 52, 112, .3);
    border-right-color: rgba(255, 255, 255, .9);
    border-bottom-color: rgba(236, 76, 141, .72);
    border-radius: 50%;
}

.energy-orbit-one {
    inset: 19px;
    animation: orbit-spin 8s linear infinite;
}

.energy-orbit-two {
    inset: 7px 30px;
    transform: rotate(63deg);
    animation: orbit-spin-reverse 10s linear infinite;
}

.idea-particle {
    z-index: 7;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 10px #f44c91, 0 0 18px #ff9ec1;
}

.idea-particle-one {
    top: 36px;
    right: 44px;
    animation: particle-drift 3.4s ease-in-out infinite;
}

.idea-particle-two {
    right: 19px;
    bottom: 64px;
    width: 5px;
    height: 5px;
    animation: particle-drift 2.6s .5s ease-in-out infinite reverse;
}

.idea-particle-three {
    bottom: 26px;
    left: 55px;
    width: 4px;
    height: 4px;
    animation: particle-drift 3s 1s ease-in-out infinite;
}

.thought-cloud {
    position: relative;
    padding: 24px 26px;
    border: 1px solid #edc5d5;
    border-radius: 36px;
    background: rgba(255, 249, 251, .95);
    box-shadow: 0 16px 38px rgba(128, 42, 77, .1);
}

.thought-cloud::before,
.thought-cloud::after {
    position: absolute;
    border: 1px solid #edc5d5;
    border-radius: 50%;
    content: "";
    background: var(--surface);
}

.thought-cloud::before {
    top: 18px;
    right: 48px;
    width: 52px;
    height: 52px;
    transform: translateY(-32px);
}

.thought-cloud::after {
    top: 13px;
    right: 91px;
    width: 36px;
    height: 36px;
    transform: translateY(-24px);
}

.thought-dot {
    position: absolute;
    z-index: 2;
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 0 0 1px #edc5d5;
}

.thought-dot-one {
    top: 26px;
    left: -23px;
    width: 16px;
    height: 16px;
}

.thought-dot-two {
    top: 42px;
    left: -9px;
    width: 10px;
    height: 10px;
}

.thought-greeting {
    margin: 0 0 5px;
    color: var(--brand-dark);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.thought-cloud h2 {
    margin: 0;
    font-size: clamp(1.25rem, 2.5vw, 1.7rem);
    line-height: 1.15;
}

.thought-cloud > p:last-child {
    margin: 11px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.assistant-guide.is-thinking .ai-singularity {
    animation: singularity-think 1.05s ease-in-out infinite;
    filter: drop-shadow(0 18px 35px rgba(205, 37, 105, .4));
}

.assistant-guide.is-thinking .energy-shell-one {
    animation-duration: .78s, .7s;
}

.assistant-guide.is-thinking .energy-shell-two {
    animation-duration: .62s, .58s;
}

.assistant-guide.is-thinking .energy-orbit-one,
.assistant-guide.is-thinking .energy-orbit-two {
    animation-duration: .9s;
}

.assistant-guide.is-complete .ai-singularity {
    animation: singularity-complete .85s ease-out 1;
}

.assistant-guide.is-thinking .thought-cloud {
    animation: thought-float 1.35s ease-in-out infinite;
}

@keyframes energy-spin { to { transform: rotate(360deg); } }
@keyframes energy-spin-reverse { to { transform: rotate(-360deg); } }
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes orbit-spin-reverse { to { transform: rotate(-297deg); } }
@keyframes core-idle {
    0%, 100% { transform: scale(.94); }
    50% { transform: scale(1.05); }
}
@keyframes energy-morph {
    0%, 100% { border-radius: 48% 52% 44% 56% / 58% 43% 57% 42%; }
    50% { border-radius: 58% 42% 57% 43% / 44% 56% 45% 55%; }
}
@keyframes energy-morph-alt {
    0%, 100% { border-radius: 42% 58% 53% 47% / 56% 46% 54% 44%; }
    50% { border-radius: 55% 45% 41% 59% / 43% 57% 48% 52%; }
}
@keyframes ribbon-sweep {
    0%, 100% { transform: rotate(14deg) scaleX(.86); }
    50% { transform: rotate(194deg) scaleX(1.12); }
}
@keyframes ribbon-sweep-alt {
    0%, 100% { transform: rotate(104deg) scale(.72); }
    50% { transform: rotate(-76deg) scale(.9); }
}
@keyframes particle-drift {
    0%, 100% { transform: translate(0, 0) scale(.75); opacity: .45; }
    50% { transform: translate(-14px, 11px) scale(1.25); opacity: 1; }
}
@keyframes singularity-think {
    0%, 100% { transform: scale(.82) rotate(-3deg); }
    50% { transform: scale(1.08) rotate(3deg); }
}
@keyframes singularity-complete {
    0% { transform: scale(.86); filter: brightness(1); }
    48% { transform: scale(1.14); filter: brightness(1.4); }
    100% { transform: scale(1); filter: brightness(1); }
}

@keyframes thought-float {
    0%, 100% { transform: translateY(3px); }
    50% { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
    .ai-singularity *,
    .assistant-guide.is-thinking .ai-singularity,
    .assistant-guide.is-thinking .thought-cloud,
    .assistant-guide.is-complete .ai-singularity {
        animation: none;
    }
}

.analysis-form {
    width: 100%;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 247, 250, .9);
    box-shadow: 0 18px 50px rgba(128, 42, 77, .1);
}

.analysis-form label, .toolbar label {
    display: block;
    margin-bottom: 8px;
    font-size: .88rem;
    font-weight: 700;
}

.url-control { display: flex; gap: 10px; }

input, select {
    min-width: 0;
    border: 1px solid #cbd3e0;
    border-radius: 11px;
    color: var(--ink);
    background: white;
}

input {
    flex: 1;
    padding: 14px 16px;
}

input:focus, select:focus {
    outline: 3px solid rgba(201, 47, 104, .18);
    border-color: var(--brand);
}

button {
    border: 0;
    border-radius: 11px;
    padding: 14px 20px;
    color: white;
    background: var(--brand);
    cursor: pointer;
    font-weight: 800;
}

button:hover { background: var(--brand-dark); }
button:disabled { cursor: wait; opacity: .65; }

.form-note {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: .82rem;
}

.status {
    position: relative;
    margin-bottom: 22px;
    padding: 14px 17px 14px 48px;
    border: 1px solid #efbfd2;
    border-radius: 12px;
    color: var(--brand-dark);
    background: var(--soft);
}

.status::before {
    position: absolute;
    top: 50%;
    left: 17px;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 7px;
    content: "";
    background: url("../images/sitegenius-isotype.svg") center / contain no-repeat;
    transform: translateY(-50%);
}

.status.success { color: var(--success); background: #eaf8f2; border-color: #bde5d5; }
.status.error { color: var(--danger); background: #fff0f0; border-color: #f1c8c8; }

.results {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(128, 42, 77, .1);
}

.result-heading {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    justify-content: space-between;
}

.result-heading .eyebrow { margin: 0 0 8px; }
.result-heading h2 { margin: 0 0 6px; font-size: 1.8rem; }
.result-heading a { color: var(--muted); overflow-wrap: anywhere; }

.score {
    display: flex;
    min-width: 105px;
    align-items: baseline;
    justify-content: center;
    padding: 14px;
    border-radius: 16px;
    color: var(--brand-dark);
    background: var(--soft);
}

.score strong { font-size: 2rem; }
.score span { color: var(--muted); font-size: .85rem; }

.assistant-response {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 13px;
    margin: 26px 0;
    padding: 18px;
    border: 1px solid #edc5d5;
    border-radius: 18px;
    background: linear-gradient(135deg, #fff3f7, #fff9fb);
}

.redesign-ideas {
    margin: 0 0 28px;
    padding: 22px;
    border: 1px solid #edc5d5;
    border-radius: 18px;
    background: #fff3f7;
}

.redesign-ideas-heading {
    display: flex;
    gap: 20px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 16px;
}

.redesign-ideas-heading h3 { margin: 0; font-size: 1.3rem; }
.redesign-ideas-heading > p {
    max-width: 430px;
    margin: 0;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.5;
}

.redesign-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.redesign-option {
    position: relative;
    display: grid;
    gap: 9px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: white;
    cursor: pointer;
}

.redesign-option.selected {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(201,47,104,.12);
}

.redesign-option input { position: absolute; top: 14px; right: 14px; }
.redesign-option h4 { margin: 0; padding-right: 25px; font-size: 1rem; }
.redesign-option > p { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.redesign-option ul { margin: 2px 0 0; padding-left: 18px; color: var(--muted);
    font-size: .76rem; line-height: 1.55; }

#create-temporary-site { display: block; margin-left: auto; }

.assistant-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 249, 251, .9);
    box-shadow: 0 8px 18px rgba(201, 47, 104, .2);
}

.assistant-avatar img {
    display: block;
    width: 34px;
    height: 34px;
}

.assistant-name {
    margin: 0 0 5px;
    color: var(--brand-dark);
    font-size: .78rem;
    font-weight: 850;
}

.summary {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.performance-results {
    margin: 0 0 28px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff1f6;
}

.performance-heading {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.performance-heading h3 { margin: 0; }

.performance-score {
    display: flex;
    min-width: 82px;
    align-items: baseline;
    justify-content: center;
    color: var(--brand-dark);
}

.performance-score strong { font-size: 1.65rem; }
.performance-score span { color: var(--muted); font-size: .78rem; }

.performance-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.performance-metric {
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
}

.performance-metric span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: .72rem;
}

.performance-metric strong { font-size: 1rem; }

.performance-note {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.45;
}

.analysis-layout {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    gap: 24px;
    align-items: start;
}

.preview-panel {
    position: sticky;
    top: 18px;
}

.panel-heading, .findings-header {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 14px;
}

.panel-label {
    margin: 0 0 4px;
    color: var(--brand-dark);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.panel-heading h3, .findings-header h3 { margin: 0; }
.panel-heading a {
    color: var(--brand-dark);
    font-size: .85rem;
    font-weight: 750;
}

.preview-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.secondary-button {
    border: 1px solid #edb7cc;
    padding: 9px 12px;
    color: var(--brand-dark);
    background: var(--soft);
    font-size: .78rem;
}

.secondary-button:hover { color: white; background: var(--brand-dark); }
.secondary-button:disabled { cursor: default; opacity: .5; }

.preview-browser {
    overflow: hidden;
    border: 1px solid #cfd6e2;
    border-radius: 16px;
    background: white;
    box-shadow: 0 14px 36px rgba(40, 47, 74, .1);
}

.preview-browser.improved {
    border-color: var(--brand);
    box-shadow: 0 14px 40px rgba(201, 47, 104, .2);
}

.preview-browser.improved .preview-bar {
    background: var(--soft);
}

.preview-bar {
    display: flex;
    gap: 6px;
    align-items: center;
    min-height: 42px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    background: #f1f3f7;
}

.preview-bar span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #c3c9d4;
}

.preview-bar span:first-child { background: #ef7d7d; }
.preview-bar span:nth-child(2) { background: #e9bd62; }
.preview-bar span:nth-child(3) { background: #68bf84; }

.preview-bar strong {
    min-width: 0;
    margin-left: 8px;
    overflow: hidden;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#site-preview {
    display: block;
    width: 100%;
    height: 650px;
    border: 0;
    background: #f7f8fb;
}

.preview-unavailable {
    display: grid;
    min-height: 460px;
    padding: 42px 28px;
    place-content: center;
    text-align: center;
    background: #fff4f7;
}

.preview-unavailable[hidden] { display: none; }

.preview-unavailable-mark {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: var(--brand);
    font-size: 1.4rem;
    font-weight: 900;
}

.preview-unavailable h4 {
    margin: 0 0 10px;
    font-size: 1.2rem;
}

.preview-unavailable > p {
    max-width: 440px;
    margin: 0 auto;
    color: var(--muted);
    line-height: 1.55;
}

.preview-unavailable > div {
    max-width: 440px;
    margin: 20px auto 0;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    text-align: left;
    background: var(--surface);
}

.preview-unavailable > div p {
    margin: 5px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.preview-note {
    margin: 10px 4px 0;
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.45;
}

.opportunities { display: grid; gap: 14px; }

.category-section {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff1f6;
}

.category-heading {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    margin-bottom: 14px;
}

.category-heading .panel-label {
    grid-column: 1;
}

.category-heading h3 {
    grid-column: 1;
    margin: 0;
    font-size: 1.15rem;
}

.category-heading > span {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    color: var(--brand-dark);
    background: var(--soft);
    font-size: .8rem;
    font-weight: 800;
}

.category-items {
    display: grid;
    gap: 10px;
}

.opportunity {
    padding: 21px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: white;
}

.opportunity-meta { display: flex; gap: 8px; }
.opportunity-meta span {
    padding: 5px 8px;
    border-radius: 7px;
    color: var(--brand-dark);
    background: var(--soft);
    font-size: .72rem;
    font-weight: 800;
}
.opportunity-meta .priority.high { color: #9d2929; background: #ffebeb; }
.opportunity-meta .priority.medium { color: #8a5b00; background: #fff4d8; }
.opportunity-meta .priority.low { color: #29664b; background: #e6f5ee; }
.opportunity h3 { margin: 14px 0 8px; }
.opportunity > p { margin: 0; color: var(--muted); line-height: 1.55; }
.recommendation {
    margin-top: 16px;
    padding: 14px;
    border-radius: 11px;
    background: #f7f8fb;
}
.recommendation p { margin: 5px 0 0; line-height: 1.55; }
.empty { color: var(--muted); }

@media (max-width: 620px) {
    .chat-footer-note{display:block}
    .chat-heading{display:block}
    .brief-progress{width:100%;max-width:none;margin-top:15px}
    .chat-message>div{max-width:86%}
    .chat-composer{grid-template-columns:1fr}
    .chat-composer button{width:100%}
    .shell { width: min(100% - 22px, 1080px); padding-top: 16px; }
    .url-control { flex-direction: column; }
    .results { padding: 22px 16px; }
    .result-heading { flex-direction: column; }
    .score { order: -1; }
    .panel-heading, .findings-header { align-items: flex-start; flex-direction: column; }
    .preview-actions { width: 100%; align-items: flex-start; flex-direction: column; }
    #site-preview { height: 480px; }
    .performance-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .assistant-guide {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .assistant-orb-wrap { width: min(100%, 390px); margin: 0 auto; }
    .thought-cloud { margin-top: -14px; border-radius: 26px; }
    .thought-dot { display: none; }
    .intent-panel { grid-template-columns: 1fr; }
    .intent-options, .redesign-options { grid-template-columns: 1fr; }
    .redesign-ideas-heading { align-items: flex-start; flex-direction: column; }
    #create-temporary-site { width: 100%; }
}

@media (max-width: 900px) {
    .analysis-layout { grid-template-columns: 1fr; }
    .preview-panel { position: static; }
}
