:root {
  --accent: #244B84;
  --accent-hover: #1E4276;
  --accent-soft: #E5E9F0;
  --bg: #F1F3F5;
  --surface: #ffffff;
  --surface-alt: #F7F8FA;
  --text: #2a3340;
  --muted: #6d7684;
  --border: #dadee5;
  --ok: #1c7a3d;
  --ok-soft: #e2f4e8;
  --bad: #b42318;
  --bad-soft: #fde8e6;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent: #6585B3;
    --accent-hover: #809BC3;
    --accent-soft: #1E2836;
    --bg: #111317;
    --surface: #191B1F;
    --surface-alt: #23272B;
    --text: #e8ebf0;
    --muted: #9ea6b2;
    --border: #3c4451;
    --ok: #6fd193;
    --ok-soft: #173323;
    --bad: #ff8a80;
    --bad-soft: #3d1c1a;
    color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", sans-serif;
  background: var(--bg); color: var(--text);
}
a { color: var(--accent); }
[hidden] { display: none !important; }
/* Japán oldal: a japán betűtípusok elöl (szebb írásjelek), a sortörés a japán szabályok szerint. */
html:lang(ja) body {
  font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo,
    "Noto Sans JP", "Noto Sans CJK JP", "Segoe UI", Roboto, Arial, sans-serif;
  line-break: strict;
}
/* Hosszú (pl. japán vagy német) szövegek se lógjanak ki keskeny kijelzőn: feliratok, gombok, címek tördelhetők. */
h1, h2, legend, label, .btn, .alert, .hint, .error, .perks li, .choice, .terms span { overflow-wrap: anywhere; min-width: 0; }

.top { background: #1B365E; color: #fff; }
.top .inner { max-width: 760px; margin: 0 auto; padding: 14px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
/* Logó (fehér feliratú változat az éjkék fejlécen); a kép soha nem nagyobb az eredetinél (841×175). */
.brand { display: flex; align-items: center; }
.brand img { display: block; width: 150px; height: auto; }
.langs { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 14px; }
.langs a, .langs button {
  color: rgba(255, 255, 255, .8); text-decoration: none; padding: 3px 6px; border-radius: 6px; font: inherit; font-weight: 600;
  background: transparent; border: 0; cursor: pointer; line-height: 1.4;
}
.langs a:hover, .langs button:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.langs [aria-current] { color: #fff; background: rgba(255, 255, 255, .22); }
.langs span { opacity: .5; }

main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 28px 16px 40px; }
h1 { font-size: 26px; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 18px; margin: 0 0 12px; }
.lead { color: var(--muted); margin: 0 0 22px; font-size: 17px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }
.perks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.perks li { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 600; }

fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
legend { font-weight: 700; margin-bottom: 10px; padding: 0; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.choice { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: var(--surface-alt); font-weight: 600; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid .wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 15px; }
.field > span:first-child { font-weight: 600; }
.req { color: var(--bad); margin-left: 2px; }
.note { font-weight: 400; color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; }
.error { color: var(--bad); font-size: 14px; font-weight: 600; }
input[type=text], input[type=email], input[type=tel], input[type=password], select {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; min-height: 44px;
}
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--bad); background: var(--bad-soft); }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.section-title { grid-column: 1 / -1; margin: 6px 0 -4px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

.terms { display: flex; gap: 10px; align-items: flex-start; margin: 22px 0 6px; font-size: 15px; }
.terms input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; font: inherit; font-weight: 700; border-radius: 10px; padding: 12px 22px;
  cursor: pointer; text-decoration: none; min-height: 48px; max-width: 100%; text-align: center; white-space: normal;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.secondary { background: var(--surface); color: var(--accent); }
.submit { margin-top: 18px; width: 100%; font-size: 17px; }

.alert { border: 1px solid; border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; }
.alert.error { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.alert.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }

.key-box { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; background: var(--accent-soft); border: 1px dashed var(--accent); border-radius: var(--radius); padding: 18px 20px; margin: 16px 0; }
.key { font-family: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 26px; font-weight: 800; letter-spacing: .05em; color: var(--accent); overflow-wrap: anywhere; }
.portal-box { margin-top: 18px; padding: 16px 18px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--accent); }
.portal-box p { margin: 0 0 12px; }
.big-ok { width: 52px; height: 52px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; font-size: 28px; font-weight: 800; margin-bottom: 12px; }

/* Robotcsapda: embernek nem látszik, a képernyőolvasó sem olvassa fel. */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* JavaScripttel a cégre vonatkozó mezők magánszemélynél eltűnnek (nélküle látszanak, "csak cégnél" felirattal). */
.signup.js .only-note { display: none; }
.signup.js.is-person .company-only { display: none; }

footer { text-align: center; color: var(--muted); font-size: 13px; padding: 0 16px 28px; }

@media (max-width: 640px) {
  main { padding: 18px 12px 32px; }
  .card { padding: 16px; }
  h1 { font-size: 22px; }
  .grid { grid-template-columns: 1fr; }
  .key { font-size: 20px; }
}