/* qr.antw2ne.uk — light, neutral, one accent colour */

:root {
  --bg:            #ffffff;
  --surface:       #f7f8fa;
  --surface-2:     #eef0f4;
  --border:        #e2e5ea;
  --border-strong: #cfd4dc;
  --text:          #14171c;
  --text-muted:    #656d7a;
  --accent:        #4f46e5;
  --accent-hover:  #4338ca;
  --accent-soft:   #eef2ff;
  --danger:        #b42318;
  --radius:        10px;
  --radius-lg:     14px;
  --shadow-sm:     0 1px 2px rgba(16,24,40,.05);
  --shadow-md:     0 4px 16px rgba(16,24,40,.07);
  --wrap:          1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Our display:flex rules would otherwise beat the browser's [hidden] rule. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky; top: 0; z-index: 20;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand { display: flex; align-items: baseline; gap: 9px; text-decoration: none; color: var(--text); }
.brand-mark {
  font-weight: 700; font-size: 19px; letter-spacing: -0.03em;
  background: var(--text); color: #fff; border-radius: 7px;
  padding: 3px 8px; line-height: 1.25;
}
.brand-domain { font-size: 13.5px; color: var(--text-muted); letter-spacing: -0.01em; }

.lang-toggle {
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .02em;
  color: var(--text-muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 13px; cursor: pointer;
}
.lang-toggle:hover { background: var(--surface-2); color: var(--text); }

/* ---------- hero ---------- */

.hero { padding: 48px 0 28px; text-align: center; }
.hero h1 { font-size: clamp(28px, 4.4vw, 40px); font-weight: 700; }
.lede {
  margin: 0 auto; max-width: 60ch;
  font-size: 17px; color: var(--text-muted);
}
@media (max-width: 600px) {
  .hero { padding: 26px 0 18px; }
  .lede { font-size: 15.5px; }
}

/* ---------- ad slots ---------- */

.ad-slot { margin: 28px 0; text-align: center; }
.ad-slot:empty { display: none; }
.ad-slot::before {
  content: "Advertisement";
  display: block; margin-bottom: 6px;
  font-size: 10px; letter-spacing: .09em; text-transform: uppercase;
  color: #a0a6b0;
}

/* ---------- tool layout ---------- */

.tool {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 22px;
  align-items: start;
  margin-top: 8px;
}
@media (max-width: 860px) {
  .tool { grid-template-columns: 1fr; }
}

.panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.panel-form { overflow: hidden; }
.panel-preview { padding: 22px; position: sticky; top: 84px; }
@media (max-width: 860px) { .panel-preview { position: static; } }

/* ---------- tabs ---------- */

.tabs {
  display: flex; gap: 2px; overflow-x: auto;
  padding: 6px 6px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  font: inherit; font-size: 14px; font-weight: 500;
  white-space: nowrap;
  color: var(--text-muted); background: transparent;
  border: 1px solid transparent; border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 9px 15px; cursor: pointer;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.is-active {
  color: var(--text); font-weight: 600;
  background: var(--bg);
  border-color: var(--border);
}

/* ---------- fields ---------- */

.panes { padding: 20px 20px 4px; }
.pane { display: none; }
.pane.is-active { display: block; }

.field { display: block; margin-bottom: 14px; }
.field-label {
  display: block; margin-bottom: 6px;
  font-size: 13px; font-weight: 600; color: var(--text);
}
input[type=text], input[type=url], input[type=email], input[type=tel], textarea, select {
  width: 100%;
  font: inherit; font-size: 15px; color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
}
textarea { resize: vertical; min-height: 76px; }
select { cursor: pointer; }
input:focus-visible, textarea:focus-visible, select:focus-visible,
button:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input::placeholder, textarea::placeholder { color: #a2a8b3; }

#in-url { font-size: 16px; padding: 12px 14px; }

.field-help {
  margin: 2px 0 14px;
  font-size: 13px; color: var(--text-muted);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-2 .field-wide { grid-column: 1 / -1; }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }

.field-check {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; align-self: center; margin-top: 4px;
}
.field-check input { width: auto; accent-color: var(--accent); }

/* ---------- options ---------- */

.options { border-top: 1px solid var(--border); }
.options > summary {
  padding: 14px 20px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--text-muted);
  list-style: none;
}
.options > summary::-webkit-details-marker { display: none; }
.options > summary::before {
  content: "+"; display: inline-block; width: 16px;
  font-weight: 400; color: var(--accent);
}
.options[open] > summary { color: var(--text); }
.options[open] > summary::before { content: "\2013"; }
.options-body { padding: 2px 20px 20px; }

.opt-row {
  display: grid; grid-template-columns: 132px 1fr;
  gap: 12px; align-items: center;
  padding: 9px 0;
}
@media (max-width: 520px) { .opt-row { grid-template-columns: 1fr; gap: 6px; } }
.opt-label { font-size: 13px; font-weight: 600; }
.opt-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.opt-controls select { width: auto; min-width: 190px; font-size: 14px; padding: 7px 10px; }
.opt-note { font-size: 12.5px; color: var(--text-muted); }

.color-field { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
input[type=color] {
  width: 34px; height: 30px; padding: 2px;
  border: 1px solid var(--border-strong); border-radius: 7px;
  background: var(--bg); cursor: pointer;
}

.swatches { display: flex; gap: 6px; margin-left: auto; }
.swatch {
  width: 24px; height: 24px; padding: 0; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 6px;
  background: linear-gradient(135deg, var(--s) 0 50%, var(--s2, #fff) 50% 100%);
}
.swatch:hover { transform: scale(1.1); }

input[type=range] { accent-color: var(--accent); max-width: 190px; }
#opt-margin-out { font-size: 13px; color: var(--text-muted); min-width: 12px; }
.logo-size { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }

.opt-warn {
  margin: 10px 0 0; padding: 10px 12px;
  font-size: 13px; color: #7a4b00;
  background: #fff8eb; border: 1px solid #fde5b0; border-radius: var(--radius);
}

/* ---------- preview ---------- */

.qr-stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
#qr-canvas {
  display: none;
  width: 100%; height: 100%;
  image-rendering: pixelated;
}
#qr-canvas.is-ready { display: block; }
.qr-placeholder {
  margin: 0; padding: 20px; text-align: center;
  font-size: 14px; color: #9aa1ac;
}
.qr-placeholder.is-hidden { display: none; }

.qr-error {
  margin: 12px 0 0; padding: 10px 12px;
  font-size: 13px; color: var(--danger);
  background: #fef3f2; border: 1px solid #fecdc9; border-radius: var(--radius);
}

.dl-row { display: flex; gap: 8px; margin-top: 16px; }
.preview-note { margin: 12px 0 0; font-size: 12.5px; color: var(--text-muted); text-align: center; }

/* ---------- buttons ---------- */

.btn {
  font: inherit; font-size: 14px; font-weight: 600;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 10px 14px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.btn:hover:not(:disabled) { background: var(--surface); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  flex: 1;
  color: #fff; background: var(--accent); border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { border-color: transparent; color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { background: var(--surface); color: var(--text); }
.btn-small { font-size: 13px; padding: 7px 12px; }

/* ---------- content ---------- */

.content { padding: 56px 20px 24px; max-width: 780px; }
.content h2 { font-size: 22px; margin-top: 40px; }
.content h2:first-child { margin-top: 0; }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 8px; }
.steps li {
  counter-increment: s;
  position: relative; padding-left: 44px; margin-bottom: 18px;
}
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  color: var(--accent); background: var(--accent-soft);
}
.steps strong { display: block; font-size: 15px; }
.steps span { font-size: 14.5px; color: var(--text-muted); }

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 4px 0;
}
.faq summary {
  padding: 12px 0; cursor: pointer;
  font-size: 15px; font-weight: 600;
}
.faq p { margin: 0 0 14px; font-size: 14.5px; color: var(--text-muted); }

/* ---------- legal pages ---------- */

.legal { max-width: 720px; padding: 48px 20px 24px; }
.legal h1 { font-size: 30px; }
.legal h2 { font-size: 19px; margin-top: 32px; }
.legal p, .legal li { font-size: 15px; color: #3d434d; }
.legal ul { padding-left: 20px; }
.legal .updated { font-size: 13px; color: var(--text-muted); }

/* ---------- footer ---------- */

.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  padding-top: 22px; padding-bottom: 22px;
  font-size: 13.5px; color: var(--text-muted);
}
.footer-brand { margin: 0; }
.footer-brand a { color: var(--text-muted); text-decoration: none; }
.footer-brand a:hover { color: var(--accent); }
.footer-nav { display: flex; gap: 18px; }
.footer-nav a { color: var(--text-muted); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); }

/* ---------- consent ---------- */

.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.consent p { margin: 0; font-size: 13px; color: var(--text-muted); flex: 1 1 260px; }
.consent-actions { display: flex; gap: 8px; margin-left: auto; }

@media (prefers-reduced-motion: no-preference) {
  .swatch { transition: transform .12s ease; }
  .btn, .tab, .lang-toggle { transition: background-color .12s ease, color .12s ease, border-color .12s ease; }
}
