/* MRS Audit — widżet. Korzysta ze zmiennych motywu (--accent, --border, --muted…). */
.mrsa, .mrsa-print { --mrsa-ok: var(--green, #16A34A); --mrsa-warn: #D97706; --mrsa-fail: #DC2626; --mrsa-info: var(--muted, #6B6860); }
.mrsa { max-width: 880px; margin: 0 auto; scroll-margin-top: 96px; }
.mrsa *, .mrsa *::before, .mrsa *::after { box-sizing: border-box; }
.mrsa-top { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.mrsa-lang { display: inline-flex; border: 1.5px solid var(--border, #E2E0DB); border-radius: 999px; overflow: hidden; background: var(--surface, #fff); }
.mrsa-lang-btn { appearance: none; border: 0; background: transparent; padding: 7px 14px; font: inherit; font-size: .8rem; font-weight: 650; letter-spacing: .04em; color: var(--muted, #6B6860); cursor: pointer; }
.mrsa-lang-btn:hover { color: var(--ink, #1E1C1A); }
.mrsa-lang-btn.is-active { background: var(--accent, #4338CA); color: #fff; }
.mrsa-lang-btn:focus-visible, .mrsa-input:focus-visible { outline: 3px solid rgba(67, 56, 202, .35); outline-offset: 2px; }

.mrsa-card { background: var(--surface, #fff); border: 1px solid var(--border, #E2E0DB); border-radius: var(--r, 14px); padding: 28px; box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,.06)); }
.mrsa-main { min-height: 180px; }
.mrsa-card + .mrsa-card { margin-top: 18px; }

.mrsa-label { display: block; font-size: .85rem; font-weight: 650; margin-bottom: 8px; color: var(--ink, #1E1C1A); }
.mrsa-row { display: flex; gap: 12px; }
.mrsa-input { flex: 1; min-width: 0; width: 100%; padding: 14px 16px; border: 1.5px solid var(--border, #E2E0DB); border-radius: 10px; background: var(--surface, #fff); color: var(--ink, #1E1C1A); font: inherit; font-size: 1rem; }
.mrsa-input:focus { border-color: var(--accent, #4338CA); box-shadow: 0 0 0 3px rgba(67, 56, 202, .12); outline: none; }
.mrsa-submit { white-space: nowrap; }
.mrsa-hint { margin: 12px 0 0; font-size: .82rem; color: var(--muted, #6B6860); }
.mrsa-error { margin: 12px 0 0; padding: 10px 14px; border-radius: 8px; background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; font-size: .9rem; }
.mrsa-ok { margin: 0; padding: 10px 14px; border-radius: 8px; background: var(--green-bg, #ECFDF5); border: 1px solid #BBF7D0; color: #126B36; font-size: .95rem; }
.mrsa-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mrsa-noscript { color: var(--muted, #6B6860); }

/* postęp */
.mrsa-progress { text-align: center; padding: 18px 0; }
.mrsa-spinner { width: 46px; height: 46px; margin: 0 auto 16px; border-radius: 50%; border: 4px solid var(--soft, #EEF2FF); border-top-color: var(--accent, #4338CA); animation: mrsa-spin 1s linear infinite; }
.mrsa-progress-title { margin: 0 0 6px; font-size: 1.2rem; }
.mrsa-step { margin: 0 0 14px; color: var(--ink, #1E1C1A); min-height: 1.5em; }
.mrsa-bar { height: 6px; max-width: 360px; margin: 0 auto 10px; border-radius: 999px; background: var(--soft, #EEF2FF); overflow: hidden; }
.mrsa-bar span { display: block; height: 100%; width: 40%; border-radius: inherit; background: var(--accent, #4338CA); animation: mrsa-slide 1.6s ease-in-out infinite; }
.mrsa-elapsed { margin: 0; font-size: .85rem; color: var(--muted, #6B6860); }
@keyframes mrsa-spin { to { transform: rotate(360deg); } }
@keyframes mrsa-slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* raport */
.mrsa-summary { display: flex; gap: 28px; align-items: center; padding-bottom: 22px; border-bottom: 1px solid var(--border, #E2E0DB); }
.mrsa-ring { width: 136px; height: 136px; flex: none; }
.mrsa-ring-bg { fill: none; stroke: var(--soft, #EEF2FF); stroke-width: 12; }
.mrsa-ring-fg { fill: none; stroke-width: 12; stroke-linecap: round; transition: stroke-dasharray .8s ease; }
.mrsa-ring-num { font-size: 36px; font-weight: 750; fill: var(--ink, #1E1C1A); }
.mrsa-good .mrsa-ring-fg { stroke: var(--mrsa-ok); }
.mrsa-mid .mrsa-ring-fg { stroke: var(--mrsa-warn); }
.mrsa-low .mrsa-ring-fg { stroke: var(--mrsa-fail); }
.mrsa-summary-text { min-width: 0; }
.mrsa-verdict { margin: 0 0 6px; font-size: 1.35rem; line-height: 1.25; }
.mrsa-verdict:focus { outline: none; }
.mrsa-summary-text p { margin: 0 0 10px; }
.mrsa-counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.mrsa-counts li { padding: 4px 12px; border-radius: 999px; font-size: .85rem; border: 1px solid currentColor; }
.mrsa-counts b { font-weight: 750; }
.mrsa-counts .mrsa-s-ok { color: var(--mrsa-ok); }
.mrsa-counts .mrsa-s-warn { color: var(--mrsa-warn); }
.mrsa-counts .mrsa-s-fail { color: var(--mrsa-fail); }
.mrsa-meta { font-size: .8rem; color: var(--muted, #6B6860); margin: 0 !important; }
.mrsa-url { word-break: break-all; }

.mrsa-group { margin-top: 22px; }
.mrsa-group-title { margin: 0 0 6px; font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted, #6B6860); }
.mrsa-list { margin: 0; padding: 0; list-style: none; }
.mrsa-item { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border, #E2E0DB); }
.mrsa-item:first-child { border-top: 0; }
.mrsa-dot { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800; color: #fff; background: var(--mrsa-info); }
.mrsa-s-ok > .mrsa-dot { background: var(--mrsa-ok); }
.mrsa-s-warn > .mrsa-dot { background: var(--mrsa-warn); }
.mrsa-s-fail > .mrsa-dot { background: var(--mrsa-fail); }
.mrsa-item-body { min-width: 0; flex: 1; }
.mrsa-item-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.mrsa-badge { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; color: #fff; background: var(--mrsa-info); }
.mrsa-s-ok .mrsa-badge { background: var(--mrsa-ok); }
.mrsa-s-warn .mrsa-badge { background: var(--mrsa-warn); }
.mrsa-s-fail .mrsa-badge { background: var(--mrsa-fail); }
.mrsa-msg { margin: 4px 0 0; font-size: .92rem; }
.mrsa-disclaimer { margin: 24px 0 0; font-size: .8rem; color: var(--muted, #6B6860); }

.mrsa-email-open, .mrsa-again { margin-top: 18px; display: flex; justify-content: center; }
.mrsa-email { margin-top: 18px; background: var(--bg, #F5F4F2); box-shadow: none; }
.mrsa-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: .85rem; line-height: 1.45; cursor: pointer; }
.mrsa-check input { margin-top: 3px; flex: none; width: 16px; height: 16px; accent-color: var(--accent, #4338CA); }
.mrsa-email .btn { margin-top: 14px; }
.mrsa-cta { margin-top: 22px; padding: 20px 22px; border-radius: 12px; background: var(--soft, #EEF2FF); display: flex; gap: 18px; align-items: center; justify-content: space-between; }
.mrsa-cta h4 { margin: 0 0 4px; font-size: 1.05rem; }
.mrsa-cta p { margin: 0; font-size: .9rem; color: var(--muted, #6B6860); }
.mrsa-cta .btn { white-space: nowrap; }

@media (max-width: 640px) {
  .mrsa-card { padding: 18px; }
  .mrsa-row { flex-direction: column; }
  .mrsa-submit { width: 100%; }
  .mrsa-summary { flex-direction: column; text-align: center; gap: 16px; }
  .mrsa-counts { justify-content: center; }
  .mrsa-cta { flex-direction: column; align-items: stretch; text-align: center; }
  .mrsa-item { gap: 10px; }
  .mrsa-top { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .mrsa-spinner, .mrsa-bar span { animation: none; }
  .mrsa-ring-fg { transition: none; }
}

/* przycisk PDF + blok „Wyślij raport do przeglądu” */
.mrsa-actions { margin-top: 22px; display: flex; justify-content: center; }
.mrsa-cta-text { min-width: 0; }
.mrsa-cta-open { flex-direction: column; align-items: stretch; gap: 14px; }
.mrsa-cta-open .mrsa-sendform { width: 100%; background: var(--surface, #fff); border: 1px solid var(--border, #E2E0DB); border-radius: 12px; padding: 18px; }
.mrsa-cta-done { justify-content: center; }
.mrsa-textarea { resize: vertical; min-height: 84px; font-family: inherit; line-height: 1.45; }
.mrsa-sendform .mrsa-label + .mrsa-input { margin-bottom: 12px; }
.mrsa-sendform .btn { margin-top: 14px; }

/* arkusz do druku / zapisu PDF (widoczny tylko podczas drukowania) */
.mrsa-print { display: none; }
@media print {
  @page { margin: 14mm 13mm; }
  body.mrsa-printing > *:not(#mrsa-print) { display: none !important; }
  body.mrsa-printing { background: #fff !important; }
  body.mrsa-printing #mrsa-print { display: block !important; color: #1E1C1A; font: 12pt/1.45 Arial, Helvetica, sans-serif; background: #fff; }
  .mrsa-print, .mrsa-print * { -webkit-print-color-adjust: exact; print-color-adjust: exact; box-shadow: none !important; }
  .mrsa-print-brand { font-size: 10pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #4338CA; margin-bottom: 4pt; }
  .mrsa-print h1 { font-size: 19pt; margin: 0 0 4pt; line-height: 1.2; }
  .mrsa-print-head p { margin: 0 0 12pt; color: #6B6860; font-size: 10pt; word-break: break-all; }
  .mrsa-print-score { display: flex; gap: 16pt; align-items: center; padding: 10pt 12pt; border: 1px solid #E2E0DB; border-radius: 8pt; margin-bottom: 8pt; break-inside: avoid; }
  .mrsa-print-score p { margin: 2pt 0 0; font-size: 10.5pt; }
  .mrsa-print-num { font-size: 26pt; font-weight: 800; white-space: nowrap; }
  .mrsa-print-num.mrsa-good { color: #16A34A; } .mrsa-print-num.mrsa-mid { color: #D97706; } .mrsa-print-num.mrsa-low { color: #DC2626; }
  .mrsa-print-counts { color: #6B6860; }
  .mrsa-print .mrsa-group { margin-top: 12pt; }
  .mrsa-print h2 { font-size: 10pt; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6B6860; margin: 0 0 4pt; break-after: avoid; }
  .mrsa-print .mrsa-item { break-inside: avoid; padding: 7pt 0; }
  .mrsa-print .mrsa-msg { font-size: 10.5pt; }
  .mrsa-print   .mrsa-print-foot { margin: 12pt 0 0; font-size: 9pt; color: #6B6860; }
}

/* ocena widoczności + zwinięte podstawy */
.mrsa-caption { margin: 0 0 4px !important; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #6B6860); }
.mrsa-notice { margin: 18px 0 0; padding: 12px 16px; border-radius: 10px; background: #FEF3C7; border: 1px solid #FCD34D; color: #78350F; font-size: .9rem; }
.mrsa-baseline { margin-top: 24px; border: 1px solid var(--border, #E2E0DB); border-radius: 12px; background: var(--bg, #F5F4F2); }
.mrsa-baseline-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 14px 18px; cursor: pointer; list-style: none; font-weight: 650; }
.mrsa-baseline-head::-webkit-details-marker { display: none; }
.mrsa-baseline-head::after { content: "▾"; margin-left: auto; color: var(--muted, #6B6860); transition: transform .2s; }
.mrsa-baseline[open] > .mrsa-baseline-head::after { transform: rotate(180deg); }
.mrsa-baseline-head:focus-visible { outline: 3px solid rgba(67, 56, 202, .35); outline-offset: 2px; border-radius: 12px; }
.mrsa-baseline-sum { font-size: .78rem; font-weight: 700; padding: 3px 11px; border-radius: 999px; color: #fff; }
.mrsa-baseline-sum.is-ok { background: var(--mrsa-ok); }
.mrsa-baseline-sum.is-warn { background: var(--mrsa-warn); }
.mrsa-baseline-hint { margin: 0 !important; padding: 0 18px 4px; }
.mrsa-baseline > .mrsa-list { padding: 0 18px 8px; }
@media print {
  .mrsa-print-cap { font-size: 8pt; text-transform: uppercase; letter-spacing: .05em; color: #6B6860; }
  .mrsa-print .mrsa-notice { margin: 8pt 0; font-size: 10pt; }
}

/* ===== karta „Sprawdź swoją stronę” w hero (promo, bieżące światło po obramowaniu) ===== */
@property --mrsa-ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.hero-grid { display: block; }
.hero-side { margin-top: 36px; max-width: 520px; }
.mrsa-box { position: relative; padding: 2.5px; border-radius: 20px; background: conic-gradient(from var(--mrsa-ang), #4338CA 0deg, #4338CA 200deg, #A5B4FC 285deg, #FFFFFF 325deg, #A5B4FC 345deg, #4338CA 360deg); animation: mrsa-ang 4.5s linear infinite; box-shadow: 0 22px 52px rgba(55, 48, 163, .35), 0 5px 16px rgba(55, 48, 163, .2); }
@keyframes mrsa-ang { to { --mrsa-ang: 360deg; } }
.mrsa-box-in { position: relative; border-radius: 17.5px; background: linear-gradient(145deg, #3730A3 0%, #4338CA 48%, #6D5BD0 100%); padding: 28px 24px 22px; }
.mrsa-box-badge { position: absolute; top: -13px; right: 20px; padding: 6px 13px; border-radius: 999px; background: #fff; color: #3730A3; font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; box-shadow: 0 6px 16px rgba(30, 28, 26, .2); }
.mrsa-box-title { margin: 0 0 6px; font-size: 1.4rem; font-weight: 750; letter-spacing: -.015em; color: #fff; line-height: 1.2; }
.mrsa-box-text { margin: 0 0 16px; font-size: .92rem; color: rgba(255, 255, 255, .86); line-height: 1.5; }
.mrsa-box-label { display: block; margin-bottom: 6px; font-size: .78rem; font-weight: 650; color: #fff; }
.mrsa-box-row { display: flex; flex-direction: column; gap: 10px; }
.mrsa-box-input { flex: 1; min-width: 0; padding: 14px 15px; border: 2px solid transparent; border-radius: 10px; background: #fff; color: var(--ink, #1E1C1A); font: inherit; font-size: 1rem; }
.mrsa-box-input:focus { outline: none; border-color: #C7D2FE; box-shadow: 0 0 0 3px rgba(199, 210, 254, .45); }
.mrsa-box-btn { flex: none; width: 100%; padding: 14px 18px; border: 0; border-radius: 10px; background: #fff; color: #3730A3; font: inherit; font-weight: 750; cursor: pointer; white-space: nowrap; box-shadow: 0 6px 18px rgba(20, 18, 70, .28); transition: transform .15s, box-shadow .15s, background .15s; }
.mrsa-box-btn:hover { transform: translateY(-1px); background: #EEF2FF; box-shadow: 0 10px 24px rgba(20, 18, 70, .34); }
.mrsa-box-btn:focus-visible { outline: 3px solid #C7D2FE; outline-offset: 2px; }
.mrsa-box-note { margin: 12px 0 0; font-size: .78rem; color: rgba(255, 255, 255, .75); }
@media (min-width: 1060px) {
  .hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 56px; align-items: center; }
  .hero-side { margin-top: 0; max-width: none; }
}
@media (min-width: 1280px) { .hero-side { transform: translateX(48px); } }
@media (prefers-reduced-motion: reduce) { .mrsa-box { animation: none; } }

/* ===== smukła, akcentowana smuga „Masz już stronę?” nad nagłówkiem hero (bez animacji) ===== */
.hero-strip { margin: 0 0 30px; max-width: 880px; }
.mrsa-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 12px 16px; border-radius: 14px; background: linear-gradient(135deg, #3730A3 0%, #4338CA 55%, #6D5BD0 100%); color: #fff; box-shadow: 0 10px 28px rgba(55, 48, 163, .26); }
.mrsa-strip-text { flex: 1 1 280px; margin: 0; font-size: .92rem; line-height: 1.4; color: rgba(255, 255, 255, .9); }
.mrsa-strip-text strong { color: #fff; font-weight: 750; }
.mrsa-strip-form { flex: 1 1 340px; display: flex; gap: 8px; margin: 0; }
.mrsa-strip-input { flex: 1; min-width: 0; padding: 10px 13px; border: 2px solid transparent; border-radius: 9px; background: #fff; color: var(--ink, #1E1C1A); font: inherit; font-size: .95rem; }
.mrsa-strip-input:focus { outline: none; border-color: #C7D2FE; box-shadow: 0 0 0 3px rgba(199, 210, 254, .45); }
.mrsa-strip-btn { flex: none; padding: 0 16px; border: 0; border-radius: 9px; background: #fff; color: #3730A3; font: inherit; font-size: .92rem; font-weight: 750; cursor: pointer; white-space: nowrap; transition: background .15s, transform .15s; }
.mrsa-strip-btn:hover { background: #EEF2FF; transform: translateY(-1px); }
.mrsa-strip-btn:focus-visible { outline: 3px solid #C7D2FE; outline-offset: 2px; }
.mrsa-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 560px) {
  .mrsa-strip-more { display: none; }
  .mrsa-strip { padding: 12px 14px; }
  .mrsa-strip-form { flex-direction: column; }
  .mrsa-strip-btn { padding: 11px 16px; }
}

/* ===== przycisk „Sprawdź”: biały, z obwódką w kolorach świateł (jak statusy raportu: zielony → pomarańczowy → czerwony) ===== */
/* traffic-light */
.mrsa-box-btn, .mrsa-strip-btn {
  border: 2px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    conic-gradient(from var(--mrsa-ang), #16A34A, #D97706, #DC2626, #D97706, #16A34A) border-box;
  color: #3730A3;
  animation: mrsa-ang 5.5s linear infinite;
}
.mrsa-box-btn:hover, .mrsa-strip-btn:hover {
  background:
    linear-gradient(#F5F6FF, #F5F6FF) padding-box,
    conic-gradient(from var(--mrsa-ang), #16A34A, #D97706, #DC2626, #D97706, #16A34A) border-box;
}
@media (prefers-reduced-motion: reduce) { .mrsa-box-btn, .mrsa-strip-btn { animation: none; } }

/* ===== duża karta w wariancie style="hero" (strona sprawdzania): ta sama karta co w hero strony głównej, tylko większa ===== */
.mrsa.mrsa-is-hero { max-width: 980px; }
.mrsa-box-xl { border-radius: 26px; padding: 3px; }
.mrsa-box-xl .mrsa-box-in { border-radius: 23px; padding: 48px 52px 38px; }
.mrsa-box-xl .mrsa-box-badge { top: -15px; right: 32px; padding: 7px 16px; font-size: .78rem; }
.mrsa-box-lead { margin: 0 0 26px; max-width: 760px; font-size: clamp(1.5rem, 3.2vw, 2.15rem); font-weight: 750; letter-spacing: -.02em; line-height: 1.2; color: #fff; }
.mrsa-box-xl .mrsa-box-label { margin-bottom: 8px; font-size: .92rem; }
.mrsa-box-xl .mrsa-box-row { gap: 12px; }
.mrsa-box-xl .mrsa-box-input { padding: 19px 20px; border-radius: 12px; font-size: 1.15rem; }
.mrsa-box-xl .mrsa-box-btn { width: 100%; padding: 19px 34px; border-radius: 12px; font-size: 1.1rem; }
.mrsa-box-xl .mrsa-box-note { margin-top: 18px; font-size: .88rem; }
.mrsa-box-xl .mrsa-error { margin-top: 14px; }
@media (min-width: 720px) {
  .mrsa-box-xl .mrsa-box-row { flex-direction: row; }
  .mrsa-box-xl .mrsa-box-btn { width: auto; }
}
@media (max-width: 560px) {
  .mrsa-box-xl .mrsa-box-in { padding: 36px 20px 26px; }
  .mrsa-box-xl .mrsa-box-badge { right: 18px; }
}

/* ===== zielony motyw karty „Sprawdź swoją stronę” (wszystkie języki, hero i strona sprawdzania) ===== */
.mrsa-box{background:conic-gradient(from var(--mrsa-ang),#047857 0deg,#047857 200deg,#6EE7B7 285deg,#FFFFFF 325deg,#6EE7B7 345deg,#047857 360deg);box-shadow:0 22px 52px rgba(4,120,87,.34),0 5px 16px rgba(4,120,87,.2)}
.mrsa-box-in{background:linear-gradient(145deg,#065F46 0%,#047857 48%,#0F9D74 100%)}
.mrsa-box-badge{color:#065F46}
.mrsa-box-btn{color:#065F46}
.mrsa-box-btn:hover{background:linear-gradient(#ECFDF5,#ECFDF5) padding-box,conic-gradient(from var(--mrsa-ang),#16A34A,#D97706,#DC2626,#D97706,#16A34A) border-box}
.mrsa-box-input:focus{border-color:#A7F3D0;box-shadow:0 0 0 3px rgba(167,243,208,.5)}
