.guide-shell {
  width: min(calc(100% - 32px), 1100px);
  margin-inline: auto;
  padding-block: 22px clamp(38px, 7vw, 80px);
}

.guide-top {
  display: flex;
  justify-content: end;
  margin-bottom: 16px;
}

.guide-top a,
.guide-sources a {
  color: var(--wine, #63283f);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.guide-top a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.guide-top a:hover,
.guide-sources a:hover {
  text-decoration-thickness: 2px;
}

.guide-workspace {
  display: grid;
  grid-template-columns: minmax(230px, 0.83fr) minmax(0, 2fr);
  gap: clamp(16px, 3vw, 30px);
  align-items: start;
}

.guide-welcome {
  grid-template-columns: minmax(260px, 1fr) minmax(0, 1fr);
  align-items: stretch;
}

.guide-card,
.compare-panel {
  background: var(--surface, #fffcfa);
  border: 1px solid var(--line, #dfd4d6);
  border-radius: 22px;
  box-shadow: var(--shadow, 0 14px 38px rgb(66 28 45 / 7%));
}

.guide-card {
  padding: clamp(20px, 5vw, 42px);
  min-width: 0;
}

.guide-card h1,
.guide-bilan h1,
.guide-public-compare h1 {
  margin: 0;
  font-family: var(--font-display, Georgia, serif);
  font-weight: 400;
  line-height: 1.03;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
}

.guide-card h1:focus,
.guide-bilan h1:focus {
  outline: 0;
}

.guide-card h2 {
  margin: 0 0 12px;
  font-family: var(--font-display, Georgia, serif);
  font-weight: 500;
  line-height: 1.1;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.guide-card h3 {
  margin: 18px 0 6px;
  font: 700 1rem/1.45 var(--font-body, system-ui, sans-serif);
}

.guide-card .eyebrow,
.guide-bilan .eyebrow {
  margin-bottom: 12px;
}

.guide-helper {
  color: var(--muted, #66565d);
  margin-block: 14px 22px;
}

.guide-studio {
  background: var(--wine-dark, #33111f);
  color: #fff8fb;
  border: 1px solid #462131;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 14px 28px rgb(66 28 45 / 15%);
}

.guide-studio img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

.guide-welcome .guide-studio img {
  height: 100%;
}

.guide-studio-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  font-weight: 650;
}

.guide-studio-controls img {
  border-block: 1px solid rgb(255 244 249 / 16%);
  aspect-ratio: 4 / 3;
}

.guide-studio-controls p {
  padding: 0 14px;
  margin-block: 12px;
  color: #f6e4eb;
}

.guide-voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 14px;
}

.guide-voice-actions button {
  color: #fff8fb;
  background: rgb(255 244 249 / 8%);
  border: 1px solid rgb(255 244 249 / 38%);
  border-radius: 9px;
  padding: 6px 10px;
  min-height: 44px;
  font: inherit;
  cursor: pointer;
}

.guide-voice-actions button:hover {
  background: rgb(255 244 249 / 18%);
}

.guide-spectrum {
  min-width: 35px;
  display: flex;
  gap: 2px;
  align-items: center;
  height: 20px;
}

.guide-spectrum i {
  height: 11px;
  width: 2px;
  display: block;
  border-radius: 4px;
  background: #e0b2c6;
  transform: scaleY(0.42);
}

.guide-studio-controls.speaking .guide-spectrum i {
  animation: guide-wave 640ms ease-in-out infinite alternate;
}

.guide-studio-controls.speaking .guide-spectrum i:nth-child(2n) {
  animation-delay: -190ms;
}
.guide-studio-controls.speaking .guide-spectrum i:nth-child(3n) {
  animation-delay: -440ms;
}

@keyframes guide-wave {
  from { transform: scaleY(0.35); }
  to { transform: scaleY(1.5); }
}

.guide-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0 0 26px;
  list-style: none;
}

.guide-progress li {
  color: var(--muted, #66565d);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  position: relative;
  padding-top: 12px;
  min-width: 0;
}

.guide-progress li::before {
  content: "";
  width: 100%;
  height: 3px;
  top: 0;
  left: 0;
  position: absolute;
  border-radius: 3px;
  background: var(--line, #dfd4d6);
}

.guide-progress li.complete::before {
  background: #aa788f;
}

.guide-progress li[aria-current] {
  color: var(--wine, #63283f);
  font-weight: 750;
}
.guide-progress li[aria-current]::before {
  background: var(--wine, #63283f);
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 22px;
}

.guide-options {
  display: grid;
  gap: 9px;
  padding: 0;
  border: 0;
  margin: 0;
  min-inline-size: 0;
}

.guide-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid var(--line, #dfd4d6);
  border-radius: 10px;
  cursor: pointer;
}

.guide-options label:has(:checked) {
  background: #f6eaf0;
  border-color: var(--wine, #63283f);
}

.guide-options input {
  accent-color: var(--wine, #63283f);
  margin: 0;
  padding: 0;
  width: 1rem;
  height: 1rem;
}

.guide-options span {
  font-weight: 600;
}

.guide-error {
  margin-block: 0 20px;
}

.guide-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 16px;
  margin-block: 12px 0;
  font-size: 0.875rem;
}

.guide-bilan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.guide-bilan-aside {
  display: grid;
  gap: 18px;
}

.guide-bilan-aside p:last-child {
  margin-bottom: 0;
}

.guide-bilan-fields {
  display: grid;
  margin: 0;
}

.guide-bilan-fields > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 8px;
  border-bottom: 1px solid var(--line, #dfd4d6);
  padding: 10px 0;
}

.guide-bilan-fields > div:last-child {
  border-bottom: 0;
}

.guide-bilan-fields dt {
  grid-column: 1;
  color: var(--muted, #66565d);
  font-size: 0.875rem;
  font-weight: 650;
}

.guide-bilan-fields dd {
  grid-column: 1;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.guide-bilan-fields button {
  grid-column: 2;
  grid-row: 1 / span 2;
  padding-inline: 8px;
  min-height: 44px;
  font-size: 0.875rem;
}

.guide-next {
  background: var(--wine-dark, #33111f);
  border-color: var(--wine-dark, #33111f);
  color: #fff8fb;
}

.guide-next h2,
.guide-next p {
  color: inherit;
}

.guide-next ol {
  padding-left: 1.4rem;
  margin-block: 12px 22px;
}

.guide-next li + li {
  margin-top: 7px;
}

.guide-next .button {
  max-width: 100%;
  white-space: normal;
}

.guide-bilan-actions {
  justify-content: space-between;
}

.compare-panel {
  padding: clamp(16px, 3vw, 28px);
  background: var(--surface, #fffcfa);
  margin-block: 20px;
}

.compare-panel h2 {
  margin: 0 0 16px;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
}

.compare-selects,
.compare-profiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.compare-selects label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  min-width: 0;
}

.compare-selects select {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  background-color: var(--surface, #fffcfa);
  border: 1px solid var(--line, #dfd4d6);
  color: var(--ink, #291c22);
  border-radius: 8px;
  padding: 6px 29px 6px 8px;
  font: inherit;
}

.compare-profiles {
  margin-top: 12px;
}

.compare-profile {
  border: 1px solid var(--line, #dfd4d6);
  border-radius: 12px;
  background: #faf5f6;
  padding: 14px;
}

.compare-profile h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.compare-profile p,
.compare-profile dl {
  margin: 0 0 8px;
}

.compare-profile dt,
.compare-costs dt {
  font-weight: 650;
}

.compare-profile dd,
.compare-costs dd {
  margin: 0 0 8px;
}

.compare-costs {
  margin-top: 15px;
  border-top: 1px solid var(--line, #dfd4d6);
}

.compare-costs summary {
  padding: 10px 0;
  cursor: pointer;
  min-height: 44px;
  box-sizing: border-box;
  color: var(--wine, #63283f);
  font-weight: 700;
}

.compare-costs dl {
  margin: 4px 0;
}

.compare-profile dl > div + div,
.compare-costs dl > div + div {
  border-top: 1px solid var(--line, #dfd4d6);
  padding-top: 8px;
}

.pij-information li + li {
  margin-top: 0.5em;
}

.pij-information a {
  overflow-wrap: anywhere;
}

@media (max-width: 750px) {
  .guide-workspace,
  .guide-bilan-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-welcome .guide-studio img {
    height: auto;
    aspect-ratio: 2 / 1;
  }

  .guide-studio-controls {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    padding: 8px 11px;
    border-radius: 14px;
  }

  .guide-studio-controls img {
    grid-area: 1 / 1 / 3 / 2;
    border: 0;
    border-radius: 6px;
    width: 54px;
  }

  .guide-studio-heading {
    grid-column: 2;
    padding: 0 2px;
    font-size: 0.875rem;
  }

  .guide-studio-controls p {
    grid-column: 2;
    padding: 1px 2px;
    margin: 0;
    font-size: 0.875rem;
  }

  .guide-voice-actions {
    grid-column: 1 / -1;
    padding: 7px 0 0;
  }
}

@media (max-width: 450px) {
  .guide-shell {
    padding-top: 8px;
  }

  .guide-top {
    margin-bottom: 4px;
  }

  .guide-bilan-fields button {
    padding-inline: 5px;
  }

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

  .guide-actions .button {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-studio-controls.speaking .guide-spectrum i {
    animation: none;
    transform: scaleY(1);
  }
}

