/* unidersler — ders sayfaları.
   Sınıf aileleri: gt- (sunumdan hazırlanan sayfalar), gg- (gemi geometrisi), si- (sayısal integrasyon),
   sq (soru-çözüm sayfaları). Renkler temaya göre aşağıdaki değişkenlerden gelir. */

.ders {
  --a: #0b6fa4;
  --a2: #e6f3fa;
  --ln: #dbe7ee;
  --fg: #16232e;
  --mu: #5d6b78;
  --mu2: #465563;
  --kart: #ffffff;
  --kart2: #f6fafc;
  --eq: #f5f5f8;
  --cift: #fafcfd;
  --ok-bg: #f3faf5; --ok-ln: #cfe8d6; --ok-t: #1f7a3d;
  --no-bg: #fdf5f4; --no-ln: #f0d4d0; --no-t: #b3392c;
  --odak: #9ad5f2;
}
:root[data-tema="koyu"] .ders {
  --a: #5cc3f2;
  --a2: rgba(92, 195, 242, .14);
  --ln: #1d4256;
  --fg: #e6f2f4;
  --mu: #9bb8c2;
  --mu2: #b6cbd2;
  --kart: #0a2231;
  --kart2: #0f2c3e;
  --eq: #0c2838;
  --cift: rgba(255, 255, 255, .025);
  --ok-bg: rgba(34, 197, 94, .09); --ok-ln: #245c3d; --ok-t: #6ee7a0;
  --no-bg: rgba(239, 68, 68, .09); --no-ln: #6b2a31; --no-t: #ff9a9a;
  --odak: #2a7aa3;
}

/* Sayfa çerçevesi */
.ders-sayfa { max-width: var(--wrap); margin: 0 auto; padding: 28px 20px 70px; }
.ders-ust { margin: 0 0 18px; }
.iz { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--mu); margin-bottom: 10px; }
.iz a { color: var(--a-t); }
.iz a:hover { text-decoration: underline; }
.ders-ust h1 { font-size: clamp(28px, 4.6vw, 42px); font-weight: 800; }

.ders {
  display: flex; flex-direction: column; gap: 14px;
  color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.65; text-align: left;
}
.ders * { box-sizing: border-box; }
.ders h2, .ders h3, .ders h4 { font-family: var(--body); letter-spacing: 0; }
.ders p { margin: 0 0 12px; }
.ders a { color: var(--a); }
.ders img { max-width: 100%; height: auto; }
.ders hr { border: 0; border-top: 1px solid var(--ln); margin: 8px 0; }
.ders math { color: var(--fg); }
.ders .bos { color: var(--mu); margin: 0 0 14px; }

/* Kartlar */
.gt-page, .gg-page, .si-page { display: flex; flex-direction: column; gap: 14px; }
.gt-card, .si-card, .gg-not {
  background: var(--kart); border: 1px solid var(--ln); border-radius: 12px; padding: 24px 26px 10px;
  scroll-margin-top: 90px;
}
.gt-toc, .gt-page > .gt-card:first-child:has(.ders-toc), .si-page > .si-card:first-child, .gg-page > .si-card:first-child { padding: 14px 26px; }
.gg-not { padding: 22px 24px; }
.gg-sec, .ders [id] { scroll-margin-top: 90px; }

/* Bu sayfadaki bölümler */
.ders-toc { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.ders-toc a, .ders-toc span { display: inline-flex; align-items: center; gap: 7px; color: var(--fg); text-decoration: none; font-weight: 500; }
.ders-toc a::before { content: "›"; color: var(--a); font-weight: 700; font-size: 1.15em; line-height: 1; }
.ders-toc a:hover { color: var(--a); }

/* ---------- Sunum sayfaları (gt-) ---------- */
.gt-h { color: var(--fg); font-weight: 700; line-height: 1.25; display: flex; align-items: baseline; gap: 10px; }
h2.gt-h { font-size: 1.45em; margin: 0 0 14px; }
h3.gt-h { font-size: 1.15em; margin: 22px 0 12px; padding-top: 16px; border-top: 1px dashed var(--ln); }
h3.gt-h.gt-first, .gt-h + h3.gt-h { margin-top: 0; padding-top: 0; border-top: 0; }
h4.gt-h { font-size: 1em; margin: 0 0 8px; color: var(--a); }
.gt-h .n, .gg-not .n, .si-n {
  font-size: .6em; font-weight: 700; letter-spacing: .04em; color: var(--a); background: var(--a2);
  padding: 4px 11px; border-radius: 999px; flex: 0 0 auto; position: relative; top: -3px;
}
.gt-t, .gt-t p, .gt-t li { color: var(--fg); font-size: 1em; line-height: 1.65; }
.gt-t p { margin: 0 0 12px; }
.gt-t ul { margin: 0 0 12px; padding: 0; list-style: none; }
.gt-t li { position: relative; padding: 0 0 0 20px; margin: 0 0 7px; }
.gt-t li::before { content: ""; position: absolute; left: 4px; top: .68em; width: 6px; height: 6px; border-radius: 50%; background: var(--a); }
.gt-t ol { margin: 0 0 12px; padding: 0 0 0 22px; }
.gt-t ol li { padding: 0; margin: 0 0 7px; }
.gt-t ol li::before { display: none; }
.gt-t a { color: var(--a); text-decoration: underline; }
.gt-sm-note, .gt-sm-note p { font-size: .88em; color: var(--mu); }

.gt-fig { text-align: center; margin: 0 0 16px; }
.gt-fig img { display: block; margin: 0 auto; max-width: min(100%, 520px); max-height: 440px; width: auto; height: auto; border: 1px solid var(--ln); border-radius: 10px; background: #fff; }
.gt-fig.gt-w img { max-width: 100%; max-height: none; width: 100%; }
.gt-fig.gt-hero img { max-height: 340px; object-fit: cover; }
.gt-fig.gt-sm img { max-height: 260px; }
.gt-fig.gt-tbl img { background: #fff; }
.gt-fig figcaption { font-size: .88em; color: var(--mu); margin: 7px 0 0; line-height: 1.45; }

.gt-row { display: flex; gap: 20px; align-items: center; margin: 0 0 4px; }
.gt-row.gt-top { align-items: flex-start; }
.gt-row > * { flex: 1 1 0; min-width: 0; }
.gt-row .gt-fig img { max-width: 100%; max-height: 330px; }
.gt-row.gt-r3 .gt-fig img { max-height: 250px; }
.gt-row.gt-mini > .gt-fig { flex: 0 0 190px; }
.gt-col > .gt-fig:last-child { margin-bottom: 8px; }
.gt-col > .gt-tile { margin: 0 0 12px; }

.gt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0 0 16px; align-items: stretch; }
.gt-grid.gt-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gt-grid.gt-g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gt-grid:not(.gt-g3):not(.gt-g4) > .gt-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.gt-tile { background: var(--kart2); border: 1px solid var(--ln); border-radius: 10px; padding: 14px 16px 4px; }
.gt-tile .gt-tile { background: var(--kart); }
.gt-tile .gt-grid { margin: 6px 0 12px; }
.gt-tile .gt-fig img { max-height: 260px; }
.gt-tile.gt-span { grid-column: 1 / -1; }
.gt-tile.gt-span .gt-fig img { max-height: 300px; }
.gt-tile.gt-span > .gt-row { align-items: center; }
.gt-tile.gt-ft .gt-fig { margin: 0 0 10px; }
.gt-tile.gt-ft .gt-fig img { max-height: 300px; max-width: 100%; }
.gt-g3 .gt-tile.gt-ft .gt-fig img, .gt-g4 .gt-tile.gt-ft .gt-fig img { max-height: 180px; width: 100%; object-fit: cover; }
.gt-g3 .gt-tile, .gt-g4 .gt-tile { padding: 12px 13px 2px; }
.gt-g3 .gt-t, .gt-g3 .gt-t p, .gt-g4 .gt-t, .gt-g4 .gt-t p { font-size: .95em; line-height: 1.5; }
.gt-tile.gt-ok { background: var(--ok-bg); border-color: var(--ok-ln); }
.gt-tile.gt-ok h4.gt-h { color: var(--ok-t); }
.gt-tile.gt-ok li::before { background: var(--ok-t); }
.gt-tile.gt-no { background: var(--no-bg); border-color: var(--no-ln); }
.gt-tile.gt-no h4.gt-h { color: var(--no-t); }
.gt-tile.gt-no li::before { background: var(--no-t); }
.gt-tile.gt-stat { text-align: center; }
.gt-tile.gt-stat h4.gt-h { font-size: 1.7em; line-height: 1.1; margin: 2px 0 4px; justify-content: center; }
.gt-tile.gt-stat .gt-t p { font-size: .93em; line-height: 1.45; }
.gt-wood .gt-fig img { width: 100%; height: 92px; max-height: 92px; object-fit: cover; }

.gt-note { border-left: 3px solid var(--a); background: var(--kart2); border-radius: 0 10px 10px 0; padding: 14px 16px 4px; margin: 0 0 16px; }
.gt-note h4.gt-h { display: inline-block; font-size: .78em; letter-spacing: .04em; text-transform: uppercase; background: var(--a2); padding: 3px 10px; border-radius: 999px; margin: 0 0 10px; }
.gt-phase h4.gt-h { font-size: .8em; letter-spacing: .06em; text-transform: uppercase; color: var(--mu); margin: 6px 0 8px; }
.gt-cols ul { columns: 2; column-gap: 28px; }
.gt-cols li { break-inside: avoid; }

/* Tablolar */
.ders .tw { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--ln); border-radius: 8px; margin: 0 0 16px; }
.ders .tw.gt-narrow { max-width: 420px; }
.gt-page table { border-collapse: collapse; width: 100%; margin: 0; border: 0; font-size: .93em; background: var(--kart); }
.gt-page th, .gt-page td { padding: 7px 12px; text-align: left; border: 0; border-bottom: 1px solid var(--ln); color: var(--fg); vertical-align: top; }
.gt-page thead th { background: var(--a2); font-weight: 600; }
.gt-page tbody th { font-weight: 700; color: var(--a); white-space: nowrap; }
.gt-page tbody tr:last-child th, .gt-page tbody tr:last-child td { border-bottom: 0; }
.gt-page .tw.gt-num td, .gt-page .tw.gt-num th { text-align: center; white-space: nowrap; padding: 6px 9px; }

/* Video kartları */
.gt-vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 0 0 12px; }
a.gt-vid { display: flex; flex-direction: column; background: var(--kart2); border: 1px solid var(--ln); border-radius: 10px; overflow: hidden; text-decoration: none; color: var(--fg); transition: box-shadow .15s ease, transform .15s ease; }
a.gt-vid:hover { box-shadow: 0 6px 18px rgba(19, 61, 82, .16); transform: translateY(-2px); }
a.gt-vid:focus-visible { outline: 3px solid var(--odak); outline-offset: 2px; }
.gt-vid .th { position: relative; display: block; aspect-ratio: 16 / 9; background: #182226; }
.gt-vid .th img { display: block; width: 100%; height: 100%; object-fit: cover; border: 0; border-radius: 0; max-width: none; max-height: none; }
.gt-vid .th::after, .gt-hero-vid::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 52px; height: 36px; margin: -18px 0 0 -26px; border-radius: 9px;
  background: rgba(16, 26, 30, .78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 7v10l8-5z'/%3E%3C/svg%3E") center / 26px no-repeat;
}
.gt-vid .tx { display: flex; flex-direction: column; gap: 4px; padding: 11px 13px 13px; }
.gt-vid .tt { font-weight: 700; line-height: 1.35; font-size: .97em; }
.gt-vid .mt { font-size: .82em; color: var(--mu); }
.gt-vid .wt { font-size: .9em; line-height: 1.45; color: var(--mu2); }
.gt-hero-vid { display: block; position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--ln); background: #0e2233; margin: 0 0 6px; aspect-ratio: 16 / 9; max-width: 560px; }
.gt-hero-vid::after { width: 68px; height: 48px; margin: -24px 0 0 -34px; border-radius: 12px; }
.gt-hero-vid img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gt-hero-cap { font-size: .88em; color: var(--mu); margin: 0 0 14px; line-height: 1.45; }

/* Ders dizileri (açılır gruplar ve bölüm listeleri) */
.gt-grp { border: 1px solid var(--ln); border-radius: 10px; margin: 0 0 10px; background: var(--kart); overflow: hidden; }
.gt-grp > summary { cursor: pointer; list-style: none; padding: 12px 44px 12px 14px; position: relative; background: var(--kart2); min-height: 44px; }
.gt-grp > summary::-webkit-details-marker { display: none; }
.gt-grp > summary::after { content: ""; position: absolute; right: 16px; top: 20px; width: 9px; height: 9px; border-right: 2px solid var(--a); border-bottom: 2px solid var(--a); transform: rotate(45deg); transition: transform .15s ease; }
.gt-grp[open] > summary::after { transform: rotate(-135deg); top: 24px; }
.gt-grp > summary:focus-visible { outline: 3px solid var(--odak); outline-offset: -3px; }
.gt-grp .gh { display: block; font-weight: 700; color: var(--fg); line-height: 1.3; }
.gt-grp .gn { font-weight: 600; color: var(--a); font-size: .85em; margin-left: 6px; white-space: nowrap; }
.gt-grp .gs { display: block; font-size: .92em; color: var(--mu2); line-height: 1.5; margin-top: 4px; }
ol.gt-eps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.gt-grp ol.gt-eps { margin: 0; padding: 10px 12px 12px; gap: 6px; }
ol.gt-eps li { margin: 0; padding: 0; }
ol.gt-eps li::before { display: none; }
ol.gt-eps a { display: flex; gap: 9px; align-items: flex-start; height: 100%; padding: 7px 10px; border: 1px solid var(--ln); border-radius: 8px; background: var(--kart2); text-decoration: none; color: var(--fg); line-height: 1.3; }
ol.gt-eps a:hover { border-color: var(--odak); background: var(--a2); }
ol.gt-eps a:focus-visible { outline: 3px solid var(--odak); outline-offset: 2px; }
ol.gt-eps .no { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--a2); color: var(--a); font-weight: 700; font-size: .8em; display: flex; align-items: center; justify-content: center; }
ol.gt-eps li.core a { border-color: var(--odak); }
ol.gt-eps li.core .no { background: var(--a); color: #fff; }
ol.gt-eps .tt { display: block; font-weight: 600; font-size: .97em; }
ol.gt-eps .en { display: block; font-size: .82em; color: var(--mu); margin-top: 2px; }

/* Adımlar */
ol.gt-steps { list-style: none; counter-reset: st; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 0 0 16px; padding: 0; }
ol.gt-steps li { counter-increment: st; position: relative; background: var(--kart2); border: 1px solid var(--ln); border-radius: 10px; padding: 10px 12px 10px 46px; margin: 0; line-height: 1.4; color: var(--fg); }
ol.gt-steps li::before { content: counter(st); position: absolute; left: 11px; top: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--a); color: #fff; font-weight: 700; font-size: .85em; display: flex; align-items: center; justify-content: center; }
ol.gt-steps li b { display: block; font-weight: 700; }
ol.gt-steps li span { display: block; font-size: .9em; color: var(--mu2); margin-top: 2px; }
ol.gt-steps.gt-col1 { grid-template-columns: 1fr; }

/* ---------- Ders notları (gg-, si-) ---------- */
.gg-not h2, .gg-not h3, .si-card h2, .si-card h3, .si-ex h3, .si-ex h4 {
  line-height: 1.25; font-weight: 700; color: var(--fg); margin: 30px 0 14px; padding: 0;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.gg-not h2, .si-card h2 { font-size: 1.35em; }
.gg-not h3, .si-card h3 { font-size: 1.15em; margin-top: 24px; }
.gg-not .gg-sec:first-child > h2:first-child, .gg-not h2.gg-first, .si-card > h2:first-child, .si-card > h3:first-child { margin-top: 0; }
.gg-not ol { margin: 0 0 12px; padding: 0 0 0 1.4em; list-style: decimal; }
.gg-not li { margin: 0 0 6px; }
.gg-not dl { margin: 0 0 14px; padding: 0; }
.gg-not .d { border-left: 3px solid var(--a); background: var(--kart2); border-radius: 0 8px 8px 0; padding: 10px 14px; margin: 0 0 8px; }
.gg-not dt { font-weight: 700; margin: 0 0 2px; }
.gg-not dt .en { font-weight: 600; font-size: .88em; color: var(--a); margin-left: 6px; white-space: nowrap; }
.gg-not dd { margin: 0; }
.ders sub { font-size: .72em; line-height: 0; }

.gg-fig, .si-fig, .gg-not figure { text-align: center; margin: 6px 0 18px; padding: 0; }
.gg-fig img, .si-fig img, .gg-not figure.fg img { display: block; margin: 0 auto; max-width: min(100%, 560px); height: auto; border: 1px solid var(--ln); border-radius: 8px; background: #fff; padding: 8px; }
.gg-fig.gg-w img, .gg-not figure.fg.w img { max-width: 100%; }
.gg-fig figcaption, .si-fig figcaption, .gg-not figcaption { font-size: .9em; color: var(--mu); margin: 8px 0 0; line-height: 1.5; }
.gg-fig figcaption b, .si-fig figcaption b, .gg-not figcaption b { color: var(--a); }
.gg-g2, .gg-not .g2 { display: flex; gap: 14px; align-items: flex-end; }
.gg-g2 > *, .gg-not .g2 > * { flex: 1 1 0; min-width: 0; }
.gg-g2 .gg-fig img { max-width: 100%; }
.gg-not figure.sv svg, .si-svg svg { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; background: #fff; border: 1px solid var(--ln); border-radius: 8px; padding: 8px; }
.si-svg { margin: 0 0 16px; padding: 0; text-align: center; }
.si-svg svg { max-width: 340px; padding: 0; }
.si-svg figcaption { font-size: 14.5px; color: var(--mu); margin: 8px 0 0; }

/* Formül kutuları */
.ders .eq { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; margin: 0 0 14px; padding: 12px 14px; background: var(--eq); border-radius: 8px; text-align: center; color: var(--fg); }
.ders .eq math { font-size: 1.15em; }
.ders .eq .ln { margin: 0; padding: 3px 0; white-space: nowrap; }
.ders .eq .ln + .ln { margin-top: 6px; }
.si-page .eq { display: flex; align-items: center; gap: 12px; }
.si-page .eq .ms { flex: 1 0 auto; text-align: center; }
.si-page .eq .tg { flex: 0 0 auto; color: var(--mu); font-size: .9em; font-variant-numeric: tabular-nums; }
.si-p { font-size: 16px; line-height: 1.65; margin: 0 0 12px; }
.si-p math { font-size: 1.02em; }

/* Çözümlü örnekler */
.gg-not .ex, .si-ex { border-left: 3px solid var(--a); background: var(--kart2); border-radius: 0 10px 10px 0; padding: 14px 16px 6px; margin: 0 0 16px; }
.gg-not .ex .et, .si-ex > h3:first-child, .si-ex > h4:first-child {
  display: inline-flex; font-size: .78em; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--a);
  background: var(--a2); padding: 3px 10px; border-radius: 999px; margin: 0 0 10px;
}
.gg-not .ex .sl { font-weight: 700; color: var(--a); margin: 4px 0 8px; padding-top: 10px; border-top: 1px dashed var(--ln); }
.gg-not .ex .eq, .si-ex .eq { background: var(--kart); border: 1px solid var(--ln); }
.gg-not .ex .sr { font-size: .85em; color: var(--mu); }

/* Not tabloları */
.gg-not figure.tb { max-width: 640px; margin: 6px auto 18px; }
.gg-not figure.tb figcaption { margin: 0 0 8px; }
.gg-not table { border-collapse: collapse; width: 100%; margin: 0; border: 0; font-size: 10.5px; font-variant-numeric: tabular-nums; background: var(--kart); line-height: 1.15; }
.gg-not th, .gg-not td { padding: 1px 5px; text-align: right; border: 0; border-bottom: 1px solid var(--ln); white-space: nowrap; color: var(--fg); }
.gg-not thead th { background: var(--a2); font-weight: 600; text-align: center; border-left: 1px solid var(--kart); padding: 2px 4px; }
.gg-not thead th small { display: block; font-weight: 400; color: var(--mu); font-size: .9em; }
.gg-not tbody th { background: var(--kart2); font-weight: 600; text-align: center; position: sticky; left: 0; }
.gg-not tbody tr:nth-child(even) td { background: var(--cift); }
.gg-not tbody tr:last-child td, .gg-not tbody tr:last-child th { border-bottom: 0; }
.si-tblw { overflow-x: auto; margin: 0 0 16px; }
.si-tbl { width: 100%; border-collapse: collapse; margin: 0; font-size: 14.5px; color: var(--fg); background: var(--kart); }
.si-tbl th, .si-tbl td { border: 1px solid var(--ln); padding: 7px 9px; text-align: center; white-space: nowrap; }
.si-tbl thead th { background: var(--a2); color: var(--a); font-weight: 700; }
.si-tbl tbody th { text-align: left; font-weight: 600; }

/* ---------- Soru-çözüm sayfaları (sq) ---------- */
.sq { line-height: 1.55; }
.sq .hd { background: var(--kart); border: 1px solid var(--ln); border-radius: 12px; padding: 18px; margin: 0 0 14px; }
.sq .in { color: var(--mu); margin: 0; font-size: .95em; }
.sq .q { border: 1px solid var(--ln); border-radius: 12px; padding: 16px 18px; margin: 0 0 14px; background: var(--kart); }
.sq .no { display: inline-block; font-size: .78em; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--a); background: var(--a2); padding: 3px 10px; border-radius: 999px; margin: 0 0 8px; }
.sq .qt { margin: 0 0 12px; }
.sq .qt.miss { color: var(--mu); font-style: italic; }
.sq .qt math { font-size: 1.05em; }
.sq details { border-top: 1px dashed var(--ln); margin: 4px 0 0; padding: 12px 0 0; }
.sq details.m { margin-top: 14px; }
.sq summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: .95em;
  color: var(--a); background: var(--kart); padding: 8px 16px; border: 1px solid var(--a); border-radius: 8px; min-height: 44px;
  -webkit-user-select: none; user-select: none;
}
.sq summary::-webkit-details-marker { display: none; }
.sq summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -4px; transition: transform .2s; }
.sq summary:focus-visible { outline: 2px solid var(--a); outline-offset: 2px; }
.sq summary .h, .sq details[open] > summary .s { display: none; }
.sq details[open] > summary .h { display: inline; }
.sq details[open] > summary { background: var(--a); color: var(--kart); }
.sq details[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.sq .sol { padding: 14px 0 0; }
.sq .sol > p:not(.r), .sq p.tx { margin: 0 0 10px; }
.sq .sol ol { margin: 0 0 10px; padding: 0 0 0 1.3em; list-style: decimal; }
.sq .sol li { margin: 0 0 6px; }
.sq .tw { margin: 0 0 12px; }
.sq table { border-collapse: collapse; width: 100%; margin: 0; border: 0; font-size: .9em; font-variant-numeric: tabular-nums; background: var(--kart); }
.sq th, .sq td { padding: 6px 10px; text-align: center; border: 0; border-bottom: 1px solid var(--ln); color: var(--fg); }
.sq-simpson th, .sq-simpson td { white-space: nowrap; }
.sq thead th { background: var(--a2); font-weight: 600; }
.sq thead tr.sub th { font-weight: 400; font-size: .92em; color: var(--mu); padding: 3px 10px; }
.sq tbody tr:last-child td { border-bottom: 0; }
.sq tfoot td { font-weight: 700; background: var(--kart2); border-top: 1px solid var(--ln); border-bottom: 0; }
.sq .r { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 8px; padding: 0; }
.sq .i { background: var(--eq); border-radius: 6px; padding: 4px 10px; font-variant-numeric: tabular-nums; }
.sq .i b { color: var(--a); font-weight: 700; }
.sq .i .f { color: var(--mu); }
.sq .i.n { background: none; padding: 4px 2px; color: var(--mu); }
.sq .eq { margin: 0 0 10px; padding: 8px 12px; border-radius: 6px; text-align: left; }
.sq .eq math { font-size: 1.12em; }
.sq .eq .lb { white-space: nowrap; }
.sq .eq mtd { text-align: left; padding: 3px 0; }
.sq figure { margin: 0 0 12px; padding: 0; }
.sq img { display: block; max-width: 100%; height: auto; border: 1px solid var(--ln); border-radius: 8px; background: #fff; }

/* Kitap listesi gibi sade sayfalar */
.resim-izgara { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; align-items: start; }
.resim-izgara figure { margin: 0; text-align: center; }
.resim-izgara img { border: 1px solid var(--ln); border-radius: 8px; background: #fff; }
.ders > div:not([class]):not(:has(> .sq)) { background: var(--kart); border: 1px solid var(--ln); border-radius: 12px; padding: 24px 26px 12px; }

/* Önceki / sonraki ders */
.ders-gezinti { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
.ders-gezinti a { display: block; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; font-weight: 600; color: var(--fg); }
.ders-gezinti a:hover { border-color: var(--line-h); }
.ders-gezinti small { display: block; font-size: 12.5px; font-weight: 600; color: var(--mu); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.ders-gezinti .sonraki { text-align: right; }

@media (max-width: 900px) {
  .gt-grid.gt-g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .ders-sayfa { padding: 20px 14px 60px; }
  .ders { font-size: 15px; }
  .gt-card, .si-card, .gg-not { padding: 16px 13px 6px; border-radius: 10px; }
  .gt-toc, .gt-page > .gt-card:first-child:has(.ders-toc), .si-page > .si-card:first-child, .gg-page > .si-card:first-child { padding: 12px 13px; }
  h2.gt-h, .gg-not h2, .si-card h2 { font-size: 1.22em; }
  .gt-row { flex-direction: column; gap: 0; align-items: stretch; }
  .gt-row > *, .gt-row.gt-mini > .gt-fig { flex: none; width: 100%; }
  .gt-grid, .gt-grid.gt-g3, .gt-grid.gt-g4 { grid-template-columns: 1fr; }
  .gt-fig img { max-height: none; }
  .gt-g3 .gt-tile.gt-ft .gt-fig img, .gt-g4 .gt-tile.gt-ft .gt-fig img { max-height: 220px; }
  ol.gt-steps, ol.gt-eps { grid-template-columns: 1fr; }
  .gt-cols ul { columns: 1; }
  .gg-g2, .gg-not .g2 { flex-direction: column; align-items: stretch; }
  .gg-fig img, .si-fig img { padding: 4px; }
  .gg-not .d { padding: 9px 11px; }
  .gg-not dt .en { display: block; margin: 2px 0 0; white-space: normal; }
  .ders .eq { text-align: left; padding: 10px; }
  .ders .eq math { font-size: 1.02em; }
  .si-page .eq .ms { text-align: left; }
  .gg-not .ex, .si-ex { padding: 12px 11px 4px; }
  .sq .q, .sq .hd { padding: 14px 12px; border-radius: 10px; }
  .sq table { font-size: .82em; }
  .sq th, .sq td { padding: 5px 4px; }
  .sq-simpson thead tr:first-child th { white-space: normal; line-height: 1.25; vertical-align: bottom; }
  .sq summary { display: flex; justify-content: center; width: 100%; }
  .ders-gezinti { grid-template-columns: 1fr; }
  .ders-gezinti .sonraki { text-align: left; }
}

/* ---------- Yan menü ("Bu sayfada") ve en başa dön ---------- */
.ders-govde.yanli { display: grid; grid-template-columns: minmax(0, 1fr) 250px; grid-template-areas: "icerik yan"; gap: 26px; align-items: start; }
.ders-govde.yanli > .ders { grid-area: icerik; }
.ders-yan { grid-area: yan; position: sticky; top: 92px; max-height: calc(100vh - 112px); overflow-y: auto; overscroll-behavior: contain; }
.yan-toc { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 14px 12px; }
.yan-baslik { font: 700 11.5px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--mu2); margin: 0 0 10px 8px; }
.yan-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: yt; }
.yan-toc li { counter-increment: yt; }
.yan-toc ol a {
  display: flex; gap: 10px; align-items: baseline; padding: 7px 8px; border-radius: 8px;
  font-size: 14px; line-height: 1.35; color: var(--fg2); border-left: 2px solid transparent;
}
.yan-toc ol a::before { content: counter(yt); flex: 0 0 auto; min-width: 18px; font: 700 12px/1 var(--display); color: var(--mu2); }
.yan-toc ol a:hover { background: var(--a-bg); color: var(--fg); }
.yan-toc ol a.etkin { background: var(--a-bg); color: var(--a-t); border-left-color: var(--a); font-weight: 600; }
.yan-toc ol a.etkin::before { color: var(--a-t); }
.basa-don {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding: 10px;
  border-top: 1px solid var(--line); color: var(--g-t); font: 700 14px/1 var(--display);
}
.basa-don svg { width: 17px; height: 17px; }
.basa-don:hover { color: var(--a-t); }

/* Sağ altta yuvarlak "yukarı" düğmesi */
.yukari {
  position: fixed; right: 22px; bottom: 22px; z-index: 45; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: var(--g); color: #fff; box-shadow: 0 10px 30px rgba(0, 30, 40, .3);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s, visibility .2s, background .15s;
}
.yukari svg { width: 22px; height: 22px; }
.yukari:hover { background: var(--g-h); }
.yukari.gorunur { opacity: 1; visibility: visible; transform: none; }
/* Yan menüde "en başa dön" görünürken masaüstünde yuvarlak düğmeye gerek yok */
@media (min-width: 1101px) { .ders-govde.yanli ~ .yukari, body:has(.ders-govde.yanli) .yukari { display: none; } }

@media (max-width: 1100px) {
  .ders-govde.yanli { display: block; }
  .ders-yan { position: static; max-height: none; overflow: visible; margin: 0 0 14px; }
  .yan-toc { padding: 12px 14px; }
  .yan-baslik { margin-left: 2px; }
  .yan-toc ol { display: flex; flex-wrap: wrap; gap: 4px 16px; }
  .yan-toc ol a { padding: 4px 2px; border-left: 0; background: none !important; }
  .yan-toc ol a::before { content: "›"; min-width: 0; font-size: 1.15em; color: var(--a-t); }
  .basa-don { display: none; }
}
@media (max-width: 700px) {
  .yukari { right: 14px; bottom: 14px; width: 46px; height: 46px; }
}
