/* QR-DigitalCode — 2D Barcode Studio
   Tokens follow the sibling qr-code.io project so the two sites feel related. */

:root {
  --brand: #14a0ee;
  --brand-dark: #0d7fbf;
  --brand-light: #e8f6fe;
  --brand-ink: #063a5a;
  --ink: #10233a;
  --ink-soft: #4a5b6e;
  --ink-faint: #8593a5;
  --line: #e3e9ef;
  --line-strong: #cdd7e1;
  --bg: #ffffff;
  --bg-soft: #f6f9fc;
  --bg-alt: #eef4f9;
  --ok: #16a34a;
  --ok-soft: #e8f8ee;
  --warn: #b7791f;
  --warn-soft: #fff7e6;
  --danger: #e11d48;
  --danger-soft: #fdecf0;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 35, 58, .06), 0 4px 14px rgba(16, 35, 58, .06);
  --shadow-md: 0 12px 40px rgba(16, 35, 58, .12);
  --wrap: 1180px;
  --font: 'Poppins', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Consolas', 'SFMono-Regular', 'Menlo', 'Courier New', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 15px; }
img, canvas { max-width: 100%; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 700; }
h2 { font-size: clamp(1.25rem, 2.2vw, 1.7rem); font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: 10px 20px; border-radius: var(--radius); border: 1.5px solid transparent; font: inherit; font-weight: 600; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); text-decoration: none; }
.btn-outline { background: #fff; color: var(--brand-dark); border-color: var(--brand); }
.btn-outline:hover:not(:disabled) { background: var(--brand-light); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--brand-dark); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-soft); text-decoration: none; }
.btn-sm { padding: 7px 14px; font-size: .88rem; }
.btn-lg { padding: 13px 28px; font-size: 1.05rem; }
.link-sm { background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; color: var(--brand-dark); cursor: pointer; }
.link-sm:hover { text-decoration: underline; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; flex: none; display: block; }
.brand-accent { color: var(--brand); }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-size: 1rem; }
.logo-text small { font-size: .7rem; color: var(--ink-soft); letter-spacing: .04em; text-transform: uppercase; }
.main-nav { display: flex; gap: 22px; margin-left: auto; }
.main-nav a { color: var(--ink-soft); font-weight: 500; font-size: .92rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--ink); text-decoration: none; }
.main-nav a.is-active { color: var(--brand-dark); border-color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px; }
.lang-switch a, .lang-switch button { border: 0; background: transparent; padding: 4px 11px; border-radius: 999px; font: inherit; font-size: .8rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.lang-switch a { text-decoration: none; display: inline-block; }
.lang-switch a.is-active, .lang-switch button.is-active { background: var(--brand); color: #fff; }
.nav-toggle { display: none; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; flex-direction: column; justify-content: center; gap: 5px; align-items: center; cursor: pointer; }
.nav-toggle span { width: 18px; height: 2px; background: var(--ink); }

/* ---------- tab bar ---------- */
.tabbar { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 6px; overflow-x: auto; }
.tab { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 18px; border: 0; border-bottom: 3px solid transparent; background: transparent; font: inherit; font-weight: 600; font-size: .95rem; color: var(--ink-soft); cursor: pointer; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.is-active { color: var(--brand-dark); border-color: var(--brand); background: #fff; }
.tab-icon { font-size: 1.1rem; line-height: 1; }

/* ---------- hero ---------- */
.hero { background: radial-gradient(1200px 400px at 80% -10%, var(--brand-light), transparent 70%), linear-gradient(180deg, #fff, var(--bg-soft)); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center; padding: 52px 0 44px; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-dark); margin-bottom: 10px; }
.lead { font-size: 1.05rem; color: var(--ink-soft); max-width: 62ch; }
.badges { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: .82rem; font-weight: 500; color: var(--ink-soft); }
.badges li::before { content: '✓ '; color: var(--ok); font-weight: 700; }
.hero-art { display: flex; justify-content: center; }
.hero-art canvas { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); background: #fff; padding: 14px; }
.hero-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.hero-grid canvas { padding: 8px; box-shadow: var(--shadow-sm); }

/* ---------- generator layout ---------- */
.generator { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; padding: 36px 0; align-items: start; }
.generator.single { grid-template-columns: minmax(0, 1fr); }
.gen-steps { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.gen-preview { position: sticky; top: 84px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 24px; }
.step-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.step-head h2 { font-size: 1.15rem; margin: 0 0 2px; }
.step-head p { margin: 0; color: var(--ink-soft); font-size: .9rem; }
.step-no { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 500; font-size: .88rem; margin-bottom: 5px; }
.field input[type=text], .field input[type=number], .field input[type=email], .field select, textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); font: inherit; font-size: .95rem; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20, 160, 238, .18); }
.field input.is-invalid { border-color: var(--danger); }
.field input.is-valid { border-color: var(--ok); }
textarea { font-family: var(--mono); font-size: .92rem; line-height: 1.5; resize: vertical; }
.req { color: var(--danger); font-style: normal; }
.ai-tag { font-family: var(--mono); background: var(--brand-light); color: var(--brand-ink); padding: 1px 6px; border-radius: 4px; font-size: .82rem; }
.hint { font-size: .8rem; color: var(--ink-faint); margin: 5px 0 0; }
.hint.error { color: var(--danger); }
.hint.ok { color: var(--ok); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.input-row { display: flex; gap: 10px; }
.input-row select { flex: 0 0 auto; width: auto; min-width: 190px; }
.input-row input { flex: 1; }
.subgroup { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px; margin-bottom: 14px; }
.subgroup summary { cursor: pointer; font-weight: 600; font-size: .92rem; padding: 12px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
.subgroup summary::before { content: '▸'; color: var(--brand); transition: transform .15s; }
.subgroup[open] summary::before { transform: rotate(90deg); }
.subgroup[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.subgroup > *:last-child:not(summary) { margin-bottom: 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0; }

.attr-list { display: flex; flex-direction: column; gap: 10px; }
.attr-row { display: grid; grid-template-columns: 250px 110px 1fr auto; gap: 10px; align-items: start; }
.attr-row select, .attr-row input { width: 100%; padding: 9px 11px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); font: inherit; font-size: .9rem; }
.attr-row input.is-invalid { border-color: var(--danger); }
.attr-row .remove { width: 38px; height: 38px; border: 1px solid var(--line-strong); background: #fff; border-radius: var(--radius); cursor: pointer; color: var(--ink-soft); font-size: 1.1rem; }
.attr-row .remove:hover { color: var(--danger); border-color: var(--danger); }
.attr-row .hint { grid-column: 1 / -1; margin-top: -4px; }
.attr-empty { color: var(--ink-faint); font-size: .88rem; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 14px; }
.choice { display: flex; gap: 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); padding: 14px; cursor: pointer; background: #fff; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-light); }
.choice input { margin-top: 3px; accent-color: var(--brand); flex: none; }
.choice-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.choice-body strong { font-size: .95rem; }
.choice-body small { color: var(--ink-soft); font-size: .82rem; line-height: 1.45; }
.choice-eg { font-size: .76rem; background: #fff; border: 1px dashed var(--line-strong); border-radius: 4px; padding: 4px 6px; overflow-wrap: anywhere; }
.choice-grid.compact .choice { padding: 10px 12px; }

.note { font-size: .85rem; border-radius: var(--radius); padding: 10px 14px; margin: 14px 0 0; }
.note.warn { background: var(--warn-soft); color: #7a4f0e; }
.alert { border-radius: var(--radius); padding: 12px 14px; font-size: .88rem; margin: 12px 0; }
.alert.error { background: var(--danger-soft); color: #9f1239; }
.alert.ok { background: var(--ok-soft); color: #14532d; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

/* design panel */
.design-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.design-panel .dp-block { min-width: 0; }
.design-panel .dp-label { font-weight: 500; font-size: .88rem; margin-bottom: 6px; display: block; }
.tile-group { display: flex; gap: 8px; flex-wrap: wrap; }
.tile { border: 1.5px solid var(--line-strong); border-radius: var(--radius); padding: 6px; cursor: pointer; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 62px; }
.tile input { position: absolute; opacity: 0; pointer-events: none; }
.tile:has(input:checked) { border-color: var(--brand); background: var(--brand-light); }
.tile svg { width: 36px; height: 36px; }
.tile span { font-size: .72rem; color: var(--ink-soft); }
.color-row { display: flex; gap: 10px; align-items: center; }
.color-row label { display: flex; align-items: center; gap: 6px; font-size: .85rem; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 5px 10px 5px 6px; cursor: pointer; }
.color-row input[type=color] { width: 30px; height: 26px; border: 0; padding: 0; background: none; cursor: pointer; }
.dp-inline { display: flex; align-items: center; gap: 10px; }
.dp-inline input[type=range] { flex: 1; accent-color: var(--brand); }
.dp-inline select { padding: 8px 10px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); font: inherit; font-size: .9rem; }
.logo-ctl { display: flex; align-items: center; gap: 10px; }
.logo-ctl img { width: 38px; height: 38px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
input[type=range] { accent-color: var(--brand); }

/* preview */
.preview-card { padding: 18px; }
.preview-canvas-wrap { display: flex; justify-content: center; align-items: center; background: repeating-conic-gradient(#f3f6f9 0 25%, #fff 0 50%) 0 0 / 18px 18px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-height: 240px; }
.preview-canvas-wrap canvas { max-width: 100%; height: auto; max-height: 320px; image-rendering: pixelated; }
.preview-canvas-wrap.small { min-height: 180px; flex-direction: column; gap: 8px; }
.preview-canvas-wrap.small canvas { max-height: 200px; }
.preview-meta { margin-top: 14px; }
.meta-row { display: flex; justify-content: space-between; align-items: center; margin: 8px 0 4px; }
.meta-label { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); }
.payload { display: block; font-size: .78rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; overflow-wrap: anywhere; min-height: 34px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; }
.stats div { background: var(--bg-soft); border-radius: 6px; padding: 8px; text-align: center; }
.stats dt { font-size: .7rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .04em; }
.stats dd { margin: 0; font-weight: 600; font-size: .92rem; }
.dl-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }

/* bulk */
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--radius-lg); padding: 30px 20px; text-align: center; cursor: pointer; background: var(--bg-soft); transition: border-color .15s, background .15s; display: flex; flex-direction: column; gap: 4px; }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-light); }
.dropzone small { color: var(--ink-faint); }
.guide { margin-top: 18px; }
.guide h3 { font-size: .95rem; }
.guide ol { padding-left: 20px; margin: 0 0 12px; color: var(--ink-soft); font-size: .9rem; }
.guide ol li { margin-bottom: 4px; }
.cols-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.cols-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cols-table td:first-child { font-family: var(--mono); white-space: nowrap; color: var(--brand-ink); }
.summary { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 10px; }
.summary span { border-radius: 999px; padding: 5px 12px; font-size: .85rem; font-weight: 600; background: var(--bg-soft); }
.summary .s-ok { background: var(--ok-soft); color: #14532d; }
.summary .s-err { background: var(--danger-soft); color: #9f1239; }
.summary .s-dup { background: var(--warn-soft); color: #7a4f0e; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.data-table th, .data-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.data-table th { background: var(--bg-soft); font-weight: 600; position: sticky; top: 0; }
.data-table tr.row-err td { background: #fff5f7; }
.data-table tr.row-dup td { background: #fffaf0; }
.data-table .st-ok { color: var(--ok); font-weight: 600; }
.data-table .st-err { color: var(--danger); font-weight: 600; }
.data-table .st-dup { color: var(--warn); font-weight: 600; }
.design-row { align-items: start; }
.progress { height: 8px; background: var(--bg-alt); border-radius: 999px; overflow: hidden; margin: 8px 0; }
.progress div { height: 100%; width: 0; background: var(--brand); transition: width .15s; }

/* bulk data sources */
.source-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 14px; overflow-x: auto; }
.source-tab { border: 0; background: transparent; padding: 9px 14px; font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink-soft); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.source-tab:hover { color: var(--ink); }
.source-tab.is-active { color: var(--brand-dark); border-color: var(--brand); }
.source-panel .field { margin-bottom: 0; }
.data-table tr.row-warn td { background: #fffdf3; }
.data-table .st-warn { color: var(--warn); font-weight: 600; }
.summary .s-warn { background: var(--warn-soft); color: #7a4f0e; }

/* datamatrix */
.dm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.dm-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; box-shadow: var(--shadow-sm); }
.dm-card canvas { max-width: 100%; height: auto; image-rendering: pixelated; }
.dm-card .dm-hri { font-family: var(--mono); font-size: .78rem; text-align: center; overflow-wrap: anywhere; color: var(--ink); }
.dm-card .dm-idx { font-size: .72rem; color: var(--ink-faint); align-self: flex-start; }
.dm-card .dm-actions { display: flex; gap: 6px; }
.dm-card .dm-warn { font-size: .74rem; color: var(--warn); text-align: center; }
output { font-size: .85rem; font-weight: 600; margin-left: 8px; }

/* ---------- content sections ---------- */
.section { padding: 48px 0; }
.section.alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { text-align: center; margin-bottom: 10px; }
.section-lead { text-align: center; color: var(--ink-soft); max-width: 70ch; margin: 0 auto 28px; }
.prose { color: var(--ink-soft); max-width: 78ch; }
.prose p { margin-bottom: 1em; }
.prose strong { color: var(--ink); }
.prose ul { padding-left: 20px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.cards-3, .cards-4, .cards-5 { display: grid; gap: 16px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-5 { grid-template-columns: repeat(5, 1fr); }
.icard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.icard .ico { width: 42px; height: 42px; border-radius: 10px; background: var(--brand-light); color: var(--brand-dark); display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 12px; }
.icard h3 { font-size: 1rem; }
.icard p { font-size: .88rem; color: var(--ink-soft); margin: 0; }
.callout-wrap { background: linear-gradient(135deg, var(--brand-ink), #0d5f8f); color: #fff; }
.callout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; }
.callout h2 { color: #fff; }
.callout .prose { color: rgba(255, 255, 255, .85); }
.callout .prose strong { color: #fff; }
.callout .cmp-table { background: #fff; color: var(--ink); border-radius: var(--radius); overflow: hidden; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.cmp-table th, .cmp-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cmp-table th { background: var(--bg-soft); font-weight: 600; }
.cmp-table td:first-child { font-weight: 600; color: var(--ink); white-space: nowrap; }
.cmp-table.wide td:first-child { white-space: normal; }
.uri-anatomy { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 14px 16px; font-size: .86rem; overflow-wrap: anywhere; white-space: pre-wrap; margin: 0 0 12px; }
.u-scheme { color: #9fb3c8; }
.uri-anatomy .u-domain { color: #7dd3fc; }
.uri-anatomy .u-key { color: #fde68a; }
.uri-anatomy .u-qual { color: #86efac; }
.uri-anatomy .u-attr { color: #f9a8d4; }
.legend { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.legend li { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.legend .u-domain { background: #38bdf8; }
.legend .u-key { background: #fbbf24; }
.legend .u-qual { background: #4ade80; }
.legend .u-attr { background: #f472b6; }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0 auto 20px; max-width: 800px; display: grid; gap: 12px; }
.steps-list li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.steps-list li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; }
.steps-list strong { display: block; margin-bottom: 2px; }
.steps-list span { font-size: .88rem; color: var(--ink-soft); }

/* faq */
.faq { max-width: 860px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 12px; font-size: 1.4rem; color: var(--brand); font-weight: 400; }
.faq details[open] summary::after { content: '–'; }
.faq .faq-a { padding: 0 0 16px; color: var(--ink-soft); font-size: .93rem; }
.faq .faq-a p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); margin-top: 20px; }
.newsletter { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 36px 0; border-bottom: 1px solid var(--line); }
.newsletter h2 { margin-bottom: 4px; }
.newsletter p { margin: 0; color: var(--ink-soft); }
.news-form { display: flex; gap: 8px; }
.news-form input { padding: 10px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); font: inherit; min-width: 260px; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding: 36px 0; }
.footer-cols h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin-bottom: 12px; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin-bottom: 8px; font-size: .9rem; }
.footer-cols a { color: var(--ink-soft); }
.footer-about { font-size: .88rem; color: var(--ink-soft); margin-top: 12px; max-width: 34ch; }
.footer-bottom { padding: 16px 0 28px; font-size: .78rem; color: var(--ink-faint); border-top: 1px solid var(--line); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: .88rem; box-shadow: var(--shadow-md); z-index: 100; }

/* ---------- account & paid downloads ---------- */
.account-slot:empty { display: none; }
.acct-menu { position: relative; }
.acct-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: #fff; border-radius: 999px; padding: 3px 12px 3px 3px; font: inherit; font-size: .8rem; cursor: pointer; color: var(--ink-soft); max-width: 230px; }
.acct-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.acct-status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-drop { position: absolute; right: 0; top: calc(100% + 8px); width: 250px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 14px; display: flex; flex-direction: column; gap: 10px; z-index: 60; }
.acct-email { font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.acct-line { font-size: .82rem; color: var(--ink-soft); }
.acct-drop .link-sm { text-align: left; }
.pro-tag { font-size: .75em; color: var(--warn); margin-left: 2px; }
.btn-primary .pro-tag { color: #fde68a; }
.paid-hint { margin-top: 10px; }
.btn-block { width: 100%; }

.modal { position: fixed; inset: 0; background: rgba(16, 35, 58, .45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 90; }
.modal-card { position: relative; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 26px 24px 22px; }
.modal-card h2 { font-size: 1.25rem; margin-bottom: 8px; padding-right: 28px; }
.modal-close { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border: 0; background: transparent; font-size: 1.5rem; color: var(--ink-faint); cursor: pointer; border-radius: 50%; }
.modal-close:hover { background: var(--bg-soft); color: var(--ink); }
body.modal-open { overflow: hidden; }
.modal-note { color: var(--ink-soft); font-size: .9rem; }
.modal-note.warn { background: var(--warn-soft); color: #7a4f0e; padding: 10px 12px; border-radius: var(--radius); }
.mfield { display: block; margin-bottom: 12px; }
.mfield span { display: block; font-size: .85rem; font-weight: 500; margin-bottom: 4px; }
.mfield input { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); font: inherit; }
.mfield input:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(20, 160, 238, .18); }
.mcheck { margin: 4px 0 14px; font-size: .85rem; align-items: flex-start; }
.mcheck input { margin-top: 2px; }
.modal-msg { font-size: .85rem; border-radius: var(--radius); padding: 8px 12px; margin: 0 0 12px; }
.modal-msg.error { background: var(--danger-soft); color: #9f1239; }
.modal-msg.ok { background: var(--ok-soft); color: #14532d; }
.modal-dev { font-size: .8rem; background: #f1f5f9; border: 1px dashed var(--line-strong); padding: 8px 10px; border-radius: var(--radius); overflow-wrap: anywhere; }
.modal-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0; }
.plan-card { border: 1.5px solid var(--line-strong); border-radius: var(--radius); padding: 12px 10px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.plan-name { font-weight: 600; font-size: .9rem; }
.plan-price { font-weight: 700; font-size: 1.05rem; color: var(--brand-dark); }
.plan-usd, .plan-per { font-size: .75rem; color: var(--ink-faint); }
.plan-card .btn { margin-top: 6px; }
.pay-soon { background: var(--bg-soft); border-radius: var(--radius); padding: 10px 12px; font-size: .85rem; }
.pay-soon p { margin: 4px 0 0; color: var(--ink-soft); }
.dm-more { justify-content: center; text-align: center; background: repeating-linear-gradient(45deg, #f6f9fc, #f6f9fc 10px, #eef4f9 10px, #eef4f9 20px); border-style: dashed; min-height: 220px; }
.dm-more-n { font-size: 2rem; font-weight: 700; color: var(--brand-dark); }
.dm-more p { font-size: .85rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 520px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .acct-status { display: none; }
  .acct-chip { padding: 3px; }
}

/* ---------- pricing ---------- */
.hero-single { grid-template-columns: 1fr; text-align: center; }
.hero-single .lead { margin-inline: auto; }
.billing-toggle { display: flex; justify-content: center; gap: 4px; margin: 0 auto 24px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 999px; width: max-content; }
.billing-toggle button { border: 0; background: transparent; padding: 8px 20px; border-radius: 999px; font: inherit; font-weight: 600; font-size: .9rem; color: var(--ink-soft); cursor: pointer; }
.billing-toggle button.is-active { background: var(--brand); color: #fff; }
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); justify-content: center; gap: 22px; margin-bottom: 18px; }
.price-card { position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: 28px 24px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--brand); box-shadow: var(--shadow-md); }
.price-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; white-space: nowrap; }
.price-card h2 { font-size: 1.2rem; margin-bottom: 6px; }
.price { display: flex; align-items: baseline; gap: 6px; }
.price .amount { font-size: 2.4rem; font-weight: 700; color: var(--ink); }
.price .per { color: var(--ink-soft); }
.price-sub { color: var(--ink-soft); font-size: .88rem; min-height: 2.6em; }
.price-list { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.price-list li { padding: 6px 0 6px 24px; position: relative; font-size: .92rem; border-bottom: 1px solid var(--line); }
.price-list li::before { content: '✓'; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.plan-period { font-size: .8rem; color: var(--ink-faint); }

/* ---------- checkout modal ---------- */
.price-list.compact { margin: 6px 0 14px; }
.price-list.compact li { font-size: .85rem; padding: 4px 0 4px 22px; }
.plan-options { display: grid; gap: 8px; margin-bottom: 14px; }
.plan-option { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line-strong); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; }
.plan-option:has(input:checked) { border-color: var(--brand); background: var(--brand-light); }
.plan-option input { margin-top: 4px; accent-color: var(--brand); }
.plan-option-main { display: block; font-size: .92rem; }
.plan-option-sub { display: block; font-size: .78rem; color: var(--ok); font-weight: 600; }
.pay-area { min-height: 48px; margin-bottom: 8px; }
.pay-with { font-size: .8rem; color: var(--ink-faint); text-align: center; margin: 0 0 8px; }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.plan-alt { display: block; font-size: .78rem; color: var(--ink-faint); }
.pay-or { display: flex; align-items: center; gap: 10px; color: var(--ink-faint); font-size: .8rem; margin: 6px 0 10px; }
.pay-or::before, .pay-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.bank-box { border: 1.5px solid var(--line-strong); border-radius: var(--radius); padding: 0 12px; margin-bottom: 10px; font-size: .88rem; }
.bank-box summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
.bank-box[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.bank-box p { margin: 0 0 8px; }

/* ---------- legal pages ---------- */
.legal { max-width: 860px; }
.legal h1 { margin-bottom: 6px; }
.legal h2 { font-size: 1.15rem; margin-top: 28px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal-meta { font-size: .85rem; color: var(--ink-faint); }
.legal-note { font-size: .8rem; color: var(--ink-faint); margin-top: 28px; }
.legal .cmp-table { font-size: .84rem; margin: 10px 0 14px; }
mark.todo { background: #fde68a; color: #7a4f0e; padding: 0 4px; border-radius: 3px; }
.notfound { text-align: center; padding: 80px 0; }
.notfound h1 { font-size: 4rem; color: var(--brand); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .generator { grid-template-columns: 1fr; }
  .gen-preview { position: static; }
  .cards-5 { grid-template-columns: repeat(3, 1fr); }
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 66px; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; gap: 0; padding: 8px 16px 14px; }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .header-actions > .btn[data-contact] { display: none; }
  .hero-inner { grid-template-columns: 1fr; padding: 36px 0 30px; }
  .hero-art { display: none; }
  .two-col, .callout { grid-template-columns: 1fr; }
  .cards-3 { grid-template-columns: 1fr; }
  .cards-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .attr-row { grid-template-columns: 1fr 44px; }
  .attr-row select, .attr-row [data-custom] { grid-column: 1 / -1; }
  .design-panel { grid-template-columns: 1fr; }
  .newsletter { grid-template-columns: 1fr; }
  .news-form input { min-width: 0; flex: 1; }
  .input-row { flex-direction: column; }
  .input-row select { width: 100%; }
}
@media (max-width: 520px) {
  .cols-table td:first-child { white-space: normal; overflow-wrap: anywhere; }
  .tabs { gap: 0; }
  .tab { flex: 1 1 0; min-width: 0; padding: 12px 4px; font-size: .78rem; white-space: nowrap; }
  .tab-icon { display: none; }
  .card { padding: 16px; }
  .cards-4, .cards-5, .footer-cols { grid-template-columns: 1fr; }
  .dl-buttons { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr 1fr; }
}
@media print {
  .site-header, .tabbar, .site-footer, .gen-steps, .section { display: none; }
}

/* Free preview allowance used up */
canvas[hidden], .quota-lock[hidden], .quota-hint[hidden] { display: none !important; }
.quota-lock { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 20px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--bg-soft); max-width: 420px; margin: 0 auto; }
.quota-lock p { margin: 0; font-size: .92rem; }
.quota-lock-icon { font-size: 1.6rem; line-height: 1; }
.quota-lock-cta { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }
.quota-hint { font-size: .85rem; }

/* Independence notice shown on every page */
.independent-note { margin: 0; padding: 6px 16px; text-align: center; font-size: .8rem; color: var(--ink-soft); background: var(--bg-soft); border-bottom: 1px solid var(--line); }
