/*! FreeBarcodeGenerator.org — site styles (system fonts, no external requests) */
:root {
  --bg: #ffffff; --bg2: #f5f7fb; --card: #ffffff; --text: #111827; --muted: #4b5563;
  --line: #dfe3ea; --brand: #1d4ed8; --brand-2: #1e40af; --brand-soft: #e8eefc; --on-brand: #ffffff;
  --ok: #047857; --err: #b91c1c; --focus: #f59e0b;
  --radius: 14px; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
  --max: 1180px; --gap: clamp(16px, 3vw, 28px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220; --bg2: #111a2e; --card: #121c31; --text: #e8edf6; --muted: #a8b3c7;
    --line: #26324b; --brand: #7aa2ff; --brand-2: #a5c0ff; --brand-soft: #18264a; --on-brand: #0b1220;
    --ok: #34d399; --err: #fca5a5; --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-2); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .6em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.7rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gap); }
.narrow { max-width: 820px; }
.center { text-align: center; }
.small { font-size: .875rem; color: var(--muted); }
.ico { width: 1.35em; height: 1.35em; flex: none; vertical-align: -.3em; }
.ico-sm { width: 1.1em; height: 1.1em; vertical-align: -.2em; }
[hidden] { display: none !important; }
html, body { overflow-x: clip; max-width: 100%; }

/* small phones: keep the header inside the viewport */
@media (max-width: 479px) {
  .site-header .bar { gap: 8px; }
  .site-header .menu-btn, .site-header .lang summary { padding: 8px 10px; }
  .site-header .brand { font-size: .92rem; gap: 7px; min-width: 0; }
  .site-header .brand span { overflow: hidden; text-overflow: ellipsis; }
  .site-header .logo-mark { width: 28px; height: 28px; }
  .lang summary .ico-sm { display: none; }
  .menu-btn, .lang summary { padding: 8px 10px; }
  .actions { gap: 6px; flex: none; }
}
@media (max-width: 639px) {
  .site-header .lang { position: static; }
  .site-header .lang-list { position: absolute; top: 100%; inset-inline: 12px; width: auto; max-height: calc(100vh - 80px); }
}
@media (max-width: 359px) { .site-header .brand span { display: none; } }

/* skip link */
.skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 8px; }
main:focus { outline: none; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.brand b { color: var(--brand); font-weight: 800; }
.logo-mark { width: 32px; height: 32px; flex: none; }
.quick-nav { display: none; margin-inline-start: 12px; }
.quick-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.quick-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; }
.quick-nav a:hover { background: var(--bg2); }
.actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.menu-btn, .lang summary {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}
.menu-btn:hover, .lang summary:hover { border-color: var(--brand); }
.menu-label { display: none; }
.lang { position: relative; }
.lang summary { list-style: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang-code { font-size: .85rem; }
.lang-list {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60; width: min(92vw, 420px); max-height: 70vh; overflow: auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; margin: 0; padding: 8px; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.lang-list a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
.lang-list a:hover, .lang-list a[aria-current] { background: var(--brand-soft); color: var(--brand-2); font-weight: 600; }
.site-menu { border-top: 1px solid var(--line); background: var(--bg); max-height: calc(100vh - 64px); overflow: auto; }
.menu-grid { display: grid; gap: 8px 24px; grid-template-columns: 1fr; padding-block: 16px 24px; }
.menu-title { margin: 8px 0 4px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.menu-group ul { list-style: none; margin: 0; padding: 0; }
.menu-group a { display: flex; gap: 10px; align-items: center; padding: 10px 8px; border-radius: 8px; color: var(--text); text-decoration: none; min-height: 44px; }
.menu-group a:hover { background: var(--bg2); color: var(--brand); }
@media (min-width: 640px) { .menu-grid { grid-template-columns: repeat(2, 1fr); } .menu-label { display: inline; } }
@media (min-width: 1000px) { .menu-grid { grid-template-columns: repeat(4, 1fr); } .quick-nav { display: block; } }

/* breadcrumbs */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 16px 0 0; font-size: .9rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-inline-end: 6px; color: var(--line); }

/* hero */
.hero { background: radial-gradient(1200px 400px at 50% -10%, var(--brand-soft), transparent 70%); padding: clamp(28px, 6vw, 64px) 0 8px; text-align: center; }
.hero .lead { margin-inline: auto; }
.lead { font-size: clamp(1.02rem, .95rem + .4vw, 1.2rem); color: var(--muted); max-width: 760px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 16px 0 0; font-weight: 600; font-size: .95rem; }
.hero .trust { justify-content: center; }
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust .ico { color: var(--ok); }
.tool-head { padding-top: 12px; }

/* app */
.app { display: grid; gap: var(--gap); grid-template-columns: 1fr; margin-block: 24px 40px; }
@media (min-width: 900px) { .app { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; } .out { position: sticky; top: 84px; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(16px, 2.5vw, 24px); min-width: 0; }
.panel-title { font-size: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field label { font-weight: 600; font-size: .95rem; }
.hint { margin: 0; font-size: .85rem; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=number], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit; font-size: 1rem;
}
textarea { resize: vertical; min-height: 88px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .95rem; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
input[type=color] { width: 100%; height: 44px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; }
input[type=range] { width: 100%; min-height: 44px; accent-color: var(--brand); }
input[type=file] { width: 100%; min-height: 44px; padding: 8px; border: 1px dashed var(--line); border-radius: 10px; background: var(--bg2); font: inherit; }
.check { flex-direction: row; align-items: center; gap: 10px; }
.check input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
.check label { font-weight: 500; }
.row2 { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } }
.opts { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 4px; margin: 8px 0 0; min-width: 0; }
.opts legend { font-weight: 700; padding: 0 6px; }
.opt-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .opt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.preview {
  display: grid; place-items: center; min-height: 220px; padding: 16px; border-radius: 12px; overflow: auto;
  background: repeating-conic-gradient(var(--bg2) 0 25%, var(--bg) 0 50%) 50% / 20px 20px; border: 1px solid var(--line);
}
.preview svg { width: auto; max-width: 100%; height: auto; max-height: 360px; display: block; }
.preview.is-err svg { opacity: .25; filter: grayscale(1); }
.status { min-height: 1.6em; margin: 12px 0; font-weight: 600; color: var(--err); }
.contact-form .status, #scanner .status, #bulk .status { color: var(--text); }
.dl { display: flex; flex-wrap: wrap; gap: 8px; }
.note { padding: 12px; border-radius: 10px; background: var(--brand-soft); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px;
  border: 1px solid var(--brand); border-radius: 10px; background: var(--brand); color: var(--on-brand);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .15s, transform .05s;
}
.btn:hover { background: var(--brand-2); border-color: var(--brand-2); color: var(--on-brand); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-2); }
.btn-lg { width: 100%; min-height: 52px; font-size: 1.05rem; margin-top: 8px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; text-decoration: underline; cursor: pointer; text-underline-offset: .18em; }

/* bulk & scanner */
progress { width: 100%; height: 14px; accent-color: var(--brand); }
.skipped { font-size: .85rem; color: var(--muted); padding-inline-start: 1.2em; }
.scan-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.video-box { display: none; border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 14px; aspect-ratio: 4 / 3; }
.is-live .video-box { display: block; }
.video-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-out { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0 0 14px; }
.scan-out dt { font-weight: 700; }
.scan-out dd { margin: 0; overflow-wrap: anywhere; font-family: ui-monospace, Consolas, monospace; }

/* cards */
.types-head { margin-top: 24px; }
.cat { margin-block: 12px 32px; }
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); list-style: none; margin: 0; padding: 0; }
.card a {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, transform .15s;
}
.card a:hover { border-color: var(--brand); transform: translateY(-2px); }
.card-ico { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.card-title { font-weight: 700; font-size: 1.05rem; }
.card-text { color: var(--muted); font-size: .93rem; flex: 1; }
.card-go { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 700; font-size: .92rem; }
[dir=rtl] .card-go .ico, [dir=rtl] .card-go svg { transform: scaleX(-1); }

/* prose */
.prose { margin-block: 24px 48px; max-width: 900px; }
.prose section { margin-bottom: 36px; }
.prose p, .prose li { color: var(--text); }
.legal h2 { margin-top: 1.6em; font-size: 1.35rem; }
.legal ul { padding-inline-start: 1.3em; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding: 12px 14px 12px 56px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
[dir=rtl] .steps li { padding: 12px 56px 12px 14px; }
.steps li::before { content: counter(s); position: absolute; inset-inline-start: 14px; top: 10px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 800; }
.feats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); list-style: none; padding: 0; margin: 0; }
.feats li { padding: 16px; border-radius: 12px; background: var(--bg2); }
.feats h3 { margin-bottom: .3em; }
.feats p { margin: 0; color: var(--muted); }
.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-inline-start: 28px; margin-bottom: 8px; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .45em; width: 12px; height: 7px; border-inline-start: 3px solid var(--ok); border-bottom: 3px solid var(--ok); transform: rotate(-45deg); }
.specs { width: 100%; border-collapse: collapse; font-size: .95rem; }
.specs th, .specs td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { width: 38%; font-weight: 600; color: var(--muted); }
.faq details { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: var(--card); }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style-position: inside; min-height: 44px; }
.faq details p { padding: 0 16px 14px; margin: 0; color: var(--muted); }
.mail-line { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* footer */
.site-footer { margin-top: 40px; background: var(--bg2); border-top: 1px solid var(--line); font-size: .93rem; }
.foot-grid { display: grid; gap: 24px; grid-template-columns: 1fr; padding-block: 36px 16px; }
@media (min-width: 640px) { .foot-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .foot-grid { grid-template-columns: 1.4fr repeat(5, 1fr); } }
.foot-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .8em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--text); text-decoration: none; display: inline-block; padding-block: 3px; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.foot-about p { color: var(--muted); margin-top: 10px; }
.foot-bottom { border-top: 1px solid var(--line); padding-block: 16px 24px; color: var(--muted); }
.foot-bottom p { margin: 0; }

/* cookie banner */
.cookie { position: fixed; inset-inline: 0; bottom: 0; z-index: 90; background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(0, 0, 0, .12); }
.cookie-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-block: 14px; }
.cookie-in p { margin: 0; flex: 1 1 320px; font-size: .95rem; }
.cookie-btns { display: flex; gap: 8px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .btn, .menu-btn, .lang summary { border: 2px solid ButtonText; } }

/* print: only the barcode when "Print" is used */
@media print {
  .site-header, .site-footer, .cookie, .dl, .skip, .crumbs { display: none !important; }
  .print-code body * { visibility: hidden; }
  .print-code .preview, .print-code .preview * { visibility: visible; }
  .print-code .preview { position: fixed; inset: 0; background: #fff; border: 0; }
}
