:root {
  --tor-ink: #111827;
  --tor-text: #52637d;
  --tor-muted: #718096;
  --tor-line: #d8e0ea;
  --tor-soft: #f5f7fa;
  --tor-paper: #fffdf8;
  --tor-red: #df3645;
  --tor-red-soft: #fff0f2;
  --tor-blue: #245b9f;
  --tor-green: #276b5d;
}

body[data-city-pilot="torun-logistics-handoff-v2"],
body[data-city-pilot="torun-logistics-handoff-v2"] #main-content {
  background: #fff;
  color: var(--tor-ink);
}

.tor-shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.tor-kicker {
  margin: 0 0 0.8rem;
  color: var(--tor-red);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tor-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.8rem 1.15rem;
  border: 1px solid var(--tor-ink);
  border-radius: 0.72rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}

.tor-button:hover { transform: translateY(-2px); }
.tor-button:focus-visible { outline: 3px solid rgba(36, 91, 159, 0.32); outline-offset: 3px; }
.tor-button--primary { background: var(--tor-ink); color: #fff; }
.tor-button--quiet { border-color: var(--tor-line); background: #fff; color: var(--tor-ink); }
.tor-nowrap { white-space: nowrap; }

.tor-hero {
  position: relative;
  padding: 7.25rem 0 2.2rem;
  border-bottom: 1px solid var(--tor-line);
  background:
    linear-gradient(90deg, transparent 49.92%, rgba(216, 224, 234, 0.42) 50%, transparent 50.08%),
    radial-gradient(circle at 14% 24%, rgba(223, 54, 69, 0.055), transparent 29%),
    #fff;
}

.tor-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(2rem, 4.2vw, 4rem);
  align-items: center;
}

.tor-hero__copy { min-width: 0; }
.tor-hero h1 { margin: 0; max-width: 12.5ch; }
.tor-hero h1 em { color: var(--tor-red); font-style: normal; }
.tor-hero__lead { max-width: 35rem; margin: 1.2rem 0 0; color: var(--tor-text); }

.tor-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
  margin-top: 1.55rem;
}

.tor-hero__manifest {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 1.65rem 0 0;
  border-block: 1px solid var(--tor-line);
}

.tor-hero__manifest > div {
  min-width: 0;
  padding: 0.75rem 0.65rem 0.82rem;
  border-left: 1px solid var(--tor-line);
}

.tor-hero__manifest > div:first-child { border-left: 0; padding-left: 0; }
.tor-hero__manifest dt { color: var(--tor-red); font-size: 0.64rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.tor-hero__manifest dd { margin: 0.22rem 0 0; color: var(--tor-ink); font-size: 0.72rem; font-weight: 700; line-height: 1.35; }

.tor-hero__visual {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--tor-line);
  border-radius: 1.15rem;
  background: var(--tor-paper);
  box-shadow: 0 22px 48px rgba(17, 24, 39, 0.08);
  overflow: hidden;
}

.tor-hero__visual picture,
.tor-hero__visual img { display: block; width: 100%; }
.tor-hero__visual img { height: auto; aspect-ratio: 760 / 520; }
.tor-hero__visual figcaption { display: flex; justify-content: space-between; gap: 1rem; padding: 0.78rem 1rem; border-top: 1px solid var(--tor-line); color: var(--tor-muted); }
.tor-hero__visual figcaption strong { color: var(--tor-ink); }

.tor-gate,
.tor-delivery,
.tor-faq { padding: 3.65rem 0; }

.tor-gate__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(2.2rem, 5vw, 5rem);
  align-items: start;
}

.tor-gate__intro h2,
.tor-evidence h2,
.tor-delivery h2,
.tor-stack h2,
.tor-faq h2 { margin: 0; }

.tor-gate__intro > p:last-child,
.tor-delivery header > p:last-child,
.tor-faq header > p { margin: 1rem 0 0; color: var(--tor-text); }

.tor-gate__rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--tor-line);
}

.tor-gate__rail > div {
  position: relative;
  min-width: 0;
  padding: 1.25rem 1.15rem 1.35rem;
  border-left: 1px solid var(--tor-line);
}

.tor-gate__rail > div:first-child { border-left: 0; }
.tor-gate__rail > div:nth-child(2) { background: var(--tor-red-soft); }
.tor-gate__rail span { display: block; color: var(--tor-red); font-size: 0.64rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.tor-gate__rail strong { display: block; margin-top: 0.55rem; color: var(--tor-ink); font-size: 0.94rem; line-height: 1.3; }
.tor-gate__rail p { margin: 0.42rem 0 0; color: var(--tor-text); font-size: 0.76rem; line-height: 1.5; }

.tor-evidence {
  padding: 3.25rem 0;
  border-block: 1px solid var(--tor-line);
  background: var(--tor-soft);
}

.tor-evidence__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.tor-evidence h2 { max-width: 19ch; }
.tor-evidence__body > p { margin: 0; color: var(--tor-text); line-height: 1.7; }
.tor-evidence__body aside { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; margin-top: 1rem; padding: 0.9rem 1rem; border-left: 3px solid var(--tor-red); background: #fff; }
.tor-evidence__body aside strong { color: var(--tor-red); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }
.tor-evidence__body aside span { color: var(--tor-text); font-size: 0.76rem; line-height: 1.5; }
.tor-evidence__body > a { display: inline-flex; min-height: 44px; align-items: center; color: var(--tor-ink); font-size: 0.78rem; font-weight: 800; text-decoration: none; }
.tor-evidence__body > a:focus-visible { outline: 3px solid rgba(36, 91, 159, 0.3); outline-offset: 2px; }

.tor-delivery__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 5vw, 5rem);
}

.tor-delivery ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--tor-line); }
.tor-delivery ol > li { display: grid; grid-template-columns: 2rem minmax(0, 1fr) minmax(10rem, 0.58fr); gap: 0.9rem; align-items: center; padding: 0.95rem 0; border-bottom: 1px solid var(--tor-line); }
.tor-delivery ol > li > span { color: var(--tor-red); font-size: 0.68rem; font-weight: 800; }
.tor-delivery ol strong { font-size: 0.92rem; }
.tor-delivery ol p { margin: 0.22rem 0 0; color: var(--tor-text); font-size: 0.75rem; line-height: 1.45; }
.tor-delivery ol b { color: var(--tor-green); font-size: 0.7rem; line-height: 1.4; text-align: right; }

.tor-stack { padding: 2.5rem 0; border-block: 1px solid var(--tor-line); background: var(--tor-paper); }
.tor-stack__grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 3rem; align-items: center; }
.tor-stack h2 { max-width: 22ch; }
.tor-stack ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border: 1px solid var(--tor-line); background: #fff; }
.tor-stack li { display: grid; grid-template-columns: auto 1fr; column-gap: 0.55rem; align-items: center; min-width: 0; padding: 0.9rem 0.75rem; border-left: 1px solid var(--tor-line); }
.tor-stack li:first-child { border-left: 0; }
.tor-stack .iconify { grid-row: span 2; width: 1.55rem; height: 1.55rem; }
.tor-stack strong { min-width: 0; font-size: 0.72rem; }
.tor-stack small { color: var(--tor-muted); font-size: 0.62rem; line-height: 1.3; }

.tor-faq__grid { display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); gap: clamp(2rem, 5vw, 5rem); }
.tor-faq header .tor-button { margin-top: 1.2rem; }
.tor-faq__list { border-top: 1px solid var(--tor-line); }
.tor-faq details { border-bottom: 1px solid var(--tor-line); }
.tor-faq summary { display: grid; grid-template-columns: 2rem 1fr 1rem; gap: 0.65rem; align-items: center; min-height: 54px; padding: 0.65rem 0; cursor: pointer; list-style: none; }
.tor-faq summary::-webkit-details-marker { display: none; }
.tor-faq summary > span { color: var(--tor-red); font-size: 0.66rem; font-weight: 800; }
.tor-faq summary strong { color: var(--tor-ink); font-size: 0.82rem; line-height: 1.4; }
.tor-faq summary i { position: relative; width: 0.85rem; height: 0.85rem; }
.tor-faq summary i::before,
.tor-faq summary i::after { content: ""; position: absolute; inset: 50% 0 auto; height: 1px; background: var(--tor-red); }
.tor-faq summary i::after { transform: rotate(90deg); transition: transform 160ms ease; }
.tor-faq details[open] summary i::after { transform: rotate(0); }
.tor-faq details > div { padding: 0 2rem 0.9rem 2.65rem; color: var(--tor-text); font-size: 0.79rem; line-height: 1.58; }
.tor-faq summary:focus-visible { outline: 3px solid rgba(36, 91, 159, 0.3); outline-offset: 3px; }

.tor-editorial {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 1.25rem 0 1.7rem;
  border-top: 1px solid var(--tor-line);
  justify-content: space-between;
  gap: 2rem;
  color: var(--tor-muted);
  font-size: 0.72rem;
}

.tor-editorial > div { display: grid; gap: 0.28rem; }
.tor-editorial strong { color: var(--tor-ink); }
.tor-editorial nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.55rem 1rem; }
.tor-editorial a { min-height: 44px; display: inline-flex; align-items: center; color: var(--tor-ink); font-weight: 700; text-decoration: none; }
.tor-editorial a:focus-visible { outline: 3px solid rgba(36, 91, 159, 0.3); outline-offset: 2px; }

@media (max-width: 1079px) {
  .tor-shell { width: min(100% - 32px, 980px); }
  .tor-hero { padding-top: 6.5rem; }
  .tor-hero__grid { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 1.6rem; }
  .tor-hero__manifest { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tor-hero__manifest > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--tor-line); padding-left: 0; }
  .tor-hero__manifest > div:nth-child(4) { border-top: 1px solid var(--tor-line); }
  .tor-stack__grid { grid-template-columns: 0.78fr 1.22fr; gap: 1.5rem; }
  .tor-stack ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tor-stack li:nth-child(3) { border-left: 0; border-top: 1px solid var(--tor-line); }
  .tor-stack li:nth-child(4) { border-top: 1px solid var(--tor-line); }
}

@media (min-width: 1080px) and (max-width: 1199px) {
  .tor-stack__grid { grid-template-columns: 0.8fr 1.2fr; gap: 1.75rem; }
  .tor-stack ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tor-stack li:nth-child(3) { border-left: 0; border-top: 1px solid var(--tor-line); }
  .tor-stack li:nth-child(4) { border-top: 1px solid var(--tor-line); }
}

@media (max-width: 767px) {
  .tor-shell,
  .tor-editorial { width: min(100% - 28px, 700px); }
  .tor-hero { padding: 7.25rem 0 1.5rem; background: #fff; }
  .tor-hero__grid,
  .tor-gate__grid,
  .tor-evidence__grid,
  .tor-delivery__grid,
  .tor-stack__grid,
  .tor-faq__grid { grid-template-columns: 1fr; }
  .tor-hero__grid { gap: 1.5rem; }
  .tor-hero h1 { max-width: 13ch; }
  .tor-hero__visual img { aspect-ratio: 380 / 470; }
  .tor-gate,
  .tor-delivery,
  .tor-faq { padding: 2.8rem 0; }
  .tor-gate__rail { margin-top: 0.2rem; }
  .tor-evidence { padding: 2.8rem 0; }
  .tor-evidence__body aside { grid-template-columns: 1fr; gap: 0.35rem; }
  .tor-delivery ol > li { grid-template-columns: 1.8rem 1fr; align-items: start; }
  .tor-delivery ol b { grid-column: 2; text-align: left; }
  .tor-stack { padding: 2.3rem 0; }
  .tor-stack__grid { gap: 1.4rem; }
  .tor-editorial { flex-direction: column; gap: 0.65rem; }
  .tor-editorial nav { justify-content: flex-start; }
}

@media (max-width: 480px) {
  .tor-shell,
  .tor-editorial { width: calc(100% - 24px); }
  .tor-hero { padding-top: 7.25rem; }
  .tor-hero__actions { flex-direction: column; }
  .tor-button { width: 100%; }
  .tor-hero__manifest > div { padding-inline: 0.45rem; }
  .tor-gate__rail { grid-template-columns: 1fr; border-top: 1px solid var(--tor-line); border-bottom: 0; }
  .tor-gate__rail > div { border-left: 0; border-bottom: 1px solid var(--tor-line); }
  .tor-stack ul { grid-template-columns: 1fr 1fr; }
  .tor-faq details > div { padding-left: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tor-button,
  .tor-faq summary i::after { transition: none; }
  .tor-button:hover { transform: none; }
}
/* Keep the canonical fixed header opaque while local editorial content scrolls beneath it. */
#navbar.glass-nav { background: rgba(255, 255, 255, 0.98); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(15, 23, 42, 0.08); }

/* The city proof is captured as a real full scroll. Do not let deferred painting
   reserve a fake footer/directory spacer or omit those sections from the stitch. */
body[data-city-pilot="torun-logistics-handoff-v2"] footer,
body[data-city-pilot="torun-logistics-handoff-v2"] #cities-seo-grid {
  content-visibility: visible !important;
  contain-intrinsic-size: none !important;
}

body[data-city-pilot="torun-logistics-handoff-v2"] #main-content > section,
body[data-city-pilot="torun-logistics-handoff-v2"] #kalkulator,
body[data-city-pilot="torun-logistics-handoff-v2"] #contact {
  scroll-margin-top: 6rem;
}
