.pseo-expert {
  --expert-ink: #13252b;
  --expert-muted: #52646a;
  --expert-accent: #c83f31;
  --expert-paper: #fffdf8;
  --expert-line: #dfd6c7;
  margin: clamp(2.5rem, 6vw, 5rem) 0;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  color: var(--expert-ink);
  background: linear-gradient(145deg, #fffdf8 0%, #f8f2e8 100%);
  border: 1px solid var(--expert-line);
  border-radius: 24px;
  box-shadow: 0 18px 55px rgba(19, 37, 43, .08);
}

.pseo-expert h2,
.pseo-expert h3,
.pseo-expert p,
.pseo-expert ul,
.pseo-expert ol {
  margin-top: 0;
}

.pseo-expert__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.pseo-expert__heading h2 {
  max-width: 850px;
  margin-bottom: .65rem;
  font-size: clamp(1.75rem, 3.5vw, 2.7rem);
  line-height: 1.08;
  text-wrap: balance;
}

.pseo-expert__heading p:not(.pseo-expert__checked) {
  max-width: 760px;
  color: var(--expert-muted);
  font-size: 1.05rem;
}

.pseo-expert__checked {
  margin: 0;
  padding: .55rem .8rem;
  color: #725c4c;
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--expert-line);
  border-radius: 999px;
  font-size: .82rem;
  white-space: nowrap;
}

.pseo-expert__flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  padding: 0;
  list-style: none;
  counter-reset: route-step;
}

.pseo-expert__flow li {
  min-width: 0;
  padding: 1rem;
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--expert-line);
  border-radius: 16px;
  counter-increment: route-step;
}

.pseo-expert__flow li::before {
  display: grid;
  width: 2rem;
  height: 2rem;
  margin-bottom: .8rem;
  place-items: center;
  color: #fff;
  background: var(--expert-accent);
  border-radius: 50%;
  content: counter(route-step);
  font-weight: 800;
}

.pseo-expert__flow strong,
.pseo-expert__flow span {
  display: block;
}

.pseo-expert__flow span {
  margin-top: .35rem;
  color: var(--expert-muted);
  font-size: .92rem;
  line-height: 1.45;
}

.pseo-expert__route-note,
.pseo-expert__current {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: #fff;
  border-left: 4px solid var(--expert-accent);
  border-radius: 0 12px 12px 0;
}

.pseo-expert__current h3 {
  margin-bottom: .45rem;
  font-size: 1.05rem;
}

.pseo-expert__current p {
  margin-bottom: .45rem;
  color: var(--expert-muted);
}

.pseo-expert__current p:last-child {
  margin-bottom: 0;
}

.pseo-expert__columns,
.pseo-expert__result {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.pseo-expert__columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.pseo-expert__columns > div,
.pseo-expert__result > div {
  padding: 1.15rem;
  background: rgba(255, 255, 255, .74);
  border: 1px solid var(--expert-line);
  border-radius: 16px;
}

.pseo-expert__columns h3,
.pseo-expert__result h3 {
  margin-bottom: .55rem;
  font-size: 1.08rem;
}

.pseo-expert__columns ul,
.pseo-expert__documents ul,
.pseo-expert__sources ul {
  margin-bottom: 0;
  padding-left: 1.2rem;
}

.pseo-expert__columns li + li,
.pseo-expert__documents li + li,
.pseo-expert__sources li + li {
  margin-top: .45rem;
}

.pseo-expert__inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.pseo-expert__inputs article {
  min-width: 0;
  padding: 1.1rem;
  background: #fff;
  border: 1px solid var(--expert-line);
  border-radius: 16px;
}

.pseo-expert__inputs h3 {
  margin-bottom: .45rem;
  font-size: 1.05rem;
}

.pseo-expert__inputs p,
.pseo-expert__result p {
  margin-bottom: 0;
  color: var(--expert-muted);
}

.pseo-expert__documents,
.pseo-expert__sources {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, .72);
  border: 1px solid var(--expert-line);
  border-radius: 14px;
}

.pseo-expert summary {
  cursor: pointer;
  font-weight: 800;
}

.pseo-expert details[open] summary {
  margin-bottom: .8rem;
}

.pseo-expert__sources a {
  color: #9f2e24;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .pseo-expert__flow,
  .pseo-expert__result {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .pseo-expert {
    margin-inline: -.25rem;
    padding: 1rem;
    border-radius: 18px;
  }

  .pseo-expert__heading,
  .pseo-expert__flow,
  .pseo-expert__columns,
  .pseo-expert__result,
  .pseo-expert__inputs {
    grid-template-columns: 1fr;
  }

  .pseo-expert__heading {
    gap: .75rem;
  }

  .pseo-expert__checked {
    justify-self: start;
    white-space: normal;
  }
}

@media print {
  .pseo-expert {
    break-inside: avoid;
    box-shadow: none;
  }

  .pseo-expert__sources {
    display: none;
  }
}
