
:root {
  --bg: #ECEFEA; --surface: #FFFFFF; --surface-2: #F5F7F3; --ink: #141B18; --muted: #56615B; --line: #D3D9D1; --line-strong: #B9C1B7;
  --accent: #2741D3; --accent-ink: #FFFFFF; --accent-soft: #E2E6FB; --dot: #C7CEC4; --danger: #B3261E; --ok: #1B7A4B; --warn-bg: #FFF4D6; --warn-ink: #6B4B00;
  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif; --f-body: "Archivo", "Helvetica Neue", Arial, sans-serif; --f-mono: "Fragment Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0E1210; --surface: #161B18; --surface-2: #1C221F; --ink: #E4EAE6; --muted: #98A49D; --line: #2A322E; --line-strong: #3A443F;
  --accent: #8E9DFF; --accent-ink: #0E1210; --accent-soft: #232A4E; --dot: #29312D; --danger: #FF8A80; --ok: #6FD39E; --warn-bg: #3A3016; --warn-ink: #F5D98A; color-scheme: dark } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 14px; line-height: 1.5; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3 { margin: 0; text-wrap: balance; }
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 10px 20px; }
.mark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-stretch: 125%; font-weight: 800; font-size: 19px; letter-spacing: -0.01em; white-space: nowrap; color: var(--ink); text-decoration: none; }
.mark svg { width: 26px; height: 26px; flex: none; }
.tool-name { color: var(--muted); font-weight: 600; font-size: 14px; border-left: 1px solid var(--line-strong); padding-left: 14px; }
.top .links { margin-left: auto; display: flex; gap: 16px; font-size: 13.5px; }
.top .links a { color: var(--muted); white-space: nowrap; }
.wrap { display: grid; grid-template-columns: minmax(320px, 460px) minmax(0, 1fr); gap: 0; min-height: calc(100vh - 57px); }
.panel { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 22px 40px; }
.panel h1 { font-family: var(--f-display); font-stretch: 112%; font-weight: 800; font-size: 26px; letter-spacing: -0.015em; }
.lede { color: var(--muted); margin: 6px 0 14px; }
.fsec { padding-block: 16px; border-top: 1px solid var(--line); }
.fsec h2 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; margin-bottom: 12px; }
.types { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.types button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.types button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.fld { display: grid; gap: 5px; min-width: 0; }
.fld.wide { grid-column: 1 / -1; }
.fld > label, .fld-label { font-size: 12.5px; font-weight: 600; }
.fld input[type=text], .fld input[type=url], .fld input[type=email], .fld input[type=tel], .fld input[type=password], .fld select, .fld textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 7px; padding: 8px 10px; background: var(--surface); min-width: 0; }
.fld textarea { resize: vertical; min-height: 80px; }
.pw-row { display: flex; gap: 6px; }
.pw-row input { flex: 1; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--accent); }
.range { display: flex; align-items: center; gap: 10px; }
.range input { flex: 1; accent-color: var(--accent); min-width: 0; }
.range output { font-family: var(--f-mono); font-size: 12px; color: var(--muted); min-width: 3.2em; text-align: right; }
.note { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 8px 13px; font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn.quiet:hover { color: var(--ink); }
.btn.icon { padding: 5px 9px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.seg label { padding: 6px 11px; font-size: 13px; font-weight: 600; cursor: pointer; border-left: 1px solid var(--line); }
.seg label:first-child { border-left: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label.on, .seg label:has(input:checked) { background: var(--ink); color: var(--bg); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.colours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.cpick { display: flex; align-items: center; gap: 6px; }
.cpick input[type=color] { width: 38px; height: 34px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); cursor: pointer; }
.cpick .hex { width: 100%; max-width: 110px; font-family: var(--f-mono); font-size: 12.5px; border: 1px solid var(--line-strong); border-radius: 7px; padding: 7px 8px; background: var(--surface); text-transform: uppercase; }
.cpick .hex::placeholder { text-transform: none; font-family: var(--f-body); }
.fld .seg { justify-self: start; }
.hex[aria-invalid="true"] { border-color: var(--danger); color: var(--danger); }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.swatches button { width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--line-strong); padding: 3px; background: var(--surface); cursor: pointer; }
.swatches button span { display: block; width: 100%; height: 100%; border-radius: 4px; background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.logo-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.logo-row img { width: 40px; height: 40px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.dl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dl select { border: 1px solid var(--line-strong); border-radius: 7px; padding: 7px 8px; background: var(--surface); }
.status { min-height: 1.4em; font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.status.err { color: var(--danger); }
.stage { background-color: var(--bg); background-image: radial-gradient(var(--dot) 1px, transparent 1.2px); background-size: 18px 18px; padding: 28px 22px 40px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.preview { position: sticky; top: 80px; display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 520px; }
.frame { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; box-shadow: 0 1px 0 var(--line), 0 12px 30px -18px rgba(20, 27, 24, .35); width: 100%; }
#qr { display: block; width: 100%; height: auto; }
#qr svg { display: block; width: 100%; height: auto; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.facts { font-family: var(--f-mono); font-size: 12px; color: var(--muted); text-align: center; }
.checks { width: 100%; display: grid; gap: 6px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 8px 11px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.check.ok b { color: var(--ok); }
.check.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.check.err { color: var(--danger); border-color: var(--danger); }
.promise { width: 100%; font-size: 13px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.promise strong { color: var(--ink); }
.recent { width: 100%; }
.recent h2 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-weight: 700; margin: 6px 0 8px; }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.rcard { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.rcard:hover, .rcard:focus-within { border-color: var(--accent); }
.ropen { display: block; width: 100%; border: 0; background: none; padding: 0; cursor: pointer; text-align: left; }
.ropen svg { display: block; width: 100%; height: auto; }
.ropen span { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.rdel { position: absolute; top: 2px; right: 2px; opacity: 0; background: var(--surface); }
.rcard:hover .rdel, .rcard:focus-within .rdel { opacity: 1; }
@media (hover: none) { .rdel { opacity: 1; } }
.hint { position: absolute; z-index: 80; max-width: 260px; background: var(--ink); color: var(--bg); font-size: 12.5px; line-height: 1.4; font-weight: 500; padding: 7px 10px; border-radius: 7px; box-shadow: 0 8px 22px -8px rgba(20,27,24,.45); pointer-events: none; animation: hint-in .12s ease-out; }
.hint::after { content: ""; position: absolute; left: var(--ax, 50%); bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.hint.below::after { bottom: auto; top: -5px; }
@keyframes hint-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hint { animation: none; } }
@media (max-width: 860px) {
  .wrap { grid-template-columns: minmax(0, 1fr); }
  .stage { order: -1; padding: 16px; }
  .preview { position: static; max-width: 300px; }
  .frame { padding: 12px; }
  .facts { font-size: 11px; }
  .panel { border-right: 0; border-top: 1px solid var(--line); padding: 16px; }
  .tool-name { display: none; }
}

@media (max-width: 440px) { .top { gap: 10px; padding-left: 12px; padding-right: 12px; } .top .mark { font-size: 16px; gap: 8px; } .top .links .all { display: none; } .top .mark svg { width: 24px; height: 24px; } .top .links { gap: 10px; font-size: 13px; } }

a.mark { color: inherit; text-decoration: none; }
