/* „Proovi 10 päeva tasuta“ modaal (inc/trial.php, js/trial.js). Vasakul kolm sammu, paremal elav eelvaade „Sinu Intras“.
   --tc = valitud valdkonna värv (JS seab), --tci = tekst/ikoon sellel värvil. Telefonis täisekraan, eelvaade peidus. */

html.tr-open { overflow: hidden; }

.tr {
  --tc: var(--teal); --tci: #fff;
  padding: 0; border: 0; margin: auto; background: transparent; color: var(--ink);
  width: min(1060px, calc(100vw - 32px)); max-width: none; max-height: none; overflow: visible;
}
.tr::backdrop { background: rgba(11, 20, 27, .52); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tr[open] { animation: trPop .42s var(--ease) both; }
.tr[open]::backdrop { animation: trFade .3s ease both; }
.tr.is-closing { animation: trOut .22s ease both; }
.tr.is-closing::backdrop { animation: trFade .22s ease reverse both; }
@keyframes trPop { from { opacity: 0; transform: translateY(18px) scale(.975); } to { opacity: 1; transform: none; } }
@keyframes trOut { to { opacity: 0; transform: translateY(10px) scale(.985); } }
@keyframes trFade { from { opacity: 0; } to { opacity: 1; } }

.tr__shell {
  display: grid; grid-template-columns: minmax(0, 1fr) 372px;
  height: min(700px, calc(100dvh - 32px)); background: var(--white);
  border-radius: 26px; overflow: hidden; box-shadow: var(--sh-3), 0 0 0 1px rgba(16, 27, 36, .06);
}

/* ---------------- vasak pool ---------------- */
.tr__main { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; }
.tr__head { display: flex; align-items: center; gap: 18px; padding: 22px 26px 16px 32px; }
.tr__eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin-right: auto;
  font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--teal-d);
}
.tr__pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--teal-hi); }
.tr__pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--teal-hi); opacity: 0; animation: trPulse 2.2s ease-out infinite; }
@keyframes trPulse { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

.tr__steps { display: flex; gap: 6px; }
.tr__steps li {
  display: flex; align-items: center; gap: 7px; padding: 5px 11px 5px 5px; border-radius: 99px;
  font: 750 13px/1 var(--font); color: var(--ink-3); transition: background-color .3s, color .3s;
}
.tr__steps i {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  font: 500 11.5px/1 var(--mono); font-style: normal; background: var(--line-2); color: var(--ink-3); transition: background-color .3s, color .3s;
}
.tr__steps li.is-on { background: var(--mint); color: var(--ink); }
.tr__steps li.is-on i { background: var(--teal); color: #fff; }
.tr__steps li.is-done i { background: var(--mint-2); color: var(--teal-d); }

.tr__x {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 12px;
  background: var(--bg); color: var(--ink-2); cursor: pointer; transition: background-color .2s, color .2s, transform .2s;
}
.tr__x svg { width: 18px; height: 18px; }
.tr__x:hover { background: var(--line-2); color: var(--ink); }
.tr__x:active { transform: scale(.94); }

.tr__bar { height: 3px; margin: 0 32px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.tr__bar i { display: block; height: 100%; width: var(--p, 33.3%); border-radius: 3px; background: linear-gradient(90deg, var(--teal), var(--teal-hi)); transition: width .6s var(--ease); }

.tr__step { grid-row: 3; grid-column: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 26px 32px 18px; scrollbar-width: thin; }
.tr__step[hidden] { display: none; }
.tr__step.is-in { animation: trIn .42s var(--ease) both; }
.tr__step.is-in.is-back { animation-name: trInBack; }
@keyframes trIn { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes trInBack { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }

.tr__h { font-size: clamp(24px, 2.4vw, 30px); line-height: 1.12; letter-spacing: -.025em; font-weight: 900; outline: none; text-wrap: balance; }
.tr__h3 { font-size: 17px; letter-spacing: -.01em; font-weight: 850; }
.tr__lead { margin-top: 8px; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; max-width: 46ch; }
.tr__lead--s { margin-top: 4px; font-size: 14.5px; }
.tr__sub { display: flex; align-items: baseline; gap: 10px; margin-top: 30px; }
.tr__count { font: 500 12px/1 var(--mono); color: var(--teal-d); background: var(--mint); padding: 5px 8px; border-radius: 7px; }
.tr__fs { border: 0; margin: 0; padding: 0; min-width: 0; }
.tr__err { min-height: 0; margin-top: 10px; color: var(--red); font-size: 14px; font-weight: 700; }
.tr__err:empty { display: none; }
.tr__err--form { padding: 12px 14px; border-radius: 12px; background: #fdf0ef; font-weight: 650; }
.tr__err--form a { color: inherit; font-weight: 800; }

/* valdkonnad */
.tr-inds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.tr-ind { position: relative; display: block; cursor: pointer; }
.tr-ind input { position: absolute; opacity: 0; pointer-events: none; }
.tr-ind__box {
  position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 11px; align-items: center;
  height: 100%; min-height: 66px; padding: 12px 30px 12px 12px; border-radius: 15px; background: var(--white);
  border: 1.5px solid var(--line); transition: border-color .2s, box-shadow .25s, transform .25s var(--ease), background-color .2s;
}
.tr-ind:hover .tr-ind__box { border-color: #c5cdd0; transform: translateY(-1px); box-shadow: var(--sh-2); }
.tr-ind__mark { grid-row: 1 / 3; width: 36px; height: 36px; border-radius: 10px; }
.tr-ind__mark--gen { display: grid; place-items: center; background: var(--mint); color: var(--teal-d); }
.tr-ind__mark--gen svg { width: 20px; height: 20px; }
.tr-ind__t { font-size: 14.5px; font-weight: 800; line-height: 1.2; letter-spacing: -.005em; }
.tr-ind__s { font-size: 12.5px; color: var(--ink-3); line-height: 1.3; }
.tr-ind__ok {
  position: absolute; top: 9px; right: 9px; width: 20px; height: 20px; padding: 3px; border-radius: 50%;
  background: var(--teal); color: #fff; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .3s var(--ease);
}
.tr-ind input:checked + .tr-ind__box { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 5%, #fff); box-shadow: 0 0 0 3px rgba(var(--teal-rgb), .12); }
.tr-ind input:checked + .tr-ind__box .tr-ind__ok { opacity: 1; transform: none; }
.tr-ind input:focus-visible + .tr-ind__box { outline: 3px solid rgba(var(--teal-rgb), .45); outline-offset: 2px; }
.tr-other { margin-top: 14px; max-width: 420px; }

/* meeskond */
.tr-segs { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.tr-seg { flex: 1 1 0; min-width: 72px; cursor: pointer; }
.tr-seg input { position: absolute; opacity: 0; pointer-events: none; }
.tr-seg span {
  display: grid; place-items: center; height: 50px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--white);
  font: 500 15px/1 var(--mono); color: var(--ink-2); transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease);
}
.tr-seg:hover span { border-color: #c5cdd0; }
.tr-seg input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.tr-seg input:focus-visible + span { outline: 3px solid rgba(var(--teal-rgb), .45); outline-offset: 2px; }
.tr-seg input:active + span { transform: scale(.97); }

/* moodulid */
.tr-mods { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tr-mod { cursor: pointer; }
.tr-mod input { position: absolute; opacity: 0; pointer-events: none; }
.tr-mod span {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border-radius: 99px;
  border: 1.5px solid var(--line); background: var(--white); font-size: 14px; font-weight: 700; color: var(--ink-2);
  transition: background-color .2s, border-color .2s, color .2s, padding .2s;
}
.tr-mod span::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--mc, var(--teal)); flex: none; transition: transform .25s var(--ease); }
.tr-mod svg { width: 15px; height: 15px; margin-left: -2px; display: none; }
.tr-mod:hover span { border-color: #c5cdd0; color: var(--ink); }
.tr-mod input:checked + span { background: color-mix(in srgb, var(--mc, var(--teal)) 10%, #fff); border-color: color-mix(in srgb, var(--mc, var(--teal)) 55%, #fff); color: var(--ink); }
.tr-mod input:checked + span::before { display: none; }
.tr-mod input:checked + span svg { display: block; color: var(--mc, var(--teal)); }
.tr-mod input:focus-visible + span { outline: 3px solid rgba(var(--teal-rgb), .45); outline-offset: 2px; }

/* kontakt */
.tr-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 14px; margin-top: 22px; }
.tr-f { display: grid; gap: 6px; }
.tr-f__l { font-size: 13.5px; font-weight: 750; color: var(--ink); }
.tr-f__l em { font-style: normal; font-weight: 600; color: var(--ink-3); margin-left: 4px; }
.tr-f__i {
  height: 50px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line-ui); background: var(--white);
  font: 600 16px/1 var(--font); color: var(--ink); transition: border-color .2s, box-shadow .2s; width: 100%;
}
.tr-f__i::placeholder { color: #9aa2a8; font-weight: 500; }
.tr-f__i:hover { border-color: var(--ink-2); }
.tr-f__i:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(var(--teal-rgb), .14); }
.tr-f.is-bad .tr-f__i { border-color: var(--red); box-shadow: 0 0 0 4px rgba(210, 59, 51, .1); }
.tr-f__e { font-size: 13px; font-weight: 700; color: var(--red); }
.tr-f__e:empty { display: none; }
.tr-chk { display: inline-flex; align-items: center; gap: 11px; margin-top: 18px; font-size: 15px; font-weight: 650; cursor: pointer; }
.tr-chk input { position: absolute; opacity: 0; pointer-events: none; }
.tr-chk__b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-ui); background: #fff; color: #fff; transition: background-color .2s, border-color .2s; flex: none; }
.tr-chk__b svg { width: 15px; height: 15px; opacity: 0; transform: scale(.5); transition: opacity .2s, transform .25s var(--ease); }
.tr-chk input:checked + .tr-chk__b { background: var(--teal); border-color: var(--teal); }
.tr-chk input:checked + .tr-chk__b svg { opacity: 1; transform: none; }
.tr-chk input:focus-visible + .tr-chk__b { outline: 3px solid rgba(var(--teal-rgb), .45); outline-offset: 2px; }
.tr-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tr__fine { margin-top: 18px; font-size: 13px; line-height: 1.55; color: var(--ink-3); max-width: 56ch; }
.tr__fine a { color: var(--teal-d); font-weight: 700; }

/* jalus */
.tr__foot { display: flex; align-items: center; gap: 12px; padding: 16px 32px 24px; border-top: 1px solid var(--line-2); }
.tr__back {
  display: inline-flex; align-items: center; gap: 6px; height: 48px; padding: 0 14px 0 10px; border: 0; border-radius: 12px;
  background: transparent; color: var(--ink-2); font-weight: 750; font-size: 15px; cursor: pointer; transition: background-color .2s, color .2s;
}
.tr__back svg { width: 18px; height: 18px; }
.tr__back:hover { background: var(--bg); color: var(--ink); }
.tr__back[hidden] { display: none; }
.tr__next { margin-left: auto; min-width: 168px; }
.tr__next svg { width: 18px; height: 18px; }
.tr__next:hover svg { transform: translateX(3px); }
.tr__next[disabled] { opacity: .7; cursor: progress; }
.tr__next.is-busy span::after { content: ''; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: trSpin .7s linear infinite; }
.tr__next.is-busy svg { display: none; }
@keyframes trSpin { to { transform: rotate(360deg); } }

/* valmis */
.tr__done { text-align: left; }
.tr-burst { width: 64px; height: 64px; color: var(--teal); margin-bottom: 18px; }
.tr-burst circle { stroke-dasharray: 183; stroke-dashoffset: 183; animation: trDraw .7s var(--ease) .1s forwards; }
.tr-burst path { stroke-dasharray: 44; stroke-dashoffset: 44; animation: trDraw .45s var(--ease) .65s forwards; }
@keyframes trDraw { to { stroke-dashoffset: 0; } }
.tr-done__lead b { color: var(--ink); }
.tr-time { margin-top: 26px; display: grid; gap: 0; max-width: 480px; }
.tr-time li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding-bottom: 20px; }
.tr-time li:not(:last-child)::before { content: ''; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; border-radius: 2px; background: var(--line-2); }
.tr-time li.is-done::before { background: var(--mint-2); }
.tr-time i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.tr-time i svg { width: 16px; height: 16px; }
.tr-time .is-done i { background: var(--teal); border-color: var(--teal); color: #fff; }
.tr-time .is-now i { border-color: var(--teal); }
.tr-time .is-now i::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); animation: trBeat 1.6s ease-in-out infinite; }
@keyframes trBeat { 50% { transform: scale(.55); opacity: .5; } }
.tr-time b { display: block; font-size: 15.5px; font-weight: 800; padding-top: 3px; }
.tr-time span { display: block; margin-top: 2px; font-size: 14px; color: var(--ink-3); line-height: 1.5; }
.tr.is-done .tr__foot .tr__back { display: none; }

/* ---------------- parem pool: eelvaade ---------------- */
.tr__side {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 26px; padding: 34px 30px;
  background:
    radial-gradient(120% 70% at 85% 0%, color-mix(in srgb, var(--tc) 55%, transparent), transparent 60%),
    radial-gradient(90% 60% at 0% 100%, rgba(var(--hi-rgb), .22), transparent 60%),
    var(--navy);
  color: #fff; overflow: hidden; transition: background .6s ease;
}
.tr__side::before {
  content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1.2px); background-size: 18px 18px;
  mask-image: linear-gradient(180deg, #000, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.trp {
  position: relative; border-radius: 16px; background: #fff; color: var(--ink); overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08);
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg); transform-origin: 30% 50%; transition: transform .6s var(--ease);
}
.tr__side:hover .trp { transform: perspective(1200px) rotateY(0) rotateX(0); }
.trp__top { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-bottom: 1px solid var(--line-2); }
.trp__logo { width: 24px; height: 24px; border-radius: 7px; background: var(--tc); transition: background-color .5s; position: relative; }
.trp__logo::after { content: ''; position: absolute; inset: 7px; border-radius: 3px; background: var(--tci); opacity: .9; }
.trp__co { font-size: 13.5px; font-weight: 850; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.trp__badge { margin-left: auto; flex: none; font: 500 10px/1 var(--mono); padding: 5px 7px; border-radius: 6px; background: var(--mint); color: var(--teal-d); letter-spacing: .02em; }
.trp__body { display: grid; grid-template-columns: 118px minmax(0, 1fr); min-height: 236px; }
.trp__nav { padding: 10px 8px; background: #f7f9fa; border-right: 1px solid var(--line-2); display: grid; align-content: start; gap: 2px; }
.trp__nav li { display: flex; align-items: center; gap: 7px; padding: 6px 7px; border-radius: 7px; font-size: 11.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trp__nav li i { width: 7px; height: 7px; border-radius: 2.5px; background: var(--mc, var(--ink-4)); flex: none; }
.trp__nav li.is-on { background: #fff; color: var(--ink); box-shadow: var(--sh-1); }
.trp__nav li.is-on i { background: var(--tc); }
.trp__nav li.is-new { animation: trNav .45s var(--ease) both; }
.trp__nav li.is-more { color: var(--ink-3); font-weight: 650; }
@keyframes trNav { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.trp__main { padding: 14px 14px 12px; min-width: 0; display: flex; flex-direction: column; }
.trp__hi { font-size: 15px; font-weight: 900; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trp__ind { margin-top: 2px; font-size: 11.5px; color: var(--ink-3); min-height: 1.4em; }
.trp__cards { display: grid; gap: 8px; margin-top: 12px; }
.trp__card { display: grid; gap: 6px; padding: 10px; border-radius: 10px; border: 1px solid var(--line-2); }
.trp__card b { width: 46%; height: 7px; border-radius: 4px; background: color-mix(in srgb, var(--tc) 70%, #fff); transition: background-color .5s; }
.trp__card span { height: 5px; border-radius: 3px; background: var(--line-2); }
.trp__card span:last-child { width: 70%; }
.trp__card:nth-child(2) b { width: 34%; background: var(--line); }
.trp__team { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; }
.trp__faces { display: flex; }
.trp__faces i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; margin-left: -6px; font: 800 9px/18px var(--font); font-style: normal; text-align: center; color: #fff; background: var(--fc); }
.trp__faces i:first-child { margin-left: 0; }
.trp__tsz { font: 500 10.5px/1 var(--mono); color: var(--ink-3); }

.tr__why { position: relative; display: grid; gap: 10px; }
.tr__why li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 650; color: rgba(255, 255, 255, .9); }
.tr__why svg { width: 18px; height: 18px; padding: 2px; border-radius: 50%; background: rgba(var(--hi-rgb), .18); color: var(--teal-hi); flex: none; }

/* ---------------- telefon ja kitsas ekraan ---------------- */
@media (max-width: 1000px) { .tr__shell { grid-template-columns: minmax(0, 1fr) 320px; } .tr-inds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .tr { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; }
  .tr[open] { animation-name: trUp; }
  @keyframes trUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
  .tr__shell { grid-template-columns: 1fr; height: 100dvh; border-radius: 0; }
  .tr__side { display: none; }
  .tr__head { padding: max(14px, env(safe-area-inset-top)) 16px 12px 20px; gap: 10px; }
  .tr__steps li:not(.is-on) span { display: none; }
  .tr__steps li:not(.is-on) { padding-right: 5px; }
  .tr__bar { margin: 0 20px; }
  .tr__step { padding: 22px 20px 16px; }
  .tr__foot { padding: 12px 20px max(16px, env(safe-area-inset-bottom)); }
  .tr__next { flex: 1; min-width: 0; }
  .tr-fields { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .tr__eyebrow { display: none; }
  .tr__steps { margin-right: auto; }
  .tr-inds { gap: 8px; }
  .tr-ind__box { grid-template-columns: 1fr; grid-template-rows: auto; row-gap: 8px; padding: 12px; min-height: 104px; align-content: start; }
  .tr-ind__mark { grid-row: auto; }
  .tr-ind__t { font-size: 14px; }
  .tr-segs { display: grid; grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .tr[open], .tr[open]::backdrop, .tr.is-closing, .tr__step.is-in, .trp__nav li.is-new, .tr__pulse::after, .tr-time .is-now i::after { animation: none !important; }
  .tr-burst circle, .tr-burst path { animation: none; stroke-dashoffset: 0; }
  .trp, .tr__side:hover .trp { transform: none; }
}
