/* Wspólne style wszystkich trzech tutoriali. */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: #fff;
  color: #172231;
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: #1758ce;
  text-underline-offset: 4px;
}

a:hover {
  text-decoration: underline;
}

button,
a,
summary {
  touch-action: manipulation;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid #2464dd;
  outline-offset: 5px;
}

.top {
  min-height: 74px;
  padding: 18px 5%;
  border-bottom: 1px solid #e2e7ef;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  background: #fff;
}

.top a {
  text-decoration: none;
  font-size: 14px;
}

.brand {
  font-weight: 700;
  color: #172231 !important;
}

.brand span {
  font-weight: 400;
  color: #657184;
}

.layout {
  max-width: 1380px;
  margin: auto;
  padding: 54px 5% 0;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 70px;
}

aside {
  align-self: start;
  position: sticky;
  top: 28px;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

nav a {
  font-size: 14px;
  line-height: 1.45;
  color: #576373;
  text-decoration: none;
  padding: 4px 0;
}

nav span {
  display: inline-block;
  min-width: 28px;
  color: #8490a0;
  font-variant-numeric: tabular-nums;
}

main {
  min-width: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: 12px;
  font-weight: 700;
  color: #1758ce;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -.045em;
  margin: 0 0 24px;
  font-weight: 700;
}

h2 {
  font-size: 1.6rem;
  letter-spacing: -.025em;
  line-height: 1.3;
  margin: 0 0 20px;
}

h3 {
  font-size: 1.1rem;
  margin: 28px 0 12px;
}

.lead {
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 620px;
  color: #576373;
}

.meta {
  font-size: 14px;
  color: #697687;
  margin: 24px 0 42px;
}

.preflight {
  padding: 30px;
  background: #f4f7fc;
  border-top: 3px solid #2260d2;
  margin-bottom: 60px;
}

p {
  margin: 0 0 18px;
}

dl {
  margin-bottom: 0;
}

dt {
  font-weight: 650;
  margin-top: 20px;
}

dd {
  margin: 3px 0 0;
  color: #455263;
}

code {
  font-size: .92em;
  background: #e9eef7;
  padding: 2px 5px;
  overflow-wrap: anywhere;
}

.note {
  border-left: 2px solid #a5bde8;
  padding-left: 16px;
  color: #536174;
  font-size: 14px;
  margin-top: 25px;
  margin-bottom: 0;
}

.step {
  padding: 0 0 52px;
  margin-bottom: 42px;
  border-bottom: 1px solid #e2e7ef;
}

.step-heading {
  display: flex;
  gap: 18px;
  align-items: baseline;
}

.number {
  font-size: 14px;
  font-weight: 700;
  color: #1758ce;
  font-variant-numeric: tabular-nums;
}

.step-body {
  margin-left: 38px;
}

figure {
  margin: 24px 0 0;
}

figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #d8dfe9;
  border-radius: 10px;
}

figcaption {
  font-size: 13px;
  color: #647183;
  line-height: 1.5;
  margin-top: 9px;
}

.table-wrap {
  overflow-x: auto;
  margin: 16px 0 24px;
}

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

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid #d9e1ec;
  vertical-align: top;
}

thead {
  background: #f0f4fb;
}

tbody th {
  width: 28%;
  font-weight: 600;
}

td code {
  white-space: normal;
}

.finish {
  border-left: 3px solid #1758ce;
  padding: 4px 0 4px 26px;
  margin: 0 0 60px;
}

.prompt-section {
  padding: 32px;
  background: #11233f;
  color: #f3f6fc;
  border-radius: 12px;
  margin: 0 0 60px;
}

.prompt-section .eyebrow {
  color: #a1c2ff;
}

.prompt-section a {
  color: #bed4ff;
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  margin: 25px 0;
  font-size: 14px;
}

button {
  border: 0;
  background: #fff;
  color: #12284c;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.5;
  padding: 12px 20px;
  border-radius: 7px;
  cursor: pointer;
}

button:hover {
  background: #e2ebfc;
}

summary {
  cursor: pointer;
  font-size: 15px;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
  font-size: 14px;
  font-family: inherit;
  border-top: 1px solid #3e4e67;
  padding-top: 20px;
}

#copy-status {
  color: #c7dafb;
}

#zrodla p,
#zrodla li {
  font-size: 15px;
}

footer {
  border-top: 1px solid #e2e7ef;
  margin-top: 50px;
  padding: 24px 0 45px;
  font-size: 13px;
  color: #657184;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 15px;
  top: 10px;
  background: white;
  padding: 12px;
  z-index: 5;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 32px;
  }

  aside {
    position: static;
    margin-bottom: 30px;
  }

  aside nav {
    display: none;
  }

  aside .eyebrow {
    margin: 0;
  }

  .step-body {
    margin-left: 0;
  }

  .top .brand span {
    display: none;
  }

  .preflight,
  .prompt-section {
    padding: 22px;
  }

  h1 {
    font-size: 2.7rem;
  }

  .top {
    padding: 16px 5%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  aside,
  .top,
  .actions,
  .skip {
    display: none;
  }

  .layout {
    display: block;
    padding: 0;
  }

  body {
    font-size: 11pt;
    color: #111;
  }

  .intro h1 {
    font-size: 30pt;
  }

  .step {
    break-before: page;
    margin: 0;
    padding: 0;
    border: 0;
  }

  figure {
    break-inside: avoid;
  }

  figure img {
    max-height: 130mm;
    object-fit: contain;
  }

  .step-body {
    margin: 0;
  }

  .prompt-section {
    color: #111;
    background: white;
    border: 1px solid #ccc;
  }

  .prompt-section a,
  .prompt-section .eyebrow {
    color: #111;
  }

  h2,
  h3 {
    break-after: avoid;
  }

  a {
    color: #111;
  }

  footer {
    padding-bottom: 0;
  }
}

[hidden] {
  display: none !important;
}

.tabs {
  border: 1px solid #d9e1ec;
  border-radius: 12px;
  padding: 22px;
  margin: 24px 0;
}

.tabs [role="tablist"] {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid #d9e1ec;
  padding-bottom: 12px;
}

.tabs [role="tab"] {
  background: #eef3fa;
  color: #1758ce;
}

.tabs [role="tab"][aria-selected="true"] {
  background: #1758ce;
  color: white;
}

.code {
  font: 13px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  background: #f3f6fb;
  color: #172231;
  padding: 18px;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  max-height: 640px;
  overflow: auto;
  white-space: pre-wrap;
}

.code code {
  padding: 0;
  background: none;
  overflow-wrap: anywhere;
}

.phone {
  max-width: 340px;
  margin: 24px auto;
}

.phone img {
  width: 100%;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gallery .phone {
  margin: 12px 0;
}

.series {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
}

.preflight p {
  margin-top: 12px;
}

details {
  margin: 20px 0;
}

section {
  scroll-margin-top: 24px;
}

li {
  margin: 8px 0;
}

input {
  max-width: 100%;
}

@media (max-width: 600px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery .phone {
    margin: 20px auto;
    max-width: 290px;
  }

  .tabs {
    padding: 14px;
  }

  h1 {
    font-size: 2.6rem;
  }
}

@media print {
  [role="tabpanel"][hidden] {
    display: block !important;
  }

  .code {
    max-height: none;
  }

  .phone img {
    max-height: 180mm;
  }

  .gallery {
    display: block;
  }

  .phone {
    break-inside: avoid;
  }

  .tabs [role="tablist"] {
    display: none;
  }
}

@media (min-width: 901px) {
  aside {
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    padding-right: 8px;
  }
}

figure + p {
  margin-top: 22px;
}

/* Aktywne menu: tylko kolor tekstu. */

aside nav a[aria-current="location"],
aside nav a[aria-current="location"] span {
  color: #1758ce;
}
