/* ─────────────────────────────────────────
   Free Inventory Templates Hub (/templates/ & /tr/sablonlar/).

   Layered on top of subpage-shared.css (which imports design-tokens.css) and
   for-pages.css. Uses design tokens only; dark mode follows
   prefers-color-scheme.
───────────────────────────────────────── */

:root {
  --tpl-ink: var(--ink);
  --tpl-ink-2: var(--ink2);
  --tpl-ink-3: var(--ink3);
  --tpl-surface: var(--surface);
  --tpl-surface-2: var(--surface2);
  --tpl-chip-bg: var(--bg);
  --tpl-border: var(--border-strong);
  --tpl-accent: var(--blue-text);
  --tpl-on-accent: var(--on-blue-text);
}

@media (prefers-color-scheme: dark) {
  :root {
    --tpl-ink: #F5F8FF;
    --tpl-ink-2: rgba(245, 248, 255, 0.82);
    --tpl-ink-3: rgba(245, 248, 255, 0.64);
    --tpl-surface: #18223F;
    --tpl-surface-2: #24304F;
    --tpl-chip-bg: #131C36;
    --tpl-border: rgba(255, 255, 255, 0.12);
    --tpl-accent: #7AA7FF;
    --tpl-on-accent: #18223F;
  }
}

.tpl-notice {
  background: var(--tpl-surface-2);
  border: 1px solid var(--tpl-border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--tpl-ink-2);
}

.tpl-notice strong {
  color: var(--tpl-ink);
}

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

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

.tpl-card {
  background: var(--tpl-surface);
  border: 1px solid var(--tpl-border);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tpl-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tpl-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
  color: var(--tpl-ink);
}

.tpl-badge {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--tpl-chip-bg);
  border: 1px solid var(--tpl-border);
  color: var(--tpl-ink-2);
}

.tpl-card .tpl-card-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--tpl-ink-2);
}

.tpl-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 4px;
  padding: 0;
  list-style: none;
}

.tpl-cols li {
  font-size: 12px;
  line-height: 1.3;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--tpl-chip-bg);
  border: 1px solid var(--tpl-border);
  color: var(--tpl-ink-2);
}

.tpl-downloads {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

.tpl-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--tpl-accent);
  color: var(--tpl-accent);
  background: transparent;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tpl-dl-btn--primary {
  background: var(--tpl-accent);
  color: var(--tpl-on-accent);
}

.tpl-dl-btn:hover,
.tpl-dl-btn:focus-visible {
  text-decoration: underline;
}

.tpl-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--tpl-ink-3);
  border-top: 1px solid var(--tpl-border);
  padding-top: 10px;
}

.tpl-card-meta a {
  color: var(--tpl-accent);
  text-decoration: none;
  font-weight: 500;
}

.tpl-card-meta a:hover,
.tpl-card-meta a:focus-visible {
  text-decoration: underline;
}

.tpl-langs {
  margin-top: 4px;
  font-size: 12px;
  color: var(--tpl-ink-3);
  line-height: 1.7;
}

.tpl-langs a {
  display: inline-block;
  margin-right: 6px;
  color: var(--tpl-ink-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tpl-langs a:hover,
.tpl-langs a:focus-visible {
  color: var(--tpl-accent);
}

.tpl-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  counter-reset: tpl-step;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (max-width: 760px) {
  .tpl-steps {
    grid-template-columns: 1fr;
  }
}

.tpl-steps li {
  counter-increment: tpl-step;
  background: var(--tpl-surface);
  border: 1px solid var(--tpl-border);
  border-radius: 12px;
  padding: 18px;
}

.tpl-steps li::before {
  content: counter(tpl-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--tpl-accent);
  color: var(--tpl-on-accent);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.tpl-steps h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--tpl-ink);
}

.tpl-steps p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--tpl-ink-2);
}

.tpl-steps a {
  color: var(--tpl-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tpl-steps a:hover,
.tpl-steps a:focus-visible {
  text-decoration-thickness: 2px;
}

.tpl-faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tpl-faq-item {
  background: var(--tpl-surface);
  border: 1px solid var(--tpl-border);
  border-radius: 12px;
  padding: 16px 18px;
}

.tpl-faq-item h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--tpl-ink);
}

.tpl-faq-item p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--tpl-ink-2);
}
