.opi,
.opi * {
  box-sizing: border-box;
}

.opi {
  --opi-blue: #1769aa;
  --opi-blue-dark: #0e4f86;
  --opi-sky: #eaf6ff;
  --opi-yellow: #ffd65a;
  --opi-ink: #17324d;
  --opi-muted: #607286;
  --opi-line: #d9e5ef;
  --opi-white: #fff;
  width: 100%;
  max-width: 920px;
  margin: 32px auto;
  color: var(--opi-ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
}

.opi__header {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 5vw, 48px);
  border-radius: 24px 24px 0 0;
  color: var(--opi-white);
  background: linear-gradient(135deg, #0f5f9e 0%, #1686c2 62%, #24a9cc 100%);
}

.opi__header::after {
  position: absolute;
  right: -38px;
  bottom: -64px;
  width: 210px;
  height: 210px;
  border: 28px solid rgba(255, 255, 255, .1);
  border-radius: 50%;
  content: "";
}

.opi__eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  white-space: nowrap;
}

.opi__header h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  color: inherit;
  font-size: clamp(29px, 5vw, 44px);
  line-height: 1.12;
}

.opi__header p {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, .92);
  font-size: 17px;
}

.opi__form {
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--opi-line);
  border-top: 0;
  background: var(--opi-white);
  box-shadow: 0 18px 46px rgba(33, 75, 110, .11);
}

.opi__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.opi__field {
  display: grid;
  gap: 7px;
  margin: 0;
  color: var(--opi-ink);
  font-weight: 750;
}

.opi__field--wide {
  grid-column: 1 / -1;
}

.opi__field small {
  color: var(--opi-muted);
  font-weight: 500;
}

.opi select,
.opi input[type="text"] {
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 11px 44px 11px 14px;
  border: 1px solid #bfd0df;
  border-radius: 12px;
  color: var(--opi-ink);
  background-color: var(--opi-white);
  font: inherit;
  font-weight: 600;
  transition: border-color .2s, box-shadow .2s;
}

.opi input[type="text"] {
  padding-right: 14px;
}

.opi select:focus,
.opi input[type="text"]:focus,
.opi button:focus-visible,
.opi a:focus-visible,
.opi summary:focus-visible {
  outline: 3px solid rgba(23, 105, 170, .23);
  outline-offset: 2px;
}

.opi select:disabled {
  color: #5f7183;
  background: #f2f6f9;
  opacity: 1;
}

.opi select.opi__invalid {
  border-color: #ca2f3b;
  box-shadow: 0 0 0 3px rgba(202, 47, 59, .14);
}

.opi__choice-group {
  min-width: 0;
  margin: 28px 0 0;
  padding: 0;
  border: 0;
}

.opi__choice-group legend {
  margin-bottom: 10px;
  padding: 0;
  color: var(--opi-ink);
  font-weight: 750;
}

.opi__choices {
  display: grid;
  gap: 10px;
}

.opi__choices--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.opi__choices label {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.opi__choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.opi__choices span {
  display: grid;
  min-height: 72px;
  align-content: center;
  padding: 11px 13px;
  border: 1px solid var(--opi-line);
  border-radius: 13px;
  color: var(--opi-ink);
  background: #fbfdff;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .2s;
}

.opi__choices b {
  font-size: 15px;
}

.opi__choices small {
  margin-top: 2px;
  color: var(--opi-muted);
}

.opi__choices input:checked + span {
  border-color: var(--opi-blue);
  background: var(--opi-sky);
  box-shadow: inset 0 0 0 1px var(--opi-blue), 0 5px 16px rgba(23, 105, 170, .09);
}

.opi__choices input:focus-visible + span {
  outline: 3px solid rgba(23, 105, 170, .23);
  outline-offset: 2px;
}

.opi__choices label:hover span {
  transform: translateY(-1px);
  border-color: #90b7d6;
}

.opi__name {
  max-width: 420px;
  margin-top: 28px;
}

.opi__submit {
  display: inline-flex;
  min-height: 55px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 26px;
  padding: 13px 25px;
  border: 0;
  border-radius: 13px;
  color: var(--opi-white);
  background: linear-gradient(135deg, var(--opi-blue), #138dc0);
  box-shadow: 0 10px 22px rgba(23, 105, 170, .23);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}

.opi__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 13px 25px rgba(23, 105, 170, .3);
}

.opi__helper {
  border: 1px solid var(--opi-line);
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: #f8fbfd;
}

.opi__helper summary {
  padding: 18px clamp(22px, 4vw, 38px);
  color: var(--opi-blue-dark);
  font-weight: 800;
  cursor: pointer;
}

.opi__helper-body {
  padding: 0 clamp(22px, 4vw, 38px) 24px;
}

.opi__helper-body > p:first-child {
  margin: 0 0 11px;
  font-weight: 700;
}

.opi__helper-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opi__helper-buttons button,
.opi__another {
  padding: 9px 14px;
  border: 1px solid #a9c5dc;
  border-radius: 999px;
  color: var(--opi-blue-dark);
  background: var(--opi-white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.opi__helper-buttons button:hover,
.opi__another:hover {
  border-color: var(--opi-blue);
  background: var(--opi-sky);
}

.opi__helper-note {
  margin: 13px 0 0;
  color: var(--opi-muted);
  font-size: 14px;
}

.opi__results {
  scroll-margin-top: 24px;
  margin-top: 28px;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--opi-line);
  border-radius: 20px;
  background: var(--opi-white);
  box-shadow: 0 18px 46px rgba(33, 75, 110, .11);
}

.opi__results-heading {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.opi__results-icon {
  display: grid;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 15px;
  background: var(--opi-sky);
  font-size: 25px;
}

.opi__results h3,
.opi__results h4 {
  margin: 0;
  color: var(--opi-ink);
}

.opi__results h3 {
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.22;
}

.opi__results-heading p {
  margin: 6px 0 0;
  color: var(--opi-muted);
}

.opi__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 20px 0;
}

.opi__meta span {
  padding: 5px 10px;
  border-radius: 999px;
  color: #37546d;
  background: #edf3f7;
  font-size: 13px;
  font-weight: 700;
}

.opi__result-list {
  display: grid;
  gap: 11px;
}

.opi__card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--opi-line);
  border-radius: 14px;
  background: #fcfdff;
}

.opi__card-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--opi-blue-dark);
  background: var(--opi-sky);
  font-weight: 850;
}

.opi__card h4 {
  font-size: 16px;
}

.opi__card p {
  margin: 3px 0 0;
  color: var(--opi-muted);
  font-size: 13px;
}

.opi__card-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.opi__open,
.opi__answers,
.opi__store-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border-radius: 10px;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 800;
}

.opi__open {
  color: var(--opi-white) !important;
  background: var(--opi-blue);
}

.opi__answers {
  border: 1px solid #a9c5dc;
  color: var(--opi-blue-dark) !important;
  background: var(--opi-white);
}

.opi__results-footer {
  margin-top: 17px;
  text-align: center;
}

.opi__store {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding: 19px;
  border-radius: 15px;
  background: #fff7dc;
}

.opi__store h4 {
  font-size: 18px;
}

.opi__store p {
  margin: 3px 0 0;
  color: #6a5c2d;
  font-size: 14px;
}

.opi__store-button {
  flex: 0 0 auto;
  color: #3c330f !important;
  background: var(--opi-yellow);
}

.opi__notice {
  padding: 14px;
  border-left: 4px solid #d69421;
  background: #fff8e8;
}

@media (max-width: 700px) {
  .opi__grid,
  .opi__choices--three {
    grid-template-columns: 1fr;
  }

  .opi__field--wide {
    grid-column: auto;
  }

  .opi__choices span {
    min-height: 62px;
  }

  .opi__card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .opi__card-actions {
    grid-column: 1 / -1;
    padding-left: 48px;
  }

  .opi__store {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .opi {
    margin: 20px auto;
  }

  .opi__header {
    border-radius: 18px 18px 0 0;
  }

  .opi__submit,
  .opi__open,
  .opi__answers,
  .opi__store-button {
    width: 100%;
  }

  .opi__card-actions {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .opi *,
  .opi *::before,
  .opi *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* 0.3.0 */
.opi__helper[hidden]{display:none!important}
.opi__loading{display:flex;align-items:center;justify-content:center;gap:12px;min-height:90px;color:var(--opi-muted);font-weight:800}
.opi__loading-spinner{width:22px;height:22px;border:3px solid #dbe9f3;border-top-color:var(--opi-blue);border-radius:50%;animation:opi-spin .8s linear infinite}
@keyframes opi-spin{to{transform:rotate(360deg)}}

.opi__no-answers{display:inline-flex;align-items:center;min-height:42px;padding:8px 12px;border-radius:10px;background:#f4f6f8;color:#667085;font-size:.82rem;font-weight:700;line-height:1.25;}
