/* ==========================================================================
   QR Code Generator — main stylesheet
   Light, professional SaaS look. No external fonts or assets.
   ========================================================================== */

:root {
  --ink: #0b1220;
  --body: #475467;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --bg: #f7f8fb;
  --card: #ffffff;
  --brand: #4338ca;
  --brand-hover: #3730a3;
  --brand-soft: #eef2ff;
  --brand-ring: rgba(67, 56, 202, 0.22);
  --success: #067647;
  --success-soft: #ecfdf3;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --warning: #b54708;
  --warning-soft: #fffaeb;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 12px 28px -12px rgba(16, 24, 40, 0.14);
  --shadow-lg: 0 24px 48px -24px rgba(16, 24, 40, 0.28);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

/* Author display rules would otherwise beat the hidden attribute. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 82px; }

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

img, svg, canvas { max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 { font-size: clamp(1.9rem, 1.2rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-hover); }

ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

:focus-visible {
  outline: 3px solid var(--brand-ring);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}
.container--narrow { max-width: 820px; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  font-size: 1.02rem;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--brand);
  display: grid;
  place-items: center;
  flex: none;
}
.brand-mark svg { width: 20px; height: 20px; color: #fff; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--body);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
}
.nav a:hover { background: var(--brand-soft); color: var(--brand-hover); }
.nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 6px);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 8px;
    box-shadow: var(--shadow-lg);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 11px 12px; font-size: 1rem; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 56px 0 8px;
  text-align: center;
  background:
    radial-gradient(900px 380px at 50% -160px, #e6e9ff 0%, rgba(230, 233, 255, 0) 70%),
    linear-gradient(180deg, #fbfbfe 0%, var(--bg) 100%);
}
.hero h1 { margin-bottom: 14px; }
.hero .lede {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  color: var(--body);
  max-width: 660px;
  margin: 0 auto 18px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.eyebrow svg { width: 14px; height: 14px; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: 0 0 34px;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  color: var(--muted);
}
.trust-row li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.trust-row svg { width: 15px; height: 15px; color: var(--success); }

@media (max-width: 640px) {
  .hero { padding: 30px 0 4px; }
  .eyebrow { font-size: 0.72rem; padding: 5px 12px; margin-bottom: 14px; }
  .trust-row { gap: 6px 14px; font-size: 0.82rem; margin-bottom: 24px; }
  .section { padding: 44px 0; }
  .section--tight { padding: 28px 0; }
  .card-pad { padding: 18px; }
  .preview-card { padding: 16px; }
}

/* --------------------------------------------------------------------------
   Cards & generic blocks
   -------------------------------------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 24px; }

.section { padding: 64px 0; }
.section--tight { padding: 44px 0; }
.section-head { max-width: 680px; margin: 0 auto 36px; text-align: center; }
.section-head p { color: var(--body); margin: 0; }
.section--alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* --------------------------------------------------------------------------
   Generator layout
   -------------------------------------------------------------------------- */

.generator {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 26px;
  align-items: start;
  padding-bottom: 20px;
}
@media (max-width: 940px) {
  .generator { grid-template-columns: minmax(0, 1fr); }
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.panel-head h2 { font-size: 1.1rem; margin: 0; }
@media (max-width: 480px) {
  .panel-head .hint { display: none; }
  .type-tab { padding: 10px 4px; font-size: 0.72rem; }
}
.panel-head .hint { font-size: 0.82rem; color: var(--muted); }

/* Type tabs */
.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 8px;
  margin-bottom: 22px;
  padding: 0;
  list-style: none;
}
.type-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 11px 6px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--body);
  text-align: center;
  line-height: 1.25;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.type-tab svg { width: 20px; height: 20px; color: var(--muted); }
.type-tab:hover { border-color: var(--line-strong); background: #fbfbfd; }
.type-tab[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-hover);
  box-shadow: 0 0 0 1px var(--brand) inset;
}
.type-tab[aria-pressed="true"] svg { color: var(--brand); }

/* Forms */
.form-grid { display: grid; gap: 16px; }
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.field .req { color: var(--danger); font-weight: 700; }
.field .sub { font-size: 0.8rem; color: var(--muted); font-weight: 400; }

input[type="text"],
input[type="url"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
textarea,
select {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  min-height: 46px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #98a2b3; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.14);
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 38px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.9rem;
  color: var(--body);
  cursor: pointer;
}
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }

.field-error {
  font-size: 0.82rem;
  color: var(--danger);
  display: none;
  align-items: center;
  gap: 6px;
}
.field-error.is-visible { display: flex; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  padding: 12px 18px;
  min-height: 46px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
  line-height: 1.2;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12); }
.btn--primary:hover { background: var(--brand-hover); color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: #fbfbfd; border-color: #b9c0cc; color: var(--ink); }
.btn--block { width: 100%; }
.btn--lg { min-height: 52px; font-size: 1rem; padding: 14px 22px; }
.btn--sm { min-height: 38px; padding: 8px 12px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.generate-row { margin-top: 20px; display: grid; gap: 10px; }
.generate-note { font-size: 0.8rem; color: var(--muted); text-align: center; margin: 0; }

/* Status messages */
.status {
  display: none;
  gap: 9px;
  align-items: flex-start;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  margin-top: 14px;
  line-height: 1.5;
}
.status svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }
.status.is-visible { display: flex; }
.status--success { background: var(--success-soft); color: var(--success); border: 1px solid #abefc6; }
.status--error { background: var(--danger-soft); color: var(--danger); border: 1px solid #fecdca; }
.status--info { background: var(--brand-soft); color: var(--brand-hover); border: 1px solid #c7d2fe; }
.status--warn { background: var(--warning-soft); color: var(--warning); border: 1px solid #fedf89; }

/* --------------------------------------------------------------------------
   Preview
   -------------------------------------------------------------------------- */

.preview-panel { display: grid; gap: 20px; }
@media (min-width: 941px) {
  .preview-panel { position: sticky; top: 86px; }
}

/* Customisation sits full width beneath both columns, outside the grid so the
   sticky preview can never overlap it. */
.customise { margin-top: 26px; }
.customise .body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px 28px;
  align-items: start;
}
.customise .body > .control:last-of-type,
.customise .body > button { grid-column: 1 / -1; }

.preview-card { text-align: center; padding: 22px; }
.preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #f6f7fb;
  border: 1px solid var(--line);
  min-height: 240px;
}
#qr-canvas {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 20px -8px rgba(16, 24, 40, 0.28);
}
.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  justify-content: center;
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--muted);
}
.preview-meta span {
  background: #f2f4f7;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.preview-empty { color: var(--muted); font-size: 0.9rem; }

.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.download-grid .btn { width: 100%; }
.download-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.download-grid .btn, .download-row .btn { white-space: nowrap; font-size: 0.9rem; }
@media (max-width: 400px) {
  .download-grid .btn, .download-row .btn { font-size: 0.84rem; padding: 10px 8px; gap: 6px; }
  .download-grid .btn svg, .download-row .btn svg { width: 15px; height: 15px; }
}
.filename-field { margin-top: 16px; text-align: left; }

/* Customisation */
.customise summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  padding: 18px 22px;
  list-style: none;
}
.customise summary::-webkit-details-marker { display: none; }
.customise summary .chev { transition: transform 0.18s ease; width: 18px; height: 18px; color: var(--muted); }
.customise[open] summary .chev { transform: rotate(180deg); }
.customise .body { padding: 0 22px 22px; display: grid; gap: 18px; }
.customise[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 18px; }

.control { display: grid; gap: 7px; }
.control > .control-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.control > .control-label .val { font-weight: 500; color: var(--muted); font-family: var(--mono); font-size: 0.78rem; }

.color-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.color-input {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  background: #fff;
}
.color-input input[type="color"] {
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 7px;
  flex: none;
}
.color-input input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-input input[type="color"]::-webkit-color-swatch { border: 1px solid var(--line); border-radius: 6px; }
.color-input input[type="text"] {
  border: none;
  padding: 0;
  min-height: 30px;
  font-family: var(--mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  background: transparent;
}
.color-input input[type="text"]:focus { box-shadow: none; }

.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.preset {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line-strong);
  cursor: pointer;
  padding: 0;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.15s ease, transform 0.1s ease;
}
.preset:hover { transform: translateY(-1px); box-shadow: 0 0 0 2px var(--brand); }
.preset[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--brand); }
.preset span { position: absolute; inset: 0; display: grid; place-items: center; }
.preset span::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: currentColor;
}
.preset i {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c2, #fff);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: #f2f4f7;
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
}
.seg button {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--body);
  background: transparent;
  border: none;
  border-radius: 7px;
  padding: 7px 4px;
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }

.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--brand); }
.range-row output { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); min-width: 34px; text-align: right; }

.logo-drop {
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  background: #fcfcfd;
  font-size: 0.84rem;
  color: var(--muted);
}
.logo-drop.has-logo { border-style: solid; border-color: #abefc6; background: var(--success-soft); color: var(--success); }
.logo-actions { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.logo-preview {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  margin: 0 auto 8px;
  display: none;
}
.logo-drop.has-logo .logo-preview { display: block; }
.note {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.note--warn { color: var(--warning); }

/* --------------------------------------------------------------------------
   Content sections
   -------------------------------------------------------------------------- */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.step { padding: 24px; }
.step .num {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.step h3 { font-size: 1rem; margin-bottom: 6px; }
.step p { margin: 0; font-size: 0.92rem; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.feature { padding: 22px; }
.feature .ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.feature .ico svg { width: 19px; height: 19px; }
.feature h3 { font-size: 1rem; margin-bottom: 6px; }
.feature p { margin: 0; font-size: 0.91rem; }

.link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.link-card {
  display: block;
  padding: 20px;
  text-decoration: none;
  color: var(--body);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.link-card:hover {
  border-color: #c7d2fe;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  color: var(--body);
}
.link-card strong { display: block; color: var(--ink); margin-bottom: 4px; font-size: 0.98rem; }
.link-card span { font-size: 0.88rem; }

/* FAQ */
.faq-list { display: grid; gap: 10px; max-width: 820px; margin: 0 auto; }
.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.97rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1;
  flex: none;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { border-bottom: 1px solid var(--line); }
.faq-item .answer { padding: 16px 20px; font-size: 0.93rem; }
.faq-item .answer > :last-child { margin-bottom: 0; }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, #312e81 0%, #4338ca 55%, #4f46e5 100%);
  color: #e0e7ff;
  border-radius: var(--radius);
  padding: 44px 32px;
  text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: #c7d2fe; max-width: 560px; margin: 0 auto 22px; }
.cta-band .btn--ghost { background: #fff; border-color: #fff; color: var(--brand-hover); }
.cta-band .btn--ghost:hover { background: #eef2ff; }

/* Ad placeholder — never rendered until AdSense is enabled */
.ad-slot {
  display: none;
  margin: 40px auto;
  max-width: 970px;
  min-height: 90px;
  text-align: center;
}
.ad-slot.is-active { display: block; }

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

.page-hero {
  padding: 48px 0 32px;
  background: linear-gradient(180deg, #fbfbfe 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { margin-bottom: 10px; }
.page-hero p { margin: 0; font-size: 1.02rem; max-width: 700px; }

.breadcrumb { font-size: 0.83rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.breadcrumb li { display: flex; align-items: center; gap: 6px; margin: 0; }
.breadcrumb li + li::before { content: "/"; color: #c3c9d4; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); text-decoration: underline; }

.prose { padding: 44px 0 64px; }
.prose .card-pad { padding: 34px; }
.prose h2 { margin-top: 1.8em; font-size: 1.42rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.5em; font-size: 1.1rem; }
.prose p, .prose li { font-size: 1rem; color: var(--body); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose > .card-pad > :last-child { margin-bottom: 0; }
.prose .card-pad > h2:first-of-type,
.prose .card-pad > .faq-list:first-of-type + h2 { margin-top: 1.4em; }
.prose .card-pad > h2:first-child { margin-top: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.callout {
  border-left: 3px solid var(--brand);
  background: var(--brand-soft);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 1.4em 0;
  font-size: 0.94rem;
}
.callout > :last-child { margin-bottom: 0; }
.callout--warn { border-color: var(--warning); background: var(--warning-soft); }

.table-wrap { overflow-x: auto; margin: 1.4em 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f9fafb; color: var(--ink); font-weight: 600; font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.03em; }

.toc {
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 28px;
}
.toc h2 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 1.2em; font-size: 0.92rem; }
.toc li { margin-bottom: 4px; }

.updated { font-size: 0.84rem; color: var(--muted); margin-bottom: 24px; }

.article-list { display: grid; gap: 14px; }
.article-item {
  display: block;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.article-item:hover { border-color: #c7d2fe; box-shadow: var(--shadow); }
.article-item h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--ink); }
.article-item p { margin: 0; font-size: 0.92rem; color: var(--body); }
.article-item .meta { font-size: 0.78rem; color: var(--muted); margin-top: 8px; }

.related {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.related h2 { font-size: 1.1rem; margin-bottom: 14px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: #0b1220;
  color: #98a2b3;
  padding: 52px 0 28px;
  margin-top: 0;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: #fff; }
.site-footer .brand-mark { background: #4338ca; }
.footer-about { margin-top: 14px; max-width: 320px; line-height: 1.6; }
.footer-col h4 {
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0 0 12px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #98a2b3; text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  align-items: center;
  padding-top: 22px;
  font-size: 0.82rem;
  color: #667085;
}
.footer-bottom .build { font-family: var(--mono); font-size: 0.75rem; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-bottom a { color: #98a2b3; text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Offline page
   -------------------------------------------------------------------------- */

.offline-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  text-align: center;
}
.offline-wrap .card { max-width: 460px; padding: 36px; }

/* --------------------------------------------------------------------------
   Utility
   -------------------------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.hide { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   Print — only the QR code
   -------------------------------------------------------------------------- */

@media print {
  body { background: #fff; }
  .site-header, .site-footer, .hero, .section, .page-hero, .skip-link,
  .preview-panel .download-grid, .customise, .status, .breadcrumb { display: none !important; }
  #print-area { display: block !important; }
  #print-area img { max-width: 100%; }
}
#print-area { display: none; }
