.study .top-inner {
  grid-template-columns: 1fr auto;
}
.study-page {
  max-width: 830px;
}
.study-modes {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.study-modes .btn {
  min-width: 86px;
}
.lecture-page .study-modes {
  margin-top: 7px;
}
.lecture-article {
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
  margin: 20px 0 34px;
  scroll-margin-top: 16px;
}
.lecture-article:target .lecture-title h2 {
  color: var(--lime);
}
.lecture-title p {
  margin: 9px 0;
  max-width: 670px;
}
.lecture-title small {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}
.lecture-figure, .lecture-diagram {
  margin: 20px 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.lecture-figure img {
  width: 100%;
  height: auto;
  max-height: 390px;
  object-fit: contain;
}
.lecture-figure figcaption, .lecture-diagram figcaption {
  padding: 11px 14px;
  line-height: 1.45;
  font-weight: 650;
}
.lecture-figure small {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 400;
  margin-top: 4px;
}
.lecture-figure a, .lecture-article .summary-links a {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lecture-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 5px;
}
.lecture-compare .lecture-figure { margin: 0; }
.lecture-compare figcaption { padding: 9px 10px; font-size: .86rem; }
.lecture-compare img { aspect-ratio: 5 / 3; object-fit: cover; }
.lecture-zoom { display: block; cursor: zoom-in; }
.lecture-visual-sources {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 15px;
  margin: 18px 0;
  background: var(--panel);
}
.lecture-visual-sources summary { cursor: pointer; color: var(--lime); font-weight: 650; }
.lecture-visual-sources ul { margin: 10px 0 0; padding-left: 20px; line-height: 1.65; }
.lecture-visual-sources a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.lecture-visual-sources small { color: var(--muted); }
.lecture-diagram ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr));
  gap: 8px;
  padding: 0 12px 12px;
  margin: 0;
  list-style: none;
}
.lecture-diagram li {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px;
  display: grid;
  gap: 5px;
  align-content: start;
}
.lecture-diagram li span:last-child {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}
.diagram-label {
  font-family: Barlow, Inter, sans-serif;
  font-size: 1.75rem;
  color: var(--lime);
}
.lecture-text {
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 16px;
}
.lecture-text h2, .lecture-practice h2, .lecture-sources h2 {
  font: 700 1.08rem/1.3 Inter, sans-serif;
}
.lecture-text p, .lecture-practice p {
  margin-top: 7px;
  line-height: 1.72;
}
.lecture-table {
  margin: 19px 0;
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: auto;
  background: var(--panel);
}
.lecture-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: .86rem;
  line-height: 1.5;
}
.lecture-table caption {
  padding: 11px;
  text-align: left;
  font-size: .97rem;
  font-weight: 750;
}
.lecture-table th, .lecture-table td {
  text-align: left;
  padding: 8px 10px;
  vertical-align: top;
  overflow-wrap: break-word;
  border-top: 1px solid var(--border);
}
.lecture-practice {
  padding: 14px 16px;
  margin-bottom: 16px;
}
.lecture-practice details { margin-top: 9px; }
.lecture-practice summary { color: var(--lime); cursor: pointer; }
.lecture-sources .ref-list { margin-bottom: 12px; }
.lecture-article .summary-links a { padding-block: 7px; font-size: .82rem; }
.lecture-toc ~ .lecture-article {
  content-visibility: auto;
  contain-intrinsic-block-size: auto 1250px;
}
@media print {
  .lecture-toc ~ .lecture-article { content-visibility: visible; }
}
.converter-form {
  display: grid;
  gap: 12px;
  justify-items: start;
}
.converter-form input[type="file"] { max-width: 100%; }
.converter-form label, .converter-form input { font-size: .9rem; }
@media(max-width:480px) {
  .lecture-table table { font-size: .76rem; }
  .lecture-table th, .lecture-table td { padding: 7px 5px; }
}
.study-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}
.study-nav a {
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 650;
}
.study-nav a[aria-current], .study-nav a:hover {
  background: #2b3324;
  border-color: #3a4630;
  color: var(--lime);
}
.school-note {
  margin-block: 19px;
  padding: 12px 14px;
  border-left: 2px solid #768558;
  color: var(--muted);
  background: var(--panel);
  font-size: .84rem;
}
.timetable {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
}
.timetable h2 {
  font-size: 1.75rem;
  margin: 9px 0 0;
}
.timetable .rows {
  margin: 0;
}
.timetable .row-card > span {
  color: var(--lime);
}
.study-toc {
  padding: 16px 20px;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
}
.study-toc h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.study-toc ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 25px;
  padding-left: 20px;
  margin: 0;
}
.study-toc a {
  display: inline-block;
  padding: 5px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--lime);
  font-size: .89rem;
  line-height: 1.45;
}
.teaching-block {
  padding: 15px 0;
  scroll-margin-top: 15px;
  border-bottom: 1px solid var(--border);
}
.teaching-block p {
  margin-top: 6px;
  color: #d9ded3;
  line-height: 1.72;
}
.slide-link {
  display: inline-block;
  color: var(--lime);
  font-size: .78rem;
  margin-top: 7px;
}
.slide-link a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.teaching-block h3 a:hover {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.full-lesson {
  border-bottom: 1px solid var(--border);
  padding: 24px 0 17px;
  scroll-margin-top: 20px;
}
.full-lesson:target h2 {
  color: var(--lime);
}
#sadrzaj-skripte {
  scroll-margin-top: 16px;
}
.summary-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 15px;
}
.exam-facts {
  line-height: 1.65;
  padding-left: 22px;
  margin: 11px 0;
}
.exam-facts li {
  padding-left: 2px;
  margin-bottom: 5px;
}
.exam-facts li::marker {
  color: var(--lime);
}
.summary-chapters .full-lesson {
  padding-block: 17px;
}
.summary-chapters .exam-facts {
  margin-block: 7px 0;
  list-style: disc outside;
  line-height: 1.55;
}
.summary-chapters .exam-facts li:last-child {
  margin-bottom: 0;
}
.more-study {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel);
  font-size: .9rem;
}
.more-study summary {
  min-height: 23px;
  cursor: pointer;
  color: var(--lime);
  font-weight: 650;
}
.knot-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 14px;
}
.knot-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  padding: 6px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--panel);
  font-size: .8rem;
  line-height: 1.25;
}
.knot-choice img {
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: cover;
  border-radius: 5px;
}
.knot-choice:hover, .knot-choice[aria-current] {
  color: var(--lime);
  border-color: var(--lime);
}
.knot-extra { margin-top: 12px; }
.knot-extra .knot-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 10px 0 6px; }
.knot-extra .knot-choice { grid-template-columns: 46px minmax(0, 1fr); }
.knot-extra-list { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 10px 0 3px; padding-inline-start: 20px; }
.knot-extra-list a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.knot-card {
  padding: clamp(14px, 3vw, 27px);
}
.knot-type {
  display: inline-block;
  color: var(--lime);
  font-size: .75rem;
  font-weight: 650;
  margin-bottom: 5px;
}
.knot-purpose {
  margin-top: 5px;
  color: var(--muted);
  font-size: .89rem;
}
.knot-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  grid-template-areas: "prikaz koraci" "slicice koraci";
  grid-template-rows: auto 1fr;
  gap: 8px 24px;
  margin-top: 15px;
  align-items: start;
}
.knot-media { grid-area: prikaz; }
.knot-steps { grid-area: koraci; }
.knot-player {
  aspect-ratio: 8 / 5;
  display: block;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #141914;
  overflow: hidden;
}
.knot-player a, .knot-player img, .knot-player video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.knot-player a { cursor: zoom-in; }
.knot-player [hidden], .knot-playback [hidden], .knot-position[hidden] {
  display: none;
}
.knot-filmstrip {
  grid-area: slicice;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 6px;
}
.knot-filmstrip button {
  position: relative;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  background: #141914;
}
.knot-filmstrip button[aria-pressed="true"] {
  border-color: var(--lime);
}
.knot-filmstrip img {
  width: 100%;
  height: auto;
}
.knot-filmstrip span {
  position: absolute;
  top: 3px;
  left: 3px;
  min-width: 17px;
  padding: 2px 3px;
  border-radius: 4px;
  background: #121812eb;
  font-size: .68rem;
  font-weight: 700;
}
.knot-playback {
  margin-top: 11px;
  gap: 7px;
}
.knot-playback .btn[aria-pressed="true"] {
  color: var(--lime);
  border-color: var(--lime);
}
.knot-position { width: 100%; height: 28px; margin: 5px 0 0; accent-color: var(--lime); }
.knot-position:focus-visible { outline: 2px solid var(--lime); }
.knot-status {
  color: var(--muted);
  margin-top: 8px;
  font-size: .9rem;
}
.knot-status:empty { display: none; }
.knot-credit {
  padding-top: 9px;
}
.knot-refs {
  margin-bottom: 0;
}
.knot-gear {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.knot-gear strong {
  color: var(--text);
  margin-right: 4px;
}
.knot-counter {
  color: var(--lime);
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.knot-detail p {
  margin-top: 7px;
  color: #d9ded3;
}
.knot-buttons {
  margin: 15px 0 12px;
}
.knot-all ol {
  padding-left: 19px;
  margin-bottom: 4px;
  line-height: 1.6;
}
.knot-all li {
  margin-bottom: 6px;
}

@media(max-width: 660px) {
  .study-nav {
    gap: 0;
  }
  .study-nav a {
    font-size: .76rem;
    padding-inline: 8px;
  }
  .timetable {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .study-toc ol, .knot-columns {
    grid-template-columns: minmax(0, 1fr);
  }
  .knot-columns {
    grid-template-areas: "prikaz" "slicice" "koraci";
    grid-template-rows: auto;
    gap: 15px;
  }
}
@media(max-width:760px) {
  .knot-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knot-choice { grid-template-columns: 42px minmax(0, 1fr); }
  .summary-chapters h2 { font-size: clamp(1.6rem, 6.7vw, 2.3rem); line-height: 1.15; }
  .exam-facts { line-height: 1.6; padding-left: 1.15rem; }
  .exam-facts li { margin-bottom: .55rem; }
  .summary-links a { min-height: 44px; }
  .knot-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knot-buttons .btn, .knot-playback .btn { font-size: .9rem; }
  .knot-detail p { line-height: 1.6; }
}
@media print {
  .study-toc, .study .skip {
    display: none;
  }
  .full-lesson {
    break-inside: avoid;
    border-color: #aaa;
  }
  .teaching-block p {
    color: black;
  }
}

/* Izvorne prezentacije pretvorene iz PDF-a (predavanja/izvornici) */
.pdf-slajd { margin: .9rem 0 0; padding-top: .7rem; border-top: 1px solid var(--border); scroll-margin-top: 12px; }
.pdf-broj { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.pdf-slajd h4,
.pdf-slajd h3 { margin: 0 0 .35rem; font-size: 1.28rem; line-height: 1.25; }
.pdf-tekst, .pdf-podstavke {
  list-style: disc outside;
  padding-inline-start: 1.2rem;
}
.pdf-tekst { margin: .2rem 0 .5rem; line-height: 1.5; }
.pdf-tekst li + li { margin-block-start: .15em; }
.pdf-podstavke { margin: .15em 0 0; }
.pdf-parovi > li {
  padding-block: .45rem;
  border-bottom: 1px solid var(--border);
}
.pdf-par-sadrzaj {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(70px, 25%);
  align-items: center;
  gap: 12px;
}
.pdf-par .pdf-primjeri { display: flex; justify-content: center; margin: 0; }
.pdf-slike.pdf-primjeri figure { max-width: 100%; flex: 0 1 auto; }
.pdf-slike.pdf-primjeri img { max-height: 116px; height: auto; object-fit: contain; }
.pdf-slike > .pdf-dijagram,
.pdf-slike > .pdf-s-legendom { flex: 0 1 46rem; max-width: 100%; width: 100%; }
.pdf-s-legendom figcaption { padding: .5rem .75rem; color: var(--text); font-size: .95rem; }
/* Slike slajda u redu iste visine (--h), širina iz omjera --r koji generator upisuje na figure.
   Manje pomicanja: slike stoje jedna do druge i lome se u novi red tek kad ne stanu (17. 11. 2026.). */
.pdf-slike { --slajd: 640px; --foto: 220px; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin: .4rem 0; }
/* Slika se smije smanjiti do 70 % zadane visine prije loma reda, a red se popuni rastom razmjernim omjeru (iste visine), najviše do --h. */
/* Visina slike = njezin udio u visini slajda (--uv, upisuje generator) × --slajd: važne slike koje je autor
   stavio velike ostaju velike, logotipi i sitnice male. Cijeli slajd ima --uv:1 (17. 11. 2026.). */
.pdf-slike figure { --h: clamp(90px, calc(var(--uv, .3) * var(--slajd)), var(--slajd)); margin: 0; min-width: 0; flex: var(--r, 1.333) 1 calc(var(--r, 1.333) * var(--h) * .7); max-width: calc(var(--r, 1.333) * var(--h)); }
/* Fotografija bez bijele podloge (krajolik, ukras) najviše --foto; crteži i sheme ostaju veliki. */
.pdf-slike .foto { --h: clamp(90px, min(calc(var(--uv, .3) * var(--slajd)), var(--foto)), var(--foto)); }
.pdf-slike .mala { --h: 110px; }
.pdf-slike img { display: block; width: 100%; height: auto; border-radius: 8px; background: #fff; border: 1px solid var(--border); }
.pdf-slike figcaption { margin-top: 4px; font-size: .76rem; color: var(--muted); }
.pdf-sadrzaj { margin: 1rem 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }
.pdf-sadrzaj h2 { font-size: 1.4rem; margin-bottom: 6px; }
.pdf-sadrzaj ol { columns: 2 15rem; column-gap: 24px; padding-left: 1.4rem; margin: 0; line-height: 1.55; font-size: .9rem; }
.pdf-sadrzaj a { color: var(--lime); }
@media (max-width: 560px) {
  .pdf-slike { --slajd: 420px; --foto: 150px; gap: 6px; }
  .pdf-slike .mala { --h: 80px; }
}
.pdf-sadrzaj-odjeljak { font-weight: 700; }
/* Sadržaj je sklopljen (details), natpisi s dijagrama stoje u jednom sitnijem retku, a slika cijelog slajda otvara se dodirom. */
.pdf-sadrzaj summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; min-height: 44px; display: flex; align-items: center; gap: 8px; }
.pdf-sadrzaj summary::before { content: "▸"; color: var(--lime); }
.pdf-sadrzaj details[open] summary::before { content: "▾"; }
.pdf-sadrzaj summary::-webkit-details-marker { display: none; }
.pdf-sadrzaj details[open] summary { margin-bottom: 6px; }
.pdf-sadrzaj:has(details:not([open])) { padding-block: 4px; }
.pdf-sadrzaj li { padding: .16rem 0; break-inside: avoid; }
.pdf-oznake { margin: .2rem 0 .7rem; font-size: .84rem; line-height: 1.5; color: var(--muted); }
.pdf-uvecaj { display: block; cursor: zoom-in; }
.pdf-odjeljak { margin: 1.8rem 0 .1rem; padding-top: .7rem; border-top: 2px solid var(--lime); font-size: clamp(1.7rem, 4vw, 2.2rem); line-height: 1.1; scroll-margin-top: 12px; }

/* Slajdovi HPS prezentacije ugrađeni u puno/sve.html, ispod teksta teme (17. 11. 2026.). */
.pdf-u-temi { margin: 2rem 0 1rem; padding-top: .8rem; border-top: 2px solid var(--lime); }
.pdf-u-temi > h3 { margin: 0 0 .4rem; font-size: 1.35rem; }
h4.pdf-odjeljak { font-size: clamp(1.4rem, 3.4vw, 1.8rem); margin-top: 2rem; }

.lecture-page.sve-pdf { max-width: 980px; }
.sve-pdf .sve-naslov { margin: 4px 0 8px; }
.sve-pdf .sve-naslov h1 { font-size: clamp(1.85rem, 4vw, 2.65rem); margin: 0; }
.sve-tema { scroll-margin-top: 8px; }
.sve-tema > h2 { margin: 1.4rem 0 .2rem; padding-top: .6rem; border-top: 3px solid var(--lime); font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.15; }
.pdf-mreza > .pdf-odjeljak { margin: 1rem 0 0; padding-top: .3rem; border-top-width: 1px; font-size: 1.25rem; }
.sve-pdf .pdf-slajd { margin: .6rem 0 0; padding-top: .6rem; }
.sve-pdf .pdf-slajd > :is(h3, h4) { font-size: 1.05rem; line-height: 1.3; margin: 0 0 .25rem; }
.sve-pdf .pdf-tekst,
.sve-pdf .pdf-slajd > p:not(.pdf-oznake) { margin: .1rem 0 .3rem; max-width: 76ch; font-size: .95rem; line-height: 1.5; }
.sve-pdf .pdf-oznake { margin: .1rem 0 .3rem; font-size: .8rem; line-height: 1.35; }
@media (max-width: 760px) {
  .sve-pdf .pdf-slajd { margin-top: .8rem; padding-top: .75rem; }
  .sve-pdf .pdf-slajd > :is(h3, h4) { font-size: 1.12rem; }
  .sve-pdf .pdf-tekst,
  .sve-pdf .pdf-slajd > p:not(.pdf-oznake) { font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }
  .sve-pdf .pdf-tekst li + li { margin-block-start: .3em; }
  .sve-pdf .pdf-oznake { font-size: .9rem; line-height: 1.5; }

}
