:root {
  color-scheme: light;
  --bg: #f4f5f2;
  --surface: #ffffff;
  --surface-muted: #f8f8f4;
  --text: #20231f;
  --muted: #62685f;
  --border: #d7dbd2;
  --primary: #176c5d;
  --primary-strong: #0f584c;
  --primary-soft: #dff1ed;
  --accent: #b4532a;
  --warning: #946200;
  --error: #a93232;
  --success: #176c5d;
  --shadow: 0 12px 30px rgba(32, 35, 31, 0.08);
}

* {
  box-sizing: border-box;
}

:focus-visible {
  outline: 3px solid rgba(23, 108, 93, 0.42);
  outline-offset: 2px;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(rgba(23, 108, 93, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 108, 93, 0.04) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
}

a {
  color: var(--primary);
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

body.modal-open {
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px max(16px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(215, 219, 210, 0.86);
  background: rgba(244, 245, 242, 0.92);
  backdrop-filter: blur(12px);
}

.simple-header {
  grid-template-columns: auto auto;
  justify-content: space-between;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-monogram {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(23, 108, 93, 0.28);
  border-radius: 8px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 0.8rem;
  font-weight: 850;
}

.brand-monogram.large {
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
  font-size: 1.1rem;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

.site-nav a,
.footer-links a,
.inline-links a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.footer-links a:hover,
.inline-links a:hover {
  color: var(--primary);
}

.header-cta {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  padding: 8px 12px;
  color: #fff;
  background: var(--primary);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.menu-btn {
  display: none;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 11px;
  color: var(--text);
  background: #fff;
  font-weight: 750;
}

.menu-btn svg {
  width: 18px;
  height: 18px;
}

.app-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow,
.section-label {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-weight: 750;
  line-height: 1.08;
}

h1 {
  font-size: clamp(1.85rem, 3.4vw, 3.2rem);
}

h2 {
  font-size: 1.05rem;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.hero-copy {
  max-width: 760px;
}

.hero-description {
  max-width: 760px;
  margin: 10px 0 0;
  color: #3d463f;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.45;
}

.author-line {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.trust-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 420px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trust-list li {
  border: 1px solid rgba(23, 108, 93, 0.22);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 0.82rem;
  font-weight: 750;
}

.status-pill,
.file-meta {
  flex: 0 0 auto;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
}

.status-pill[data-state="ready"],
.status-pill[data-state="success"] {
  color: var(--success);
  background: var(--primary-soft);
  border-color: rgba(23, 108, 93, 0.22);
}

.status-pill[data-state="working"] {
  color: #6b4a00;
  background: #fff4cd;
  border-color: #e7ca78;
}

.status-pill[data-state="error"] {
  color: var(--error);
  background: #ffe9e6;
  border-color: #eab4ad;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.input-panel,
.output-panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.drop-zone {
  position: relative;
  min-height: 176px;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 1.5px dashed #aeb7a8;
  border-radius: 8px;
  padding: 22px;
  background: var(--surface-muted);
  cursor: pointer;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--primary);
  background: #eef6f3;
  transform: translateY(-1px);
}

.drop-zone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.drop-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--primary);
  border-radius: 8px;
  background: var(--primary-soft);
}

.drop-icon svg {
  width: 28px;
  height: 28px;
}

.drop-title {
  display: block;
  font-size: 1.04rem;
  font-weight: 750;
}

.drop-subtitle {
  display: block;
  max-width: 320px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.field,
.check-field {
  min-width: 0;
}

.field {
  display: grid;
  gap: 6px;
}

.field span,
.check-field span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 11px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.field input:focus,
.field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 108, 93, 0.14);
}

.field small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding-top: 22px;
}

.check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.primary-btn,
.secondary-btn,
.icon-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 7px;
  padding: 10px 15px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.primary-btn svg,
.secondary-btn svg,
.icon-btn svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.primary-btn {
  border: 1px solid var(--primary);
  color: #fff;
  background: var(--primary);
}

.primary-btn:hover:not(:disabled) {
  background: var(--primary-strong);
  transform: translateY(-1px);
}

.primary-btn:disabled,
.primary-btn.is-disabled,
.secondary-btn:disabled,
.secondary-btn.is-disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.secondary-btn {
  border: 1px solid var(--border);
  color: var(--text);
  background: #fff;
}

.secondary-btn:hover:not(.is-disabled) {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

.primary-btn.is-disabled,
.secondary-btn.is-disabled {
  pointer-events: none;
}

.small-btn {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-muted);
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}

.stat strong {
  display: block;
  margin-top: 5px;
  font-size: 1.42rem;
  line-height: 1;
}

.messages {
  min-height: 86px;
  max-height: 150px;
  overflow: auto;
  margin: 0 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  color: #27312c;
  background: #f7f3ec;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.88rem;
  line-height: 1.45;
}

.messages[data-state="success"] {
  border-color: rgba(23, 108, 93, 0.24);
  background: #ecf7f3;
}

.messages[data-state="warning"] {
  border-color: #e4c474;
  color: #5c4100;
  background: #fff7dd;
}

.messages[data-state="error"] {
  border-color: #e5aaa4;
  color: var(--error);
  background: #fff0ed;
}

.success-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 0 0 14px;
  border: 1px solid rgba(23, 108, 93, 0.24);
  border-radius: 8px;
  padding: 14px;
  background: #ecf7f3;
}

.success-panel h2 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}

.success-panel p {
  margin: 0;
  color: #33413b;
  line-height: 1.45;
}

.result-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  margin: 12px 0 0;
}

.result-meta div {
  min-width: 0;
  border: 1px solid rgba(23, 108, 93, 0.18);
  border-radius: 7px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.7);
}

.result-meta dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.result-meta dd {
  margin: 3px 0 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.copy-feedback {
  min-height: 20px;
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 750;
}

.preview-wrap {
  position: relative;
  min-height: 288px;
  max-height: 390px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.preview-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.preview-actions[hidden] {
  display: none !important;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.preview-table caption,
.full-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.preview-table th,
.preview-table td {
  max-width: 220px;
  border-bottom: 1px solid #e8ebe4;
  padding: 10px;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #f2f4ef;
  font-size: 0.76rem;
  font-weight: 750;
}

.empty-preview {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.92rem;
  pointer-events: none;
  user-select: none;
}

.empty-preview[hidden] {
  display: none !important;
}

.content-section,
.migration-card,
.site-footer {
  margin-top: 22px;
}

.content-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 14px;
}

.section-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.migration-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(180, 83, 42, 0.24);
  border-radius: 8px;
  padding: 18px;
  background: #fff8f2;
  box-shadow: var(--shadow);
}

.migration-card h2,
.info-panel h2,
.creator-section h2 {
  margin: 0 0 8px;
  font-size: 1.18rem;
}

.migration-card p,
.info-panel p,
.creator-copy p,
.creator-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.step-card,
.feature-card,
.info-panel,
.creator-card,
.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.step-card,
.feature-card {
  padding: 14px;
}

.step-card span {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 7px;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 850;
}

.step-card p,
.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.feature-card h3 {
  margin: 9px 0 6px;
  font-size: 0.98rem;
}

.feature-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 850;
}

.feature-status.compatible {
  color: var(--success);
  background: var(--primary-soft);
}

.feature-status.compatible-con-limitaciones {
  color: var(--warning);
  background: #fff4cd;
}

.feature-status.no-compatible-todavia {
  color: var(--muted);
  background: #eef0ea;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.info-panel {
  padding: 18px;
  box-shadow: var(--shadow);
}

.inline-links {
  display: flex;
  gap: 14px;
  margin-top: 14px;
}

.check-list,
.service-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.45;
}

.creator-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}

.service-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.creator-card {
  padding: 18px;
}

.creator-card h3 {
  margin: 0 0 5px;
  font-size: 1.1rem;
}

.creator-card .card-actions {
  margin-top: 14px;
}

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item summary {
  cursor: pointer;
  padding: 14px;
  font-weight: 800;
}

.faq-item p {
  margin: 0;
  padding: 0 14px 14px;
  color: var(--muted);
  line-height: 1.5;
}

.site-footer {
  width: min(1180px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  margin: 0 auto;
  padding: 24px 0 34px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 5px 0 0;
}

.legal-page {
  max-width: 860px;
}

.legal-page h1 {
  margin-bottom: 14px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.legal-page h2 {
  margin: 22px 0 8px;
  font-size: 1.08rem;
}

.legal-page p {
  color: var(--muted);
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links span {
  display: inline-flex;
  gap: 12px;
}

.copyright {
  grid-column: 1 / -1;
  margin-top: 0;
}

.products-dialog {
  width: min(1500px, calc(100vw - 24px));
  height: min(900px, calc(100vh - 24px));
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--text);
  background: transparent;
}

.products-dialog::backdrop {
  background: rgba(14, 18, 15, 0.58);
}

.modal-shell {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.25rem;
}

.modal-summary {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.icon-btn {
  width: 40px;
  min-height: 40px;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0;
  color: var(--text);
  background: #fff;
  cursor: pointer;
}

.icon-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.modal-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(170px, 240px) minmax(150px, 190px) auto;
  gap: 12px;
  align-items: end;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: #fbfbf8;
}

.search-field input {
  min-width: 0;
}

.table-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: #f7f8f4;
  font-size: 0.86rem;
  font-weight: 650;
}

.full-table-wrap {
  position: relative;
  min-height: 0;
  overflow: auto;
  background: #fff;
}

.full-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.78rem;
}

.full-table th,
.full-table td {
  min-width: 150px;
  max-width: 320px;
  border-right: 1px solid #e7eae4;
  border-bottom: 1px solid #e7eae4;
  padding: 0;
  vertical-align: top;
}

.full-table th {
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 9px 10px;
  color: #4e574e;
  background: #edf1ea;
  font-size: 0.75rem;
  font-weight: 750;
  text-align: left;
  white-space: nowrap;
}

.full-table .row-index-cell {
  position: sticky;
  left: 0;
  z-index: 4;
  min-width: 58px;
  max-width: 58px;
  width: 58px;
  color: var(--muted);
  background: #f4f6f1;
  text-align: right;
}

.full-table td.row-index-cell {
  padding: 10px 8px;
  font-weight: 700;
}

.cell-editor {
  width: 100%;
  min-width: 150px;
  min-height: 40px;
  display: block;
  border: 0;
  border-radius: 0;
  padding: 9px 10px;
  color: var(--text);
  background: transparent;
  outline: none;
}

textarea.cell-editor {
  min-height: 74px;
  resize: vertical;
  line-height: 1.35;
}

.cell-editor:focus {
  background: #eef8f4;
  box-shadow: inset 0 0 0 2px rgba(23, 108, 93, 0.34);
}

.modal-footer {
  border-top: 1px solid var(--border);
  border-bottom: 0;
  background: #fbfbf8;
}

.pager {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .menu-btn {
    display: inline-flex;
    justify-self: end;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 16px;
    width: min(320px, calc(100vw - 32px));
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    min-height: 40px;
    display: flex;
    align-items: center;
    border-radius: 7px;
    padding: 8px 10px;
  }

  .header-cta {
    justify-self: end;
  }

  .hero-section,
  .creator-section,
  .split-section {
    grid-template-columns: 1fr;
  }

  .migration-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .trust-list {
    justify-content: flex-start;
    max-width: none;
  }

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

@media (max-width: 880px) {
  .app-shell {
    width: min(100% - 20px, 680px);
    padding: 18px 0;
  }

  .topbar,
  .workspace,
  .panel-head {
    grid-template-columns: 1fr;
  }

  .workspace {
    display: grid;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-pill,
  .file-meta {
    max-width: 100%;
  }

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

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

  .check-field {
    padding-top: 0;
  }

  .primary-btn,
  .secondary-btn {
    flex: 1 1 180px;
  }

  .success-actions,
  .card-actions,
  .preview-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .steps-grid,
  .features-grid,
  .service-list,
  .result-meta,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .products-dialog {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  .modal-shell {
    border-radius: 0;
  }

  .modal-header,
  .modal-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-toolbar {
    grid-template-columns: 1fr;
  }

  .table-meta,
  .pager {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-footer .primary-btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .header-cta {
    display: none;
  }

  .brand-mark span:last-child {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .stats-grid {
    gap: 8px;
  }

  .stat strong {
    font-size: 1.2rem;
  }
}

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