/* Wspólne dla /porownywanie-obiektow/ i /object-comparison/ (PL i EN). */
:root {
  font-family: var(--font-sans);
  color: #172033;
  background: #f4f6fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #667085;
  --border: #e3e8f0;
  --primary: var(--brand);
  --primary-dark: var(--brand-dark);
  --green: #18794e;
  --red: #b42318;
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; }

button, textarea { font: inherit; }

.contact-header { border-bottom: 1px solid #edecf2; background: #fff; }
.contact-header-inner { width: min(1160px, calc(100% - 48px)); min-height: 78px; display: flex; align-items: center; justify-content: space-between; margin: 0 auto; }
.contact-brand img { display: block; width: 145px; height: 64px; object-fit: cover; mix-blend-mode: multiply; }
.back-link { color: #5e55c8; font-size: 13px; font-weight: 700; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .back-link:hover { color: var(--brand-dark); } }

.site-footer { width: 100%; margin-top: 8px; padding: 22px 20px 26px; border-top: 1px solid #edecf2; background: #fbfbfd; }
.site-footer-inner { width: min(100%, 1120px); display: grid; justify-items: center; gap: 12px; margin: 0 auto; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.footer-links a { color: #777a89; font-size: 12px; font-weight: 650; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .footer-links a:hover { color: var(--primary); } }
.footer-legal-note { max-width: 900px; margin: 0; color: #626777; font-size: 12px; line-height: 1.6; text-align: center; }

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 52px 0 64px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 42px);
  letter-spacing: -.04em;
}

.intro {
  max-width: 660px;
  margin: 12px 0 30px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

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

.panel, .results {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 18px rgb(16 24 40 / 4%);
}

.panel { padding: 20px; }

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

label {
  font-size: 16px;
  font-weight: 700;
}

.counter {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

textarea {
  display: block;
  width: 100%;
  min-height: 245px;
  resize: vertical;
  padding: 14px;
  border: 1px solid #d7deea;
  border-radius: 10px;
  outline: none;
  background: #fbfcfe;
  color: #172033;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.65;
  transition: border-color .15s, box-shadow .15s;
}

textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(var(--brand-rgb) / 13%);
}

textarea::placeholder { color: #98a2b3; }

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 30px;
}

button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 650;
  transition: background .15s var(--ease-out), border-color .15s var(--ease-out), scale .16s var(--ease-out);
}

button:focus-visible { outline: 3px solid rgb(var(--brand-rgb) / 24%); outline-offset: 2px; }

.primary {
  background: var(--primary);
  color: #fff;
}
@media (hover: hover) and (pointer: fine) { .primary:hover { background: var(--primary-dark); } }

.secondary {
  border-color: var(--border);
  background: #fff;
  color: #344054;
}
@media (hover: hover) and (pointer: fine) { .secondary:hover { background: #f8f9fc; } }
button:disabled { cursor: not-allowed; opacity: .5; }

.results { overflow: hidden; }

.results-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--border);
}

h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }

.results-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.support-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #e5e0ff;
  border-radius: 12px;
  color: #4e477f;
  background: #f8f7ff;
  font-size: 13px;
  line-height: 1.5;
}
.support-banner p { margin: 0; }
.support-banner a {
  min-height: 38px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) { .support-banner a:hover { background: var(--primary-dark); } }

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: #fbfcfe;
}

.stat {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.stat-value { display: block; font-size: 21px; font-weight: 750; }
.stat-label { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }

.table-wrap { overflow-x: auto; }
.difference-section {
  padding-top: 18px;
  border-top: 3px solid #d92d20;
}
.difference-section + .difference-section { margin-top: 20px; }
.difference-section h3 {
  margin: 0;
  padding: 0 22px 6px;
  font-size: 16px;
}
.difference-section p {
  margin: 0;
  padding: 0 22px 14px;
  color: var(--muted);
  font-size: 13px;
}
.matches { border-top: 1px solid var(--border); }
.matches summary {
  padding: 16px 22px;
  color: #344054;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}
@media (hover: hover) and (pointer: fine) { .matches summary:hover { background: #fafbff; } }
/* Długie listy: każda tabela wyników przewija się we własnym oknie, nagłówek kolumn zostaje na górze. */
.difference-section .table-wrap, .matches-content { max-height: min(420px, 60vh); overflow: auto; }
.difference-section .table-wrap { border-top: 1px solid var(--border); }
.matches-content { border-top: 1px solid var(--border); }
.difference-section thead, .matches-content thead { position: sticky; top: 0; z-index: 1; }
.difference-section th, .matches-content th { box-shadow: inset 0 -1px 0 #edf0f5; }

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

th, td { padding: 13px 16px; border-bottom: 1px solid #edf0f5; }
th { color: var(--muted); background: #fff; font-size: 12px; font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }
@media (hover: hover) and (pointer: fine) { tbody tr:hover { background: #fafbff; } }
td:first-child, th:first-child { padding-left: 22px; }
td:last-child, th:last-child { padding-right: 22px; }

.object { font-family: var(--font-mono); overflow-wrap: anywhere; }
.count { font-variant-numeric: tabular-nums; }
.missing { color: var(--red); font-weight: 700; }
.matched { color: var(--green); }

.empty {
  padding: 34px 22px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.comparison-seo { margin-top: 26px; padding-top: 12px; }
.comparison-seo-intro { margin-bottom: 18px; }
.comparison-seo h2 { margin: 0 0 12px; color: #292b40; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.03em; line-height: 1.25; }
.comparison-seo h3 { margin: 0 0 10px; color: #292b40; font-size: 18px; letter-spacing: -.02em; }
.comparison-seo p, .comparison-seo li, .comparison-faq-item p { color: #4b5565; font-size: 14px; line-height: 1.8; }
.comparison-seo-intro p { margin: 0; font-size: 15px; }
.comparison-seo-intro p + p { margin-top: 10px; }
.comparison-seo-card, .comparison-faq, .comparison-related { margin-top: 16px; padding: 20px 22px; border: 1px solid #e3e8f0; border-radius: 15px; background: #fff; box-shadow: 0 4px 18px rgb(16 24 40 / 4%); }
.comparison-seo-card ul { margin: 12px 0 0; padding-left: 20px; }
.comparison-seo-card li + li { margin-top: 8px; }
.comparison-faq > h3, .comparison-related > h3 { margin-bottom: 16px; font-size: 21px; }
.comparison-faq-item { padding: 0 0 14px; border-bottom: 1px solid #edf0f4; }
.comparison-faq-item + .comparison-faq-item { padding-top: 14px; }
.comparison-faq-item:last-child { padding-bottom: 0; border-bottom: 0; }
.comparison-faq-item summary { position: relative; padding-left: 28px; color: #292b40; font-size: 16px; font-weight: 700; line-height: 1.5; cursor: pointer; list-style: none; }
.comparison-faq-item summary::-webkit-details-marker { display: none; }
.comparison-faq-item summary::after { position: absolute; top: 9px; left: 7px; width: 7px; height: 7px; border-right: 2px solid #635bdf; border-bottom: 2px solid #635bdf; content: ""; transform: rotate(45deg); transition: transform .2s var(--ease-out); }
.comparison-faq-item[open] summary::after { transform: rotate(225deg); }
.comparison-faq-item summary:focus-visible { outline: 3px solid rgb(var(--brand-rgb) / 24%); outline-offset: 3px; }
.comparison-faq-item p { margin: 10px 0 0; }
.comparison-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.comparison-related-card { min-height: 175px; display: flex; flex-direction: column; align-items: flex-start; padding: 16px; border: 1px solid #eaebf1; border-radius: 13px; color: #292b40; background: #fff; text-decoration: none; box-shadow: 0 3px 10px rgb(28 33 66 / 2%); transition: transform .2s var(--ease-out), border-color .2s var(--ease-out), box-shadow .2s var(--ease-out), scale .16s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .comparison-related-card:hover { transform: translateY(-3px); border-color: #d9d3ff; box-shadow: 0 10px 24px rgb(54 45 112 / 8%); } }
.comparison-related-icon { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 11px; font-size: 15px; font-weight: 750; }
.comparison-related-icon.violet { color: #695ade; background: #f0edff; }
.comparison-related-icon.blue { color: #4384d9; background: #eaf3ff; }
.comparison-related-icon.mint { color: #299d7b; background: #e9f8f2; }
.comparison-related-category { margin-bottom: 7px; color: #667085; font-size: 12px; font-weight: 700; }
.comparison-related-card strong { margin-bottom: 6px; font-size: 14px; line-height: 1.4; }
.comparison-related-description { color: #5f6475; font-size: 13px; line-height: 1.6; }
.comparison-back-to-tool { position: fixed; z-index: 10; right: max(20px, calc((100vw - 820px) / 2)); bottom: 22px; padding: 12px 16px; border: 1px solid var(--brand); border-radius: 999px; color: #fff; background: var(--brand); box-shadow: 0 6px 20px rgb(40 35 100 / 22%); font-size: 13px; font-weight: 700; text-decoration: none; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s var(--ease-out), transform .2s var(--ease-out), background .2s var(--ease-out), scale .16s var(--ease-out); }
.comparison-back-to-tool.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
@media (hover: hover) and (pointer: fine) { .comparison-back-to-tool:hover { color: #fff; background: var(--brand-dark); } }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .shell { width: min(100% - 28px, 560px); padding-top: 34px; }
  .contact-header-inner { width: min(100% - 30px, 440px); min-height: 68px; }
  .contact-brand img { width: 120px; height: 54px; }
  .back-link { font-size: 12px; }
  .site-footer { padding: 20px 16px 22px; }
  .site-footer-inner { gap: 10px; }
  .footer-links { gap: 10px 16px; }
  .footer-legal-note { font-size: 12px; }
  .panels { grid-template-columns: 1fr; }
  textarea { min-height: 190px; }
  .results-heading { align-items: stretch; flex-direction: column; }
  .support-banner { align-items: stretch; flex-direction: column; gap: 10px; }
  .support-banner a { align-self: flex-start; }
  .summary { gap: 8px; padding: 14px; }
  .stat { padding: 10px; }
  .stat-value { font-size: 18px; }
  .matches summary { padding: 14px; }
  .difference-section h3 { padding-right: 14px; padding-left: 14px; }
  .difference-section p { padding-right: 14px; padding-left: 14px; }
  th, td { padding: 12px 10px; }
  td:first-child, th:first-child { padding-left: 14px; }
  td:last-child, th:last-child { padding-right: 14px; }
  .comparison-related-grid { grid-template-columns: 1fr; gap: 10px; }
  .comparison-related-card { min-height: 0; display: grid; grid-template-columns: 38px 1fr; column-gap: 12px; align-items: center; }
  .comparison-related-icon { grid-row: span 3; margin: 0; }
  .comparison-related-category, .comparison-related-card strong { margin: 0; }
  .comparison-back-to-tool { right: 15px; bottom: 15px; }
}

@media (max-width: 420px) {
  .summary { grid-template-columns: 1fr; }
  .summary .stat { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .stat-label { margin-top: 0; text-align: right; }
}
