/* Hallmark · shape: Conversational FAQ (draw 022d94) · genre: editorial · theme: Hedgerow (deal 2/3, seed batch-file-converter-tool-ec15·17329754·2026-12-01·r0) · redesign: full · job: try
 * hero: Banner as a workbench (owner asked to quiet the head: a one-line head and lead, the three stages as a strip, then input left and output right across the container; the how-to band shows above the fold) · nav: edge-aligned quiet bar (swap from floating pill, refused by editorial) · footer: colophon line · imagery: the product, live · signature: the batch log, each file a ruled row named in Prata, the converting row's rule filling in the blue signal · hedgerow: blue colourway by request (the owner's reference: pale blue paper, navy ink, one blue signal; Hedgerow's type, surfaces and controls kept)
 * axes: dark/high-contrast-serif/chromatic-blue · posture: drenched · modes: dark+light (light re-derived: deeper blue signal, the reading band inverts to navy; OS preference unless the nav toggle sets one) · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V4 · weakest: S, a converter page could be any utility; the queue is set as a still log (file names in Prata, the progress drawn as the row's own rule) so the batch itself is the page's object */
/* Hallmark · waive 39b · the dropzone is a drop target with role=button so the keyboard can open the file picker; its visible control, Explorar archivos, stands 48px · the dropzone takes dragged files, it is not a button */
/* Hallmark · dismissed 77 · redesign keeps the page it had: the converter, its how-to and its questions; adding sections would invent content the owner never gave */
/* Hallmark · dismissed F20 · the dropzone row is icon, title and button together with the hint set full width beneath; the two hidden file inputs are counted as items */
/* Hallmark · hero-review: fix · 5 findings · 1 resolved (mobile action above the fold), 1 partial (empty drop zone until the owner supplies a sample file), 2 kept by the brief (the 3-step flow is requirement 1; the headline is generated per format pair), 1 praise */
/* Hallmark · finish-review: subagent · fix · 6 findings · 6 resolved (mobile selects on two rows, sticky head beside the log, error rows in words not red, the format pair kept whole with the head sized to its column, mobile import and options rows, hero foot at the fold) · signature confirmed on a processing row · gap: none */
/* Hallmark · frontend-design pass (2026-12-01) · the live sample was later removed at the owner's request; the hero is one centred column with the tool on a raised paper step · the pair tip sits under the how-to head */
@import url("./tokens.css");
@import url("./base.css");

@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/manrope-latin.woff2") format("woff2"); }

/* Page tokens: overlays and control sizes */
:root {
  --color-scrim: oklch(14% 0.04 260 / 0.72);
  --control: 48px;
}

body { font-size: 1.0625rem; line-height: 1.6; color: var(--color-ink-2); }
h1, h2, h3, strong { color: var(--color-ink); }
strong { font-weight: 700; }
.muted { color: var(--color-muted); }
kbd {
  font: 500 var(--text-xs) var(--font-body);
  padding: 0 var(--space-2xs);
  border: var(--rule-hair) solid var(--color-muted);
  color: var(--color-ink);
}

/* ---------------------------------------------------------------- Controls */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: var(--control); padding: 0 var(--space-lg);
  border: 1.5px solid var(--color-accent); border-radius: var(--radius-pill);
  background: transparent; color: var(--color-accent);
  font: 700 var(--text-sm)/1 var(--font-body); white-space: nowrap; cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.btn:hover { background: color-mix(in oklab, var(--color-accent) 12%, transparent); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; }
.btn--primary, .btn--success { background: var(--color-accent); color: var(--color-accent-ink); }
.btn--primary:hover:not(:disabled), .btn--success:hover:not(:disabled) { background: var(--color-accent-2); border-color: var(--color-accent-2); }
.btn--quiet { border-color: var(--color-muted); color: var(--color-ink); }
.btn--quiet:hover { background: var(--color-paper-3); }
.btn--ghost { border-color: transparent; color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-accent); text-underline-offset: 0.2em; }
.btn--ghost:hover { background: transparent; text-decoration-thickness: 2px; }
.btn--sm { min-height: 44px; padding: 0 var(--space-md); }

.link-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0;
  border: 0; background: none; cursor: pointer;
  font: 500 var(--text-sm) var(--font-body); color: var(--color-ink);
  text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 1px; text-underline-offset: 0.3em;
  transition: color var(--dur-short) var(--ease-out);
}
.link-btn:hover { color: var(--color-accent-2); text-decoration-thickness: 2px; }
.link-btn:active { color: var(--color-accent); }
.link-btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.link-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.icon-btn {
  display: inline-grid; place-items: center; flex: none;
  width: var(--control); height: var(--control); padding: 0;
  border: var(--rule-hair) solid var(--color-muted); border-radius: 0;
  background: var(--color-paper-2); color: var(--color-ink);
  font: 400 1.375rem/1 var(--font-body); cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.icon-btn:hover { background: var(--color-paper-3); color: var(--color-accent-2); }
.icon-btn:active { background: var(--color-paper); }
.icon-btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.icon-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.icon-btn--sm { width: 44px; height: 44px; border-color: transparent; background: transparent; }

/* ---------------------------------------------------------------- Fields */

.field { display: grid; gap: var(--space-xs); min-width: 0; }
.field__label { font: 500 var(--text-sm) var(--font-body); color: var(--color-muted); }
.select, input[type="text"], input[type="url"], textarea {
  width: 100%; min-height: var(--control); padding: 0 var(--space-md);
  border: var(--rule-hair) solid var(--color-muted); border-radius: 0;
  background-color: var(--color-paper-2); color: var(--color-ink);
  font: 500 var(--text-md) var(--font-body);
  transition: border-color var(--dur-short) var(--ease-out);
}
.select {
  appearance: none; padding-right: var(--space-xl); cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-muted) 50%), linear-gradient(135deg, var(--color-muted) 50%, transparent 50%);
  background-size: 6px 6px; background-repeat: no-repeat;
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
}
.select:hover, input:hover, textarea:hover { border-color: var(--color-ink-2); }
.select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
.select:disabled, input:disabled, textarea:disabled { opacity: 0.55; cursor: not-allowed; }
textarea { padding: var(--space-sm) var(--space-md); font: 400 var(--text-sm)/1.6 var(--font-outlier); resize: vertical; }
::placeholder { color: var(--color-muted); }

.check { display: flex; align-items: center; gap: var(--space-sm); min-height: 32px; font-size: var(--text-md); color: var(--color-ink); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--color-accent); }
.check input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* ---------------------------------------------------------------- Hero: the converter */

/* Una sola columna centrada: título corto, pasos y la herramienta como pieza central */
.hero { padding-block: var(--space-lg) var(--section-gap-s); }
.hero__grid { display: grid; gap: var(--space-lg); max-width: 54rem; }

/* Cabecera: el título dice qué par se convierte, sin competir con la herramienta */
.hero__text { display: grid; justify-items: center; gap: var(--space-xs); text-align: center; }
.hero h1 { font-size: var(--text-section); line-height: 1.08; max-width: none; }
.hero .lead { color: var(--color-muted); font-size: var(--text-md); }

/* Los tres pasos: una tira fina; el paso en curso lleva la barra de acento encima */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.step { justify-content: center; text-align: center; }
.step {
  position: relative;
  display: flex; align-items: baseline; gap: var(--space-sm);
  padding-block: var(--space-sm); border-top: var(--rule-hair) solid var(--color-rule);
  color: var(--color-muted); font: 500 var(--text-sm) var(--font-body);
}
.step__num { font: var(--display-weight) var(--text-lg)/1 var(--font-display); }
.step.is-done { color: var(--color-ink-2); }
.step.is-active { color: var(--color-ink); }
.step.is-active::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 3px; border-radius: var(--radius-pill); background: var(--color-accent); }
.step.is-active .step__num { color: var(--color-accent); }

/* La herramienta: una superficie elevada (un paso de papel, sin sombra) con todo dentro */
.tool {
  display: grid; gap: var(--space-lg); min-width: 0;
  padding: var(--space-xl); background: var(--color-paper-3); border: var(--rule-hair) solid var(--color-rule);
}

.formats { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: end; gap: var(--space-sm); }
.formats__opts { margin-left: var(--space-xs); }

.options {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--space-lg);
  padding: var(--space-lg); background: var(--color-paper-2);
}
.options fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: var(--space-sm); align-content: start; min-width: 0; }
.options legend { padding: 0; margin-bottom: var(--space-sm); font: var(--display-weight) var(--text-xl)/1.2 var(--font-display); color: var(--color-ink); }
.options .select { background-color: var(--color-paper); }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-md); text-align: center;
  min-height: 17rem; padding: var(--space-xl) var(--space-lg);
  background: var(--color-paper-2); border: var(--rule-hair) dashed var(--color-muted);
  cursor: pointer; transition: border-color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}
.dropzone:hover, .dropzone.is-over { border-color: var(--color-accent); border-style: solid; }
.dropzone.is-over { background: var(--color-paper-3); }
.dropzone:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.dropzone__icon { color: var(--color-accent); width: 40px; height: 40px; }
.dropzone__title { font: var(--display-weight) var(--text-2xl)/1.1 var(--font-display); color: var(--color-ink); }
.dropzone__hint { max-width: 56ch; font-size: var(--text-sm); color: var(--color-muted); }
.dropzone--compact { min-height: 0; flex-direction: row; flex-wrap: wrap; padding: var(--space-lg); gap: var(--space-sm) var(--space-lg); }
.dropzone--compact .dropzone__icon { display: none; }
.dropzone--compact .dropzone__title { font-size: var(--text-xl); }
.dropzone--compact .dropzone__hint { flex-basis: 100%; }
.dropzone--compact #browse-btn { background: transparent; color: var(--color-accent); }
.dropzone--compact #browse-btn:hover { background: color-mix(in oklab, var(--color-accent) 12%, transparent); border-color: var(--color-accent); }

.actionbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-xs) var(--space-lg); }
.actionbar__group { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 var(--space-md); }
.actionbar__label { font: 500 var(--text-sm) var(--font-body); color: var(--color-muted); }
.actionbar__mode { width: 44px; height: 44px; border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-accent); }
.actionbar__mode:hover { background: color-mix(in oklab, var(--color-accent) 12%, transparent); color: var(--color-accent); }
.actionbar__mode:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

/* ---------------------------------------------------------------- The batch log */

.queue { margin-top: 0; }
.queue__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding-bottom: var(--space-sm); }
.queue__head p { display: flex; gap: var(--space-sm); align-items: baseline; }
#queue-count { font: var(--display-weight) var(--text-xl)/1.1 var(--font-display); }
.files { list-style: none; margin: 0; padding: 0; max-height: 32rem; overflow: auto; border-top: 1.5px solid var(--color-accent); }

.file {
  position: relative;
  display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) auto; align-items: center; gap: var(--space-md);
  padding-block: var(--space-md); border-bottom: var(--rule-hair) solid var(--color-rule);
}
.badge { align-self: start; padding-top: var(--space-2xs); font: 500 var(--text-sm) var(--font-body); color: var(--color-muted); }
.file__main { display: grid; gap: var(--space-2xs); min-width: 0; }
.file__name { font: var(--display-weight) 1.375rem/1.25 var(--font-display); color: var(--color-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file__meta { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); font: 500 var(--text-sm) var(--font-body); color: var(--color-muted); }
.file__status { color: var(--color-ink-2); }
.file[data-status="processing"] .file__status { color: var(--color-accent); }
.file[data-status="done"] .file__status { color: var(--color-success); }
.file[data-status="error"] .file__status { color: var(--color-ink); }
.file[data-status="error"] { border-bottom: var(--rule-hair) dashed var(--color-muted); }
.file__msg { font-size: var(--text-sm); }
.file__msg.is-error { color: var(--color-ink); }
.file__msg.is-warn { color: var(--color-ink-2); }
.file__actions { display: flex; align-items: center; gap: var(--space-xs); }
.file__actions .btn:not(.btn--ghost) { border-color: var(--color-muted); color: var(--color-ink); }
.file__actions .btn:not(.btn--ghost):hover { border-color: var(--color-ink-2); background: var(--color-paper-3); }

/* Progress is drawn as the row's own rule filling in */
.bar { height: 2px; background: var(--color-rule); overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--color-accent); }
.bar--thin { position: absolute; left: 0; right: 0; bottom: -1px; height: 1.5px; background: transparent; }

.total { display: flex; align-items: center; gap: var(--space-md); margin-top: var(--space-lg); font-size: var(--text-sm); }
.total .bar { flex: 1; }
.queue__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-lg); }

/* ---------------------------------------------------------------- Dialogs */

.modal {
  width: min(560px, 100% - var(--space-lg)); padding: 0; border: var(--rule-hair) solid var(--color-rule); border-radius: 0;
  background: var(--color-paper-2); color: var(--color-ink-2);
}
.modal--wide { width: min(880px, 100% - var(--space-lg)); }
.modal::backdrop { background: var(--color-scrim); }
.modal__body { display: grid; gap: var(--space-lg); padding: var(--space-xl); }
.modal__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-md); }
.modal__head h2 { font-size: var(--text-2xl); }
.modal__head p { margin-top: var(--space-2xs); font-size: var(--text-sm); }
.modal__row { display: grid; grid-template-columns: minmax(0, 1fr) 10rem; gap: var(--space-md); }
.modal__foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-sm); }
.modal .select, .modal input, .modal textarea { background-color: var(--color-paper); }

.preview {
  margin: 0; max-height: 60vh; overflow: auto; padding: var(--space-md);
  background: var(--color-paper); border: var(--rule-hair) solid var(--color-rule);
  font: 400 var(--text-sm)/1.6 var(--font-outlier); color: var(--color-ink); white-space: pre; tab-size: 4;
}

.cloud-block { display: grid; gap: var(--space-sm); padding-top: var(--space-md); border-top: var(--rule-hair) solid var(--color-rule); }
.cloud-block h3 { font-size: var(--text-xl); }
.cloud-block p { font-size: var(--text-sm); }
.cloud-block .btn { justify-self: start; }
.cloud-status { font-size: var(--text-sm); }
.cloud-status:empty { display: none; }
.cloud-status[data-type="error"] { color: var(--color-ink); padding: var(--space-sm) var(--space-md); border: var(--rule-hair) dashed var(--color-muted); }
.cloud-status[data-type="busy"] { color: var(--color-accent); }

/* ---------------------------------------------------------------- Toasts and drag */

.toasts { position: fixed; z-index: var(--z-toast); right: var(--space-md); bottom: var(--space-md); display: grid; gap: var(--space-xs); width: min(400px, 100% - var(--space-xl)); }
.toast {
  display: flex; align-items: flex-start; gap: var(--space-sm); padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-md);
  background: var(--color-paper-3); border: var(--rule-hair) solid var(--color-rule); color: var(--color-ink);
  font-size: var(--text-sm); animation: toast-in var(--dur-short) var(--ease-out);
}
.toast > span:nth-child(2) { flex: 1; }
.toast__icon { flex: none; width: 1.25em; font-weight: 700; text-align: center; color: var(--color-accent); }
.toast--success .toast__icon { color: var(--color-success); }
.toast--error .toast__icon, .toast--warn .toast__icon { color: var(--color-ink); }
.toast--error { border-color: var(--color-muted); border-style: dashed; }
.toast__close { flex: none; min-width: 32px; min-height: 32px; border: 0; background: none; color: var(--color-muted); cursor: pointer; font-size: var(--text-lg); line-height: 1; }
.toast__close:hover { color: var(--color-ink); }
.toast__close:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(4px); } }

.drag-overlay {
  position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; pointer-events: none;
  background: var(--color-scrim); outline: 2px dashed var(--color-accent); outline-offset: calc(-1 * var(--space-md));
}
.drag-overlay p { font: var(--display-weight) var(--text-2xl) var(--font-display); color: var(--color-ink); }

/* ---------------------------------------------------------------- Responsive */

@media (max-width: 60rem) {
  .hero { min-height: 0; padding-block: var(--space-xl) var(--space-2xl); }
  .tool { padding: var(--space-lg) var(--space-md); }
  .dropzone { min-height: 12rem; padding: var(--space-lg) var(--space-md); }
  .step { flex-direction: column; align-items: center; gap: var(--space-2xs); }
  .options { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 40rem) {
  .formats { grid-template-columns: minmax(0, 1fr) auto; row-gap: var(--space-md); }
  .formats > .field:first-child { grid-area: 1 / 1; }
  #swap-btn { grid-area: 1 / 2; }
  .formats > .field:nth-of-type(2) { grid-area: 2 / 1; }
  .formats__opts { grid-area: 2 / 2; justify-self: center; margin: 0; }
  .actionbar__label { flex-basis: 100%; }
  .file { grid-template-columns: minmax(0, 1fr) auto; }
  .badge { grid-column: 1 / -1; padding: 0; }
  .file__actions { grid-column: 1 / -1; justify-content: flex-end; }
  .queue__actions .btn { flex: 1; }
  .modal__row { grid-template-columns: minmax(0, 1fr); }
  .modal__body { padding: var(--space-lg); }
}

@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
  .btn, .link-btn, .icon-btn, .dropzone { transition: none; }
}
