.asvs {
  --asvs-navy: #173251;
  --asvs-navy-2: #2b5683;
  --asvs-blue: #5aa7e6;
  --asvs-gold: #b8914a;
  --asvs-ink: #1d2733;
  --asvs-muted: #55657a;
  --asvs-line: #c9d8ea;
  --asvs-bg: #f5f8fb;
  --asvs-good: #1f7a4d;
  --asvs-good-bg: #e7f4ec;
  --asvs-warn: #8a5a00;
  --asvs-warn-bg: #fdf3dc;
  --asvs-bad: #a12b2b;
  --asvs-bad-bg: #fbeaea;
  position: relative;
  margin: 0 0 32px;
  color: var(--asvs-ink);
  background: #fff;
  line-height: 1.45;
  font-size: 16px;
}
.asvs *, .asvs *::before, .asvs *::after { box-sizing: border-box; }
.asvs [hidden] { display: none !important; }

/* Вкладки */
.asvs-tabs { display: flex; gap: 0; border-bottom: 2px solid var(--asvs-navy); margin: 0 0 18px; }
.asvs .asvs-tab {
  flex: 1 1 50%;
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; margin: 0; padding: 10px 14px;
  font: inherit; font-size: 16px; font-weight: 600; line-height: 1.2; letter-spacing: 0; text-transform: none;
  color: var(--asvs-navy); background: var(--asvs-bg);
  border: 1px solid var(--asvs-line); border-bottom: 0; border-radius: 6px 6px 0 0;
  cursor: pointer; box-shadow: none;
}
.asvs .asvs-tab + .asvs-tab { margin-left: 6px; }
.asvs .asvs-tab[aria-selected="true"] { background: var(--asvs-navy); border-color: var(--asvs-navy); color: #fff; }
.asvs .asvs-tab:hover { background: #e6eef7; color: var(--asvs-navy); }
.asvs .asvs-tab[aria-selected="true"]:hover { background: var(--asvs-navy); color: #fff; }
.asvs button:focus-visible, .asvs select:focus-visible, .asvs input:focus-visible, .asvs a:focus-visible {
  outline: 3px solid var(--asvs-blue); outline-offset: 2px;
}

.asvs-lead { margin: 0 0 16px; color: var(--asvs-muted); }

/* Розміри */
.asvs-sizes { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin: 0 0 18px; }
.asvs-card { margin: 0; padding: 12px 14px 14px; border: 1px solid var(--asvs-line); border-radius: 8px; background: var(--asvs-bg); min-width: 0; }
.asvs-card-b { border-color: var(--asvs-navy); background: #fff; }
.asvs-card legend { padding: 0 6px; font-weight: 700; font-size: 15px; color: var(--asvs-navy); }
.asvs-card-a legend::before, .asvs-card-b legend::before { content: ""; display: inline-block; width: 18px; height: 0; margin: 0 8px 4px 0; vertical-align: middle; }
.asvs-card-a legend::before { border-top: 2px dashed #5a88b8; }
.asvs-card-b legend::before { border-top: 6px solid var(--asvs-ink); }
.asvs-sels { display: flex; align-items: flex-end; gap: 8px; }
.asvs-sel { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 13px; color: var(--asvs-muted); }
.asvs-slash { padding-bottom: 11px; color: var(--asvs-muted); font-size: 18px; }
.asvs .asvs-sel select {
  width: 100%; min-height: 44px; margin: 0; padding: 8px 26px 8px 10px;
  font: inherit; font-size: 17px; font-weight: 600; color: var(--asvs-ink);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23173251' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 9px center;
  border: 1px solid #a9bdd4; border-radius: 6px;
  -webkit-appearance: none; appearance: none; box-shadow: none; height: auto;
}
.asvs .asvs-swap {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 44px; height: 44px; min-height: 44px; margin: 14px 0 0; padding: 0;
  font-size: 22px; line-height: 1; color: var(--asvs-navy); background: #fff;
  border: 1px solid var(--asvs-line); border-radius: 50%; cursor: pointer; box-shadow: none;
}
.asvs .asvs-swap:hover { background: var(--asvs-bg); }

/* Результат */
.asvs-result { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; margin: 0 0 18px; }
.asvs-result[data-asvs-result="mark"] { display: block; }
.asvs-verdict { padding: 14px 16px; border-radius: 8px; border: 1px solid; }
.asvs-verdict span { display: block; font-size: 15px; }
.asvs-verdict .asvs-verdict-label { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; opacity: .85; }
.asvs-big { display: block; font-size: 38px; line-height: 1.1; margin: 2px 0 4px; font-weight: 700; }
.asvs-same { color: var(--asvs-good); background: var(--asvs-good-bg); border-color: #b9dcc7; }
.asvs-ok { color: var(--asvs-warn); background: var(--asvs-warn-bg); border-color: #ecd49a; }
.asvs-bad { color: var(--asvs-bad); background: var(--asvs-bad-bg); border-color: #e9b9b9; }
.asvs-verdict.asvs-ok { color: #6a4a00; }
.asvs-facts { margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.asvs-facts div { margin: 0; padding: 10px 12px; border: 1px solid var(--asvs-line); border-radius: 8px; }
.asvs-facts div:last-child { grid-column: 1 / -1; }
.asvs-facts dt { margin: 0; font-size: 13px; color: var(--asvs-muted); font-weight: 400; }
.asvs-facts dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; color: var(--asvs-ink); }
.asvs-notes { margin: 12px 0 0; padding: 10px 14px; border-left: 4px solid var(--asvs-gold); background: #faf6ee; border-radius: 0 8px 8px 0; }
.asvs-notes ul { margin: 0; padding: 0 0 0 18px; }
.asvs-notes li { margin: 4px 0; font-size: 15px; }

.asvs-fig { margin: 0; padding: 10px; border: 1px solid var(--asvs-line); border-radius: 8px; background: #fbfcfe; }
.asvs-svg { display: block; width: 100%; height: auto; }
.asvs-fig figcaption { margin: 6px 0 0; font-size: 13px; color: var(--asvs-muted); text-align: center; line-height: 1.6; }
.asvs-fig figcaption b { color: var(--asvs-ink); margin-right: 10px; }
.asvs-key { display: inline-block; width: 18px; height: 0; margin: 0 6px 3px 0; vertical-align: middle; }
.asvs-key-a { border-top: 2px dashed #5a88b8; }
.asvs-key-b { border-top: 6px solid var(--asvs-ink); }

/* Таблиці */
.asvs-tables { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 18px; margin: 0 0 14px; align-items: start; }
.asvs table { width: 100%; margin: 0; border-collapse: collapse; font-size: 15px; background: #fff; }
.asvs caption { caption-side: top; text-align: left; padding: 0 0 6px; font-weight: 700; color: var(--asvs-navy); font-size: 15px; }
.asvs th, .asvs td { padding: 8px 10px; border: 1px solid var(--asvs-line); text-align: left; vertical-align: middle; }
.asvs thead th { background: var(--asvs-bg); font-size: 13px; font-weight: 600; color: var(--asvs-muted); }
.asvs tbody th { font-weight: 600; }
.asvs-table-wrap { margin: 22px 0 6px; overflow-x: auto; }
.asvs-pairs { white-space: normal; }
.asvs .asvs-pair {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; margin: 3px 6px 3px 0; padding: 6px 12px;
  font: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; color: var(--asvs-navy);
  background: #fff; border: 1px solid #a9bdd4; border-radius: 6px; cursor: pointer; box-shadow: none; text-transform: none;
}
.asvs .asvs-pair small { margin-left: 6px; font-weight: 400; color: var(--asvs-muted); font-size: 13px; }
.asvs .asvs-pair:hover { background: var(--asvs-bg); border-color: var(--asvs-navy); }

.asvs-note, .asvs-hint { margin: 8px 0 0; font-size: 14px; color: var(--asvs-muted); }

/* Маркування */
.asvs-mark-form { margin: 0 0 16px; }
.asvs-field { display: block; margin: 0; }
.asvs-field span { display: block; margin: 0 0 6px; font-weight: 600; font-size: 15px; color: var(--asvs-navy); }
.asvs .asvs-field input {
  width: 100%; max-width: 420px; min-height: 48px; margin: 0; padding: 10px 14px;
  font: inherit; font-size: 20px; font-weight: 600; letter-spacing: .02em; color: var(--asvs-ink);
  background: #fff; border: 1px solid #a9bdd4; border-radius: 6px; box-shadow: none;
}
.asvs .asvs-field input[aria-invalid="true"] { border-color: var(--asvs-bad); }
.asvs-examples { margin: 10px 0 0; font-size: 14px; color: var(--asvs-muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.asvs .asvs-examples button {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; margin: 0; padding: 6px 12px;
  font: inherit; font-size: 14px; color: var(--asvs-navy); background: var(--asvs-bg);
  border: 1px solid var(--asvs-line); border-radius: 6px; cursor: pointer; box-shadow: none; text-transform: none;
}
.asvs .asvs-examples button:hover { border-color: var(--asvs-navy); }
.asvs-error { margin: 10px 0 0; padding: 10px 12px; color: var(--asvs-bad); background: var(--asvs-bad-bg); border-radius: 6px; font-size: 15px; }
.asvs-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; font-size: 24px; font-weight: 700; }
.asvs-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 6px; background: var(--asvs-navy); color: #fff; }
.asvs-chip i, .asvs-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; font-style: normal; font-size: 12px; font-weight: 700; flex: 0 0 22px;
}
.asvs-chip i { background: var(--asvs-gold); color: #fff; }
.asvs-chip-sep { color: var(--asvs-muted); }
.asvs-mark-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.asvs-items { list-style: none; margin: 0; padding: 0; }
.asvs-items li { display: flex; gap: 10px; margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--asvs-line); border-radius: 8px; }
.asvs-num { background: var(--asvs-gold); color: #fff; margin-top: 2px; }
.asvs-items b { display: block; font-size: 14px; color: var(--asvs-muted); font-weight: 600; }
.asvs-val { display: block; font-size: 17px; font-weight: 700; color: var(--asvs-ink); }
.asvs-items small { display: block; font-size: 13px; color: var(--asvs-muted); }
.asvs-dot { margin: 18px 0 0; padding: 14px 16px; border: 1px solid var(--asvs-line); border-radius: 8px; background: var(--asvs-bg); }
.asvs .asvs-dot input { max-width: 160px; }
.asvs-dot-out { margin: 10px 0 0; padding: 10px 12px; border-radius: 6px; border: 1px solid; font-size: 15px; }

/* Мобільний рядок з підсумком */
.asvs-sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 52px; padding: 10px 16px;
  background: var(--asvs-navy); color: #fff !important; text-decoration: none !important;
  font-size: 15px; font-weight: 600; box-shadow: 0 -4px 14px rgba(15, 34, 56, .25);
}
.asvs-sticky-more { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 34px; padding: 4px 12px; background: var(--asvs-blue); color: #0f2238; border-radius: 4px; font-size: 14px; }
@media (min-width: 781px) { .asvs-sticky { display: none !important; } }

@media (max-width: 780px) {
  .asvs-result, .asvs-tables, .asvs-mark-grid { grid-template-columns: minmax(0, 1fr); }
  .asvs-sizes { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .asvs .asvs-swap { margin: 0 auto; transform: rotate(90deg); }
  .asvs-big { font-size: 32px; }
}
@media (max-width: 420px) {
  .asvs .asvs-tab { font-size: 15px; padding: 8px 8px; }
  .asvs-sels { gap: 6px; }
  .asvs .asvs-sel select { font-size: 16px; padding-left: 8px; padding-right: 22px; background-position: right 6px center; }
  .asvs-facts dd { font-size: 17px; }
  .asvs-facts div { padding: 8px 10px; }
  .asvs-chips { font-size: 20px; }
  .asvs th, .asvs td { padding: 7px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .asvs * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
