/**
 * Speed to Science — /speed-to-science/
 *
 * Styling follows the gt_one design system: colours, type scale and radii come
 * from the theme variables in blocks/css/block.css (html{}). Form controls and
 * buttons reuse the visual language of the /lab/* flow pages (49px inputs on
 * --gray-bg, 55px buttons, --radius corners).
 *
 * 2026-09-21 · plugin gt-speed-to-science
 */

/* ------------------------------------------------------------------ layout */

.gt-sts {
    width: 100%;
}

.gt-sts-wrap {
    max-width: 1728px;
    margin: 0 auto;
    padding-left: var(--distance);
    padding-right: var(--distance);
}

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

.gt-sts .hidden {
    display: none !important;
}

/* -------------------------------------------------------------------- hero */

.gt-sts-hero {
    padding-top: 14rem;
    padding-bottom: 5rem;
}

.gt-sts-eyebrow {
    font-size: 1.2rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color);
    margin-bottom: 2rem;
}

.gt-sts-title {
    font-size: var(--h1);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin: 0 0 2.4rem;
    max-width: 1100px;
}

.gt-sts-lead {
    font-size: var(--h5);
    line-height: 1.5;
    color: var(--gray-text);
    max-width: 980px;
    margin: 0 0 1.4rem;
}

/* -------------------------------------------------------------------- work */

.gt-sts-work {
    padding-bottom: 8rem;
}

.gt-sts-work-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.6rem;
}

.gt-sts-h2 {
    font-size: var(--h2);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0;
}

.gt-sts-steps {
    display: flex;
    gap: 28px;
    margin: 0 0 2rem;
    font-size: var(--p);
    color: var(--gray-text);
}

.gt-sts-step {
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gray-line);
}

.gt-sts-step.is-active {
    color: var(--color);
    border-color: var(--color);
    font-weight: 500;
}

.gt-sts-card {
    border: 1px solid var(--gray-line);
    border-radius: var(--radius);
    background: #fff;
    padding: 28px;
}

.gt-sts-dialogue textarea {
    width: 100%;
    min-height: 185px;
    border: 0;
    outline: 0;
    resize: vertical;
    font-size: var(--h5);
    line-height: 1.55;
    color: inherit;
    background: transparent;
    box-sizing: border-box;
}

.gt-sts-dialogue textarea::placeholder {
    color: var(--gray-text);
}

.gt-sts-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--gray-line);
    padding-top: 18px;
    font-size: var(--p);
}

.gt-sts-actions--form {
    margin-top: 24px;
}

.gt-sts-describe-note,
.gt-sts-note {
    font-size: var(--p);
    line-height: 1.5;
    color: var(--gray-text);
    margin: 1.6rem 0 0;
}

.gt-sts-error {
    font-size: var(--p);
    line-height: 1.5;
    color: #9b1c1c;
    background: #fff1ef;
    border-radius: var(--radius);
    padding: 14px;
    margin: 1.6rem 0 0;
}

.gt-sts-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ------------------------------------------------------------ review state */

.gt-sts-review {
    border: 1px solid var(--gray-line);
    background: var(--gray-bg);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    outline: none;
}

.gt-sts-review .gt-sts-eyebrow {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.gt-sts-review-source {
    font-size: var(--p);
    line-height: 1.5;
    color: var(--gray-text);
    margin: 0 0 20px;
}

.gt-sts-review h3 {
    font-size: var(--h4);
    font-weight: 500;
    line-height: 1.3;
    margin: 0 0 12px;
}

.gt-sts-review #reviewObjective {
    font-size: var(--p);
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 0 0 18px;
}

.gt-sts-review dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 28px;
    margin: 0;
}

.gt-sts-review dl > div {
    min-width: 0;
}

.gt-sts-review dt {
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray-text);
    margin-bottom: 5px;
}

.gt-sts-review dd {
    font-size: var(--p);
    line-height: 1.55;
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.gt-sts-review-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin: 0 0 26px;
}

.gt-sts-review-controls .gt-sts-switch {
    color: var(--color);
}

.gt-sts-review-hint {
    font-size: var(--p);
    color: var(--gray-text);
    line-height: 1.5;
    margin: 0 0 18px;
}

#missingHeading {
    font-size: var(--h5);
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 6px;
}

/* -------------------------------------------------------------------- form */

.gt-sts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
}

.gt-sts-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.gt-sts-field--full {
    grid-column: 1 / -1;
}

.gt-sts-field label {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-text);
}

.gt-sts-required {
    color: var(--gray-text);
}

.gt-sts-field-prompt {
    font-size: var(--p);
    line-height: 1.5;
    color: var(--color);
    margin: 0;
}

.gt-sts-field input,
.gt-sts-field select,
.gt-sts-field textarea {
    width: 100%;
    background: var(--gray-bg);
    border: 0;
    border-radius: var(--radius);
    font-size: var(--p);
    font-family: inherit;
    color: inherit;
    box-sizing: border-box;
}

.gt-sts-field input,
.gt-sts-field select {
    height: 49px;
    padding: 0 22px;
}

.gt-sts-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238C8C8C' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 22px center;
    padding-right: 48px;
}

.gt-sts-field textarea {
    min-height: 120px;
    padding: 14px 22px;
    resize: vertical;
    line-height: 1.55;
}

.gt-sts-field input::placeholder,
.gt-sts-field textarea::placeholder {
    color: var(--gray-text);
    opacity: 1;
}

.gt-sts-field input[type="file"] {
    height: auto;
    padding: 12px 14px;
    font-size: 1.3rem;
}

.gt-sts-field .gt-sts-note {
    margin-top: 0;
}

/* ----------------------------------------------------------------- buttons */

.gt-sts-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 55px;
    padding: 0 32px;
    background: var(--color);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    font-size: var(--p);
    font-family: inherit;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: background-color 0.16s ease;
}

.gt-sts-btn:hover:not(:disabled) {
    background: #001460;
}

.gt-sts-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gt-sts-switch {
    background: none;
    border: 0;
    padding: 0;
    color: var(--gray-text);
    font-size: var(--p);
    font-family: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.gt-sts-switch:hover {
    color: var(--color);
}

.gt-sts-attach {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 0;
    padding: 0;
    text-align: left;
    color: var(--gray-text);
    font-size: var(--p);
    font-family: inherit;
    cursor: pointer;
    max-width: 60%;
}

.gt-sts-attach span:last-child {
    overflow-wrap: anywhere;
}

/* ----------------------------------------------------------------- success */

.gt-sts-success {
    padding: 28px;
    border-radius: var(--radius);
    background: var(--gray-bg);
    outline: none;
}

.gt-sts-success h3 {
    margin: 0 0 8px;
    font-size: var(--h4);
    font-weight: 500;
}

.gt-sts-success p {
    margin: 0;
    color: var(--gray-text);
    line-height: 1.5;
    font-size: var(--p);
}

.gt-sts-success #receipt {
    font-weight: bold;
    color: inherit;
    margin-top: 16px;
    overflow-wrap: anywhere;
}

.gt-sts-success button {
    margin-top: 20px;
}

.gt-sts-upload-warning {
    color: #8a4b00;
    font-size: var(--p);
    line-height: 1.5;
}

/* ------------------------------------------------------------- scope strip */

.gt-sts-scope {
    margin-top: 24px;
}

.gt-sts-scope-title {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gray-text);
    margin-bottom: 9px;
}

.gt-sts-scope-words {
    font-size: var(--p);
    line-height: 1.9;
    color: var(--gray-text);
}

.gt-sts-scope-words span + span::before {
    content: " · ";
    color: var(--gray-line);
    margin: 0 4px;
}

/* ----------------------------------------------------------------- promise */

/* How it works — 5 step cards (original design's `.flow` section) */

.gt-sts-flow {
    background: var(--gray-bg); /* 2026-09-21 用户: How it works 用灰底 (与原稿 .flow 一致) */
    padding: 7rem 0;
}

.gt-sts-flow .gt-sts-h2 {
    margin-bottom: 3.2rem;
}

.gt-sts-flow-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 11px;
}

.gt-sts-flow-step {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-height: 160px;
    padding: 20px;
    border: 1px solid var(--gray-line);
    border-radius: var(--radius);
    background: #fff;
}

.gt-sts-flow-n {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    border: 0;
    border-radius: 50%;
    background: var(--scolor); /* 站点浅蓝 #A3CBFF, 与主题区块内的浅蓝用法一致 */
    color: var(--color);
    font-size: var(--p);
    line-height: 1;
}

.gt-sts-flow-step h3 {
    font-size: var(--h5);
    font-weight: 500;
    margin: 0;
}

.gt-sts-flow-step p {
    font-size: var(--p);
    line-height: 1.6;
    color: var(--gray-text);
    margin: 0;
}

.gt-sts-promise {
    background: #fff; /* 2026-09-21 用户: One project relationship 不要灰底 */
    padding: 7rem 0;
}

.gt-sts-promise .gt-sts-h2 {
    margin-bottom: 3.2rem;
}

.gt-sts-promise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.gt-sts-promise-grid h3 {
    font-size: var(--h5);
    font-weight: 500;
    margin: 0 0 10px;
}

.gt-sts-promise-grid p {
    font-size: var(--p);
    color: var(--gray-text);
    line-height: 1.6;
    margin: 0;
}

/* ---------------------------------------------------------------- services */

.gt-sts-services {
    padding: 7rem 0 8rem;
}

.gt-sts-services-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 28px;
}

.gt-sts-services-head .gt-sts-h2 {
    margin: 0 0 14px;
}

.gt-sts-services-head p:not(.gt-sts-eyebrow) {
    font-size: var(--p);
    line-height: 1.6;
    color: var(--gray-text);
    margin: 0;
}

.gt-sts-services-head .gt-sts-btn {
    flex-shrink: 0;
}

.gt-sts-service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.gt-sts-service-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 236px;
    padding: 25px;
    border: 1px solid var(--gray-line);
    border-radius: var(--radius);
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.16s ease, background-color 0.16s ease;
}

.gt-sts-service-card:hover {
    border-color: var(--color);
    background: #f8faff;
}

.gt-sts-service-category {
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color);
    margin-bottom: 18px;
}

.gt-sts-service-card h3 {
    font-size: var(--h5);
    font-weight: 500;
    line-height: 1.3;
    margin: 0 0 12px;
}

.gt-sts-service-card p {
    font-size: var(--p);
    line-height: 1.6;
    color: var(--gray-text);
    margin: 0 0 24px;
}

.gt-sts-service-action {
    display: block;
    margin-top: auto;
    color: var(--color);
    font-size: var(--p);
    padding-top: 4px;
}

.gt-sts-service-card:hover .gt-sts-service-action {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ----------------------------------------------------------------- network */

.gt-sts-network {
    overflow: hidden;
    padding: 0 0 5rem;
    background: #fff;
}

.gt-sts-network-label {
    text-align: center;
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gray-text);
    margin-bottom: 1.8rem;
}

.gt-sts-logo-track {
    display: flex;
    width: max-content;
    align-items: center;
    /* No gap on the track itself: the seam gap lives inside every set so that
       translating by exactly one set width loops without a visible jump. */
    animation: gt-sts-logo-scroll 26s linear infinite;
    --gt-sts-sets: 4; /* updated by JS to keep the strip wider than 2 viewports */
}

.gt-sts-logo-set {
    display: flex;
    align-items: center;
    gap: 64px;
    padding-right: 64px; /* seam between the last logo and the next copy */
    box-sizing: content-box;
}

.gt-sts-logo-item {
    width: 150px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.gt-sts-logo-item img {
    max-width: 100%;
    max-height: 44px;
    object-fit: contain;
}

/* Lonza wordmark needs a larger optical size than the other logos */
.gt-sts-logo-item img.gt-sts-logo--lonza {
    max-width: 145px;
    max-height: 46px;
    transform: scale(1.22);
}

@keyframes gt-sts-logo-scroll {
    from { transform: translateX(0); }
    /* Exactly one set per cycle → seamless at any width. */
    to   { transform: translateX(calc(-100% / var(--gt-sts-sets, 4))); }
}

/* ------------------------------------------------------------------ footer */

.gt-sts-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid var(--gray-line);
    padding: 3rem var(--distance);
    font-size: 1.3rem;
    color: var(--gray-text);
}

/* ------------------------------------------------------------------ mobile */

@media all and (max-width: 1441px) {
    .gt-sts-hero {
        padding-top: 12rem;
    }
}

@media all and (max-width: 1000px) {
    .gt-sts-hero {
        padding-top: 14rem;
    }

    .gt-sts-flow-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gt-sts-service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gt-sts-services-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 2rem;
    }
}

@media all and (max-width: 769px) {
    .gt-sts-promise-grid,
    .gt-sts-grid,
    .gt-sts-review dl,
    .gt-sts-service-grid {
        grid-template-columns: 1fr;
    }

    .gt-sts-flow-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Match the theme's mobile form-label size (12.6px on /lab/* pages). */
    .gt-sts-field label,
    .gt-sts-review dt,
    .gt-sts-scope-title,
    .gt-sts-network-label,
    .gt-sts-eyebrow,
    .gt-sts-service-category {
        font-size: var(--t5);
    }

    .gt-sts-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    .gt-sts-actions .gt-sts-btn,
    .gt-sts-services-head .gt-sts-btn {
        width: 100%;
    }

    .gt-sts-attach {
        max-width: 100%;
    }

    .gt-sts-work-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 1.2rem;
    }

    .gt-sts-footer {
        flex-direction: column;
    }
}

@media all and (max-width: 500px) {
    .gt-sts-hero {
        padding-top: 12rem;
    }

    .gt-sts-flow-steps {
        grid-template-columns: 1fr;
    }

    .gt-sts-card {
        padding: 20px;
    }

    .gt-sts-dialogue textarea {
        min-height: 210px;
        font-size: var(--t4);
    }

    .gt-sts-steps {
        gap: 22px;
    }
}

/* In-page validation feedback (2026-09-22 user: 缺项改页面内提示, 不用浏览器原生气泡) */

.gt-sts-invalid,
.gt-sts-invalid:focus,
.gt-sts-invalid:focus-visible {
    outline: none; /* 单一红环: 内阴影即聚焦指示, 避免 outline+inset 双环 */
    box-shadow: inset 0 0 0 3px #9b1c1c !important;
    background: #fff7f6 !important;
}

.gt-sts-field--invalid > label {
    color: #9b1c1c;
}

.gt-sts-field-error {
    font-size: var(--p);
    line-height: 1.5;
    color: #9b1c1c;
    margin: 0.8rem 0 0;
}

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

/* Success confirmation popup (2026-09-21 user: 提交成功后要有弹出提醒, 英文文案) */

.gt-sts-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.gt-sts-modal[hidden] {
    display: none;
}

.gt-sts-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 26, 113, 0.45);
    animation: gt-sts-fade-in 0.2s ease-out both;
}

.gt-sts-modal__card {
    position: relative;
    width: 100%;
    max-width: 520px;
    box-sizing: border-box;
    background: #fff;
    border-radius: var(--radius);
    padding: 40px 32px 32px;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
    animation: gt-sts-modal-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.gt-sts-modal__check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5.2rem;
    height: 5.2rem;
    margin-bottom: 2rem;
    border-radius: 50%;
    background: var(--scolor);
    color: var(--color);
    font-size: var(--h4);
    line-height: 1;
}

.gt-sts-modal__card h3 {
    font-size: var(--h3);
    font-weight: 500;
    line-height: 1.25;
    margin: 0 0 1.4rem;
}

.gt-sts-modal__card p {
    font-size: var(--p);
    line-height: 1.6;
    color: var(--gray-text);
    margin: 0 0 1.6rem;
}

.gt-sts-modal__ref {
    font-weight: bold;
    color: var(--color) !important;
    overflow-wrap: anywhere;
}

.gt-sts-modal__card .gt-sts-btn {
    min-width: 180px;
}

body.gt-sts-modal-open {
    overflow: hidden;
}

@keyframes gt-sts-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes gt-sts-modal-in {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media all and (max-width: 500px) {
    .gt-sts-modal__card {
        padding: 32px 22px 24px;
    }

    .gt-sts-modal__card .gt-sts-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gt-sts-logo-track {
        animation: none;
    }
}
