:root {
  --navy-900: #071530;
  --navy-800: #0b1d3a;
  --navy-700: #12305e;
  --navy-600: #1b4280;
  --blue: #1e88ff;
  --blue-600: #1570d6;
  --blue-50: #eaf3ff;
  --blue-100: #d6e7ff;
  --teal: #12a594;
  --red: #d8433a;
  --ink: #0f1f38;
  --ink-2: #44566f;
  --ink-3: #6b7d95;
  --line: #d5dfeb;
  --line-2: #c2d0e1;
  --bg: #eef3f9;
  --card: #ffffff;
  --radius: 14px;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-h: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.45 var(--font); }
.wrap { width: min(1320px, 100%); margin: 0 auto; padding: 0 20px; }
a { color: var(--blue-600); }
button, input, select { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-h { background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-700) 100%); color: #fff; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: #fff; min-width: 0; }
.brand img { height: 78px; width: auto; display: block; flex: none; }
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font: 700 30px/1 var(--font-h); letter-spacing: .5px; text-transform: uppercase; }
.brand-sub { color: #a9c3e6; font-size: 14px; margin-top: 4px; }
.tabs-bar { background: var(--navy-900); border-top: 1px solid rgba(255, 255, 255, .06); position: sticky; top: 0; z-index: 5; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; color: #c9daf2; text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 14px; border-radius: 999px; border: 1px solid transparent; }
.tabs a:hover { color: #fff; border-color: rgba(255, 255, 255, .18); }
.tabs a[aria-current="page"] { background: var(--blue); color: #fff; }
.tabs a.tab-push { margin-left: auto; }
/* [tamogatas-1126] a Támogatás gomb: diszkrét, de egyedi — körbefutó „keverék” a keretén, kétütemű (dupla) szívdobbanás.
   Nem piros, hogy ne keveredjen a veszélyes gombokkal (Értékek nullázása). Lásd a fájl végén: .tz-tamogat */
.tabs a.tab-support { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- buttons ---------- */
.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--ink-2); padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px; }
.ghost:hover { border-color: var(--blue); color: var(--blue-600); }
.ghost.light { color: #d7e6fb; border-color: rgba(255, 255, 255, .28); }
.ghost.light:hover { color: #fff; border-color: #fff; }

/* ---------- page ---------- */
/* [fejlec-res-1126] a main egyben .wrap is, és a .wrap { padding: 0 20px } erősebb volt → a felső/alsó térköz 0 lett,
   a cím és az „Értékek nullázása” a menüsávhoz tapadt. A main.wrap erősebb, így a térköz érvényesül. */
main, main.wrap { padding-top: 22px; padding-bottom: 40px; }
.page-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.page-h h1 { font: 700 34px/1.1 var(--font-h); margin: 0; letter-spacing: .3px; color: var(--navy-700); }
.engine-btns { display: flex; gap: 8px; flex: none; }
.ghost[data-clear] { color: var(--red); border-color: #efc4c0; }
.ghost[data-clear]:hover, .ghost[data-clear].armed { color: #fff; background: var(--red); border-color: var(--red); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); column-gap: 18px; row-gap: 18px; align-items: start; }
/* masonry: JS sets each card's row span so cards stack without gaps */
.grid.masonry { grid-auto-rows: 1px; row-gap: 0; }
.grid.masonry > .card { margin-bottom: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: visible; min-width: 0; }
.card.wide { grid-column: 1 / -1; }
.card-h { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.card-h h3, .engine h2 { font: 700 21px/1.15 var(--font-h); margin: 0; color: var(--navy-700); display: flex; align-items: center; gap: 10px; letter-spacing: .2px; }
.card-h p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; }
.card-h .info .tip p { margin: 0; color: inherit; font-size: 13px; } /* tooltip next to a card title */
.card-h h3 .info { margin-left: 0; }
.num { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px; background: var(--blue-50); color: var(--blue-600); font: 700 15px/1 var(--font); }
.rows { padding: 6px 18px 14px; }
.custom { padding: 14px 18px 16px; }
.sub { font: 700 15px/1.2 var(--font); color: var(--navy-600); margin: 16px 0 4px; padding-top: 12px; border-top: 1px dashed var(--line-2); }

/* ---------- rows ---------- */
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 210px); align-items: center; gap: 4px 14px; padding: 7px 0; }
.row + .row { border-top: 1px solid #edf2f8; }
.row label, .row .lbl { font-weight: 500; color: var(--ink); }
.row .hint { grid-column: 1 / -1; margin: 0; }
.hint { color: var(--ink-3); font-size: 13px; margin: 8px 0 0; }
.ctl { display: flex; align-items: center; gap: 8px; min-width: 0; position: relative; }
.unit { color: var(--ink-3); font-size: 13px; min-width: 46px; white-space: nowrap; }
input[type="text"], select {
  width: 100%; min-width: 0; height: 38px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff;
  text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--navy-700);
}
select { text-align: left; font-weight: 500; color: var(--ink); appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2312305e' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
input[type="text"]:hover, select:hover { border-color: var(--blue); }
input[type="text"]:focus, select:focus { border-color: var(--blue); outline: 1px solid var(--blue); outline-offset: 0; }
input::placeholder { color: #9fb0c6; font-weight: 500; }
.is-auto input { padding-left: 46px; }
.is-auto.overridden input { padding-left: 64px; border-color: #f0a640; }
.is-auto.overridden .auto-tag { color: #9a5800; background: #fff1d6; }
.auto-tag { position: absolute; left: 7px; top: 50%; transform: translateY(-50%); font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--blue-600); background: var(--blue-50); border-radius: 5px; padding: 2px 5px; pointer-events: none; }
output { display: block; width: 100%; height: 38px; line-height: 38px; padding: 0 10px; border-radius: 9px; background: var(--blue-50); text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--navy-700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.key output { background: var(--navy-700); color: #fff; font-size: 17px; }
output.neg { color: var(--red); }
.row.key output.neg { color: #ffb4ad; }
#main .row.out .ctl output { min-width: 0; }

/* bTodo is text: let it wrap */
[data-out="bTodo"] { height: auto; min-height: 38px; line-height: 1.3; padding: 9px 10px; white-space: normal; text-align: left; }

/* ---------- engine panel ---------- */
.engine { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; overflow: hidden; }
.engine-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.engine-body { padding: 6px 18px 14px; }
.engine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 0 28px; }
.engine-grid .wide-row { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(220px, 420px); }
.engine-grid .row + .row { border-top: none; }
.engine-grid .row { border-bottom: 1px solid #edf2f8; }
.engine-stats { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.engine-stats span { background: var(--blue-50); color: var(--ink-2); border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.engine-stats b { color: var(--navy-700); }
.engine-sum { margin: 0; padding: 12px 18px; color: var(--ink-2); font-weight: 500; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; }
.tbl th { background: #f3f7fc; color: var(--ink-2); font-weight: 600; text-align: right; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { text-align: right; padding: 6px 10px; border-bottom: 1px solid #edf2f8; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child, .tbl td.l { text-align: left; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.m td { background: #f7faff; font-weight: 600; }
.tbl td.o { color: var(--navy-700); }
.tbl td.b { font-weight: 700; }
/* Puska tables: centred columns, zebra rows, units under the header, highlighted engine row */
.tbl.pk th, .tbl.pk td { text-align: center; padding-left: 12px; padding-right: 12px; }
.tbl.pk th:first-child, .tbl.pk td:first-child { text-align: left; }
.tbl.pk td:first-child { font-weight: 700; color: var(--navy-700); }
.tbl.pk th small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted, #7a8aa0); margin-top: 1px; }
.tbl.pk tbody tr:nth-child(even) td { background: #f7faff; }
.tbl.pk tbody tr:hover td { background: var(--blue-50); }
.tbl.pk tbody tr.cur td { background: var(--blue-100); color: var(--navy-800); font-weight: 700; }
.tbl.pk tbody tr.cur td:first-child { box-shadow: inset 4px 0 0 var(--blue); }
.pk-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 600; vertical-align: 1px; white-space: nowrap; }
.tbl.pk tfoot td { border-top: 2px solid var(--navy-700); background: #fff7e6; font-weight: 700; color: var(--navy-800); }
/* Puska explanation blocks + figures */
.pk-desc { color: var(--ink-2); }
.pk-h { font: 700 15px/1.2 var(--font); color: var(--navy-600); margin: 18px 0 8px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.pk-desc > .pk-h:first-child { margin-top: 4px; padding-top: 0; border-top: 0; }
.pk-cmp { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; margin: 0 0 6px; }
.pk-cmp > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #f8fbff; }
.pk-cmp h5 { margin: 0 0 6px; font: 700 13.5px/1.25 var(--font); color: var(--navy-700); }
.pk-cmp ul { margin: 0; padding-left: 18px; }
.pk-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 230px); gap: 20px; align-items: center; }
.pk-side .pk-fig { margin: 0; }
.pk-side.about-club { grid-template-columns: minmax(0, 1fr) 160px; margin-bottom: 4px; }
.club-logo { display: block; justify-self: center; }
.club-logo img { display: block; width: 160px; height: auto; border-radius: 50%; }
@media (max-width: 640px) { .pk-side.about-club { grid-template-columns: 1fr; } .club-logo img { width: 130px; } }
.pk-side.wide { grid-template-columns: minmax(0, 1fr) minmax(260px, 400px); }
@media (max-width: 640px) { .pk-side, .pk-side.wide { grid-template-columns: 1fr; } .pk-side .pk-fig svg { max-width: 230px; } }
.pk-desc li > ul { margin: 4px 0 2px; padding-left: 18px; list-style: circle; }
.pk-mm { color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.pk-note { margin: 10px 0; padding: 8px 12px; border-left: 4px solid var(--blue); background: var(--blue-50); border-radius: 0 8px 8px 0; color: var(--ink); }
.pk-note.warn { border-left-color: #f08c00; background: #fff4e0; }
.pk-fig { margin: 6px 0 12px; }
.pk-fig svg { display: block; width: 100%; height: auto; max-width: 440px; margin: 0 auto; }
.pk-fig figcaption { font-size: 12.5px; color: var(--ink-2); text-align: center; margin-top: 4px; }
.dv-t.kx-h { font-weight: 700; fill: var(--navy-600); font-size: 12px; }
.kx-dim { stroke: var(--red); stroke-width: 1.6; stroke-dasharray: 5 3; }
.kx-band { fill: rgba(30, 136, 255, .3); stroke: var(--navy-700); stroke-width: 1.5; }
.kx-dome { fill: #fff; stroke: var(--navy-700); stroke-width: 1.5; stroke-dasharray: 5 3; }
.kx-frac { stroke: var(--ink); stroke-width: 1.2; }
.kx-piston { fill: #dfe7f2; stroke: var(--navy-700); stroke-width: 1.5; }
.kx-head { fill: #c6d4e7; stroke: var(--navy-700); stroke-width: 1.5; }
.kx-wall { stroke: var(--ink); stroke-width: 3; }
.kx-axis { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 6 4; }
.kx-flow { fill: none; stroke: var(--red); stroke-width: 2; } .kx-flowh { fill: var(--red); }
@media (max-width: 520px) {
  .tbl.pk th, .tbl.pk td { padding-left: 7px; padding-right: 7px; }
  .pk-tag { display: none; }
}
.tbl.pk tfoot td small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted, #7a8aa0); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--blue-600); background: var(--blue-50); border-radius: 5px; padding: 1px 5px; margin-left: 4px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 14px; align-items: start; }
.split .tbl-wrap { max-height: 520px; overflow-y: auto; }
.split thead th { position: sticky; top: 0; }
input.mini { height: 32px; min-width: 64px; width: 100%; font-size: 14px; }
input.mini.name { text-align: left; min-width: 160px; font-weight: 500; color: var(--ink); }
.tbl.gears td, .tbl.gears th { padding: 6px 8px; }
.tbl.matrix th:first-child { position: sticky; left: 0; z-index: 1; }
.tbl.matrix tbody th { background: #f3f7fc; text-align: center; border-right: 1px solid var(--line); }
.tbl.matrix td { text-align: center; padding: 6px 4px; min-width: 40px; }
.tbl.matrix td.hit { background: var(--blue); color: #fff; font-weight: 700; }
.tbl.matrix td.near { background: var(--blue-100); }
.tbl.matrix td.cur { outline: 2px solid var(--red); outline-offset: -2px; color: var(--red); font-weight: 700; }
.tbl.matrix td.hit.cur { color: #fff; }
.tbl.matrix td.closest { outline: 2px dashed var(--blue); outline-offset: -3px; font-weight: 700; color: var(--blue-600); }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin: 0 4px 0 8px; }
.sw.hit { background: var(--blue); } .sw.near { background: var(--blue-100); } .sw.cur { outline: 2px solid var(--red); outline-offset: -2px; }
.warn { color: var(--red); font-weight: 600; margin: 10px 0 0; }

/* ---------- graphics ---------- */
.timing { width: 100%; max-width: 330px; display: block; margin: 0 auto; }
.t-ring { fill: #f6f9fd; stroke: var(--line-2); stroke-width: 1.5; }
.t-tick { stroke: var(--line-2); stroke-width: 1.5; }
.t-ex, .t-tr, .t-in { fill: none; stroke-width: 14; stroke-linecap: butt; }
.t-ex { stroke: var(--navy-700); } .t-tr { stroke: var(--blue); } .t-in { stroke: var(--teal); }
.t-ign { stroke: var(--red); stroke-width: 2.5; stroke-dasharray: 5 4; }
.t-c { fill: var(--ink-3); }
.t-lbl { font: 700 13px var(--font); fill: var(--ink-2); text-anchor: middle; }
.legend { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 12px; font-size: 14px; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 8px; vertical-align: -2px; }
.k-ex { background: var(--navy-700); } .k-tr { background: var(--blue); } .k-in { background: var(--teal); } .k-ign { background: var(--red); }
.pw { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.portwin { width: 100%; max-width: 380px; display: block; margin: 0 auto; }
.pw-shape { fill: var(--blue-50); stroke: var(--navy-700); stroke-width: 2.5; stroke-linejoin: round; }
.pw-dim { stroke: var(--blue); stroke-width: 1.5; }
.pw-t { font: 600 12px var(--font); fill: var(--blue-600); text-anchor: middle; }
.pw-t.end { text-anchor: end; } .pw-t.start { text-anchor: start; }
.pw .rows { padding: 0; }
.svg-scroll { overflow-x: auto; }
.profile { width: 100%; min-width: 640px; display: block; }
.pf-shape { fill: var(--blue-50); stroke: var(--navy-700); stroke-width: 2.5; stroke-linejoin: round; }
.pf-axis { stroke: var(--line-2); stroke-dasharray: 6 5; }
.pf-st { stroke: var(--navy-700); stroke-width: 1; opacity: .5; }
.pf-t { font: 700 12px var(--font); fill: var(--blue-600); text-anchor: middle; }

/* ---------- notes ---------- */
.notes { margin: 0; padding-left: 18px; color: var(--ink-2); }
.notes li { margin: 6px 0; }
.notes b { color: var(--ink); }
.formulas code { font: 500 13px/1.4 ui-monospace, 'Cascadia Mono', Consolas, monospace; background: #f3f7fc; border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; color: var(--navy-700); }

/* ---------- footer ---------- */
.site-f { background: var(--navy-800); color: #a9c3e6; font-size: 13px; }
.site-f .wrap { padding-top: 18px; padding-bottom: 22px; }
/* moped sketch on the right of the Contact card; the line art is used as a mask so it takes the theme colour */
.contact-box { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.contact-sketch { flex: none; width: 260px; aspect-ratio: 640 / 333; background: var(--ink-3); opacity: .75;
  -webkit-mask: url(assets/contact-sketch.png) center / contain no-repeat; mask: url(assets/contact-sketch.png) center / contain no-repeat; }
@media (max-width: 640px) { .contact-box { flex-direction: column; align-items: stretch; } .contact-sketch { width: min(240px, 80%); align-self: center; } }
.site-f p { margin: 4px 0; }
.site-f b { color: #fff; }
.site-f .f-support { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.site-f .f-support a:not(.support-btn) { color: #a9c3e6; }
.support-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.support-btn.big { font-size: 18px; padding: 12px 26px; }
.desc.support p { max-width: 70ch; }
.site-f a:not(.support-btn) { color: #cfe0f7; }
/* [feloweb-logo 11-26] the operator's logo in the footer (always on the dark footer, so the white „Felo” reads) */
/* its own block on the right of the footer, separate from everything else; on a phone it drops below the text */
.site-f .wrap { position: relative; }
.site-f .f-feloweb { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  padding-left: 22px; border-left: 1px solid rgba(169, 195, 230, .18); text-decoration: none; opacity: .92; transition: opacity .2s; }
.site-f .f-feloweb span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #7f9cc4; }
.site-f .f-feloweb img { height: 30px; width: auto; display: block; transition: transform .2s; }
.site-f .f-feloweb:hover, .site-f .f-feloweb:focus-visible { opacity: 1; }
.site-f .f-feloweb:hover img, .site-f .f-feloweb:focus-visible img { transform: translateY(-1px); }
@media (min-width: 901px) { .site-f .wrap > p { padding-right: 230px; } }
@media (max-width: 900px) {
  .site-f .f-feloweb { position: static; transform: none; align-items: flex-start; margin-top: 14px; padding: 14px 0 0; border-left: 0; border-top: 1px solid rgba(169, 195, 230, .18); }
}
/* (the old hover lift was removed here: it overrode the right-side block's centring and made it jump 25 px) */
.desc.legal { max-width: 80ch; }
.desc.legal h4 { font: 700 15px/1.2 var(--font); color: var(--navy-600); margin: 18px 0 6px; }
.desc.legal h4:first-child { margin-top: 0; }
.legal-dl { display: grid; grid-template-columns: minmax(130px, max-content) 1fr; gap: 4px 16px; margin: 0; }
.legal-dl dt { color: var(--ink-2, #5b6b80); }
.legal-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.contact-box .legal-dl { grid-template-columns: max-content 1fr; gap: 4px 10px; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  body { font-size: 15px; }
  .wrap { padding: 0 14px; }
  .brand img { height: 56px; }
  .brand-name { font-size: 22px; }
  .brand-sub { display: none; }
  .page-h h1 { font-size: 28px; }
  .rows, .custom, .engine-body { padding-left: 14px; padding-right: 14px; }
  .card-h, .engine-h { padding-left: 14px; padding-right: 14px; }
  .row { grid-template-columns: minmax(0, 1fr) minmax(128px, 48%); }
  .engine-grid .wide-row { grid-template-columns: 1fr; }
  .unit { min-width: 38px; font-size: 12px; }
}
@media (max-width: 420px) {
  .brand img { height: 48px; }
  .brand-name { font-size: 19px; }
  #reset { padding: 6px 10px; font-size: 13px; }
  .row { grid-template-columns: minmax(0, 1fr) minmax(118px, 50%); gap: 4px 10px; }
  .row label, .row .lbl { font-size: 14px; line-height: 1.25; }
  .unit { min-width: 30px; }
  .engine-grid .row { grid-template-columns: minmax(0, 1fr) minmax(118px, 50%); }
  .engine-grid .wide-row { grid-template-columns: 1fr; }
}
@media (max-width: 330px) {
  .row, .engine-grid .row { grid-template-columns: 1fr; }
}
/* ---------- language switch ---------- */
.head-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.lang { display: flex; gap: 4px; padding: 3px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; }
.lang button { display: flex; align-items: center; gap: 6px; background: transparent; border: 1px solid transparent; color: #c9daf2; border-radius: 999px; padding: 4px 9px 4px 5px; cursor: pointer; font-weight: 700; font-size: 12px; letter-spacing: .4px; }
.lang button svg { width: 22px; height: 15px; border-radius: 3px; display: block; }
.lang button:hover { color: #fff; border-color: rgba(255, 255, 255, .3); }
.lang button[aria-pressed="true"] { background: #fff; color: var(--navy-800); }
/* info "?" tooltip (no shadows: flat panel with a border) */
.info { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; border-radius: 50%; border: 1px solid var(--blue); color: var(--blue-600); background: #fff; font: 700 12px/1 var(--font); cursor: help; vertical-align: 1px; }
.info:hover, .info:focus-visible { background: var(--blue); color: #fff; }
.info .tip { display: none; position: fixed; left: 8px; top: 0; width: min(360px, calc(100vw - 16px)); z-index: 20; background: var(--navy-800); color: #e4eefc; border: 1px solid var(--navy-600); border-radius: 10px; padding: 10px 12px; font: 400 13px/1.45 var(--font); text-align: left; cursor: default; }
.info .tip ul { margin: 0; padding-left: 16px; }
.info .tip p { margin: 0; white-space: pre-line; }
.info .tip:has(p) { width: max-content; max-width: min(320px, calc(100vw - 16px)); }
.info .tip li { margin: 0 0 6px; white-space: pre-line; }
.info .tip li:last-child { margin-bottom: 0; }
.info .tip b { color: #fff; }
.info:hover .tip, .info:focus .tip, .info:focus-within .tip { display: block; }
.link-row { display: block; }
.more { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--blue); border-radius: 999px; color: var(--blue-600); font-weight: 600; text-decoration: none; font-size: 14px; }
.more:hover { background: var(--blue); color: #fff; }
.desc.intro { margin: 0 0 16px; }
.desc ol { margin: 0 0 4px; padding-left: 20px; }
.desc ol li { margin: 6px 0; }
.sq-steps { margin: 6px 0 4px; padding: 8px 12px; background: #f6f9fd; border: 1px solid var(--line); border-radius: 8px; }
.sq-steps ol { margin: 4px 0 0; padding-left: 20px; }
.sq-steps ol li { margin: 3px 0; }
.sq-steps .sq-info { margin: 6px 0 0; padding-left: 8px; border-left: 3px solid var(--blue); }/* on/off switch (checkbox) */
.check-row .ctl { justify-content: flex-end; }
input.switch { appearance: none; -webkit-appearance: none; width: 46px; height: 26px; border-radius: 999px; background: var(--line-2); position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
input.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
input.switch:checked { background: var(--blue); }
input.switch:checked::after { left: 23px; }
input.switch:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }/* flat cone pattern drawings */
.cone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; margin-top: 16px; }
.cone-fig { margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 8px 8px 10px; background: #fbfdff; }
.cone-fig figcaption { text-align: center; font-weight: 600; font-size: 13px; color: var(--navy-700); margin-top: 4px; }
svg.cone { width: 100%; height: auto; display: block; }
.cs { fill: var(--blue-50); stroke: #111a2b; stroke-width: 2; stroke-linejoin: round; }
.cd { stroke: var(--blue); stroke-width: 1.6; }
.ct { font: 700 11px var(--font); fill: var(--blue-600); text-anchor: middle; }
.ct.end { text-anchor: end; } .ct.start { text-anchor: start; }
.cc { fill: none; stroke: #111a2b; stroke-width: 1.4; } .cc2 { fill: #111a2b; }/* printable 1:1 templates */
.tpl-list { margin: 8px 0; padding-left: 20px; color: var(--ink-2); font-size: 14px; }
.tpl-actions { margin: 12px 0; }
button.more { background: #fff; cursor: pointer; font: inherit; font-weight: 600; }
.tpl-preview summary { cursor: pointer; font-weight: 600; color: var(--navy-700); margin: 6px 0; }
.tpl-prev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; margin-top: 10px; }
/* A4 sheet: 10 mm margin around the 190 × 277 mm page (percent padding = 10/210 of the width) */
.tpl-prev-grid .tpl-page { box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: 4.762%; background: #fff; aspect-ratio: 210 / 297; overflow: hidden; }
.tpl-prev-grid .tpl-page svg.tpl-svg { display: block; width: 100%; height: auto; }
.tpl-frame { fill: none; stroke: #c9d3e0; stroke-width: 0.3; stroke-dasharray: 2 2; }
.tpl-shape { fill: none; stroke: #000; stroke-width: 0.4; }
.tpl-axis { stroke: #000; stroke-width: 0.35; stroke-dasharray: 4 2; }
.tpl-cal { stroke: #000; stroke-width: 0.4; }
.tpl-txt { font-family: 'DejaVu Sans', Verdana, Arial, sans-serif; fill: #000; }
.tpl-txt.b { font-weight: 700; }
.tpl-id { fill: #a6a6a6; letter-spacing: .02em; }
.tpl-join { stroke: #000; stroke-width: 0.25; stroke-dasharray: 6 1.5 1 1.5; }
.tpl-mark { fill: none; stroke: #000; stroke-width: 0.2; }
/* disabled rows (e.g. segment when top corners are rounded) */
.row.off label { color: var(--ink-3); }
.row.off input, .row.off select { opacity: .55; }
/* balance factor bar */
.bf-bar { padding: 26px 6px 2px; }
.bf-track { position: relative; height: 12px; background: var(--blue-50); border: 1px solid var(--line); border-radius: 6px; }
.bf-zone { position: absolute; top: 0; bottom: 0; background: rgba(30, 136, 255, .35); }
.bf-zone i { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 3px; font: 500 11px/1 var(--font); font-style: normal; color: var(--ink-2); white-space: nowrap; }
.bf-cur { position: absolute; top: -6px; width: 4px; height: 22px; margin-left: -2px; background: var(--navy-700); border-radius: 2px; }
.bf-cur b { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 2px; font: 700 13px/1 var(--font); color: var(--navy-700); white-space: nowrap; }
.bf-tgt { position: absolute; top: -5px; bottom: -5px; margin-left: -1px; border-left: 2px dashed var(--teal); }
.bf-scale { position: relative; height: 13px; margin-top: 18px; font: 500 11px/1 var(--font); color: var(--ink-3); }
.bf-scale span { position: absolute; transform: translateX(-50%); }
.sw.bf-sw-cur { background: var(--navy-700); width: 4px; border-radius: 2px; }
.sw.bf-sw-tgt { background: none; border: 0; border-left: 2px dashed var(--teal); width: 2px; }
input[type="text"]:disabled { background: #f1f4f8; border-color: var(--line); cursor: not-allowed; }
.note-warn { color: var(--red); font-weight: 500; margin: 8px 0 4px; }
/* port window scale bar + descriptions */
.pw-bar { stroke: var(--ink-2); stroke-width: 2; }
.hint.center { text-align: center; margin-top: 2px; }
.desc { margin-top: 14px; color: var(--ink-2); font-size: 14px; }
.desc p { margin: 0 0 10px; }
.desc ul { margin: 0 0 10px; padding-left: 20px; }
.desc li { margin: 4px 0; }
.desc b { color: var(--ink); }
@media (max-width: 720px) {
  .lang button span { display: none; }
  .lang button { padding: 4px 5px; }
  .head-tools { gap: 6px; }
}
@media print {
  .tabs-bar, .lang, .site-f, .engine-h button, [data-clear] { display: none; }
  body { background: #fff; }
  .card, .engine { break-inside: avoid; }
}
/* drilling sketch (balance page) */
.dviz-wrap { margin: 10px 0 4px; }
.dviz { display: block; width: 100%; height: auto; }
.dv-web { fill: #f4f7fb; stroke: var(--ink-2); stroke-width: 1.2; }
.dv-cw { fill: rgba(27, 66, 128, .12); stroke: none; }
.dv-pitch { fill: none; stroke: var(--blue); stroke-width: 1; stroke-dasharray: 4 3; }
.dv-shaft { fill: #e3e9f1; stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 2; }
.dv-pin { fill: #c9d3e0; stroke: var(--ink-2); stroke-width: 1; }
.dv-ax { stroke: var(--ink-2); stroke-width: 1; }
.dv-hole { fill: #fff; stroke: var(--red); stroke-width: 1.4; }
.dv-ins { fill: #4a5568; stroke: var(--navy-800); stroke-width: 1.2; }
.dv-hole.over, .dv-ins.over { stroke: var(--red); stroke-dasharray: 3 2; }
.dv-dim { stroke: var(--ink-3); stroke-width: .8; }
.dv-rr { stroke: var(--navy-700); stroke-width: 1.6; }
.dv-r { stroke: var(--red); stroke-width: 1.6; }
.dv-blk { fill: #f4f7fb; stroke: var(--ink-2); stroke-width: 1.2; }
.dv-max { stroke: var(--red); stroke-width: 1.2; stroke-dasharray: 4 3; }
.dv-t { font: 600 11px var(--font); fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.dv-t.mid { text-anchor: middle; } .dv-t.end { text-anchor: end; } .dv-t.bad { fill: var(--red); font-weight: 700; }
.dv-h { font: 700 12px var(--font); fill: var(--navy-600); }
.dv-h.mid { text-anchor: middle; }

/* ---------- light / dark switch (header) ---------- */
.theme-toggle { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .22); background: transparent; color: #c9daf2; cursor: pointer; padding: 0; flex: none; }
.theme-toggle:hover { color: #fff; border-color: rgba(255, 255, 255, .45); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .ic-sun { display: none; }
html[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
html[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
.head-tools { display: flex; align-items: center; gap: 10px; }

/* ---------- dark theme: the light theme stays the default; this only overrides colours ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1424; --card: #131f33; --ink: #e2eaf5; --ink-2: #a9b8cc; --ink-3: #8597ad;
  --line: #24354e; --line-2: #34496b; --blue-50: #172f4e; --blue-100: #1d3d68; --blue-600: #6cb0ff;
  --navy-700: #9cc2f5; --navy-600: #82aeea; /* used as text accents → light on dark */
}
html[data-theme="dark"] .site-h { background: linear-gradient(180deg, #0b1d3a 0%, #12305e 100%); }
html[data-theme="dark"] .tabs-bar { background: #050d1d; }
html[data-theme="dark"] .site-f { background: #08142a; }
html[data-theme="dark"] .skip, html[data-theme="dark"] .info, html[data-theme="dark"] button.more { background: var(--card); }
html[data-theme="dark"] .row + .row, html[data-theme="dark"] .engine-grid .row, html[data-theme="dark"] .tbl td { border-color: var(--line); }
html[data-theme="dark"] input[type="text"], html[data-theme="dark"] select, html[data-theme="dark"] input.mini { background: #0e192b; border-color: var(--line-2); color: var(--ink); }
html[data-theme="dark"] input::placeholder { color: #6f839d; }
html[data-theme="dark"] input[type="text"]:disabled { background: #172235; }
html[data-theme="dark"] .is-auto.overridden .auto-tag { color: #ffc46b; background: #3a2a10; }
html[data-theme="dark"] .row.key output { background: #1b4280; color: #fff; }
html[data-theme="dark"] .ghost[data-clear] { border-color: #7a3934; color: #ff8f86; }
html[data-theme="dark"] .ghost[data-clear]:hover, html[data-theme="dark"] .ghost[data-clear].armed { color: #fff; }
html[data-theme="dark"] .tbl th, html[data-theme="dark"] .tbl.matrix tbody th, html[data-theme="dark"] .formulas code { background: #182840; }
html[data-theme="dark"] .tbl tr.m td, html[data-theme="dark"] .tbl.pk tbody tr:nth-child(even) td { background: #152238; }
html[data-theme="dark"] .tbl.pk tbody tr:hover td { background: var(--blue-50); }
html[data-theme="dark"] .tbl.pk tbody tr.cur td { background: var(--blue-100); color: #fff; }
html[data-theme="dark"] .tbl.pk tfoot td { background: #2c2414; color: var(--ink); }
html[data-theme="dark"] .tbl.matrix td.cur { color: #ff8f86; }
html[data-theme="dark"] .pk-cmp > div, html[data-theme="dark"] .sq-steps, html[data-theme="dark"] .cone-fig { background: #152238; }
html[data-theme="dark"] .pk-note { color: var(--ink); }
html[data-theme="dark"] .pk-note.warn { background: #33270f; }
html[data-theme="dark"] .t-ring { fill: #152238; }
html[data-theme="dark"] .kx-dome { fill: var(--card); }
html[data-theme="dark"] .kx-piston { fill: #2a3b55; }
html[data-theme="dark"] .kx-head { fill: #3a5070; }
html[data-theme="dark"] .cs { stroke: #cfe0f7; } html[data-theme="dark"] .cc { stroke: #cfe0f7; } html[data-theme="dark"] .cc2 { fill: #cfe0f7; }
html[data-theme="dark"] .dv-t { stroke: var(--card); }
html[data-theme="dark"] .dv-web, html[data-theme="dark"] .dv-blk { fill: #1a2a42; }
html[data-theme="dark"] .dv-shaft { fill: #22324b; }
html[data-theme="dark"] .dv-pin { fill: #5a6b84; }
html[data-theme="dark"] .dv-hole { fill: var(--card); }
html[data-theme="dark"] .dv-cw { fill: rgba(130, 174, 234, .16); }
html[data-theme="dark"] .bf-cur b { color: var(--ink); }
/* the 1:1 print previews stay white paper with black lines, like the printout */
html[data-theme="dark"] .tpl-prev-grid .tpl-page { background: #fff; border-color: #fff; }
/* ---------- background decoration (only shows in the empty space around the cards) ---------- */
/* ::before = fine repeating texture (fainter), ::after = the large drawings in the side margins (fit to the free width) */
:root { --deco: #c9d6e6; --deco-2: #e1e8f2;
  --gap: calc(50vw - 650px); --sw: clamp(0px, calc(var(--gap) - 36px), 480px); --sx: calc((var(--gap) - var(--sw)) / 2); }
html[data-theme="dark"] { --deco: #213558; --deco-2: #122036; }
body::before, body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::before { background: var(--deco-2); -webkit-mask-repeat: repeat; mask-repeat: repeat; }
body::after { background: var(--deco); -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: var(--sw) auto; mask-size: var(--sw) auto;
  -webkit-mask-position: left var(--sx) top 62%, right var(--sx) top 62%; mask-position: left var(--sx) top 62%, right var(--sx) top 62%; }
/* blueprint: grid texture + engine section drawn from real kinematics (left: 140° scavenging, right: TDC / ignition) */
body::before { -webkit-mask-image: url(assets/deco/bp-grid.svg); mask-image: url(assets/deco/bp-grid.svg); }
body::after { content: none; }
/* the engine drawings are inline SVG (engine-deco.js) so scrolling can turn the crank */
/* [deco-lathato-1126] Feló: a két oldalsó motor halvány volt → saját, erősebb szín (a rajz és a mozgás változatlan;
   a háttérrács marad a halvány --deco-2 színen) */
:root { --deco-eng: #9cb1cc; }
html[data-theme="dark"] { --deco-eng: #36548a; }
.eng-deco { position: fixed; z-index: -1; pointer-events: none; top: 62%; transform: translateY(-62%); width: var(--sw); aspect-ratio: 640 / 870; color: var(--deco-eng); }
.eng-deco svg { display: block; width: 100%; height: 100%; overflow: visible; }
.eng-l { left: var(--sx); }
.eng-r { right: var(--sx); }
/* header: blueprint grid + smoke (the header is navy in both themes) */
.site-h, html[data-theme="dark"] .site-h { background: url(assets/deco/h-smoke4.svg) center / cover no-repeat, linear-gradient(180deg, #0b1d3a 0%, #12305e 100%); }

@media print {
  body::before, body::after, .eng-deco { display: none !important; }
  html[data-theme="dark"] { color-scheme: light; --bg: #fff; --card: #fff; --ink: #0f1f38; --ink-2: #44566f; --ink-3: #6b7d95; --line: #d5dfeb; --line-2: #c2d0e1; --blue-50: #eaf3ff; --blue-100: #d6e7ff; --blue-600: #1570d6; --navy-700: #12305e; --navy-600: #1b4280; }
  .theme-toggle { display: none; }
}

/* ---------- [tamogatas-1126 v3] Támogatás gomb: ÜRES TANK ----------
   A gomb egy analóg üzemanyagszint-mérő. Alapállapot: üres a tank — a mutató E-n, a piros mezőben áll, a keret halványan
   „figyelmeztet”, és kb. 36 mp-enként egy csillanás fut végig rajta. Ráhúzásra tankolás: a mutató kis túllendüléssel F-re szalad,
   a gomb balról megtelik üzemanyaggal, a lámpa kialszik, a keret kékre vált; elengedve lassan újra kiürül.
   A Támogatás oldalon (kiválasztva) a tank tele. Mozgás-csökkentésnél nincs animáció, csak az állapotok. */
.tabs a.tab-support, .support-btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 17px 5px 9px; border-radius: 999px; min-height: 40px; box-sizing: border-box;   /* a fül és a lábléci gomb egyforma magas */
  font: 700 16px/1.1 var(--font-h); letter-spacing: .07em; text-transform: uppercase; color: #eaf3ff; text-decoration: none;
  background: linear-gradient(180deg, #14305d 0%, #0a1a35 100%);
  border: 1px solid rgba(255, 179, 71, .45);
  animation: tzFigyel 2.6s ease-in-out infinite;
  transition: border-color .35s, box-shadow .35s, color .2s;
}
/* az „üzemanyag”: tankoláskor balról megtölti a gombot */
.tabs a.tab-support::before, .support-btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; transform-origin: left center; transform: scaleX(0);
  background: linear-gradient(90deg, rgba(255, 179, 71, .22) 0%, rgba(30, 136, 255, .38) 38%, rgba(47, 210, 196, .34) 100%);
  transition: transform 1.6s cubic-bezier(.4, 0, .6, 1);     /* elengedve lassan „fogy” */
}
.tz-tank { flex: none; width: 39px; height: 27px; overflow: visible; margin: -5px 0 -3px; }
.tz-tank .tz-betu { font: 700 5.6px var(--font-h); fill: #a9c3e6; }
.tz-tank .tz-tu { transform-box: view-box; transform-origin: 16px 18px; transform: rotate(-56deg); transition: transform 1.6s cubic-bezier(.4, 0, .6, 1); }
/* csillanás: kb. 36 mp-enként egy fényhullám fut végig a gombon (az első 4 mp-cel a betöltés után) — figyelemfelkeltés */
.tabs a.tab-support::after, .support-btn::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 60%; z-index: 1; pointer-events: none;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0) 30%, rgba(255, 236, 200, .55) 50%, rgba(255, 255, 255, 0) 70%, transparent 100%);
  transform: translateX(-120%) skewX(-18deg); animation: tzCsillan 36s ease-in-out 4s infinite;
}
/* tankolás */
.tabs a.tab-support:hover, .support-btn:hover, .support-btn:focus-visible, .tabs a.tab-support[aria-current="page"] {
  color: #fff; border-color: #1e88ff; animation: none;
  box-shadow: 0 0 0 2px rgba(30, 136, 255, .18), 0 0 20px rgba(30, 136, 255, .38);
}
.tabs a.tab-support:hover::before, .support-btn:hover::before, .support-btn:focus-visible::before, .tabs a.tab-support[aria-current="page"]::before {
  transform: scaleX(1); transition: transform 1.05s cubic-bezier(.25, .7, .25, 1);
}
.tabs a.tab-support:hover .tz-tu, .support-btn:hover .tz-tu, .support-btn:focus-visible .tz-tu, .tabs a.tab-support[aria-current="page"] .tz-tu {
  transform: rotate(56deg); transition: transform 1.05s cubic-bezier(.3, .9, .3, 1.18);   /* kis túllendülés a végén */
}
.support-btn.big { font-size: 21px; padding: 9px 24px 9px 13px; gap: 11px; }
.support-btn.big .tz-tank { width: 52px; height: 36px; }
@keyframes tzFigyel { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 170, 60, 0); } 50% { box-shadow: 0 0 12px 0 rgba(255, 170, 60, .28); } }
@keyframes tzCsillan { 0% { transform: translateX(-120%) skewX(-18deg); } 3.2% { transform: translateX(260%) skewX(-18deg); } 100% { transform: translateX(260%) skewX(-18deg); } }
@media (prefers-reduced-motion: reduce) {
  .tabs a.tab-support, .support-btn, .tabs a.tab-support::after, .support-btn::after, .tz-tank * { animation: none !important; }
  .tabs a.tab-support::before, .support-btn::before, .tz-tank .tz-tu { transition: none !important; }
}
