/* AI SHIFT — warstwa dostępności, responsywności i profilu wdrożeniowego. */
:root { --muted: #735f6a; }

.skip-link {
  position: fixed; left: 12px; top: 8px; z-index: 200; transform: translateY(-160%);
  background: #fff; color: var(--ink); border: 2px solid var(--pink); border-radius: 8px;
  padding: 8px 12px; font-weight: 700;
}
.skip-link:focus { transform: none; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid #f59ac3; outline-offset: 3px;
}
.main:focus { outline: none; }
.sidebar nav { min-height: 0; overflow-y: auto; }
.xp-pill { color: var(--ink); text-decoration: none; }
.xp-pill:hover { text-decoration: none; }

.module > button.mhead {
  width: 100%; border: 0; border-radius: 0; background: transparent; color: var(--ink);
  font: inherit; text-align: left; transform: none;
}
.module > button.mhead:hover { filter: none; }
.module > button.mhead::after { content: "▾"; color: var(--muted); transition: transform .15s; }
.module > button.mhead[aria-expanded="true"]::after { transform: rotate(180deg); }

.eyebrow {
  color: var(--pink); font-family: var(--mono); font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; margin-bottom: 3px;
}

.next-action {
  display: grid; grid-template-columns: minmax(220px, 1.15fr) minmax(260px, 1fr);
  align-items: center; gap: 14px 24px; border-left: 4px solid var(--pink);
}
.next-action > .row { grid-column: 1 / -1; }
.next-action.unavailable { border-left-color: var(--amber); grid-template-columns: 1fr auto; }
.next-action-profile { min-width: 0; }
.readiness-mini { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 14px; }
.readiness-score {
  width: 84px; height: 84px; border: 7px solid #f4ccde; border-top-color: var(--pink);
  border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.readiness-score b { font-family: var(--head); font-size: 1.25rem; line-height: 1; }
.readiness-score span { font-size: .62rem; color: var(--muted); line-height: 1.1; margin-top: 4px; }

.readiness-title { justify-content: space-between; margin-bottom: 14px; }
.privacy-note { line-height: 1.5; }
.readiness-form fieldset { min-width: 0; }
.readiness-domain { border: 0; padding: 18px 0; margin: 0; border-top: 1px solid var(--line); }
.readiness-domain:first-of-type { margin-top: 12px; }
.readiness-domain legend { font-family: var(--head); font-size: 1.05rem; font-weight: 700; padding: 0; }
.readiness-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.scale-option {
  display: grid; grid-template-columns: 28px 1fr; align-content: start; gap: 7px;
  min-height: 116px; margin: 0; padding: 11px; border: 1px solid var(--line);
  border-radius: 12px; cursor: pointer; font-size: .78rem; font-weight: 500; background: #fff;
}
.scale-option:hover { border-color: #e7a7c5; background: #fdf7fa; }
.scale-option:has(input:checked) { border: 2px solid var(--pink); padding: 10px; background: #fdf3f7; }
.scale-option input { width: auto; margin: 3px 0 0; accent-color: var(--pink); }
.scale-number {
  grid-column: 1; grid-row: 1; width: 25px; height: 25px; border-radius: 50%;
  background: #f2e6ec; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700;
}
.scale-option input { grid-column: 1; grid-row: 1; opacity: 0; }
.scale-option > span:last-child { grid-column: 1 / -1; }
.scale-option:has(input:checked) .scale-number { background: var(--pink); color: #fff; }
.form-status { min-height: 24px; color: var(--red); margin: 7px 0; }

.readiness-result-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.result-ring {
  width: 112px; height: 112px; flex: none; border-radius: 50%; border: 9px solid #f4ccde;
  border-top-color: var(--pink); display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.result-ring b { font-family: var(--head); font-size: 1.75rem; line-height: 1; }
.result-ring span { font-size: .7rem; color: var(--muted); }
.domain-bars { margin: 18px 0; }
.domain-bar { display: grid; grid-template-columns: 190px 1fr 40px; gap: 12px; align-items: center; margin: 8px 0; }
.domain-bar > span { font-size: .84rem; font-weight: 600; }
.readiness-recommendations { margin: 18px 0; }
.readiness-recommendations > div { background: #fdf7fa; border-radius: 12px; padding: 15px 17px; }
.readiness-recommendations ol { padding-left: 20px; margin-bottom: 0; }
.readiness-recommendations li { margin-bottom: 8px; }
.plan-90 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.plan-90 > div { display: flex; flex-direction: column; gap: 5px; border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; }
.plan-90 b { color: var(--pink); font-family: var(--head); }
.plan-90 span { font-size: .84rem; }
.unavailable-state { border-left: 4px solid var(--amber); }

.review-title { justify-content: space-between; margin-bottom: 14px; }
.review-next-date { font-size: 1rem !important; line-height: 1.2; }
.review-card { max-width: 820px; margin-left: auto; margin-right: auto; }
.review-meta { margin-bottom: 12px; }
.review-fieldset { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
.review-fieldset legend { font-family: var(--head); font-size: 1.22rem; font-weight: 700; line-height: 1.4; padding: 0; }
.review-options { display: grid; gap: 8px; margin: 14px 0; }
.review-option {
  display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px;
  margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; cursor: pointer; font-weight: 500;
}
.review-option:hover { border-color: #e7a7c5; background: #fdf7fa; }
.review-option:has(input:checked) { border: 2px solid var(--pink); padding: 11px 13px; background: #fdf3f7; }
.review-option input { position: absolute; opacity: 0; }
.option-letter {
  width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center;
  justify-content: center; background: #f2e6ec; font-family: var(--mono); font-weight: 700;
}
.review-option:has(input:checked) .option-letter { background: var(--pink); color: #fff; }
.review-option:has(input:focus-visible), .scale-option:has(input:focus-visible) {
  outline: 3px solid #f59ac3; outline-offset: 2px;
}
.review-feedback { margin-top: 15px; padding: 16px 18px; border-radius: 13px; }
.review-feedback.ok { background: #ecfdf3; border: 1px solid #86efac; }
.review-feedback.bad { background: #fff7ed; border: 1px solid #fdba74; }
.review-feedback button { margin-top: 10px; }
.review-empty { max-width: 660px; margin-left: auto; margin-right: auto; text-align: center; }
.review-empty-icon {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 12px; background: #dcfce7;
  color: var(--green); display: flex; align-items: center; justify-content: center; font-size: 2rem;
}

@media (max-width: 800px) {
  .readiness-scale { grid-template-columns: 1fr; }
  .scale-option { grid-template-columns: 30px 1fr; min-height: 0; align-items: center; }
  .scale-option > span:last-child { grid-column: 2; }
  .next-action { grid-template-columns: 1fr; }
  .next-action > .row { grid-column: 1; }
  .plan-90 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .wrap { padding: 18px 14px 100px; }
  .topbar { padding: 9px 12px; gap: 7px; }
  .topbar > .badge { display: none; }
  .topbar .crumb { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .xp-pill { padding-right: 6px; }
  .xp-pill .t { display: none; }
  .grid.c2, .grid.c4 { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; border-radius: 13px; }
  .module > .mhead { padding: 12px; align-items: flex-start; }
  .module .mcode { min-width: 30px; }
  .module .mbody { padding: 7px 11px 12px; }
  .mat { align-items: flex-start; }
  .chat-fab { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  .chat-drawer { right: 10px; bottom: 80px; width: calc(100vw - 20px); max-width: none; }
  .readiness-result-head { align-items: flex-start; }
  .result-ring { width: 88px; height: 88px; border-width: 7px; }
  .result-ring b { font-size: 1.4rem; }
  .domain-bar { grid-template-columns: minmax(115px, 1fr) 1fr 34px; gap: 7px; }
  .readiness-mini { grid-template-columns: 76px 1fr; }
  .readiness-score { width: 70px; height: 70px; border-width: 6px; }
  body.sidebar-open::after {
    content: ""; position: fixed; inset: 0; z-index: 70; background: rgba(20, 8, 14, .45);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important;
    animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .confetti { display: none !important; }
}
