/* /testaa v2 — pelkistetty, enemmän väriä. Lisätään site.css:n perään. 1 px reunat, ei hehkua. */
:root { --cyan-line: rgba(0,180,255,0.35); --cyan-fill: rgba(0,180,255,0.05); --orange-fill: rgba(254,80,0,0.20); }

/* Hero-värikenttä: täysleveä, gradientti + 1 px korostusviiva alareunassa */
.tst-hero { position: relative; padding: 96px 20px 40px;
  background:
    radial-gradient(55% 140% at 18% 0%, rgba(0,180,255,0.22) 0%, rgba(0,180,255,0) 70%),
    radial-gradient(45% 120% at 86% 8%, rgba(254,80,0,0.18) 0%, rgba(254,80,0,0) 70%); }
.tst-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, rgba(0,180,255,0) 0%, #00B4FF 28%, #FE5000 72%, rgba(254,80,0,0) 100%); }
.tst-head { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.tst-head .eyebrow { margin-bottom: 14px; }
.tst-head h1 { font-size: 48px; font-weight: 800; line-height: 1.12; letter-spacing: -0.03em; margin: 0 0 12px; }
.tst-head h1 .accent { color: var(--orange); }
.tst-head .sub { text-wrap: balance; font-size: 16px; line-height: 1.45; color: rgba(242,242,242,0.72); margin: 0 auto; max-width: 480px; }

/* Valitsin */
.tst-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: 384px; margin: 0 auto; padding: 4px; height: 48px; border: 1px solid var(--cyan-line); border-radius: 12px; background: rgba(10,10,12,0.72); }
.tst-seg-ind { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border: 1px solid #00B4FF; background: rgba(0,180,255,0.16); border-radius: 9px; transition: transform 200ms cubic-bezier(0.2,0,0,1); }
.tst-seg[data-mode="ilmoita"] .tst-seg-ind { transform: translateX(100%); }
.tst-seg button { position: relative; z-index: 1; appearance: none; border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 700; color: rgba(242,242,242,0.62); cursor: pointer; border-radius: 8px; white-space: nowrap; }
.tst-seg button[aria-selected="true"] { color: #00B4FF; }
.tst-seg button:hover:not([aria-selected="true"]) { color: #F2F2F2; }
.tst-seg button:focus-visible { outline: 1px solid #00B4FF; outline-offset: 2px; }

/* Lomake */
.tst-shell { min-height: calc(100vh - 150px); }
.tst-body { max-width: 688px; margin: 0 auto; padding: 40px 20px 96px; }
.tst-card { position: relative; border: 1px solid var(--cyan-line); background: var(--cyan-fill); border-radius: 16px; padding: 24px 24px 4px; margin-bottom: 16px; }
.tst-card-label { display: flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #00B4FF; margin-bottom: 20px; line-height: 1; }
.tst-card-label::before { content: ""; width: 20px; height: 1px; background: #FE5000; }
.tst-line { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 16px; align-items: start; }
.tst-form .field { margin-bottom: 20px; }
.tst-form .field label, .tst-form .beta-label { display:block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(242,242,242,0.62); margin-bottom: 8px; line-height: 1.3; }
.tst-form .stt-input { height: 48px; padding: 0 14px; font-size: 16px; border-radius: 10px; border: 1px solid rgba(242,242,242,0.14); background: #0E0E12; }
.tst-form textarea.stt-input { height: 128px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.tst-form .stt-input:focus, .tst-form .stt-input.is-focus { border-color: #FE5000; box-shadow: none; }
.tst-form .stt-input.is-error { border-color: #FF6B6B; }
.tst-form .kohde-chips { display:flex; flex-wrap: wrap; gap: 8px; margin: 0; min-height: 48px; align-items: center; }
.tst-form .kohde-chip { height: 36px; padding: 0 14px; font-size: 14px; font-weight: 700; border-radius: 999px; border: 1px solid rgba(0,180,255,0.28); background: rgba(0,180,255,0.06); color: var(--text); }
.tst-form .kohde-chip:hover { border-color: rgba(0,180,255,0.6); }
.tst-form .kohde-chip[aria-pressed="true"] { color: #FFFFFF; border-color: #FE5000; background: var(--orange-fill); box-shadow: none; }
.tst-form .kohde-chips.is-error .kohde-chip { border-color: rgba(255,107,107,0.6); background: rgba(255,107,107,0.06); }
.tst-err { display:block; font-size: 13px; line-height: 1.35; color: #FF6B6B; margin-top: 6px; }
.tst-checks { margin: 24px 0 28px; display: grid; gap: 14px; }
.tst-checks .check, .tst-form .field > .check { display:flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: rgba(242,242,242,0.72); }
.tst-checks .check input[type="checkbox"][type], .tst-form .field > .check input[type="checkbox"][type] { margin-top: 1px; border-color: rgba(0,180,255,0.45); }
.tst-checks .check input[type="checkbox"][type]:checked, .tst-form .field > .check input[type="checkbox"][type]:checked { border-color: #FE5000; }
.tst-checks .check a { color: #00B4FF; text-decoration: underline; text-decoration-color: rgba(0,180,255,0.45); text-underline-offset: 3px; }
.tst-checks .check.is-error input[type="checkbox"][type] { border-color: #FF6B6B; }
.tst-checks .check .tst-err { margin-top: 4px; }
.tst-actions { display:flex; align-items:center; gap: 16px; flex-wrap: wrap; }
.tst-actions .btn-primary { height: 48px; padding: 0 24px; font-size: 15px; font-weight: 700; border-radius: 12px; min-width: 200px; }
.tst-actions .btn-primary[disabled] { opacity: 0.55; cursor: progress; }
.tst-actions .status { margin: 0; font-size: 13px; line-height: 1.35; color: var(--muted); }
.tst-actions .status.err { color: #FF6B6B; }
.tst-spin { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgba(10,10,12,0.35); border-top-color: #0A0A0C; display:inline-block; }

/* Kiitos */
.tst-done { text-align: center; border: 1px solid var(--cyan-line); background: var(--cyan-fill); border-radius: 16px; padding: 40px 24px; }
.tst-done img { width: 48px; height: 48px; display:block; margin: 0 auto 20px; }
.tst-done p { text-wrap: balance; font-size: 16px; color: rgba(242,242,242,0.72); max-width: 420px; margin: 0 auto; line-height: 1.45; }

@media (min-width: 600px) { .tst-line--tall .field > label { min-height: 32px; display: flex; align-items: flex-end; } }
@media (max-width: 1199px) { .tst-hero { padding-top: 72px; } .tst-head h1 { font-size: 40px; } }
@media (max-width: 599px) {
  .tst-hero { padding: 48px 20px 32px; }
  .tst-head { margin-bottom: 28px; }
  .tst-head h1 { font-size: 32px; }
  .tst-seg { width: 100%; }
  .tst-body { padding: 28px 20px 72px; }
  .tst-card { padding: 20px 16px 0; }
  .tst-line { display: block; }
  .tst-actions .btn-primary { width: 100%; }
  .tst-actions { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { .tst-seg-ind { transition: none; } }

/* Toteutus (ei SPECin ulkoasua): ajonaikaiset tilat ja SPECin §4–5 animaatiot. */
.tst-form[hidden], .tst-done[hidden], .tst-seg[hidden], .tst-head .sub[hidden] { display: none; }
.tst-spin { margin-right: 8px; vertical-align: -2px; animation: tst-spin 0.8s linear infinite; }
@keyframes tst-spin { to { transform: rotate(360deg); } }
.tst-body.is-resizing { overflow: hidden; transition: height 240ms cubic-bezier(0.2,0,0,1); }
.tst-fade-out { opacity: 0; transition: opacity 120ms linear; }
.tst-fade-in { animation: tst-in 200ms cubic-bezier(0.2,0,0,1) 60ms both; }
.tst-head-out { opacity: 0; transition: opacity 100ms linear; }
.tst-head-in { animation: tst-head-in 160ms linear both; }
.tst-done.tst-appear { animation: tst-in 240ms cubic-bezier(0.2,0,0,1) both; }
@keyframes tst-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes tst-head-in { from { opacity: 0; } to { opacity: 1; } }
.tst-form .kohde-chip:focus-visible, .tst-checks .check input:focus-visible, .tst-form .field > .check input:focus-visible { outline: 2px solid #FE5000; outline-offset: 2px; }
#tst-title:focus { outline: none; }
@media (prefers-reduced-motion: reduce) {
  .tst-body.is-resizing, .tst-fade-out, .tst-head-out { transition: none; }
  .tst-fade-in, .tst-head-in, .tst-done.tst-appear, .tst-spin { animation: none; }
}
