/* Python interaktív – közös arculat (az infotanar.eu „műhely” családja: C# műhely, ICDL műhely). */
:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #172b36;
  background: #f7f7f2;
  font-synthesis: none;
  --ink: #172b36;
  --ink-2: #304d5e;
  --muted: #607078;
  --text-2: #42535c;
  --line: #dce0d9;
  --line-2: #edf0eb;
  --green: #d3ef88;
  --green-line: #b8d174;
  --green-dark: #43705a;
  --leaf: #6c9272;
  --paper: #fff;
  --sun: #f1c550;
  --sun-soft: #fbefcb;
  --blue: #4879b3;
  --blue-soft: #e3ecf7;
  --red: #c4513f;
  --red-soft: #f8e3df;
  --code-bg: #172b36;
  --code-fg: #e7eee9;
  --mono: "Cascadia Code", "Cascadia Mono", Consolas, "JetBrains Mono", "DejaVu Sans Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 84px; }
body { margin: 0; line-height: 1.55; min-height: 100vh; background: #f7f7f2; }
a { color: inherit; text-underline-offset: 4px; }
a:focus-visible, button:focus-visible, pre:focus-visible, textarea:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #327050; outline-offset: 3px; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
img { max-width: 100%; }
code { font-family: var(--mono); font-size: .92em; }
:not(pre) > code { padding: .08em .38em; border-radius: 5px; background: #eceee6; color: #23404f; overflow-wrap: anywhere; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: 12px; left: 16px; padding: 12px 18px; background: var(--ink); color: #fff; z-index: 50; transform: translateY(-180%); border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }

/* --- fejléc --- */
.site-header, main, footer { width: min(1240px, calc(100% - 80px)); margin-inline: auto; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 22px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; font-size: 27px; font-weight: 750; letter-spacing: -1.2px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 43px; margin-right: 11px; border: 2px solid var(--ink); border-radius: 10px; background: var(--ink); color: var(--green); font-size: 22px; letter-spacing: -1px; }
.brand-dot { color: var(--green-dark); }
.header-right { display: flex; align-items: center; gap: 18px; }
.header-note { color: var(--muted); font-size: 11px; font-weight: 650; letter-spacing: 1.8px; }
.back { font-size: 14px; white-space: nowrap; }
.motor { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.motor::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #c9cfc6; }
.motor[data-allapot="betoltes"]::before { background: var(--sun); animation: pulzus 1s ease-in-out infinite; }
.motor[data-allapot="kesz"]::before { background: #4caf6a; }
.motor[data-allapot="hiba"]::before { background: var(--red); }
@keyframes pulzus { 50% { opacity: .35; } }

.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 2.1px; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(30px, 3.9vw, 50px); font-weight: 700; line-height: 1.15; letter-spacing: -2px; }
.title-dot { color: var(--leaf); }
.lead { margin: 16px 0 0; max-width: 640px; color: var(--text-2); font-size: 18px; line-height: 1.55; }

/* --- gyűjtőoldal --- */
.course-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-block: 52px 44px; border-bottom: 1px solid var(--line); }
.course-hero h1 { font-size: clamp(36px, 5vw, 66px); letter-spacing: -2.5px; line-height: 1.03; }
.how { display: grid; gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; counter-reset: how; }
.how li { position: relative; display: grid; gap: 2px; padding: 12px 16px 12px 58px; background: #fff; border: 1px solid var(--line); border-radius: 12px; counter-increment: how; }
.how li::before { content: counter(how); position: absolute; left: 14px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px 9px 9px 2px; background: var(--green); border: 1px solid var(--green-line); font-weight: 700; font-size: 14px; }
.how b { font-size: 15px; }
.how span { color: var(--muted); font-size: 13px; }
.collection-heading { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-block: 38px 24px; }
.heading-main { display: flex; align-items: center; gap: 22px; }
.collection-number { display: grid; place-items: center; width: 86px; height: 91px; flex-shrink: 0; border: 1px solid var(--green-line); border-radius: 18px 18px 18px 3px; background: var(--green); font-size: 51px; font-weight: 650; line-height: 1; letter-spacing: -4px; padding-right: 4px; }
.lesson-count { display: flex; align-items: center; gap: 9px; font-size: 23px; font-variant-numeric: tabular-nums; font-weight: 650; }
.lesson-count span { font-size: 13px; font-weight: 400; color: var(--muted); }
.lessons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 25px; }
.lesson { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 16px; transition: border-color .18s ease, box-shadow .18s ease, translate .18s ease; }
.lesson:hover { border-color: #8aab80; box-shadow: 0 10px 30px #172b3612; translate: 0 -2px; }
.cover { display: block; aspect-ratio: 8 / 5; overflow: hidden; border-bottom: 1px solid #172b3610; background: #e4ebd1; }
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale .4s ease; }
.lesson:hover .cover img { scale: 1.03; }
.lesson-info { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 18px; }
.lesson-label { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: 1.4px; }
.lesson-label > :last-child { font-size: 11px; letter-spacing: 0; }
.lesson h2 { margin: 8px 0 4px; font-size: 23px; font-weight: 650; line-height: 1.2; letter-spacing: -.55px; }
.lesson h2 a { text-decoration: none; }
.lesson h2 a::after { content: ""; position: absolute; inset: 0; }
.lesson { position: relative; }
.card-sub { margin: 0 0 14px; color: var(--text-2); font-size: 14px; line-height: 1.45; }
.topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.topics li { padding: 3px 9px; border-radius: 999px; background: #eef2e6; color: #34505a; font-size: 12px; }
.topics.big li { font-size: 14px; padding: 6px 13px; background: #fff; border: 1px solid var(--line); }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 12px; }
.haladas { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.haladas-sav { width: 64px; height: 6px; border-radius: 3px; background: #e8ece3; overflow: hidden; }
.haladas-sav i { display: block; height: 100%; width: 0; background: var(--green-dark); border-radius: 3px; transition: width .4s ease; }

.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--ink); border-radius: 8px; font: inherit; font-size: 14px; line-height: 1.25; font-weight: 600; text-decoration: none; cursor: pointer; background: #fff; color: var(--ink); }
.button-primary { background: var(--ink); color: #fff; }
.button-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.button:not(.button-primary):hover { background: #edf4df; border-color: #6f8a6a; }

/* --- leckeoldal --- */
.lesson-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 28px; padding-block: 44px 34px; border-bottom: 1px solid var(--line); }
.lesson-head .lead { font-size: 17px; margin-top: 8px; }
.lesson-head .topics.big { max-width: 470px; justify-content: flex-end; margin: 0; }
.lecke { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 44px; padding-top: 34px; }
.tartalom { position: sticky; top: 18px; align-self: start; max-height: calc(100vh - 36px); overflow: auto; padding-right: 4px; }
.tartalom h2 { margin: 0 0 10px; font-size: 11px; letter-spacing: 1.8px; color: var(--muted); font-weight: 700; }
.tartalom ol { margin: 0; padding: 0; list-style: none; counter-reset: fej; }
.tartalom li { counter-increment: fej; }
.tartalom a { display: grid; grid-template-columns: 26px 1fr; gap: 4px; padding: 7px 10px 7px 8px; border-radius: 8px; color: var(--text-2); font-size: 14px; line-height: 1.3; text-decoration: none; }
.tartalom a::before { content: counter(fej, decimal-leading-zero); color: #9aa6a1; font-size: 11px; font-weight: 700; padding-top: 2px; font-variant-numeric: tabular-nums; }
.tartalom a:hover { background: #eef1e8; color: var(--ink); }
.tartalom a[aria-current="true"] { background: #fff; color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--green-dark), 0 1px 0 var(--line); }
.tartalom a[aria-current="true"]::before { color: var(--green-dark); }
.tartalom .tartalom-feladat { margin-top: 14px; padding: 12px; border: 1px dashed #c9d3c3; border-radius: 10px; font-size: 12px; color: var(--muted); }
.cikk { min-width: 0; max-width: 900px; }
.fejezet { padding-bottom: 46px; margin-bottom: 46px; border-bottom: 1px solid var(--line); scroll-margin-top: 20px; }
.fejezet:last-of-type { border-bottom: 0; }
.fejezet > header { margin-bottom: 18px; }
.fejezet > header .eyebrow { color: var(--green-dark); }
.fejezet h2 { margin: 0; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -1px; font-weight: 700; }
:where(.fejezet) h3 { margin: 32px 0 10px; font-size: 21px; line-height: 1.25; letter-spacing: -.4px; }
:where(.fejezet) h4 { margin: 22px 0 8px; font-size: 16px; }
:where(.fejezet) :is(p, li) { font-size: 16.5px; color: #22343d; }
:where(.fejezet) p { margin: 0 0 14px; }
:where(.fejezet) :is(ul, ol):not([class]) { padding-left: 22px; margin: 0 0 16px; }
:where(.fejezet) :is(ul, ol):not([class]) > li { margin-bottom: 6px; }
:where(.fejezet) strong { color: var(--ink); }
.hiba-doboz strong, .konzol strong { color: inherit; }

/* táblázat */
.tabla { width: 100%; border-collapse: separate; border-spacing: 0; margin: 8px 0 22px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 15px; }
.tabla th, .tabla td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-2); }
.tabla th { background: #f1f3ec; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla td code { white-space: nowrap; }
.tabla-gorgeto { overflow-x: auto; margin: 0 0 22px; }
.tabla-gorgeto .tabla { margin: 0; }

/* előző / következő */
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 10px 0 20px; }
.pn { display: grid; gap: 2px; padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.pn span { color: var(--muted); font-size: 12px; }
.pn b { font-size: 16px; }
.pn.next { text-align: right; }
.pn:hover { border-color: #6f8a6a; background: #f6faef; }

footer { display: flex; align-items: center; gap: 18px; margin-top: 48px; padding-block: 26px 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
footer p { margin: 0; max-width: 680px; }
footer a { margin-left: auto; white-space: nowrap; }
.footer-mark { color: var(--ink); font-size: 18px; font-weight: 750; }

@media (max-width: 960px) {
  .site-header, main, footer { width: calc(100% - 48px); }
  .lessons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .course-hero { grid-template-columns: 1fr; gap: 30px; }
  .lecke { grid-template-columns: 1fr; gap: 0; }
  .tartalom { position: static; max-height: none; margin-bottom: 26px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
  .tartalom ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px; }
  .tartalom .tartalom-feladat { display: none; }
  .lesson-head .topics.big { justify-content: flex-start; }
  .collection-number { width: 72px; height: 78px; font-size: 44px; }
}
@media (max-width: 640px) {
  .site-header, main, footer { width: calc(100% - 32px); }
  .site-header { padding-block: 16px; gap: 12px; }
  .brand { font-size: 23px; }
  .brand-mark { width: 39px; height: 37px; font-size: 19px; }
  .header-note, .motor-szoveg { display: none; }
  .back { font-size: 13px; }
  .lessons { grid-template-columns: 1fr; gap: 22px; }
  .course-hero { padding-block: 30px 28px; }
  .lead { font-size: 16px; }
  .heading-main { gap: 14px; }
  .collection-number { width: 56px; height: 62px; font-size: 34px; border-radius: 12px 12px 12px 2px; letter-spacing: -2px; }
  h1 { font-size: clamp(27px, 7.4vw, 36px); letter-spacing: -1px; }
  .fejezet h2 { font-size: 25px; }
  .fejezet p, .fejezet li { font-size: 16px; }
  .prevnext { grid-template-columns: 1fr; }
  .pn.next { text-align: left; }
  footer { flex-wrap: wrap; }
  footer a { margin-left: 0; }
  .tartalom ol { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* --- gyűjtőoldal: élő kipróbáló a nyitóban --- */
.hero-labor { min-width: 0; }
.hero-labor .kodpanel { margin: 0; box-shadow: 0 24px 60px #172b3626, 0 2px 0 #fff inset; transform: rotate(-.6deg); }
.hero-labor .kodpanel:focus-within { transform: none; }
.hero-megj { margin: 14px 4px 0; color: var(--muted); font-size: 13.5px; }
.gyujto .lesson h2 { font-size: 22px; }
.card-foot svg { width: 18px; height: 18px; color: var(--muted); transition: translate .18s ease; }
.lesson:hover .card-foot svg { translate: 4px 0; color: var(--ink); }
kbd { display: inline-block; padding: 1px 7px; border: 1px solid #c9d0c6; border-bottom-width: 2px; border-radius: 6px; background: #fff; font: 600 13px var(--mono); color: var(--ink); }
.jotudni-sor, .tipp-sor { font-size: 15px !important; color: var(--muted) !important; }
.osszegzes-doboz { border-color: var(--green-line); background: #f6fbe8; padding-bottom: 6px; }
.fejezet p.eyebrow, .josolj p.eyebrow { margin: 0 0 6px; font-size: 10.5px; color: var(--green-dark); }
.tartalom-kapcs { all: unset; display: flex; width: 100%; justify-content: space-between; align-items: center; cursor: default; }
@media (max-width: 960px) {
  .tartalom h2 { margin: 0; }
  .tartalom-kapcs { cursor: pointer; padding: 2px 0; }
  .tartalom-kapcs::after { content: "▾"; font-size: 14px; transition: rotate .2s; }
  .tartalom.nyitva .tartalom-kapcs::after { rotate: 180deg; }
  .tartalom:not(.nyitva) ol { display: none; }
  .tartalom.nyitva ol { margin-top: 10px; }
}
.heading-main > div { min-width: 0; }
h1, .fejezet h2, .lesson h2 { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 640px) { .hero-labor .kodpanel { transform: none; } }

/* --- átnézés utáni finomítások --- */
.tabla th code { text-transform: none; }
.lecke .prevnext { margin-top: 10px; }
.cikk > .prevnext { max-width: 900px; }
h2 code, h3 code { padding: 0 .15em; background: none; color: inherit; font-size: .92em; }
.feladat-fej h3 code { background: none; }
@media (max-width: 960px) { .cikk { max-width: none; } .lessons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 961px) and (max-width: 1100px) { .site-header, main, footer { width: calc(100% - 48px); } .lessons { grid-template-columns: repeat(2, minmax(0, 1fr)); } .course-hero { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .hero-labor .kodpanel { transform: none; } }
@media (max-width: 640px) {
  .fejezet { padding-bottom: 30px; margin-bottom: 30px; }
  .motor { padding: 0; border: 0; background: none; }
  .motor::before { width: 10px; height: 10px; }
}
@media (max-width: 640px) { .lessons { grid-template-columns: 1fr; } }
