:root {
    color-scheme: light;
    --ink: #172026;
    --muted: #5f6d73;
    --line: #dce4e6;
    --paper: #f7faf9;
    --surface: #ffffff;
    --teal: #0f766e;
    --teal-dark: #0b4f4a;
    --amber: #d68a1f;
    --rose: #b6425c;
    --blue: #2563eb;
    --shadow: 0 18px 55px rgba(23, 32, 38, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
}

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
    padding: 14px clamp(18px, 4vw, 58px);
    background: rgba(247, 250, 249, 0.94);
    border-bottom: 1px solid rgba(220, 228, 230, 0.8);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    min-width: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
}

.main-nav {
    display: flex;
    gap: 22px;
    align-items: center;
    color: var(--muted);
    font-size: 15px;
}

.main-nav a {
    text-decoration: none;
}

.main-nav a:hover {
    color: var(--teal-dark);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 10px;
}

.nav-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--ink);
}

.hero-section {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: min(760px, calc(100vh - 72px));
    padding: clamp(58px, 8vw, 108px) clamp(18px, 4vw, 58px) 40px;
    background-image:
        linear-gradient(90deg, rgba(247, 250, 249, 0.98) 0%, rgba(247, 250, 249, 0.9) 38%, rgba(247, 250, 249, 0.34) 68%, rgba(247, 250, 249, 0.1) 100%),
        url("../images/sam4s-nr-330.jpg");
    background-position: center right;
    background-repeat: no-repeat;
    background-size: min(980px, 64vw) auto;
}

.hero-copy {
    max-width: 760px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--teal);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 0;
    max-width: 840px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 0.98;
    letter-spacing: 0;
}

h2 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: 0;
}

h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
}

.hero-lead {
    margin: 24px 0 0;
    max-width: 680px;
    color: var(--muted);
    font-size: 19px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
}

.button.primary {
    background: var(--teal);
    color: #fff;
}

.button.secondary {
    border: 1px solid var(--line);
    background: var(--surface);
}

.process-section {
    padding: 0 clamp(18px, 4vw, 58px) 42px;
    margin-top: -18px;
    background: var(--paper);
}

.hero-visual {
    max-width: 1320px;
    margin: 0 auto;
}

.metrics-section {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: 0 clamp(18px, 4vw, 58px);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--line);
}

.metrics-section div {
    padding: 22px;
    background: var(--surface);
}

.metrics-section strong {
    display: block;
    font-size: 28px;
}

.metrics-section span {
    color: var(--muted);
}

.section {
    padding: clamp(62px, 9vw, 112px) clamp(18px, 4vw, 58px);
}

.section-heading {
    max-width: 790px;
    margin-bottom: 34px;
}

.app-preview {
    display: grid;
    grid-template-columns: minmax(320px, 0.72fr) minmax(260px, 0.28fr);
    gap: 22px;
    align-items: center;
    margin: 0 0 28px;
}

.app-preview-frame {
    max-height: 520px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #eef3f1;
    box-shadow: var(--shadow);
}

.app-preview img {
    display: block;
    width: 100%;
    height: auto;
    margin: -1px 0 -1px;
}

.app-preview figcaption {
    color: var(--muted);
    font-size: 17px;
}

.section-heading p:last-child {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 18px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.feature-card {
    min-height: 245px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.feature-card span {
    display: inline-block;
    margin-bottom: 24px;
    color: var(--rose);
    font-size: 13px;
    font-weight: 800;
}

.feature-card p,
.job-detail p,
.timeline p {
    color: var(--muted);
}

.split-section {
    background: #eef3f1;
}

.job-browser {
    display: grid;
    grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
    gap: 18px;
}

.job-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.job-tab,
.endpoint-button {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.job-tab {
    min-height: 52px;
    padding: 12px;
    font-weight: 800;
}

.job-tab.active,
.endpoint-button.active {
    border-color: var(--teal);
    background: #dff1ee;
    color: var(--teal-dark);
}

.job-detail {
    min-height: 320px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.job-detail h3 {
    margin-bottom: 12px;
    font-size: 34px;
}

.job-api {
    display: grid;
    gap: 14px;
    margin: 22px 0 0;
}

.job-api div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7faf9;
}

.job-api dt {
    margin-bottom: 6px;
    color: var(--teal-dark);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.job-api dd {
    margin: 0;
}

.job-api code {
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.integration-section {
    background: var(--ink);
    color: #f8fbfa;
}

.integration-section .section-heading p:last-child,
.integration-section .eyebrow {
    color: #b7d9d4;
}

.code-layout {
    display: grid;
    grid-template-columns: minmax(260px, 370px) minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}

.endpoint-list {
    display: grid;
    gap: 10px;
}

.endpoint-button {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 66px;
    padding: 14px 16px;
}

.endpoint-button span {
    display: inline-flex;
    flex: 0 0 auto;
    min-width: 48px;
    color: var(--rose);
    font-weight: 900;
}

.endpoint-button em {
    min-width: 0;
    font-style: normal;
    font-weight: 700;
    overflow-wrap: break-word;
}

.endpoint-button small {
    display: block;
    color: var(--muted);
    font-weight: 400;
    font-size: 13px;
}

/*
 * A webhook NEM hívható végpont: ezt kapja az integrátor, nem ő küldi. A listában
 * mégis itt a helye - ott keresi, ahol a többi API-részlet van -, de jelölni kell,
 * különben valaki curl-özni próbálja.
 */
.endpoint-button.inbound {
    border-style: dashed;
}

.endpoint-button.inbound span {
    color: var(--blue);
}

.code-panel {
    margin: 0;
    min-height: 270px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: #0b1114;
    color: #d7f7ef;
    overflow: auto;
    white-space: pre-wrap;
}

.code-panel code {
    font-family: Consolas, Monaco, monospace;
    font-size: 15px;
}

.rules-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
    gap: 24px;
}

.rule-column {
    min-width: 0;
}

.rule-list {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: rules;
}

.rule-list strong {
    display: block;
    margin-bottom: 4px;
    font-size: 18px;
}

.rule-list p {
    margin: 0;
    color: var(--muted);
}

.rule-more {
    margin: 22px 0 0;
    color: var(--muted);
}

.rule-more a {
    color: var(--teal);
    font-weight: 800;
}

.rule-list li {
    counter-increment: rules;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.rule-list li::before {
    content: counter(rules);
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--amber);
    color: #fff;
    font-weight: 900;
}

.timeline {
    border-left: 2px solid var(--line);
}

.timeline article {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 16px;
    padding: 0 0 26px 22px;
}

.timeline article > span {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: var(--teal);
    color: #fff;
    font-weight: 900;
}

.timeline h3 {
    margin-bottom: 6px;
}

.timeline p {
    margin: 0;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 28px clamp(18px, 4vw, 58px);
    border-top: 1px solid var(--line);
    color: var(--muted);
}

.contact-section {
    padding-top: 0;
}

.contact-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
    gap: 24px;
    align-items: center;
    padding: clamp(26px, 5vw, 44px);
    border-radius: 8px;
    background: var(--teal-dark);
    color: #fff;
}

.contact-panel .eyebrow,
.contact-panel p {
    color: #c7ebe5;
}

.contact-panel p {
    max-width: 650px;
    margin-bottom: 0;
}

.contact-card {
    display: grid;
    gap: 8px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    font-style: normal;
}

.contact-card strong {
    font-size: 24px;
}

.contact-card span,
.contact-card a {
    color: #e7fffb;
}

.contact-card a {
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 1120px) {
    .job-browser,
    .code-layout,
    .rules-layout {
        grid-template-columns: 1fr;
    }

    .hero-section {
        min-height: 640px;
        padding-top: 42px;
        background-size: min(740px, 92vw) auto;
        background-position: center bottom 20px;
        align-items: flex-start;
    }

    .hero-section::after {
        content: "";
        position: absolute;
        inset: auto 0 0;
        z-index: -1;
        height: 45%;
        background: linear-gradient(180deg, rgba(247, 250, 249, 0), var(--paper));
    }

    .app-preview {
        grid-template-columns: 1fr;
    }

    .contact-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .feature-grid,
    .metrics-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .main-nav {
        position: absolute;
        top: 72px;
        left: 18px;
        right: 18px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        padding: 14px 16px;
        border-bottom: 1px solid var(--line);
    }

    .main-nav a:last-child {
        border-bottom: 0;
    }

    .nav-toggle {
        display: block;
    }

    .hero-section {
        padding-left: 16px;
        padding-right: 16px;
        min-height: 690px;
        background-size: 620px auto;
        background-position: center bottom 26px;
    }

    .feature-grid,
    .metrics-section,
    .job-tabs {
        grid-template-columns: 1fr;
    }

    .metrics-section {
        margin-left: 16px;
        margin-right: 16px;
    }

    .site-footer {
        flex-direction: column;
    }
}

/* ----------------------------------------------------------- dokumentációs lap

   A kódblokkok itt VILÁGOSAK, a főlapi kódpanellel ellentétben. Ott egyetlen,
   kiemelt panel van, és a sötét háttér kiemeli; itt harmincegy kódblokk követi
   egymást, és a sötét tömb tömegben fárasztó olvasni.                         */

.doc-page {
    max-width: 1320px;
    margin: 0 auto;
    padding: 36px clamp(16px, 4vw, 58px) 60px;
}

.doc-intro {
    max-width: 760px;
    margin-bottom: 32px;
}

.doc-intro h1 {
    margin: 6px 0 14px;
    font-size: clamp(32px, 4vw, 44px);
    line-height: 1.15;
}

.doc-lead {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 18px;
}

.doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.doc-layout {
    display: grid;
    grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

.doc-toc {
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 110px);
    overflow: auto;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.doc-toc > summary {
    display: none;
}

.doc-toc nav {
    display: grid;
    gap: 2px;
}

.doc-toc a {
    display: block;
    padding: 5px 8px;
    border-radius: 6px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.35;
}

.doc-toc a:hover {
    background: #eef6f4;
    color: var(--teal-dark);
}

.doc-toc .toc-sz2 {
    margin-top: 8px;
    color: var(--ink);
    font-weight: 800;
}

.doc-toc .toc-sz3 {
    padding-left: 18px;
}

.doc-body {
    min-width: 0;
    font-size: 16.5px;
}

.doc-body h1 {
    margin: 0 0 18px;
    font-size: 34px;
    line-height: 1.2;
}

.doc-body h2 {
    margin: 46px 0 14px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-size: 27px;
    line-height: 1.25;
}

.doc-body h3 {
    margin: 32px 0 10px;
    font-size: 21px;
    line-height: 1.3;
}

.doc-body h4 {
    margin: 24px 0 8px;
    font-size: 17px;
}

/* A ragadós fejléc alá ne csússzon a horgonyra ugrás célja. */
.doc-body h1,
.doc-body h2,
.doc-body h3,
.doc-body h4 {
    scroll-margin-top: 88px;
}

.doc-body p {
    margin: 0 0 15px;
}

.doc-body ul,
.doc-body ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.doc-body li {
    margin-bottom: 8px;
}

.doc-body li > ul,
.doc-body li > ol {
    margin-top: 8px;
}

.doc-body hr {
    margin: 34px 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.doc-body code {
    padding: 1px 5px;
    border-radius: 4px;
    background: #eef3f2;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.92em;
    overflow-wrap: break-word;
}

.doc-body pre {
    margin: 0 0 18px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--teal);
    border-radius: 8px;
    background: #fbfdfc;
    overflow-x: auto;
}

.doc-body pre code {
    padding: 0;
    background: none;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: normal;
}

.doc-body blockquote {
    margin: 0 0 18px;
    padding: 14px 18px;
    border-left: 3px solid var(--amber);
    border-radius: 0 8px 8px 0;
    background: #fdf8ef;
}

.doc-body blockquote > :last-child {
    margin-bottom: 0;
}

.tabla-keret {
    margin: 0 0 20px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.doc-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.doc-body th,
.doc-body td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.doc-body th {
    background: #f2f7f6;
    font-weight: 800;
    white-space: nowrap;
}

.doc-body tbody tr:last-child td {
    border-bottom: 0;
}

.doc-body a {
    color: var(--teal);
}

.doc-body a.szakaszra {
    color: inherit;
    text-decoration-color: rgba(15, 118, 110, 0.45);
    text-underline-offset: 2px;
}

.doc-body a.szakaszra:hover {
    color: var(--teal);
}

.doc-hiany {
    max-width: 640px;
    padding: 26px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--rose);
    border-radius: 8px;
    background: var(--surface);
}

.doc-hiany h2 {
    margin: 0 0 12px;
}

@media (max-width: 980px) {
    .doc-layout {
        grid-template-columns: 1fr;
    }

    .doc-toc {
        position: static;
        max-height: none;
    }

    .doc-toc > summary {
        display: list-item;
        cursor: pointer;
        font-weight: 800;
    }

    .doc-toc[open] > summary {
        margin-bottom: 12px;
    }

    .doc-body th {
        white-space: normal;
    }
}

/* A dokumentációra mutató kiemelt sáv az Integráció szakasz alján. */
.doc-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 26px;
    align-items: center;
    margin-top: 22px;
    padding: 26px 28px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
}

.doc-cta h3 {
    margin: 4px 0 10px;
    font-size: 22px;
    line-height: 1.3;
}

.doc-cta p:last-child {
    margin: 0;
    max-width: 70ch;
    opacity: 0.86;
}

.doc-cta .button {
    white-space: nowrap;
}

@media (max-width: 860px) {
    .doc-cta {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .doc-cta .button {
        justify-self: start;
    }
}

/* ------------------------------------------------- hero folyamatábra (hv-)

   Átadott blokk a docs/bemutatkozo-weboldal-folyamat-abra/ mappából (2026-10-03).
   Minden osztály hv- előtagú, hogy a lap többi stílusával ne ütközzön.           */
/* ==========================================================
   Hero-visual – új folyamatábra (nyugtaapi.hu)
   Az oldal meglévő tokenjeit használja (--ink, --teal, ...).
   A régi .system-board / .flow-row / .node / .flow-arrow /
   .receipt-preview szabályokra ez a blokk már nem támaszkodik.
   ========================================================== */

.hv {
  --hv-teal: var(--teal, #0f766e);
  --hv-teal-dark: var(--teal-dark, #0b4f4a);
  --hv-ink: var(--ink, #172026);
  --hv-muted: var(--muted, #5f6d73);
  --hv-line: var(--line, #dce4e6);
  --hv-amber: var(--amber, #d68a1f);
  --hv-rose: var(--rose, #b6425c);
  --hv-blue: var(--blue, #2563eb);
  --hv-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  position: relative;
  display: grid;
  gap: 18px;
  padding: clamp(16px, 2.6vw, 28px);
  border: 1px solid var(--hv-line);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, .07) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(0deg, rgba(15, 118, 110, .07) 1px, transparent 1px) 0 0 / 34px 34px,
    #eef6f4;
  box-shadow: var(--shadow, 0 18px 55px rgba(23, 32, 38, .12));
  color: var(--hv-ink);
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
}

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

/* ---------- fejléc ---------- */
.hv-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.hv-eyebrow {
  margin: 0;
  color: var(--hv-teal-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hv-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(15, 118, 110, .22);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}
.hv-pill::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--hv-teal);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, .15);
}

/* ---------- fő lánc ---------- */
.hv-chain {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) 92px minmax(0, 1fr) 92px minmax(0, 1fr) 70px minmax(150px, .72fr);
  grid-template-rows: auto auto;
  column-gap: 0;
  row-gap: 14px;
  align-items: stretch;
}

.hv-node, .hv-link, .hv-device { grid-row: 1; }

.hv-node {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, .2);
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
}
.hv-node--server {
  border-color: var(--hv-teal);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, .08);
}

.hv-role {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--hv-muted);
  font-size: 12px;
  font-weight: 700;
}
.hv-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px; height: 26px;
  border-radius: 7px;
  background: rgba(15, 118, 110, .1);
  color: var(--hv-teal-dark);
}
.hv-ico svg { width: 15px; height: 15px; }
.hv-node strong { font-size: 16px; line-height: 1.25; }

.hv-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--hv-muted);
  font-size: 12.5px;
}
.hv-list li { position: relative; padding-left: 15px; }
.hv-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: .55em;
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--hv-teal);
  opacity: .55;
}
.hv-list b { color: var(--hv-ink); font-weight: 700; }

.hv-code {
  align-self: flex-start;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 5px;
  background: #f2f6f6;
  border: 1px solid var(--hv-line);
  font-family: var(--hv-mono);
  font-size: 11.5px;
  overflow-wrap: anywhere;
}

.hv-types {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
}
.hv-types span {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(15, 118, 110, .08);
  color: var(--hv-teal-dark);
  font-family: var(--hv-mono);
  font-size: 10.5px;
}

/* ---------- összekötők ---------- */
.hv-link {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 0 6px;
}
.hv-arrow {
  position: relative;
  display: grid;
  gap: 1px;
  text-align: center;
}
.hv-arrow b {
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  color: var(--hv-teal-dark);
}
.hv-arrow small {
  color: var(--hv-muted);
  font-size: 10.5px;
  line-height: 1.25;
}
.hv-line {
  position: relative;
  height: 2px;
  margin: 3px 0;
  background: var(--hv-teal);
  overflow: visible;
}
.hv-line::after { /* nyílhegy jobbra */
  content: "";
  position: absolute;
  right: -1px; top: 50%;
  width: 0; height: 0;
  transform: translateY(-50%);
  border-left: 7px solid var(--hv-teal);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
.hv-arrow--back .hv-line,
.hv-arrow--back .hv-line::after { background: var(--hv-blue); border-left-color: var(--hv-blue); }
.hv-arrow--back .hv-line::after {
  right: auto; left: -1px;
  background: none;
  border-left: 0;
  border-right: 7px solid var(--hv-blue);
}
.hv-arrow--back b { color: var(--hv-blue); }
.hv-arrow--pull .hv-line {
  background: repeating-linear-gradient(90deg, var(--hv-teal) 0 6px, transparent 6px 10px);
}

/* mozgó csomag a vonalon */
.hv-line i {
  position: absolute;
  top: 50%; left: 0;
  width: 8px; height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--hv-teal);
  animation: hv-travel 3.2s ease-in-out infinite;
}
.hv-arrow--back .hv-line i {
  border-color: var(--hv-blue);
  animation-name: hv-travel-back;
  animation-delay: 1.6s;
}
@keyframes hv-travel {
  0% { left: 0; opacity: 0; }
  12% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 0; }
}
@keyframes hv-travel-back {
  0% { left: calc(100% - 8px); opacity: 0; }
  12% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: 0; opacity: 0; }
}

/* ---------- pénztárgép + nyugta ---------- */
.hv-device {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hv-device-label {
  color: var(--hv-muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.hv-device-label b { display: block; color: var(--hv-ink); font-size: 14px; }
.hv-receipt {
  position: relative;
  width: 100%;
  max-width: 190px;
  padding: 20px 14px 22px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(23, 32, 38, .18);
  font-family: var(--hv-mono);
  font-size: 11px;
  text-align: center;
  animation: hv-print 6s ease-in-out infinite;
}
.hv-receipt::after { /* tépett alja */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -7px;
  height: 8px;
  background:
    linear-gradient(-45deg, transparent 5px, #fff 0) 0 0 / 10px 8px repeat-x,
    linear-gradient(45deg, transparent 5px, #fff 0) 0 0 / 10px 8px repeat-x;
}
.hv-receipt p { margin: 0 0 2px; font-family: inherit; font-weight: 900; letter-spacing: .12em; font-size: 13px; }
.hv-receipt .hv-no { display: block; color: var(--hv-teal-dark); font-weight: 800; font-size: 12px; }
.hv-receipt .hv-date { display: block; color: var(--hv-muted); margin-bottom: 10px; }
.hv-receipt .hv-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  border-top: 1px dashed var(--hv-line);
  color: var(--hv-muted);
}
.hv-receipt .hv-row:last-of-type { color: var(--hv-ink); font-weight: 800; }
@keyframes hv-print {
  0%, 8% { clip-path: inset(0 0 100% 0); transform: translateY(-6px); }
  30%, 92% { clip-path: inset(0 0 -12px 0); transform: none; }
  100% { clip-path: inset(0 0 -12px 0); transform: none; }
}

/* ---------- második sor ---------- */
.hv-life {
  grid-column: 1 / 4;
  grid-row: 2;
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(15, 118, 110, .2);
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
}
.hv-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin: 0;
  color: var(--hv-muted);
  font-size: 12px;
  font-weight: 700;
}
.hv-sub code { font-family: var(--hv-mono); font-weight: 400; font-size: 11.5px; color: var(--hv-ink); }

.hv-states {
  display: grid;
  grid-template-columns: auto 22px auto 22px 1fr;
  align-items: center;
  row-gap: 6px;
}
.hv-st {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: #fff;
  font-family: var(--hv-mono);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.hv-st::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.hv-st--wait { color: var(--hv-muted); }
.hv-st--take { color: var(--hv-teal-dark); }
.hv-st--ok { color: #fff; background: var(--hv-teal); border-color: var(--hv-teal); }
.hv-st--err { color: var(--hv-rose); }
.hv-st--unsure { color: var(--hv-amber); }
.hv-st--off { color: var(--hv-muted); border-style: dashed; }

.hv-to {
  height: 2px;
  margin: 0 4px;
  background: var(--hv-line);
  position: relative;
}
.hv-to::after {
  content: "";
  position: absolute;
  right: -1px; top: 50%;
  transform: translateY(-50%);
  border-left: 5px solid #b9c7ca;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.hv-ends { display: flex; flex-wrap: wrap; gap: 6px; }
.hv-branch {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding-top: 8px;
  border-top: 1px dashed var(--hv-line);
  color: var(--hv-muted);
  font-size: 11.5px;
}
.hv-branch > span { display: inline-flex; align-items: center; gap: 6px; }

.hv-file {
  grid-column: 5;
  grid-row: 2;
  position: relative;
  display: grid;
  gap: 6px;
  align-content: start;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1.5px dashed rgba(15, 118, 110, .45);
  border-radius: 10px;
  background: rgba(255, 255, 255, .8);
}
.hv-file::before { /* felfelé mutató szaggatott nyíl a vezérlőbe */
  content: "";
  position: absolute;
  left: 50%; top: -34px;
  height: 32px;
  border-left: 2px dashed var(--hv-teal);
}
.hv-file::after {
  content: "";
  position: absolute;
  left: 50%; top: -38px;
  transform: translateX(calc(-50% + 1px));
  border-bottom: 7px solid var(--hv-teal);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
}
.hv-file strong { font-size: 13px; }
.hv-file small { color: var(--hv-muted); font-size: 11.5px; }

.hv-health {
  grid-column: 7;
  grid-row: 2;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, .2);
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
}
.hv-health strong { font-size: 13px; }
.hv-health > code {
  font-family: var(--hv-mono);
  font-size: 11px;
  color: var(--hv-ink);
  overflow-wrap: anywhere;
}
.hv-health ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 11.5px; color: var(--hv-muted); }
.hv-health li { display: flex; align-items: center; gap: 7px; }
.hv-health li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.hv-health li:nth-child(1)::before { background: var(--hv-teal); }
.hv-health li:nth-child(2)::before { background: var(--hv-amber); }
.hv-health li:nth-child(3)::before { background: var(--hv-rose); }

/* ---------- reszponzív ---------- */
@media (max-width: 1120px) {
  .hv-chain {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    row-gap: 0;
  }
  .hv-chain > * { grid-column: 1 !important; grid-row: auto !important; }
  .hv-link {
    flex-direction: row;
    justify-content: center;
    gap: 28px;
    padding: 6px 0;
  }
  .hv-arrow { grid-template-columns: auto auto; align-items: center; column-gap: 10px; text-align: left; }
  .hv-arrow .hv-line {
    grid-row: 1 / 3;
    grid-column: 1;
    width: 2px; height: 46px;
    margin: 0;
  }
  .hv-arrow b, .hv-arrow small { grid-column: 2; }
  .hv-line::after {
    right: auto; left: 50%; top: auto; bottom: -1px;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid var(--hv-teal);
    border-bottom: 0;
  }
  .hv-arrow--back .hv-line::after {
    left: 50%; bottom: auto; top: -1px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 0;
    border-bottom: 7px solid var(--hv-blue);
  }
  .hv-arrow--pull .hv-line {
    background: repeating-linear-gradient(180deg, var(--hv-teal) 0 6px, transparent 6px 10px);
  }
  .hv-line i { left: 50% !important; margin: 0 0 0 -4px; animation-name: hv-travel-v; }
  .hv-arrow--back .hv-line i { animation-name: hv-travel-v-back; }
  @keyframes hv-travel-v { 0% { top: 0; opacity: 0; } 15%, 80% { opacity: 1; } 100% { top: calc(100% - 8px); opacity: 0; } }
  @keyframes hv-travel-v-back { 0% { top: calc(100% - 8px); opacity: 0; } 15%, 80% { opacity: 1; } 100% { top: 0; opacity: 0; } }

  .hv-device { padding-bottom: 18px; }
  .hv-life, .hv-health { margin-top: 12px; }
  .hv-file { margin-top: 0; margin-bottom: 0; }
  .hv-file::before, .hv-file::after { display: none; }
  .hv-file { order: 1; }
  .hv-life { order: 2; }
  .hv-health { order: 3; }
}

@media (max-width: 560px) {
  .hv-states { grid-template-columns: auto 18px auto; }
  .hv-states .hv-to--2 { display: none; }
  .hv-ends { grid-column: 1 / -1; }
  .hv-link { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .hv-line i { display: none; }
  .hv-receipt { animation: none; }
}
