.trial-page {
  font-size: 16px;
}
.trial-page .vision-intro h1 {
  font-size: 38px;
}
.trial-entry {
  display: grid;
  grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
  border: 1px solid var(--v-line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--v-surface);
  box-shadow: 0 16px 50px #26326806;
}
.trial-login {
  padding: 30px 26px;
  min-width: 0;
}
.trial-login h2 {
  font-size: 25px;
  line-height: 1.4;
  margin: 0;
}
.trial-sub {
  font-size: 16px;
  color: var(--v-muted);
  margin: 10px 0 24px;
}
.trial-field {
  display: block;
  margin: 18px 0 8px;
  font-size: 16px;
  font-weight: 550;
}
.trial-login input:not([type="checkbox"]) {
  width: 100%;
  height: 48px;
  font-size: 16px;
}
.trial-code {
  display: flex;
  gap: 10px;
}
/* ALTCHA lives outside the login form; share the site's theme inside its shadow DOM. */
#sms-human-check {
  margin-top: 16px;
}
#sms-human-check .trial-small {
  margin: 10px 0 0;
}
#videoAltcha {
  display: block;
  color-scheme: dark;
  --altcha-max-width: 100%;
  --altcha-border-radius: 8px;
  --altcha-color-base: var(--v-surface);
  --altcha-color-base-content: var(--color-text-primary);
  --altcha-color-neutral: var(--v-line);
  --altcha-color-neutral-content: var(--v-muted);
  --altcha-border-color: var(--v-line);
  --altcha-checkbox-border-color: var(--v-muted);
  --altcha-color-primary: var(--v-accent);
  --altcha-color-primary-content: #fff;
}
[data-theme="light"] #videoAltcha {
  color-scheme: light;
}
.trial-code input {
  min-width: 0;
  flex: 1;
}
.trial-code button {
  white-space: nowrap;
  padding: 10px 13px;
}
.trial-consent {
  display: flex;
  align-items: start;
  gap: 10px;
  font-size: 14px;
  color: var(--v-muted);
  margin: 18px 0;
}
.trial-consent input {
  width: 17px;
  height: 17px;
  margin-top: 4px;
  flex-shrink: 0;
  accent-color: var(--v-accent);
}
.trial-consent a,
.trial-form-foot a {
  color: var(--v-accent);
}
.trial-full {
  width: 100%;
  margin: 6px 0 0;
}
.trial-small {
  font-size: 14px;
  color: var(--v-muted);
  line-height: 1.8;
  margin: 14px 0;
}
.trial-form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-top: 1px solid var(--v-line);
  margin-top: 24px;
  padding-top: 18px;
  font-size: 14px;
  color: var(--v-muted);
}
.trial-form-foot a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.trial-pill {
  border-radius: 8px;
  background: var(--v-soft);
  color: var(--v-accent);
  padding: 8px 13px;
  font-size: 14px;
  white-space: nowrap;
}
.trial-profile-step {
  font-size: 14px;
  color: var(--v-accent);
  margin-bottom: 10px;
}
.trial-demo {
  padding: 24px 20px;
  background: var(--v-soft);
  border-left: 1px solid var(--v-line);
  min-width: 0;
}
.trial-demo .demo-head {
  margin-bottom: 12px;
}
.trial-demo h2 {
  font-size: 21px;
  line-height: 1.5;
}
.trial-demo .demo-head p {
  font-size: 14px;
  color: var(--v-muted);
  margin-top: 5px;
}
.trial-demo .screen {
  aspect-ratio: 16/9;
  background: #172132;
  border: 1px solid #354358;
  border-radius: 11px;
  position: relative;
  overflow: hidden;
}
.trial-demo .screen svg {
  display: block;
  width: 100%;
  height: 100%;
}
.trial-demo .screen-caption {
  position: absolute;
  top: 15px;
  left: 17px;
  color: #c8d3e4;
  font-size: 12px;
  letter-spacing: 1px;
}
.trial-demo .video-slot {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  background: #111c3930;
  color: #fff;
  padding: 20px;
  text-align: center;
}
.trial-demo .video-slot strong {
  font-size: 19px;
}
.trial-demo .video-slot small {
  font-size: 14px;
  color: #e1e7f4;
}
.trial-demo-player {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  background: #172132;
  border-radius: 11px;
}
.trial-demo .step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-top: 23px;
}
.trial-demo .step-list b {
  display: block;
  color: var(--v-accent);
  font-size: 13px;
  margin-bottom: 6px;
}
.trial-demo .step-list strong {
  font-size: 15px;
}
.trial-demo .step-list p {
  font-size: 14px;
  color: var(--v-muted);
  margin-top: 4px;
}
.trial-demo .demo-note {
  font-size: 14px;
  color: var(--v-muted);
  margin-top: 22px;
}
.trial-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  padding: 24px 0;
  font-size: 14px;
  color: var(--v-muted);
}
.trial-benefits span:before {
  content: "✓";
  margin-right: 8px;
  color: var(--v-green);
}
.trial-policy {
  font-size: 14px;
  color: var(--v-muted);
  margin: 4px 0 30px;
}
.trial-policy summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
}
.trial-policy p {
  line-height: 1.9;
  margin: 12px 0;
  max-width: 1000px;
}
.trial-policy a {
  color: var(--v-accent);
}
.trial-demo-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  box-sizing: border-box;
  width: min(850px, calc(100% - 32px));
  height: fit-content;
  max-height: calc(100dvh - 40px);
  overflow: auto;
  background: var(--v-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--v-line);
  border-radius: 16px;
  padding: 24px;
}
.trial-demo-dialog::backdrop {
  background: #10182b99;
}
.trial-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}
.trial-dialog-head h2 {
  font-size: 22px;
}
.trial-demo-dialog .trial-demo {
  border: 0;
  border-radius: 12px;
}
.trial-history-summary {
  padding: 20px 24px;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
}
.trial-login input:not([type="checkbox"]) {
  border: 1px solid var(--v-line);
  border-radius: 8px;
  background: var(--v-surface);
  color: var(--color-text-primary);
  padding: 10px 13px;
}
.trial-login input::placeholder {
  color: var(--v-muted);
}
.trial-login input:focus-visible {
  outline: 2px solid var(--v-accent);
  outline-offset: 2px;
}
@media (min-width: 1450px) {
  .trial-login {
    padding: 34px 28px;
  }
  .trial-demo {
    padding: 26px 20px;
  }
}
@media (max-width: 960px) {
  .trial-entry {
    grid-template-columns: 1fr;
  }
  .trial-demo {
    border-left: 0;
    border-top: 1px solid var(--v-line);
  }
  .trial-pill {
    display: none;
  }
  .trial-page .vision-intro h1 {
    font-size: 32px;
  }
  .trial-login,
  .trial-demo {
    padding: 28px;
  }
  .trial-demo-dialog .trial-demo {
    padding: 18px;
  }
  .trial-benefits {
    gap: 12px 20px;
  }
}
@media (max-width: 420px) {
  .trial-login,
  .trial-demo {
    padding: 22px;
  }
  .trial-page .vision-intro h1 {
    font-size: 28px;
  }
  .trial-demo .step-list {
    gap: 8px;
  }
  .trial-demo .step-list strong {
    font-size: 14px;
  }
  .trial-demo .screen-caption {
    font-size: 11px;
  }
  .trial-demo .video-slot small {
    font-size: 13px;
  }
  .trial-code button {
    padding: 10px;
    font-size: 14px;
  }
  .trial-demo-dialog {
    padding: 18px;
  }
}

.history-task-name {
  font-size: 18px;
  overflow-wrap: anywhere;
  margin-bottom: 8px;
}
.history-task-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}
.history-task-metrics > div {
  padding: 14px;
  background: var(--v-soft);
  border: 1px solid var(--v-line);
  border-radius: 8px;
}
.history-task-metrics span {
  display: block;
  color: var(--v-muted);
  font-size: 14px;
}
.history-task-metrics strong {
  display: block;
  font-size: 23px;
  line-height: 1.6;
  margin-top: 7px;
}
.history-task-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.history-task-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
@media (max-width: 600px) {
  .history-task-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .history-task-metrics strong {
    font-size: 20px;
  }
}

/* Keep history centered in the viewport, independent of the page scroll position. */
#history-dialog {
  width: min(960px, calc(100% - 40px));
  overscroll-behavior: contain;
}
#history-dialog .trial-dialog-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--v-surface);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--v-line);
}
#history-dialog #close-history {
  flex-shrink: 0;
}
#history-task-video {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  margin: 0;
}
@media (max-width: 600px) {
  #history-dialog {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
    padding: 16px;
    border-radius: 12px;
  }
  #history-dialog .trial-dialog-head h2 {
    font-size: 20px;
  }
  .history-task-actions > * {
    flex: 1;
    justify-content: center;
    text-align: center;
  }
}

/* Give the tutorial more space while retaining the shared site navigation. */
.trial-page main.container {
  max-width: 1480px;
}
#demo-dialog {
  width: min(1200px, calc(100% - 40px));
}
#demo-dialog .trial-demo {
  padding: 0;
  border: 0;
  background: transparent;
}
@media (max-width: 960px) {
  .trial-entry > .trial-demo {
    padding: 22px 16px;
  }
}
@media (max-width: 420px) {
  .trial-entry > .trial-demo {
    padding: 20px 12px;
  }
  #demo-dialog {
    width: calc(100% - 24px);
  }
}
