.tests-page { padding-bottom: clamp(56px, 7vw, 108px); }
.tests-page [hidden] { display: none !important; }
.tests-hero { padding-bottom: clamp(24px, 4vw, 56px); }
.tests-hero:not(.tests-hero--catalog) .page-hero__inner { display: block; }
.tests-hero:not(.tests-hero--catalog) .page-hero__title { max-width: 1000px; font-size: clamp(42px, 6vw, 84px); }
.tests-hero--catalog { padding-bottom: clamp(24px, 3vw, 44px); }
.tests-hero--catalog .page-hero__inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; }
.tests-hero--catalog .page-hero__title { font-size: clamp(52px, 6.1vw, 92px); }
.tests-hero__visual { position: relative; }
.tests-hero__photo {
  display: block; width: 100%; height: clamp(235px, 23vw, 315px); object-fit: cover;
  object-position: center 43%; border-radius: var(--radius-tile);
}
.tests-hero .photo-tag { display: none; }
.tests-trail a + a::before { content: ' / '; margin-right: 6px; color: var(--c-text); }
.tests-trail a, .tests-example a, .tests-parent a:not(.btn-pill), .tests-errors a {
  color: var(--c-green-700); text-decoration: underline; text-underline-offset: .18em;
}
.tests-actions, .tests-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tests-audiences { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
.tests-audience {
  position: relative; align-items: flex-start; justify-content: flex-start; gap: 7px;
  min-height: 220px; padding: 22px; border: 1px solid transparent; text-align: left;
  background: var(--g-bg); color: var(--c-dark); transition: border-color .2s, transform .25s var(--ease-out);
}
.tests-audience::before {
  content: ""; position: absolute; z-index: -1; width: 175px; height: 175px; top: -60px; right: -40px;
  border-radius: 50%; background: var(--c-white); opacity: .36;
}
.tests-audience .tile__arrow { width: 34px; height: 34px; background: var(--c-white); color: var(--g-ink); }
.tests-audience__icon {
  display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 8px;
  border-radius: 16px; background: var(--g-ink); color: var(--c-white);
}
.tests-audience__icon svg { width: 29px; height: 29px; }
.tests-audience__name { color: var(--c-dark); font: 700 clamp(32px, 3.4vw, 54px)/.98 var(--f-display); text-transform: uppercase; }
.tests-audience__tag { color: var(--g-ink); font-size: 13px; font-weight: 600; }
.tests-audience__detail { color: var(--c-text); font-size: 14px; }
.tests-audience:is(:hover, [aria-expanded="true"]) { border-color: var(--g-ink); }
.tests-audience:hover .tile__arrow { background: var(--g-ink); color: var(--c-white); }
.tests-audience[aria-expanded="true"] .tile__arrow { background: var(--g-ink); color: var(--c-white); transform: rotate(90deg); }
#test-subject-picker h2 { margin-bottom: 16px; }
.tests-selected-subject {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px;
  padding: clamp(16px, 2.5vw, 26px); border-radius: var(--radius-tile); background: var(--g-bg);
}
.tests-selected-subject h2 { margin: 0; color: var(--c-dark); font-size: clamp(32px, 4vw, 54px); line-height: .96; }
.tests-selected-subject .tests-change-subject { display: inline-flex; gap: 8px; align-items: center; background: var(--c-white); }
.tests-change-subject svg { width: 16px; height: 16px; transform: rotate(180deg); }
.tests-section { scroll-margin-top: 100px; margin-top: clamp(28px, 4vw, 56px); }
.tests-section h2 { margin-bottom: 16px; }
#proyti, #shkolnikam { margin-top: 0; }
#test-finals { margin-bottom: 24px; }
.tests-builder-link { margin-top: 4px; }
.tests-grid, .tests-skills, .tests-classes, .tests-errors, .tests-check-list { list-style: none; padding: 0; }
.tests-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 285px), 1fr)); gap: 12px; }
.tests-card {
  display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; justify-content: stretch;
  gap: 8px; height: 100%; padding: 20px 46px 20px 22px;
  background: var(--g-bg, var(--c-white)); color: var(--c-text); border: 1px solid var(--c-mint-line);
}
.tests-card:is(:hover, :focus-visible) { border-color: var(--g-ink, var(--c-teal)); }
.tests-card strong { color: var(--c-dark); font: 700 28px/.98 var(--f-display); text-transform: uppercase; }
.tests-card .tile__arrow { background: var(--c-white); color: var(--g-ink, var(--c-dark)); }
.tests-card:is(:hover, :focus-visible) .tile__arrow { background: var(--c-yellow); }
.tests-card small { color: var(--g-ink, var(--c-green-700)); }
.tests-card span { font-size: 14px; }
#test-finals .tests-card > span:last-child { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.tests-skills, .tests-classes { display: flex; flex-wrap: wrap; gap: 8px; }
.tests-skills li, .tests-classes a {
  display: block; padding: 7px 14px; border-radius: 16px; background: var(--c-white); border: 1px solid var(--c-mint-line);
}
.tests-classes a:is(:hover, :focus-visible) { background: var(--c-mint); text-decoration: underline; }
.tests-options, .tests-workspace, .tests-example, .tests-filters {
  display: grid; gap: 14px; justify-items: start; margin: 16px 0;
  padding: clamp(16px, 3vw, 28px); background: var(--c-white); border-radius: var(--radius-tile);
}
.tests-workspace, .tests-options, .tests-example { max-width: 800px; }
.tests-filters { gap: 16px; }
.tests-filter-group legend, .tests-option-group legend, .tests-filter-search { font-weight: 600; }
.tests-filters .tests-filter-search { width: min(100%, 390px); }
.tests-filters select { width: min(100%, 390px); }
.tests-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tests-pill {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 8px 13px; border: 1px solid var(--c-mint-line);
  border-radius: 13px; background: var(--c-bg); color: var(--c-dark); font: inherit; font-weight: 600; cursor: pointer;
}
.tests-pill:hover, .tests-selected-subject .tests-change-subject:hover { background: var(--c-mint); border-color: var(--c-teal); }
.tests-pill[aria-pressed="true"], .tests-radio:has(:checked) { background: var(--c-dark); color: var(--c-white); border-color: var(--c-dark); }
.tests-radio input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tests-radio:has(:focus-visible) { outline: 2px solid var(--c-teal); outline-offset: 3px; }
.tests-filter-count:not(:empty) { margin-top: 12px; color: var(--c-green-700); }
.tests-filters label, .tests-options label:not(.tests-check, .tests-pill), .tests-question label:not(.tests-choice), .tests-errors form label {
  display: grid; gap: 5px; min-width: 0;
}
.tests-filters label, .tests-grid li, .tests-question fieldset { width: 100%; min-width: 0; }
.tests-filters label { grid-template-columns: minmax(0,1fr); }
.tests-filters input { width: 100%; min-width: 0; }
.tests-page input:not([type="checkbox"], [type="radio"]), .tests-page select {
  max-width: 100%; min-height: 44px; padding: 7px 12px; border: 1px solid var(--c-green-700);
  border-radius: 12px; background: var(--c-white); color: var(--c-dark); font: inherit;
}
.tests-page input[type="checkbox"], .tests-page input[type="radio"] { accent-color: var(--c-teal); }
.tests-page fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.tests-page legend { margin-bottom: 6px; }
.tests-check, .tests-choice {
  display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 8px 12px;
  background: var(--c-bg); border: 1px solid var(--c-mint-line); border-radius: 12px; cursor: pointer;
}
.tests-choice + .tests-choice { margin-top: 8px; }
.tests-choice:has(:checked), .tests-check:has(:checked) { background: var(--c-mint); border-color: var(--c-teal); }
.tests-choice input, .tests-check input { flex: none; }
.tests-page :is(a, button, input, select, summary):focus-visible { outline: 2px solid var(--c-teal); outline-offset: 3px; }
.tests-page .btn-pill:disabled, .tests-quiet:disabled { opacity: .5; cursor: default; }
.tests-quiet {
  padding: 9px 13px; min-height: 44px; color: var(--c-dark); background: var(--c-bg);
  border: 1px solid var(--c-mint-line); border-radius: 12px; font: inherit; cursor: pointer;
}
.tests-quiet:hover:not(:disabled) { background: var(--c-mint); }
.tests-quiet .btn-pill__label { display: inline; text-box: normal; }
.tests-question, .tests-errors { width: 100%; }
.tests-page .btn-pill { min-height: 48px; height: auto; max-width: 100%; padding-block: 4px; white-space: normal; text-align: left; }
.tests-page .btn-pill__icon { flex: none; width: 40px; height: 40px; }
.tests-page .btn-pill--yellow:hover { color: var(--c-dark); background: #FFD465; }
.tests-workspace { scroll-margin-top: 95px; }
.tests-status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; width: 100%; }
.tests-jump { min-height: 36px; margin-top: -6px; color: var(--c-green-700); text-decoration: underline; text-underline-offset: .18em; }
.tests-jump .btn-pill__label { text-box: normal; }
.tests-progress, .tests-timer { align-self: center; }
.tests-status progress { width: 100%; height: 8px; accent-color: var(--c-teal); }
.tests-options h2 { margin: 0; font-size: clamp(21px, 3vw, 28px); }
.tests-preferences { display: flex; flex-wrap: wrap; align-items: end; gap: 14px 24px; }
.tests-preferences .tests-check { border-radius: 13px; }
.tests-check-list .tests-quiet { min-width: 44px; }
.tests-check-list [data-answered="true"] { background: var(--c-mint-cell); border-color: var(--c-teal); }
.tests-question .tests-actions { margin-top: 16px; }
.tests-workspace h3 { font-size: clamp(21px, 3vw, 30px); line-height: 1.3; }
.tests-workspace h3:focus { outline: none; }
.tests-progress, .tests-timer { color: var(--c-green-700); font-weight: 600; }
.tests-timer { font-variant-numeric: tabular-nums; }
.tests-errors li, .tests-parent { padding: 14px; border-radius: 12px; background: var(--c-bg); }
.tests-errors li + li, .tests-errors p, .tests-errors details details, .tests-example details p { margin-top: 9px; }
.tests-check-list { display: grid; gap: 8px; width: min(100%, 38rem); grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); }
.tests-check-list button { width: 100%; padding-inline: 4px; }
.tests-breakdown { display: grid; width: 100%; max-width: 36rem; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; list-style: none; padding: 0; }
.tests-breakdown li { display: grid; gap: 2px; padding: clamp(9px, 2vw, 18px); background: var(--c-mint); border-radius: 16px; }
.tests-breakdown li:nth-child(2) { background: #ffedbb; }
.tests-breakdown li:nth-child(3) { background: var(--c-bg); }
.tests-breakdown strong { font: 700 36px/1 var(--f-display); color: var(--c-dark); }
.tests-breakdown span { font-size: 14px; }
.tests-errors summary { padding-block: 5px; line-height: 1.45; }
.tests-errors details[open] > summary { color: var(--c-green-700); }
.tests-parent p { margin: 5px 0 10px; }
.tests-parent a { display: inline-flex; flex-wrap: wrap; }
.tests-page summary { cursor: pointer; font-weight: 600; }
.tests-page { overflow-wrap: anywhere; }
@media (max-width: 960px) {
  .tests-audiences { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .tests-audiences { gap: 8px; }
  .tests-audience { min-height: 172px; padding: 12px; gap: 5px; }
  .tests-audience .tile__arrow { width: 28px; height: 28px; top: 12px; right: 12px; }
  .tests-audience__icon { width: 43px; height: 43px; margin-bottom: 6px; border-radius: 12px; }
  .tests-audience__icon svg { width: 24px; height: 24px; }
  .tests-audience__name { font-size: clamp(23px, 7vw, 36px); overflow-wrap: normal; }
  .tests-audience__detail { font-size: 13px; }
  .tests-hero { overflow: clip; }
  .tests-hero .page-hero__lead { margin-top: 16px; }
  .tests-hero--catalog .page-hero__inner { display: block; }
  .tests-hero--catalog .page-hero__title { font-size: clamp(45px, 11vw, 64px); }
  .tests-hero__visual { display: none; }
  .tests-grid { grid-template-columns: 1fr; }
  .tests-card { padding: 16px 48px 16px 16px; }
  .tests-options .tests-controls { width: 100%; }
}
@media (max-width: 340px) {
  .tests-audiences { grid-template-columns: 1fr; }
}
