/* Priručnik — design system
   Papir, mastilo i jedan cinober. Posteri su jedina slika; sve ostalo im pravi mesto. */

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/instrument-serif-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/instrument-serif-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/instrument-serif-italic-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/instrument-serif-italic-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 400 650;
  font-display: swap;
  src: url(/fonts/geist-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 400 650;
  font-display: swap;
  src: url(/fonts/geist-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light;

  /* boje */
  --paper: #f3eee4;
  --paper-2: #ebe4d6;
  --surface: #faf7f1;
  --ink: #1a1712;
  --ink-2: #4d473d;
  --ink-3: #6b6456;
  --line: #d8cfbf;
  --line-strong: #bfb4a1;
  --accent: #b8360f;
  --accent-hover: #9c2c0a;
  --accent-ink: #fff8f2;
  --accent-soft: #f2dccf;
  --ok: #2f6b3a;
  --ok-soft: #dfeadb;
  --danger: #b3261e;
  --danger-soft: #f6dcd8;
  --inverse: #1a1712;
  --inverse-ink: #efe9dd;
  --inverse-muted: #a39a89;
  --poster-empty: #e2d9c8;

  /* tipografija */
  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: Geist, ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-base: 1rem;
  --t-md: 1.125rem;
  --t-lg: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --t-xl: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  --t-2xl: clamp(2.5rem, 1.6rem + 3.6vw, 4.75rem);
  --t-display: clamp(3.6rem, 1.6rem + 7vw, 8.75rem);

  /* prostor */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1360px;
  --header-h: 64px;

  /* oblik */
  --r-poster: 3px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-pill: 999px;
  --shadow-poster: 0 1px 1px rgb(26 23 18 / 0.08), 0 12px 28px -12px rgb(26 23 18 / 0.35);
  --shadow-poster-hover: 0 2px 2px rgb(26 23 18 / 0.08), 0 28px 44px -18px rgb(26 23 18 / 0.45);
  --shadow-float: 0 -1px 0 rgb(26 23 18 / 0.06), 0 -12px 32px -16px rgb(26 23 18 / 0.3);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.09 0 0 0 0 0.07 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #11100e;
    --paper-2: #1a1815;
    --surface: #1c1a17;
    --ink: #f1ece2;
    --ink-2: #c9c0b0;
    --ink-3: #978e7f;
    --line: #2f2b25;
    --line-strong: #474036;
    --accent: #ff7a4a;
    --accent-hover: #ff9670;
    --accent-ink: #1c0b04;
    --accent-soft: #3a1c10;
    --ok: #8fc79a;
    --ok-soft: #1c2d1f;
    --danger: #ff8a7d;
    --danger-soft: #3a1714;
    --inverse: #0a0908;
    --inverse-ink: #efe9dd;
    --inverse-muted: #8f8778;
    --poster-empty: #24211c;
    --shadow-poster: 0 1px 1px rgb(0 0 0 / 0.4), 0 14px 30px -12px rgb(0 0 0 / 0.7);
    --shadow-poster-hover: 0 2px 2px rgb(0 0 0 / 0.4), 0 30px 48px -18px rgb(0 0 0 / 0.8);
    --shadow-float: 0 -1px 0 rgb(255 255 255 / 0.04), 0 -12px 32px -16px rgb(0 0 0 / 0.8);
  }
}

/* ---------- Osnova ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 72px);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  background-image: var(--grain);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-base);
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left));
}

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

.skip {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 100;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
  background: var(--ink);
  color: var(--paper);
  font-weight: 560;
  text-decoration: none;
}

.skip:focus {
  top: var(--s-3);
}

.muted {
  color: var(--ink-3);
}

.icon {
  flex: none;
  width: 1em;
  height: 1em;
}

/* ---------- Tipografija ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-display);
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.display em,
.section-title em {
  font-style: italic;
  color: var(--accent);
}

.display-md {
  font-size: var(--t-2xl);
  line-height: 0.98;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--ink-2);
  font-size: var(--t-xs);
  font-weight: 560;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-xl);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.section-title-sm {
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem);
}

.hint {
  color: var(--ink-3);
  font-size: var(--t-sm);
}

/* ---------- Dugmad ---------- */

.btn {
  --btn-h: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: var(--btn-h);
  padding: 0 1.35em;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: transparent;
  font-size: var(--t-base);
  font-weight: 560;
  line-height: 1;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn .icon {
  transition: transform 0.25s var(--ease);
}

.btn:hover .icon {
  transform: translate(2px, -2px);
}

.btn:hover .icon-down {
  transform: translateY(2px);
}

.btn:hover .icon-left,
.link-back:hover .icon-left {
  transform: translateX(-2px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-quiet {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-quiet:hover {
  border-color: var(--ink);
}

.btn-danger {
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger-soft);
}

.btn-sm {
  --btn-h: 38px;
  padding: 0 1em;
  font-size: var(--t-sm);
}

.btn-lg {
  --btn-h: 58px;
  padding: 0 1.8em;
  font-size: var(--t-md);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

.link-arrow,
.link-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  color: var(--ink-2);
  font-size: var(--t-sm);
  font-weight: 560;
  text-decoration: none;
}

.link-arrow:hover,
.link-back:hover {
  color: var(--ink);
}

/* ---------- Zaglavlje ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper) var(--grain);
  border-bottom: 1px solid transparent;
}

@supports (animation-timeline: scroll()) {
  .site-header {
    animation: header-rule linear both;
    animation-timeline: scroll();
    animation-range: 0 80px;
  }
}

@keyframes header-rule {
  to {
    border-bottom-color: var(--line);
  }
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.wordmark-mark {
  width: 14px;
  height: 21px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 4px 3px 0 -1px var(--ink);
  transform: rotate(-4deg);
  transition: transform 0.35s var(--ease);
}

.wordmark:hover .wordmark-mark {
  transform: rotate(3deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(var(--s-3), 2.5vw, var(--s-6));
  font-size: var(--t-sm);
  font-weight: 500;
}

.site-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: 44px;
  color: var(--ink-2);
  text-decoration: none;
}

.site-nav a:not(.btn):hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.45em;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
  gap: var(--s-7);
  padding-block: clamp(var(--s-6), 5vw, var(--s-9)) clamp(var(--s-7), 6vw, var(--s-9));
}

.hero-copy {
  display: grid;
  gap: var(--s-5);
  justify-items: start;
}

.hero-copy .display {
  margin-top: var(--s-2);
}

.hero-lede {
  max-width: 34ch;
  color: var(--ink-2);
  font-size: var(--t-lg);
  line-height: 1.45;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-3);
}

.hero-stack {
  position: relative;
  height: clamp(300px, 38vw, 540px);
  isolation: isolate;
}

.stack-poster {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(62%, 300px);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--r-poster);
  background: var(--poster-empty);
  box-shadow: var(--shadow-poster-hover);
  transform: translate(-50%, -50%) rotate(var(--r, 0deg)) translateX(var(--x, 0));
  transition: transform 0.7s var(--ease);
  animation: fan-in 0.9s var(--ease) both;
}

.stack-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stack-poster.s1 {
  z-index: 3;
  --r: -2deg;
}

.stack-poster.s2 {
  z-index: 2;
  --r: -10deg;
  --x: -34%;
  animation-delay: 0.08s;
}

.stack-poster.s3 {
  z-index: 1;
  --r: 8deg;
  --x: 34%;
  animation-delay: 0.16s;
}

.count-2 .s1 {
  --x: 14%;
}

.count-2 .s2 {
  --x: -22%;
}

.hero-stack:hover .s2 {
  --r: -13deg;
  --x: -44%;
}

.hero-stack:hover .s3 {
  --r: 11deg;
  --x: 44%;
}

.hero-stack:hover .s1 {
  --r: 0deg;
}

@keyframes fan-in {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) rotate(0deg) translateX(0);
  }
}

.hero-compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  padding-block: clamp(var(--s-6), 5vw, var(--s-8)) var(--s-6);
}

/* ---------- Putanja ---------- */

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  list-style: none;
  color: var(--ink-3);
  font-size: var(--t-sm);
}

.crumbs li + li::before {
  content: "/";
  margin-right: var(--s-2);
  color: var(--line-strong);
}

.crumbs a {
  color: var(--ink-2);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.crumbs [aria-current] {
  max-width: 28ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Katalog ---------- */

.catalog {
  padding-bottom: var(--s-9);
}

.chips-bar {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  margin-bottom: var(--s-6);
  background: var(--paper) var(--grain);
  border-block: 1px solid var(--line);
}

.chips {
  display: flex;
  gap: var(--s-2);
  padding-block: var(--s-3);
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent);
}

.chips::-webkit-scrollbar {
  display: none;
}

.chips li {
  flex: none;
  scroll-snap-align: start;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-size: var(--t-sm);
  font-weight: 500;
  text-decoration: none;
  transition:
    background-color 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.chip[aria-current="page"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.wall {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-7) var(--s-4);
  list-style: none;
}

@media (min-width: 640px) {
  .wall {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: var(--s-8) var(--s-5);
  }
}

@media (min-width: 1200px) {
  .wall {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    column-gap: var(--s-6);
  }
}

.card-link {
  display: grid;
  gap: var(--s-4);
  text-decoration: none;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: var(--r-poster);
  background: var(--poster-empty);
  box-shadow: var(--shadow-poster);
  transition:
    transform 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
  background: linear-gradient(100deg, rgb(255 255 255 / 0.14), transparent 9%, transparent 92%, rgb(0 0 0 / 0.06));
  pointer-events: none;
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-link:hover .poster {
  transform: translateY(-6px);
  box-shadow: var(--shadow-poster-hover);
}

.card-link:focus-visible {
  outline: none;
}

.card-link:focus-visible .poster {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.card-body {
  display: grid;
  gap: 6px;
}

.card-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.05rem + 0.4vw, 1.4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.card-link:hover .card-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.card-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: var(--t-sm);
}

.card-cat {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-3);
}

.card-price {
  flex: none;
  font-weight: 560;
  font-variant-numeric: tabular-nums;
}

.is-free {
  color: var(--accent);
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .card {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}

.poster-empty {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: space-between;
  padding: 14%;
  background:
    linear-gradient(to bottom, transparent 64%, color-mix(in srgb, var(--accent) 16%, transparent) 64%),
    var(--poster-empty);
  color: var(--ink-2);
}

.poster-empty-rule {
  width: 34%;
  height: 3px;
  background: var(--accent);
}

.poster-empty-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.more {
  display: grid;
  justify-items: center;
  gap: var(--s-3);
  margin-top: var(--s-8);
}

.more-status {
  min-height: 1.5em;
  color: var(--ink-3);
  font-size: var(--t-sm);
}

.more.is-loading .btn::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: var(--s-6);
  max-width: 560px;
  padding-block: var(--s-7);
}

.empty-state .poster-empty {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--r-poster);
}

.empty-state > div {
  display: grid;
  gap: var(--s-3);
  justify-items: start;
}

.empty-title {
  font-family: var(--font-display);
  font-size: var(--t-xl);
  line-height: 1.05;
}

/* ---------- Sekcije ---------- */

.section {
  padding-block: clamp(var(--s-8), 8vw, var(--s-10));
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  gap: var(--s-3);
  align-content: start;
  margin-bottom: var(--s-7);
}

.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-4);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-6);
  list-style: none;
  counter-reset: none;
}

.step {
  display: grid;
  align-content: start;
  gap: var(--s-3);
  padding-top: var(--s-5);
  border-top: 2px solid var(--ink);
}

.step-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(3rem, 2rem + 3vw, 4.5rem);
  line-height: 0.9;
  color: var(--accent);
}

.step h3 {
  font-size: var(--t-md);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.step p {
  max-width: 36ch;
  color: var(--ink-2);
}

.faq {
  background: var(--paper-2);
  border-top: 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--s-7);
}

.faq-item {
  border-bottom: 1px solid var(--line-strong);
}

.faq-item:first-child {
  border-top: 1px solid var(--line-strong);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 64px;
  padding-block: var(--s-4);
  font-size: var(--t-md);
  font-weight: 560;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-sign {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
}

.faq-sign::before,
.faq-sign::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 14px;
  height: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}

.faq-sign::after {
  transform: rotate(90deg);
}

.faq-item[open] .faq-sign::after {
  transform: rotate(0deg);
}

.faq-item p {
  max-width: 58ch;
  padding-bottom: var(--s-5);
  color: var(--ink-2);
}

/* ---------- Detalj ---------- */

.detail {
  padding-top: var(--s-5);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(var(--s-6), 6vw, var(--s-9));
  align-items: start;
  padding-block: var(--s-6) var(--s-9);
}

.detail-poster {
  position: sticky;
  top: calc(var(--header-h) + var(--s-5));
  margin: 0;
}

.poster-lg {
  max-width: 480px;
  box-shadow: var(--shadow-poster-hover);
}

.detail-body {
  display: grid;
  gap: var(--s-5);
  align-content: start;
  padding-top: var(--s-3);
}

.detail-title {
  overflow-wrap: break-word;
  hyphens: auto;
}

.buy {
  display: grid;
  justify-items: start;
  gap: var(--s-4);
  padding-block: var(--s-6);
  border-block: 1px solid var(--line);
}

.buy-price {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.6rem + 1.4vw, 2.75rem);
  line-height: 1;
  font-variant-numeric: lining-nums;
}

.buy-note {
  color: var(--ink-3);
  font-size: var(--t-sm);
}

.code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-2);
  padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  background: var(--surface);
}

.code-label {
  color: var(--ink-3);
  font-size: var(--t-xs);
  font-weight: 560;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.code code {
  font-family: var(--font-mono);
  font-size: var(--t-md);
  font-weight: 600;
  letter-spacing: 0.04em;
  user-select: all;
}

.code-copy {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: transparent;
  font-size: var(--t-sm);
  font-weight: 560;
  cursor: pointer;
}

.code-copy:hover {
  border-color: var(--ink);
}

.code-copy.is-done {
  border-color: var(--ok);
  color: var(--ok);
}

.prose {
  display: grid;
  gap: 1em;
  max-width: 64ch;
  color: var(--ink-2);
  font-size: var(--t-md);
  line-height: 1.7;
  white-space: pre-line;
  overflow-wrap: break-word;
}

.prose p:first-child {
  color: var(--ink);
  font-size: var(--t-lg);
  line-height: 1.5;
}

.related {
  padding-block: var(--s-8) var(--s-9);
}

@media (min-width: 900px) {
  .wall-related {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: var(--s-5);
  }
}

.related .section-head {
  margin-bottom: var(--s-6);
}

.banner {
  margin-top: var(--s-4);
  padding: var(--s-3) var(--s-4);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: var(--r-md);
  background: var(--accent-soft);
  font-size: var(--t-sm);
  font-weight: 500;
}

.buybar {
  display: none;
}

/* ---------- 404 ---------- */

.not-found {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: clamp(var(--s-6), 6vw, var(--s-9));
  max-width: 980px;
  padding-block: clamp(var(--s-8), 10vw, var(--s-10));
}

.not-found > div {
  display: grid;
  gap: var(--s-4);
  justify-items: start;
}

.not-found .hero-lede {
  margin-bottom: var(--s-3);
}

.not-found-poster {
  transform: rotate(-4deg);
}

.not-found-code {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--accent);
}

/* ---------- Podnožje ---------- */

.site-footer {
  padding-block: var(--s-8) var(--s-6);
  background: var(--inverse);
  color: var(--inverse-ink);
  --ink: var(--inverse-ink);
  --line: rgb(255 255 255 / 0.12);
}

.site-footer .wordmark {
  font-size: 2.25rem;
}

.site-footer .wordmark-mark {
  box-shadow: 4px 3px 0 -1px var(--inverse-muted);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-7);
  padding-bottom: var(--s-7);
}

.footer-brand {
  display: grid;
  gap: var(--s-4);
  align-content: start;
}

.footer-brand p {
  max-width: 38ch;
  color: var(--inverse-muted);
}

.footer-nav {
  display: flex;
  gap: clamp(var(--s-7), 8vw, var(--s-10));
}

.footer-heading {
  margin-bottom: var(--s-3);
  color: var(--inverse-muted);
  font-size: var(--t-xs);
  font-weight: 560;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-nav ul {
  display: grid;
  gap: var(--s-1);
  list-style: none;
}

.footer-nav a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.footer-fine {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  color: var(--inverse-muted);
  font-size: var(--t-sm);
}

/* ---------- Admin ---------- */

.admin-tag {
  margin-left: 4px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--t-xs);
  font-weight: 560;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-header {
  border-bottom-color: var(--line);
  animation: none;
}

.admin-main {
  display: grid;
  gap: var(--s-5);
  align-content: start;
  padding-block: var(--s-6) var(--s-9);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: var(--s-7);
  align-items: start;
}

.admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}

.admin-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--t-xl);
  line-height: 1;
}

.admin-subtitle {
  margin-bottom: var(--s-4);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1;
}

.panel {
  margin: 0;
  padding: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.panel-title {
  margin-bottom: var(--s-1);
  padding: 0;
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.empty-panel {
  display: grid;
  justify-items: start;
  gap: var(--s-4);
}

.stack {
  display: grid;
  gap: var(--s-4);
}

.row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4);
}

label {
  display: grid;
  gap: 6px;
  color: var(--ink-2);
  font-size: var(--t-sm);
  font-weight: 500;
}

label > span:first-child {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--t-base);
  font-weight: 400;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

textarea {
  resize: vertical;
  line-height: 1.6;
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--ink-3);
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

input:disabled {
  color: var(--ink-3);
  background: var(--paper-2);
}

input[type="file"] {
  padding: 8px;
  font-size: var(--t-sm);
}

input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.affix {
  display: flex;
  align-items: stretch;
}

.affix input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.affix-text {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-left: 0;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--paper-2);
  color: var(--ink-3);
  white-space: nowrap;
}

.counter {
  color: var(--ink-3);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.counter.is-near {
  color: var(--danger);
}

.alert {
  padding: var(--s-4) var(--s-5);
  border-radius: var(--r-md);
  font-size: var(--t-sm);
}

.alert ul {
  display: grid;
  gap: 2px;
  padding-left: 1.1em;
}

.alert-title {
  margin-bottom: var(--s-2);
  font-weight: 600;
}

.alert-error {
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
  background: var(--danger-soft);
  color: var(--danger);
}

.alert-ok {
  border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent);
  background: var(--ok-soft);
  color: var(--ok);
  font-weight: 560;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-size: var(--t-xs);
  font-weight: 560;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
}

.badge-live {
  border-color: color-mix(in srgb, var(--ok) 40%, transparent);
  background: var(--ok-soft);
  color: var(--ok);
}

.badge-live::before {
  background: var(--ok);
}

.book-list {
  display: grid;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}

.book-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-3) var(--s-4);
}

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

.book-thumb {
  width: 48px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 2px;
  background: var(--poster-empty);
}

.book-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-main {
  display: grid;
  min-width: 0;
}

.book-title {
  font-weight: 560;
  text-decoration: none;
}

.book-title:hover {
  text-decoration: underline;
}

.book-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-3);
  font-size: var(--t-sm);
}

.book-actions {
  display: flex;
  gap: var(--s-4);
  font-size: var(--t-sm);
}

.book-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--ink-2);
}

.book-actions a:hover {
  color: var(--ink);
}

.admin-side {
  display: grid;
  gap: var(--s-4);
}

.cat-list {
  display: grid;
  gap: var(--s-3);
  list-style: none;
}

.cat-row {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-4);
}

.cat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 72px;
  gap: var(--s-3);
  align-items: end;
}

.cat-form .btn {
  grid-column: 1 / -1;
  justify-self: start;
}

.cat-row > form:last-child {
  margin-top: calc(-1 * var(--s-3) - 38px);
  justify-self: end;
}

.edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--s-6);
  align-items: start;
}

.edit-main,
.edit-side {
  display: grid;
  gap: var(--s-5);
}

.edit-side {
  position: sticky;
  top: calc(var(--header-h) + var(--s-5));
}

fieldset.panel {
  min-width: 0;
}

legend.panel-title {
  float: left;
  width: 100%;
  margin-bottom: 0;
}

legend.panel-title + * {
  clear: both;
}

.poster-admin {
  width: 100%;
  max-width: 200px;
}

.danger-zone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  margin-top: var(--s-5);
  padding: var(--s-5);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  border-radius: var(--r-md);
}

/* ---------- Prelomi ---------- */

@media (max-width: 1000px) {
  .admin-grid,
  .edit-grid {
    grid-template-columns: 1fr;
  }

  .edit-side {
    position: static;
    grid-row: 1;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }
}

@media (max-width: 899px) {
  .hero {
    grid-template-columns: 1fr;
    gap: var(--s-6);
  }

  .hero-stack {
    order: -1;
    height: clamp(200px, 52vw, 360px);
    margin-top: calc(-1 * var(--s-3));
  }

  .stack-poster {
    width: min(40%, 220px);
  }

  .stack-poster.s2 {
    --x: -46%;
  }

  .stack-poster.s3 {
    --x: 46%;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: var(--s-6);
  }

  .faq-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    gap: var(--s-6);
    padding-top: var(--s-5);
  }

  .detail-poster {
    position: static;
  }

  .poster-lg {
    width: min(68%, 340px);
    margin-inline: auto;
  }

  .has-buybar .buybar {
    position: fixed;
    inset: auto 0 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    padding: var(--s-3) max(var(--gutter), env(safe-area-inset-right)) calc(var(--s-3) + env(safe-area-inset-bottom))
      max(var(--gutter), env(safe-area-inset-left));
    background: var(--paper);
    box-shadow: var(--shadow-float);
    transition: transform 0.35s var(--ease);
  }

  .buybar.is-managed:not(.is-shown) {
    transform: translateY(110%);
  }

  .buybar-price {
    font-family: var(--font-display);
    font-size: 1.6rem;
    line-height: 1;
  }

  .has-buybar .site-footer {
    padding-bottom: calc(var(--s-6) + 76px + env(safe-area-inset-bottom));
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .not-found {
    grid-template-columns: 1fr;
  }

  .not-found-poster {
    width: 140px;
  }
}

@media (max-width: 560px) {
  :root {
    --header-h: 56px;
  }

  .hide-sm {
    display: none !important;
  }

  .wordmark {
    font-size: 1.4rem;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .card-body {
    gap: 4px;
  }

  .card-meta {
    flex-direction: column;
    gap: 2px;
  }

  .row-2,
  .cat-form {
    grid-template-columns: 1fr;
  }

  .cat-row > form:last-child {
    margin-top: 0;
    justify-self: start;
  }

  .book-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: var(--s-3);
  }

  .book-thumb {
    width: 40px;
  }

  .book-actions {
    grid-column: 2 / -1;
  }

  .empty-state {
    grid-template-columns: 96px 1fr;
    gap: var(--s-5);
  }

  .footer-nav {
    gap: var(--s-7);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .site-header {
    animation: none;
    border-bottom-color: var(--line);
  }
}

@media print {
  .site-header,
  .chips-bar,
  .buybar,
  .more,
  .site-footer {
    display: none !important;
  }
}
