html.tg-app #open-tests {
  margin: 12px 0 4px;
}

html.tg-app.tests-open #landing {
  display: none !important;
}

html.tg-app.tests-open .header,
html.tg-app.tests-open .admin-chrome,
html.tg-app.tests-open #app > .legal-footer {
  display: none;
}

html.tg-app.tests-open .app {
  max-width: 560px;
  padding-top: calc(8px + var(--safe-top));
}

html.tg-app.tests-open .tests-shell.embedded {
  padding-bottom: calc(24px + var(--safe-bottom));
}

html.tg-app .tests-title {
  font-size: 24px;
  margin: 0 0 12px;
}

html.tg-app .tests-disclaimer {
  padding: 12px 14px;
  margin: 10px 0 14px;
}

html.tg-app .tests-disclaimer p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

html.tg-app .tests-filters {
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0 0 14px;
}

html.tg-app .tests-filters button {
  flex: 1 1 0;
  min-height: 40px;
  padding: 8px 6px;
  font-size: 13px;
  white-space: nowrap;
}

html.tests-page,
html.tests-page body {
  background: #f7f3e8;
  color: #293326;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 500;
  font-synthesis: none;
}

html.tests-page h1,
html.tests-page h2,
html.tests-page h3,
.tests-hero h1,
.tests-title,
.tests-question h2,
.tests-block h2,
.tests-disclaimer h2,
.tests-note h2,
.tests-result-score {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.tests-logo-link {
  display: inline-block;
  width: fit-content;
}
.tests-logo {
  width: 104px;
  height: auto;
  display: block;
  margin: 0 0 12px;
  background: none;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

.tests-xp {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(41, 51, 38, 0.14);
  background: #fffdf7;
  box-shadow: 0 1px 2px rgba(41, 51, 38, 0.04), 0 18px 40px -28px rgba(41, 51, 38, 0.22);
}

.tests-block .tests-xp-title {
  margin-bottom: 0;
  font-size: 18px;
}

.tests-xp-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.tests-xp-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.tests-xp-pct {
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  color: #425438;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tests-xp-bar {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5ead9;
}

.tests-xp-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #425438;
  transform-origin: left center;
  transition: width 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.tests-xp.is-complete .tests-xp-pct {
  color: #425438;
}

.tests-xp.is-complete .tests-xp-fill {
  background: #364630;
}

.tests-xp-meta {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tests-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: calc(22px + var(--safe-top, 0px)) 20px calc(40px + var(--safe-bottom, 0px));
}

.tests-shell:not(.embedded) {
  display: grid;
  gap: 18px;
}

.tests-shell.embedded {
  width: 100%;
  padding: 0 0 24px;
}

.tests-hero {
  text-align: left;
  background: #fffdf7;
  border: 1px solid rgba(41, 51, 38, 0.14);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(41, 51, 38, 0.04), 0 18px 40px -28px rgba(41, 51, 38, 0.22);
  padding: clamp(22px, 3vw, 36px);
}

.tests-hero .tests-site-head {
  margin: 0 0 20px;
}

.tests-hero .tests-site-head .tv-nav {
  margin-left: 0;
}

.tests-shell.embedded .tests-hero {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0 0 8px;
  border-radius: 0;
}

.tests-kicker {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a9684c;
}

.tests-hero h1,
.tests-title {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1.1;
  margin: 0 0 12px;
  color: #293326;
}

.tests-lead {
  color: #5f6a57;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.5;
}

.tests-note,
.tests-disclaimer {
  background: #fffdf7;
  border: 1px solid rgba(41, 51, 38, 0.14);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(41, 51, 38, 0.04);
  padding: 18px 20px;
  margin: 0;
}

.tests-disclaimer h2,
.tests-note h2 {
  font-size: 1.22rem;
  margin: 0 0 8px;
}

.tests-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tests-filters .tv-btn {
  background: #fffdf7;
  color: #293326;
  border-color: rgba(41, 51, 38, 0.28);
  font-weight: 500;
}
.tests-filters .tv-btn[aria-pressed="true"] {
  background: #425438;
  color: #fdfcf6;
  border-color: #425438;
}

.tests-block h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin: 0 0 10px;
}

.tests-card,
.tests-history-item {
  border-radius: 14px;
  border: 1px solid rgba(41, 51, 38, 0.14);
  background: #fffdf7;
  box-shadow: 0 1px 2px rgba(41, 51, 38, 0.04);
}

.tests-card-name,
.tests-history-name {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 600;
}

.tests-card-action,
.tests-history-score {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-weight: 600;
  color: #425438;
}

.tests-tag,
.tests-status {
  background: #e5ead9;
  color: #293326;
  font-weight: 500;
  border-radius: 10px;
}

.tests-progress-head {
  background: #f7f3e8;
  color: #293326;
}

.tests-progress-bar {
  background: #e5ead9;
}

.tests-question {
  background: #fffdf7;
  border: 1px solid rgba(41, 51, 38, 0.14);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(41, 51, 38, 0.04);
}

.tests-option {
  border: 1px solid rgba(41, 51, 38, 0.18);
  background: #fffdf7;
  border-radius: 14px;
}

.tests-option:has(input:checked) {
  border-color: #425438;
  box-shadow: inset 0 0 0 1px #425438;
  background: #e5ead9;
}

.tests-option span {
  font-weight: 500;
}

.tests-actions .tv-btn:disabled,
.tests-nav .tv-btn:disabled {
  opacity: 0.45;
  transform: none;
  box-shadow: none;
  cursor: default;
}

.tests-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 8px;
  font-size: 0.92rem;
}
.tests-foot a {
  text-decoration: none;
  border-bottom: 1px solid rgba(41, 51, 38, 0.28);
  padding-bottom: 2px;
}

.tests-disclaimer p,
.tests-note p,
.tests-source p {
  color: var(--muted);
  line-height: 1.55;
}

.tests-block {
  margin: 0;
}

.tests-block-meta {
  color: var(--muted);
  margin-bottom: 14px;
}

.tests-grid {
  display: grid;
  gap: 10px;
}

.tests-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name action"
    "hint action"
    "meta action";
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  text-align: left;
  width: 100%;
  padding: 16px 18px;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.tests-card:hover,
.tests-card:focus-visible {
  background: var(--card-hover);
  outline: 2px solid #425438;
  outline-offset: 2px;
}

.tests-card-name,
.tests-card-meta,
.tests-card-action,
.tests-history-name,
.tests-history-score,
.tests-history-date {
  min-width: 0;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
  word-break: keep-all;
  hyphens: none;
}

.tests-card-name {
  grid-area: name;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.2;
}

.tests-card-hint {
  grid-area: hint;
  min-width: 0;
  margin: 0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tests-card-meta {
  grid-area: meta;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--muted);
}

.tests-card-action {
  grid-area: action;
  align-self: center;
  font-size: 0.95rem;
  font-weight: 500;
  color: #425438;
  overflow: visible;
  text-overflow: unset;
}

.tests-card.is-done .tests-card-action {
  color: var(--ok);
}

.tests-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.tests-full-title {
  color: #5f6a57;
  font-weight: 500;
  font-size: 1rem;
}

.tests-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name score"
    "date score";
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.tests-history-item:focus-visible,
.tests-history-item:hover {
  background: var(--card-hover);
  outline: 2px solid #425438;
  outline-offset: 2px;
}

.tests-history-name {
  grid-area: name;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.2;
}

.tests-history-score {
  grid-area: score;
  font-size: 0.95rem;
  font-weight: 600;
  color: #425438;
  overflow: visible;
  text-overflow: unset;
}

.tests-history-date {
  grid-area: date;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.tests-meta-row,
.tests-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tests-tag,
.tests-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 10px;
  background: #e5ead9;
  color: #293326;
  font-size: 12px;
  font-weight: 500;
}

.tests-status.is-wait {
  background: rgba(66, 84, 56, 0.12);
}

.tests-status.is-done {
  background: #e5ead9;
}

.tests-history {
  display: grid;
  gap: 10px;
}

.tests-last-result .tests-result-score {
  margin: 6px 0 8px;
}

.tests-card .plan-btn,
.tests-actions .plan-btn,
.tests-actions .btn {
  min-height: 44px;
}

.tests-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tests-actions .btn,
.tests-actions .plan-card,
.tests-nav .btn {
  min-height: 44px;
}

.tests-progress-head {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 0 10px;
  background: #f7f3e8;
  color: #293326;
}

.tests-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #e5ead9;
  overflow: hidden;
}

.tests-progress-bar > span {
  display: block;
  height: 100%;
  background: #425438;
  border-radius: inherit;
}

.tests-question {
  background: #fffdf7;
  border: 1px solid rgba(41, 51, 38, 0.14);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(41, 51, 38, 0.04);
  padding: 22px 20px;
}

.tests-question h2 {
  font-size: clamp(1.35rem, 3.4vw, 1.8rem);
  line-height: 1.25;
  margin: 0 0 16px;
}

.tests-question fieldset {
  border: 0;
  display: grid;
  gap: 10px;
}

.tests-question legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.tests-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(41, 51, 38, 0.18);
  background: #fffdf7;
  cursor: pointer;
}

.tests-option:focus-within,
.tests-option:has(input:focus-visible) {
  outline: 2px solid #425438;
  outline-offset: 2px;
}

.tests-option:has(input:checked) {
  border-color: #425438;
  box-shadow: inset 0 0 0 1px #425438;
  background: #e5ead9;
}

.tests-option input {
  width: 20px;
  height: 20px;
  accent-color: #425438;
  flex: none;
}

.tests-option span {
  font-weight: 500;
  line-height: 1.35;
}

.tests-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tests-figure {
  margin: 0 0 16px;
}

.tests-figure img {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
}

.tests-result-score {
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 600;
  margin: 8px 0 14px;
  color: #425438;
}

.tests-scale {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  overflow: hidden;
  margin-bottom: 14px;
}

.tests-scale > span {
  display: block;
  height: 100%;
  background: #425438;
}

.tests-subscale {
  margin: 12px 0;
}

.tests-subscale-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.tests-source {
  margin-top: 24px;
}

.tests-resume {
  display: grid;
  gap: 10px;
}

@media (max-width: 900px) {
  html.tests-page .tv-sprig { display: none; }
}

@media (max-width: 430px) {
  .tests-shell { padding-left: 16px; padding-right: 16px; }
  .tests-question { padding: 18px 14px; }
  .tests-option,
  .tests-nav .tv-btn { min-height: 48px; }
  .assq-scale-labels .assq-mid { display: none; }
}

@media (min-width: 768px) {
  .tests-shell:not(.embedded) { padding-left: 24px; padding-right: 24px; }
  .tests-shell:not(.embedded) .tests-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.tests-progress-bar > span,
.assq-marker {
  transition: width 220ms ease, left 220ms ease;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.tests-print-brand {
  display: none;
}

.assq-scale {
  margin: 8px 0 18px;
}

.assq-scale-caption {
  font-weight: 700;
  margin-bottom: 10px;
}

.assq-scale-track {
  position: relative;
  display: flex;
  height: 14px;
  border-radius: 999px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.55);
}

.assq-band {
  display: block;
  height: 14px;
}

.assq-band-1 { background: #e5ead9; border-radius: 999px 0 0 999px; }
.assq-band-2 { background: #dfc77e; }
.assq-band-3 { background: #425438; border-radius: 0 999px 999px 0; }

.assq-marker {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: #a9684c;
  border: 2px solid #fffdf7;
  box-shadow: 0 0 0 2px rgba(169, 104, 76, 0.25);
  transform: translateY(-50%);
}

.assq-scale-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.tests-threshold-note {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.tests-note summary {
  cursor: pointer;
  font-weight: 700;
}

.tests-note summary + * {
  margin-top: 10px;
}

body.tests-running::before {
  opacity: 0.28;
}


@media (prefers-reduced-motion: reduce) {
  .tests-question,
  .tests-card,
  .tests-progress-bar > span,
  .tests-xp-fill,
  .assq-marker {
    transition: none !important;
  }
}

.tests-site-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 28px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line, rgba(41, 51, 38, 0.14));
}

.tests-site-foot a {
  color: var(--muted, #5f6a57);
  text-decoration: none;
  border-bottom: 1px solid var(--line, rgba(41, 51, 38, 0.14));
  padding-bottom: 2px;
}

.tests-site-foot a:hover {
  border-bottom-color: var(--btn, #425438);
  color: var(--text, #293326);
}

@media print {
  body::before,
  .tests-nav,
  .tests-actions,
  .tests-filters,
  .tests-no-print,
  .tests-site-foot,
  .tv-cookie-banner,
  .legal-footer { display: none !important; }
  .tests-print-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
  }
  .tests-print-brand img { width: 56px; height: 56px; }
  .tests-shell { max-width: none; padding: 0; }
  .tests-question, .tests-note, .tests-disclaimer { box-shadow: none; }
  .assq-marker { box-shadow: none; }
}
