/* CatalogMedic: product page styles on top of /assets/aphex.css (Aphex Coding "Nocne studio" standard: tokens,
   components, motion). Here only: the product accent (not in Strony/wspolne/tokens.css — that file is shared and
   edited separately), the product scene (catalog copy -> integrity check -> recovery -> report -> download), page
   sections and guide pages. Sections/guides block ported from Projekt_05 (IRBatch) site.css.
   No url references, no web fonts from other hosts, no images, no inline styles. */

/* ---------- Product accent ---------- */
[data-product="catalogmedic"] {
  --c-catalogmedic: #3dd6c8; --c-catalogmedic-ink: #032824;
  --accent: var(--c-catalogmedic); --accent-ink: var(--c-catalogmedic-ink); --accent-text: var(--c-catalogmedic);
  --win-accent: #3dd6c8;
}
@media (prefers-color-scheme: light) {
  [data-product="catalogmedic"] { --c-catalogmedic: #0a6f66; --c-catalogmedic-ink: #ffffff; }
}

/* ---------- Base tweaks ---------- */
code { padding: .08em .35em; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: .86em; }
.narrow { max-width: 46rem; }
.note { font-size: var(--fs-small); color: var(--text-3); }
.btn:not(.btn-primary):not(.btn-ghost) {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 0 0 1px color-mix(in srgb, var(--accent) 70%, #000), 0 10px 32px -12px var(--glow);
}

/* motion delays by class (no inline style) */
.d1 { --d: 1; } .d2 { --d: 2; } .d3 { --d: 3; } .d4 { --d: 4; } .d5 { --d: 5; }
.i1 { --i: 1; } .i2 { --i: 2; } .i3 { --i: 3; }
.beam.b1 { --x: 4; --dur: 9s; }
.beam.b2 { --x: 12; --dur: 11s; --delay: 3s; }
.beam.h.b3 { --y: 3; --dur: 12s; --delay: 1.5s; }
.log li:nth-child(1) { --i: 0; }
.log li:nth-child(2) { --i: 1; --c: #f0b45a; }
.log li:nth-child(3) { --i: 2; }

.site-header .brand img, .foot-brand .brand img { width: 28px; height: 28px; border-radius: 8px; box-shadow: 0 0 0 4px var(--glow-2); }
.foot-note { margin-top: .8rem; max-width: 22rem; font-size: var(--fs-small); color: var(--text-3); }

/* ---------- Hero ---------- */
.hero .lead { margin-bottom: 1.1rem; }
.hero .privacy { max-width: 35rem; margin-bottom: 2rem; color: var(--text); font-weight: 600; }
.hero-note { margin-top: 1rem; }
.hero code { font-size: .8em; }

/* ---------- Scene: catalog copy -> check -> recover -> report -> download (illustration, example numbers) ---------- */
.hero .stage { padding-top: 3.5rem; }
.hero .obj { --size: 104px; top: -6.25rem; right: -1.75rem; transform: translateZ(140px); }
.cm-file { display: flex; align-items: center; gap: .6rem; margin: .9rem 1.1rem 0; padding: .55rem .75rem; border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--win-accent) 45%, transparent); background: color-mix(in srgb, var(--win-accent) 9%, transparent); font-size: .76rem; }
.cm-ico { flex: none; width: 14px; height: 17px; border-radius: 3px 6px 3px 3px; border: 1.5px solid var(--win-accent); }
.cm-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--win-text); }
.cm-size { flex: none; margin-left: auto; white-space: nowrap; color: var(--win-text-2); font-family: var(--font-mono); }
.log .warn {
  padding: .08rem .5rem; border-radius: var(--r-pill); font-size: .72rem; white-space: nowrap; color: #f0b45a;
  border: 1px solid rgba(240, 180, 90, .4); background: rgba(240, 180, 90, .1);
  animation: log-ok 12s var(--ease-out) infinite backwards; animation-delay: calc(var(--i) * 1.2s + 1.25s);
}
.cm-report { margin: .2rem 1.1rem .9rem; padding: .7rem .85rem .55rem; border-radius: 8px; border: 1px solid var(--win-line); background: rgba(255, 255, 255, .025);
  font-size: .76rem; animation: cm-report 12s var(--ease-out) infinite backwards; }
.cm-rh, .cm-report li { display: grid; grid-template-columns: minmax(0, 1fr) 8.5ch 8.5ch; gap: .6rem; align-items: baseline; }
.cm-rh { margin: 0 0 .35rem; padding-bottom: .35rem; border-bottom: 1px solid var(--win-line); color: var(--win-text-2); font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; }
.cm-rh span:first-child { color: var(--win-text); }
.cm-rh span + span, .cm-report li span + span { text-align: right; font-family: var(--font-mono); }
.cm-report ul { display: grid; gap: .22rem; margin: 0; padding: 0; list-style: none; }
.cm-report li span:first-child { color: #c9d1d9; }
.cm-report .b { color: #8b949e; }
.cm-report .a { color: var(--win-accent); font-weight: 600; }
@keyframes cm-report { 0%, 24% { opacity: .4; } 32%, 90% { opacity: 1; } 97%, 100% { opacity: .4; } }
.cm-dl { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0 1.1rem .9rem; font-size: .72rem; }
.cm-dl span { padding: .2rem .6rem; border-radius: 6px; border: 1px dashed var(--win-line); color: var(--win-text-2); }
.cm-dl span::before { content: "\2193  "; color: var(--win-accent); }
.hero .stage figcaption { text-align: left; line-height: 1.55; }
@media (max-width: 520px) {
  .hero .obj { --size: 64px; top: -2.75rem; right: .75rem; }
  .win .tab { display: none; }
  .win { transform: none; }
  .cm-file, .cm-report { margin-inline: .8rem; }
  .cm-dl { padding-inline: .8rem; }
  .cm-rh, .cm-report li { grid-template-columns: minmax(0, 1fr) 8ch 8ch; gap: .4rem; }
  .cm-rh { font-size: .62rem; }
}
@media (prefers-reduced-motion: reduce) { .cm-report, .log .warn { animation: none !important; } }

/* ---------- Copy first ---------- */
.copy-first {
  position: relative; padding: clamp(1.5rem, 3vw, 2.4rem); border-radius: var(--r-l);
  border: 1px solid color-mix(in srgb, #f0b45a 45%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, #f0b45a 7%, var(--surface)), var(--surface));
}
.copy-first h2 { font-size: var(--fs-h2); letter-spacing: var(--track-h2); line-height: 1.08; margin-bottom: 1.4rem; }
.copy-steps { counter-reset: cs; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.copy-steps li { counter-increment: cs; position: relative; padding-left: 2.4rem; color: var(--text-2); font-size: .96rem; }
.copy-steps li::before { content: counter(cs); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 1.7rem; height: 1.7rem;
  border-radius: 50%; font: 600 .8rem/1 var(--font-mono); color: var(--text); border: 1px solid var(--line-3); }
@media (max-width: 860px) { .copy-steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- What comes back / privacy grids ---------- */
.rec-grid, .priv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.rec-grid > .card, .priv-grid > .card { padding: 1.4rem 1.5rem; gap: .6rem; }
.rec-grid h3, .priv-grid h3 { font-size: var(--fs-h3); letter-spacing: var(--track-h3); }
.rec-grid p, .priv-grid p { color: var(--text-2); font-size: .95rem; }
.rec-grid h3::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: .6rem; vertical-align: .15em; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.plan .btn { text-decoration: none; }
.rec-note { max-width: 46rem; margin-top: 1.4rem; line-height: 1.6; }
@media (max-width: 860px) { .rec-grid, .priv-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Sections (port from IRBatch) ---------- */
.band { background: linear-gradient(180deg, transparent, var(--bg-2) 18%, var(--bg-2) 82%, transparent); }
main > .section h2 { font-size: var(--fs-h2); letter-spacing: var(--track-h2); line-height: 1.08; }
main > .section .narrow > h2 { margin-bottom: 1.6rem; }

/* How it works: three numbered cards */
.steps {
  counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem;
  margin: 0; padding: 0; list-style: none;
}
.steps li {
  counter-increment: step; position: relative; padding: 1.5rem; border-radius: var(--r-l);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.steps li::before {
  content: "0" counter(step); display: inline-grid; place-items: center; width: 38px; height: 38px; margin-bottom: 1rem;
  border-radius: 11px; font: 600 .85rem/1 var(--font-mono); color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.steps h3 { font-size: var(--fs-h3); letter-spacing: var(--track-h3); margin-bottom: .6rem; }
.steps p { color: var(--text-2); font-size: .95rem; }
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Free and Pro */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.plan { padding: 1.6rem 1.7rem 1.7rem; gap: 1rem; }
.plan h3 { font-size: 1.35rem; letter-spacing: var(--track-h3); }
.plan ul { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; color: var(--text-2); font-size: .95rem; }
.plan li { position: relative; padding-left: 1.3rem; }
.plan li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--line-3); }
.plan.pro { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--surface)), var(--surface)); }
.plan.pro li::before { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.plan .price { color: var(--text-2); }
.plan .price strong { display: inline-block; margin-bottom: .2rem; font-size: 1.2rem; color: var(--text); letter-spacing: -.01em; }
.plan .note { line-height: 1.55; }
.plan .note strong { color: var(--text-2); }
.soon { padding: .7rem 1rem; border-radius: var(--r-s); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); color: var(--text); }
@media (max-width: 760px) { .plans { grid-template-columns: minmax(0, 1fr); } .more { display: inline-block; margin: .8rem 0 0; } }

/* Guides on the home page */
.guide-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin: 0; padding: 0; list-style: none; }
.guide-links a {
  display: block; height: 100%; padding: .85rem 1rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  color: var(--text); font-size: .95rem; transition: border-color var(--t), background-color var(--t), color var(--t);
}
.guide-links a:hover { border-color: var(--line-2); background: var(--surface-2); color: var(--accent-text); }
@media (max-width: 640px) { .guide-links { grid-template-columns: minmax(0, 1fr); } }

/* FAQ uses .faq from aphex.css */
.faq details > p { font-size: .96rem; }

/* ---------- Footer (footer.footer.site-footer) ---------- */
/* two columns only on wide screens: an unconditional rule here would override the one-column rule of aphex.css
   (max-width: 760px) and the footer columns would overlap on phones (QA T13) */
@media (min-width: 761px) { .foot { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
@media (max-width: 760px) { .foot { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; } .foot ul.footer-links { gap: .7rem 1.2rem; } }
.foot ul.footer-links { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; }
.footer-links a:hover { color: var(--accent-text); }
.legal .tm { max-width: 60rem; line-height: 1.6; }

/* ---------- Guides and the guide list (shell, main.doc) ---------- */
.doc { padding-block: clamp(2.5rem, 5vw, 4.5rem) var(--section); }
.doc h1 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3rem); letter-spacing: var(--track-h2); line-height: 1.1; margin: 1rem 0 1rem; }
.doc h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); letter-spacing: var(--track-h3); margin: 2.4rem 0 .8rem; }
.doc h3 { font-size: var(--fs-h3); margin: 1.8rem 0 .6rem; }
.doc p, .doc li { color: var(--text-2); }
.doc p + p { margin-top: 1rem; }
.doc .lead { margin-bottom: 1rem; }
.doc ol, .doc ul { padding-left: 1.3rem; margin: 1rem 0; }
.doc li + li { margin-top: .4rem; }
.doc strong { color: var(--text); }
.doc p a, .doc li a, .doc td a { text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: .22em; }
.doc p a:hover, .doc li a:hover { color: var(--accent-text); }
.crumbs { font-size: var(--fs-small); color: var(--text-3); }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--accent-text); }
.updated { font-size: var(--fs-small); color: var(--text-3); font-family: var(--font-mono); }
.doc .table-wrap { overflow-x: auto; margin: 1.2rem 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.doc th, .doc td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--text-2); }
.doc th { color: var(--text); font-weight: 600; }
.product-box {
  position: relative; isolation: isolate; overflow: hidden; margin: 3rem 0; padding: 1.8rem; border-radius: var(--r-l);
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line-2); box-shadow: var(--shadow-card);
}
.product-box::after { content: ""; position: absolute; z-index: -1; right: -20%; bottom: -60%; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--glow), transparent 65%); pointer-events: none; }
.doc .product-box h2 { margin-top: 0; }
.product-box p + p { margin-top: 1.2rem; }
.doc .product-box a.btn { text-decoration: none; }
.doc ul.guide-list { display: grid; gap: .75rem; margin: 1.5rem 0; padding: 0; list-style: none; }
.guide-list li {
  margin: 0; padding: 1.15rem 1.3rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  transition: border-color var(--t), background-color var(--t);
}
.guide-list li:hover { border-color: var(--line-2); background: var(--surface-2); }
.doc .guide-list h2 { font-size: var(--fs-h3); letter-spacing: var(--track-h3); margin: 0 0 .35rem; line-height: 1.3; }
.guide-list h2 a { color: var(--text); }
.guide-list h2 a:hover { color: var(--accent-text); }
.guide-list p { font-size: .94rem; }
.related ul { padding-left: 1.2rem; }
.doc pre { overflow-x: auto; margin: 1.2rem 0; padding: 1rem 1.1rem; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.doc pre code { padding: 0; border: 0; background: none; font-size: .85rem; line-height: 1.6; color: var(--text); }
/* comparison table on phones: one block per option (header row hidden, option name as heading) */
@media (max-width: 640px) {
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .doc tr { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .doc td { padding: .2rem 0; border: 0; }
  .doc td:first-child { color: var(--text); font-weight: 600; }
}
