@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@400;700;900&display=swap');

:root {
    --neon-cyan: #00f0ff;
    --neon-pink: #ff0055;
    --matrix-green: #00ff66;
    --obsidian-dark: #03060b;
    --panel-glow: rgba(0, 240, 255, 0.03);
    --panel-solid: rgba(5, 10, 20, 0.85);
    --border-laser: rgba(0, 240, 255, 0.25);
    --brand-accent: var(--neon-cyan);
    --brand-warm: #f9d775;
    --page-gutter: clamp(14px, 3vw, 32px);
    --hero-max-inline: 620px;
    --control-max-inline: 760px;
    
    --font-cyber: 'Orbitron', sans-serif;
    --font-terminal: 'Share Tech Mono', monospace;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background-color: var(--obsidian-dark);
    color: #e2e8f0;
    font-family: var(--font-terminal);
    overflow-x: hidden;
}

html {
    min-height: 100dvh;
}

body {
    min-height: 100dvh;
}

/* REAL-TIME ENGINE GRAPHICS ACCELERATION BACKGROUND */
#webgpu-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* HIGH-TECH HOLOGRAM OVERLAY GRID LINES */
.hologram-scanline {
    display: none;
}

#hud-workspace {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 20px;
    display: grid;
    grid-template-columns: 460px 320px 1fr;
    gap: 20px;
}

/* CORE HUD CONTAINER PATTERNS */
.hud-node {
    background: var(--panel-solid);
    border: 1px solid var(--border-laser);
    box-shadow: 0 0 25px var(--panel-glow), inset 0 0 15px rgba(0, 240, 255, 0.05);
    backdrop-filter: blur(12px);
    border-radius: 4px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
}

.hud-node::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink), transparent);
}

/* CHOPPED GLITCH TYPOGRAPHY HEADERS */
.node-glitch-header {
    font-family: var(--font-cyber);
    font-size: 0.95rem;
    font-weight: 900;
    color: var(--neon-cyan);
    letter-spacing: 2px;
    margin-bottom: 12px;
    text-transform: uppercase;
    position: relative;
    text-shadow: 0 0 8px rgba(0, 240, 255, 0.5);
}

.system-status-pill {
    align-self: flex-start;
    font-size: 0.7rem;
    background: rgba(0, 255, 102, 0.08);
    border: 1px solid var(--matrix-green);
    color: var(--matrix-green);
    padding: 4px 10px;
    border-radius: 2px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* HIGH-TECH SELECTION CHIPS MATRIX */
.matrix-selector-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.matrix-chip {
    position: relative;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.15);
    padding: 12px;
    cursor: pointer;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
}

.matrix-chip:hover {
    border-color: var(--neon-pink);
    background: rgba(255, 0, 85, 0.03);
}

.matrix-chip.active {
    background: rgba(0, 240, 255, 0.05);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.2), inset 0 0 8px rgba(0, 240, 255, 0.1);
}

.matrix-tag {
    font-family: var(--font-cyber);
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 1px;
}

.matrix-chip.active .matrix-tag {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
}

.chip-response {
    color: #9fb5c9;
    font-family: var(--font-terminal);
    font-size: 0.68rem;
    line-height: 1.25;
    opacity: 0.86;
    position: relative;
    z-index: 2;
}

.matrix-chip[data-response-state="ready"] .chip-response,
.matrix-chip.has-response .chip-response {
    color: var(--matrix-green);
}

.specialist-card .chip-response {
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 7%;
    display: block;
    min-height: 1.1em;
    padding: 2px 4px;
    color: #d7f9ff;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.82);
    background: rgba(3, 14, 24, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.specialist-card[data-response-state="ready"] .chip-response {
    border-color: rgba(0, 255, 102, 0.42);
    color: var(--matrix-green);
}

.chip-usage-core {
    position: absolute;
    left: 50%;
    top: 38%;
    z-index: 4;
    width: clamp(58px, 24%, 96px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    gap: 0;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(105, 196, 188, 0.38);
    border-radius: 50%;
    color: rgba(224, 235, 231, 0.88);
    background:
        radial-gradient(circle, rgba(6, 22, 33, 0.78), rgba(6, 22, 33, 0.42) 58%, rgba(6, 22, 33, 0.04) 72%),
        conic-gradient(from -90deg, var(--usage-accent, rgba(105, 196, 188, 0.72)) var(--citation-usage, 0%), rgba(224, 235, 231, 0.12) 0);
    box-shadow: 0 0 16px rgba(105, 196, 188, 0.14), inset 0 0 18px rgba(0, 0, 0, 0.42);
    pointer-events: none;
}

.chip-usage-core::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: inherit;
    background: rgba(6, 16, 26, 0.88);
    z-index: -1;
}

.chip-usage-percent {
    display: block;
    color: var(--usage-text, #d7f9ff);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1rem, 2vw, 1.55rem);
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 0 12px var(--usage-glow, rgba(105, 196, 188, 0.35));
}

.chip-usage-caption {
    display: block;
    max-width: 72px;
    color: rgba(224, 235, 231, 0.7);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.48rem;
    font-weight: 700;
    line-height: 1.05;
    text-align: center;
    text-transform: uppercase;
}

.chip-usage-rail {
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: calc(7% + 1.55em);
    z-index: 4;
    height: 4px;
    border: 1px solid rgba(224, 235, 231, 0.1);
    background: rgba(4, 14, 23, 0.72);
    overflow: hidden;
}

.chip-usage-fill {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(105, 196, 188, 0.55), var(--usage-accent, rgba(105, 196, 188, 0.95)));
    box-shadow: 0 0 10px var(--usage-glow, rgba(105, 196, 188, 0.26));
    transition: width 360ms ease;
}

.specialist-card[data-usage-intensity="idle"] {
    --usage-accent: rgba(105, 196, 188, 0.24);
    --usage-text: rgba(224, 235, 231, 0.62);
    --usage-glow: rgba(105, 196, 188, 0.12);
}

.specialist-card[data-usage-intensity="cool"] {
    --usage-accent: rgba(105, 196, 188, 0.72);
    --usage-text: #d7f9ff;
    --usage-glow: rgba(105, 196, 188, 0.32);
}

.specialist-card[data-usage-intensity="warm"] {
    --usage-accent: rgba(200, 168, 90, 0.78);
    --usage-text: #ffe8a3;
    --usage-glow: rgba(200, 168, 90, 0.34);
}

.specialist-card[data-usage-intensity="hot"] {
    --usage-accent: rgba(0, 255, 170, 0.78);
    --usage-text: #eafff8;
    --usage-glow: rgba(0, 255, 170, 0.34);
}

.matrix-status-bar {
    display: flex;
    gap: 3px;
}

.matrix-status-bar .block {
    width: 6px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.matrix-status-bar .block.active {
    background: var(--neon-cyan);
    box-shadow: 0 0 4px var(--neon-cyan);
}

.matrix-chip.active .matrix-status-bar .block:first-child {
    background: var(--neon-pink);
    box-shadow: 0 0 4px var(--neon-pink);
}

/* SECURE TERMINAL TEXTAREA ACCELERATOR */
.terminal-input-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(0, 240, 255, 0.2);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.9);
    margin-bottom: 16px;
}

textarea {
    width: 100%;
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: var(--font-terminal);
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 16px;
    box-sizing: border-box;
    resize: none;
}

.terminal-footer-tray {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(0, 240, 255, 0.03);
    border-top: 1px solid rgba(0, 240, 255, 0.1);
    font-size: 0.7rem;
    color: #64748b;
}

/* HIGH-INTENSITY NEON GLOW EXECUTION TRIGGER */
.quantum-execute-btn {
    position: relative;
    background: transparent;
    border: 1px solid var(--neon-pink);
    padding: 16px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
}

.quantum-execute-btn:hover {
    background: var(--neon-pink);
    box-shadow: 0 0 20px rgba(255, 0, 85, 0.6);
}

.btn-text-layer {
    font-family: var(--font-cyber);
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #ffffff;
    position: relative;
    z-index: 2;
}

/* MIDDLE STREAM PANELS */
.live-stream-container {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 240, 255, 0.1);
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.log-row {
    font-size: 0.75rem;
    line-height: 1.4;
    word-break: break-all;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 6px;
}

.log-row.sys-msg { color: #64748b; }
.log-row.asset-ready { color: var(--neon-cyan); }
.log-row.agent-dispatch { color: var(--neon-pink); }
.log-row.veritas-pass { color: var(--matrix-green); }

/* MODULE 03 DISPLAY CANVASES */
.matrix-tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: rgba(0, 0, 0, 0.4);
    padding: 4px;
    border: 1px solid rgba(0, 240, 255, 0.1);
}

.matrix-tab {
    background: transparent;
    border: 1px solid transparent;
    color: #64748b;
    font-family: var(--font-cyber);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 10px 16px;
    cursor: pointer;
    flex-grow: 1;
    text-align: center;
}

.matrix-tab.active {
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.05);
    border-color: rgba(0, 240, 255, 0.25);
    text-shadow: 0 0 5px var(--neon-cyan);
}

.matrix-content-viewport {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 240, 255, 0.1);
    padding: 24px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.matrix-pane { display: none; }
.matrix-pane.pane-active { display: block; }
.matrix-tab[hidden] { display: none; }

.static-prompt-msg {
    color: #64748b;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 40px;
}

/* COMPILED REAL-TIME STRUCTURAL CARDS */
.sintesis-output-block h3 {
    font-family: var(--font-cyber);
    font-size: 1.1rem;
    color: #ffffff;
    margin: 0 0 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 8px;
}

.sintesis-output-block p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #cbd5e1;
}

.agent-response-panel h3 {
    font-family: var(--font-cyber);
    color: #ffffff;
    font-size: 1rem;
    letter-spacing: 0;
    margin: 0 0 14px;
}

.output-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.output-action-btn {
    border: 1px solid rgba(0, 240, 255, 0.42);
    background: rgba(0, 240, 255, 0.08);
    color: #f8fafc;
    cursor: pointer;
    font-family: var(--font-terminal);
    font-size: 0.78rem;
    padding: 8px 10px;
}

.output-action-btn:hover {
    border-color: var(--matrix-green);
    background: rgba(0, 255, 102, 0.1);
}

.citation-list {
    display: grid;
    gap: 10px;
    margin: 14px 0 16px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 6px;
}

.citation-item {
    border: 1px solid rgba(105, 196, 188, 0.28);
    background: rgba(255, 255, 255, 0.035);
    padding: 12px;
}

.citation-item-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--matrix-green);
    font-size: 0.74rem;
    margin-bottom: 8px;
}

.citation-excerpt {
    color: #e2e8f0;
    font-size: 0.84rem;
    line-height: 1.55;
    margin: 0;
    overflow-wrap: anywhere;
    white-space: normal;
    max-height: 7.8em;
    overflow: hidden;
    position: relative;
}

.citation-item:not(.expanded) .citation-excerpt::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2.7em;
    background: linear-gradient(180deg, rgba(6, 16, 27, 0), rgba(6, 16, 27, 0.96));
    pointer-events: none;
}

.citation-item.expanded .citation-excerpt {
    max-height: none;
}

.citation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.citation-actions button {
    border: 1px solid rgba(105, 196, 188, 0.36);
    background: rgba(105, 196, 188, 0.08);
    color: #eaf7ff;
    cursor: pointer;
    font-family: var(--font-terminal);
    font-size: 0.72rem;
    padding: 6px 8px;
}

.citation-actions button:hover {
    border-color: var(--brand-warm);
    color: #ffffff;
}

.citation-jump {
    border: 1px solid rgba(159, 199, 166, 0.5);
    background: rgba(159, 199, 166, 0.12);
    color: var(--matrix-green);
    cursor: pointer;
    font-family: var(--font-terminal);
    font-size: 0.78rem;
    margin: 0 2px;
    padding: 1px 5px;
}

.citation-jump:hover {
    border-color: var(--brand-warm);
    color: #ffffff;
}

.skill-activation-list {
    display: grid;
    gap: 8px;
    margin: 14px 0 16px;
}

.skill-activation-label {
    color: var(--brand-warm);
    font-family: var(--font-terminal);
    font-size: 0.72rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.skill-activation-card {
    border: 1px solid rgba(0, 240, 255, 0.22);
    background: linear-gradient(180deg, rgba(0, 240, 255, 0.055), rgba(0, 0, 0, 0.16));
    padding: 10px;
}

.skill-activation-card.has-citations {
    border-color: rgba(0, 255, 102, 0.34);
}

.skill-activation-card.needs-review {
    border-color: rgba(200, 168, 90, 0.28);
}

.skill-activation-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    width: 100%;
    gap: 10px;
    border: 0;
    background: transparent;
    color: #f8fafc;
    cursor: pointer;
    font-family: var(--font-terminal);
    padding: 0;
    text-align: left;
}

.skill-activation-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--neon-cyan);
    font-size: 0.86rem;
}

.skill-activation-count {
    border: 1px solid rgba(0, 255, 102, 0.3);
    color: var(--matrix-green);
    font-size: 0.68rem;
    padding: 4px 6px;
}

.skill-activation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.skill-activation-meta span {
    border: 1px solid rgba(105, 196, 188, 0.22);
    color: #cbd5e1;
    font-family: var(--font-terminal);
    font-size: 0.68rem;
    padding: 3px 6px;
}

.skill-activation-detail {
    color: #e2e8f0;
    display: none;
    font-size: 0.82rem;
    line-height: 1.5;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(105, 196, 188, 0.22);
}

.skill-activation-card.expanded .skill-activation-detail {
    display: block;
}

.skill-activation-detail strong {
    display: block;
    color: var(--brand-warm);
    font-size: 0.84rem;
    margin-bottom: 6px;
}

.skill-activation-subsection {
    margin-top: 10px;
}

.skill-activation-subsection span {
    color: var(--neon-cyan);
    display: block;
    font-family: var(--font-terminal);
    font-size: 0.7rem;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.skill-activation-subsection ul {
    margin: 0;
    padding-left: 18px;
}

.skill-activation-subsection li {
    margin: 4px 0;
}

.skill-activation-subsection.risk span {
    color: var(--brand-warm);
}

.skill-activation-card.expanded {
    box-shadow: inset 0 0 18px rgba(0, 240, 255, 0.08);
}

.citation-item.citation-focus {
    border-color: var(--brand-warm);
    box-shadow: 0 0 18px rgba(200, 168, 90, 0.18);
}

.citation-return-focus {
    outline: 1px solid rgba(214, 184, 111, 0.9);
    box-shadow: 0 0 28px rgba(214, 184, 111, 0.28), inset 0 0 18px rgba(214, 184, 111, 0.08);
}

.citation-return-btn {
    width: fit-content;
    margin: 8px 0 10px;
    padding: 8px 12px;
    border: 1px solid rgba(214, 184, 111, 0.72);
    border-radius: 4px;
    color: #f6db94;
    background: linear-gradient(180deg, rgba(34, 40, 50, 0.92), rgba(12, 20, 28, 0.94));
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    cursor: pointer;
}

.citation-return-btn:hover,
.citation-return-btn:focus-visible {
    color: #fff8dc;
    border-color: rgba(246, 219, 148, 0.96);
    box-shadow: 0 0 16px rgba(214, 184, 111, 0.26);
}

.sintesis-tier-layer {
    display: grid;
    gap: 16px;
}

.sintesis-tier-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid rgba(214, 184, 111, 0.32);
    background: linear-gradient(180deg, rgba(13, 22, 31, 0.92), rgba(5, 12, 18, 0.94));
    color: #f6db94;
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
}

.sintesis-tier-header strong {
    color: #eaf7ff;
    font-weight: 700;
}

.sintesis-tier-card {
    padding: clamp(14px, 2vw, 22px);
    border: 1px solid rgba(214, 184, 111, 0.42);
    border-radius: 6px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(180deg, rgba(8, 18, 26, 0.94), rgba(3, 9, 14, 0.98));
    background-size: 100% 4px, auto;
    color: #eaf7ff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 16px 32px rgba(0, 0, 0, 0.24);
}

.client-tier-card {
    border-color: rgba(246, 219, 148, 0.6);
    background:
        radial-gradient(circle at 12% 0%, rgba(214, 184, 111, 0.12), transparent 30%),
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(180deg, rgba(17, 24, 31, 0.96), rgba(6, 12, 18, 0.98));
    background-size: auto, 100% 4px, auto;
}

.client-summary-preview {
    position: relative;
    max-height: 12.4rem;
    overflow: hidden;
}

.client-summary-preview::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 54px;
    background: linear-gradient(180deg, transparent, rgba(8, 18, 26, 0.98));
}

.client-summary-full {
    display: none;
    max-height: min(70dvh, 920px);
    overflow: auto;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid rgba(214, 184, 111, 0.34);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(234, 247, 255, 0.92);
    font-family: Arial, sans-serif;
    font-size: clamp(0.9rem, 1.7vw, 1rem);
    line-height: 1.62;
}

.client-tier-card.client-summary-expanded .client-summary-preview {
    display: none;
}

.client-tier-card.client-summary-expanded .client-summary-full {
    display: block;
}

.trust-assurance-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 12px 0 16px;
}

.trust-assurance-strip article {
    padding: 11px 12px;
    border: 1px solid rgba(105, 196, 188, 0.28);
    border-radius: 10px;
    background:
        radial-gradient(circle at 10% 0%, rgba(105, 196, 188, 0.14), transparent 42%),
        linear-gradient(180deg, rgba(8, 20, 28, 0.86), rgba(4, 12, 18, 0.88));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.trust-assurance-strip span {
    display: block;
    margin-bottom: 5px;
    color: #7de8db;
    font-family: var(--font-terminal);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.trust-assurance-strip p {
    margin: 0;
    color: rgba(234, 247, 255, 0.82);
    font-family: Arial, sans-serif;
    font-size: 0.8rem;
    line-height: 1.38;
}

.client-brief-polished {
    display: grid;
    gap: 16px;
}

.client-brief-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.client-brief-meta-grid article {
    padding: 12px 14px;
    border: 1px solid rgba(105, 196, 188, 0.28);
    border-radius: 8px;
    background:
        radial-gradient(circle at 10% 0%, rgba(105, 196, 188, 0.16), transparent 42%),
        rgba(5, 14, 20, 0.72);
}

.client-brief-meta-grid span,
.client-brief-section > span {
    display: block;
    margin-bottom: 6px;
    color: #7de8db;
    font-family: var(--font-terminal);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.client-brief-meta-grid strong {
    color: #fff8dc;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(0.95rem, 1.8vw, 1.12rem);
    line-height: 1.35;
}

.client-brief-meta-line {
    display: grid;
    gap: 2px;
    padding: 7px 0;
    border-top: 1px solid rgba(105, 196, 188, 0.16);
}

.client-brief-meta-line:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.client-brief-meta-line em {
    color: rgba(125, 232, 219, 0.72);
    font-family: var(--font-terminal);
    font-size: 0.64rem;
    font-style: normal;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.client-brief-section-grid {
    display: grid;
    gap: 12px;
}

.client-brief-section {
    position: relative;
    padding: clamp(14px, 2vw, 20px);
    border: 1px solid rgba(214, 184, 111, 0.28);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 34%),
        rgba(7, 17, 24, 0.76);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.client-brief-section.is-primary {
    border-color: rgba(246, 219, 148, 0.5);
    background:
        radial-gradient(circle at 0% 0%, rgba(214, 184, 111, 0.16), transparent 36%),
        rgba(10, 19, 27, 0.82);
}

.client-brief-section h4 {
    margin: 0 0 8px;
    color: #fff8dc;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.04rem, 2vw, 1.32rem);
    line-height: 1.2;
}

.client-brief-section p {
    margin: 0;
    color: rgba(234, 247, 255, 0.92);
    font-family: Arial, sans-serif;
    line-height: 1.65;
}

.client-brief-child-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.client-brief-child-card {
    padding: 12px;
    border: 1px solid rgba(105, 196, 188, 0.22);
    border-radius: 8px;
    background: rgba(5, 14, 20, 0.58);
}

.client-brief-child-card strong {
    display: block;
    margin-bottom: 5px;
    color: #f6db94;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.96rem;
    line-height: 1.25;
}

.client-brief-child-card p {
    color: rgba(234, 247, 255, 0.86);
    font-size: 0.88rem;
    line-height: 1.5;
}

.client-brief-section ul {
    display: grid;
    gap: 8px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.client-brief-section li {
    position: relative;
    padding-left: 20px;
    color: rgba(234, 247, 255, 0.9);
    line-height: 1.55;
}

.client-brief-section li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 8px;
    height: 2px;
    background: #f6db94;
    box-shadow: 0 0 8px rgba(246, 219, 148, 0.55);
}

.working-document-draft {
    margin-top: 22px;
}

.legal-document-preview {
    position: relative;
    isolation: isolate;
    max-width: 820px;
    margin: 14px auto;
    overflow: hidden;
    border: 1px solid rgba(108, 87, 45, 0.46);
    border-radius: 2px;
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.92), transparent 34%),
        linear-gradient(145deg, #fbfaf3, #eee9d8);
    color: #171b20;
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.38), inset 0 0 0 8px rgba(255, 255, 255, 0.36);
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.legal-document-preview::before {
    content: "";
    position: absolute;
    inset: 18px;
    z-index: -1;
    border: 1px solid rgba(108, 87, 45, 0.2);
    pointer-events: none;
}

.legal-document-masthead,
.legal-document-access {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 18px clamp(24px, 6vw, 64px);
    color: #51452c;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.legal-document-masthead {
    border-bottom: 1px solid rgba(108, 87, 45, 0.24);
}

.legal-document-typeset {
    position: relative;
    z-index: 1;
    min-height: 420px;
    padding: clamp(34px, 7vw, 78px) clamp(28px, 9vw, 92px);
    font-family: "Latin Modern Roman", "Computer Modern Serif", Georgia, "Times New Roman", serif;
    font-size: clamp(0.96rem, 1.8vw, 1.08rem);
    line-height: 1.72;
    text-align: justify;
    hyphens: auto;
}

.legal-document-typeset h2 {
    max-width: 620px;
    margin: 0 auto 32px;
    color: #171b20;
    font-size: clamp(1.25rem, 3vw, 1.8rem);
    line-height: 1.28;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.055em;
}

.legal-document-typeset h3 {
    margin: 28px 0 12px;
    color: #29261f;
    font-size: 1.02rem;
    line-height: 1.35;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.045em;
}

.legal-document-typeset p {
    margin: 0 0 14px;
    color: #20242a;
    text-indent: 1.8em;
}

.legal-document-typeset .legal-numbered-clause {
    padding-left: 1.2em;
    text-indent: -1.2em;
}

.legal-document-watermark-field {
    position: absolute;
    inset: -10% -18%;
    z-index: 0;
    display: grid;
    align-content: space-around;
    gap: clamp(22px, 4vw, 46px);
    transform: rotate(-24deg) scale(1.06);
    pointer-events: none;
    overflow: hidden;
}

.legal-document-watermark-field .watermark-line {
    display: block;
    width: 100%;
    color: rgba(83, 64, 31, var(--watermark-opacity, 0.058));
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(0.82rem, 2.4vw, 1.38rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.14em;
    text-align: center;
    white-space: nowrap;
}

.legal-document-watermark-field .watermark-line:nth-child(1) { --watermark-opacity: 0.045; }
.legal-document-watermark-field .watermark-line:nth-child(2) { --watermark-opacity: 0.05; }
.legal-document-watermark-field .watermark-line:nth-child(3) { --watermark-opacity: 0.056; }
.legal-document-watermark-field .watermark-line:nth-child(4) { --watermark-opacity: 0.062; }
.legal-document-watermark-field .watermark-line:nth-child(5) { --watermark-opacity: 0.069; }
.legal-document-watermark-field .watermark-line:nth-child(6) { --watermark-opacity: 0.076; }
.legal-document-watermark-field .watermark-line:nth-child(7) { --watermark-opacity: 0.084; }
.legal-document-watermark-field .watermark-line:nth-child(8) { --watermark-opacity: 0.092; }
.legal-document-watermark-field .watermark-line:nth-child(9) { --watermark-opacity: 0.101; }
.legal-document-watermark-field .watermark-line:nth-child(10) { --watermark-opacity: 0.11; }
.legal-document-watermark-field .watermark-line:nth-child(11) { --watermark-opacity: 0.12; }
.legal-document-watermark-field .watermark-line:nth-child(12) { --watermark-opacity: 0.13; }

.legal-document-watermark-field .watermark-line-1 {
    transform: translateX(-5%);
}

.legal-document-watermark-field .watermark-line-2 {
    color: rgba(40, 88, 91, var(--watermark-opacity, 0.052));
    transform: translateX(7%);
}

.legal-document-watermark-field .watermark-line-3 {
    color: rgba(108, 87, 45, var(--watermark-opacity, 0.065));
    font-size: clamp(0.94rem, 2.8vw, 1.58rem);
    letter-spacing: 0.28em;
    transform: translateX(-1%);
}

.legal-document-access {
    align-items: center;
    border-top: 1px solid rgba(108, 87, 45, 0.24);
    background: rgba(88, 70, 35, 0.055);
    text-transform: none;
    letter-spacing: 0;
}

.legal-document-access p {
    margin: 0;
    color: #51452c;
    font: 0.76rem/1.45 Arial, sans-serif;
}

.legal-document-access button {
    flex: 0 0 auto;
    padding: 10px 13px;
    border: 1px solid #755d2c;
    border-radius: 3px;
    color: #fff8dc;
    background: linear-gradient(180deg, #715a2d, #352b1c);
    font: 800 0.76rem/1.2 Arial, sans-serif;
    cursor: pointer;
}

.legal-document-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.legal-document-export-actions button {
    background: linear-gradient(180deg, rgba(10, 28, 42, 0.98), rgba(4, 11, 20, 0.98));
    color: #f8fafc;
    border-color: rgba(105, 196, 188, 0.48);
}

.legal-document-export-actions button:hover,
.legal-document-export-actions button:focus-visible {
    border-color: rgba(214, 184, 111, 0.82);
    box-shadow: 0 0 16px rgba(105, 196, 188, 0.18);
}

@media (max-width: 720px) {
    .legal-document-masthead,
    .legal-document-access {
        align-items: stretch;
        flex-direction: column;
        padding: 15px 22px;
    }

    .legal-document-typeset {
        min-height: 320px;
        padding: 34px 26px;
        font-size: 0.94rem;
        line-height: 1.62;
        text-align: left;
    }

    .legal-document-watermark-field {
        inset: -5% -55%;
        gap: 28px;
        transform: rotate(-27deg) scale(1.02);
    }

    .legal-document-watermark-field .watermark-line {
        font-size: 0.72rem;
        letter-spacing: 0.1em;
    }

    .legal-document-watermark-field .watermark-line-3 {
        font-size: 0.86rem;
        letter-spacing: 0.2em;
    }

    .legal-document-access button {
        width: 100%;
    }

    .legal-document-export-actions {
        justify-content: stretch;
    }
}

/* Final freemium/anai layout: no L.E.G.A.S.Y./S.I.N.T.E.S.I.S. buttons, centered intake. */
body.client-view-only .persistent-choice-layer,
body.pipeline-executing.client-view-only .persistent-choice-layer,
body.client-view-only.post-output-choice .persistent-choice-layer,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer,
body.client-view-only .specialist-hub .agent-choice-layer,
body.client-view-only.post-output-choice .specialist-hub .agent-choice-layer {
    display: none !important;
}

body.client-view-only .experience-shell,
body.pipeline-executing.client-view-only .experience-shell,
body.client-view-only.post-output-choice .experience-shell,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .experience-shell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    justify-items: center !important;
    align-items: start !important;
    gap: clamp(14px, 2vh, 24px) !important;
}

body.client-view-only .landing-container,
body.pipeline-executing.client-view-only .landing-container,
body.client-view-only.post-output-choice .landing-container,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .landing-container {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: min(100%, 760px) !important;
    min-height: min(92dvh, 820px) !important;
    margin-inline: auto !important;
    justify-self: center !important;
    display: grid !important;
    grid-template-rows: auto minmax(260px, 1fr) auto auto !important;
    justify-items: center !important;
}

body.client-view-only .hero-section,
body.pipeline-executing.client-view-only .hero-section,
body.client-view-only.post-output-choice .hero-section {
    width: 100% !important;
    display: grid !important;
    place-items: center !important;
}

body.client-view-only .pen-platform,
body.pipeline-executing.client-view-only .pen-platform,
body.client-view-only.post-output-choice .pen-platform {
    margin-inline: auto !important;
    justify-self: center !important;
}

body.client-view-only .strategic-input-container,
body.pipeline-executing.client-view-only .strategic-input-container,
body.client-view-only.post-output-choice .strategic-input-container {
    width: min(92%, 420px) !important;
    margin-inline: auto !important;
    justify-self: center !important;
}

body.client-view-only .output-console,
body.pipeline-executing.client-view-only .output-console,
body.client-view-only.post-output-choice .output-console,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .output-console {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: min(100%, 980px) !important;
    justify-self: center !important;
}

@media (max-width: 720px) {
    body.client-view-only .landing-container,
    body.pipeline-executing.client-view-only .landing-container,
    body.client-view-only.post-output-choice .landing-container,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .landing-container {
        width: min(100%, 430px) !important;
        min-height: auto !important;
        grid-template-rows: auto minmax(220px, auto) auto auto !important;
    }

    body.client-view-only .strategic-input-container,
    body.pipeline-executing.client-view-only .strategic-input-container,
    body.client-view-only.post-output-choice .strategic-input-container {
        width: min(92vw, 390px) !important;
    }
}

.client-summary-toggle {
    width: 100%;
    min-height: 44px;
    margin: 12px 0 4px;
    border: 1px solid rgba(214, 184, 111, 0.72);
    border-radius: 4px;
    color: #fff8dc;
    background: linear-gradient(180deg, rgba(70, 57, 30, 0.92), rgba(14, 21, 30, 0.98));
    font-family: Arial, sans-serif;
    font-size: 0.84rem;
    font-weight: 900;
    cursor: pointer;
}

.client-summary-toggle:hover,
.client-summary-toggle:focus-visible {
    outline: none;
    border-color: rgba(246, 219, 148, 0.96);
    box-shadow: 0 0 18px rgba(214, 184, 111, 0.22);
}

.tier-card-kicker {
    color: #d6b86f;
    font-family: Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sintesis-tier-card h3,
.sintesis-tier-card h4 {
    margin: 8px 0 10px;
    color: #fff8dc;
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 0;
}

.sintesis-tier-card h3 {
    font-size: clamp(1.15rem, 2.4vw, 1.55rem);
}

.sintesis-tier-card h4 {
    font-size: 0.95rem;
}

.sintesis-tier-card p,
.subscriber-executive-copy,
.tier-muted {
    color: rgba(234, 247, 255, 0.88);
    font-family: Arial, sans-serif;
    font-size: clamp(0.88rem, 1.7vw, 0.98rem);
    line-height: 1.58;
    letter-spacing: 0;
}

/* Keep the protected legal paper isolated from the dark dashboard palette. */
.sintesis-tier-card .legal-document-preview,
.sintesis-tier-card .legal-document-typeset,
.sintesis-tier-card .legal-document-typeset p {
    color: #20242a;
}

.sintesis-tier-card .legal-document-typeset h2 {
    color: #171b20;
}

.sintesis-tier-card .legal-document-typeset h3 {
    color: #29261f;
}

.sintesis-tier-card .legal-document-masthead,
.sintesis-tier-card .legal-document-masthead span,
.sintesis-tier-card .legal-document-masthead strong,
.sintesis-tier-card .legal-document-access,
.sintesis-tier-card .legal-document-access p {
    color: #51452c;
}

.tier-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.tier-action-btn {
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 52px;
    padding: 10px;
    border: 1px solid rgba(214, 184, 111, 0.55);
    border-radius: 4px;
    color: #fff8dc;
    background: linear-gradient(180deg, rgba(42, 48, 58, 0.96), rgba(12, 20, 30, 0.96));
    font-family: Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.25;
    cursor: pointer;
}

.tier-action-btn span {
    color: rgba(186, 247, 238, 0.86);
    font-family: var(--font-terminal);
    font-size: 0.66rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.tier-action-btn em {
    color: rgba(255, 248, 220, 0.56);
    font-family: var(--font-terminal);
    font-size: 0.58rem;
    font-style: normal;
    font-weight: 700;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

.tier-action-btn.premium {
    background: linear-gradient(180deg, rgba(77, 59, 26, 0.96), rgba(18, 23, 30, 0.98));
}

.tier-action-btn.contact {
    border-color: rgba(105, 196, 188, 0.68);
}

.tier-action-btn:hover,
.tier-action-btn:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(246, 219, 148, 0.92);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22), 0 0 18px rgba(214, 184, 111, 0.18);
}

.btc-payment-panel {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid rgba(214, 184, 111, 0.52);
    border-radius: 6px;
    color: rgba(244, 239, 221, 0.92);
    background:
        linear-gradient(90deg, rgba(105, 196, 188, 0.09) 1px, transparent 1px),
        linear-gradient(180deg, rgba(22, 25, 31, 0.96), rgba(6, 13, 18, 0.96));
    background-size: 18px 100%, auto;
    box-shadow: inset 0 0 0 1px rgba(255, 248, 220, 0.05), 0 14px 26px rgba(0, 0, 0, 0.2);
}

.btc-payment-panel:focus-visible {
    outline: 2px solid rgba(105, 196, 188, 0.78);
    outline-offset: 3px;
}

.btc-payment-header,
.btc-payment-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.btc-payment-header {
    justify-content: space-between;
}

.btc-payment-header span,
.btc-payment-reference span {
    color: var(--brand-warm);
    font-family: var(--font-terminal);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
}

.btc-payment-body {
    display: grid;
    gap: 8px;
    font-family: Arial, sans-serif;
    font-size: 0.82rem;
    line-height: 1.45;
}

.btc-payment-body p {
    margin: 0;
}

.btc-payment-product-line {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid rgba(105, 196, 188, 0.34);
    border-radius: 4px;
    background: rgba(1, 8, 12, 0.44);
}

.btc-payment-product-line span {
    color: rgba(186, 247, 238, 0.88);
    font-family: var(--font-terminal);
    font-size: 0.64rem;
    letter-spacing: 0.12em;
}

.btc-payment-product-line strong {
    color: #fff8dc;
    font-size: 1rem;
}

.btc-payment-product-line em {
    color: rgba(234, 247, 255, 0.56);
    font-family: var(--font-terminal);
    font-size: 0.66rem;
    font-style: normal;
    text-transform: uppercase;
}

.btc-payment-amount {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border: 1px solid rgba(214, 184, 111, 0.44);
    border-radius: 4px;
    background: rgba(77, 59, 26, 0.22);
}

.btc-payment-amount span {
    color: var(--brand-warm);
    font-family: var(--font-terminal);
    font-size: 0.66rem;
    letter-spacing: 0.12em;
}

.btc-payment-amount strong {
    color: #fff8dc;
    font-size: 1rem;
}

.btc-payment-amount em {
    color: rgba(234, 247, 255, 0.72);
    font-size: 0.76rem;
    font-style: normal;
}

.btc-payment-commerce-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.btc-payment-commerce-strip span {
    min-height: 38px;
    display: grid;
    place-items: center;
    padding: 7px;
    border: 1px solid rgba(105, 196, 188, 0.28);
    border-radius: 4px;
    color: rgba(234, 247, 255, 0.82);
    background: rgba(3, 28, 34, 0.38);
    font-family: Arial, sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
}

.btc-payment-qr {
    display: grid;
    justify-items: center;
    gap: 8px;
    margin: 2px 0;
    padding: 12px;
    border: 1px solid rgba(105, 196, 188, 0.34);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.94);
}

.btc-payment-qr img {
    display: block;
    width: min(190px, 68vw);
    aspect-ratio: 1;
    object-fit: contain;
}

.btc-payment-qr figcaption {
    color: #1d2528;
    font-family: Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
}

.btc-payment-address {
    overflow-wrap: anywhere;
    padding: 11px 12px;
    border: 1px solid rgba(105, 196, 188, 0.38);
    border-radius: 4px;
    color: #baf7ee;
    background: rgba(1, 8, 12, 0.72);
    font-family: var(--font-terminal);
    font-size: 0.74rem;
    line-height: 1.45;
}

.btc-payment-reference {
    display: grid;
    gap: 4px;
}

.btc-payment-reference strong {
    overflow-wrap: anywhere;
    color: #fff8dc;
    font-family: var(--font-terminal);
    font-size: 0.72rem;
}

.btc-payment-disclaimer {
    padding-top: 8px;
    border-top: 1px solid rgba(214, 184, 111, 0.24);
    color: rgba(244, 239, 221, 0.68);
    font-size: 0.74rem;
}

.btc-payment-actions button,
.btc-payment-actions a,
.btc-payment-close {
    min-height: 38px;
    padding: 9px 12px;
    border: 1px solid rgba(105, 196, 188, 0.5);
    border-radius: 4px;
    color: #fff;
    background: rgba(17, 55, 58, 0.78);
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.btc-payment-actions button:hover,
.btc-payment-actions button:focus-visible,
.btc-payment-actions a:hover,
.btc-payment-actions a:focus-visible,
.btc-payment-close:hover,
.btc-payment-close:focus-visible {
    border-color: rgba(246, 219, 148, 0.86);
    box-shadow: 0 0 16px rgba(105, 196, 188, 0.18);
}

.btc-payment-actions .btc-payment-confirm {
    border-color: rgba(214, 184, 111, 0.7);
    background: linear-gradient(180deg, rgba(77, 59, 26, 0.94), rgba(17, 55, 58, 0.82));
}

.btc-payment-close {
    min-height: 32px;
    padding: 6px 10px;
    color: rgba(234, 247, 255, 0.72);
    background: rgba(1, 8, 12, 0.42);
}

.btc-payment-status {
    min-height: 18px;
    margin: 0;
    color: var(--brand-warm);
    font-family: Arial, sans-serif;
    font-size: 0.76rem;
}

.btc-payment-panel.is-settled {
    border-color: rgba(105, 196, 188, 0.72);
    background:
        linear-gradient(180deg, rgba(9, 34, 34, 0.98), rgba(5, 13, 18, 0.98));
}

.btc-payment-panel.is-settled .btc-payment-body,
.btc-payment-panel.is-settled .btc-payment-actions {
    display: none;
}

.btc-payment-panel.is-settled .btc-payment-header span {
    color: #baf7ee;
}

.btc-payment-panel.is-settled .btc-payment-status {
    padding: 10px 12px;
    border: 1px solid rgba(105, 196, 188, 0.26);
    border-radius: 4px;
    color: rgba(234, 247, 255, 0.82);
    background: rgba(1, 8, 12, 0.42);
}

.btc-payment-delivery-unlocked {
    display: grid;
    gap: 12px;
    padding: clamp(14px, 3vw, 20px);
    border: 1px solid rgba(105, 196, 188, 0.42);
    border-radius: 6px;
    background:
        linear-gradient(135deg, rgba(105, 196, 188, 0.14), transparent 45%),
        rgba(3, 18, 24, 0.82);
}

.btc-payment-delivery-unlocked .paid-delivery-kicker {
    color: var(--brand-warm);
    font-family: var(--font-terminal);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.btc-payment-delivery-unlocked > strong {
    color: #fff8dc;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.1rem, 2.4vw, 1.46rem);
    line-height: 1.2;
}

.btc-payment-delivery-unlocked p {
    max-width: 680px;
    margin: 0;
    color: rgba(234, 247, 255, 0.86);
    font-family: Arial, sans-serif;
    font-size: 0.88rem;
    line-height: 1.55;
}

.btc-payment-delivery-actions {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.paid-download-format {
    display: grid;
    gap: 6px;
}

.paid-download-format span {
    color: rgba(186, 247, 238, 0.82);
    font-family: var(--font-terminal);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.paid-download-format select {
    min-height: 42px;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid rgba(105, 196, 188, 0.52);
    border-radius: 4px;
    color: #f4efdd;
    background: rgba(1, 8, 12, 0.88);
    font-family: Arial, sans-serif;
    font-size: 0.86rem;
}

.paid-download-primary,
.paid-download-secondary {
    min-height: 42px;
    padding: 10px 13px;
    border: 1px solid rgba(105, 196, 188, 0.54);
    border-radius: 4px;
    color: #fff;
    background: rgba(17, 55, 58, 0.84);
    font-family: Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.paid-download-primary {
    border-color: rgba(246, 219, 148, 0.78);
    background: linear-gradient(180deg, rgba(103, 78, 32, 0.96), rgba(17, 55, 58, 0.9));
}

.paid-download-secondary {
    grid-column: span 1;
}

.paid-download-primary:hover,
.paid-download-primary:focus-visible,
.paid-download-secondary:hover,
.paid-download-secondary:focus-visible,
.paid-download-format select:focus-visible {
    border-color: rgba(246, 219, 148, 0.94);
    outline: none;
    box-shadow: 0 0 16px rgba(105, 196, 188, 0.2);
}

.post-result-contact-card {
    display: grid;
    gap: 12px;
    margin-top: 20px;
    padding: 16px;
    border: 1px solid rgba(105, 196, 188, 0.48);
    border-radius: 6px;
    background: linear-gradient(145deg, rgba(2, 16, 20, 0.82), rgba(10, 8, 3, 0.72));
}

.post-result-contact-copy span {
    color: var(--matrix-green);
    font-family: var(--font-terminal);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
}

.post-result-contact-copy h4,
.post-result-contact-copy p,
.post-result-contact-card.is-complete p {
    margin: 5px 0 0;
}

.post-result-contact-social {
    color: rgba(234, 247, 255, 0.78);
    font-family: Arial, sans-serif;
    font-size: 0.8rem;
}

.post-result-contact-social a {
    color: #69f0df;
    font-weight: 900;
    text-decoration: none;
}

.post-result-contact-social a:hover,
.post-result-contact-social a:focus-visible {
    color: #fff8dc;
    text-decoration: underline;
}

.post-result-contact-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.post-result-contact-fields label,
.post-result-contact-consent {
    color: rgba(234, 247, 255, 0.82);
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
}

.post-result-contact-fields input {
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    padding: 11px 12px;
    border: 1px solid rgba(105, 196, 188, 0.36);
    border-radius: 4px;
    color: #fff;
    background: rgba(1, 8, 12, 0.88);
}

.post-result-contact-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.post-result-contact-consent input {
    margin-top: 2px;
}

.post-result-contact-status {
    min-height: 18px;
    margin: 0;
    color: var(--brand-warm);
    font-size: 0.76rem;
}

.post-result-contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-result-contact-actions button {
    padding: 9px 14px;
    border: 1px solid rgba(105, 196, 188, 0.58);
    border-radius: 4px;
    color: #fff;
    background: rgba(17, 55, 58, 0.78);
    cursor: pointer;
}

.post-result-contact-actions button.quiet {
    border-color: transparent;
    color: rgba(234, 247, 255, 0.68);
    background: transparent;
}

.post-result-contact-card.is-complete {
    border-color: rgba(102, 255, 153, 0.42);
}

@media (max-width: 720px) {
    .btc-payment-commerce-strip {
        grid-template-columns: 1fr;
    }

    .btc-payment-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .btc-payment-actions button,
    .btc-payment-actions a {
        width: 100%;
        text-align: center;
    }

    .btc-payment-delivery-actions {
        grid-template-columns: 1fr;
    }

    .paid-download-primary,
    .paid-download-secondary {
        width: 100%;
    }

    .post-result-contact-fields {
        grid-template-columns: 1fr;
    }
}

.subscriber-meta-strip,
.subscriber-summary-grid,
.subscriber-document-array {
    display: grid;
    gap: 10px;
}

.subscriber-meta-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 12px 0;
}

.subscriber-meta-strip span,
.orchestrator-resume-row,
.recommended-doc-card,
.subscriber-citation-link {
    border: 1px solid rgba(105, 196, 188, 0.28);
    background: rgba(2, 9, 14, 0.72);
}

.subscriber-meta-strip span {
    padding: 8px 10px;
    color: #d6b86f;
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
}

.subscriber-summary-grid {
    grid-template-columns: clamp(210px, 34%, 300px) minmax(0, 1fr);
    align-items: start;
}

.subscriber-summary-grid > section {
    min-width: 0;
}

.doctrina-agent-panel {
    display: grid;
    gap: 12px;
}

.doctrina-agent-head {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid rgba(200, 168, 90, 0.34);
    border-radius: 8px;
    background:
        radial-gradient(circle at 0% 0%, rgba(200, 168, 90, 0.14), transparent 32%),
        rgba(2, 9, 14, 0.72);
}

.doctrina-agent-head span,
.doctrina-generated-head span {
    color: #71f3d5;
    font-family: var(--font-terminal);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.doctrina-agent-head strong,
.doctrina-generated-head strong {
    color: #fff1bd;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.02rem;
}

.doctrina-agent-head p {
    margin: 0;
    color: rgba(238, 250, 248, 0.74);
    font-size: 0.84rem;
    line-height: 1.45;
}

.doctrina-doc-card {
    display: grid;
    gap: 7px;
}

.doctrina-doc-card em {
    color: rgba(113, 243, 213, 0.72);
    font-family: var(--font-terminal);
    font-size: 0.68rem;
    font-style: normal;
}

.doctrina-doc-card button {
    justify-self: start;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(200, 168, 90, 0.68);
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(77, 59, 26, 0.96), rgba(18, 23, 30, 0.98));
    color: #fff1bd;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.doctrina-doc-card button:hover,
.doctrina-doc-card button:focus-visible,
.doctrina-doc-card button.is-generated {
    outline: none;
    border-color: rgba(113, 243, 213, 0.74);
    box-shadow: 0 0 18px rgba(113, 243, 213, 0.14);
}

.doctrina-document-workspace {
    display: grid;
    gap: 12px;
    min-height: 56px;
    padding: 12px;
    border: 1px dashed rgba(113, 243, 213, 0.28);
    border-radius: 8px;
    background: rgba(2, 9, 14, 0.48);
}

.doctrina-document-workspace > p {
    margin: 0;
    color: rgba(238, 250, 248, 0.68);
    font-size: 0.82rem;
}

.doctrina-generated-head {
    display: grid;
    gap: 4px;
}

.doctrina-generated-head em {
    color: rgba(238, 250, 248, 0.64);
    font-family: var(--font-terminal);
    font-size: 0.7rem;
    font-style: normal;
}

.subscriber-executive-copy {
    min-width: 0;
    overflow-wrap: anywhere;
}

.frontier-certainty-panel {
    display: grid;
    gap: 10px;
    margin: 16px 0;
    padding: 12px;
    border: 1px solid rgba(214, 184, 111, 0.42);
    background: rgba(2, 9, 14, 0.78);
}

.frontier-certainty-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    color: var(--matrix-green);
    font-family: var(--font-terminal);
    font-size: 0.72rem;
}

.certainty-directive {
    margin: 0;
    padding-left: 10px;
    border-left: 2px solid var(--brand-warm);
    color: #f1f5f9;
    line-height: 1.55;
}

.frontier-proof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 8px;
}

.frontier-proof-grid article,
.frontier-proof-matrix,
.frontier-blocked-strategies {
    border: 1px solid rgba(105, 196, 188, 0.26);
    background: rgba(255, 255, 255, 0.025);
    padding: 10px;
}

.frontier-proof-grid p {
    margin: 6px 0;
    line-height: 1.45;
}

.frontier-proof-grid span,
.frontier-proof-matrix summary {
    color: var(--neon-cyan);
    font-family: var(--font-terminal);
    font-size: 0.7rem;
}

.frontier-proof-matrix summary {
    cursor: pointer;
}

.frontier-proof-matrix pre {
    max-height: 320px;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.frontier-blocked-strategies strong {
    color: var(--brand-warm);
}

.subscriber-value-panel {
    display: grid;
    gap: 12px;
    margin: 16px 0;
    padding: 14px;
    border: 1px solid rgba(105, 196, 188, 0.46);
    background: linear-gradient(145deg, rgba(2, 16, 20, 0.94), rgba(10, 8, 3, 0.9));
}

.subscriber-value-head,
.subscriber-service-breakdown > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.subscriber-value-head span,
.subscriber-next-question span {
    color: var(--matrix-green);
    font-family: var(--font-terminal);
    font-size: 0.72rem;
}

.subscriber-value-head strong {
    color: var(--brand-warm);
    font-size: 1.05rem;
}

.subscriber-value-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.subscriber-value-metrics article,
.subscriber-next-question,
.subscriber-research-queue {
    padding: 10px;
    border: 1px solid rgba(105, 196, 188, 0.24);
    background: rgba(255, 255, 255, 0.025);
}

.subscriber-value-metrics strong {
    display: block;
    color: #fff8dc;
    font-size: 1.15rem;
}

.subscriber-value-metrics span,
.subscriber-service-breakdown em {
    color: rgba(234, 247, 255, 0.68);
    font-size: 0.72rem;
    font-style: normal;
}

.subscriber-service-breakdown {
    display: grid;
    gap: 6px;
}

.subscriber-service-breakdown > div {
    padding: 8px 10px;
    border-left: 2px solid rgba(214, 184, 111, 0.72);
    background: rgba(0, 0, 0, 0.24);
}

.subscriber-service-breakdown > div strong {
    color: var(--brand-warm);
}

.subscriber-next-question h4,
.subscriber-research-queue h4 {
    margin-top: 0;
}

.subscriber-next-question p,
.subscriber-research-queue p {
    margin-bottom: 6px;
}

.subscriber-completion-form,
.subscriber-completion-question {
    display: grid;
    gap: 8px;
}

.subscriber-completion-question {
    margin-top: 10px;
    padding: 10px;
    border-left: 2px solid rgba(214, 184, 111, 0.72);
    background: rgba(0, 0, 0, 0.24);
}

.subscriber-completion-question small,
.subscriber-completion-form > small,
.subscriber-completion-status {
    color: rgba(234, 247, 255, 0.68);
}

.subscriber-completion-question textarea {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    border: 1px solid rgba(105, 196, 188, 0.46);
    border-radius: 6px;
    padding: 10px;
    color: #10202a;
    background: linear-gradient(145deg, rgba(247, 244, 226, 0.96), rgba(218, 235, 226, 0.94));
    font: inherit;
}

.subscriber-completion-form button {
    padding: 10px 12px;
    border: 1px solid rgba(214, 184, 111, 0.72);
    border-radius: 5px;
    color: #fff8dc;
    background: linear-gradient(145deg, rgba(52, 43, 21, 0.95), rgba(8, 23, 29, 0.96));
    cursor: pointer;
}

.subscriber-completion-form button:disabled {
    cursor: wait;
    opacity: 0.62;
}

.subscriber-research-queue article {
    margin-top: 7px;
    padding: 8px;
    border-left: 2px solid rgba(105, 196, 188, 0.52);
    background: rgba(0, 0, 0, 0.25);
}

.subscriber-research-queue.is-gated {
    border-color: rgba(214, 184, 111, 0.38);
}

@media (max-width: 720px) {
    .subscriber-value-metrics {
        grid-template-columns: 1fr;
    }

    .subscriber-value-head,
    .subscriber-service-breakdown > div {
        align-items: flex-start;
        flex-direction: column;
    }
}

.orchestrator-resume-row {
    display: grid;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin-bottom: 8px;
    font-family: Arial, sans-serif;
    text-align: left;
}

button.orchestrator-resume-row {
    cursor: pointer;
    color: inherit;
}

.orchestrator-resume-row.is-clickable {
    border-color: rgba(214, 184, 111, 0.42);
}

.orchestrator-resume-row.is-clickable:hover,
.orchestrator-resume-row.is-clickable:focus-visible {
    outline: none;
    border-color: rgba(246, 219, 148, 0.86);
    box-shadow: 0 0 18px rgba(214, 184, 111, 0.18);
    transform: translateY(-1px);
}

.orchestrator-resume-row.is-muted {
    opacity: 0.68;
}

.orchestrator-resume-row span,
.orchestrator-resume-row em {
    color: rgba(234, 247, 255, 0.7);
    font-size: 0.76rem;
    font-style: normal;
}

.orchestrator-resume-row strong {
    color: #fff8dc;
    font-size: 0.86rem;
}

.subscriber-citation-index {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.subscriber-citation-link {
    display: grid;
    gap: 4px;
    min-height: 92px;
    padding: 12px;
    border-radius: 4px;
    color: #eaf7ff;
    text-align: left;
    cursor: pointer;
}

.subscriber-citation-link span {
    color: #d6b86f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.94rem;
    font-weight: 800;
}

.subscriber-citation-link strong {
    color: #69c4bc;
    font-family: Arial, sans-serif;
    font-size: 0.76rem;
}

.subscriber-citation-link em {
    color: rgba(234, 247, 255, 0.74);
    font-family: Arial, sans-serif;
    font-size: 0.74rem;
    font-style: normal;
}

.subscriber-citation-link:hover,
.subscriber-citation-link:focus-visible {
    border-color: rgba(105, 196, 188, 0.74);
    box-shadow: 0 0 20px rgba(105, 196, 188, 0.18);
}

.subscriber-document-array {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: stretch;
}

.recommended-doc-card {
    padding: 12px;
    border-radius: 6px;
}

.doctrina-agent-panel {
    display: grid;
    gap: 12px;
}

.doctrina-agent-head {
    border: 1px solid rgba(214, 184, 111, 0.45);
    border-radius: 6px;
    background:
        linear-gradient(135deg, rgba(214, 184, 111, 0.09), transparent 46%),
        rgba(2, 9, 14, 0.78);
    padding: 14px;
}

.doctrina-agent-head span,
.doctrina-doc-card-top span {
    color: #69f0df;
    font-family: "Courier New", monospace;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.doctrina-agent-head strong {
    display: block;
    color: #fff8dc;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
}

.doctrina-agent-head p {
    max-width: 760px;
    margin: 6px 0 0;
    color: rgba(234, 247, 255, 0.76);
    font-family: Arial, sans-serif;
    font-size: 0.82rem;
    line-height: 1.45;
}

.doctrina-doc-card {
    display: grid;
    grid-template-rows: auto auto minmax(3.9em, 1fr) auto;
    gap: 9px;
    min-height: 190px;
    overflow: hidden;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.doctrina-doc-card.is-active {
    border-color: rgba(246, 219, 148, 0.9);
    box-shadow: 0 0 22px rgba(214, 184, 111, 0.16);
    transform: translateY(-1px);
}

.doctrina-doc-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.doctrina-doc-card-top em {
    max-width: 70%;
    border: 1px solid rgba(105, 196, 188, 0.32);
    border-radius: 999px;
    padding: 3px 8px;
    color: rgba(234, 247, 255, 0.82);
    font-family: Arial, sans-serif;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recommended-doc-card strong {
    display: -webkit-box;
    margin: 0;
    color: #fff8dc;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    line-height: 1.15;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommended-doc-card p {
    display: -webkit-box;
    margin: 0;
    color: rgba(234, 247, 255, 0.76);
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
    line-height: 1.35;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doctrina-doc-card > button {
    width: 100%;
    border: 1px solid rgba(214, 184, 111, 0.55);
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(214, 184, 111, 0.2), rgba(2, 9, 14, 0.86));
    color: #fff8dc;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 9px 10px;
    text-transform: uppercase;
}

.doctrina-doc-card > button:hover,
.doctrina-doc-card > button:focus-visible,
.doctrina-doc-card > button.is-generated {
    outline: none;
    border-color: rgba(105, 240, 223, 0.86);
    box-shadow: 0 0 16px rgba(105, 240, 223, 0.16);
}

.doctrina-document-workspace {
    min-height: 92px;
    border: 1px solid rgba(105, 196, 188, 0.24);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.22);
    padding: 12px;
}

.doctrina-document-workspace > p {
    margin: 0;
    color: rgba(234, 247, 255, 0.74);
    font-family: Arial, sans-serif;
    font-size: 0.84rem;
}

.doctrina-generated-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(214, 184, 111, 0.24);
    padding-bottom: 10px;
}

.doctrina-generated-head span {
    color: #69f0df;
    font-family: "Courier New", monospace;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.doctrina-generated-head strong {
    color: #fff8dc;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
}

.doctrina-generated-head em {
    margin-left: auto;
    color: #d6b86f;
    font-family: Arial, sans-serif;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 900;
}

.forensic-audit-card {
    border: 1px dashed rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.01);
    padding: 20px;
}

.audit-meta-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 14px;
    font-size: 0.75rem;
    color: var(--neon-cyan);
    margin-bottom: 14px;
}

.raw-citation-trace {
    font-size: 0.85rem;
    color: #e2e8f0;
    line-height: 1.5;
    background: rgba(0,0,0,0.5);
    padding: 12px;
    border-left: 2px solid var(--neon-pink);
    margin-bottom: 16px;
}

.crypto-seal-signature {
    font-size: 0.7rem;
    color: var(--matrix-green);
    word-break: break-all;
    background: rgba(0, 255, 102, 0.05);
    padding: 8px;
    border: 1px solid rgba(0, 255, 102, 0.2);
}

/* HARD GATED HUMAN INTERCEPT TRIGGER */
.hitl-signature-gate {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gate-status-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    color: #64748b;
}

.pulse-indicator {
    width: 6px;
    height: 6px;
    background: #64748b;
    border-radius: 50%;
}

.gate-trigger-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #64748b;
    padding: 10px 16px;
    font-family: var(--font-cyber);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: not-allowed;
}

/* UNLOCKED SYSTEM STATE CHANGES */
.hitl-signature-gate.passed {
    border-color: var(--matrix-green);
    background: rgba(0, 255, 102, 0.02);
}

.hitl-signature-gate.passed .pulse-indicator {
    background: var(--matrix-green);
    box-shadow: 0 0 8px var(--matrix-green);
    animation: beaconPulse 1s infinite alternate;
}

@keyframes beaconPulse {
    from { transform: scale(1); opacity: 0.5; }
    to { transform: scale(1.4); opacity: 1; }
}

.hitl-signature-gate.passed .gate-status-container {
    color: var(--matrix-green);
}

.hitl-signature-gate.passed .gate-trigger-btn {
    background: var(--matrix-green);
    border-color: var(--matrix-green);
    color: var(--obsidian-dark);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.4);
}

/* LANDING HERO + BEZIER IMAGE WRAPPER */
.landing-container {
    position: relative;
    z-index: 5;
    width: min(1180px, calc(100vw - (var(--page-gutter) * 2)));
    min-height: 100dvh;
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto minmax(320px, 1fr) auto auto;
    gap: clamp(10px, 2dvh, 18px);
    box-sizing: border-box;
    padding: clamp(14px, 2.5dvh, 26px) 0 max(18px, env(safe-area-inset-bottom));
}

.top-bar,
.landing-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #dbeafe;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.logo-brand {
    min-width: 0;
}

.firm-name {
    display: block;
    font-family: var(--font-cyber);
    font-size: clamp(0.76rem, 1.6vw, 1rem);
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-shadow: 0 0 14px rgba(0, 240, 255, 0.45);
}

.landing-state {
    flex: 0 0 auto;
    border: 1px solid rgba(0, 240, 255, 0.32);
    color: var(--matrix-green);
    padding: 8px clamp(8px, 1.8vw, 12px);
    font-size: clamp(0.62rem, 1.35vw, 0.72rem);
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.38);
    box-shadow: inset 0 0 12px rgba(0, 240, 255, 0.08);
}

.hero-section {
    min-height: 0;
    display: grid;
    place-items: center;
}

.pen-platform {
    position: relative;
    width: min(44dvh, var(--hero-max-inline), 92vw);
    max-height: min(66dvh, 720px);
    aspect-ratio: 9 / 16;
    isolation: isolate;
    transform: translateY(0);
    cursor: grab;
    touch-action: pan-y;
}

.pen-platform.is-pen-interacting {
    cursor: grabbing;
}

.pen-platform::before {
    content: "";
    position: absolute;
    left: 18.5%;
    top: 51%;
    width: clamp(14px, 5.2%, 24px);
    aspect-ratio: 1;
    z-index: 8;
    border-radius: 50%;
    pointer-events: none;
    opacity: var(--pen-tip-opacity, 0.22);
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.98) 0 16%, rgba(250, 218, 131, 0.9) 24%, rgba(105, 196, 188, 0.34) 48%, transparent 72%);
    filter:
        drop-shadow(0 0 var(--pen-tip-warm-glow, 8px) rgba(250, 218, 131, 0.72))
        drop-shadow(0 0 var(--pen-tip-cyan-glow, 6px) rgba(105, 196, 188, 0.58));
    transform:
        translate3d(calc(var(--studio-pen-x, 0%) - 50%), calc(var(--studio-pen-y, 0%) - 50%), 0)
        rotate(var(--studio-pen-rotate, 0deg))
        scale(var(--pen-tip-scale, 0.82));
    transform-origin: 50% 50%;
    transition: opacity 680ms ease, filter 760ms ease, transform 760ms cubic-bezier(0.2, 0.8, 0.2, 1);
    mix-blend-mode: screen;
}

.pen-platform.is-pen-charged::before {
    transition-duration: 120ms;
}

.pen-container,
.bezier-flow-layer,
.base-light-field,
.glowing-pedestal {
    position: absolute;
    inset: 0;
}

.pen-container {
    z-index: 2;
}

.fountain-pen {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 22px 35px rgba(0, 0, 0, 0.42));
}

.bezier-flow-layer {
    z-index: 3;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.curve-message {
    fill: rgba(218, 166, 60, 0.92);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(21px, 3.15vw, 31px);
    font-style: italic;
    letter-spacing: 0;
    text-shadow: 0 0 10px rgba(255, 216, 116, 0.58), 0 0 22px rgba(105, 196, 188, 0.18);
}

.signal-curve {
    fill: none;
    stroke: rgba(0, 240, 255, 0.0);
    stroke-width: 3;
    stroke-dasharray: 12 18;
}

.flow-particles {
    opacity: 0;
    transition: opacity 240ms ease;
}

.flow-dot.primary {
    fill: var(--neon-cyan);
}

.flow-dot.secondary {
    fill: #f9d775;
}

.base-light-field {
    z-index: 1;
    background:
        radial-gradient(circle at 50% 72%, rgba(255, 255, 255, 0.72), rgba(0, 240, 255, 0.36) 8%, rgba(0, 240, 255, 0.12) 22%, transparent 42%),
        radial-gradient(ellipse at 50% 81%, rgba(255, 216, 116, 0.2), transparent 34%);
    opacity: 0.55;
    transition: filter 280ms ease, opacity 280ms ease, transform 280ms ease;
}

.glowing-pedestal {
    z-index: 0;
    background: radial-gradient(ellipse at 50% 82%, rgba(0, 240, 255, 0.18), transparent 40%);
}

.legasy-signature {
    position: absolute;
    left: 16%;
    right: 16%;
    top: 47%;
    z-index: 4;
    color: #ffe8a3;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 6dvh, 5.8rem);
    font-style: italic;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 22px rgba(255, 196, 62, 0.9);
    pointer-events: none;
}

.strategic-input-container {
    justify-self: center;
    width: min(var(--control-max-inline), 100%);
    background: rgba(3, 6, 11, 0.82);
    border: 1px solid rgba(0, 240, 255, 0.28);
    box-shadow: 0 0 28px rgba(0, 240, 255, 0.08), inset 0 0 14px rgba(0, 240, 255, 0.05);
    padding: 12px;
    box-sizing: border-box;
}

.input-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.strategic-label,
.telemetry-title {
    color: var(--neon-cyan);
    font-family: var(--font-cyber);
    font-size: clamp(0.66rem, 1.45vw, 0.74rem);
    font-weight: 900;
    letter-spacing: 2px;
}

.strategic-input-container textarea {
    min-height: clamp(76px, 12dvh, 100px);
    max-height: 132px;
    border: 1px solid rgba(0, 240, 255, 0.18);
    background: rgba(0, 0, 0, 0.48);
    margin-bottom: 10px;
}

.strategic-input-container .quantum-execute-btn {
    width: 100%;
}

.landing-footer {
    justify-content: center;
    color: rgba(226, 232, 240, 0.62);
    font-size: clamp(0.64rem, 1.45vw, 0.74rem);
    line-height: 1.35;
    text-align: center;
    overflow-wrap: anywhere;
}

body[data-run-state="running"] .flow-particles,
body[data-run-state="complete"] .flow-particles,
body[data-run-state="error"] .flow-particles {
    opacity: 1;
}

body[data-run-state="running"] .signal-curve {
    stroke: rgba(0, 240, 255, 0.42);
    animation: signalDash 1.1s linear infinite;
}

body[data-run-state="running"] .base-light-field {
    opacity: 1;
    filter: saturate(1.45) brightness(1.28);
    animation: basePulse 1.65s ease-in-out infinite;
}

body[data-run-state="complete"] .base-light-field {
    opacity: 0.62;
    filter: hue-rotate(38deg) saturate(0.95) brightness(0.98);
}

body[data-run-state="error"] .base-light-field {
    opacity: 0.86;
    filter: hue-rotate(140deg) saturate(1.5);
}

.processing-overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    align-content: center;
    padding: var(--page-gutter);
    box-sizing: border-box;
    background: rgba(3, 6, 11, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.processing-overlay.active {
    opacity: 1;
}

.system-map-container {
    position: relative;
    width: min(620px, 86vw, 68dvh);
    aspect-ratio: 1;
}

.central-crystal,
.flow-node {
    position: absolute;
    border: 1px solid rgba(0, 240, 255, 0.45);
    background: rgba(0, 0, 0, 0.72);
    color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.16);
    font-family: var(--font-cyber);
    letter-spacing: 1px;
}

.central-crystal {
    top: 50%;
    left: 50%;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%) rotate(45deg);
    font-weight: 900;
}

.central-crystal::first-letter {
    display: inline-block;
}

.flow-node {
    padding: 10px 12px;
    font-size: clamp(0.58rem, 1.4vw, 0.74rem);
    max-width: 34%;
    text-align: center;
    overflow-wrap: anywhere;
}

.telemetry-dock {
    position: fixed;
    right: var(--page-gutter);
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 15;
    width: min(320px, calc(100vw - (var(--page-gutter) * 2)));
    max-height: 172px;
    background: rgba(3, 6, 11, 0.82);
    border: 1px solid rgba(0, 240, 255, 0.22);
    padding: 10px;
    box-sizing: border-box;
}

.telemetry-dock .live-stream-container {
    max-height: 112px;
    margin-top: 8px;
}

@keyframes signalDash {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -30; }
}

@keyframes basePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.035); }
}

@media (max-width: 760px) {
    body, html {
        overflow-y: auto;
    }

    .landing-container {
        width: min(100% - 24px, 560px);
        min-height: 100dvh;
        grid-template-rows: auto auto auto auto;
        gap: 12px;
        padding-top: max(12px, env(safe-area-inset-top));
    }

    .top-bar {
        align-items: stretch;
        gap: 10px;
        flex-direction: column;
    }

    .firm-name,
    .landing-state {
        text-align: center;
    }

    .landing-state {
        white-space: normal;
    }

    .hero-section {
        min-height: auto;
    }

    .pen-platform {
        width: min(86vw, 370px);
        max-height: 54dvh;
    }

    .curve-message {
        font-size: 24px;
    }

    .legasy-signature {
        left: 10%;
        right: 10%;
        top: 48%;
        font-size: clamp(1.75rem, 10vw, 3.5rem);
    }

    .strategic-input-container {
        padding: 10px;
    }

    .strategic-input-container textarea {
        min-height: 90px;
    }

    .btn-text-layer {
        font-size: clamp(0.68rem, 3vw, 0.85rem);
        line-height: 1.3;
        letter-spacing: 1.2px;
    }

    .telemetry-dock {
        position: relative;
        right: auto;
        bottom: auto;
        width: min(100% - 24px, 560px);
        max-height: 132px;
        margin: 0 auto max(14px, env(safe-area-inset-bottom));
    }

    .telemetry-dock .live-stream-container {
        max-height: 74px;
    }

    .system-map-container {
        width: min(88vw, 420px, 62dvh);
    }

    .central-crystal {
        width: 64px;
        height: 64px;
    }

    .flow-node {
        padding: 8px;
        max-width: 38%;
    }

    .sintesis-tier-header,
    .subscriber-meta-strip,
    .subscriber-summary-grid,
    .tier-action-grid {
        grid-template-columns: 1fr;
    }

    .sintesis-tier-header {
        display: grid;
    }

    .tier-action-btn {
        min-height: 48px;
    }

    .subscriber-citation-index,
    .subscriber-document-array {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 761px) and (max-height: 780px) {
    .landing-container {
        grid-template-rows: auto minmax(250px, 1fr) auto;
    }

    .pen-platform {
        width: min(39dvh, var(--hero-max-inline), 40vw);
    }

    .telemetry-dock {
        max-height: 138px;
    }

    .telemetry-dock .live-stream-container {
        max-height: 82px;
    }
}

@media (min-width: 980px) and (min-height: 820px) {
    .landing-container {
        grid-template-columns: minmax(360px, 0.94fr) minmax(390px, 1.06fr);
        grid-template-rows: auto minmax(0, 1fr) auto;
        align-items: center;
        column-gap: clamp(28px, 5vw, 72px);
    }

    .top-bar,
    .landing-footer {
        grid-column: 1 / -1;
    }

    .hero-section {
        grid-column: 2;
        grid-row: 2;
    }

    .strategic-input-container {
        grid-column: 1;
        grid-row: 2;
        align-self: center;
    }

    .pen-platform {
        width: min(60dvh, 48vw, var(--hero-max-inline));
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

/* REFERENCE-ALIGNED PORTRAIT EXPERIENCE */
body {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 30%, rgba(0, 240, 255, 0.14), transparent 34%),
        linear-gradient(135deg, #071824 0%, #0b4950 52%, #7da2a0 100%);
}

body.access-gate-active {
    overflow: hidden;
}

.access-gate {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 22px;
    background:
        radial-gradient(circle at 50% 36%, rgba(214, 184, 111, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(3, 9, 14, 0.16), rgba(3, 9, 14, 0.32));
    backdrop-filter: blur(2.5px) saturate(1.06);
}

.access-gate[hidden] {
    display: none;
}

.access-gate-card {
    position: relative;
    isolation: isolate;
    width: min(600px, calc(100vw - 34px));
    min-height: min(640px, calc(100dvh - 44px));
    display: grid;
    align-content: start;
    justify-items: center;
    padding: clamp(70px, 9vw, 92px) clamp(34px, 8vw, 72px) clamp(42px, 8vw, 70px);
    border: 0;
    border-radius: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 50% 28%, rgba(214, 184, 111, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(3, 18, 27, 0.46), rgba(3, 18, 27, 0.36));
    background-size: 100% 4px, auto, auto;
    box-shadow:
        0 26px 80px rgba(0, 0, 0, 0.22),
        inset 0 0 0 1px rgba(105, 196, 188, 0.08);
    clip-path: none;
    text-align: center;
}

.access-gate-card::before,
.access-gate-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    clip-path: polygon(50% 0, 100% 92%, 0 92%);
    pointer-events: none;
}

.access-gate-card::before {
    inset: 8px 0 54px;
    background:
        linear-gradient(63deg, transparent 0 12%, rgba(246, 219, 148, 0.9) 12.35% 14.25%, transparent 14.6%),
        linear-gradient(-63deg, transparent 0 12%, rgba(246, 219, 148, 0.9) 12.35% 14.25%, transparent 14.6%),
        linear-gradient(180deg, transparent 0 89.4%, rgba(246, 219, 148, 0.9) 89.8% 91.7%, transparent 92%);
    filter: drop-shadow(0 0 18px rgba(214, 184, 111, 0.28));
}

.access-gate-card::after {
    inset: 12px 46px 64px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        radial-gradient(circle at 50% 38%, rgba(3, 9, 14, 0.34), transparent 34%),
        linear-gradient(180deg, rgba(246, 219, 148, 0.06), rgba(105, 196, 188, 0.05));
    background-size: 100% 4px, auto, auto;
    border: 1px solid rgba(246, 219, 148, 0.2);
}

.access-gate-symbol {
    position: absolute;
    top: clamp(42px, 7vw, 60px);
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    place-items: center;
    width: clamp(44px, 8vw, 58px);
    height: clamp(44px, 8vw, 58px);
    border: 2px solid rgba(246, 219, 148, 0.82);
    border-radius: 50%;
    color: #fff8dc;
    background: rgba(3, 9, 14, 0.38);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 5vw, 2.7rem);
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 0 14px rgba(214, 184, 111, 0.65);
}

.access-gate-kicker {
    position: relative;
    z-index: 1;
    color: #d6b86f;
    font-family: Arial, sans-serif;
    margin-top: clamp(72px, 10vw, 88px);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.78);
}

.access-gate-card h1 {
    position: relative;
    z-index: 1;
    max-width: min(360px, 68vw);
    margin: 6px auto 10px;
    color: #fff8dc;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.05rem, 5.2vw, 3.25rem);
    line-height: 0.92;
    letter-spacing: 0.08em;
    overflow-wrap: anywhere;
}

.access-gate-card p,
.access-gate-card label,
.access-gate-error {
    font-family: Arial, sans-serif;
    letter-spacing: 0;
}

.access-gate-card p {
    position: relative;
    z-index: 1;
    max-width: min(330px, 68vw);
    margin: 0 0 16px;
    color: rgba(234, 247, 255, 0.88);
    font-size: 0.88rem;
    line-height: 1.55;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.86);
}

.access-gate-card a {
    color: #f6db94;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.access-gate-card label {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 8px;
    color: rgba(234, 247, 255, 0.78);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.access-gate-card input {
    position: relative;
    z-index: 1;
    width: min(306px, 62vw);
    min-height: 44px;
    box-sizing: border-box;
    border: 1px solid rgba(105, 196, 188, 0.42);
    border-radius: 5px;
    padding: 0 12px;
    color: #101923;
    background: rgba(255, 253, 239, 0.82);
    font-family: Arial, sans-serif;
    font-size: 1rem;
    font-weight: 800;
}

.access-gate-card button {
    position: relative;
    z-index: 1;
    width: min(306px, 62vw);
    min-height: 44px;
    margin-top: 12px;
    border: 1px solid rgba(214, 184, 111, 0.82);
    border-radius: 5px;
    color: #fff8dc;
    background: linear-gradient(180deg, rgba(70, 57, 30, 0.78), rgba(14, 21, 30, 0.84));
    font-family: Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 900;
    cursor: pointer;
}

.access-gate-card button:hover,
.access-gate-card button:focus-visible {
    outline: none;
    border-color: rgba(246, 219, 148, 1);
    box-shadow: 0 0 18px rgba(214, 184, 111, 0.24);
}

.access-gate-error {
    position: relative;
    z-index: 1;
    max-width: min(306px, 62vw);
    min-height: 20px;
    margin-top: 10px;
    color: #f6db94;
    font-size: 0.86rem;
    font-weight: 800;
}

.access-gate.access-granted {
    opacity: 0;
    transform: scale(1.01);
    transition: opacity 240ms ease, transform 240ms ease;
}

.access-gate.gate-shake .access-gate-card {
    animation: accessGateShake 240ms ease;
}

@keyframes accessGateShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-3px); }
}

@media (max-width: 560px) {
    .access-gate {
        padding: 12px;
    }

    .access-gate-card {
        width: min(100%, 430px);
        min-height: min(560px, calc(100dvh - 24px));
        padding: 72px 24px 54px;
        clip-path: none;
    }

    .access-gate-card::before,
    .access-gate-card::after {
        clip-path: polygon(50% 0, 100% 94%, 0 94%);
    }

    .access-gate-card h1 {
        max-width: 270px;
        font-size: clamp(1.85rem, 9vw, 2.45rem);
        line-height: 0.94;
    }

    .access-gate-card p {
        max-width: 270px;
        font-size: 0.84rem;
    }

    .access-gate-card input,
    .access-gate-card button,
    .access-gate-error {
        width: min(270px, 68vw);
    }

    .access-gate-kicker {
        margin-top: 70px;
    }
}

.landing-container {
    width: min(440px, calc(100vw - 28px));
    min-height: auto;
    height: min(840px, calc(100dvh - 28px));
    grid-template-columns: 1fr;
    grid-template-rows: 56px minmax(0, 1fr) auto;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border: 2px solid rgba(0, 240, 255, 0.75);
    background:
        linear-gradient(rgba(0, 240, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 50% 46%, rgba(17, 137, 137, 0.58), transparent 48%),
        linear-gradient(180deg, #08202d 0%, #0b5660 56%, #a9bcad 100%);
    background-size: 12px 12px, 12px 12px, auto, auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), inset 0 0 32px rgba(0, 240, 255, 0.14);
}

.top-bar {
    height: 56px;
    padding: 0 12px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    background: rgba(3, 18, 27, 0.72);
    border-bottom: 1px solid rgba(0, 240, 255, 0.28);
}

.logo-brand::before {
    content: "M.C.";
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 28px;
    margin-right: 8px;
    color: #eaf7ff;
    font-family: var(--font-cyber);
    font-weight: 900;
    font-size: 0.68rem;
    border: 1px solid rgba(234, 247, 255, 0.7);
    transform: skew(-8deg);
}

.logo-brand {
    display: flex;
    align-items: center;
    justify-content: center;
}

.firm-name {
    color: #eaf7ff;
    font-size: clamp(0.74rem, 2.6vw, 0.98rem);
    letter-spacing: 1px;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}

.landing-state {
    position: absolute;
    top: 60px;
    left: 50%;
    z-index: 6;
    min-width: 170px;
    transform: translateX(-50%);
    color: #d6cf9a;
    background: linear-gradient(180deg, rgba(35, 82, 76, 0.92), rgba(20, 41, 44, 0.92));
    border-color: rgba(226, 214, 143, 0.55);
    clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28), inset 0 0 14px rgba(255, 255, 255, 0.08);
    font-family: var(--font-cyber);
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
}

.hero-section {
    position: relative;
    grid-column: 1;
    grid-row: 2;
    place-items: start center;
    min-height: 0;
    padding-top: 42px;
    background:
        radial-gradient(ellipse at 50% 70%, rgba(148, 228, 215, 0.24), transparent 44%),
        linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 72%, rgba(227, 237, 221, 0.46) 100%);
}

.pen-platform {
    width: min(350px, 88vw);
    max-height: none;
    transform: translateY(0);
    z-index: 2;
}

.fountain-pen {
    mix-blend-mode: normal;
    filter: contrast(1.08) saturate(1.12) drop-shadow(0 18px 22px rgba(0, 0, 0, 0.35));
}

.bezier-flow-layer,
.legasy-signature {
    display: none;
}

.base-flame-chip {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

.ai-flame-field {
    --flame-speed: 6.2s;
    --flame-opacity: 0.42;
    position: absolute;
    left: 22%;
    right: 22%;
    top: 52%;
    height: 19%;
    z-index: 4;
    pointer-events: none;
    opacity: var(--flame-opacity);
    filter: contrast(1.16) saturate(1.65) brightness(1.06) drop-shadow(0 0 16px rgba(0, 240, 255, 0.72));
    mix-blend-mode: screen;
    transform-origin: 50% 100%;
}

.ai-flame-field::before,
.ai-flame-field::after {
    content: "";
    position: absolute;
    inset: 24% 4% 0;
    border-radius: 50% 50% 42% 42%;
    background:
        radial-gradient(ellipse at 50% 78%, rgba(255, 255, 255, 0.96), transparent 28%),
        radial-gradient(ellipse at 50% 56%, rgba(60, 252, 255, 0.84), transparent 48%),
        linear-gradient(180deg, transparent, rgba(0, 240, 255, 0.42));
    animation: flameBreath var(--flame-speed) ease-in-out infinite;
    animation-play-state: paused;
}

.ai-flame-field::after {
    inset: 0 16% 14%;
    opacity: 0.58;
    animation-duration: calc(var(--flame-speed) * 0.74);
    animation-delay: -0.7s;
}

.flame {
    position: absolute;
    bottom: 6%;
    width: 18%;
    height: 76%;
    border-radius: 48% 52% 44% 56%;
    background:
        radial-gradient(ellipse at 50% 80%, rgba(255, 255, 255, 0.94), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(146, 255, 255, 0.92) 34%, rgba(0, 240, 255, 0.52) 76%, rgba(0, 240, 255, 0));
    transform-origin: 50% 100%;
    animation: flameDance var(--flame-speed) ease-in-out infinite;
    animation-play-state: paused;
}

.flame-a { left: 7%; height: 62%; animation-delay: -0.35s; }
.flame-b { left: 24%; height: 88%; animation-delay: -1.1s; }
.flame-c { left: 42%; height: 98%; animation-delay: -0.68s; }
.flame-d { left: 60%; height: 82%; animation-delay: -1.55s; }
.flame-e { left: 77%; height: 58%; animation-delay: -0.2s; }

.curve-message {
    fill: rgba(235, 207, 124, 0.94);
    font-size: 26px;
    text-shadow: 0 0 5px rgba(255, 236, 163, 0.7);
}

.base-light-field {
    opacity: 0.72;
    background:
        radial-gradient(circle at 50% 72%, rgba(255, 255, 255, 0.86), rgba(0, 240, 255, 0.48) 8%, rgba(0, 240, 255, 0.16) 24%, transparent 42%),
        radial-gradient(ellipse at 50% 81%, rgba(88, 250, 235, 0.34), transparent 35%);
}

.glowing-pedestal {
    background: radial-gradient(ellipse at 50% 82%, rgba(0, 255, 240, 0.28), transparent 39%);
}

.legasy-signature {
    top: 47%;
    color: #fff0af;
    font-size: clamp(2.5rem, 13vw, 4.35rem);
    text-shadow: 0 2px 3px rgba(82, 66, 8, 0.46), 0 0 12px rgba(255, 235, 164, 0.88);
}

.strategic-input-container {
    grid-column: 1;
    grid-row: 3;
    position: relative;
    z-index: 12;
    width: calc(100% - 46px);
    margin: -28px auto 24px;
    padding: 12px;
    border-radius: 9px;
    border: 1px solid rgba(255, 224, 139, 0.92);
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 232, 166, 0.42), transparent 34%),
        linear-gradient(180deg, rgba(255, 253, 239, 0.98), rgba(232, 249, 241, 0.96));
    backdrop-filter: blur(14px);
    box-shadow:
        0 16px 32px rgba(0, 0, 0, 0.34),
        0 0 28px rgba(255, 210, 105, 0.3),
        0 0 24px rgba(0, 240, 255, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.strategic-label {
    color: #20313a;
    font-family: Arial, sans-serif;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: none;
}

.strategic-input-container textarea {
    min-height: 104px;
    max-height: 132px;
    color: #101923;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(0, 124, 139, 0.24);
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-size: 0.72rem;
    line-height: 1.45;
    margin-bottom: 8px;
    box-shadow: inset 0 0 0 1px rgba(255, 223, 138, 0.18);
}

.strategic-input-container textarea::placeholder {
    color: #0f172a;
    opacity: 0.72;
}

.quantum-execute-btn {
    border-radius: 4px;
    border-color: rgba(255, 0, 85, 0.72);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 244, 216, 0.42));
    backdrop-filter: blur(4px);
}

.strategic-input-container:focus-within {
    border-color: rgba(255, 224, 139, 1);
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.36),
        0 0 34px rgba(255, 210, 105, 0.48),
        0 0 26px rgba(0, 240, 255, 0.28),
        inset 0 0 0 1px rgba(255, 255, 255, 0.94);
}

.landing-footer,
.telemetry-dock {
    display: none;
}

body[data-run-state="running"] .ai-flame-field {
    --flame-speed: 0.82s;
    --flame-opacity: 0.96;
    filter: contrast(1.28) saturate(2.15) brightness(1.24) drop-shadow(0 0 24px rgba(0, 240, 255, 0.98));
    animation: processHueCycle 2.4s linear infinite;
}

body[data-run-state="running"] .ai-flame-field::before,
body[data-run-state="running"] .ai-flame-field::after,
body[data-run-state="running"] .flame {
    animation-play-state: running;
}

body[data-run-state="complete"] .ai-flame-field {
    --flame-speed: 9s;
    --flame-opacity: 0.28;
    filter: contrast(1.02) saturate(0.95) brightness(0.96) hue-rotate(24deg) drop-shadow(0 0 10px rgba(214, 184, 111, 0.34));
    animation: none;
}

/* AGENTIC ANIMATION ARCHITECTURE: stable base, moving scribe pen, singing Bezier text */
.pen-container {
    overflow: visible;
}

.pen-base-layer,
.pen-scribe-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.cinematic-pen-frame,
.string-orbit-frame,
.base-static-frame,
.base-flame-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    transition: opacity 320ms ease, filter 320ms ease, transform 320ms ease;
}

.cinematic-pen-frame {
    z-index: 6;
    opacity: 0.9;
    mix-blend-mode: normal;
    filter: contrast(1.06) saturate(1.06) brightness(0.98) drop-shadow(0 18px 22px rgba(0, 0, 0, 0.3));
    transform-origin: 63% 35%;
    transform: translate3d(var(--studio-pen-x, 0%), var(--studio-pen-y, 0%), 0) rotate(var(--studio-pen-rotate, 0deg));
    transition: opacity 680ms ease, filter 760ms ease;
    will-change: transform;
    will-change: opacity, transform;
}

.pen-platform[data-pen-mode="cinematic"] .cinematic-pen-frame {
    opacity: 0.88;
    filter: contrast(1.04) saturate(1.08) brightness(0.95) drop-shadow(0 18px 24px rgba(0, 0, 0, 0.32));
}

.pen-platform[data-pen-mode="object"] .cinematic-pen-frame {
    opacity: 0.9;
}

.pen-platform[data-pen-mode="hidden"] .cinematic-pen-frame {
    opacity: 0;
}

/* Position is damped in requestAnimationFrame; CSS transform transitions would fight the gravity controller. */
.pen-platform .cinematic-pen-frame {
    transition: opacity 680ms ease, filter 760ms ease;
    will-change: transform;
}

.pen-platform[data-pen-mode="cinematic"] .base-flame-frame,
.pen-platform[data-pen-mode="cinematic"] .ai-flame-field,
.pen-platform[data-pen-mode="cinematic"] .base-light-field,
.pen-platform[data-pen-mode="cinematic"] .base-static-frame,
.pen-platform[data-pen-mode="cinematic"] .string-orbit-frame,
.pen-platform[data-pen-mode="cinematic"] .bezier-flow-layer,
.pen-platform[data-pen-mode="cinematic"] .legasy-signature,
.pen-platform[data-pen-mode="cinematic"] .glowing-pedestal,
.pen-platform[data-pen-mode="cinematic"] .pen-container {
    opacity: 0;
    animation: none;
}

.pen-platform[data-pen-mode="cinematic"]::after {
    opacity: 0;
    animation: none;
}

.pen-platform[data-pen-mode="cinematic"]::before,
.pen-platform[data-pen-mode="hidden"]::before {
    opacity: 0;
}

.string-orbit-frame {
    z-index: 5;
    opacity: 0.68;
    mix-blend-mode: screen;
    filter: contrast(1.08) saturate(1.18) brightness(1.03) drop-shadow(0 0 8px rgba(200, 168, 90, 0.34));
    transform-origin: 50% 50%;
    transform: rotate(var(--studio-string-rotate, 0deg));
}

.base-static-frame {
    z-index: 4;
    opacity: 0.98;
    mix-blend-mode: normal;
    filter: contrast(1.05) saturate(1.05) brightness(0.98) drop-shadow(0 16px 24px rgba(0, 0, 0, 0.28));
}

.base-flame-frame {
    z-index: 5;
    opacity: 0.76;
    mix-blend-mode: screen;
    filter: contrast(1.2) saturate(1.45) brightness(1.08) drop-shadow(0 0 22px rgba(0, 240, 255, 0.52));
}

body[data-run-state="idle"] .base-static-frame {
    filter: contrast(1.02) saturate(0.96) brightness(0.92) drop-shadow(0 14px 20px rgba(0, 0, 0, 0.28));
}

body[data-run-state="idle"] .base-flame-frame {
    opacity: 0.3;
    transform: translate3d(0, 2.5%, 0) scale(0.74);
    transform-origin: 50% 70%;
    clip-path: inset(37% 15% 6% 15% round 40%);
    filter: contrast(1.12) saturate(1.18) brightness(0.94) drop-shadow(0 0 16px rgba(105, 196, 188, 0.38));
    animation: idleFlameGravityTempo 7.8s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

body[data-run-state="idle"] .base-light-field {
    opacity: 0.36;
    filter: saturate(0.96) brightness(0.9);
    animation: idleBaseGravityPulse 7.8s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

body[data-run-state="idle"] .ai-flame-field {
    --flame-opacity: 0.2;
    filter: contrast(1) saturate(0.92) brightness(0.86);
}

.pen-platform::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    top: 42%;
    height: 28%;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(ellipse at 50% 72%, rgba(0, 240, 255, 0.22), transparent 52%),
        radial-gradient(ellipse at 50% 38%, rgba(246, 219, 148, 0.16), transparent 46%);
    mix-blend-mode: screen;
    filter: blur(8px);
    transition: opacity 320ms ease;
}

body[data-run-state="idle"] .pen-platform::after {
    opacity: 0.34;
    animation: idleGravityBridge 7.8s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.pen-base-layer {
    z-index: 1;
    clip-path: inset(43% 0 0 0);
}

.pen-scribe-layer {
    z-index: 2;
    clip-path: inset(0 0 38% 0);
    transform-origin: 63% 35%;
    will-change: transform;
}

body[data-run-state="running"] .base-light-field {
    opacity: 0.86;
    filter: saturate(1.2) brightness(1.08);
    animation: baseRuntimeColorShift 7.2s ease-in-out infinite;
}

body[data-run-state="running"] .ai-flame-field {
    --flame-speed: 12s;
    --flame-opacity: 0.64;
    filter: contrast(1.08) saturate(1.34) brightness(1.08) drop-shadow(0 0 16px rgba(0, 240, 255, 0.52));
    animation: runtimeFlameHue 6.4s ease-in-out infinite;
}

body[data-run-state="running"] .ai-flame-field::before,
body[data-run-state="running"] .ai-flame-field::after {
    inset: 28% 8% 4%;
    opacity: 0.5;
    border-radius: 48%;
    background:
        radial-gradient(ellipse at 50% 76%, rgba(255, 255, 255, 0.78), transparent 32%),
        radial-gradient(ellipse at 50% 58%, rgba(88, 250, 235, 0.52), transparent 54%),
        linear-gradient(180deg, transparent, rgba(0, 240, 255, 0.24));
    animation: runtimeFlameGlow 5.8s ease-in-out infinite;
}

body[data-run-state="running"] .flame {
    opacity: 0.48;
    height: 54%;
    transform: none;
    animation: runtimeFlameColor 6.8s ease-in-out infinite;
}

/* BEZIER SCRIBE WRAPPER: live pipeline wording around the pen */
.bezier-flow-layer {
    display: block;
    z-index: 5;
    opacity: 0.82;
    mix-blend-mode: screen;
}

.curve-message {
    fill: rgba(246, 219, 148, 0.96);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(28px, 4.4vw, 42px);
    font-style: italic;
    font-weight: 700;
    letter-spacing: 0.01em;
    filter: drop-shadow(0 0 7px rgba(200, 168, 90, 0.65)) drop-shadow(0 1px 2px rgba(7, 17, 29, 0.78));
}

.signal-curve {
    stroke: rgba(200, 168, 90, 0.2);
    stroke-width: 2;
    stroke-dasharray: 10 18;
    animation: signalTrace 9s linear infinite;
}

body[data-run-state="idle"] .bezier-flow-layer {
    opacity: 0.88;
}

body[data-run-state="complete"] .bezier-flow-layer {
    opacity: 0.9;
}

body[data-run-state="idle"] .curve-message,
body[data-run-state="complete"] .curve-message {
    fill: rgba(246, 219, 148, 0.98);
    filter:
        drop-shadow(0 0 10px rgba(200, 168, 90, 0.76))
        drop-shadow(0 1px 2px rgba(7, 17, 29, 0.86));
}

body[data-run-state="running"] .bezier-flow-layer {
    opacity: 1;
}

body[data-run-state="running"] .flow-particles,
body[data-run-state="complete"] .flow-particles,
body[data-run-state="error"] .flow-particles {
    opacity: 0.95;
}

body[data-run-state="running"] .pen-scribe-layer {
    opacity: 0;
    animation: none;
}

body[data-run-state="running"] .cinematic-pen-frame {
    opacity: 1;
    mix-blend-mode: normal;
    animation: cinematicLightSweep 3.8s ease-in-out infinite;
}

body[data-run-state="running"] .pen-platform::after {
    opacity: 0.76;
    animation: runtimeBridgeGlow 6.4s ease-in-out infinite;
}

body[data-run-state="complete"] .pen-scribe-layer {
    animation: none;
}

body[data-run-state="complete"] .cinematic-pen-frame {
    opacity: 0.9;
    filter: contrast(1.02) saturate(0.98) brightness(0.96) drop-shadow(0 12px 16px rgba(0, 0, 0, 0.22));
    animation: none;
}

body[data-run-state="complete"] .base-flame-frame {
    opacity: 0.24;
    filter: contrast(1.02) saturate(0.9) brightness(0.9) hue-rotate(20deg) drop-shadow(0 0 10px rgba(214, 184, 111, 0.28));
}

body[data-run-state="complete"] .pen-platform::after {
    opacity: 0.18;
}

body[data-run-state="error"] .cinematic-pen-frame {
    opacity: 0.88;
    filter: contrast(1.2) saturate(1.18) hue-rotate(120deg) drop-shadow(0 0 16px rgba(154, 49, 80, 0.42));
}

@keyframes penBezierScribe {
    0%, 100% {
        transform: translate3d(-2.2%, 0.3%, 0) rotate(-0.42deg);
    }
    35% {
        transform: translate3d(3.4%, -1.5%, 0) rotate(0.72deg);
    }
    70% {
        transform: translate3d(-0.8%, 1.1%, 0) rotate(-0.2deg);
    }
}

@keyframes penSettledScribe {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    50% {
        transform: translate3d(0.6%, -0.35%, 0) rotate(0.12deg);
    }
}

@keyframes signalTrace {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -84;
    }
}

@keyframes cinematicLightSweep {
    0%, 100% {
        filter: contrast(1.15) saturate(1.18) brightness(0.98) hue-rotate(-18deg) drop-shadow(0 0 16px rgba(105, 196, 188, 0.36));
    }
    34% {
        filter: contrast(1.22) saturate(1.55) brightness(1.08) hue-rotate(48deg) drop-shadow(0 0 20px rgba(121, 255, 168, 0.42));
    }
    68% {
        filter: contrast(1.2) saturate(1.42) brightness(1.08) hue-rotate(118deg) drop-shadow(0 0 22px rgba(200, 168, 90, 0.44));
    }
}

@keyframes runtimeFlameHue {
    0%, 100% {
        filter: contrast(1.06) saturate(1.24) brightness(1.04) hue-rotate(0deg) drop-shadow(0 0 14px rgba(0, 240, 255, 0.46));
    }
    35% {
        filter: contrast(1.08) saturate(1.36) brightness(1.08) hue-rotate(46deg) drop-shadow(0 0 16px rgba(121, 255, 168, 0.46));
    }
    72% {
        filter: contrast(1.08) saturate(1.42) brightness(1.07) hue-rotate(96deg) drop-shadow(0 0 16px rgba(200, 168, 90, 0.42));
    }
}

@keyframes runtimeFlameGlow {
    0%, 100% {
        opacity: 0.48;
        transform: scaleX(1) scaleY(1);
    }
    50% {
        opacity: 0.62;
        transform: scaleX(1.04) scaleY(1.02);
    }
}

@keyframes runtimeFlameColor {
    0%, 100% {
        background:
            radial-gradient(ellipse at 50% 80%, rgba(255, 255, 255, 0.88), transparent 32%),
            linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(146, 255, 255, 0.62) 34%, rgba(0, 240, 255, 0.34) 76%, rgba(0, 240, 255, 0));
    }
    42% {
        background:
            radial-gradient(ellipse at 50% 80%, rgba(255, 255, 255, 0.88), transparent 32%),
            linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(178, 255, 196, 0.58) 34%, rgba(105, 196, 188, 0.36) 76%, rgba(105, 196, 188, 0));
    }
    78% {
        background:
            radial-gradient(ellipse at 50% 80%, rgba(255, 255, 255, 0.88), transparent 32%),
            linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(246, 219, 148, 0.58) 34%, rgba(200, 168, 90, 0.34) 76%, rgba(200, 168, 90, 0));
    }
}

@keyframes baseRuntimeColorShift {
    0%, 100% {
        filter: saturate(1.12) brightness(1.04) hue-rotate(0deg);
    }
    50% {
        filter: saturate(1.28) brightness(1.08) hue-rotate(62deg);
    }
}

@keyframes idleFlameGravityTempo {
    0%, 100% {
        opacity: 0.27;
        transform: translate3d(0, 3%, 0) scale(0.73);
        filter: contrast(1.08) saturate(1.08) brightness(0.9) drop-shadow(0 0 13px rgba(105, 196, 188, 0.32));
    }
    38% {
        opacity: 0.34;
        transform: translate3d(0, 1.2%, 0) scale(0.75);
        filter: contrast(1.14) saturate(1.22) brightness(0.96) drop-shadow(0 0 17px rgba(105, 196, 188, 0.42));
    }
    72% {
        opacity: 0.3;
        transform: translate3d(0, 2.4%, 0) scale(0.74);
        filter: contrast(1.1) saturate(1.14) brightness(0.92) drop-shadow(0 0 15px rgba(200, 168, 90, 0.24));
    }
}

@keyframes idleBaseGravityPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scaleX(0.98) scaleY(0.96);
        filter: saturate(0.9) brightness(0.86);
    }
    42% {
        opacity: 0.42;
        transform: scaleX(1.02) scaleY(1);
        filter: saturate(1.02) brightness(0.94);
    }
}

@keyframes idleGravityBridge {
    0%, 100% {
        opacity: 0.28;
        transform: translate3d(0, 2%, 0) scaleX(0.96) scaleY(0.94);
        filter: blur(8px) saturate(0.92);
    }
    42% {
        opacity: 0.42;
        transform: translate3d(0, 0, 0) scaleX(1.02) scaleY(1);
        filter: blur(7px) saturate(1.08);
    }
}

@keyframes runtimeBridgeGlow {
    0%, 100% {
        opacity: 0.52;
        transform: scaleX(0.98);
    }
    50% {
        opacity: 0.82;
        transform: scaleX(1.03);
    }
}

body[data-run-state="error"] .ai-flame-field {
    --flame-speed: 0.54s;
    --flame-opacity: 0.86;
    filter: contrast(1.2) saturate(2.05) hue-rotate(130deg) drop-shadow(0 0 18px rgba(255, 0, 85, 0.72));
}

.processing-overlay {
    z-index: 30;
}

@media (min-width: 700px) {
    .landing-container {
        width: min(480px, calc(100vw - 48px));
        height: min(900px, calc(100dvh - 48px));
    }

    .pen-platform {
        width: min(390px, 84%);
    }
}

@media (max-width: 430px) {
    body {
        place-items: stretch;
    }

    .landing-container {
        width: 100vw;
        height: 100dvh;
        border-left: 0;
        border-right: 0;
    }

    .top-bar {
        height: 52px;
    }

    .logo-brand::before {
        width: 34px;
        height: 24px;
        margin-right: 7px;
        font-size: 0.6rem;
    }

    .firm-name {
        font-size: clamp(0.72rem, 3.7vw, 0.9rem);
    }

    .landing-state {
        top: 58px;
    }

    .hero-section {
        padding-top: 40px;
    }

    .pen-platform {
        width: min(340px, 92vw);
    }

    .strategic-input-container {
        width: calc(100% - 34px);
        margin-top: -24px;
        margin-bottom: max(18px, env(safe-area-inset-bottom));
    }

    .strategic-input-container textarea {
        min-height: 108px;
    }
}

@keyframes flameDance {
    0%, 100% {
        transform: translateY(5%) scaleX(0.82) scaleY(0.72) skewX(-5deg);
        opacity: 0.28;
    }

    33% {
        transform: translateY(-8%) scaleX(1.08) scaleY(1.1) skewX(7deg);
        opacity: 0.82;
    }

    66% {
        transform: translateY(-2%) scaleX(0.94) scaleY(0.92) skewX(-10deg);
        opacity: 0.58;
    }
}

@keyframes flameBreath {
    0%, 100% {
        transform: translateY(7%) scaleX(0.92) scaleY(0.72);
        opacity: 0.38;
    }

    50% {
        transform: translateY(-6%) scaleX(1.08) scaleY(1.08);
        opacity: 0.88;
    }
}

/* SPECIALIST HUB + COMPILED OUTPUT */
.experience-shell {
    position: relative;
    z-index: 5;
    width: min(980px, calc(100vw - 24px));
    height: min(900px, calc(100dvh - 24px));
    display: grid;
    grid-template-columns: minmax(340px, 440px) minmax(300px, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(250px, 0.42fr);
    gap: 4px;
}

.experience-shell .landing-container {
    width: 100%;
    height: 100%;
    min-height: 0;
    grid-column: 1;
    grid-row: 1;
}

.specialist-hub {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(0, 240, 255, 0.58);
    background:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        radial-gradient(ellipse at 50% 54%, rgba(143, 246, 229, 0.2), transparent 58%),
        linear-gradient(145deg, rgba(4, 34, 44, 0.96), rgba(6, 86, 90, 0.9) 48%, rgba(4, 35, 48, 0.96));
    background-size: 14px 14px, 14px 14px, auto;
    box-shadow: inset 0 0 30px rgba(0, 240, 255, 0.12);
    padding: 18px 18px 20px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto repeat(4, 1fr);
    gap: 10px;
}

.specialist-hub::before,
.specialist-hub::after {
    content: "";
    position: absolute;
    inset: -8%;
    pointer-events: none;
}

.specialist-hub::before {
    z-index: 0;
    opacity: 0.88;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 700 760'%3E%3Cdefs%3E%3Cfilter id='g'%3E%3CfeGaussianBlur stdDeviation='5' result='b'/%3E%3CfeMerge%3E%3CfeMergeNode in='b'/%3E%3CfeMergeNode in='SourceGraphic'/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round' filter='url(%23g)'%3E%3Cpath d='M90 125 H220 Q250 125 250 155 V245 Q250 275 280 275 H352' stroke='%2300f0ff' stroke-opacity='.74' stroke-width='8'/%3E%3Cpath d='M610 120 H472 Q442 120 442 152 V245 Q442 275 412 275 H352' stroke='%2300f0ff' stroke-opacity='.66' stroke-width='8'/%3E%3Cpath d='M352 275 V382' stroke='%2300f0ff' stroke-opacity='.74' stroke-width='9'/%3E%3Cpath d='M352 382 H195 Q165 382 165 412 V522 Q165 552 135 552 H70' stroke='%2300f0ff' stroke-opacity='.68' stroke-width='8'/%3E%3Cpath d='M352 382 H505 Q535 382 535 412 V528 Q535 558 565 558 H636' stroke='%2300f0ff' stroke-opacity='.68' stroke-width='8'/%3E%3Cpath d='M352 382 V612 Q352 642 322 642 H190' stroke='%2300f0ff' stroke-opacity='.58' stroke-width='7'/%3E%3Cpath d='M352 612 Q352 642 382 642 H520' stroke='%2300f0ff' stroke-opacity='.58' stroke-width='7'/%3E%3Cpath d='M90 125 H220 Q250 125 250 155 V245 Q250 275 280 275 H352' stroke='%23eaffff' stroke-opacity='.22' stroke-width='2'/%3E%3Cpath d='M610 120 H472 Q442 120 442 152 V245 Q442 275 412 275 H352' stroke='%23eaffff' stroke-opacity='.2' stroke-width='2'/%3E%3Cpath d='M352 275 V382 H195 Q165 382 165 412 V522 Q165 552 135 552 H70' stroke='%23eaffff' stroke-opacity='.18' stroke-width='2'/%3E%3Cpath d='M352 382 H505 Q535 382 535 412 V528 Q535 558 565 558 H636' stroke='%23eaffff' stroke-opacity='.18' stroke-width='2'/%3E%3C/g%3E%3Cg fill='rgba(3,18,27,.62)' stroke='%23bffcff' stroke-width='4' filter='url(%23g)'%3E%3Cpath d='M90 72 L143 125 L90 178 L37 125 Z'/%3E%3Cpath d='M610 67 L663 120 L610 173 L557 120 Z'/%3E%3Cpath d='M352 222 L405 275 L352 328 L299 275 Z'/%3E%3Cpath d='M70 499 L123 552 L70 605 L17 552 Z'/%3E%3Cpath d='M636 505 L689 558 L636 611 L583 558 Z'/%3E%3Cpath d='M190 589 L243 642 L190 695 L137 642 Z'/%3E%3Cpath d='M520 589 L573 642 L520 695 L467 642 Z'/%3E%3C/g%3E%3Cg fill='%2300f0ff' fill-opacity='.95' filter='url(%23g)'%3E%3Ccircle cx='250' cy='245' r='7'/%3E%3Ccircle cx='442' cy='245' r='6'/%3E%3Ccircle cx='352' cy='382' r='9'/%3E%3Ccircle cx='165' cy='522' r='6'/%3E%3Ccircle cx='535' cy='528' r='6'/%3E%3C/g%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: min(96%, 660px) auto;
    filter: drop-shadow(0 0 18px rgba(0, 240, 255, 0.45));
    animation: neonNodeMapIdle 16s ease-in-out infinite;
}

.specialist-hub::after {
    z-index: 0;
    opacity: 0.9;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 700 760'%3E%3Cdefs%3E%3Cfilter id='glow'%3E%3CfeGaussianBlur stdDeviation='4' result='b'/%3E%3CfeMerge%3E%3CfeMergeNode in='b'/%3E%3CfeMergeNode in='SourceGraphic'/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round' filter='url(%23glow)'%3E%3Cpath d='M90 125 H220 Q250 125 250 155 V245 Q250 275 280 275 H352' stroke='%23f4ffff' stroke-opacity='.86' stroke-width='5' stroke-dasharray='34 210'/%3E%3Cpath d='M610 120 H472 Q442 120 442 152 V245 Q442 275 412 275 H352' stroke='%23f4ffff' stroke-opacity='.78' stroke-width='5' stroke-dasharray='28 220' stroke-dashoffset='70'/%3E%3Cpath d='M352 275 V382' stroke='%23ffffff' stroke-opacity='.9' stroke-width='6' stroke-dasharray='24 110' stroke-dashoffset='30'/%3E%3Cpath d='M352 382 H195 Q165 382 165 412 V522 Q165 552 135 552 H70' stroke='%23f4ffff' stroke-opacity='.8' stroke-width='5' stroke-dasharray='36 240' stroke-dashoffset='110'/%3E%3Cpath d='M352 382 H505 Q535 382 535 412 V528 Q535 558 565 558 H636' stroke='%23f4ffff' stroke-opacity='.8' stroke-width='5' stroke-dasharray='36 240' stroke-dashoffset='20'/%3E%3Cpath d='M352 382 V612 Q352 642 322 642 H190' stroke='%23dfffff' stroke-opacity='.65' stroke-width='4' stroke-dasharray='24 220' stroke-dashoffset='150'/%3E%3Cpath d='M352 612 Q352 642 382 642 H520' stroke='%23dfffff' stroke-opacity='.65' stroke-width='4' stroke-dasharray='24 220' stroke-dashoffset='60'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.82' filter='url(%23glow)'%3E%3Ccircle cx='250' cy='245' r='4'/%3E%3Ccircle cx='442' cy='245' r='4'/%3E%3Ccircle cx='352' cy='382' r='5'/%3E%3Ccircle cx='165' cy='522' r='4'/%3E%3Ccircle cx='535' cy='528' r='4'/%3E%3C/g%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: min(96%, 660px) auto;
    animation: pathSignalPulse 3.8s ease-in-out infinite;
    mix-blend-mode: screen;
}

.hub-title {
    grid-column: 1 / -1;
    justify-self: center;
    position: relative;
    z-index: 2;
    color: #334155;
    font-family: Arial, sans-serif;
    font-weight: 800;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    line-height: 1.1;
}

.specialist-card {
    min-height: 96px;
    position: relative;
    z-index: 2;
    padding: 0;
    border: 1px solid rgba(0, 240, 255, 0.32);
    border-radius: 8px;
    background: rgba(4, 28, 34, 0.72);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    color: #eaf7ff;
    clip-path: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%);
    display: block;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
}

.tier-action-btn.premium {
    background: linear-gradient(180deg, rgba(77, 59, 26, 0.96), rgba(18, 23, 30, 0.98));
}

.tier-action-btn.contact {
    border-color: rgba(105, 196, 188, 0.68);
}

.tier-action-btn:hover,
.tier-action-btn:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(246, 219, 148, 0.92);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22), 0 0 18px rgba(214, 184, 111, 0.18);
}

.subscriber-meta-strip,
.subscriber-summary-grid,
.subscriber-document-array {
    display: grid;
    gap: 10px;
}

.subscriber-meta-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 12px 0;
}

.subscriber-meta-strip span,
.orchestrator-resume-row,
.recommended-doc-card,
.subscriber-citation-link {
    border: 1px solid rgba(105, 196, 188, 0.28);
    background: rgba(2, 9, 14, 0.72);
}

.subscriber-meta-strip span {
    padding: 8px 10px;
    color: #d6b86f;
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
}

.subscriber-summary-grid {
    grid-template-columns: clamp(210px, 34%, 300px) minmax(0, 1fr);
    align-items: start;
}

.subscriber-summary-grid > section {
    min-width: 0;
}

.subscriber-executive-copy {
    min-width: 0;
    overflow-wrap: anywhere;
}

.orchestrator-resume-row {
    display: grid;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin-bottom: 8px;
    font-family: Arial, sans-serif;
    text-align: left;
}

button.orchestrator-resume-row {
    cursor: pointer;
    color: inherit;
}

.orchestrator-resume-row.is-clickable {
    border-color: rgba(214, 184, 111, 0.42);
}

.orchestrator-resume-row.is-clickable:hover,
.orchestrator-resume-row.is-clickable:focus-visible {
    outline: none;
    border-color: rgba(246, 219, 148, 0.86);
    box-shadow: 0 0 18px rgba(214, 184, 111, 0.18);
    transform: translateY(-1px);
}

.orchestrator-resume-row.is-muted {
    opacity: 0.68;
}

.orchestrator-resume-row span,
.orchestrator-resume-row em {
    color: rgba(234, 247, 255, 0.7);
    font-size: 0.76rem;
    font-style: normal;
}

.orchestrator-resume-row strong {
    color: #fff8dc;
    font-size: 0.86rem;
}

.subscriber-citation-index {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.subscriber-citation-link {
    display: grid;
    gap: 4px;
    min-height: 92px;
    padding: 12px;
    border-radius: 4px;
    color: #eaf7ff;
    text-align: left;
    cursor: pointer;
}

.subscriber-citation-link span {
    color: #d6b86f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.94rem;
    font-weight: 800;
}

.subscriber-citation-link strong {
    color: #69c4bc;
    font-family: Arial, sans-serif;
    font-size: 0.76rem;
}

.subscriber-citation-link em {
    color: rgba(234, 247, 255, 0.74);
    font-family: Arial, sans-serif;
    font-size: 0.74rem;
    font-style: normal;
}

.subscriber-citation-link:hover,
.subscriber-citation-link:focus-visible {
    border-color: rgba(105, 196, 188, 0.74);
    box-shadow: 0 0 20px rgba(105, 196, 188, 0.18);
}

.subscriber-document-array {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.recommended-doc-card {
    padding: 12px;
    border-radius: 4px;
}

.recommended-doc-card span {
    color: #d6b86f;
    font-weight: 900;
}

.recommended-doc-card strong {
    display: block;
    margin: 6px 0;
    color: #fff8dc;
    font-family: Georgia, "Times New Roman", serif;
}

.recommended-doc-card p {
    margin: 0;
    font-size: 0.82rem;
}

.doctrina-agent-panel .subscriber-document-array {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: stretch;
}

.doctrina-agent-panel .recommended-doc-card {
    border-radius: 6px;
}

.doctrina-agent-panel .doctrina-doc-card {
    display: grid;
    grid-template-rows: auto auto minmax(3.9em, 1fr) auto;
    gap: 9px;
    min-height: 190px;
    overflow: hidden;
}

.doctrina-agent-panel .doctrina-doc-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.doctrina-agent-panel .doctrina-doc-card-top em {
    max-width: 70%;
    border: 1px solid rgba(105, 196, 188, 0.32);
    border-radius: 999px;
    padding: 3px 8px;
    color: rgba(234, 247, 255, 0.82);
    font-family: Arial, sans-serif;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doctrina-agent-panel .recommended-doc-card strong {
    display: -webkit-box;
    margin: 0;
    font-size: 1rem;
    line-height: 1.15;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doctrina-agent-panel .recommended-doc-card p {
    display: -webkit-box;
    margin: 0;
    color: rgba(234, 247, 255, 0.76);
    font-family: Arial, sans-serif;
    font-size: 0.78rem;
    line-height: 1.35;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doctrina-quality-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 7px;
    border: 1px solid rgba(105, 196, 188, 0.26);
    border-radius: 999px;
    background: rgba(105, 196, 188, 0.07);
    color: rgba(234, 247, 255, 0.86);
    font-family: Arial, sans-serif;
    font-size: 0.64rem;
    font-weight: 800;
}

.doctrina-quality-badge span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doctrina-quality-badge b {
    color: #d6b86f;
    font-size: 0.68rem;
}

.doctrina-generated-head small {
    display: block;
    margin-top: 5px;
    color: rgba(234, 247, 255, 0.68);
    font-family: Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
}

body.client-view-only .agent-choice-layer,
body.client-view-only .persistent-choice-layer,
body.client-view-only .agent-choice-card[data-choice-target="agents"],
body.client-view-only .agent-choice-card[data-choice-target="sintesis"] {
    display: none !important;
}

.doctrina-agent-panel .doctrina-doc-card > button {
    justify-self: stretch;
    width: 100%;
    font-family: Arial, sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.doctrina-agent-panel .doctrina-doc-card.is-active {
    border-color: rgba(246, 219, 148, 0.9);
    box-shadow: 0 0 22px rgba(214, 184, 111, 0.16);
    transform: translateY(-1px);
}

.forensic-audit-card {
    border: 1px dashed rgba(0, 240, 255, 0.3);
    background: rgba(0, 240, 255, 0.01);
    padding: 20px;
}

.audit-meta-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 14px;
    font-size: 0.75rem;
    color: var(--neon-cyan);
    margin-bottom: 14px;
}

.raw-citation-trace {
    font-size: 0.85rem;
    color: #e2e8f0;
    line-height: 1.5;
    background: rgba(0,0,0,0.5);
    padding: 12px;
    border-left: 2px solid var(--neon-pink);
    margin-bottom: 16px;
}

.crypto-seal-signature {
    font-size: 0.7rem;
    color: var(--matrix-green);
    word-break: break-all;
    background: rgba(0, 255, 102, 0.05);
    padding: 8px;
    border: 1px solid rgba(0, 255, 102, 0.2);
}

/* HARD GATED HUMAN INTERCEPT TRIGGER */
.hitl-signature-gate {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gate-status-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    color: #64748b;
}

.pulse-indicator {
    width: 6px;
    height: 6px;
    background: #64748b;
    border-radius: 50%;
}

.gate-trigger-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #64748b;
    padding: 10px 16px;
    font-family: var(--font-cyber);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: not-allowed;
}

/* UNLOCKED SYSTEM STATE CHANGES */
.hitl-signature-gate.passed {
    border-color: var(--matrix-green);
    background: rgba(0, 255, 102, 0.02);
}

.hitl-signature-gate.passed .pulse-indicator {
    background: var(--matrix-green);
    box-shadow: 0 0 8px var(--matrix-green);
    animation: beaconPulse 1s infinite alternate;
}

@keyframes beaconPulse {
    from { transform: scale(1); opacity: 0.5; }
    to { transform: scale(1.4); opacity: 1; }
}

.hitl-signature-gate.passed .gate-status-container {
    color: var(--matrix-green);
}

.hitl-signature-gate.passed .gate-trigger-btn {
    background: var(--matrix-green);
    border-color: var(--matrix-green);
    color: var(--obsidian-dark);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.4);
}

/* LANDING HERO + BEZIER IMAGE WRAPPER */
.landing-container {
    position: relative;
    z-index: 5;
    width: min(1180px, calc(100vw - (var(--page-gutter) * 2)));
    min-height: 100dvh;
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto minmax(320px, 1fr) auto auto;
    gap: clamp(10px, 2dvh, 18px);
    box-sizing: border-box;
    padding: clamp(14px, 2.5dvh, 26px) 0 max(18px, env(safe-area-inset-bottom));
}

.top-bar,
.landing-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #dbeafe;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.logo-brand {
    min-width: 0;
}

.firm-name {
    display: block;
    font-family: var(--font-cyber);
    font-size: clamp(0.76rem, 1.6vw, 1rem);
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-shadow: 0 0 14px rgba(0, 240, 255, 0.45);
}

.landing-state {
    flex: 0 0 auto;
    border: 1px solid rgba(0, 240, 255, 0.32);
    color: var(--matrix-green);
    padding: 8px clamp(8px, 1.8vw, 12px);
    font-size: clamp(0.62rem, 1.35vw, 0.72rem);
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.38);
    box-shadow: inset 0 0 12px rgba(0, 240, 255, 0.08);
}

.hero-section {
    min-height: 0;
    display: grid;
    place-items: center;
}

.pen-platform {
    position: relative;
    width: min(44dvh, var(--hero-max-inline), 92vw);
    max-height: min(66dvh, 720px);
    aspect-ratio: 9 / 16;
    isolation: isolate;
    transform: translateY(0);
    cursor: grab;
    touch-action: pan-y;
}

.pen-platform.is-pen-interacting {
    cursor: grabbing;
}

.pen-platform::before {
    content: "";
    position: absolute;
    left: 18.5%;
    top: 51%;
    width: clamp(14px, 5.2%, 24px);
    aspect-ratio: 1;
    z-index: 8;
    border-radius: 50%;
    pointer-events: none;
    opacity: var(--pen-tip-opacity, 0.22);
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.98) 0 16%, rgba(250, 218, 131, 0.9) 24%, rgba(105, 196, 188, 0.34) 48%, transparent 72%);
    filter:
        drop-shadow(0 0 var(--pen-tip-warm-glow, 8px) rgba(250, 218, 131, 0.72))
        drop-shadow(0 0 var(--pen-tip-cyan-glow, 6px) rgba(105, 196, 188, 0.58));
    transform:
        translate3d(calc(var(--studio-pen-x, 0%) - 50%), calc(var(--studio-pen-y, 0%) - 50%), 0)
        rotate(var(--studio-pen-rotate, 0deg))
        scale(var(--pen-tip-scale, 0.82));
    transform-origin: 50% 50%;
    transition: opacity 680ms ease, filter 760ms ease, transform 760ms cubic-bezier(0.2, 0.8, 0.2, 1);
    mix-blend-mode: screen;
}

.pen-platform.is-pen-charged::before {
    transition-duration: 120ms;
}

.pen-container,
.bezier-flow-layer,
.base-light-field,
.glowing-pedestal {
    position: absolute;
    inset: 0;
}

.pen-container {
    z-index: 2;
}

.fountain-pen {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 22px 35px rgba(0, 0, 0, 0.42));
}

.bezier-flow-layer {
    z-index: 3;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.curve-message {
    fill: rgba(218, 166, 60, 0.92);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(21px, 3.15vw, 31px);
    font-style: italic;
    letter-spacing: 0;
    text-shadow: 0 0 10px rgba(255, 216, 116, 0.58), 0 0 22px rgba(105, 196, 188, 0.18);
}

.signal-curve {
    fill: none;
    stroke: rgba(0, 240, 255, 0.0);
    stroke-width: 3;
    stroke-dasharray: 12 18;
}

.flow-particles {
    opacity: 0;
    transition: opacity 240ms ease;
}

.flow-dot.primary {
    fill: var(--neon-cyan);
}

.flow-dot.secondary {
    fill: #f9d775;
}

.base-light-field {
    z-index: 1;
    background:
        radial-gradient(circle at 50% 72%, rgba(255, 255, 255, 0.72), rgba(0, 240, 255, 0.36) 8%, rgba(0, 240, 255, 0.12) 22%, transparent 42%),
        radial-gradient(ellipse at 50% 81%, rgba(255, 216, 116, 0.2), transparent 34%);
    opacity: 0.55;
    transition: filter 280ms ease, opacity 280ms ease, transform 280ms ease;
}

.glowing-pedestal {
    z-index: 0;
    background: radial-gradient(ellipse at 50% 82%, rgba(0, 240, 255, 0.18), transparent 40%);
}

.legasy-signature {
    position: absolute;
    left: 16%;
    right: 16%;
    top: 47%;
    z-index: 4;
    color: #ffe8a3;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 6dvh, 5.8rem);
    font-style: italic;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 22px rgba(255, 196, 62, 0.9);
    pointer-events: none;
}

.strategic-input-container {
    justify-self: center;
    width: min(var(--control-max-inline), 100%);
    background: rgba(3, 6, 11, 0.82);
    border: 1px solid rgba(0, 240, 255, 0.28);
    box-shadow: 0 0 28px rgba(0, 240, 255, 0.08), inset 0 0 14px rgba(0, 240, 255, 0.05);
    padding: 12px;
    box-sizing: border-box;
}

.input-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.strategic-label,
.telemetry-title {
    color: var(--neon-cyan);
    font-family: var(--font-cyber);
    font-size: clamp(0.66rem, 1.45vw, 0.74rem);
    font-weight: 900;
    letter-spacing: 2px;
}

.strategic-input-container textarea {
    min-height: clamp(76px, 12dvh, 100px);
    max-height: 132px;
    border: 1px solid rgba(0, 240, 255, 0.18);
    background: rgba(0, 0, 0, 0.48);
    margin-bottom: 10px;
}

.strategic-input-container .quantum-execute-btn {
    width: 100%;
}

.landing-footer {
    justify-content: center;
    color: rgba(226, 232, 240, 0.62);
    font-size: clamp(0.64rem, 1.45vw, 0.74rem);
    line-height: 1.35;
    text-align: center;
    overflow-wrap: anywhere;
}

body[data-run-state="running"] .flow-particles,
body[data-run-state="complete"] .flow-particles,
body[data-run-state="error"] .flow-particles {
    opacity: 1;
}

body[data-run-state="running"] .signal-curve {
    stroke: rgba(0, 240, 255, 0.42);
    animation: signalDash 1.1s linear infinite;
}

body[data-run-state="running"] .base-light-field {
    opacity: 1;
    filter: saturate(1.45) brightness(1.28);
    animation: basePulse 1.65s ease-in-out infinite;
}

body[data-run-state="complete"] .base-light-field {
    opacity: 0.62;
    filter: hue-rotate(38deg) saturate(0.95) brightness(0.98);
}

body[data-run-state="error"] .base-light-field {
    opacity: 0.86;
    filter: hue-rotate(140deg) saturate(1.5);
}

.processing-overlay {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    align-content: center;
    padding: var(--page-gutter);
    box-sizing: border-box;
    background: rgba(3, 6, 11, 0.7);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.processing-overlay.active {
    opacity: 1;
}

.system-map-container {
    position: relative;
    width: min(620px, 86vw, 68dvh);
    aspect-ratio: 1;
}

.central-crystal,
.flow-node {
    position: absolute;
    border: 1px solid rgba(0, 240, 255, 0.45);
    background: rgba(0, 0, 0, 0.72);
    color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.16);
    font-family: var(--font-cyber);
    letter-spacing: 1px;
}

.central-crystal {
    top: 50%;
    left: 50%;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%) rotate(45deg);
    font-weight: 900;
}

.central-crystal::first-letter {
    display: inline-block;
}

.flow-node {
    padding: 10px 12px;
    font-size: clamp(0.58rem, 1.4vw, 0.74rem);
    max-width: 34%;
    text-align: center;
    overflow-wrap: anywhere;
}

.telemetry-dock {
    position: fixed;
    right: var(--page-gutter);
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 15;
    width: min(320px, calc(100vw - (var(--page-gutter) * 2)));
    max-height: 172px;
    background: rgba(3, 6, 11, 0.82);
    border: 1px solid rgba(0, 240, 255, 0.22);
    padding: 10px;
    box-sizing: border-box;
}

.telemetry-dock .live-stream-container {
    max-height: 112px;
    margin-top: 8px;
}

@keyframes signalDash {
    from { stroke-dashoffset: 0; }
    to { stroke-dashoffset: -30; }
}

@keyframes basePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.035); }
}

@media (max-width: 760px) {
    body, html {
        overflow-y: auto;
    }

    .landing-container {
        width: min(100% - 24px, 560px);
        min-height: 100dvh;
        grid-template-rows: auto auto auto auto;
        gap: 12px;
        padding-top: max(12px, env(safe-area-inset-top));
    }

    .top-bar {
        align-items: stretch;
        gap: 10px;
        flex-direction: column;
    }

    .firm-name,
    .landing-state {
        text-align: center;
    }

    .landing-state {
        white-space: normal;
    }

    .hero-section {
        min-height: auto;
    }

    .pen-platform {
        width: min(86vw, 370px);
        max-height: 54dvh;
    }

    .curve-message {
        font-size: 24px;
    }

    .legasy-signature {
        left: 10%;
        right: 10%;
        top: 48%;
        font-size: clamp(1.75rem, 10vw, 3.5rem);
    }

    .strategic-input-container {
        padding: 10px;
    }

    .strategic-input-container textarea {
        min-height: 90px;
    }

    .btn-text-layer {
        font-size: clamp(0.68rem, 3vw, 0.85rem);
        line-height: 1.3;
        letter-spacing: 1.2px;
    }

    .telemetry-dock {
        position: relative;
        right: auto;
        bottom: auto;
        width: min(100% - 24px, 560px);
        max-height: 132px;
        margin: 0 auto max(14px, env(safe-area-inset-bottom));
    }

    .telemetry-dock .live-stream-container {
        max-height: 74px;
    }

    .system-map-container {
        width: min(88vw, 420px, 62dvh);
    }

    .central-crystal {
        width: 64px;
        height: 64px;
    }

    .flow-node {
        padding: 8px;
        max-width: 38%;
    }

    .sintesis-tier-header,
    .subscriber-meta-strip,
    .subscriber-summary-grid,
    .tier-action-grid {
        grid-template-columns: 1fr;
    }

    .sintesis-tier-header {
        display: grid;
    }

    .tier-action-btn {
        min-height: 48px;
    }

    .subscriber-citation-index,
    .subscriber-document-array {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 761px) and (max-height: 780px) {
    .landing-container {
        grid-template-rows: auto minmax(250px, 1fr) auto;
    }

    .pen-platform {
        width: min(39dvh, var(--hero-max-inline), 40vw);
    }

    .telemetry-dock {
        max-height: 138px;
    }

    .telemetry-dock .live-stream-container {
        max-height: 82px;
    }
}

@media (min-width: 980px) and (min-height: 820px) {
    .landing-container {
        grid-template-columns: minmax(360px, 0.94fr) minmax(390px, 1.06fr);
        grid-template-rows: auto minmax(0, 1fr) auto;
        align-items: center;
        column-gap: clamp(28px, 5vw, 72px);
    }

    .top-bar,
    .landing-footer {
        grid-column: 1 / -1;
    }

    .hero-section {
        grid-column: 2;
        grid-row: 2;
    }

    .strategic-input-container {
        grid-column: 1;
        grid-row: 2;
        align-self: center;
    }

    .pen-platform {
        width: min(60dvh, 48vw, var(--hero-max-inline));
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

/* REFERENCE-ALIGNED PORTRAIT EXPERIENCE */
body {
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 30%, rgba(0, 240, 255, 0.14), transparent 34%),
        linear-gradient(135deg, #071824 0%, #0b4950 52%, #7da2a0 100%);
}

body.access-gate-active {
    overflow: hidden;
}

.access-gate {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    padding: 22px;
    background:
        radial-gradient(circle at 50% 36%, rgba(214, 184, 111, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(3, 9, 14, 0.16), rgba(3, 9, 14, 0.32));
    backdrop-filter: blur(2.5px) saturate(1.06);
}

.access-gate[hidden] {
    display: none;
}

.access-gate-card {
    position: relative;
    isolation: isolate;
    width: min(600px, calc(100vw - 34px));
    min-height: min(640px, calc(100dvh - 44px));
    display: grid;
    align-content: start;
    justify-items: center;
    padding: clamp(70px, 9vw, 92px) clamp(34px, 8vw, 72px) clamp(42px, 8vw, 70px);
    border: 0;
    border-radius: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 50% 28%, rgba(214, 184, 111, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(3, 18, 27, 0.46), rgba(3, 18, 27, 0.36));
    background-size: 100% 4px, auto, auto;
    box-shadow:
        0 26px 80px rgba(0, 0, 0, 0.22),
        inset 0 0 0 1px rgba(105, 196, 188, 0.08);
    clip-path: none;
    text-align: center;
}

.access-gate-card::before,
.access-gate-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    clip-path: polygon(50% 0, 100% 92%, 0 92%);
    pointer-events: none;
}

.access-gate-card::before {
    inset: 8px 0 54px;
    background:
        linear-gradient(63deg, transparent 0 12%, rgba(246, 219, 148, 0.9) 12.35% 14.25%, transparent 14.6%),
        linear-gradient(-63deg, transparent 0 12%, rgba(246, 219, 148, 0.9) 12.35% 14.25%, transparent 14.6%),
        linear-gradient(180deg, transparent 0 89.4%, rgba(246, 219, 148, 0.9) 89.8% 91.7%, transparent 92%);
    filter: drop-shadow(0 0 18px rgba(214, 184, 111, 0.28));
}

.access-gate-card::after {
    inset: 12px 46px 64px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        radial-gradient(circle at 50% 38%, rgba(3, 9, 14, 0.34), transparent 34%),
        linear-gradient(180deg, rgba(246, 219, 148, 0.06), rgba(105, 196, 188, 0.05));
    background-size: 100% 4px, auto, auto;
    border: 1px solid rgba(246, 219, 148, 0.2);
}

.access-gate-symbol {
    position: absolute;
    top: clamp(42px, 7vw, 60px);
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    place-items: center;
    width: clamp(44px, 8vw, 58px);
    height: clamp(44px, 8vw, 58px);
    border: 2px solid rgba(246, 219, 148, 0.82);
    border-radius: 50%;
    color: #fff8dc;
    background: rgba(3, 9, 14, 0.38);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 5vw, 2.7rem);
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 0 14px rgba(214, 184, 111, 0.65);
}

.access-gate-kicker {
    position: relative;
    z-index: 1;
    color: #d6b86f;
    font-family: Arial, sans-serif;
    margin-top: clamp(72px, 10vw, 88px);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.78);
}

.access-gate-card h1 {
    position: relative;
    z-index: 1;
    max-width: min(360px, 68vw);
    margin: 6px auto 10px;
    color: #fff8dc;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.05rem, 5.2vw, 3.25rem);
    line-height: 0.92;
    letter-spacing: 0.08em;
    overflow-wrap: anywhere;
}

.access-gate-card p,
.access-gate-card label,
.access-gate-error {
    font-family: Arial, sans-serif;
    letter-spacing: 0;
}

.access-gate-card p {
    position: relative;
    z-index: 1;
    max-width: min(330px, 68vw);
    margin: 0 0 16px;
    color: rgba(234, 247, 255, 0.88);
    font-size: 0.88rem;
    line-height: 1.55;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.86);
}

.access-gate-card a {
    color: #f6db94;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.access-gate-card label {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 8px;
    color: rgba(234, 247, 255, 0.78);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.access-gate-card input {
    position: relative;
    z-index: 1;
    width: min(306px, 62vw);
    min-height: 44px;
    box-sizing: border-box;
    border: 1px solid rgba(105, 196, 188, 0.42);
    border-radius: 5px;
    padding: 0 12px;
    color: #101923;
    background: rgba(255, 253, 239, 0.82);
    font-family: Arial, sans-serif;
    font-size: 1rem;
    font-weight: 800;
}

.access-gate-card button {
    position: relative;
    z-index: 1;
    width: min(306px, 62vw);
    min-height: 44px;
    margin-top: 12px;
    border: 1px solid rgba(214, 184, 111, 0.82);
    border-radius: 5px;
    color: #fff8dc;
    background: linear-gradient(180deg, rgba(70, 57, 30, 0.78), rgba(14, 21, 30, 0.84));
    font-family: Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 900;
    cursor: pointer;
}

.access-gate-card button:hover,
.access-gate-card button:focus-visible {
    outline: none;
    border-color: rgba(246, 219, 148, 1);
    box-shadow: 0 0 18px rgba(214, 184, 111, 0.24);
}

.access-gate-error {
    position: relative;
    z-index: 1;
    max-width: min(306px, 62vw);
    min-height: 20px;
    margin-top: 10px;
    color: #f6db94;
    font-size: 0.86rem;
    font-weight: 800;
}

.access-gate.access-granted {
    opacity: 0;
    transform: scale(1.01);
    transition: opacity 240ms ease, transform 240ms ease;
}

.access-gate.gate-shake .access-gate-card {
    animation: accessGateShake 240ms ease;
}

@keyframes accessGateShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-3px); }
}

@media (max-width: 560px) {
    .access-gate {
        padding: 12px;
    }

    .access-gate-card {
        width: min(100%, 430px);
        min-height: min(560px, calc(100dvh - 24px));
        padding: 72px 24px 54px;
        clip-path: none;
    }

    .access-gate-card::before,
    .access-gate-card::after {
        clip-path: polygon(50% 0, 100% 94%, 0 94%);
    }

    .access-gate-card h1 {
        max-width: 270px;
        font-size: clamp(1.85rem, 9vw, 2.45rem);
        line-height: 0.94;
    }

    .access-gate-card p {
        max-width: 270px;
        font-size: 0.84rem;
    }

    .access-gate-card input,
    .access-gate-card button,
    .access-gate-error {
        width: min(270px, 68vw);
    }

    .access-gate-kicker {
        margin-top: 70px;
    }
}

.landing-container {
    width: min(440px, calc(100vw - 28px));
    min-height: auto;
    height: min(840px, calc(100dvh - 28px));
    grid-template-columns: 1fr;
    grid-template-rows: 56px minmax(0, 1fr) auto;
    gap: 0;
    padding: 0;
    overflow: hidden;
    border: 2px solid rgba(0, 240, 255, 0.75);
    background:
        linear-gradient(rgba(0, 240, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 50% 46%, rgba(17, 137, 137, 0.58), transparent 48%),
        linear-gradient(180deg, #08202d 0%, #0b5660 56%, #a9bcad 100%);
    background-size: 12px 12px, 12px 12px, auto, auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), inset 0 0 32px rgba(0, 240, 255, 0.14);
}

.top-bar {
    height: 56px;
    padding: 0 12px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    background: rgba(3, 18, 27, 0.72);
    border-bottom: 1px solid rgba(0, 240, 255, 0.28);
}

.logo-brand::before {
    content: "M.C.";
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 28px;
    margin-right: 8px;
    color: #eaf7ff;
    font-family: var(--font-cyber);
    font-weight: 900;
    font-size: 0.68rem;
    border: 1px solid rgba(234, 247, 255, 0.7);
    transform: skew(-8deg);
}

.logo-brand {
    display: flex;
    align-items: center;
    justify-content: center;
}

.firm-name {
    color: #eaf7ff;
    font-size: clamp(0.74rem, 2.6vw, 0.98rem);
    letter-spacing: 1px;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}

.landing-state {
    position: absolute;
    top: 60px;
    left: 50%;
    z-index: 6;
    min-width: 170px;
    transform: translateX(-50%);
    color: #d6cf9a;
    background: linear-gradient(180deg, rgba(35, 82, 76, 0.92), rgba(20, 41, 44, 0.92));
    border-color: rgba(226, 214, 143, 0.55);
    clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28), inset 0 0 14px rgba(255, 255, 255, 0.08);
    font-family: var(--font-cyber);
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
}

.hero-section {
    position: relative;
    grid-column: 1;
    grid-row: 2;
    place-items: start center;
    min-height: 0;
    padding-top: 42px;
    background:
        radial-gradient(ellipse at 50% 70%, rgba(148, 228, 215, 0.24), transparent 44%),
        linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 72%, rgba(227, 237, 221, 0.46) 100%);
}

.pen-platform {
    width: min(350px, 88vw);
    max-height: none;
    transform: translateY(0);
    z-index: 2;
}

.fountain-pen {
    mix-blend-mode: normal;
    filter: contrast(1.08) saturate(1.12) drop-shadow(0 18px 22px rgba(0, 0, 0, 0.35));
}

.bezier-flow-layer,
.legasy-signature {
    display: none;
}

.base-flame-chip {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

.ai-flame-field {
    --flame-speed: 6.2s;
    --flame-opacity: 0.42;
    position: absolute;
    left: 22%;
    right: 22%;
    top: 52%;
    height: 19%;
    z-index: 4;
    pointer-events: none;
    opacity: var(--flame-opacity);
    filter: contrast(1.16) saturate(1.65) brightness(1.06) drop-shadow(0 0 16px rgba(0, 240, 255, 0.72));
    mix-blend-mode: screen;
    transform-origin: 50% 100%;
}

.ai-flame-field::before,
.ai-flame-field::after {
    content: "";
    position: absolute;
    inset: 24% 4% 0;
    border-radius: 50% 50% 42% 42%;
    background:
        radial-gradient(ellipse at 50% 78%, rgba(255, 255, 255, 0.96), transparent 28%),
        radial-gradient(ellipse at 50% 56%, rgba(60, 252, 255, 0.84), transparent 48%),
        linear-gradient(180deg, transparent, rgba(0, 240, 255, 0.42));
    animation: flameBreath var(--flame-speed) ease-in-out infinite;
    animation-play-state: paused;
}

.ai-flame-field::after {
    inset: 0 16% 14%;
    opacity: 0.58;
    animation-duration: calc(var(--flame-speed) * 0.74);
    animation-delay: -0.7s;
}

.flame {
    position: absolute;
    bottom: 6%;
    width: 18%;
    height: 76%;
    border-radius: 48% 52% 44% 56%;
    background:
        radial-gradient(ellipse at 50% 80%, rgba(255, 255, 255, 0.94), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(146, 255, 255, 0.92) 34%, rgba(0, 240, 255, 0.52) 76%, rgba(0, 240, 255, 0));
    transform-origin: 50% 100%;
    animation: flameDance var(--flame-speed) ease-in-out infinite;
    animation-play-state: paused;
}

.flame-a { left: 7%; height: 62%; animation-delay: -0.35s; }
.flame-b { left: 24%; height: 88%; animation-delay: -1.1s; }
.flame-c { left: 42%; height: 98%; animation-delay: -0.68s; }
.flame-d { left: 60%; height: 82%; animation-delay: -1.55s; }
.flame-e { left: 77%; height: 58%; animation-delay: -0.2s; }

.curve-message {
    fill: rgba(235, 207, 124, 0.94);
    font-size: 26px;
    text-shadow: 0 0 5px rgba(255, 236, 163, 0.7);
}

.base-light-field {
    opacity: 0.72;
    background:
        radial-gradient(circle at 50% 72%, rgba(255, 255, 255, 0.86), rgba(0, 240, 255, 0.48) 8%, rgba(0, 240, 255, 0.16) 24%, transparent 42%),
        radial-gradient(ellipse at 50% 81%, rgba(88, 250, 235, 0.34), transparent 35%);
}

.glowing-pedestal {
    background: radial-gradient(ellipse at 50% 82%, rgba(0, 255, 240, 0.28), transparent 39%);
}

.legasy-signature {
    top: 47%;
    color: #fff0af;
    font-size: clamp(2.5rem, 13vw, 4.35rem);
    text-shadow: 0 2px 3px rgba(82, 66, 8, 0.46), 0 0 12px rgba(255, 235, 164, 0.88);
}

.strategic-input-container {
    grid-column: 1;
    grid-row: 3;
    position: relative;
    z-index: 12;
    width: calc(100% - 46px);
    margin: -28px auto 24px;
    padding: 12px;
    border-radius: 9px;
    border: 1px solid rgba(255, 224, 139, 0.92);
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 232, 166, 0.42), transparent 34%),
        linear-gradient(180deg, rgba(255, 253, 239, 0.98), rgba(232, 249, 241, 0.96));
    backdrop-filter: blur(14px);
    box-shadow:
        0 16px 32px rgba(0, 0, 0, 0.34),
        0 0 28px rgba(255, 210, 105, 0.3),
        0 0 24px rgba(0, 240, 255, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.82);
}

.strategic-label {
    color: #20313a;
    font-family: Arial, sans-serif;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: none;
}

.strategic-input-container textarea {
    min-height: 104px;
    max-height: 132px;
    color: #101923;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(0, 124, 139, 0.24);
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-size: 0.72rem;
    line-height: 1.45;
    margin-bottom: 8px;
    box-shadow: inset 0 0 0 1px rgba(255, 223, 138, 0.18);
}

.strategic-input-container textarea::placeholder {
    color: #0f172a;
    opacity: 0.72;
}

.quantum-execute-btn {
    border-radius: 4px;
    border-color: rgba(255, 0, 85, 0.72);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(255, 244, 216, 0.42));
    backdrop-filter: blur(4px);
}

.strategic-input-container:focus-within {
    border-color: rgba(255, 224, 139, 1);
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.36),
        0 0 34px rgba(255, 210, 105, 0.48),
        0 0 26px rgba(0, 240, 255, 0.28),
        inset 0 0 0 1px rgba(255, 255, 255, 0.94);
}

.landing-footer,
.telemetry-dock {
    display: none;
}

body[data-run-state="running"] .ai-flame-field {
    --flame-speed: 0.82s;
    --flame-opacity: 0.96;
    filter: contrast(1.28) saturate(2.15) brightness(1.24) drop-shadow(0 0 24px rgba(0, 240, 255, 0.98));
    animation: processHueCycle 2.4s linear infinite;
}

body[data-run-state="running"] .ai-flame-field::before,
body[data-run-state="running"] .ai-flame-field::after,
body[data-run-state="running"] .flame {
    animation-play-state: running;
}

body[data-run-state="complete"] .ai-flame-field {
    --flame-speed: 9s;
    --flame-opacity: 0.28;
    filter: contrast(1.02) saturate(0.95) brightness(0.96) hue-rotate(24deg) drop-shadow(0 0 10px rgba(214, 184, 111, 0.34));
    animation: none;
}

/* AGENTIC ANIMATION ARCHITECTURE: stable base, moving scribe pen, singing Bezier text */
.pen-container {
    overflow: visible;
}

.pen-base-layer,
.pen-scribe-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.cinematic-pen-frame,
.string-orbit-frame,
.base-static-frame,
.base-flame-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    transition: opacity 320ms ease, filter 320ms ease, transform 320ms ease;
}

.cinematic-pen-frame {
    z-index: 6;
    opacity: 0.9;
    mix-blend-mode: normal;
    filter: contrast(1.06) saturate(1.06) brightness(0.98) drop-shadow(0 18px 22px rgba(0, 0, 0, 0.3));
    transform-origin: 63% 35%;
    transform: translate3d(var(--studio-pen-x, 0%), var(--studio-pen-y, 0%), 0) rotate(var(--studio-pen-rotate, 0deg));
    will-change: opacity, transform;
}

.pen-platform[data-pen-mode="cinematic"] .cinematic-pen-frame {
    opacity: 0.88;
    filter: contrast(1.04) saturate(1.08) brightness(0.95) drop-shadow(0 18px 24px rgba(0, 0, 0, 0.32));
}

.pen-platform[data-pen-mode="object"] .cinematic-pen-frame {
    opacity: 0.9;
}

.pen-platform[data-pen-mode="hidden"] .cinematic-pen-frame {
    opacity: 0;
}

.pen-platform[data-pen-mode="cinematic"] .base-flame-frame,
.pen-platform[data-pen-mode="cinematic"] .ai-flame-field,
.pen-platform[data-pen-mode="cinematic"] .base-light-field,
.pen-platform[data-pen-mode="cinematic"] .base-static-frame,
.pen-platform[data-pen-mode="cinematic"] .string-orbit-frame,
.pen-platform[data-pen-mode="cinematic"] .bezier-flow-layer,
.pen-platform[data-pen-mode="cinematic"] .legasy-signature,
.pen-platform[data-pen-mode="cinematic"] .glowing-pedestal,
.pen-platform[data-pen-mode="cinematic"] .pen-container {
    opacity: 0;
    animation: none;
}

.pen-platform[data-pen-mode="cinematic"]::after {
    opacity: 0;
    animation: none;
}

.pen-platform[data-pen-mode="cinematic"]::before,
.pen-platform[data-pen-mode="hidden"]::before {
    opacity: 0;
}

.string-orbit-frame {
    z-index: 5;
    opacity: 0.68;
    mix-blend-mode: screen;
    filter: contrast(1.08) saturate(1.18) brightness(1.03) drop-shadow(0 0 8px rgba(200, 168, 90, 0.34));
    transform-origin: 50% 50%;
    transform: rotate(var(--studio-string-rotate, 0deg));
}

.base-static-frame {
    z-index: 4;
    opacity: 0.98;
    mix-blend-mode: normal;
    filter: contrast(1.05) saturate(1.05) brightness(0.98) drop-shadow(0 16px 24px rgba(0, 0, 0, 0.28));
}

.base-flame-frame {
    z-index: 5;
    opacity: 0.76;
    mix-blend-mode: screen;
    filter: contrast(1.2) saturate(1.45) brightness(1.08) drop-shadow(0 0 22px rgba(0, 240, 255, 0.52));
}

body[data-run-state="idle"] .base-static-frame {
    filter: contrast(1.02) saturate(0.96) brightness(0.92) drop-shadow(0 14px 20px rgba(0, 0, 0, 0.28));
}

body[data-run-state="idle"] .base-flame-frame {
    opacity: 0.3;
    transform: translate3d(0, 2.5%, 0) scale(0.74);
    transform-origin: 50% 70%;
    clip-path: inset(37% 15% 6% 15% round 40%);
    filter: contrast(1.12) saturate(1.18) brightness(0.94) drop-shadow(0 0 16px rgba(105, 196, 188, 0.38));
    animation: idleFlameGravityTempo 7.8s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

body[data-run-state="idle"] .base-light-field {
    opacity: 0.36;
    filter: saturate(0.96) brightness(0.9);
    animation: idleBaseGravityPulse 7.8s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

body[data-run-state="idle"] .ai-flame-field {
    --flame-opacity: 0.2;
    filter: contrast(1) saturate(0.92) brightness(0.86);
}

.pen-platform::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    top: 42%;
    height: 28%;
    z-index: 4;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(ellipse at 50% 72%, rgba(0, 240, 255, 0.22), transparent 52%),
        radial-gradient(ellipse at 50% 38%, rgba(246, 219, 148, 0.16), transparent 46%);
    mix-blend-mode: screen;
    filter: blur(8px);
    transition: opacity 320ms ease;
}

body[data-run-state="idle"] .pen-platform::after {
    opacity: 0.34;
    animation: idleGravityBridge 7.8s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.pen-base-layer {
    z-index: 1;
    clip-path: inset(43% 0 0 0);
}

.pen-scribe-layer {
    z-index: 2;
    clip-path: inset(0 0 38% 0);
    transform-origin: 63% 35%;
    will-change: transform;
}

body[data-run-state="running"] .base-light-field {
    opacity: 0.86;
    filter: saturate(1.2) brightness(1.08);
    animation: baseRuntimeColorShift 7.2s ease-in-out infinite;
}

body[data-run-state="running"] .ai-flame-field {
    --flame-speed: 12s;
    --flame-opacity: 0.64;
    filter: contrast(1.08) saturate(1.34) brightness(1.08) drop-shadow(0 0 16px rgba(0, 240, 255, 0.52));
    animation: runtimeFlameHue 6.4s ease-in-out infinite;
}

body[data-run-state="running"] .ai-flame-field::before,
body[data-run-state="running"] .ai-flame-field::after {
    inset: 28% 8% 4%;
    opacity: 0.5;
    border-radius: 48%;
    background:
        radial-gradient(ellipse at 50% 76%, rgba(255, 255, 255, 0.78), transparent 32%),
        radial-gradient(ellipse at 50% 58%, rgba(88, 250, 235, 0.52), transparent 54%),
        linear-gradient(180deg, transparent, rgba(0, 240, 255, 0.24));
    animation: runtimeFlameGlow 5.8s ease-in-out infinite;
}

body[data-run-state="running"] .flame {
    opacity: 0.48;
    height: 54%;
    transform: none;
    animation: runtimeFlameColor 6.8s ease-in-out infinite;
}

/* BEZIER SCRIBE WRAPPER: live pipeline wording around the pen */
.bezier-flow-layer {
    display: block;
    z-index: 5;
    opacity: 0.82;
    mix-blend-mode: screen;
}

.curve-message {
    fill: rgba(246, 219, 148, 0.96);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(28px, 4.4vw, 42px);
    font-style: italic;
    font-weight: 700;
    letter-spacing: 0.01em;
    filter: drop-shadow(0 0 7px rgba(200, 168, 90, 0.65)) drop-shadow(0 1px 2px rgba(7, 17, 29, 0.78));
}

.signal-curve {
    stroke: rgba(200, 168, 90, 0.2);
    stroke-width: 2;
    stroke-dasharray: 10 18;
    animation: signalTrace 9s linear infinite;
}

body[data-run-state="idle"] .bezier-flow-layer {
    opacity: 0.88;
}

body[data-run-state="complete"] .bezier-flow-layer {
    opacity: 0.9;
}

body[data-run-state="idle"] .curve-message,
body[data-run-state="complete"] .curve-message {
    fill: rgba(246, 219, 148, 0.98);
    filter:
        drop-shadow(0 0 10px rgba(200, 168, 90, 0.76))
        drop-shadow(0 1px 2px rgba(7, 17, 29, 0.86));
}

body[data-run-state="running"] .bezier-flow-layer {
    opacity: 1;
}

body[data-run-state="running"] .flow-particles,
body[data-run-state="complete"] .flow-particles,
body[data-run-state="error"] .flow-particles {
    opacity: 0.95;
}

body[data-run-state="running"] .pen-scribe-layer {
    opacity: 0;
    animation: none;
}

body[data-run-state="running"] .cinematic-pen-frame {
    opacity: 1;
    mix-blend-mode: normal;
    animation: cinematicLightSweep 3.8s ease-in-out infinite;
}

body[data-run-state="running"] .pen-platform::after {
    opacity: 0.76;
    animation: runtimeBridgeGlow 6.4s ease-in-out infinite;
}

body[data-run-state="complete"] .pen-scribe-layer {
    animation: none;
}

body[data-run-state="complete"] .cinematic-pen-frame {
    opacity: 0.9;
    filter: contrast(1.02) saturate(0.98) brightness(0.96) drop-shadow(0 12px 16px rgba(0, 0, 0, 0.22));
    animation: none;
}

body[data-run-state="complete"] .base-flame-frame {
    opacity: 0.24;
    filter: contrast(1.02) saturate(0.9) brightness(0.9) hue-rotate(20deg) drop-shadow(0 0 10px rgba(214, 184, 111, 0.28));
}

body[data-run-state="complete"] .pen-platform::after {
    opacity: 0.18;
}

body[data-run-state="error"] .cinematic-pen-frame {
    opacity: 0.88;
    filter: contrast(1.2) saturate(1.18) hue-rotate(120deg) drop-shadow(0 0 16px rgba(154, 49, 80, 0.42));
}

@keyframes penBezierScribe {
    0%, 100% {
        transform: translate3d(-2.2%, 0.3%, 0) rotate(-0.42deg);
    }
    35% {
        transform: translate3d(3.4%, -1.5%, 0) rotate(0.72deg);
    }
    70% {
        transform: translate3d(-0.8%, 1.1%, 0) rotate(-0.2deg);
    }
}

@keyframes penSettledScribe {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    50% {
        transform: translate3d(0.6%, -0.35%, 0) rotate(0.12deg);
    }
}

@keyframes signalTrace {
    from {
        stroke-dashoffset: 0;
    }
    to {
        stroke-dashoffset: -84;
    }
}

@keyframes cinematicLightSweep {
    0%, 100% {
        filter: contrast(1.15) saturate(1.18) brightness(0.98) hue-rotate(-18deg) drop-shadow(0 0 16px rgba(105, 196, 188, 0.36));
    }
    34% {
        filter: contrast(1.22) saturate(1.55) brightness(1.08) hue-rotate(48deg) drop-shadow(0 0 20px rgba(121, 255, 168, 0.42));
    }
    68% {
        filter: contrast(1.2) saturate(1.42) brightness(1.08) hue-rotate(118deg) drop-shadow(0 0 22px rgba(200, 168, 90, 0.44));
    }
}

@keyframes runtimeFlameHue {
    0%, 100% {
        filter: contrast(1.06) saturate(1.24) brightness(1.04) hue-rotate(0deg) drop-shadow(0 0 14px rgba(0, 240, 255, 0.46));
    }
    35% {
        filter: contrast(1.08) saturate(1.36) brightness(1.08) hue-rotate(46deg) drop-shadow(0 0 16px rgba(121, 255, 168, 0.46));
    }
    72% {
        filter: contrast(1.08) saturate(1.42) brightness(1.07) hue-rotate(96deg) drop-shadow(0 0 16px rgba(200, 168, 90, 0.42));
    }
}

@keyframes runtimeFlameGlow {
    0%, 100% {
        opacity: 0.48;
        transform: scaleX(1) scaleY(1);
    }
    50% {
        opacity: 0.62;
        transform: scaleX(1.04) scaleY(1.02);
    }
}

@keyframes runtimeFlameColor {
    0%, 100% {
        background:
            radial-gradient(ellipse at 50% 80%, rgba(255, 255, 255, 0.88), transparent 32%),
            linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(146, 255, 255, 0.62) 34%, rgba(0, 240, 255, 0.34) 76%, rgba(0, 240, 255, 0));
    }
    42% {
        background:
            radial-gradient(ellipse at 50% 80%, rgba(255, 255, 255, 0.88), transparent 32%),
            linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(178, 255, 196, 0.58) 34%, rgba(105, 196, 188, 0.36) 76%, rgba(105, 196, 188, 0));
    }
    78% {
        background:
            radial-gradient(ellipse at 50% 80%, rgba(255, 255, 255, 0.88), transparent 32%),
            linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(246, 219, 148, 0.58) 34%, rgba(200, 168, 90, 0.34) 76%, rgba(200, 168, 90, 0));
    }
}

@keyframes baseRuntimeColorShift {
    0%, 100% {
        filter: saturate(1.12) brightness(1.04) hue-rotate(0deg);
    }
    50% {
        filter: saturate(1.28) brightness(1.08) hue-rotate(62deg);
    }
}

@keyframes idleFlameGravityTempo {
    0%, 100% {
        opacity: 0.27;
        transform: translate3d(0, 3%, 0) scale(0.73);
        filter: contrast(1.08) saturate(1.08) brightness(0.9) drop-shadow(0 0 13px rgba(105, 196, 188, 0.32));
    }
    38% {
        opacity: 0.34;
        transform: translate3d(0, 1.2%, 0) scale(0.75);
        filter: contrast(1.14) saturate(1.22) brightness(0.96) drop-shadow(0 0 17px rgba(105, 196, 188, 0.42));
    }
    72% {
        opacity: 0.3;
        transform: translate3d(0, 2.4%, 0) scale(0.74);
        filter: contrast(1.1) saturate(1.14) brightness(0.92) drop-shadow(0 0 15px rgba(200, 168, 90, 0.24));
    }
}

@keyframes idleBaseGravityPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scaleX(0.98) scaleY(0.96);
        filter: saturate(0.9) brightness(0.86);
    }
    42% {
        opacity: 0.42;
        transform: scaleX(1.02) scaleY(1);
        filter: saturate(1.02) brightness(0.94);
    }
}

@keyframes idleGravityBridge {
    0%, 100% {
        opacity: 0.28;
        transform: translate3d(0, 2%, 0) scaleX(0.96) scaleY(0.94);
        filter: blur(8px) saturate(0.92);
    }
    42% {
        opacity: 0.42;
        transform: translate3d(0, 0, 0) scaleX(1.02) scaleY(1);
        filter: blur(7px) saturate(1.08);
    }
}

@keyframes runtimeBridgeGlow {
    0%, 100% {
        opacity: 0.52;
        transform: scaleX(0.98);
    }
    50% {
        opacity: 0.82;
        transform: scaleX(1.03);
    }
}

body[data-run-state="error"] .ai-flame-field {
    --flame-speed: 0.54s;
    --flame-opacity: 0.86;
    filter: contrast(1.2) saturate(2.05) hue-rotate(130deg) drop-shadow(0 0 18px rgba(255, 0, 85, 0.72));
}

.processing-overlay {
    z-index: 30;
}

@media (min-width: 700px) {
    .landing-container {
        width: min(480px, calc(100vw - 48px));
        height: min(900px, calc(100dvh - 48px));
    }

    .pen-platform {
        width: min(390px, 84%);
    }
}

@media (max-width: 430px) {
    body {
        place-items: stretch;
    }

    .landing-container {
        width: 100vw;
        height: 100dvh;
        border-left: 0;
        border-right: 0;
    }

    .top-bar {
        height: 52px;
    }

    .logo-brand::before {
        width: 34px;
        height: 24px;
        margin-right: 7px;
        font-size: 0.6rem;
    }

    .firm-name {
        font-size: clamp(0.72rem, 3.7vw, 0.9rem);
    }

    .landing-state {
        top: 58px;
    }

    .hero-section {
        padding-top: 40px;
    }

    .pen-platform {
        width: min(340px, 92vw);
    }

    .strategic-input-container {
        width: calc(100% - 34px);
        margin-top: -24px;
        margin-bottom: max(18px, env(safe-area-inset-bottom));
    }

    .strategic-input-container textarea {
        min-height: 108px;
    }
}

@keyframes flameDance {
    0%, 100% {
        transform: translateY(5%) scaleX(0.82) scaleY(0.72) skewX(-5deg);
        opacity: 0.28;
    }

    33% {
        transform: translateY(-8%) scaleX(1.08) scaleY(1.1) skewX(7deg);
        opacity: 0.82;
    }

    66% {
        transform: translateY(-2%) scaleX(0.94) scaleY(0.92) skewX(-10deg);
        opacity: 0.58;
    }
}

@keyframes flameBreath {
    0%, 100% {
        transform: translateY(7%) scaleX(0.92) scaleY(0.72);
        opacity: 0.38;
    }

    50% {
        transform: translateY(-6%) scaleX(1.08) scaleY(1.08);
        opacity: 0.88;
    }
}

/* SPECIALIST HUB + COMPILED OUTPUT */
.experience-shell {
    position: relative;
    z-index: 5;
    width: min(980px, calc(100vw - 24px));
    height: min(900px, calc(100dvh - 24px));
    display: grid;
    grid-template-columns: minmax(340px, 440px) minmax(300px, 1fr);
    grid-template-rows: minmax(0, 1fr) minmax(250px, 0.42fr);
    gap: 4px;
}

.experience-shell .landing-container {
    width: 100%;
    height: 100%;
    min-height: 0;
    grid-column: 1;
    grid-row: 1;
}

.specialist-hub {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(0, 240, 255, 0.58);
    background:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        radial-gradient(ellipse at 50% 54%, rgba(143, 246, 229, 0.2), transparent 58%),
        linear-gradient(145deg, rgba(4, 34, 44, 0.96), rgba(6, 86, 90, 0.9) 48%, rgba(4, 35, 48, 0.96));
    background-size: 14px 14px, 14px 14px, auto;
    box-shadow: inset 0 0 30px rgba(0, 240, 255, 0.12);
    padding: 18px 18px 20px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto repeat(4, 1fr);
    gap: 10px;
}

.specialist-hub::before,
.specialist-hub::after {
    content: "";
    position: absolute;
    inset: -8%;
    pointer-events: none;
}

.specialist-hub::before {
    z-index: 0;
    opacity: 0.88;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 700 760'%3E%3Cdefs%3E%3Cfilter id='g'%3E%3CfeGaussianBlur stdDeviation='5' result='b'/%3E%3CfeMerge%3E%3CfeMergeNode in='b'/%3E%3CfeMergeNode in='SourceGraphic'/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round' filter='url(%23g)'%3E%3Cpath d='M90 125 H220 Q250 125 250 155 V245 Q250 275 280 275 H352' stroke='%2300f0ff' stroke-opacity='.74' stroke-width='8'/%3E%3Cpath d='M610 120 H472 Q442 120 442 152 V245 Q442 275 412 275 H352' stroke='%2300f0ff' stroke-opacity='.66' stroke-width='8'/%3E%3Cpath d='M352 275 V382' stroke='%2300f0ff' stroke-opacity='.74' stroke-width='9'/%3E%3Cpath d='M352 382 H195 Q165 382 165 412 V522 Q165 552 135 552 H70' stroke='%2300f0ff' stroke-opacity='.68' stroke-width='8'/%3E%3Cpath d='M352 382 H505 Q535 382 535 412 V528 Q535 558 565 558 H636' stroke='%2300f0ff' stroke-opacity='.68' stroke-width='8'/%3E%3Cpath d='M352 382 V612 Q352 642 322 642 H190' stroke='%2300f0ff' stroke-opacity='.58' stroke-width='7'/%3E%3Cpath d='M352 612 Q352 642 382 642 H520' stroke='%2300f0ff' stroke-opacity='.58' stroke-width='7'/%3E%3Cpath d='M90 125 H220 Q250 125 250 155 V245 Q250 275 280 275 H352' stroke='%23eaffff' stroke-opacity='.22' stroke-width='2'/%3E%3Cpath d='M610 120 H472 Q442 120 442 152 V245 Q442 275 412 275 H352' stroke='%23eaffff' stroke-opacity='.2' stroke-width='2'/%3E%3Cpath d='M352 275 V382 H195 Q165 382 165 412 V522 Q165 552 135 552 H70' stroke='%23eaffff' stroke-opacity='.18' stroke-width='2'/%3E%3Cpath d='M352 382 H505 Q535 382 535 412 V528 Q535 558 565 558 H636' stroke='%23eaffff' stroke-opacity='.18' stroke-width='2'/%3E%3C/g%3E%3Cg fill='rgba(3,18,27,.62)' stroke='%23bffcff' stroke-width='4' filter='url(%23g)'%3E%3Cpath d='M90 72 L143 125 L90 178 L37 125 Z'/%3E%3Cpath d='M610 67 L663 120 L610 173 L557 120 Z'/%3E%3Cpath d='M352 222 L405 275 L352 328 L299 275 Z'/%3E%3Cpath d='M70 499 L123 552 L70 605 L17 552 Z'/%3E%3Cpath d='M636 505 L689 558 L636 611 L583 558 Z'/%3E%3Cpath d='M190 589 L243 642 L190 695 L137 642 Z'/%3E%3Cpath d='M520 589 L573 642 L520 695 L467 642 Z'/%3E%3C/g%3E%3Cg fill='%2300f0ff' fill-opacity='.95' filter='url(%23g)'%3E%3Ccircle cx='250' cy='245' r='7'/%3E%3Ccircle cx='442' cy='245' r='6'/%3E%3Ccircle cx='352' cy='382' r='9'/%3E%3Ccircle cx='165' cy='522' r='6'/%3E%3Ccircle cx='535' cy='528' r='6'/%3E%3C/g%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: min(96%, 660px) auto;
    filter: drop-shadow(0 0 18px rgba(0, 240, 255, 0.45));
    animation: neonNodeMapIdle 16s ease-in-out infinite;
}

.specialist-hub::after {
    z-index: 0;
    opacity: 0.9;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 700 760'%3E%3Cdefs%3E%3Cfilter id='glow'%3E%3CfeGaussianBlur stdDeviation='4' result='b'/%3E%3CfeMerge%3E%3CfeMergeNode in='b'/%3E%3CfeMergeNode in='SourceGraphic'/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round' filter='url(%23glow)'%3E%3Cpath d='M90 125 H220 Q250 125 250 155 V245 Q250 275 280 275 H352' stroke='%23f4ffff' stroke-opacity='.86' stroke-width='5' stroke-dasharray='34 210'/%3E%3Cpath d='M610 120 H472 Q442 120 442 152 V245 Q442 275 412 275 H352' stroke='%23f4ffff' stroke-opacity='.78' stroke-width='5' stroke-dasharray='28 220' stroke-dashoffset='70'/%3E%3Cpath d='M352 275 V382' stroke='%23ffffff' stroke-opacity='.9' stroke-width='6' stroke-dasharray='24 110' stroke-dashoffset='30'/%3E%3Cpath d='M352 382 H195 Q165 382 165 412 V522 Q165 552 135 552 H70' stroke='%23f4ffff' stroke-opacity='.8' stroke-width='5' stroke-dasharray='36 240' stroke-dashoffset='110'/%3E%3Cpath d='M352 382 H505 Q535 382 535 412 V528 Q535 558 565 558 H636' stroke='%23f4ffff' stroke-opacity='.8' stroke-width='5' stroke-dasharray='36 240' stroke-dashoffset='20'/%3E%3Cpath d='M352 382 V612 Q352 642 322 642 H190' stroke='%23dfffff' stroke-opacity='.65' stroke-width='4' stroke-dasharray='24 220' stroke-dashoffset='150'/%3E%3Cpath d='M352 612 Q352 642 382 642 H520' stroke='%23dfffff' stroke-opacity='.65' stroke-width='4' stroke-dasharray='24 220' stroke-dashoffset='60'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.82' filter='url(%23glow)'%3E%3Ccircle cx='250' cy='245' r='4'/%3E%3Ccircle cx='442' cy='245' r='4'/%3E%3Ccircle cx='352' cy='382' r='5'/%3E%3Ccircle cx='165' cy='522' r='4'/%3E%3Ccircle cx='535' cy='528' r='4'/%3E%3C/g%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: min(96%, 660px) auto;
    animation: pathSignalPulse 3.8s ease-in-out infinite;
    mix-blend-mode: screen;
}

.hub-title {
    grid-column: 1 / -1;
    justify-self: center;
    position: relative;
    z-index: 2;
    color: #334155;
    font-family: Arial, sans-serif;
    font-weight: 800;
    font-size: clamp(0.9rem, 1.8vw, 1.1rem);
    line-height: 1.1;
}

.specialist-card {
    min-height: 96px;
    position: relative;
    z-index: 2;
    padding: 0;
    border: 1px solid rgba(0, 240, 255, 0.32);
    border-radius: 8px;
    background: rgba(4, 28, 34, 0.72);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    color: #eaf7ff;
    clip-path: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%);
    display: block;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
}

.specialist-card:hover,
.specialist-card.active {
    border-color: rgba(0, 240, 255, 0.7);
    background: rgba(4, 48, 56, 0.86);
    box-shadow: 0 0 22px rgba(0, 240, 255, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.86);
}

.specialist-card:nth-of-type(1) {
    grid-column: 1 / span 2;
    grid-row: 2;
}

.specialist-card:nth-of-type(2) {
    grid-column: 3 / span 2;
    grid-row: 2;
}

.specialist-card.center-card {
    grid-column: 2 / span 2;
    grid-row: 3;
}

.specialist-card:nth-of-type(4) {
    grid-column: 1 / span 2;
    grid-row: 4;
}

.specialist-card:nth-of-type(5) {
    grid-column: 3 / span 2;
    grid-row: 4;
}

.specialist-card.output-card:nth-of-type(6) {
    grid-column: 1 / span 2;
    grid-row: 5;
}

.specialist-card.output-card:nth-of-type(7) {
    grid-column: 3 / span 2;
    grid-row: 5;
}

.hub-icon {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    transform: none;
    overflow: hidden;
}

.hub-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.82;
    filter: contrast(1.1) saturate(1.08) brightness(0.82);
    transform: none;
}

.specialist-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.12)),
        radial-gradient(circle at 50% 50%, transparent 38%, rgba(3, 14, 24, 0.46) 100%);
    pointer-events: none;
}

.specialist-card:hover .hub-icon img,
.specialist-card.active .hub-icon img {
    opacity: 1;
    filter: contrast(1.08) saturate(1.22) brightness(0.92);
}

.hub-icon + .matrix-tag,
.specialist-card .matrix-tag {
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 18%;
    z-index: 2;
    color: #f8fafc;
    font-family: Arial, sans-serif;
    font-size: clamp(0.66rem, 1.25vw, 0.82rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.86);
    background: rgba(3, 14, 24, 0.58);
    border: 1px solid rgba(0, 240, 255, 0.24);
    border-radius: 3px;
    padding: 4px 5px;
}

.output-console {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 760px;
    border: 2px solid rgba(0, 240, 255, 0.62);
    background: rgba(2, 7, 13, 0.94);
    box-shadow: inset 0 0 30px rgba(0, 240, 255, 0.08), 0 -10px 42px rgba(0, 0, 0, 0.26);
    display: grid;
    grid-template-rows: auto auto minmax(620px, auto) auto;
    padding: 10px;
    box-sizing: border-box;
}

.compiled-header {
    color: var(--neon-cyan);
    font-family: var(--font-cyber);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.output-console .matrix-tab-bar {
    margin-bottom: 8px;
}

.output-console .matrix-content-viewport {
    min-height: 620px;
    max-height: none;
    margin-bottom: 14px;
    padding: 18px 18px 24px;
    overflow: auto;
}

.output-console .static-prompt-msg {
    margin-top: 20px;
}

.output-console .hitl-signature-gate {
    min-height: 44px;
    position: relative;
    z-index: 3;
    margin-top: 0;
}

.output-console .live-stream-container {
    min-height: 120px;
    max-height: 100%;
}

@media (max-width: 820px) {
    body {
        place-items: stretch;
    }

    .experience-shell {
        width: 100vw;
        height: auto;
        min-height: 100dvh;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto minmax(300px, auto);
        gap: 0;
    }

    .experience-shell .landing-container {
        grid-column: 1;
        grid-row: 1;
        width: 100vw;
        height: min(820px, 100dvh);
    }

    .specialist-hub {
        grid-column: 1;
        grid-row: 2;
        border-left: 0;
        border-right: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
        padding: 14px;
    }

    .specialist-card,
    .specialist-card:nth-of-type(1),
    .specialist-card:nth-of-type(2),
    .specialist-card.center-card,
    .specialist-card:nth-of-type(4),
    .specialist-card:nth-of-type(5),
    .specialist-card.output-card:nth-of-type(6),
    .specialist-card.output-card:nth-of-type(7) {
        grid-column: auto;
        grid-row: auto;
        min-height: 88px;
    }

    .output-console {
        grid-column: 1;
        grid-row: 3;
        border-left: 0;
        border-right: 0;
        min-height: 360px;
    }
}

/* LEGAL-SERIOUS THEME TUNING */
:root {
    --neon-cyan: #69c4bc;
    --neon-pink: #9a3150;
    --matrix-green: #9fc7a6;
    --obsidian-dark: #07111d;
    --panel-glow: rgba(105, 196, 188, 0.04);
    --panel-solid: rgba(7, 17, 29, 0.88);
    --border-laser: rgba(105, 196, 188, 0.28);
    --brand-accent: #69c4bc;
    --brand-warm: #c8a85a;
}

body {
    background:
        radial-gradient(circle at 50% 28%, rgba(105, 196, 188, 0.1), transparent 36%),
        linear-gradient(135deg, #07111d 0%, #0f3b43 54%, #596f6e 100%);
}

.landing-container {
    border-color: rgba(105, 196, 188, 0.68);
    background:
        linear-gradient(rgba(105, 196, 188, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(105, 196, 188, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 50% 46%, rgba(32, 104, 107, 0.48), transparent 50%),
        linear-gradient(180deg, #0a1f2d 0%, #164d53 58%, #7f938b 100%);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.52), inset 0 0 28px rgba(105, 196, 188, 0.12);
}

.top-bar {
    background: rgba(7, 17, 29, 0.78);
    border-bottom-color: rgba(105, 196, 188, 0.24);
}

.firm-name {
    color: #edf4f1;
}

.landing-state {
    color: #d6c486;
    border-color: rgba(200, 168, 90, 0.58);
    background: linear-gradient(180deg, rgba(45, 73, 68, 0.94), rgba(18, 34, 42, 0.96));
}

.specialist-hub {
    border-color: rgba(105, 196, 188, 0.48);
    background:
        linear-gradient(rgba(237, 244, 241, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(237, 244, 241, 0.032) 1px, transparent 1px),
        radial-gradient(ellipse at 50% 54%, rgba(105, 196, 188, 0.14), transparent 58%),
        linear-gradient(145deg, rgba(7, 25, 36, 0.98), rgba(15, 68, 73, 0.92) 48%, rgba(7, 24, 35, 0.98));
}

.hub-title {
    color: rgba(224, 235, 231, 0.72);
}

.specialist-card {
    border-color: rgba(105, 196, 188, 0.28);
    background: rgba(7, 25, 36, 0.74);
}

.specialist-card:hover,
.specialist-card.active {
    border-color: rgba(200, 168, 90, 0.82);
    box-shadow: 0 0 20px rgba(105, 196, 188, 0.24), inset 0 0 0 1px rgba(200, 168, 90, 0.62);
}

.specialist-card .matrix-tag {
    border-color: rgba(105, 196, 188, 0.24);
    background: rgba(7, 17, 29, 0.66);
}

.output-console {
    border-color: rgba(105, 196, 188, 0.52);
    background: rgba(5, 12, 21, 0.96);
}

.compiled-header,
.strategic-label,
.matrix-tab.active,
.curve-message {
    color: #c8a85a;
}

.btn-text-layer {
    color: #f8fafc;
}

/* PROGRESSIVE LANDING -> DASHBOARD FLOW */
body {
    overflow-y: auto;
}

body:not(.dashboard-ready) .experience-shell {
    width: min(480px, calc(100vw - 28px));
    height: min(900px, calc(100dvh - 28px));
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
}

body:not(.dashboard-ready) .experience-shell .landing-container {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
}

body:not(.dashboard-ready) .specialist-hub,
body:not(.dashboard-ready) .output-console {
    display: none;
}

body.dashboard-minimized .experience-shell {
    width: min(520px, calc(100vw - 28px));
    height: min(900px, calc(100dvh - 28px));
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto auto;
}

body.dashboard-minimized .experience-shell .landing-container {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
}

body.dashboard-minimized .specialist-hub,
body.dashboard-minimized .output-console {
    grid-column: 1;
    width: calc(100% - 28px);
    justify-self: center;
    opacity: 0.72;
    transform: none;
    cursor: pointer;
}

body.dashboard-minimized .specialist-hub {
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(7, minmax(36px, 1fr));
    grid-template-rows: 1fr;
    gap: 6px;
    min-height: 58px;
    max-height: 68px;
    padding: 7px;
    overflow: hidden;
}

body.dashboard-minimized .hub-title {
    display: none;
}

body.dashboard-minimized .specialist-card,
body.dashboard-minimized .specialist-card:nth-of-type(1),
body.dashboard-minimized .specialist-card:nth-of-type(2),
body.dashboard-minimized .specialist-card.center-card,
body.dashboard-minimized .specialist-card:nth-of-type(4),
body.dashboard-minimized .specialist-card:nth-of-type(5),
body.dashboard-minimized .specialist-card.output-card:nth-of-type(6),
body.dashboard-minimized .specialist-card.output-card:nth-of-type(7) {
    grid-column: auto;
    grid-row: auto;
    min-height: 44px;
    padding: 4px;
    gap: 0;
}

body.dashboard-minimized .specialist-card .matrix-tag {
    display: none;
}

body.dashboard-minimized .specialist-card .chip-response,
body.dashboard-minimized .specialist-card .chip-usage-caption,
body.dashboard-minimized .specialist-card .chip-usage-rail {
    display: none;
}

body.dashboard-minimized .specialist-card .chip-usage-core {
    top: 50%;
    width: min(76%, 42px);
    background:
        radial-gradient(circle, rgba(6, 22, 33, 0.86), rgba(6, 22, 33, 0.56) 58%, rgba(6, 22, 33, 0.08) 72%),
        conic-gradient(from -90deg, var(--usage-accent, rgba(105, 196, 188, 0.72)) var(--citation-usage, 0%), rgba(224, 235, 231, 0.12) 0);
}

body.dashboard-minimized .specialist-card .chip-usage-percent {
    font-size: clamp(0.74rem, 2.8vw, 0.95rem);
}

body.dashboard-minimized .hub-icon {
    width: 100%;
    height: 100%;
}

body.dashboard-minimized .hub-icon img {
    width: 100%;
    height: 100%;
    opacity: 0.88;
}

body.dashboard-minimized .output-console {
    grid-row: 3;
    height: 54px;
    min-height: 54px;
    max-height: 54px;
    resize: none;
    overflow: hidden;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.dashboard-minimized .output-console .compiled-header {
    margin: 0;
    white-space: nowrap;
}

body.dashboard-minimized .output-console .matrix-tab-bar,
body.dashboard-minimized .output-console .matrix-content-viewport,
body.dashboard-minimized .output-console .hitl-signature-gate {
    display: none;
}

body.dashboard-ready .experience-shell {
    height: auto;
    min-height: min(900px, calc(100dvh - 24px));
    grid-template-rows: minmax(560px, 1fr) auto;
}

body.dashboard-ready .specialist-hub,
body.dashboard-ready .output-console {
    animation: dashboardReveal 360ms ease both;
}

body.calibration-pending .experience-shell {
    width: min(520px, calc(100vw - 28px)) !important;
    height: min(900px, calc(100dvh - 28px)) !important;
    min-height: 0 !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: minmax(0, 1fr) !important;
    justify-content: center !important;
    justify-items: center !important;
    margin-inline: auto !important;
}

body.calibration-pending .experience-shell .landing-container {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    height: 100% !important;
}

body.calibration-pending .specialist-hub,
body.calibration-pending .output-console,
body.calibration-pending .persistent-choice-layer {
    display: none !important;
}

.output-console {
    height: clamp(820px, 92dvh, 1280px);
    min-height: 760px;
    max-height: none;
    resize: vertical;
    overflow: auto;
}

.output-console .matrix-content-viewport {
    overflow: auto;
    resize: vertical;
    min-height: 620px;
}

.output-console .matrix-pane.pane-active {
    display: block;
    min-height: 100%;
}

.sintesis-output-block,
.forensic-audit-card,
.raw-citation-trace {
    overflow-wrap: anywhere;
}

@keyframes dashboardReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes processHueCycle {
    0% {
        filter: hue-rotate(0deg) saturate(1.75) brightness(1.14) drop-shadow(0 0 22px rgba(0, 240, 255, 0.95));
    }

    32% {
        filter: hue-rotate(42deg) saturate(1.95) brightness(1.22) drop-shadow(0 0 24px rgba(88, 255, 175, 0.9));
    }

    66% {
        filter: hue-rotate(172deg) saturate(1.85) brightness(1.12) drop-shadow(0 0 22px rgba(255, 213, 91, 0.82));
    }

    100% {
        filter: hue-rotate(360deg) saturate(1.75) brightness(1.14) drop-shadow(0 0 22px rgba(0, 240, 255, 0.95));
    }
}

@keyframes rootNetworkIdle {
    0%, 100% {
        transform: translate3d(0, 0, 0);
        opacity: 0.46;
    }

    50% {
        transform: translate3d(0.6%, -0.4%, 0);
        opacity: 0.58;
    }
}

@keyframes rootDataFlow {
    0% {
        background-position:
            center, center, center, center, center,
            center, center, center,
            0% 0%,
            100% 100%,
            center;
        filter: hue-rotate(0deg) saturate(1);
    }

    50% {
        background-position:
            center, center, center, center, center,
            center, center, center,
            62% 48%,
            38% 58%,
            center;
        filter: hue-rotate(18deg) saturate(1.2);
    }

    100% {
        background-position:
            center, center, center, center, center,
            center, center, center,
            130% 96%,
            -20% -12%,
            center;
        filter: hue-rotate(0deg) saturate(1);
    }
}

@keyframes rootNodeSignal {
    0% {
        opacity: 0.42;
    }

    25% {
        opacity: 0.72;
    }

    50% {
        opacity: 0.52;
    }

    75% {
        opacity: 0.82;
    }

    100% {
        opacity: 0.48;
    }
}

@keyframes neonNodeMapIdle {
    0%, 100% {
        opacity: 0.78;
        transform: translate3d(0, 0, 0);
    }

    50% {
        opacity: 0.94;
        transform: translate3d(0.4%, -0.2%, 0);
    }
}

@keyframes neonPacketFlow {
    0% {
        background-position:
            center, center, center, center, center,
            -90% 38%,
            52% 120%;
    }

    50% {
        background-position:
            center, center, center, center, center,
            52% 38%,
            52% 48%;
    }

    100% {
        background-position:
            center, center, center, center, center,
            160% 38%,
            52% -80%;
    }
}

@keyframes neonNodeBlink {
    0%, 100% {
        opacity: 0.5;
        filter: brightness(0.92);
    }

    20% {
        opacity: 0.82;
        filter: brightness(1.18);
    }

    45% {
        opacity: 0.62;
        filter: brightness(1);
    }

    70% {
        opacity: 0.94;
        filter: brightness(1.28);
    }
}

@keyframes pathSignalPulse {
    0%, 100% {
        opacity: 0.34;
        filter: saturate(1) brightness(0.9);
    }

    35% {
        opacity: 0.86;
        filter: saturate(1.25) brightness(1.22);
    }

    70% {
        opacity: 0.52;
        filter: saturate(1.05) brightness(1);
    }
}

@media (max-width: 820px) {
    body:not(.dashboard-ready) .experience-shell {
        width: 100vw;
        height: 100dvh;
    }

    body.dashboard-ready .experience-shell {
        grid-template-rows: auto auto auto;
    }

    body.dashboard-minimized .experience-shell {
        width: 100vw;
        height: 100dvh;
    }

    body.dashboard-minimized .specialist-hub {
        width: calc(100% - 24px);
        grid-template-columns: repeat(7, minmax(28px, 1fr));
    }

    body.dashboard-minimized .output-console {
        width: calc(100% - 24px);
    }

    body:not(.dashboard-minimized) .output-console {
        height: auto;
        min-height: 760px;
        max-height: none;
        resize: vertical;
    }

    body:not(.dashboard-minimized) .output-console .matrix-content-viewport {
        min-height: 620px;
    }
}

/* LAW-FIRM INTAKE CHIP: restrained contrast, readable text, graceful processing lock */
.strategic-input-container {
    border: 1px solid rgba(190, 156, 82, 0.92);
    background:
        linear-gradient(180deg, rgba(255, 252, 242, 0.98), rgba(244, 238, 219, 0.96)),
        radial-gradient(circle at 16% 0%, rgba(200, 168, 90, 0.2), transparent 38%);
    box-shadow:
        0 18px 34px rgba(3, 9, 18, 0.34),
        0 0 0 1px rgba(255, 255, 255, 0.72) inset,
        0 0 18px rgba(200, 168, 90, 0.18);
}

.strategic-input-container::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 46%);
    opacity: 0.38;
}

.strategic-input-container .input-header,
.strategic-input-container textarea,
.strategic-input-container .quantum-execute-btn {
    position: relative;
    z-index: 1;
}

.strategic-label {
    color: #273343;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.strategic-input-container textarea {
    color: #111827;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(99, 84, 54, 0.34);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.8rem;
    line-height: 1.55;
    box-shadow:
        inset 0 1px 4px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.7);
}

.strategic-input-container textarea::placeholder {
    color: #4b5563;
    opacity: 0.82;
}

.strategic-input-container:focus-within {
    border-color: rgba(200, 168, 90, 1);
    box-shadow:
        0 20px 38px rgba(3, 9, 18, 0.38),
        0 0 0 1px rgba(255, 255, 255, 0.86) inset,
        0 0 0 2px rgba(200, 168, 90, 0.24),
        0 0 22px rgba(105, 196, 188, 0.18);
}

.strategic-input-container .quantum-execute-btn {
    color: #f8fafc;
    border: 1px solid rgba(200, 168, 90, 0.74);
    background: linear-gradient(180deg, #26384d, #101a2a);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-shadow: none;
    box-shadow:
        0 8px 18px rgba(3, 9, 18, 0.26),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.strategic-input-container .quantum-execute-btn:hover:not(:disabled) {
    border-color: rgba(214, 184, 111, 0.94);
    background: linear-gradient(180deg, #314b62, #142438);
}

.strategic-input-container .quantum-execute-btn:disabled,
.strategic-input-container .quantum-execute-btn.disabled {
    color: rgba(248, 250, 252, 0.56);
    border-color: rgba(99, 84, 54, 0.46);
    background: linear-gradient(180deg, rgba(69, 76, 88, 0.72), rgba(28, 35, 45, 0.82));
    cursor: not-allowed;
}

.strategic-input-container.is-processing {
    border-color: rgba(200, 168, 90, 0.82);
    background:
        linear-gradient(180deg, rgba(239, 234, 218, 0.94), rgba(219, 216, 204, 0.92)),
        radial-gradient(circle at 50% 0%, rgba(105, 196, 188, 0.12), transparent 44%);
}

.strategic-input-container.is-processing::before {
    content: "Preparing counsel-grade output";
    position: absolute;
    right: 14px;
    top: 11px;
    z-index: 2;
    color: #6d5b2d;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.strategic-input-container.is-processing .input-header {
    opacity: 0.58;
}

.strategic-input-container textarea:disabled {
    color: #1f2937;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(232, 225, 205, 0.72)),
        repeating-linear-gradient(90deg, rgba(39, 51, 67, 0.03) 0 1px, transparent 1px 9px);
    border-color: rgba(99, 84, 54, 0.24);
    opacity: 1;
    cursor: progress;
}

/* HIGH-DEFINITION INTAKE READABILITY: document-grade type over terminal pixels */
.strategic-input-container {
    isolation: isolate;
    padding: 14px;
    border-radius: 10px;
    border-color: rgba(166, 134, 64, 0.9);
    background:
        linear-gradient(180deg, rgba(255, 253, 247, 0.99), rgba(245, 241, 230, 0.98));
}

.strategic-input-container::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 52%);
    opacity: 0.22;
}

.strategic-input-container .input-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 18px;
    margin-bottom: 7px;
}

.strategic-label {
    color: #1f2937;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    text-shadow: none;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.strategic-input-container.is-processing::before {
    content: "Preparing counsel-grade output";
    position: relative;
    top: auto;
    right: auto;
    z-index: 1;
    display: block;
    margin: 0 0 7px auto;
    width: fit-content;
    color: #765f26;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    text-shadow: none;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.strategic-input-container.is-processing .input-header {
    opacity: 1;
}

.strategic-input-container textarea {
    min-height: 118px;
    color: #111827;
    background: rgba(255, 255, 255, 0.985);
    border-color: rgba(68, 63, 51, 0.26);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: 0;
    text-shadow: none;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.strategic-input-container textarea:disabled {
    color: #172033;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(242, 238, 226, 0.88));
    border-color: rgba(68, 63, 51, 0.22);
    opacity: 1;
    -webkit-text-fill-color: #172033;
}

.strategic-input-container .quantum-execute-btn {
    min-height: 54px;
    border-radius: 6px;
    background: linear-gradient(180deg, #2e3948, #172132);
}

.strategic-input-container .btn-text-layer {
    color: #ffffff;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-transform: none;
    text-shadow: none;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.strategic-input-container .quantum-execute-btn:disabled .btn-text-layer,
.strategic-input-container .quantum-execute-btn.disabled .btn-text-layer {
    color: rgba(255, 255, 255, 0.86);
}

/* FORMAL READABILITY PASS: larger saturated legal typography */
.strategic-input-container {
    padding: 16px;
    background: #fbf7eb;
    border-color: rgba(137, 105, 44, 0.95);
    box-shadow:
        0 20px 36px rgba(3, 9, 18, 0.38),
        0 0 0 1px rgba(255, 255, 255, 0.86) inset,
        0 0 16px rgba(137, 105, 44, 0.18);
}

.strategic-input-container::after {
    opacity: 0.08;
}

.strategic-input-container .input-header {
    min-height: 24px;
    margin-bottom: 9px;
}

.strategic-label {
    color: #111827;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.15;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.strategic-input-container.is-processing::before {
    color: #5b4318;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
}

.strategic-input-container textarea {
    min-height: 136px;
    color: #0b1220;
    background: #fffdf6;
    border: 1px solid rgba(77, 67, 46, 0.38);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.06rem;
    font-weight: 600;
    line-height: 1.65;
    padding: 16px;
    box-shadow:
        inset 0 1px 4px rgba(15, 23, 42, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.85);
}

.strategic-input-container textarea:disabled {
    color: #0b1220;
    background: #f7f1e3;
    -webkit-text-fill-color: #0b1220;
}

.strategic-input-container .quantum-execute-btn {
    min-height: 62px;
    background: linear-gradient(180deg, #334155, #101827);
}

.strategic-input-container .btn-text-layer {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.04rem;
    font-weight: 700;
    letter-spacing: 0;
    color: #ffffff;
}

.strategic-input-container .quantum-execute-btn:disabled .btn-text-layer,
.strategic-input-container .quantum-execute-btn.disabled .btn-text-layer {
    color: #ffffff;
}

/* CASE CALIBRATION FEEDBACK: weighted follow-up questions for citation strategy */
.case-calibration-panel {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid rgba(200, 168, 90, 0.52);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(251, 247, 235, 0.08), rgba(7, 17, 29, 0.82)),
        radial-gradient(circle at 0% 0%, rgba(105, 196, 188, 0.12), transparent 40%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.calibration-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    color: #c8a85a;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.calibration-header strong {
    color: #9fc7a6;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 0.78rem;
    text-align: right;
}

.calibration-context {
    margin: 10px 0 16px;
    color: rgba(248, 250, 252, 0.82);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 0.9rem;
    line-height: 1.55;
}

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

.calibration-question {
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid rgba(105, 196, 188, 0.28);
    border-radius: 6px;
    background: rgba(5, 12, 21, 0.62);
}

.calibration-question legend {
    padding: 0 4px;
    color: #f3e6bf;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.9rem;
    font-weight: 700;
}

.calibration-question label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 9px;
    color: rgba(248, 250, 252, 0.9);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 0.86rem;
    line-height: 1.3;
}

.calibration-question input {
    accent-color: #c8a85a;
}

.calibration-apply-btn {
    width: 100%;
    margin-top: 14px;
    min-height: 46px;
    border: 1px solid rgba(200, 168, 90, 0.78);
    border-radius: 6px;
    background: linear-gradient(180deg, #334155, #101827);
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.98rem;
    font-weight: 800;
    cursor: pointer;
}

.calibration-apply-btn:hover,
.calibration-apply-btn:focus-visible {
    outline: none;
    border-color: rgba(214, 184, 111, 1);
    box-shadow: 0 0 0 2px rgba(200, 168, 90, 0.18), 0 0 20px rgba(105, 196, 188, 0.12);
}

.evidence-telemetry-panel {
    border-color: rgba(105, 196, 188, 0.46);
    background:
        radial-gradient(circle at 12% 0%, rgba(200, 168, 90, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(8, 18, 26, 0.95), rgba(2, 8, 13, 0.98));
}

.telemetry-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.telemetry-metric-card {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(105, 196, 188, 0.28);
    border-radius: 5px;
    background:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        rgba(2, 9, 14, 0.72);
    background-size: 100% 4px, auto;
}

.telemetry-metric-card span,
.telemetry-metric-card em,
.telemetry-rail span {
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

.telemetry-metric-card span {
    display: block;
    color: rgba(234, 247, 255, 0.72);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.telemetry-metric-card strong {
    display: block;
    margin: 6px 0 4px;
    color: #f3e6bf;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.25rem, 3vw, 2rem);
    line-height: 1;
}

.telemetry-metric-card em {
    display: block;
    color: rgba(234, 247, 255, 0.68);
    font-size: 0.74rem;
    font-style: normal;
    line-height: 1.3;
}

.telemetry-rail {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(105, 196, 188, 0.24);
}

.telemetry-rail span {
    color: #9fc7a6;
    font-size: 0.78rem;
    font-weight: 800;
}

@media (max-width: 820px) {
    .calibration-question-grid {
        grid-template-columns: 1fr;
    }

    .telemetry-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calibration-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .calibration-header strong {
        text-align: left;
    }
}

@media (max-width: 520px) {
    .telemetry-metric-grid {
        grid-template-columns: 1fr;
    }
}

/* TIER 0 CLARIFICATION INTAKE */
.tier0-clarifier-panel {
    position: relative;
    z-index: 5;
    display: grid;
    gap: 10px;
    margin: 12px 0 2px;
    padding: 12px;
    border: 1px solid rgba(174, 145, 82, 0.55);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 252, 242, 0.98), rgba(236, 229, 210, 0.96));
    box-shadow: 0 10px 24px rgba(6, 12, 16, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.82);
    color: #17232f;
    font-family: Georgia, "Times New Roman", serif;
}

.clarifier-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #6f5520;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.clarifier-guidance-box {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid rgba(111, 85, 32, 0.28);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(237, 228, 205, 0.72));
    color: #17232f;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.clarifier-guidance-box strong {
    color: #6f5520;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.86rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.clarifier-guidance-box span {
    color: #17232f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(0.96rem, 1.25vw, 1.08rem);
    font-weight: 700;
    line-height: 1.35;
}

.clarifier-header strong {
    color: #122033;
    font-size: 0.82rem;
}

.clarifier-question-stack {
    display: grid;
    gap: 14px;
    align-items: stretch;
}

.clarifier-slide-frame {
    display: grid;
    min-height: clamp(330px, 44dvh, 520px);
}

.clarifier-progress-track {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 2px 0 6px;
}

.clarifier-progress-dot {
    width: 38px;
    height: 5px;
    border-radius: 999px;
    background: rgba(24, 40, 58, 0.18);
}

.clarifier-progress-dot.active {
    background: #6f5520;
}

.clarifier-progress-dot.answered {
    background: #b88932;
}

.clarifier-question {
    display: grid;
    align-content: center;
    gap: clamp(18px, 3vw, 28px);
    min-width: 0;
    margin: 0;
    padding: clamp(18px, 3vw, 32px);
    border: 1px solid rgba(24, 40, 58, 0.14);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(238, 230, 207, 0.52));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.clarifier-question-title {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 10px;
    color: #111c28;
    font-size: clamp(0.9rem, 1.6vw, 1.03rem);
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.question-index {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    height: 28px;
    border: 1px solid rgba(111, 85, 32, 0.34);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    color: #6f5520;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.76rem;
    font-weight: 900;
}

.clarifier-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
}

.clarifier-option {
    display: grid;
    align-content: center;
    gap: 7px;
    min-height: 0;
    padding: 15px 18px;
    border: 1px solid rgba(24, 40, 58, 0.42);
    border-radius: 7px;
    background: linear-gradient(180deg, rgba(21, 35, 50, 0.98), rgba(10, 20, 31, 0.98));
    color: #f7f2e6;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.18;
    text-align: left;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 6px 14px rgba(10, 16, 24, 0.16);
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
    min-width: 0;
    width: 100%;
}

.clarifier-nav-row {
    display: grid;
    grid-template-columns: minmax(96px, auto) 1fr minmax(96px, auto);
    align-items: center;
    gap: 12px;
    color: #6f5520;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
}

.clarifier-nav-btn {
    min-height: 40px;
    border: 1px solid rgba(111, 85, 32, 0.42);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.48);
    color: #17232f;
    font: inherit;
    cursor: pointer;
}

.clarifier-nav-btn:disabled {
    cursor: not-allowed;
    opacity: 0.36;
}

.option-title {
    display: block;
    color: inherit;
    font-size: clamp(0.93rem, 1.25vw, 1.04rem);
    font-weight: 900;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.option-subchip {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 5px 8px;
    border: 1px solid rgba(248, 250, 252, 0.14);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(247, 242, 230, 0.86);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.clarifier-option:hover,
.clarifier-option:focus-visible {
    border-color: rgba(197, 163, 82, 0.9);
    color: #fff9e7;
    transform: translateY(-1px);
    outline: none;
}

.clarifier-option.selected {
    border-color: rgba(197, 163, 82, 0.98);
    background: linear-gradient(180deg, #f0d992, #b88932);
    color: #101a26;
}

.clarifier-option.selected .option-subchip {
    border-color: rgba(16, 26, 38, 0.16);
    background: rgba(16, 26, 38, 0.08);
    color: rgba(16, 26, 38, 0.86);
}

.clarifier-option:disabled {
    cursor: not-allowed;
    opacity: 0.68;
    transform: none;
}

.clarifier-custom-answer {
    display: grid;
    gap: 9px;
    padding: 14px;
    border: 1px solid rgba(197, 163, 82, 0.58);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.52);
}

.clarifier-custom-answer.attention-bounce {
    animation: clarifier-attention-bounce 760ms cubic-bezier(0.2, 0.78, 0.28, 1);
}

@keyframes clarifier-attention-bounce {
    0% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 0 rgba(197, 163, 82, 0);
    }
    32% {
        transform: translateY(-8px) scale(1.012);
        box-shadow: 0 12px 28px rgba(184, 137, 50, 0.28);
    }
    58% {
        transform: translateY(3px) scale(0.998);
    }
    78% {
        transform: translateY(-2px) scale(1.004);
    }
    100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 0 0 rgba(197, 163, 82, 0);
    }
}

.clarifier-custom-answer label {
    color: #17232f;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.clarifier-custom-answer textarea {
    width: 100%;
    min-height: 104px;
    resize: vertical;
    padding: 12px;
    border: 1px solid rgba(24, 40, 58, 0.42);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.9);
    color: #101a26;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.92rem;
    line-height: 1.4;
}

.clarifier-custom-answer textarea:focus {
    border-color: rgba(184, 137, 50, 0.95);
    outline: 2px solid rgba(197, 163, 82, 0.24);
}

.clarifier-custom-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #6f5520;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.76rem;
    font-weight: 800;
}

.clarifier-custom-actions .invalid {
    color: #a52222;
}

.clarifier-custom-confirm {
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid rgba(111, 85, 32, 0.54);
    border-radius: 7px;
    background: linear-gradient(180deg, #f0d992, #b88932);
    color: #101a26;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.78rem;
    font-weight: 900;
    cursor: pointer;
}

.strategic-input-container.has-clarifiers textarea {
    min-height: 96px;
}

body.clarification-choice .specialist-hub {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    gap: 18px;
    padding: 22px;
    align-items: stretch;
    overflow: auto;
}

body.clarification-choice .hub-title,
body.clarification-choice .matrix-chip,
body.clarification-choice .agent-choice-card {
    display: none;
}

body.clarification-choice .agent-choice-layer {
    grid-column: 1 / -1;
    grid-row: 1;
    position: relative;
    z-index: 4;
    display: grid;
    min-height: 100%;
    align-items: start;
}

body.clarification-choice .output-console {
    display: none !important;
}

body.pipeline-executing .experience-shell {
    grid-template-columns: minmax(320px, 560px);
    grid-template-rows: auto;
    justify-content: center;
    align-items: start;
}

body.pipeline-executing .landing-container {
    grid-column: 1;
    width: min(100% - 24px, 560px);
    min-height: 100dvh;
}

body.pipeline-executing .specialist-hub,
body.pipeline-executing .output-console,
body.pipeline-executing .persistent-choice-layer {
    display: none !important;
}

body.pipeline-executing.client-view-only .specialist-hub,
body.pipeline-executing.client-view-only .output-console {
    display: block !important;
}

body.pipeline-executing.client-view-only .experience-shell {
    grid-template-columns: minmax(280px, 420px) minmax(320px, 1fr);
    grid-template-rows: auto auto;
    justify-content: stretch;
    align-items: start;
}

body.pipeline-executing.client-view-only .landing-container {
    grid-column: 1;
}

body.pipeline-executing.client-view-only .specialist-hub {
    grid-column: 2;
}

body.pipeline-executing.client-view-only .output-console {
    grid-column: 1 / -1;
}

body.pipeline-executing .strategic-input-container,
body.pipeline-executing .landing-footer {
    display: none !important;
}

body.pipeline-executing .pen-platform {
    width: min(86vw, 390px);
}

body.client-view-only .subscriber-tier-card,
body.client-view-only .matrix-tab:not([data-target="client-view"]),
body.client-view-only #technical-view,
body.client-view-only #preliminary-view {
    display: none !important;
}

body.client-view-only .output-console {
    display: block !important;
    grid-column: 1 / -1;
    width: min(100%, 980px);
    margin-inline: auto;
}

body.client-view-only .specialist-hub {
    display: grid !important;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    min-height: clamp(220px, 36vh, 420px);
    padding: clamp(12px, 2vw, 18px);
    align-items: stretch;
}

body.client-view-only .specialist-hub .hub-title,
body.client-view-only .specialist-hub .matrix-chip {
    display: none !important;
}

body.client-view-only .specialist-hub .agent-choice-layer {
    grid-column: 1;
    grid-row: 1;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-height: 100%;
}

body.client-view-only .specialist-hub .agent-choice-card {
    min-height: clamp(170px, 24vh, 300px);
}

body.client-view-only .agent-choice-card.client-choice-locked {
    cursor: not-allowed;
    filter: grayscale(0.42) brightness(0.76);
}

body.client-view-only .agent-choice-card.client-choice-locked img {
    opacity: 0.46;
    filter: grayscale(0.65) contrast(0.92) brightness(0.68);
}

body.client-view-only .agent-choice-card.client-choice-locked::after {
    content: "Panel reservado · trabajando internamente";
    display: grid;
    place-items: end start;
    padding: 0 16px 14px;
    color: rgba(249, 215, 117, 0.92);
    background:
        linear-gradient(180deg, rgba(7, 17, 29, 0.12), rgba(7, 17, 29, 0.88)),
        repeating-linear-gradient(135deg, rgba(249, 215, 117, 0.08) 0 1px, transparent 1px 9px);
    border: 1px solid rgba(249, 215, 117, 0.26);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.client-view-only .agent-choice-card.client-choice-locked:hover,
body.client-view-only .agent-choice-card.client-choice-locked:focus-visible {
    border-color: rgba(200, 168, 90, 0.42);
    box-shadow:
        0 18px 34px rgba(3, 9, 18, 0.38),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body.client-view-only .agent-choice-card.client-choice-locked:hover img,
body.client-view-only .agent-choice-card.client-choice-locked:focus-visible img {
    transform: none;
    opacity: 0.46;
}

/* Client-only conversion chip: replace the reserved L.E.G.A.S.Y. panel with Contact Us. */
body.client-view-only .agent-choice-card.client-choice-locked {
    cursor: pointer;
    filter: none;
    border-color: rgba(249, 215, 117, 0.82);
    background:
        radial-gradient(circle at 18% 18%, rgba(249, 215, 117, 0.22), transparent 32%),
        linear-gradient(145deg, rgba(9, 23, 32, 0.98), rgba(28, 18, 12, 0.92));
    box-shadow:
        0 18px 38px rgba(3, 9, 18, 0.44),
        0 0 26px rgba(249, 215, 117, 0.14),
        inset 0 0 24px rgba(249, 215, 117, 0.05);
}

body.client-view-only .agent-choice-card.client-choice-locked img {
    opacity: 0.28;
    filter: grayscale(0.2) contrast(1.12) brightness(0.72);
}

body.client-view-only .agent-choice-card.client-choice-locked .choice-kicker {
    color: #71f3d5;
}

body.client-view-only .agent-choice-card.client-choice-locked .choice-kicker::after {
    content: "";
}

body.client-view-only .agent-choice-card.client-choice-locked .choice-title {
    font-size: clamp(1.18rem, 2.4vw, 2.25rem);
}

body.client-view-only .agent-choice-card.client-choice-locked .choice-title::before {
    content: "";
    display: block;
}

body.client-view-only .agent-choice-card.client-choice-locked .choice-caption {
    max-width: 24ch;
    color: rgba(255, 247, 217, 0.9);
}

body.client-view-only .agent-choice-card.client-choice-locked::after {
    content: "Guardar mi contacto";
    display: grid;
    place-items: center;
    inset: auto 16px 16px 16px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    color: #07111d;
    background: linear-gradient(90deg, #f9d775, #71f3d5);
    border: 1px solid rgba(255, 247, 217, 0.44);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28), 0 0 18px rgba(249, 215, 117, 0.18);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.client-view-only .agent-choice-card.client-choice-locked:hover,
body.client-view-only .agent-choice-card.client-choice-locked:focus-visible {
    border-color: rgba(249, 215, 117, 1);
    box-shadow:
        0 22px 42px rgba(3, 9, 18, 0.5),
        0 0 0 2px rgba(249, 215, 117, 0.18),
        0 0 28px rgba(113, 243, 213, 0.18),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

body.client-view-only .agent-choice-card.client-choice-locked:hover img,
body.client-view-only .agent-choice-card.client-choice-locked:focus-visible img {
    transform: scale(1.025);
    opacity: 0.36;
}

body.client-view-only .matrix-chip.client-chip-locked {
    cursor: not-allowed;
    filter: grayscale(0.55) brightness(0.72);
    opacity: 0.58;
}

body.client-view-only .matrix-chip.client-chip-locked:hover {
    border-color: rgba(0, 240, 255, 0.15);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: none;
}

body.client-view-only .matrix-chip.client-chip-locked::after {
    content: "Interno";
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 3px 6px;
    border: 1px solid rgba(249, 215, 117, 0.32);
    border-radius: 999px;
    color: rgba(249, 215, 117, 0.78);
    background: rgba(5, 10, 20, 0.78);
    font-size: 0.56rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 820px) {
    body.pipeline-executing.client-view-only .experience-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    body.pipeline-executing.client-view-only .landing-container,
    body.pipeline-executing.client-view-only .specialist-hub,
    body.pipeline-executing.client-view-only .output-console {
        grid-column: 1;
    }

    body.client-view-only .specialist-hub .agent-choice-layer {
        grid-template-columns: 1fr 1fr;
    }

    body.client-view-only .specialist-hub .agent-choice-card {
        min-height: 132px;
    }
}

body.clarification-choice .tier0-clarifier-panel {
    min-height: 0;
    max-height: calc(100dvh - 56px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding-top: 18px;
    scroll-padding-bottom: 88px;
    align-content: start;
    padding: clamp(18px, 3vw, 34px);
    border-color: rgba(214, 184, 111, 0.82);
    background:
        linear-gradient(180deg, rgba(251, 247, 235, 0.96), rgba(226, 217, 194, 0.94)),
        radial-gradient(circle at 50% 0%, rgba(200, 168, 90, 0.16), transparent 42%);
}

body.clarification-choice .clarifier-header {
    font-size: clamp(0.8rem, 1.4vw, 1rem);
}

body.clarification-choice .clarifier-question-stack {
    gap: clamp(14px, 1.6vw, 20px);
}

body.clarification-choice .clarifier-question {
    align-content: start;
    padding: clamp(20px, 3vw, 34px);
    border: 1px solid rgba(24, 40, 58, 0.16);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(235, 226, 204, 0.42));
}

body.clarification-choice .clarifier-question-title {
    font-size: clamp(0.96rem, 1.35vw, 1.08rem);
}

body.clarification-choice .clarifier-options {
    grid-template-columns: 1fr;
    gap: 12px;
}

body.clarification-choice .clarifier-option {
    min-height: 0;
    padding: 15px 18px;
    font-size: clamp(0.88rem, 1.3vw, 1rem);
}

body.clarification-choice .clarifier-nav-row {
    position: sticky;
    bottom: 0;
    z-index: 6;
    margin: 2px -4px -4px;
    padding: 10px 4px 4px;
    background: linear-gradient(180deg, rgba(239, 232, 213, 0), rgba(239, 232, 213, 0.98) 28%);
}

body.clarification-choice .clarifier-option[data-clarifier-option="__skip__"] {
    background: linear-gradient(180deg, rgba(82, 93, 108, 0.96), rgba(42, 52, 66, 0.98));
    border-color: rgba(110, 124, 143, 0.62);
    color: rgba(255, 255, 255, 0.86);
}

body.clarification-choice .clarifier-option[data-clarifier-option="__skip__"].selected {
    background: linear-gradient(180deg, #d7d0c0, #a69a83);
    color: #101a26;
}

@media (max-width: 720px) {
    .tier0-clarifier-panel {
        padding: 10px;
        gap: 9px;
    }

    .clarifier-question {
        padding: 12px;
        border-radius: 8px;
    }

    .clarifier-slide-frame {
        min-height: auto;
    }

    .clarifier-nav-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .clarifier-options {
        grid-template-columns: 1fr;
    }

    .clarifier-option {
        min-height: 58px;
        font-size: 0.88rem;
    }

    .clarifier-custom-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .clarifier-custom-confirm {
        width: 100%;
    }

    body.clarification-choice .specialist-hub {
        padding: 14px;
    }

    body.clarification-choice .tier0-clarifier-panel {
        min-height: 0;
        max-height: calc(100dvh - 28px);
        align-content: start;
        padding: 14px;
        padding-bottom: 6px;
    }

    body.clarification-choice .clarifier-options {
        grid-template-columns: 1fr;
    }

    body.clarification-choice .clarifier-option {
        min-height: 64px;
    }

    body.clarification-choice .clarifier-question {
        gap: 14px;
    }

    body.clarification-choice .clarifier-nav-row {
        grid-template-columns: 1fr 1fr;
        padding: 14px 0 8px;
    }

    body.clarification-choice .clarifier-nav-row span {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    body.clarification-choice .clarifier-nav-btn:first-of-type {
        grid-column: 1;
        grid-row: 2;
    }

    body.clarification-choice .clarifier-nav-btn:last-of-type {
        grid-column: 2;
        grid-row: 2;
    }

    .clarifier-question-title {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .question-index {
        min-width: 30px;
        height: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .clarifier-custom-answer.attention-bounce {
        animation: none;
        outline: 3px solid rgba(197, 163, 82, 0.46);
    }
}

/* POST-OUTPUT CHOICE LAYER: choose agent map or S.I.N.T.E.S.I.S. delivery */
.agent-choice-layer {
    display: none;
}

.persistent-choice-layer {
    display: none;
}

body.dashboard-minimized .persistent-choice-layer {
    display: none !important;
}

body.post-output-choice .specialist-hub {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr;
    gap: 18px;
    padding: 22px;
    align-items: stretch;
}

body.post-output-choice .specialist-hub::before,
body.post-output-choice .specialist-hub::after {
    opacity: 0.32;
}

body.post-output-choice .hub-title,
body.post-output-choice .matrix-chip {
    display: none;
}

body.post-output-choice .agent-choice-layer {
    grid-column: 1 / -1;
    grid-row: 1;
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    min-height: 100%;
}

.agent-choice-card {
    position: relative;
    min-height: clamp(260px, 48vw, 620px);
    overflow: hidden;
    border: 1px solid rgba(200, 168, 90, 0.72);
    border-radius: 8px;
    background: #07111d;
    color: #f8fafc;
    cursor: pointer;
    isolation: isolate;
    box-shadow:
        0 18px 34px rgba(3, 9, 18, 0.38),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.agent-choice-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.76;
    filter: contrast(1.08) saturate(0.92) brightness(0.72);
    transition: transform 260ms ease, opacity 260ms ease, filter 260ms ease;
}

.agent-choice-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(7, 17, 29, 0.18), rgba(7, 17, 29, 0.78)),
        radial-gradient(circle at 50% 35%, rgba(105, 196, 188, 0.18), transparent 44%);
}

.agent-choice-card::after {
    content: "";
    position: absolute;
    inset: 12px;
    z-index: 1;
    border: 1px solid rgba(248, 250, 252, 0.22);
    border-radius: 5px;
    pointer-events: none;
}

.agent-choice-card span {
    position: relative;
    z-index: 2;
    display: block;
    padding-inline: clamp(16px, 3vw, 34px);
    text-align: left;
}

.choice-kicker {
    margin-top: clamp(24px, 4vw, 46px);
    color: #c8a85a;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(0.78rem, 1.2vw, 0.95rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.choice-title {
    margin-top: 8px;
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.55rem, 3.1vw, 3.4rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.62);
}

.choice-caption {
    margin-top: 8px;
    color: rgba(248, 250, 252, 0.92);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: clamp(0.9rem, 1.4vw, 1.16rem);
    font-weight: 600;
}

.agent-choice-card:hover,
.agent-choice-card:focus-visible {
    border-color: rgba(214, 184, 111, 1);
    outline: none;
    box-shadow:
        0 20px 40px rgba(3, 9, 18, 0.44),
        0 0 0 2px rgba(200, 168, 90, 0.2),
        0 0 24px rgba(105, 196, 188, 0.18);
}

.agent-choice-card:hover img,
.agent-choice-card:focus-visible img {
    opacity: 0.92;
    filter: contrast(1.12) saturate(1.04) brightness(0.82);
    transform: scale(1.035);
}

body.post-output-choice .output-console,
body.agent-dashboard-focus .output-console {
    display: none;
}

body.sintesis-output-focus .output-console {
    display: grid;
}

@media (max-width: 820px) {
    body.post-output-choice .specialist-hub {
        padding: 14px;
    }

    body.post-output-choice .agent-choice-layer {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .agent-choice-card {
        min-height: 220px;
    }
}

/* CHOICE LAYER REFINEMENT: wide horizontal bands with persistent selected state */
body.post-output-choice .specialist-hub {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

body.post-output-choice .agent-choice-layer {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    min-height: 100%;
}

body.post-output-choice .agent-choice-card {
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

body.post-output-choice .agent-choice-card img {
    object-position: center;
}

body.choice-agents-active .agent-choice-layer {
    grid-template-rows: minmax(280px, 1fr) 72px;
}

body.choice-sintesis-active .agent-choice-layer {
    grid-template-rows: 72px minmax(280px, 1fr);
}

body.choice-agents-active .agent-choice-card[data-choice-target="agents"],
body.choice-sintesis-active .agent-choice-card[data-choice-target="sintesis"] {
    border-color: rgba(214, 184, 111, 1);
    box-shadow:
        0 20px 42px rgba(3, 9, 18, 0.42),
        0 0 0 2px rgba(200, 168, 90, 0.2),
        0 0 26px rgba(105, 196, 188, 0.2);
}

body.choice-agents-active .agent-choice-card[data-choice-target="sintesis"],
body.choice-sintesis-active .agent-choice-card[data-choice-target="agents"] {
    min-height: 72px;
    justify-content: center;
    border-color: rgba(105, 196, 188, 0.42);
    background: rgba(7, 17, 29, 0.86);
}

body.choice-agents-active .agent-choice-card[data-choice-target="sintesis"] img,
body.choice-sintesis-active .agent-choice-card[data-choice-target="agents"] img {
    opacity: 0.18;
    filter: grayscale(0.35) brightness(0.52);
}

body.choice-agents-active .agent-choice-card[data-choice-target="sintesis"]::before,
body.choice-sintesis-active .agent-choice-card[data-choice-target="agents"]::before {
    background: linear-gradient(90deg, rgba(7, 17, 29, 0.92), rgba(7, 17, 29, 0.74));
}

body.choice-agents-active .agent-choice-card[data-choice-target="sintesis"]::after,
body.choice-sintesis-active .agent-choice-card[data-choice-target="agents"]::after {
    inset: 8px;
}

body.choice-agents-active .agent-choice-card[data-choice-target="sintesis"] span,
body.choice-sintesis-active .agent-choice-card[data-choice-target="agents"] span {
    display: inline-block;
    padding-inline: 18px 0;
}

body.choice-agents-active .agent-choice-card[data-choice-target="sintesis"] .choice-kicker,
body.choice-sintesis-active .agent-choice-card[data-choice-target="agents"] .choice-kicker {
    margin-top: 0;
    margin-right: 10px;
    font-size: 0.72rem;
}

body.choice-agents-active .agent-choice-card[data-choice-target="sintesis"] .choice-title,
body.choice-sintesis-active .agent-choice-card[data-choice-target="agents"] .choice-title {
    margin-top: 0;
    font-size: clamp(1rem, 1.7vw, 1.35rem);
}

body.choice-agents-active .agent-choice-card[data-choice-target="sintesis"] .choice-caption,
body.choice-sintesis-active .agent-choice-card[data-choice-target="agents"] .choice-caption {
    display: none;
}

body.post-output-choice.choice-sintesis-active .output-console {
    display: grid;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .experience-shell {
    grid-template-rows: minmax(560px, 1fr) auto auto;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 72px minmax(280px, 1fr);
    gap: 18px;
    min-height: 100%;
    padding: 22px;
    border: 2px solid rgba(105, 196, 188, 0.48);
    background:
        linear-gradient(rgba(237, 244, 241, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(237, 244, 241, 0.032) 1px, transparent 1px),
        linear-gradient(145deg, rgba(7, 25, 36, 0.98), rgba(15, 68, 73, 0.92) 48%, rgba(7, 24, 35, 0.98));
    background-size: 14px 14px, 14px 14px, auto;
    box-sizing: border-box;
    overflow: hidden;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card {
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] {
    min-height: 72px;
    justify-content: center;
    border-color: rgba(105, 196, 188, 0.42);
    background: rgba(7, 17, 29, 0.86);
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] img {
    opacity: 0.18;
    filter: grayscale(0.35) brightness(0.52);
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card[data-choice-target="agents"]::before {
    background: linear-gradient(90deg, rgba(7, 17, 29, 0.92), rgba(7, 17, 29, 0.74));
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card[data-choice-target="agents"]::after {
    inset: 8px;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] span {
    display: inline-block;
    padding-inline: 18px 0;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] .choice-kicker {
    margin-top: 0;
    margin-right: 10px;
    font-size: 0.72rem;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] .choice-title {
    margin-top: 0;
    font-size: clamp(1rem, 1.7vw, 1.35rem);
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] .choice-caption {
    display: none;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"] {
    border-color: rgba(214, 184, 111, 1);
    box-shadow:
        0 20px 42px rgba(3, 9, 18, 0.42),
        0 0 0 2px rgba(200, 168, 90, 0.2),
        0 0 26px rgba(105, 196, 188, 0.2);
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-hub {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 82px;
    max-height: 104px;
    padding: 10px 12px;
    overflow: hidden;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .agent-choice-layer {
    display: grid;
    grid-template-columns: minmax(190px, 0.34fr) minmax(0, 0.66fr);
    grid-template-rows: 1fr;
    gap: 10px;
    min-height: 64px;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .agent-choice-card {
    min-height: 64px;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .agent-choice-card[data-choice-target="agents"] {
    border-color: rgba(105, 196, 188, 0.55);
    background: rgba(7, 17, 29, 0.9);
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .agent-choice-card[data-choice-target="agents"] img {
    opacity: 0.2;
    filter: grayscale(0.24) brightness(0.58);
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .agent-choice-card[data-choice-target="agents"] .choice-kicker,
body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .agent-choice-card[data-choice-target="sintesis"] .choice-kicker {
    margin-top: 0;
    font-size: 0.68rem;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .agent-choice-card[data-choice-target="agents"] .choice-title,
body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .agent-choice-card[data-choice-target="sintesis"] .choice-title {
    margin-top: 2px;
    font-size: clamp(0.95rem, 1.5vw, 1.28rem);
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .agent-choice-card[data-choice-target="agents"] .choice-caption,
body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .agent-choice-card[data-choice-target="sintesis"] .choice-caption {
    display: none;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .output-console {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
}

@media (max-width: 820px) {
    body.post-output-choice .agent-choice-layer {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(2, minmax(180px, 1fr));
    }

    body.choice-agents-active .agent-choice-layer {
        grid-template-rows: minmax(260px, 1fr) 64px;
    }

    body.choice-sintesis-active .agent-choice-layer {
        grid-template-rows: 64px minmax(260px, 1fr);
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .agent-choice-layer {
        grid-template-columns: 1fr;
        grid-template-rows: 64px;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .agent-choice-card[data-choice-target="sintesis"] {
        display: none;
    }
}

/* L.E.G.A.S.Y. AGENT MAP: expand in the delivery region, then dock above output */
body.post-output-choice.choice-agents-active .experience-shell {
    grid-template-rows: minmax(560px, 1fr) auto;
}

body.post-output-choice.choice-agents-active .persistent-choice-layer {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(280px, 1fr) 72px;
    gap: 18px;
    min-height: 100%;
    padding: 22px;
    border: 2px solid rgba(105, 196, 188, 0.48);
    background:
        linear-gradient(rgba(237, 244, 241, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(237, 244, 241, 0.032) 1px, transparent 1px),
        linear-gradient(145deg, rgba(7, 25, 36, 0.98), rgba(15, 68, 73, 0.92) 48%, rgba(7, 24, 35, 0.98));
    background-size: 14px 14px, 14px 14px, auto;
    box-sizing: border-box;
    overflow: hidden;
}

body.post-output-choice.choice-agents-active .persistent-choice-layer .agent-choice-card {
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

body.post-output-choice.choice-agents-active .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] {
    border-color: rgba(214, 184, 111, 1);
    box-shadow:
        0 20px 42px rgba(3, 9, 18, 0.42),
        0 0 0 2px rgba(200, 168, 90, 0.2),
        0 0 26px rgba(105, 196, 188, 0.2);
}

body.post-output-choice.choice-agents-active .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"] {
    min-height: 72px;
    justify-content: center;
    border-color: rgba(105, 196, 188, 0.42);
    background: rgba(7, 17, 29, 0.86);
}

body.post-output-choice.choice-agents-active .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"] img {
    opacity: 0.18;
    filter: grayscale(0.35) brightness(0.52);
}

body.post-output-choice.choice-agents-active .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"]::before {
    background: linear-gradient(90deg, rgba(7, 17, 29, 0.92), rgba(7, 17, 29, 0.74));
}

body.post-output-choice.choice-agents-active .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"]::after {
    inset: 8px;
}

body.post-output-choice.choice-agents-active .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"] span {
    display: inline-block;
    padding-inline: 18px 0;
}

body.post-output-choice.choice-agents-active .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"] .choice-kicker {
    margin-top: 0;
    margin-right: 10px;
    font-size: 0.72rem;
}

body.post-output-choice.choice-agents-active .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"] .choice-title {
    margin-top: 0;
    font-size: clamp(1rem, 1.7vw, 1.35rem);
}

body.post-output-choice.choice-agents-active .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"] .choice-caption {
    display: none;
}

body.post-output-choice.choice-agents-active .specialist-hub {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: clamp(620px, 86dvh, 980px);
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto repeat(4, minmax(118px, 1fr));
    gap: 12px;
    padding: 20px;
}

body.post-output-choice.choice-agents-active .agent-choice-layer {
    display: none;
}

body.post-output-choice.choice-agents-active .hub-title {
    display: block;
}

body.post-output-choice.choice-agents-active .matrix-chip {
    display: block;
}

body.post-output-choice.choice-agents-active .specialist-card:nth-of-type(1) {
    grid-column: 1 / span 2;
    grid-row: 2;
}

body.post-output-choice.choice-agents-active .specialist-card:nth-of-type(2) {
    grid-column: 3 / span 2;
    grid-row: 2;
}

body.post-output-choice.choice-agents-active .specialist-card.center-card {
    grid-column: 2 / span 2;
    grid-row: 3;
}

body.post-output-choice.choice-agents-active .specialist-card:nth-of-type(4) {
    grid-column: 1 / span 2;
    grid-row: 4;
}

body.post-output-choice.choice-agents-active .specialist-card:nth-of-type(5) {
    grid-column: 3 / span 2;
    grid-row: 4;
}

body.post-output-choice.choice-agents-active .specialist-card.output-card:nth-of-type(6) {
    grid-column: 1 / span 2;
    grid-row: 5;
}

body.post-output-choice.choice-agents-active .specialist-card.output-card:nth-of-type(7) {
    grid-column: 3 / span 2;
    grid-row: 5;
}

body.post-output-choice.choice-agents-active:not(.agent-dashboard-docked) .output-console {
    display: none;
}

body.post-output-choice.choice-agents-active.agent-dashboard-docked .experience-shell {
    grid-template-rows: minmax(560px, 1fr) auto auto;
}

body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-hub {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 92px;
    max-height: 116px;
    grid-template-columns: auto repeat(7, minmax(58px, 1fr));
    grid-template-rows: 1fr;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}

body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-hub::before,
body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-hub::after {
    opacity: 0.22;
}

body.post-output-choice.choice-agents-active.agent-dashboard-docked .hub-title {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: start;
    max-width: 140px;
    font-size: 0.78rem;
    text-align: left;
}

body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-card,
body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-card:nth-of-type(1),
body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-card:nth-of-type(2),
body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-card.center-card,
body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-card:nth-of-type(4),
body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-card:nth-of-type(5),
body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-card.output-card:nth-of-type(6),
body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-card.output-card:nth-of-type(7) {
    grid-column: auto;
    grid-row: 1;
    min-height: 70px;
}

body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-card .matrix-tag {
    left: 6%;
    right: 6%;
    bottom: 8%;
    font-size: 0.58rem;
    padding: 3px;
}

body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-card .chip-response,
body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-card .chip-usage-caption,
body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-card .chip-usage-rail,
body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .chip-response,
body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .chip-usage-caption,
body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .chip-usage-rail {
    display: none;
}

body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-card .chip-usage-core,
body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .chip-usage-core {
    top: 50%;
    width: min(68%, 44px);
}

body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-card .chip-usage-percent,
body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .chip-usage-percent {
    font-size: 0.82rem;
}

body.post-output-choice.choice-agents-active.agent-dashboard-docked .hub-icon img {
    opacity: 0.76;
}

body.post-output-choice.choice-agents-active.agent-dashboard-docked .output-console {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
}

/* S.I.N.T.E.S.I.S. DOCK: when compiled delivery is open, keep the agent map as a compact control rail */
body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-hub {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 92px;
    max-height: 116px;
    display: grid;
    grid-template-columns: auto repeat(7, minmax(58px, 1fr));
    grid-template-rows: 1fr;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .agent-choice-layer {
    display: none;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .hub-title {
    display: block;
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: start;
    max-width: 142px;
    color: rgba(234, 247, 255, 0.78);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.18;
    text-align: left;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .matrix-chip,
body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card,
body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card:nth-of-type(1),
body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card:nth-of-type(2),
body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card.center-card,
body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card:nth-of-type(4),
body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card:nth-of-type(5),
body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card.output-card:nth-of-type(6),
body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card.output-card:nth-of-type(7) {
    display: block;
    grid-column: auto;
    grid-row: 1;
    min-height: 70px;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .matrix-tag {
    left: 6%;
    right: 6%;
    bottom: 8%;
    padding: 3px;
    font-size: 0.58rem;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .hub-icon img {
    opacity: 0.76;
}

body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .output-console {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
}

@media (max-width: 820px) {
    body.post-output-choice.choice-agents-active .persistent-choice-layer {
        grid-column: 1;
        grid-row: 2;
        min-height: 420px;
        grid-template-rows: minmax(260px, 1fr) 64px;
        padding: 14px;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer {
        grid-column: 1;
        grid-row: 2;
        min-height: 420px;
        grid-template-rows: 64px minmax(260px, 1fr);
        padding: 14px;
    }

    body.post-output-choice.choice-agents-active .specialist-hub {
        min-height: 620px;
        grid-row: 3;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto repeat(4, minmax(120px, 1fr));
    }

    body.post-output-choice.choice-agents-active .specialist-card,
    body.post-output-choice.choice-agents-active .specialist-card:nth-of-type(1),
    body.post-output-choice.choice-agents-active .specialist-card:nth-of-type(2),
    body.post-output-choice.choice-agents-active .specialist-card.center-card,
    body.post-output-choice.choice-agents-active .specialist-card:nth-of-type(4),
    body.post-output-choice.choice-agents-active .specialist-card:nth-of-type(5),
    body.post-output-choice.choice-agents-active .specialist-card.output-card:nth-of-type(6),
    body.post-output-choice.choice-agents-active .specialist-card.output-card:nth-of-type(7) {
        grid-column: auto;
        grid-row: auto;
    }

    body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-hub {
        grid-template-columns: repeat(7, minmax(36px, 1fr));
        grid-template-rows: 1fr;
        min-height: 78px;
    }

    body.post-output-choice.choice-agents-active.agent-dashboard-docked .hub-title {
        display: none;
    }

    body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-card .matrix-tag {
        display: none;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-hub {
        grid-template-columns: repeat(7, minmax(36px, 1fr));
        grid-template-rows: 1fr;
        min-height: 78px;
        max-height: 92px;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .hub-title {
        display: none;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card,
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card:nth-of-type(1),
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card:nth-of-type(2),
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card.center-card,
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card:nth-of-type(4),
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card:nth-of-type(5),
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card.output-card:nth-of-type(6),
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card.output-card:nth-of-type(7) {
        min-height: 58px;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .matrix-tag {
        display: none;
    }
}
.preliminary-case-brief {
    display: grid;
    gap: 18px;
    padding: 22px;
    color: #eaf8ff;
    background: linear-gradient(145deg, rgba(5, 20, 35, .96), rgba(7, 43, 48, .92));
    border: 1px solid rgba(90, 235, 214, .35);
    border-radius: 18px;
}

.preliminary-case-brief header span,
.preliminary-orchestrator-grid article > span {
    color: #71f3d5;
    font-size: .72rem;
    letter-spacing: .12em;
}

.preliminary-case-brief h3,
.preliminary-case-brief h4 {
    margin: 6px 0;
}

.preliminary-objective,
.preliminary-orchestrator-grid article {
    padding: 16px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
}

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

.preliminary-decision-card {
    display: grid;
    align-content: start;
    gap: 12px;
}

.preliminary-soundbite {
    color: #f8efd2;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    line-height: 1.3;
}

.preliminary-posture {
    width: fit-content;
    padding: 4px 7px;
    border: 1px solid rgba(113, 243, 213, .34);
    border-radius: 999px;
    color: #bffdf0;
    background: rgba(113, 243, 213, .08);
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.preliminary-posture.is-abstaining {
    border-color: rgba(245, 209, 138, .44);
    color: #f5d18a;
    background: rgba(245, 209, 138, .08);
}

.preliminary-readiness {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.preliminary-readiness > div {
    display: grid;
    gap: 3px;
    padding: 8px;
    border: 1px solid rgba(113, 243, 213, .18);
    border-radius: 7px;
    background: rgba(113, 243, 213, .05);
}

.preliminary-readiness span,
.preliminary-verification-queue > b,
.preliminary-decision-card section > b {
    color: #71f3d5;
    font-size: .64rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.preliminary-readiness strong {
    color: #f8efd2;
    font-size: .82rem;
}

.preliminary-readiness-rail {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
}

.preliminary-readiness-rail i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #d9ac52, #71f3d5);
}

.preliminary-value-lens {
    display: grid;
    gap: 7px;
    padding: 10px;
    border: 1px solid rgba(245, 209, 138, .22);
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(245, 209, 138, .08), rgba(113, 243, 213, .05)),
        rgba(4, 16, 27, .46);
}

.preliminary-value-lens > b {
    color: #f5d18a;
    font-family: var(--font-cyber);
    font-size: .62rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.preliminary-value-lens p {
    margin: 0;
    color: rgba(248, 239, 210, .88);
    font-size: .76rem;
    line-height: 1.32;
}

.preliminary-value-lens div {
    display: grid;
    gap: 5px;
}

.preliminary-value-lens span {
    color: rgba(234, 248, 255, .78);
    font-size: .68rem;
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.preliminary-value-lens strong {
    color: #71f3d5;
}

.preliminary-client-fact-help {
    display: grid;
    gap: 6px;
    padding: 10px;
    border: 1px solid rgba(113, 243, 213, .2);
    border-radius: 8px;
    background: rgba(5, 22, 31, .48);
}

.preliminary-client-fact-help > b {
    color: #71f3d5;
    font-family: var(--font-cyber);
    font-size: .62rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.preliminary-client-fact-help p,
.preliminary-client-fact-help small {
    margin: 0;
    color: rgba(234, 248, 255, .78);
    font-size: .72rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.preliminary-client-fact-help small {
    color: rgba(248, 239, 210, .72);
}

.preliminary-decision-card section {
    display: grid;
    gap: 5px;
}

.preliminary-decision-card section p,
.preliminary-decision-card section small {
    margin: 0;
}

.preliminary-decision-card section small {
    color: rgba(234, 248, 255, .68);
}

.preliminary-fact-form {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid rgba(113, 243, 213, .18);
    border-radius: 10px;
    background: rgba(4, 16, 27, .52);
}

.preliminary-fact-form label {
    display: grid;
    gap: 6px;
}

.preliminary-fact-form label span {
    color: #f5d18a;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.preliminary-fact-form textarea {
    width: 100%;
    min-height: 82px;
    resize: vertical;
    box-sizing: border-box;
    padding: 9px 10px;
    border: 1px solid rgba(113, 243, 213, .24);
    border-radius: 8px;
    color: #eaf8ff;
    background: rgba(2, 10, 18, .72);
    font: 700 .78rem/1.45 "Segoe UI", Arial, sans-serif;
}

.preliminary-fact-form.compact textarea {
    min-height: 68px;
}

.preliminary-fact-form textarea:focus {
    outline: 2px solid rgba(113, 243, 213, .32);
    border-color: rgba(113, 243, 213, .58);
}

.preliminary-fact-actions {
    display: grid;
    gap: 6px;
}

.preliminary-fact-actions button {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid rgba(245, 209, 138, .38);
    border-radius: 8px;
    color: #fff7d9;
    background: linear-gradient(180deg, rgba(77, 59, 26, .92), rgba(8, 20, 30, .96));
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
}

.preliminary-fact-actions button:disabled {
    cursor: default;
    color: #bffdf0;
    border-color: rgba(113, 243, 213, .34);
    background: rgba(113, 243, 213, .1);
}

.preliminary-fact-actions small {
    color: rgba(234, 248, 255, .68);
    font-size: .68rem;
}

.preliminary-verification-queue span {
    padding: 5px 7px;
    border-left: 2px solid rgba(113, 243, 213, .4);
    background: rgba(255, 255, 255, .035);
    color: rgba(234, 248, 255, .82);
    font-size: .68rem;
}

.preliminary-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.preliminary-skills b {
    padding: 4px 7px;
    color: #bffdf0;
    background: rgba(60, 220, 190, .1);
    border-radius: 999px;
    font-size: .68rem;
}

.preliminary-disclaimer {
    color: #f5d18a;
    font-size: .8rem;
}

.pipeline-wait-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    padding: clamp(18px, 3vw, 28px);
    color: #eefaf8;
    background:
        radial-gradient(circle at 12% 10%, rgba(249, 215, 117, 0.16), transparent 30%),
        linear-gradient(145deg, rgba(5, 17, 29, 0.96), rgba(6, 42, 48, 0.92));
    border: 1px solid rgba(249, 215, 117, 0.32);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34), inset 0 0 24px rgba(113, 243, 213, 0.045);
    overflow: hidden;
}

.pipeline-wait-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, transparent 0 36%, rgba(255, 255, 255, 0.08) 42%, transparent 50%),
        repeating-linear-gradient(90deg, rgba(113, 243, 213, 0.03) 0 1px, transparent 1px 24px);
    animation: pipeline-wait-sheen 5.8s linear infinite;
    pointer-events: none;
}

.pipeline-wait-visual,
.pipeline-wait-copy,
.pipeline-wait-steps,
.pipeline-wait-meta {
    position: relative;
    z-index: 1;
}

.pipeline-wait-visual {
    width: 74px;
    display: grid;
    place-items: start center;
}

.sandglass-shell {
    position: relative;
    width: 44px;
    height: 66px;
    border: 2px solid rgba(249, 215, 117, 0.72);
    border-top-width: 5px;
    border-bottom-width: 5px;
    border-radius: 8px 8px 13px 13px;
    clip-path: polygon(10% 0, 90% 0, 58% 50%, 90% 100%, 10% 100%, 42% 50%);
    box-shadow: 0 0 22px rgba(249, 215, 117, 0.16);
}

.sandglass-shell::before,
.sandglass-shell::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    background: linear-gradient(180deg, #f9d775, #71f3d5);
    opacity: 0.92;
}

.sandglass-shell::before {
    top: 8px;
    height: 20px;
    clip-path: polygon(0 0, 100% 0, 56% 100%, 44% 100%);
    animation: sand-top 2.8s ease-in-out infinite;
}

.sandglass-shell::after {
    bottom: 8px;
    height: 18px;
    clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%);
    animation: sand-bottom 2.8s ease-in-out infinite;
}

.sandglass-shell i {
    position: absolute;
    left: 50%;
    top: 29px;
    width: 2px;
    height: 12px;
    transform: translateX(-50%);
    background: #f9d775;
    opacity: 0.88;
}

.sandglass-shell b {
    position: absolute;
    inset: -9px;
    border-radius: 999px;
    border: 1px solid rgba(113, 243, 213, 0.16);
    animation: wait-pulse 2.8s ease-in-out infinite;
}

.pipeline-wait-copy {
    display: grid;
    gap: 10px;
}

.pipeline-wait-kicker {
    color: #71f3d5;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.pipeline-wait-copy h3 {
    margin: 0;
    color: #fff7d9;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.25rem, 3vw, 2rem);
    line-height: 1.1;
}

.pipeline-wait-copy p {
    margin: 0;
    color: rgba(238, 250, 248, 0.82);
    line-height: 1.55;
}

.pipeline-wait-promise {
    padding: 10px 12px;
    border-left: 3px solid rgba(249, 215, 117, 0.72);
    background: rgba(249, 215, 117, 0.08);
    color: #fff1bd !important;
}

.pipeline-wait-steps {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.pipeline-wait-step {
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid rgba(113, 243, 213, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
}

.pipeline-wait-step b {
    color: #f9d775;
    font-family: Georgia, "Times New Roman", serif;
}

.pipeline-wait-step em {
    color: rgba(238, 250, 248, 0.76);
    font-style: normal;
    font-size: 0.76rem;
}

.pipeline-wait-step.listo {
    border-color: rgba(113, 243, 213, 0.45);
}

.pipeline-wait-step.activo {
    border-color: rgba(249, 215, 117, 0.5);
    box-shadow: 0 0 18px rgba(249, 215, 117, 0.11);
}

.pipeline-wait-meta {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pipeline-wait-meta span {
    padding: 5px 8px;
    border: 1px solid rgba(113, 243, 213, 0.18);
    border-radius: 999px;
    color: rgba(238, 250, 248, 0.74);
    background: rgba(0, 0, 0, 0.18);
    font-size: 0.68rem;
}

.pipeline-live-progress {
    display: grid;
    gap: 12px;
    margin: 16px 0;
    padding: 14px;
    border: 1px solid rgba(113, 243, 213, 0.28);
    border-radius: 14px;
    background:
        radial-gradient(circle at 0% 0%, rgba(113, 243, 213, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(5, 17, 29, 0.86), rgba(3, 10, 18, 0.94));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.pipeline-live-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    color: #71f3d5;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pipeline-live-header strong {
    padding: 5px 8px;
    border: 1px solid rgba(249, 215, 117, 0.42);
    border-radius: 999px;
    color: #fff1bd;
    background: rgba(249, 215, 117, 0.08);
    font-size: 0.68rem;
    white-space: nowrap;
}

.pipeline-live-progress p {
    margin: 0;
    color: rgba(238, 250, 248, 0.84);
    font-size: 0.9rem;
    line-height: 1.5;
}

.pipeline-live-rail {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.pipeline-live-step {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(113, 243, 213, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
}

.pipeline-live-step b {
    color: #f9d775;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.9rem;
}

.pipeline-live-step em {
    color: #eefaf8;
    font-style: normal;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
}

.pipeline-live-step small {
    color: rgba(238, 250, 248, 0.62);
    font-size: 0.68rem;
    line-height: 1.25;
}

.pipeline-live-step.listo {
    border-color: rgba(113, 243, 213, 0.36);
}

.pipeline-live-step.activo {
    border-color: rgba(249, 215, 117, 0.58);
    background: rgba(249, 215, 117, 0.075);
    box-shadow: 0 0 18px rgba(249, 215, 117, 0.12);
}

.pipeline-live-step.pendiente {
    opacity: 0.72;
}

@media (max-width: 760px) {
    .pipeline-live-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .pipeline-live-rail {
        grid-template-columns: 1fr;
    }
}

@keyframes sand-top {
    0%, 8% { height: 22px; opacity: 0.95; }
    72%, 100% { height: 5px; opacity: 0.4; }
}

@keyframes sand-bottom {
    0%, 8% { height: 5px; opacity: 0.45; }
    72%, 100% { height: 22px; opacity: 0.95; }
}

@keyframes wait-pulse {
    0%, 100% { opacity: 0.22; transform: scale(0.94); }
    50% { opacity: 0.54; transform: scale(1.05); }
}

@keyframes pipeline-wait-sheen {
    0% { transform: translateX(-60%); }
    100% { transform: translateX(60%); }
}

@media (max-width: 680px) {
    .pipeline-wait-card {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .pipeline-wait-visual {
        width: auto;
        place-items: center start;
    }

    .pipeline-wait-steps {
        grid-template-columns: 1fr 1fr;
    }
}

/* SHARED PASTEL LEGAL-PAPER INPUT SURFACE */
.strategic-input-container textarea,
.clarifier-custom-answer textarea {
    color: #101923;
    background: rgba(255, 253, 239, 0.94);
    border: 1px solid rgba(105, 196, 188, 0.42);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.72),
        inset 0 1px 5px rgba(63, 51, 27, 0.08),
        0 5px 14px rgba(3, 9, 14, 0.08);
    caret-color: #725a24;
}

.strategic-input-container textarea::placeholder,
.clarifier-custom-answer textarea::placeholder {
    color: rgba(52, 61, 68, 0.7);
    opacity: 1;
}

.strategic-input-container:focus-within textarea,
.clarifier-custom-answer textarea:focus {
    color: #101923;
    background: rgba(255, 253, 239, 0.98);
    border-color: rgba(214, 184, 111, 0.92);
    outline: 2px solid rgba(246, 219, 148, 0.2);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.86),
        inset 0 1px 5px rgba(63, 51, 27, 0.08),
        0 0 0 3px rgba(105, 196, 188, 0.1),
        0 8px 20px rgba(83, 64, 25, 0.12);
}

.strategic-input-container textarea:disabled {
    color: #172033;
    background: rgba(247, 241, 227, 0.94);
    -webkit-text-fill-color: #172033;
}

/* Match the clean passkey field: remove scanlines/grill from the intake chip. */
.strategic-input-container,
.strategic-input-container::before,
.strategic-input-container::after,
.strategic-input-container textarea,
.clarifier-custom-answer,
.clarifier-custom-answer textarea {
    background-image: none !important;
}

.strategic-input-container {
    background-color: #fbf7eb !important;
}

.strategic-input-container::after {
    display: none;
}

/* MOBILE AGENT WORKSPACE: use the former empty delivery region as an interactive rail. */
@media (max-width: 820px) {
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .experience-shell {
        grid-template-rows: auto auto auto;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer {
        display: none;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-hub {
        grid-column: 1;
        grid-row: 2;
        display: flex;
        align-items: stretch;
        gap: 10px;
        min-height: 214px;
        max-height: none;
        padding: 42px 12px 14px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
        scrollbar-color: rgba(105, 196, 188, .72) rgba(2, 9, 14, .5);
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .hub-title {
        position: absolute;
        top: 12px;
        left: 14px;
        z-index: 5;
        display: block;
        max-width: none;
        color: #f5d18a;
        font-size: .72rem;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .hub-title::after {
        content: " // Desliza y toca un agente";
        color: rgba(234, 247, 255, .62);
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .matrix-chip,
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card,
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card:nth-of-type(1),
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card:nth-of-type(2),
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card.center-card,
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card:nth-of-type(4),
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card:nth-of-type(5),
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card.output-card:nth-of-type(6),
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card.output-card:nth-of-type(7) {
        flex: 0 0 min(42vw, 158px);
        display: block;
        min-height: 150px;
        max-height: 158px;
        border-radius: 12px;
        clip-path: none;
        scroll-snap-align: center;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .matrix-tag {
        display: block;
        left: 8px;
        right: 8px;
        bottom: 9px;
        padding: 5px;
        font-size: .62rem;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .chip-response {
        display: block;
        left: 8px;
        right: 8px;
        top: 8px;
        font-size: .58rem;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .chip-usage-core {
        top: 48%;
        width: min(58%, 64px);
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .chip-usage-percent {
        font-size: .78rem;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .output-console {
        grid-column: 1;
        grid-row: 3;
        height: auto;
        min-height: 0;
        max-height: none;
        grid-template-rows: auto auto auto auto;
        overflow: visible;
        resize: none;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .output-console .matrix-content-viewport {
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
        resize: none;
        padding: 10px 8px 14px;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .output-console .matrix-pane.pane-active,
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked #client-view,
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .sintesis-tier-layer,
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .sintesis-tier-card {
        height: auto;
        min-height: 0;
        max-height: none;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .sintesis-tier-layer {
        align-content: start;
        grid-auto-rows: auto;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .client-tier-card {
        display: block;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .client-tier-card > * {
        margin-block-start: 0;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .client-tier-card > * + * {
        margin-block-start: 10px;
    }
}

/* Final client-only choice rail override: equal Contact Us / S.I.N.T.E.S.I.S. distribution. */
body.client-view-only .specialist-hub .agent-choice-layer,
body.client-view-only.choice-agents-active .specialist-hub .agent-choice-layer,
body.client-view-only.choice-sintesis-active .specialist-hub .agent-choice-layer,
body.client-view-only.post-output-choice .specialist-hub .agent-choice-layer,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-hub .agent-choice-layer {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(180px, 1fr)) !important;
    grid-template-rows: minmax(150px, 1fr) !important;
    gap: clamp(12px, 2vw, 20px) !important;
    width: min(100%, 980px);
    margin-inline: auto;
    align-items: stretch;
}

body.client-view-only .specialist-hub .agent-choice-card,
body.client-view-only.post-output-choice .specialist-hub .agent-choice-card,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-hub .agent-choice-card {
    width: 100% !important;
    min-height: clamp(150px, 22vh, 300px) !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
    padding-bottom: 58px;
}

body.client-view-only .agent-choice-card[data-client-contact-chip="true"] img {
    object-fit: cover;
    object-position: center;
    opacity: 0.92;
    filter: contrast(1.02) saturate(0.98) brightness(0.96);
}

body.client-view-only .agent-choice-card[data-client-contact-chip="true"]::before {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(7, 17, 29, 0.18)),
        linear-gradient(180deg, rgba(7, 17, 29, 0.04), rgba(7, 17, 29, 0.32));
}

body.client-view-only .agent-choice-card[data-client-contact-chip="true"] .choice-kicker,
body.client-view-only .agent-choice-card[data-client-contact-chip="true"] .choice-title,
body.client-view-only .agent-choice-card[data-client-contact-chip="true"] .choice-caption {
    opacity: 0;
    pointer-events: none;
}

body.client-view-only .agent-choice-card[data-client-contact-chip="true"]::after {
    content: "";
    inset: 12px;
    min-height: auto;
    border-radius: 5px;
    background: transparent;
    border: 1px solid rgba(200, 168, 90, 0.35);
    box-shadow: none;
}

body.client-view-only .persistent-choice-layer {
    display: grid !important;
    grid-template-columns: minmax(280px, min(100%, 980px));
    justify-content: center;
    align-items: stretch;
    width: min(100%, 1040px);
    margin-inline: auto;
    padding-inline: clamp(10px, 2vw, 18px);
}

body.client-view-only .persistent-choice-layer .agent-choice-card[data-client-contact-chip="true"] {
    width: 100% !important;
    min-height: clamp(150px, 18vh, 260px) !important;
}

body.client-view-only .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"] {
    display: none !important;
}

body.client-view-only .specialist-hub .agent-choice-card.client-choice-locked:not([data-client-contact-chip="true"]) {
    cursor: not-allowed;
    filter: grayscale(0.18) brightness(0.9);
}

body.client-view-only .specialist-hub .agent-choice-card.client-choice-locked:not([data-client-contact-chip="true"]) img {
    opacity: 0.72;
}

body.client-view-only .specialist-hub .agent-choice-card.client-choice-locked:not([data-client-contact-chip="true"]) .choice-kicker,
body.client-view-only .specialist-hub .agent-choice-card.client-choice-locked:not([data-client-contact-chip="true"]) .choice-title,
body.client-view-only .specialist-hub .agent-choice-card.client-choice-locked:not([data-client-contact-chip="true"]) .choice-caption {
    opacity: 1;
    pointer-events: none;
}

body.client-view-only .specialist-hub .agent-choice-card.client-choice-locked:not([data-client-contact-chip="true"])::after {
    content: "Panel reservado";
    inset: auto 16px 16px 16px;
    min-height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: rgba(249, 215, 117, 0.94);
    background: rgba(7, 17, 29, 0.72);
    border: 1px solid rgba(249, 215, 117, 0.34);
    box-shadow: none;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 720px) {
    body.client-view-only .specialist-hub .agent-choice-layer,
    body.client-view-only.choice-agents-active .specialist-hub .agent-choice-layer,
    body.client-view-only.choice-sintesis-active .specialist-hub .agent-choice-layer,
    body.client-view-only.post-output-choice .specialist-hub .agent-choice-layer,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-hub .agent-choice-layer {
        grid-template-columns: 1fr !important;
        grid-template-rows: repeat(2, minmax(128px, auto)) !important;
    }
}

/* Client-only final placement: upper persistent rail stays L.E.G.A.S.Y. + S.I.N.T.E.S.I.S.; lower rail is Contact Us. */
body.client-view-only .persistent-choice-layer {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 72px minmax(280px, 1fr) !important;
    gap: 18px !important;
    width: auto !important;
    padding-inline: 22px !important;
}

body.client-view-only .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"] {
    display: flex !important;
}

body.client-view-only .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] {
    display: flex !important;
    min-height: 72px !important;
    cursor: not-allowed;
}

body.client-view-only .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] .choice-kicker,
body.client-view-only .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] .choice-title,
body.client-view-only .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] .choice-caption {
    opacity: 1 !important;
}

body.client-view-only .persistent-choice-layer .agent-choice-card[data-choice-target="agents"]::after {
    content: "";
    inset: 8px;
    min-height: auto;
    border-radius: 5px;
    background: transparent;
    border: 1px solid rgba(248, 250, 252, 0.22);
    box-shadow: none;
}

body.client-view-only .specialist-hub .agent-choice-layer,
body.client-view-only.choice-agents-active .specialist-hub .agent-choice-layer,
body.client-view-only.choice-sintesis-active .specialist-hub .agent-choice-layer,
body.client-view-only.post-output-choice .specialist-hub .agent-choice-layer,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-hub .agent-choice-layer {
    grid-template-columns: minmax(280px, min(100%, 980px)) !important;
    grid-template-rows: minmax(128px, 1fr) !important;
    justify-content: center;
}

body.client-view-only .specialist-hub .agent-choice-card[data-choice-target="sintesis"] {
    display: none !important;
}

body.client-view-only .specialist-hub .agent-choice-card[data-client-contact-chip="true"] {
    width: 100% !important;
    min-height: clamp(128px, 15vh, 220px) !important;
    padding-bottom: 0 !important;
}

body.client-view-only .specialist-hub .agent-choice-card[data-client-contact-chip="true"] img {
    object-fit: cover;
    object-position: center;
    opacity: 0.96;
    filter: contrast(1.04) saturate(1.02) brightness(0.98);
}

body.client-view-only .specialist-hub .agent-choice-card[data-client-contact-chip="true"]::before {
    background: linear-gradient(180deg, rgba(7, 17, 29, 0.02), rgba(7, 17, 29, 0.14));
}

body.client-view-only .specialist-hub .agent-choice-card[data-client-contact-chip="true"]::after {
    content: "";
    inset: 10px;
    min-height: auto;
    border-radius: 6px;
    background: transparent;
    border: 1px solid rgba(200, 168, 90, 0.36);
    box-shadow: none;
}

/* Client-only hard layout contract v2: no docked-dashboard leftovers. */
body.pipeline-executing.client-view-only .experience-shell,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .experience-shell,
body.client-view-only.post-output-choice .experience-shell {
    display: grid !important;
    grid-template-columns: minmax(300px, 0.42fr) minmax(420px, 0.58fr) !important;
    grid-template-rows: auto auto auto !important;
    gap: clamp(12px, 2vw, 22px) !important;
    align-items: start !important;
}

body.pipeline-executing.client-view-only .landing-container,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .landing-container,
body.client-view-only.post-output-choice .landing-container {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
}

body.pipeline-executing.client-view-only .persistent-choice-layer,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer,
body.client-view-only.post-output-choice .persistent-choice-layer {
    grid-column: 2 !important;
    grid-row: 1 !important;
    position: relative !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(190px, 1fr)) !important;
    grid-template-rows: minmax(280px, 54vh) !important;
    gap: clamp(14px, 2vw, 22px) !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: clamp(12px, 2vw, 18px) !important;
    border: 1px solid rgba(105, 196, 188, 0.42) !important;
    background:
        linear-gradient(rgba(237, 244, 241, 0.032) 1px, transparent 1px),
        linear-gradient(90deg, rgba(237, 244, 241, 0.024) 1px, transparent 1px),
        linear-gradient(145deg, rgba(7, 25, 36, 0.94), rgba(15, 68, 73, 0.82) 48%, rgba(7, 24, 35, 0.94)) !important;
    background-size: 14px 14px, 14px 14px, auto !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card,
body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card {
    display: flex !important;
    min-height: 0 !important;
    height: 100% !important;
    width: 100% !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
    padding-bottom: clamp(18px, 3vw, 34px) !important;
    border-radius: 12px !important;
}

body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card[data-choice-target="agents"],
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card[data-choice-target="agents"],
body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] {
    cursor: not-allowed !important;
    filter: grayscale(0.08) brightness(0.96) !important;
    border-color: rgba(105, 196, 188, 0.56) !important;
}

body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] img,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] img,
body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] img {
    opacity: 0.76 !important;
    filter: contrast(1.08) saturate(0.92) brightness(0.72) !important;
}

body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] span,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] span,
body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] span {
    opacity: 1 !important;
    display: block !important;
    padding-inline: clamp(16px, 3vw, 34px) !important;
    pointer-events: none !important;
}

body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card[data-choice-target="agents"]::after,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card[data-choice-target="agents"]::after,
body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card[data-choice-target="agents"]::after {
    content: "Panel reservado" !important;
    inset: auto 16px 16px 16px !important;
    min-height: 34px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 999px !important;
    color: rgba(249, 215, 117, 0.94) !important;
    background: rgba(7, 17, 29, 0.72) !important;
    border: 1px solid rgba(249, 215, 117, 0.34) !important;
    box-shadow: none !important;
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"],
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"],
body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"] {
    display: flex !important;
    border-color: rgba(214, 184, 111, 0.92) !important;
}

body.pipeline-executing.client-view-only .specialist-hub,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-hub,
body.client-view-only.post-output-choice .specialist-hub {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    display: grid !important;
    min-height: clamp(150px, 18vh, 230px) !important;
    max-height: none !important;
    padding: clamp(10px, 1.6vw, 16px) !important;
    overflow: hidden !important;
    border: 1px solid rgba(105, 196, 188, 0.44) !important;
}

body.pipeline-executing.client-view-only .specialist-hub .agent-choice-layer,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-hub .agent-choice-layer,
body.client-view-only.post-output-choice .specialist-hub .agent-choice-layer {
    display: grid !important;
    grid-template-columns: minmax(280px, min(100%, 1120px)) !important;
    grid-template-rows: minmax(128px, 1fr) !important;
    justify-content: center !important;
    gap: 0 !important;
    width: 100% !important;
    margin-inline: auto !important;
}

body.pipeline-executing.client-view-only .specialist-hub .agent-choice-card[data-choice-target="sintesis"],
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-hub .agent-choice-card[data-choice-target="sintesis"],
body.client-view-only.post-output-choice .specialist-hub .agent-choice-card[data-choice-target="sintesis"] {
    display: none !important;
}

body.pipeline-executing.client-view-only .specialist-hub .agent-choice-card[data-client-contact-chip="true"],
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-hub .agent-choice-card[data-client-contact-chip="true"],
body.client-view-only.post-output-choice .specialist-hub .agent-choice-card[data-client-contact-chip="true"] {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: clamp(128px, 16vh, 210px) !important;
    padding: 0 !important;
    border-color: rgba(214, 184, 111, 0.84) !important;
    border-radius: 12px !important;
}

body.pipeline-executing.client-view-only .specialist-hub .agent-choice-card[data-client-contact-chip="true"] img,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-hub .agent-choice-card[data-client-contact-chip="true"] img,
body.client-view-only.post-output-choice .specialist-hub .agent-choice-card[data-client-contact-chip="true"] img {
    object-fit: cover !important;
    object-position: center !important;
    opacity: 1 !important;
    filter: contrast(1.03) saturate(1.02) brightness(1) !important;
}

body.pipeline-executing.client-view-only .output-console,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .output-console,
body.client-view-only.post-output-choice .output-console {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
    width: 100% !important;
}

@media (max-width: 900px) {
    body.pipeline-executing.client-view-only .experience-shell,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .experience-shell,
    body.client-view-only.post-output-choice .experience-shell {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.pipeline-executing.client-view-only .landing-container,
    body.pipeline-executing.client-view-only .persistent-choice-layer,
    body.pipeline-executing.client-view-only .specialist-hub,
    body.pipeline-executing.client-view-only .output-console,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .landing-container,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-hub,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .output-console,
    body.client-view-only.post-output-choice .landing-container,
    body.client-view-only.post-output-choice .persistent-choice-layer,
    body.client-view-only.post-output-choice .specialist-hub,
    body.client-view-only.post-output-choice .output-console {
        grid-column: 1 !important;
    }

    body.pipeline-executing.client-view-only .persistent-choice-layer,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer,
    body.client-view-only.post-output-choice .persistent-choice-layer {
        grid-row: 2 !important;
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: minmax(150px, auto) !important;
    }

    body.pipeline-executing.client-view-only .specialist-hub,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-hub,
    body.client-view-only.post-output-choice .specialist-hub {
        grid-row: 3 !important;
    }

    body.pipeline-executing.client-view-only .output-console,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .output-console,
    body.client-view-only.post-output-choice .output-console {
        grid-row: 4 !important;
    }
}

/* Client-only visual reset: restore the premium L.E.G.A.S.Y. / S.I.N.T.E.S.I.S. stack. */
body.client-view-only .experience-shell,
body.pipeline-executing.client-view-only .experience-shell,
body.client-view-only.post-output-choice .experience-shell,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .experience-shell {
    display: grid !important;
    grid-template-columns: minmax(320px, 0.44fr) minmax(380px, 0.56fr) !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    gap: clamp(16px, 2vw, 24px) !important;
    align-items: stretch !important;
}

body.client-view-only .landing-container,
body.pipeline-executing.client-view-only .landing-container,
body.client-view-only.post-output-choice .landing-container,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .landing-container {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-height: min(92vh, 820px) !important;
}

body.client-view-only .persistent-choice-layer,
body.pipeline-executing.client-view-only .persistent-choice-layer,
body.client-view-only.post-output-choice .persistent-choice-layer,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer {
    grid-column: 2 !important;
    grid-row: 1 !important;
    position: relative !important;
    z-index: 4 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(2, minmax(240px, 1fr)) !important;
    gap: clamp(14px, 2vw, 22px) !important;
    width: 100% !important;
    min-height: min(92vh, 820px) !important;
    padding: clamp(16px, 2vw, 22px) !important;
    border: 2px solid rgba(105, 196, 188, 0.48) !important;
    background:
        linear-gradient(rgba(237, 244, 241, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(237, 244, 241, 0.032) 1px, transparent 1px),
        linear-gradient(145deg, rgba(7, 25, 36, 0.98), rgba(15, 68, 73, 0.92) 48%, rgba(7, 24, 35, 0.98)) !important;
    background-size: 14px 14px, 14px 14px, auto !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

body.client-view-only .persistent-choice-layer .agent-choice-card,
body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card,
body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding-bottom: clamp(22px, 4vw, 44px) !important;
    border-radius: 8px !important;
}

body.client-view-only .persistent-choice-layer .agent-choice-card img,
body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card img,
body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card img,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card img {
    opacity: 0.76 !important;
    object-fit: cover !important;
    object-position: center !important;
    filter: contrast(1.08) saturate(0.92) brightness(0.72) !important;
}

body.client-view-only .persistent-choice-layer .agent-choice-card::before,
body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card::before,
body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card::before,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card::before {
    background:
        linear-gradient(180deg, rgba(7, 17, 29, 0.18), rgba(7, 17, 29, 0.78)),
        radial-gradient(circle at 50% 35%, rgba(105, 196, 188, 0.18), transparent 44%) !important;
}

body.client-view-only .persistent-choice-layer .agent-choice-card::after,
body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card::after,
body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card::after,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card::after {
    content: "" !important;
    inset: 12px !important;
    min-height: auto !important;
    border: 1px solid rgba(248, 250, 252, 0.22) !important;
    border-radius: 5px !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.client-view-only .persistent-choice-layer .agent-choice-card span,
body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card span,
body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card span,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card span {
    display: block !important;
    position: relative !important;
    z-index: 2 !important;
    opacity: 1 !important;
    padding-inline: clamp(24px, 4vw, 48px) !important;
    pointer-events: none !important;
}

body.client-view-only .persistent-choice-layer .agent-choice-card .choice-kicker,
body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card .choice-kicker,
body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card .choice-kicker,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card .choice-kicker {
    margin-top: clamp(20px, 3vw, 42px) !important;
    margin-right: 0 !important;
    font-size: clamp(0.78rem, 1.2vw, 0.95rem) !important;
}

body.client-view-only .persistent-choice-layer .agent-choice-card .choice-title,
body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card .choice-title,
body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card .choice-title,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card .choice-title {
    margin-top: 8px !important;
    max-width: calc(100% - clamp(48px, 8vw, 96px)) !important;
    font-size: clamp(1.85rem, 4.05vw, 4.15rem) !important;
    line-height: 0.95 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    transform: scaleX(0.88) !important;
    transform-origin: left center !important;
}

body.client-view-only .persistent-choice-layer .agent-choice-card .choice-caption,
body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card .choice-caption,
body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card .choice-caption,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card .choice-caption {
    display: block !important;
    margin-top: 8px !important;
    font-size: clamp(0.95rem, 1.45vw, 1.2rem) !important;
}

body.client-view-only .persistent-choice-layer .agent-choice-card[data-choice-target="agents"],
body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card[data-choice-target="agents"],
body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card[data-choice-target="agents"],
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card[data-choice-target="agents"] {
    cursor: not-allowed !important;
    border-color: rgba(105, 196, 188, 0.58) !important;
    filter: none !important;
}

body.client-view-only .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"],
body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"],
body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"],
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card[data-choice-target="sintesis"] {
    display: flex !important;
    border-color: rgba(214, 184, 111, 0.92) !important;
}

body.client-view-only .specialist-hub,
body.pipeline-executing.client-view-only .specialist-hub,
body.client-view-only.post-output-choice .specialist-hub,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-hub {
    display: none !important;
}

body.client-view-only .output-console,
body.pipeline-executing.client-view-only .output-console,
body.client-view-only.post-output-choice .output-console,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .output-console {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
}

body.client-view-only.sintesis-output-focus .experience-shell,
body.client-view-only.post-output-choice.sintesis-output-focus .experience-shell,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .experience-shell {
    grid-template-rows: auto minmax(620px, auto) !important;
}

body.client-view-only.sintesis-output-focus .persistent-choice-layer,
body.client-view-only.post-output-choice.sintesis-output-focus .persistent-choice-layer,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .persistent-choice-layer {
    min-height: auto !important;
    grid-template-rows: repeat(2, minmax(88px, auto)) !important;
    padding: clamp(10px, 1.4vw, 14px) !important;
}

body.client-view-only.sintesis-output-focus .persistent-choice-layer .agent-choice-card,
body.client-view-only.post-output-choice.sintesis-output-focus .persistent-choice-layer .agent-choice-card,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .persistent-choice-layer .agent-choice-card {
    min-height: 88px !important;
    padding-bottom: 12px !important;
    justify-content: center !important;
}

body.client-view-only.sintesis-output-focus .persistent-choice-layer .agent-choice-card img,
body.client-view-only.post-output-choice.sintesis-output-focus .persistent-choice-layer .agent-choice-card img,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .persistent-choice-layer .agent-choice-card img {
    opacity: 0.22 !important;
    filter: grayscale(0.28) brightness(0.58) !important;
}

body.client-view-only.sintesis-output-focus .persistent-choice-layer .agent-choice-card .choice-kicker,
body.client-view-only.post-output-choice.sintesis-output-focus .persistent-choice-layer .agent-choice-card .choice-kicker,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .persistent-choice-layer .agent-choice-card .choice-kicker {
    margin-top: 0 !important;
    font-size: 0.72rem !important;
}

body.client-view-only.sintesis-output-focus .persistent-choice-layer .agent-choice-card .choice-title,
body.client-view-only.post-output-choice.sintesis-output-focus .persistent-choice-layer .agent-choice-card .choice-title,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .persistent-choice-layer .agent-choice-card .choice-title {
    font-size: clamp(1.1rem, 2.2vw, 1.65rem) !important;
    transform: none !important;
}

body.client-view-only.sintesis-output-focus .persistent-choice-layer .agent-choice-card .choice-caption,
body.client-view-only.post-output-choice.sintesis-output-focus .persistent-choice-layer .agent-choice-card .choice-caption,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .persistent-choice-layer .agent-choice-card .choice-caption {
    display: none !important;
}

body.client-view-only.sintesis-output-focus .output-console,
body.client-view-only.post-output-choice.sintesis-output-focus .output-console,
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .output-console {
    display: grid !important;
    grid-row: 2 !important;
    min-height: 620px !important;
    scroll-margin-top: 16px !important;
}

/* Agent chip composition hardening: keep telemetry inside the hex without crowding labels. */
body.post-output-choice.choice-agents-active:not(.agent-dashboard-docked) .specialist-card,
body.post-output-choice.choice-sintesis-active:not(.agent-dashboard-docked) .specialist-card {
    min-height: clamp(132px, 18dvh, 178px) !important;
}

body.post-output-choice.choice-agents-active:not(.agent-dashboard-docked) .specialist-card .chip-usage-core,
body.post-output-choice.choice-sintesis-active:not(.agent-dashboard-docked) .specialist-card .chip-usage-core {
    top: 34% !important;
    width: clamp(46px, 18%, 66px) !important;
    transform: translate(-50%, -50%) !important;
}

body.post-output-choice.choice-agents-active:not(.agent-dashboard-docked) .specialist-card .chip-usage-percent,
body.post-output-choice.choice-sintesis-active:not(.agent-dashboard-docked) .specialist-card .chip-usage-percent {
    font-size: clamp(0.95rem, 1.55vw, 1.28rem) !important;
}

body.post-output-choice.choice-agents-active:not(.agent-dashboard-docked) .specialist-card .chip-usage-caption,
body.post-output-choice.choice-sintesis-active:not(.agent-dashboard-docked) .specialist-card .chip-usage-caption {
    max-width: 54px !important;
    font-size: 0.42rem !important;
    line-height: 1 !important;
}

body.post-output-choice.choice-agents-active:not(.agent-dashboard-docked) .specialist-card .matrix-tag,
body.post-output-choice.choice-sintesis-active:not(.agent-dashboard-docked) .specialist-card .matrix-tag {
    left: 14% !important;
    right: 14% !important;
    bottom: 14% !important;
    min-height: 18px !important;
    padding: 3px 5px !important;
    font-size: clamp(0.66rem, 1vw, 0.8rem) !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.post-output-choice.choice-agents-active:not(.agent-dashboard-docked) .specialist-card .chip-response,
body.post-output-choice.choice-sintesis-active:not(.agent-dashboard-docked) .specialist-card .chip-response {
    left: 18% !important;
    right: 18% !important;
    bottom: 4% !important;
    min-height: 14px !important;
    padding: 1px 3px !important;
    border: 0 !important;
    background: rgba(3, 14, 24, 0.5) !important;
    font-size: clamp(0.5rem, 0.8vw, 0.62rem) !important;
    line-height: 1.05 !important;
}

body.post-output-choice.choice-agents-active:not(.agent-dashboard-docked) .specialist-card .chip-usage-rail,
body.post-output-choice.choice-sintesis-active:not(.agent-dashboard-docked) .specialist-card .chip-usage-rail {
    left: 18% !important;
    right: 18% !important;
    bottom: 12% !important;
    height: 3px !important;
    z-index: 5 !important;
}

body.client-view-only .persistent-choice-layer .agent-choice-card[hidden],
body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card[hidden],
body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card[hidden],
body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card[hidden] {
    display: flex !important;
}

@media (max-width: 900px) {
    body.client-view-only .experience-shell,
    body.pipeline-executing.client-view-only .experience-shell,
    body.client-view-only.post-output-choice .experience-shell,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .experience-shell {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto auto auto !important;
    }

    body.client-view-only .landing-container,
    body.pipeline-executing.client-view-only .landing-container,
    body.client-view-only.post-output-choice .landing-container,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .landing-container {
        grid-column: 1 !important;
        grid-row: 1 !important;
        min-height: auto !important;
    }

    body.client-view-only .persistent-choice-layer,
    body.pipeline-executing.client-view-only .persistent-choice-layer,
    body.client-view-only.post-output-choice .persistent-choice-layer,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer {
        grid-column: 1 !important;
        grid-row: 2 !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: repeat(2, minmax(190px, auto)) !important;
        min-height: auto !important;
    }

    body.client-view-only .persistent-choice-layer .agent-choice-card .choice-title,
    body.pipeline-executing.client-view-only .persistent-choice-layer .agent-choice-card .choice-title,
    body.client-view-only.post-output-choice .persistent-choice-layer .agent-choice-card .choice-title,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .persistent-choice-layer .agent-choice-card .choice-title {
        max-width: calc(100% - 32px) !important;
        font-size: clamp(1.55rem, 10.4vw, 3rem) !important;
        transform: scaleX(0.82) !important;
    }

    body.client-view-only .output-console,
    body.pipeline-executing.client-view-only .output-console,
    body.client-view-only.post-output-choice .output-console,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked .output-console {
        grid-column: 1 !important;
        grid-row: 3 !important;
    }

    body.client-view-only.sintesis-output-focus .output-console,
    body.client-view-only.post-output-choice.sintesis-output-focus .output-console,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .output-console {
        grid-row: 3 !important;
    }
}

/* Final readability override: long clarification answers and mobile agent chips must not clip content. */
.clarifier-slide-frame {
    height: auto !important;
    overflow: visible !important;
}

.clarifier-question {
    align-content: start !important;
    height: auto !important;
    min-height: min(520px, 62dvh) !important;
    overflow: visible !important;
}

.clarifier-option {
    align-content: start !important;
    height: auto !important;
    min-height: max-content !important;
    overflow: visible !important;
    white-space: normal !important;
}

.clarifier-option .option-title,
.clarifier-option .option-subchip {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    hyphens: auto !important;
}

@media (max-width: 640px) {
    .tier0-clarifier-panel {
        padding: 10px !important;
    }

    .clarifier-slide-frame {
        min-height: auto !important;
    }

    .clarifier-question {
        gap: 14px !important;
        min-height: auto !important;
        padding: 16px 14px !important;
    }

    .clarifier-question-title {
        font-size: clamp(0.94rem, 4.2vw, 1.08rem) !important;
        line-height: 1.28 !important;
    }

    .clarifier-options {
        gap: 10px !important;
    }

    .clarifier-option {
        padding: 14px 16px !important;
        line-height: 1.2 !important;
    }

    .clarifier-option .option-title {
        font-size: clamp(0.98rem, 4.1vw, 1.08rem) !important;
        line-height: 1.18 !important;
    }
}

@media (max-width: 560px) {
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-hub {
        display: grid !important;
        grid-template-columns: 1fr !important;
        align-content: start !important;
        gap: 12px !important;
        min-height: auto !important;
        max-height: none !important;
        padding: 12px !important;
        overflow: visible !important;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .matrix-chip,
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card,
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card:nth-of-type(1),
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card:nth-of-type(2),
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card.center-card,
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card:nth-of-type(4),
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card:nth-of-type(5),
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card.output-card:nth-of-type(6),
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card.output-card:nth-of-type(7) {
        width: 100% !important;
        min-height: 112px !important;
        max-height: none !important;
        clip-path: none !important;
        border-radius: 14px !important;
        overflow: hidden !important;
        display: grid !important;
        grid-template-columns: minmax(92px, 34%) 1fr !important;
        align-items: center !important;
        text-align: left !important;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .hub-icon {
        position: relative !important;
        inset: auto !important;
        grid-column: 1 !important;
        grid-row: 1 / span 4 !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 112px !important;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .hub-icon img {
        opacity: 0.72 !important;
        object-position: center !important;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .matrix-tag {
        position: static !important;
        grid-column: 2 !important;
        display: block !important;
        margin: 0 10px 6px 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        color: #f7f2e6 !important;
        font-size: clamp(0.82rem, 3.8vw, 1rem) !important;
        line-height: 1.1 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .chip-response {
        position: static !important;
        grid-column: 2 !important;
        display: block !important;
        margin: 0 10px 6px 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        font-size: 0.68rem !important;
        line-height: 1.25 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .chip-usage-core {
        position: static !important;
        grid-column: 2 !important;
        transform: none !important;
        width: 48px !important;
        height: 48px !important;
        margin: 0 10px 0 0 !important;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .chip-usage-percent {
        font-size: 0.78rem !important;
    }

    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .chip-usage-caption,
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked .specialist-card .chip-usage-rail {
        display: none !important;
    }
}

@media (max-width: 560px) {
    body.post-output-choice.choice-agents-active .specialist-hub,
    body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-hub {
        display: grid !important;
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        align-content: start !important;
        gap: 12px !important;
        min-height: auto !important;
        max-height: none !important;
        padding: 12px !important;
        overflow: visible !important;
    }

    body.post-output-choice.choice-agents-active .specialist-hub .hub-title,
    body.post-output-choice.choice-agents-active.agent-dashboard-docked .specialist-hub .hub-title {
        position: static !important;
        grid-column: 1 !important;
        margin: 0 0 2px !important;
        padding: 0 2px !important;
        text-align: left !important;
        font-size: 0.76rem !important;
        line-height: 1.2 !important;
    }

    body.post-output-choice.choice-agents-active .matrix-chip,
    body.post-output-choice.choice-agents-active .specialist-card,
    body.post-output-choice.choice-agents-active .specialist-card:nth-of-type(1),
    body.post-output-choice.choice-agents-active .specialist-card:nth-of-type(2),
    body.post-output-choice.choice-agents-active .specialist-card.center-card,
    body.post-output-choice.choice-agents-active .specialist-card:nth-of-type(4),
    body.post-output-choice.choice-agents-active .specialist-card:nth-of-type(5),
    body.post-output-choice.choice-agents-active .specialist-card.output-card:nth-of-type(6),
    body.post-output-choice.choice-agents-active .specialist-card.output-card:nth-of-type(7) {
        width: 100% !important;
        min-height: 112px !important;
        max-height: none !important;
        grid-column: 1 !important;
        grid-row: auto !important;
        clip-path: none !important;
        border-radius: 14px !important;
        overflow: hidden !important;
        display: grid !important;
        grid-template-columns: minmax(92px, 34%) 1fr !important;
        align-items: center !important;
        text-align: left !important;
    }

    body.post-output-choice.choice-agents-active .specialist-card .hub-icon {
        position: relative !important;
        inset: auto !important;
        grid-column: 1 !important;
        grid-row: 1 / span 4 !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 112px !important;
    }

    body.post-output-choice.choice-agents-active .specialist-card .hub-icon img {
        opacity: 0.72 !important;
        object-position: center !important;
    }

    body.post-output-choice.choice-agents-active .specialist-card .matrix-tag {
        position: static !important;
        grid-column: 2 !important;
        display: block !important;
        margin: 0 10px 6px 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        color: #f7f2e6 !important;
        font-size: clamp(0.82rem, 3.8vw, 1rem) !important;
        line-height: 1.1 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    body.post-output-choice.choice-agents-active .specialist-card .chip-response {
        position: static !important;
        grid-column: 2 !important;
        display: block !important;
        margin: 0 10px 6px 0 !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        font-size: 0.68rem !important;
        line-height: 1.25 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    body.post-output-choice.choice-agents-active .specialist-card .chip-usage-core {
        position: static !important;
        grid-column: 2 !important;
        transform: none !important;
        width: 48px !important;
        height: 48px !important;
        margin: 0 10px 0 0 !important;
    }

    body.post-output-choice.choice-agents-active .specialist-card .chip-usage-percent {
        font-size: 0.78rem !important;
    }

    body.post-output-choice.choice-agents-active .specialist-card .chip-usage-caption,
    body.post-output-choice.choice-agents-active .specialist-card .chip-usage-rail {
        display: none !important;
    }
}

/* Clarifier hardening: answer choices must grow with legal text, especially on mobile. */
.tier0-clarifier-panel,
.clarifier-slide-frame,
.clarifier-question,
.clarifier-options,
.clarifier-option,
.clarifier-option .option-title,
.clarifier-option .option-subchip {
    box-sizing: border-box !important;
    min-width: 0 !important;
}

.clarifier-option {
    display: block !important;
    height: auto !important;
    min-height: unset !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
}

.clarifier-option .option-title,
.clarifier-option .option-subchip {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    hyphens: auto !important;
}

.clarifier-option .option-subchip {
    margin-top: 8px !important;
}

.freemium-client-brief .preliminary-orchestrator-grid,
.professional-preliminary-brief .preliminary-orchestrator-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    justify-content: stretch;
    align-items: start;
    gap: 14px;
}

.freemium-client-brief .preliminary-decision-card,
.professional-preliminary-brief .preliminary-decision-card {
    min-height: 0;
    align-self: start;
    gap: 10px;
    padding: 14px;
    overflow: hidden;
}

.freemium-client-brief .preliminary-decision-card > p,
.professional-preliminary-brief .preliminary-decision-card > p {
    display: -webkit-box;
    margin: 0;
    color: rgba(234, 248, 255, 0.82);
    font-size: 0.78rem;
    line-height: 1.32;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.freemium-client-brief .preliminary-soundbite,
.professional-preliminary-brief .preliminary-soundbite {
    display: -webkit-box;
    font-size: 0.92rem;
    line-height: 1.22;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preliminary-next-fact {
    display: grid;
    gap: 7px;
    margin-top: 2px;
    padding-top: 8px;
    border-top: 1px solid rgba(105, 240, 223, 0.18);
}

.preliminary-next-fact > b {
    color: #65f0dc;
    font-family: var(--font-cyber);
    font-size: 0.64rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.preliminary-next-fact > small {
    color: rgba(234, 248, 255, 0.9);
    font-family: var(--font-terminal);
    font-size: 0.72rem;
    line-height: 1.22;
    overflow-wrap: anywhere;
}

.preliminary-fact-legal-use {
    margin: 0;
    color: rgba(234, 248, 255, 0.74);
    font-family: var(--font-terminal);
    font-size: 0.68rem;
    line-height: 1.28;
}

.preliminary-fact-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.preliminary-fact-signals span {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 2px 7px;
    border: 1px solid rgba(105, 240, 223, 0.2);
    border-radius: 999px;
    background: rgba(105, 240, 223, 0.08);
    color: #9ff8ed;
    font-family: var(--font-cyber);
    font-size: 0.55rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.preliminary-fact-form.compact {
    gap: 6px;
    padding: 8px;
}

.preliminary-fact-form.compact label > span {
    font-size: 0.58rem;
}

.preliminary-fact-form.compact label > small {
    display: none;
}

.preliminary-fact-form.compact textarea {
    min-height: 54px;
    max-height: 82px;
    font-size: 0.68rem;
    line-height: 1.25;
}

.preliminary-fact-form.compact button {
    min-height: 28px;
    padding: 6px 8px;
    font-size: 0.62rem;
}

.preliminary-fact-form.compact .preliminary-fact-actions small {
    font-size: 0.58rem;
}

@media (max-width: 760px) {
    .preliminary-orchestrator-grid,
    .freemium-client-brief .preliminary-orchestrator-grid,
    .professional-preliminary-brief .preliminary-orchestrator-grid {
        grid-template-columns: 1fr;
    }
}

body.clarification-choice .tier0-clarifier-panel {
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

body.clarification-choice .clarifier-question,
body.clarification-choice .clarifier-slide-frame {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

@media (max-width: 720px) {
    body.clarification-choice .tier0-clarifier-panel {
        max-height: calc(100dvh - 18px) !important;
        padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important;
    }

    body.clarification-choice .clarifier-question {
        padding: 16px 12px !important;
    }

    body.clarification-choice .clarifier-option {
        padding: 16px 18px !important;
        line-height: 1.22 !important;
    }

    body.clarification-choice .clarifier-option .option-title {
        font-size: clamp(1rem, 4.05vw, 1.12rem) !important;
        line-height: 1.16 !important;
    }

    body.clarification-choice .clarifier-option .option-subchip {
        font-size: clamp(0.72rem, 3.15vw, 0.82rem) !important;
        line-height: 1.24 !important;
    }
}

/* Second-run hardening: calibration always owns the choice layer, even after a client-only result. */
body.clarification-choice.client-view-only .experience-shell {
    display: grid !important;
    grid-template-columns: minmax(320px, 0.44fr) minmax(380px, 0.56fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: clamp(16px, 2vw, 24px) !important;
    align-items: stretch !important;
}

body.clarification-choice.client-view-only .landing-container {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-height: min(92vh, 820px) !important;
}

body.clarification-choice.client-view-only .specialist-hub {
    display: grid !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
}

body.clarification-choice.client-view-only .specialist-hub .agent-choice-layer {
    display: grid !important;
}

body.clarification-choice.client-view-only .persistent-choice-layer,
body.clarification-choice.client-view-only .output-console {
    display: none !important;
}

body.clarification-choice .agent-choice-layer > .agent-choice-card[hidden] {
    display: none !important;
}

@media (max-width: 820px) {
    body.clarification-choice.client-view-only .experience-shell {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto auto !important;
    }

    body.clarification-choice.client-view-only .landing-container,
    body.clarification-choice.client-view-only .specialist-hub {
        grid-column: 1 !important;
        width: min(100%, 430px) !important;
        margin-inline: auto !important;
    }

    body.clarification-choice.client-view-only .specialist-hub {
        grid-row: 2 !important;
    }
}

/* Final choice-layer lock: hidden GUI chips stay hidden, regardless of older visual overrides. */
.specialist-hub[aria-hidden="true"] {
    display: none !important;
}

.output-console[aria-hidden="true"] {
    display: none !important;
}

.agent-choice-card[hidden],
.persistent-choice-layer .agent-choice-card[hidden],
.specialist-hub .agent-choice-layer .agent-choice-card[hidden] {
    display: none !important;
}

body.client-view-only:not(.clarification-choice) .specialist-hub .agent-choice-layer {
    display: none !important;
}

body.client-view-only:not(.clarification-choice) .persistent-choice-layer {
    display: none !important;
}

body.client-view-only:not(.clarification-choice) .experience-shell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    justify-items: center !important;
    align-items: start !important;
    gap: clamp(14px, 2vh, 24px) !important;
}

body.client-view-only:not(.clarification-choice) .landing-container {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: min(100%, 760px) !important;
    margin-inline: auto !important;
    justify-self: center !important;
}

body.client-view-only:not(.clarification-choice) .output-console {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: min(100%, 980px) !important;
    justify-self: center !important;
}

/* Clarification scrollbar polish: let the document scroll, not nested panels. */
body.clarification-choice .specialist-hub,
body.clarification-choice .agent-choice-layer,
body.clarification-choice .tier0-clarifier-panel {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

body.clarification-choice .specialist-hub {
    max-height: none !important;
}

body.clarification-choice .specialist-hub::before,
body.clarification-choice .specialist-hub::after {
    content: none !important;
    display: none !important;
}

body.clarification-choice .agent-choice-layer {
    min-width: 0 !important;
}

body.clarification-choice .tier0-clarifier-panel {
    margin-inline: 0 !important;
    max-height: none !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
}

@media (max-width: 720px) {
    body.clarification-choice .tier0-clarifier-panel {
        max-height: none !important;
        padding-bottom: 14px !important;
    }
}

/* Runtime input guard: while L.E.G.A.S.Y. is executing, the query chip must not reappear on mobile focus/resize. */
body.pipeline-executing .strategic-input-container,
body[data-run-state="running"] .strategic-input-container,
.strategic-input-container.runtime-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#client-view,
.sintesis-tier-layer {
    scroll-margin-top: clamp(14px, 4vh, 36px);
}

#client-view:focus-visible {
    outline: 2px solid rgba(105, 196, 188, 0.72);
    outline-offset: 4px;
}

/* Mobile S.I.N.T.E.S.I.S. delivery lock: on phones, the result owns the viewport. */
@media (max-width: 820px) {
    body.post-output-choice.choice-sintesis-active.sintesis-output-focus .experience-shell,
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .experience-shell,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .experience-shell {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto auto !important;
        gap: 10px !important;
        align-items: start !important;
        justify-items: stretch !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding-inline: 0 !important;
        overflow-x: clip !important;
    }

    body.post-output-choice.choice-sintesis-active.sintesis-output-focus .persistent-choice-layer,
    body.post-output-choice.choice-sintesis-active.sintesis-output-focus .specialist-hub,
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .persistent-choice-layer,
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .specialist-hub,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .persistent-choice-layer,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .specialist-hub {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    body.post-output-choice.choice-sintesis-active.sintesis-output-focus .landing-container,
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .landing-container,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .landing-container {
        grid-column: 1 !important;
        grid-row: 1 !important;
        width: min(100%, 560px) !important;
        min-height: 0 !important;
        margin-inline: auto !important;
        box-sizing: border-box !important;
    }

    body.post-output-choice.choice-sintesis-active.sintesis-output-focus .output-console,
    body.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .output-console,
    body.client-view-only.post-output-choice.choice-sintesis-active.agent-dashboard-docked.sintesis-output-focus .output-console {
        grid-column: 1 !important;
        grid-row: 2 !important;
        display: grid !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-height: min(78dvh, 760px) !important;
        margin: 0 !important;
        border-inline: 0 !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
        overflow-x: clip !important;
        scroll-margin-top: 8px !important;
    }

    .output-console .matrix-tab-bar {
        position: sticky !important;
        top: 0 !important;
        z-index: 12 !important;
        display: flex !important;
        gap: 6px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 6px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        background: rgba(2, 12, 18, 0.96) !important;
        border-inline: 0 !important;
    }

    .output-console .matrix-tab-bar::-webkit-scrollbar {
        display: none !important;
    }

    .output-console .matrix-tab {
        flex: 0 0 auto !important;
        min-width: 118px !important;
        max-width: 146px !important;
        min-height: 34px !important;
        padding: 7px 10px !important;
        font-size: 0.58rem !important;
        line-height: 1.08 !important;
        white-space: normal !important;
        letter-spacing: 0.02em !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        border-color: rgba(105, 196, 188, 0.2) !important;
    }

    .output-console .matrix-tab.active {
        color: #f9d775 !important;
        border-color: rgba(214, 184, 111, 0.62) !important;
        background: rgba(214, 184, 111, 0.08) !important;
        text-shadow: 0 0 8px rgba(214, 184, 111, 0.32) !important;
    }

    .output-console .matrix-content-viewport {
        width: 100% !important;
        max-width: 100vw !important;
        min-height: calc(78dvh - 52px) !important;
        padding: 10px 8px 18px !important;
        margin: 0 !important;
        border-inline: 0 !important;
        box-sizing: border-box !important;
        overflow-x: clip !important;
        overflow-y: visible !important;
    }

    .output-console .matrix-pane,
    .output-console .matrix-pane.pane-active,
    #client-view,
    .sintesis-tier-layer,
    .sintesis-tier-card,
    .client-tier-card {
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: clip !important;
    }

    .sintesis-tier-layer {
        display: grid !important;
        gap: 10px !important;
        align-content: start !important;
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .sintesis-tier-card,
    .client-tier-card,
    .post-result-contact-card,
    .btc-payment-panel {
        width: 100% !important;
        max-width: 100% !important;
        margin-inline: 0 !important;
        border-radius: 6px !important;
        box-sizing: border-box !important;
    }

    .client-tier-card h2,
    .sintesis-tier-card h2 {
        font-size: clamp(1.08rem, 5vw, 1.42rem) !important;
        line-height: 1.12 !important;
        overflow-wrap: anywhere !important;
    }
}
