/* ========================================
   Hero product demo (scripts/hero-demo.js)
   Fixed-size stage scaled to the container, so the demo
   renders like a video at every width.
   ======================================== */

.hero-preview--demo {
    width: min(94vw, 1240px);
}

.tr-demo {
    position: relative;
    width: 100%;
    --trd-purple: #6b4fbb;
    --trd-purple-hi: #9b7ef0;
}

.tr-demo::before {
    content: '';
    position: absolute;
    inset: 8% 4% -4%;
    background:
        radial-gradient(45% 55% at 30% 40%, rgba(107, 79, 187, 0.22), transparent 70%),
        radial-gradient(40% 50% at 75% 60%, rgba(59, 130, 246, 0.18), transparent 70%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}

.tr-demo-fallback {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    border: 1px solid var(--landing-border, #e4e4e7);
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.12), 0 10px 20px rgba(0, 0, 0, 0.06);
}

.tr-demo-viewport {
    position: relative;
    z-index: 1;
    width: 100%;
    overflow: hidden;
    border-radius: 14px;
    background: #0e0e11;
    box-shadow:
        0 0 0 1px rgba(15, 15, 20, 0.08),
        0 2px 4px rgba(15, 15, 20, 0.04),
        0 24px 48px -12px rgba(30, 20, 70, 0.28),
        0 48px 96px -24px rgba(15, 15, 20, 0.22);
}

.tr-demo-stage {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    overflow: hidden;
    background: #0e0e11;
    color: #ececef;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    user-select: none;
    pointer-events: none;
    -webkit-font-smoothing: antialiased;
}

.tr-demo-stage *,
.tr-demo-stage *::before,
.tr-demo-stage *::after {
    box-sizing: border-box;
}

.tr-demo-stage code,
.tr-demo-stage pre {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- Browser chrome ---------- */

.trd-chrome {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 14px;
    background: #1b1b20;
    border-bottom: 1px solid #2a2a31;
}

.trd-lights {
    display: flex;
    gap: 7px;
}

.trd-lights span {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ff5f57;
}

.trd-lights span:nth-child(2) { background: #febc2e; }
.trd-lights span:nth-child(3) { background: #28c840; }

.trd-nav-btns {
    display: flex;
    gap: 12px;
    color: #6f6f78;
    font-size: 12px;
}

.trd-url {
    flex: 1;
    max-width: 620px;
    margin: 0 auto;
    height: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-radius: 8px;
    background: #111114;
    border: 1px solid #2a2a31;
    color: #a4a3a8;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
}

.trd-url i { font-size: 10px; color: #6f6f78; }
.trd-url b { color: #ececef; font-weight: 500; }

.trd-chrome-ext {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trd-ext-icon {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    background: rgba(107, 79, 187, 0.22);
    box-shadow: inset 0 0 0 1px rgba(155, 126, 240, 0.45);
}

.trd-ext-icon img {
    width: 16px;
    height: 16px;
    display: block;
}

.trd-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

/* ---------- Page body ---------- */

.trd-body {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    overflow: hidden;
}

/* ---------- GitLab mock ---------- */

.trd-gl {
    flex: 1;
    min-width: 0;
    display: flex;
    background: #1f1e24;
}

.trd-gl-side {
    width: 208px;
    flex-shrink: 0;
    padding: 12px 10px;
    background: #18171d;
    border-right: 1px solid #2e2d34;
    color: #bfbfc3;
    font-size: 12.5px;
}

.trd-gl-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 0 6px;
}

.trd-gl-brand i { color: #fc6d26; font-size: 18px; }

.trd-gl-search {
    flex: 1;
    height: 26px;
    border-radius: 6px;
    background: #28272d;
    border: 1px solid #3a383f;
    color: #89888d;
    font-size: 11.5px;
    display: flex;
    align-items: center;
    padding: 0 8px;
}

.trd-gl-project {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    margin-bottom: 8px;
    color: #ececef;
    font-weight: 600;
}

.trd-gl-project span {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    display: grid;
    place-items: center;
    background: #4f3aa0;
    color: #fff;
    font-size: 11px;
}

.trd-gl-side ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.trd-gl-side li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    border-radius: 6px;
}

.trd-gl-side li.is-sub { padding-left: 22px; }

.trd-gl-side li.is-active {
    background: #2f2e36;
    color: #fff;
    font-weight: 600;
}

.trd-gl-side li em {
    font-style: normal;
    font-size: 11px;
    padding: 0 6px;
    border-radius: 999px;
    background: #3a383f;
    color: #cfcfd3;
}

.trd-gl-main {
    flex: 1;
    min-width: 0;
    padding: 18px 28px 40px;
    overflow: hidden;
}

.trd-gl-crumbs {
    color: #89888d;
    font-size: 12px;
    margin-bottom: 10px;
}

.trd-gl-title {
    margin: 0 0 10px;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    letter-spacing: -0.01em;
}

.trd-gl-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: #a4a3a8;
    font-size: 12.5px;
    margin-bottom: 16px;
}

.trd-gl-open {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 1px 8px;
    border-radius: 999px;
    background: rgba(45, 164, 78, 0.18);
    color: #52c07a;
    font-weight: 600;
}

.trd-gl-branch {
    padding: 0 6px;
    border-radius: 4px;
    background: rgba(66, 139, 202, 0.18);
    color: #8fbcf0;
    font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
    font-size: 11.5px;
}

.trd-gl-tabs {
    display: flex;
    gap: 22px;
    border-bottom: 1px solid #3a383f;
    margin-bottom: 16px;
    font-size: 13px;
    color: #a4a3a8;
}

.trd-gl-tabs span {
    padding: 8px 0;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.trd-gl-tabs span.is-active {
    color: #fff;
    font-weight: 600;
    box-shadow: inset 0 -2px 0 #fc6d26;
}

.trd-gl-tabs em {
    font-style: normal;
    font-size: 11px;
    padding: 0 6px;
    border-radius: 999px;
    background: #3a383f;
}

.trd-gl-desc {
    color: #cfcfd3;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.trd-gl-desc p { margin: 0 0 8px; }

.trd-gl-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #3a383f;
    border-radius: 8px;
    background: #28272d;
    margin-bottom: 10px;
    font-size: 12.5px;
    color: #cfcfd3;
}

.trd-gl-card small {
    display: block;
    color: #89888d;
    font-size: 11.5px;
}

.trd-gl-card .fa-circle-check { color: #52c07a; font-size: 16px; }
.trd-gl-card .fa-user-check { color: #a4a3a8; }

.trd-gl-card .trd-gl-btn {
    margin-left: auto;
    padding: 4px 12px;
    border-radius: 6px;
    background: #1f75cb;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
}

.trd-gl-activity h4 {
    margin: 18px 0 10px;
    font-size: 14px;
    color: #fff;
}

.trd-gl-event {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 6px 0;
    color: #a4a3a8;
    font-size: 12.5px;
}

.trd-gl-event b { color: #ececef; font-weight: 600; }

.trd-gl-event-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #2f2e36;
    color: #a4a3a8;
    font-size: 10px;
    flex-shrink: 0;
}

.trd-gl-note {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.trd-gl-note.is-in {
    opacity: 1;
    transform: none;
}

.trd-gl-note .trd-avatar { flex-shrink: 0; width: 28px; height: 28px; }

.trd-gl-note-body {
    flex: 1;
    border: 1px solid #3a383f;
    border-radius: 8px;
    background: #28272d;
    overflow: hidden;
    box-shadow: 0 0 0 0 rgba(155, 126, 240, 0);
    animation: none;
}

.trd-gl-note.is-in .trd-gl-note-body {
    animation: trdNoteGlow 2.2s ease 0.2s;
}

.trd-gl-note-head {
    padding: 8px 12px;
    border-bottom: 1px solid #3a383f;
    font-size: 12px;
    color: #a4a3a8;
}

.trd-gl-note-head b { color: #fff; }

.trd-gl-note-text {
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.55;
    color: #dcdce0;
}

.trd-gl-note-text p { margin: 0 0 6px; }
.trd-gl-note-text p:last-child { margin: 0; }

@keyframes trdNoteGlow {
    0% { box-shadow: 0 0 0 0 rgba(155, 126, 240, 0); border-color: #3a383f; }
    25% { box-shadow: 0 0 0 4px rgba(155, 126, 240, 0.25); border-color: #9b7ef0; }
    100% { box-shadow: 0 0 0 0 rgba(155, 126, 240, 0); border-color: #3a383f; }
}

/* ---------- ThinkReview panel ---------- */

.trd-panel {
    position: relative;
    width: 500px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #1c1c1f;
    border-left: 1px solid #34343a;
    box-shadow: -18px 0 40px rgba(0, 0, 0, 0.35);
    transition: margin-right 0.65s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.trd-panel.is-hidden {
    margin-right: -500px;
    opacity: 0.4;
}

.trd-p-head {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 60px;
    padding: 0 14px;
    background: var(--trd-purple);
    color: #fff;
    flex-shrink: 0;
}

.trd-p-logo {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    display: grid;
    place-items: center;
}

.trd-p-logo img { width: 20px; height: 20px; display: block; }

.trd-p-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.trd-p-brand strong { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.trd-p-brand strong small { font-size: 10px; font-weight: 500; opacity: 0.7; margin-left: 4px; }

.trd-p-pro {
    margin-top: 3px;
    align-self: flex-start;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.22);
}

.trd-p-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.trd-p-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: 12px;
    color: #fff;
}

.trd-p-icon--box { border: 1px solid rgba(255, 255, 255, 0.35); font-size: 10px; }

.trd-p-lang {
    height: 26px;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    padding: 0 8px;
    border-radius: 6px;
    background: #fff;
    color: #1c1c1f;
    font-size: 11.5px;
    font-weight: 500;
}

.trd-p-lang i { font-size: 9px; opacity: 0.6; }

.trd-p-format {
    height: 26px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 9px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 11.5px;
    font-weight: 600;
    transition: background 0.15s ease;
}

.trd-p-format.is-pressed,
.trd-p-format.is-open { background: rgba(255, 255, 255, 0.18); }

.trd-p-dropdown {
    position: absolute;
    top: 54px;
    right: 44px;
    width: 220px;
    padding: 6px;
    border-radius: 10px;
    background: #26262b;
    border: 1px solid #3a3a42;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    z-index: 5;
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.trd-p-dropdown.is-open {
    opacity: 1;
    transform: none;
}

.trd-p-dropdown-label {
    padding: 6px 8px 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8b8b94;
}

.trd-p-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 7px;
    color: #e0e0e4;
    font-size: 12.5px;
}

.trd-p-option small { display: block; color: #8b8b94; font-size: 11px; }
.trd-p-option > i:first-child { width: 16px; text-align: center; color: var(--trd-purple-hi); }
.trd-p-option .fa-check { margin-left: auto; color: var(--trd-purple-hi); font-size: 11px; }
.trd-p-option.is-hover,
.trd-p-option.is-pressed { background: rgba(155, 126, 240, 0.16); }

.trd-p-tabs {
    display: flex;
    gap: 18px;
    padding: 0 16px;
    height: 38px;
    align-items: stretch;
    border-bottom: 1px solid #2c2c32;
    font-size: 12px;
    color: #8b8b94;
    flex-shrink: 0;
}

.trd-p-tabs span { display: flex; align-items: center; }

.trd-p-tabs span.is-active {
    color: #fff;
    font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--trd-purple-hi);
}

.trd-p-body {
    position: relative;
    flex: 1;
    overflow: hidden;
    padding: 14px 16px 24px;
    scrollbar-width: none;
    transition: opacity 0.22s ease;
}

.trd-p-body.is-swapping { opacity: 0; }

.trd-p-foot {
    flex-shrink: 0;
    padding: 10px 14px 14px;
    border-top: 1px solid #2c2c32;
    background: #1c1c1f;
}

.trd-p-input {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 6px 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(155, 126, 240, 0.45);
    background: #232327;
    color: #6f6f78;
    font-size: 12.5px;
}

.trd-p-input span:first-child { flex: 1; }
.trd-p-input small { font-size: 10.5px; color: #6f6f78; }

.trd-p-send {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--trd-purple);
    color: #fff;
    font-size: 12px;
}

/* ---------- Loader ---------- */

.trd-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 56px 12px 0;
}

.trd-loader-dots {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.trd-loader-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--trd-purple-hi);
    animation: trdBounce 1.1s ease-in-out infinite;
}

.trd-loader-dots span:nth-child(2) { animation-delay: 0.15s; }
.trd-loader-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes trdBounce {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(-8px); opacity: 1; }
}

.trd-loader h4 {
    margin: 0 0 22px;
    font-size: 16px;
    font-weight: 600;
    color: #b9a5ff;
}

.trd-loader-stages {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trd-stage {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #2f2f36;
    background: #222226;
    opacity: 0.55;
    transition: border-color 0.3s ease, background 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}

.trd-stage-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #2f2f36;
    color: #8b8b94;
    font-size: 12px;
    flex-shrink: 0;
}

.trd-stage b { display: block; font-size: 13px; color: #fff; font-weight: 600; }
.trd-stage small { color: #9a9aa2; font-size: 11.5px; }

.trd-stage.is-active {
    opacity: 1;
    border-color: rgba(155, 126, 240, 0.7);
    background: rgba(107, 79, 187, 0.16);
    box-shadow: 0 0 0 3px rgba(155, 126, 240, 0.12);
}

.trd-stage.is-active .trd-stage-icon {
    background: var(--trd-purple);
    color: #fff;
}

.trd-stage.is-active .trd-stage-icon i { animation: trdSpin 1s linear infinite; }

.trd-stage.is-done {
    opacity: 1;
    border-color: rgba(74, 222, 128, 0.45);
    background: rgba(34, 197, 94, 0.1);
}

.trd-stage.is-done .trd-stage-icon {
    background: #22c55e;
    color: #0b2415;
}

@keyframes trdSpin { to { transform: rotate(360deg); } }

.trd-loader-bar {
    width: 100%;
    max-width: 380px;
    height: 4px;
    margin: 22px 0 12px;
    border-radius: 4px;
    background: #2a2a30;
    overflow: hidden;
}

.trd-loader-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--trd-purple), var(--trd-purple-hi));
    transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.trd-loader p {
    max-width: 330px;
    margin: 0;
    text-align: center;
    font-size: 11.5px;
    color: #8b8b94;
}

/* ---------- Review content ---------- */

.trd-reveal {
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.trd-reveal.is-pending {
    opacity: 0;
    transform: translateY(10px);
}

.trd-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #232327;
    border: 1px solid #2f2f36;
    font-size: 11px;
    color: #a4a4ac;
    margin-bottom: 14px;
}

.trd-meta b { color: #e0e0e4; font-weight: 600; }

.trd-meta-cached {
    padding: 0 6px;
    border-radius: 4px;
    background: rgba(34, 197, 94, 0.14);
    color: #4ade80;
    font-weight: 600;
}

.trd-meta-btn {
    margin-left: auto;
    padding: 3px 8px;
    border-radius: 5px;
    border: 1px solid #3a3a42;
    color: #d0d0d6;
    font-weight: 600;
}

.trd-h {
    margin: 0 0 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
}

.trd-text {
    margin: 0 0 16px;
    color: #c4c4ca;
    font-size: 12.5px;
    line-height: 1.6;
}

.tr-demo-stage code {
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(107, 79, 187, 0.26);
    color: #cdbcff;
    font-size: 11px;
}

.trd-group {
    border: 1px solid #2f2f36;
    border-left: 3px solid var(--sev);
    border-radius: 10px;
    background: #212125;
    margin-bottom: 12px;
    overflow: hidden;
}

.trd-group--critical { --sev: #f04438; }
.trd-group--high { --sev: #f79009; }
.trd-group--low { --sev: #60a5fa; }

.trd-group-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.trd-group-head::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sev);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--sev) 22%, transparent);
}

.trd-group-head i { margin-left: auto; font-size: 10px; color: #8b8b94; }

.trd-item {
    position: relative;
    margin: 0 8px 8px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #1a1a1d;
    border: 1px solid transparent;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.trd-item b {
    display: block;
    margin-bottom: 5px;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
}

.trd-item .trd-file {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 10.5px;
    background: rgba(255, 255, 255, 0.06);
    color: #b4b4bc;
}

.trd-item p {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    color: #b4b4bc;
}

.trd-item-ask {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--trd-purple);
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.trd-item.is-hover {
    background: #26262b;
    border-color: rgba(155, 126, 240, 0.45);
}

.trd-item.is-hover .trd-item-ask {
    opacity: 1;
    transform: none;
}

.trd-item.is-pressed,
.trd-q.is-pressed,
.trd-post-btn.is-pressed,
.trd-modal-btn.is-pressed,
.trd-p-option.is-pressed {
    transform: scale(0.98);
}

/* ---------- Suggested questions ---------- */

.trd-qs {
    margin-top: 16px;
}

.trd-q {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 12px;
    margin-bottom: 7px;
    border-radius: 8px;
    border: 1px solid #34343b;
    background: #232327;
    color: #d8d8de;
    font-size: 12px;
    line-height: 1.45;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.trd-q i { margin-top: 2px; color: var(--trd-purple-hi); font-size: 11px; }

.trd-q--comment {
    border-color: rgba(247, 144, 9, 0.5);
    background: rgba(247, 144, 9, 0.1);
    color: #fcd9a8;
}

.trd-q--comment i { color: #f79009; }

.trd-q.is-hover {
    border-color: rgba(155, 126, 240, 0.6);
    background: rgba(107, 79, 187, 0.16);
}

.trd-q--comment.is-hover {
    border-color: #f79009;
    background: rgba(247, 144, 9, 0.18);
}

/* ---------- Chat ---------- */

.trd-chat {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trd-msg {
    max-width: 92%;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 12.5px;
    line-height: 1.6;
    animation: trdMsgIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes trdMsgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.trd-msg--user {
    align-self: flex-start;
    background: var(--trd-purple);
    color: #fff;
    border-bottom-left-radius: 4px;
}

.trd-msg--user code {
    background: rgba(0, 0, 0, 0.22);
    color: #fff;
}

.trd-msg--ai {
    max-width: 100%;
    background: #26262b;
    border: 1px solid #303037;
    color: #d4d4da;
}

.trd-msg--ai p { margin: 0 0 8px; }
.trd-msg--ai p:last-child { margin-bottom: 0; }
.trd-msg--ai strong { color: #fff; }

.trd-msg--ai ul {
    margin: 0 0 8px;
    padding-left: 18px;
}

.trd-msg--ai li { margin-bottom: 3px; }

.trd-code {
    margin: 4px 0 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #141416;
    border: 1px solid #2c2c32;
    font-size: 11px;
    line-height: 1.6;
    color: #d4d4da;
    white-space: pre;
    animation: trdMsgIn 0.3s ease;
}

.tr-demo-stage .trd-code code {
    padding: 0;
    background: none;
    color: inherit;
    font-size: inherit;
}

.trd-code .k { color: #c792ea; }
.trd-code .f { color: #82aaff; }
.trd-code .s { color: #c3e88d; }
.trd-code .c { color: #676e95; }

.trd-thinking {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 999px;
    background: #26262b;
    border: 1px solid #303037;
    color: #b4b4bc;
    font-size: 12px;
    animation: trdMsgIn 0.3s ease;
}

.trd-thinking-dots {
    display: inline-flex;
    gap: 4px;
}

.trd-thinking-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--trd-purple-hi);
    animation: trdBounce 1s ease-in-out infinite;
}

.trd-thinking-dots span:nth-child(2) { animation-delay: 0.12s; }
.trd-thinking-dots span:nth-child(3) { animation-delay: 0.24s; }

.trd-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.35);
    color: #a7f3c4;
    font-size: 11.5px;
    animation: trdMsgIn 0.3s ease;
}

.trd-banner i { color: #4ade80; }

.trd-msg-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: -4px;
    padding-left: 4px;
    color: #7c7c85;
    font-size: 11.5px;
    animation: trdMsgIn 0.3s ease;
}

.trd-post-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 7px;
    border: 1px solid #3a3a42;
    background: #232327;
    color: #e0e0e4;
    font-weight: 600;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.trd-post-btn.is-hover {
    border-color: rgba(155, 126, 240, 0.6);
    background: rgba(107, 79, 187, 0.2);
}

.trd-post-btn.is-posted {
    border-color: rgba(74, 222, 128, 0.5);
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
}

.trd-draft {
    margin: 6px 0 2px;
    padding: 10px 12px;
    border-left: 3px solid var(--trd-purple-hi);
    border-radius: 0 8px 8px 0;
    background: #1d1d21;
    color: #e0e0e4;
}

.trd-draft p { margin: 0 0 6px; }

/* ---------- Post modal ---------- */

.trd-modal {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(8, 8, 12, 0.6);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.trd-modal.is-open { opacity: 1; }

.trd-modal-card {
    width: 100%;
    max-width: 380px;
    padding: 18px;
    border-radius: 12px;
    background: #1a1628;
    border: 1px solid #3d2d6e;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    transform: translateY(8px) scale(0.98);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.trd-modal.is-open .trd-modal-card { transform: none; }

.trd-modal-card h3 {
    margin: 0 0 12px;
    font-size: 15px;
    color: #fff;
}

.trd-modal-flow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 11.5px;
    color: #d0d0d6;
}

.trd-modal-flow span {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.trd-modal-flow i { color: var(--trd-purple-hi); }

.trd-modal-card p {
    margin: 0 0 16px;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
}

.trd-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.trd-modal-btn {
    padding: 7px 14px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.85);
    transition: background 0.15s ease, transform 0.12s ease;
}

.trd-modal-btn--primary {
    background: var(--trd-purple);
    border-color: var(--trd-purple);
    color: #fff;
}

.trd-modal-btn--primary.is-hover { background: #7d61d0; }

/* ---------- Scorecard ---------- */

.trd-score {
    padding: 14px;
    border-radius: 12px;
    background: #212125;
    border: 1px solid #2f2f36;
    margin-bottom: 14px;
}

.trd-score-main {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: 6px;
}

.trd-ring {
    position: relative;
    width: 128px;
    height: 128px;
    flex-shrink: 0;
}

.trd-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.trd-ring circle {
    fill: none;
    stroke-width: 9;
}

.trd-ring .bg { stroke: #2f2f36; }

.trd-ring .fg {
    stroke: #22c55e;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    filter: drop-shadow(0 0 6px rgba(34, 197, 94, 0.45));
    transition: stroke-dashoffset 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.trd-ring-val {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.trd-ring-val span {
    font-size: 34px;
    font-weight: 800;
    color: #4ade80;
    line-height: 1;
    letter-spacing: -0.02em;
}

.trd-ring-val small {
    margin-top: 4px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8b8b94;
}

.trd-metrics {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.trd-metric div:first-child {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    font-weight: 600;
    color: #e0e0e4;
    margin-bottom: 6px;
}

.trd-metric div:first-child span:last-child { color: var(--c); }

.trd-metric-track {
    height: 6px;
    border-radius: 6px;
    background: #2f2f36;
    overflow: hidden;
}

.trd-metric-track span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 6px;
    background: var(--c);
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.trd-find-list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
}

.trd-find-list li {
    position: relative;
    padding: 4px 0 4px 16px;
    font-size: 12px;
    color: #c4c4ca;
    line-height: 1.6;
}

.trd-find-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dot, #f79009);
}

/* ---------- Overlays: spotlight, tour card, cursor, toast ---------- */

.trd-spot {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 20;
    border-radius: 10px;
    box-shadow:
        0 0 0 2px var(--trd-purple-hi),
        0 0 0 6px rgba(155, 126, 240, 0.28),
        0 0 0 9999px rgba(8, 6, 18, 0.5);
    opacity: 0;
    transition: opacity 0.35s ease, top 0.35s ease, left 0.35s ease, width 0.35s ease, height 0.35s ease;
}

.trd-spot.is-visible { opacity: 1; }

.trd-tour {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 21;
    width: 300px;
    padding: 16px 16px 14px;
    border-radius: 12px;
    background: #1a1628;
    border: 1px solid #3d2d6e;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 2px 10px rgba(0, 0, 0, 0.35);
    color: #fff;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.trd-tour.is-visible {
    opacity: 1;
    transform: none;
}

.trd-tour::after {
    content: '';
    position: absolute;
    top: var(--arrow-y, 50%);
    right: -7px;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    background: #1a1628;
    border-top: 1px solid #3d2d6e;
    border-right: 1px solid #3d2d6e;
    transform: rotate(45deg);
}

.trd-tour-eyebrow {
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(155, 126, 240, 0.9);
}

.trd-tour h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.trd-tour p {
    margin: 0 0 14px;
    font-size: 12.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
}

.trd-tour-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.trd-tour-dots {
    display: flex;
    gap: 5px;
}

.trd-tour-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}

.trd-tour-dots span.is-done { background: rgba(155, 126, 240, 0.55); }
.trd-tour-dots span.is-active { background: var(--trd-purple-hi); transform: scale(1.2); }

.trd-tour-next {
    padding: 6px 12px;
    border-radius: 7px;
    background: var(--trd-purple);
    font-size: 11.5px;
    font-weight: 600;
}

.trd-cursor {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 30;
    width: 22px;
    height: 22px;
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.45, 0, 0.2, 1), opacity 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.trd-cursor.is-visible { opacity: 1; }

.trd-cursor svg {
    display: block;
    width: 100%;
    height: 100%;
    transition: transform 0.12s ease;
    transform-origin: 20% 10%;
}

.trd-cursor.is-down svg { transform: scale(0.86); }

.trd-ripple {
    position: absolute;
    z-index: 29;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border-radius: 50%;
    border: 2px solid var(--trd-purple-hi);
    animation: trdRipple 0.55s ease-out forwards;
}

@keyframes trdRipple {
    from { transform: scale(0.3); opacity: 0.9; }
    to { transform: scale(1.4); opacity: 0; }
}

.trd-toast {
    position: absolute;
    top: 64px;
    left: 50%;
    z-index: 25;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 10px;
    background: #fff;
    color: #111;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translate(-50%, -8px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.trd-toast i { color: #16a34a; }

.trd-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------- Compact (mobile) stage ---------- */

.tr-demo.is-compact .trd-gl,
.tr-demo.is-compact .trd-nav-btns,
.tr-demo.is-compact .trd-avatar,
.tr-demo.is-compact .trd-tour {
    display: none;
}

.tr-demo.is-compact .trd-chrome { gap: 10px; }
.tr-demo.is-compact .trd-url { margin: 0; }

.tr-demo.is-compact .trd-panel {
    width: 100%;
    border-left: 0;
    box-shadow: none;
}

.tr-demo.is-compact .trd-panel.is-hidden {
    margin-right: 0;
    opacity: 1;
}

.tr-demo.is-compact .trd-p-lang { gap: 8px; }
.tr-demo.is-compact .trd-p-icon--box { display: none; }

/* ---------- Chapter navigation ---------- */

.tr-demo-nav {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: stretch;
    gap: 6px;
    margin-top: 18px;
}

.tr-demo-chapters {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tr-demo-chapter {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 10px 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    color: var(--landing-muted, #71717a);
    transition: background 0.2s ease, color 0.2s ease;
}

.tr-demo-chapter:hover {
    background: rgba(0, 0, 0, 0.035);
    color: var(--landing-text, #000);
}

.tr-demo-chapter:focus:not(:focus-visible),
.tr-demo-toggle:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

.tr-demo-chapter:focus-visible,
.tr-demo-toggle:focus-visible {
    outline: 2px solid var(--landing-accent, #3b82f6);
    outline-offset: 2px;
}

.tr-demo-chapter[aria-current='step'] {
    color: var(--landing-text, #000);
}

.tr-demo-track {
    height: 3px;
    border-radius: 3px;
    background: var(--landing-border, #e4e4e7);
    overflow: hidden;
}

.tr-demo-track span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 3px;
    background: linear-gradient(90deg, #6b4fbb, var(--landing-accent, #3b82f6));
}

.tr-demo-chapter.is-done .tr-demo-track span { width: 100%; opacity: 0.35; }

.tr-demo-chapter-label {
    display: flex;
    align-items: baseline;
    gap: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
}

.tr-demo-chapter-label em {
    font-style: normal;
    font-size: 0.7rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    opacity: 0.55;
}

.tr-demo-toggle {
    flex-shrink: 0;
    align-self: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--landing-border, #e4e4e7);
    background: var(--bg-page, #fff);
    color: var(--landing-text, #000);
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tr-demo-toggle:hover {
    border-color: var(--landing-muted, #71717a);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tr-demo-caption {
    display: none;
    position: relative;
    z-index: 1;
    margin: 12px 4px 0;
    text-align: left;
}

.tr-demo-caption strong {
    display: block;
    font-size: 0.95rem;
    color: var(--landing-text, #000);
    margin-bottom: 2px;
}

.tr-demo-caption span {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--landing-muted, #71717a);
}

.tr-demo.is-compact .tr-demo-caption { display: block; }

.tr-demo.is-compact .tr-demo-chapters {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
}

.tr-demo.is-compact .tr-demo-chapter {
    padding: 8px 2px;
}

.tr-demo.is-compact .tr-demo-chapter-label { display: none; }

.sr-only-demo {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 900px) {
    .hero-preview--demo {
        width: calc(100vw - 1.5rem);
    }

    .tr-demo-viewport {
        border-radius: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tr-demo-stage *,
    .tr-demo-stage *::before,
    .tr-demo-stage *::after {
        animation-duration: 0.001s !important;
        animation-iteration-count: 1 !important;
    }
}
