.was {
  --was-radius: 20px;
  display: block;
  max-width: var(--container);
  margin: 0 auto;
  padding: 48px var(--gutter) 0;
  color: var(--ink);
}

.was-intro {
  max-width: 760px;
  margin: 0 auto 40px;
  text-align: center;
}

.was-title {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  margin-bottom: 16px;
}

.was-lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 auto 14px;
  max-width: 640px;
}

.was-byline {
  font-size: 14px;
  color: var(--muted);
}

.was-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}

.was-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.was-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--was-radius);
  padding: 28px;
}

.was-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.was-card-titles {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.was-step {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--coral-tint);
  color: var(--coral-text);
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.was .was-card-title {
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  margin: 3px 0 2px;
}

.was-card-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.was-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.was-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.was-input-wrap {
  position: relative;
  display: block;
}

.was-input {
  width: 100%;
  min-height: 46px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font-size: 16px;
  padding: 10px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -moz-appearance: textfield;
  appearance: none;
}

select.was-input {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23111827' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.was-input-wrap .was-input {
  padding-right: 44px;
}

.was-input::-webkit-outer-spin-button,
.was-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.was-input:hover {
  border-color: #d1d5db;
}

.was-input:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 118, 117, 0.22);
}

.was-input[aria-invalid="true"] {
  border-color: #dc2626;
}

.was-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--muted);
  pointer-events: none;
}

.was-hint {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

.was-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.was-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.was-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.was-chip {
  min-height: 42px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.was-chip:hover {
  border-color: var(--coral);
}

.was-chip[aria-checked="true"] {
  background: var(--coral-text);
  border-color: var(--coral-text);
  color: var(--white);
}

.was-summary {
  position: sticky;
  top: 96px;
}

.was-summary-inner {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--was-radius);
  padding: 28px 24px 22px;
}

.was .was-summary-title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 14px;
}

.was-empty p {
  color: var(--footer-text);
  font-size: 15px;
  line-height: 1.55;
  padding: 18px 0 24px;
}

.was-hero {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.was-hero-num {
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 600;
  line-height: 1;
  color: var(--white);
}

.was-hero-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--footer-text);
}

.was-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 16px;
}

.was-stats div {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
}

.was-stats dt {
  font-size: 12px;
  color: var(--footer-text);
}

.was-stats dd {
  font-size: 19px;
  font-weight: 700;
  color: var(--white);
  margin: 2px 0 0;
}

.was-small {
  font-size: 12px;
  line-height: 1.5;
  color: #9ca3af;
  margin-top: 14px;
}

.was-article {
  max-width: 820px;
  margin: 56px auto 0;
}

.was-article h2:first-child {
  margin-top: 0;
}

@media (max-width: 1024px) {
  .was-layout {
    grid-template-columns: 1fr;
  }
  .was-summary {
    position: static;
  }
}

@media (max-width: 720px) {
  .was {
    padding-top: 32px;
  }
  .was-card {
    padding: 20px 16px;
  }
  .was-grid-2 {
    grid-template-columns: 1fr;
  }
  .was-hero-num {
    font-size: 52px;
  }
}

@media print {
  body {
    background: #fff;
  }
  .was-layout {
    display: block;
  }
  .was-summary {
    position: static;
  }
  .was-summary-inner {
    background: #fff;
    color: #111827;
    border: 1px solid #e5e7eb;
  }
  .was-stats div {
    background: #f9fafb;
  }
}

.was-segment {
  display: inline-flex;
  background: var(--placeholder);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 2px;
}

.was-segment-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  min-height: 36px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.was-segment-btn[aria-checked="true"] {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.12);
}

.was-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.was-grid-2.was-gap-top {
  margin-top: 18px;
}

.was-hint-gap {
  display: block;
  margin-top: 10px;
}

.was-verdict {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 16px;
}

.was-verdict::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.was-verdict.is-good {
  color: #86efac;
  background: rgba(134, 239, 172, 0.12);
}

.was-verdict.is-warn {
  color: #fde68a;
  background: rgba(253, 230, 138, 0.12);
}

.was-verdict.is-bad {
  color: #fca5a5;
  background: rgba(252, 165, 165, 0.14);
}

.was-fix {
  font-size: 14px;
  line-height: 1.55;
  color: var(--footer-text);
  border-top: 1px solid var(--footer-border);
  padding-top: 14px;
}

.was-fix strong {
  color: var(--white);
}

.was-diagram-card {
  margin-top: 28px;
}

.was-diagram {
  margin: 0;
  border-radius: 16px;
  background: #fbf7f4;
  border: 1px solid var(--border);
  overflow: hidden;
}

.was-diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 720px) {
  .was-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 400px) {
  .was-grid-4 {
    grid-template-columns: 1fr;
  }
}

.was-chip.is-on {
  border-color: var(--coral-text);
  color: var(--coral-text);
  background: var(--coral-tint);
}

.was-chip:focus-visible,
.was-segment-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.was-sub-label {
  font-size: 13px;
  font-weight: 600;
  margin: 18px 0 8px;
}

.was-block[hidden],
.was-field[hidden] {
  display: none;
}

.was-stats div.is-alert {
  background: rgba(252, 165, 165, 0.16);
  box-shadow: inset 0 0 0 1px rgba(252, 165, 165, 0.5);
}

.was-stats div.is-alert dd {
  color: #fca5a5;
}

.was-out {
  margin-top: 18px;
  padding: 16px;
  border-radius: 14px;
  background: var(--soft);
  border: 1px solid var(--border);
}

.was-out-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 15px;
}

.was-out-row strong {
  font-weight: 700;
}

.was-out h3 {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  margin: 14px 0 6px;
}

.was-std {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.was-std li {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 14px;
  font-weight: 600;
}

.was-px-wrap {
  overflow-x: auto;
}

.was-px {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.was-px td {
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}

.was-px td:last-child {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.was-px tr:last-child td {
  border-bottom: 0;
}

.was-stats dd {
  font-variant-numeric: tabular-nums;
}

.was-hero-num {
  font-size: 46px;
}

.was-hero-label {
  font-size: 14px;
  line-height: 1.45;
  flex-basis: 100%;
}

@media (max-width: 720px) {
  .was-hero-num {
    font-size: 40px;
  }
}

.was-gap-top {
  margin-top: 16px;
}

.was-gap-top-lg {
  margin-top: 20px;
}

.was-segment-fill {
  display: flex;
  width: 100%;
}

.was-segment-fill .was-segment-btn {
  flex: 1 1 0;
  padding: 8px 10px;
}

.was-diagram svg text {
  paint-order: stroke;
  stroke: #fbf7f4;
  stroke-width: 3px;
}

@media (max-width: 400px) {
  .was-grid-3 {
    gap: 12px;
  }
  .was-segment-fill,
  .was-field-wide {
    grid-column: 1 / -1;
  }
}

.was-article p,
.was-article li {
  text-wrap: pretty;
}

.was-article h2,
.was-article h3,
.was-title,
.was-card-sub,
.was-lead {
  text-wrap: balance;
}

.was ::selection {
  background: var(--coral-tint-2);
  color: var(--ink);
}

.was-summary ::selection {
  background: var(--coral-text);
  color: var(--white);
}

.was-input {
  caret-color: var(--coral-text);
}

.was-stats div[hidden] {
  display: none;
}

.was-grid-3 {
  align-items: end;
}
