:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --panel-soft: #f0f4f8;
  --ink: #101312;
  --muted: #66707a;
  --line: #d9e0e8;
  --line-strong: #bdc8d3;
  --dark: #101312;
  --accent: #c8ff3d;
  --orange: #ff6b3a;
  --blue: #315bff;
  --danger: #b64030;
  --shadow: 0 24px 70px rgba(20, 31, 44, 0.11);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--bg);
  text-rendering: geometricPrecision;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

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

svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px max(18px, calc((100vw - 1180px) / 2));
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--accent);
  border-radius: var(--radius);
}

.brand-mark span {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  width: 22px;
  height: 22px;
}

.brand-mark span::before,
.brand-mark span::after {
  content: "";
  border-radius: 4px;
}

.brand-mark span::before {
  background: var(--dark);
}

.brand-mark span::after {
  background: var(--orange);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.05;
}

.brand strong {
  font-size: 0.98rem;
}

.brand small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.topnav a {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--ink);
  background: var(--panel-soft);
  border-color: var(--line);
  outline: 0;
}

main,
.footer {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding-inline: 18px;
}

main {
  min-height: 100vh;
}

.app-shell {
  display: grid;
  gap: 18px;
  padding-block: 24px 0;
}

.studio-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  display: grid;
  align-content: center;
  min-height: 300px;
  padding: 42px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.trust-panel {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 28px;
  color: #ffffff;
  background: var(--dark);
}

.trust-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.trust-panel strong {
  font-size: 2rem;
  line-height: 1.05;
}

.trust-panel dl {
  display: grid;
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
}

.trust-panel dl div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.trust-panel dt,
.trust-panel dd {
  margin: 0;
  font-size: 0.84rem;
}

.trust-panel dt {
  color: rgba(255, 255, 255, 0.58);
}

.trust-panel dd {
  font-weight: 900;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  gap: 1px;
}

.stats-row div {
  min-width: 0;
  padding: 16px 18px;
  background: var(--panel);
}

.stats-row span,
.section-heading span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.stats-row strong {
  display: block;
  margin-top: 6px;
  font-size: 1.8rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.workbench-head,
.control-panel,
.drop-zone,
.results-panel {
  min-width: 0;
}

.control-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px;
  background: #f8fafc;
  border-right: 1px solid var(--line);
}

.workbench-head {
  display: grid;
  gap: 14px;
}

.workbench-head h2,
.section-heading h2 {
  margin: 0;
  font-size: 1.35rem;
}

.status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.status-chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 9px;
  color: var(--ink);
  background: #edf2f7;
  border: 1px solid #d7e0e9;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.status-chips svg {
  width: 14px;
  height: 14px;
}

.control-group {
  display: grid;
  gap: 9px;
}

.control-group span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.control-group strong {
  color: var(--ink);
}

.control-group output,
.control-group small {
  color: var(--ink);
  font-weight: 900;
}

.dimension-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--dark);
}

input[type="number"],
select {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: 0;
}

input[type="number"]:focus,
select:focus {
  border-color: var(--dark);
  box-shadow: 0 0 0 3px rgba(16, 19, 18, 0.12);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  margin-top: 2px;
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-weight: 950;
  white-space: nowrap;
}

.primary-button {
  color: #ffffff;
  background: var(--dark);
}

.primary-button:hover:not(:disabled),
.primary-button:focus-visible:not(:disabled) {
  background: #2b302d;
  outline: 0;
}

.secondary-button,
.ghost-button {
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line-strong);
}

.secondary-button:hover,
.secondary-button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: var(--dark);
  box-shadow: 0 0 0 3px rgba(16, 19, 18, 0.1);
  outline: 0;
}

.compact {
  min-height: 36px;
  padding: 0 10px;
  font-size: 0.88rem;
}

.drop-zone {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 520px;
  gap: 18px;
  padding: 44px;
  text-align: center;
  background: #ffffff;
  outline: 0;
}

.drop-zone::before {
  position: absolute;
  inset: 18px;
  content: "";
  pointer-events: none;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.drop-zone.is-dragging {
  background: #f5fbdf;
}

.drop-zone:focus-visible {
  box-shadow: inset 0 0 0 3px rgba(16, 19, 18, 0.22);
}

.drop-zone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.drop-visual {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  color: var(--accent);
  background: var(--dark);
  border-radius: var(--radius);
}

.drop-visual svg {
  width: 44px;
  height: 44px;
}

.drop-visual span {
  position: absolute;
  right: 13px;
  bottom: 13px;
  width: 38px;
  height: 8px;
  background: linear-gradient(90deg, var(--accent), var(--orange));
  border-radius: 999px;
}

.drop-zone > div,
.drop-zone > button {
  position: relative;
  z-index: 1;
}

.drop-zone h2 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
}

.drop-zone p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.results-panel {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 22px;
  overflow: hidden;
  background: #f8fafc;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.notice {
  flex: 0 0 auto;
  min-height: 22px;
  margin-bottom: 12px;
  color: var(--ink);
  font-weight: 900;
}

.notice.is-error {
  color: var(--danger);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  min-height: 0;
  align-content: start;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 180px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: var(--panel);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.empty-state svg {
  width: 34px;
  height: 34px;
  color: var(--ink);
}

.empty-state p {
  max-width: 280px;
  margin: 0;
  line-height: 1.55;
}

.result-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
  gap: 7px 12px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.preview-frame {
  grid-row: 1 / span 5;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background:
    linear-gradient(45deg, #edf2f7 25%, transparent 25%) 0 0 / 20px 20px,
    linear-gradient(45deg, transparent 75%, #edf2f7 75%) 0 0 / 20px 20px,
    linear-gradient(45deg, transparent 75%, #edf2f7 75%) 10px 10px / 20px 20px,
    linear-gradient(45deg, #edf2f7 25%, transparent 25%) 10px 10px / 20px 20px,
    #fbfcfd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.result-title {
  min-width: 0;
}

.result-title strong {
  font-size: 0.95rem;
}

.result-title strong,
.result-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-title span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.metric-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.15;
}

.metric-line strong {
  color: var(--ink);
  white-space: nowrap;
}

.saving-pill {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  color: var(--ink);
  background: var(--accent);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 950;
}

.saving-pill.is-low {
  background: #ffd56a;
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  color: #ffffff;
  background: var(--dark);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 950;
}

.download-link:hover,
.download-link:focus-visible {
  background: #2b302d;
  outline: 0;
}

.queue-panel {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.file-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  min-height: 92px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.file-list:empty::before {
  content: "Sin archivos todavia.";
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  min-height: 92px;
  color: var(--muted);
  background: #fbfcfd;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  font-weight: 900;
}

.file-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.file-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: #edf2f7;
  border-radius: var(--radius);
}

.file-meta {
  min-width: 0;
}

.file-meta strong,
.file-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.remove-file {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--muted);
  background: transparent;
  border-radius: var(--radius);
}

.remove-file:hover,
.remove-file:focus-visible {
  color: var(--danger);
  background: #fff0ec;
  outline: 0;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-block: 28px;
  color: var(--muted);
}

.footer span {
  color: var(--ink);
  font-weight: 950;
}

.footer span + span {
  color: var(--muted);
  font-weight: 800;
}

.footer a:hover,
.footer a:focus-visible {
  color: var(--ink);
  outline: 0;
}

main.legal-page,
main.guide-page {
  max-width: 1180px;
  padding: 42px 18px;
}

.legal-page section {
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.legal-page h1,
.guide-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1;
}

.legal-page h2,
.article-body h2 {
  margin: 30px 0 8px;
  font-size: 1.2rem;
}

.legal-page p,
.guide-hero p,
.article-body p,
.article-body li {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
}

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 24px;
  align-items: end;
  margin-bottom: 42px;
}

.tool-link {
  display: grid;
  gap: 10px;
  padding: 18px;
  color: #ffffff;
  background: var(--dark);
  border-radius: var(--radius);
}

.tool-link strong {
  font-size: 1.12rem;
}

.tool-link span {
  color: var(--accent);
}

.article-body {
  display: grid;
  gap: 30px;
}

.article-body section {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.step-list,
.faq-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-list li,
.faq-list li {
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.step-list strong,
.faq-list strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.inline-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--accent);
  border-radius: var(--radius);
  font-weight: 900;
}

@media (max-width: 900px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .topnav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .topnav a {
    display: grid;
    place-items: center;
    background: var(--panel-soft);
    border-color: var(--line);
  }

  main,
  .footer {
    width: 100%;
    padding-inline: 14px;
  }

  .studio-header,
  .workbench,
  .guide-hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: auto;
    padding: 28px 20px;
  }

  .trust-panel {
    padding: 20px;
  }

  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workbench-head,
  .section-heading,
  .button-row {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .heading-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .drop-zone {
    min-height: 360px;
    padding: 42px 24px;
  }

  .drop-zone::before {
    inset: 12px;
  }

  .compact,
  .ghost-button,
  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .result-card {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 6px 10px;
    padding: 9px;
  }
}

@media (max-width: 520px) {
  .brand small {
    font-size: 0.72rem;
  }

  .dimension-grid {
    grid-template-columns: 1fr 1fr;
  }

  .trust-panel strong {
    font-size: 1.75rem;
  }

  .drop-visual {
    width: 86px;
    height: 86px;
  }

  .drop-visual svg {
    width: 38px;
    height: 38px;
  }
}
