/* Techniki nauki — page-specific styles; the shared subpage kit is at the end of assets/css/styles.css. */

/* Intro: photo + reading column (layout from .wbm-split) */
.techniki-intro {
  background: var(--paper);
}

.techniki-intro__grid {
  --gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.techniki-intro__media {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  background: var(--tint);
}

.techniki-intro__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}

.techniki-intro__grid .prose {
  max-width: 62ch;
}

.techniki-intro__grid .prose h2:first-child {
  margin-top: 0;
}

/* Methods: three articles, each with an exercise card */
.methods {
  background: var(--tint);
}

.method {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(40px, 5vw, 64px) 0;
  scroll-margin-top: 96px;
}

.method:first-child {
  padding-top: 0;
}

.method + .method {
  border-top: 1px solid var(--line-strong);
}

.method:last-child {
  padding-bottom: 0;
}

.method__head .card-icon {
  margin-bottom: 20px;
}

.method__index {
  display: block;
  margin-bottom: 6px;
  color: var(--brand-strong);
  font-family: var(--font-head);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
}

.method__head h2 {
  margin-bottom: 10px;
  font-size: clamp(1.625rem, 1.35rem + 1vw, 2rem);
  line-height: 1.15;
}

.method__lead {
  max-width: 34ch;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.55;
}

.method__body {
  display: grid;
  gap: 26px;
}

.method__body .prose {
  max-width: 62ch;
}

.exercise {
  padding: 26px 28px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(21, 26, 33, 0.04), 0 18px 40px rgba(21, 26, 33, 0.06);
}

.exercise__label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.exercise__label::before {
  content: "";
  flex: none;
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: var(--coral);
}

.exercise ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 1.3em;
}

.exercise li {
  padding-left: 0.2em;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.exercise li::marker {
  color: var(--brand-strong);
  font-weight: 600;
}

/* Technique table */
.techniki-table th:nth-child(1) {
  width: 24%;
}

.techniki-table th:nth-child(2) {
  width: 42%;
}

.data-table.techniki-table td {
  line-height: 1.55;
}

@media (max-width: 980px) {
  .methods .method {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .method__lead {
    max-width: 52ch;
  }
}

@media (max-width: 900px) {
  .techniki-intro__media {
    aspect-ratio: 16 / 10;
  }
}

/* Below 760 px the table becomes a stack of records: same markup and data,
   no horizontal scrolling, the column name repeated above each value. */
@media (max-width: 760px) {
  .techniki-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .techniki-table caption {
    display: block;
    width: 100%;
  }

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

  .techniki-table tbody,
  .techniki-table tr {
    display: block;
  }

  .techniki-table tr {
    padding: 20px 0;
    border-bottom: 1px solid var(--line);
  }

  .techniki-table th,
  .techniki-table td {
    display: block;
    padding: 0;
    border: 0;
  }

  .techniki-table td + td {
    margin-top: 12px;
  }

  .techniki-table td:first-child {
    font-family: var(--font-head);
    font-size: 1.0625rem;
    line-height: 1.35;
  }

  .techniki-table td:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
  }
}

@media (max-width: 600px) {
  .exercise {
    padding: 22px 20px 24px;
  }

  .method {
    padding-block: 36px;
  }
}
