.tst-aws-notice {
    padding: 18px 20px;
    border: 1px solid #2A3A4F;
    border-radius: 8px;
    background: #111B27;
    color: #C3CEDA;
}

.tst-aws-showcase {
    --tst-stage-height: 100vh;
    --tst-stage-height: 100svh;
    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: #0B121B;
    color: #C3CEDA;
    isolation: isolate;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.tst-aws-showcase, .tst-aws-showcase * { box-sizing: border-box; }

.tst-aws-stage {
    position: sticky;
    top: 0;
    width: 100%;
    height: var(--tst-stage-height);
    margin-bottom: calc(-1 * var(--tst-stage-height));
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(circle at 70% 42%, rgba(228,123,2,.12), transparent 34%),
        linear-gradient(120deg, #0B121B 0%, #0F1722 50%, #111B27 100%);
}

/* Stack the background grid below the transparent canvas and loading message. */
.tst-aws-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

.tst-aws-canvas {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
}

.tst-aws-loader {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #8795A5;
    font: 600 14px/1.4 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    transition: opacity .35s ease;
}

.tst-aws-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.tst-aws-loader span {
    width: 20px;
    height: 20px;
    border: 2px solid #2A3A4F;
    border-top-color: #E47B02;
    border-radius: 50%;
    animation: tstAwsSpin .75s linear infinite;
}
.tst-aws-loader em { font-style: normal; }
@keyframes tstAwsSpin { to { transform: rotate(360deg); } }

.tst-aws-panel {
    position: relative;
    z-index: 2;
    min-height: 110vh;
    min-height: 110svh;
    display: flex;
    align-items: center;
    padding: 10vh max(24px, calc((100vw - 1200px) / 2));
    pointer-events: none;
}

.tst-aws-panel--long { min-height: 175vh; }
@supports (height: 1svh) { .tst-aws-panel--long { min-height: 175svh; } }

.tst-aws-copy {
    width: min(510px, 44vw);
    padding: 28px 30px;
    border: 1px solid rgba(42,58,79,.92);
    border-radius: 12px;
    background: rgba(15,23,34,.80);
    box-shadow: 0 22px 60px rgba(0,0,0,.20);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    pointer-events: auto;
}

.tst-aws-copy--right { margin-left: auto; }

/* Integration has its own copy row and an independent software panel on the
   left. The persistent 3D canvas occupies the right half of the second row. */
.tst-aws-panel--integration {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: center;
    align-items: center;
    gap: 32px 48px;
    overflow: clip;
    perspective: 1200px;
}
.tst-aws-copy--center {
    grid-column: 1 / -1;
    width: min(760px, 100%);
    margin: 0 auto;
    text-align: center;
}

.tst-aws-kicker {
    margin-bottom: 10px;
    color: #F4B05A;
    font: 700 13px/1.2 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.tst-aws-copy h2 {
    margin: 0 0 16px;
    color: #F3F6FA;
    font: 700 clamp(32px, 4vw, 54px)/1.06 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    letter-spacing: -.03em;
}

.tst-aws-copy p {
    margin: 0;
    color: #C3CEDA;
    font: 400 clamp(16px, 1.6vw, 19px)/1.65 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.tst-aws-actions { margin-top: 24px; }

.tst-aws-software {
    grid-column: 1;
    width: min(510px, 100%);
    margin: 0;
    padding: 12px;
    border: 1px solid #2A3A4F;
    border-radius: 12px;
    background: rgba(15,23,34,.9);
    box-shadow: 0 22px 60px rgba(0,0,0,.2);
    pointer-events: auto;
}
.tst-aws-software > a {
    display: block;
    overflow: hidden;
    border: 1px solid #2A3A4F;
    border-radius: 6px;
    background: #F3F6FA;
}
.tst-aws-software a:focus-visible { outline: 2px solid #F4B05A; outline-offset: 4px; }
.tst-aws-software img { display: block; width: 100%; height: auto; }
.tst-aws-software figcaption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 16px;
    margin-top: 10px;
    color: #8795A5;
    font-size: 13px;
    line-height: 1.5;
}
.tst-aws-software figcaption a { color: #F4B05A; text-decoration: none; }
.tst-aws-software figcaption a:hover { text-decoration: underline; }

.tst-aws-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border: 1px solid #E47B02;
    border-radius: 6px;
    background: #E47B02;
    color: #0B121B !important;
    font-weight: 700;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none !important;
}
.tst-aws-button:hover { background: #C76800; border-color: #C76800; }
.tst-aws-button:focus-visible { outline: 2px solid #F4B05A; outline-offset: 4px; }

/* Newsletter styling follows the main-page modal, scoped to this plugin. */
.tst-aws-newsletter {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 24px;
    border: 0;
    background: transparent;
    color: #C3CEDA;
    font: 400 16px/1.6 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    box-sizing: border-box;
}
.tst-aws-newsletter:not([open]) { display: none; }
.tst-aws-newsletter[open] { display: flex; align-items: center; justify-content: center; }
.tst-aws-newsletter::backdrop {
    background: rgba(3,8,14,.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.tst-aws-newsletter * { box-sizing: border-box; }
.tst-aws-newsletter-content {
    position: relative;
    width: min(520px, 100%);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 38px;
    border: 1px solid #2A3A4F;
    border-radius: 12px;
    background: radial-gradient(circle at 90% 0%, rgba(228,123,2,.12), transparent 35%), #111B27;
    box-shadow: 0 30px 90px rgba(0,0,0,.55);
}
.tst-aws-newsletter-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #AAB6C3;
    font: 400 30px/1 Arial, sans-serif;
    cursor: pointer;
}
.tst-aws-newsletter-close:hover { color: #FFFFFF; background: transparent; }
.tst-aws-newsletter-eyebrow {
    margin-bottom: 10px;
    color: #F4B05A;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.tst-aws-newsletter-content h2 { margin: 0 0 12px; color: #F3F6FA; font-size: 32px; line-height: 1.15; }
.tst-aws-newsletter-intro { margin: 0 0 24px; color: #C3CEDA; font-size: 16px; line-height: 1.6; }
body.tst-aws-newsletter-open { overflow: hidden; }
.tst-aws-newsletter .tnp, .tst-aws-newsletter form { width: 100%; margin: 0; }
.tst-aws-newsletter .tnp-field { margin-bottom: 16px; }
.tst-aws-newsletter .tnp-field label { display: block; margin: 0 0 7px; color: #DCE4EC; font-size: 14px; font-weight: 600; }
.tst-aws-newsletter input[type="text"], .tst-aws-newsletter input[type="email"] {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid #314258;
    border-radius: 6px;
    background: #0B121B;
    color: #FFFFFF;
    font: inherit;
}
.tst-aws-newsletter input[type="text"]:focus, .tst-aws-newsletter input[type="email"]:focus {
    outline: none;
    border-color: #E47B02;
    box-shadow: 0 0 0 3px rgba(228,123,2,.12);
}
.tst-aws-newsletter .tst-aws-newsletter-privacy label { display: flex; align-items: flex-start; gap: 8px; color: #AAB6C3; font-size: 13px; font-weight: 400; line-height: 1.45; }
.tst-aws-newsletter input[type="checkbox"] { flex: 0 0 auto; width: 17px; height: 17px; margin: 2px 0 0; accent-color: #E47B02; }
.tst-aws-newsletter a { color: #F4B05A; text-decoration: none; }
.tst-aws-newsletter a:hover { text-decoration: underline; }
.tst-aws-newsletter .tst-aws-newsletter-submit { margin-top: 22px; margin-bottom: 0; }
.tst-aws-newsletter input[type="submit"] {
    width: 100%;
    min-height: 50px;
    padding: 0 22px;
    border: 1px solid #E47B02;
    border-radius: 6px;
    background: #E47B02;
    color: #0B121B;
    font: 700 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    cursor: pointer;
}
.tst-aws-newsletter input[type="submit"]:hover { background: #C76800; border-color: #C76800; }
.tst-aws-newsletter-close:focus-visible, .tst-aws-newsletter a:focus-visible, .tst-aws-newsletter input[type="submit"]:focus-visible { outline: 2px solid #F4B05A; outline-offset: 3px; }
.tst-aws-newsletter-smallprint { margin: 18px 0 0; color: #8795A5; font-size: 12px; line-height: 1.5; }

@media (max-width: 640px) {
    .tst-aws-newsletter { padding: 14px; }
    .tst-aws-newsletter-content { max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); padding: 32px 22px 24px; }
    .tst-aws-newsletter-content h2 { font-size: 27px; }
}

@media (max-width: 900px) {
    .tst-aws-stage { top: 0; }
    .tst-aws-panel { min-height: 100svh; padding: 54svh 16px 8vh; align-items: flex-end; }
    .tst-aws-panel--long { min-height: 145svh; }
    .tst-aws-copy, .tst-aws-copy--right { width: 100%; max-width: 620px; margin: 0 auto; }
    .tst-aws-panel--integration {
        min-height: 110svh;
        padding: 8svh 16px;
        gap: 24px 16px;
        align-items: center;
    }
    .tst-aws-copy--center { max-width: 760px; padding: 24px 20px; }
    .tst-aws-software { padding: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .tst-aws-stage { position: relative; height: 70vh; margin-bottom: 0; }
    .tst-aws-panel, .tst-aws-panel--long { min-height: auto; padding-top: 40px; padding-bottom: 40px; }
    .tst-aws-loader { transition: none; }
    .tst-aws-loader span { animation: none; }
    .tst-aws-panel--integration { display: flex; flex-direction: column; gap: 24px; overflow: visible; }
    .tst-aws-software { width: min(620px, 100%); margin: 0 auto; }
}
