:root {
  /* Enterprise business scale (navy neutrals + trust blue + restrained gold) */
  --biz-950: #0a1628;
  --biz-900: #0f2744;
  --biz-800: #1a365d;
  --biz-700: #234876;
  --biz-200: #c5d4e8;
  --biz-100: #e2eaf5;
  --biz-50: #f0f4fa;

  --color-header: var(--biz-950);
  --color-footer: #070f1a;
  --color-main: #fafbfd;
  --color-primary: #0b5cad;
  --color-primary-dark: #084298;
  --color-accent: #9a7209;
  --color-accent-light: #c9a227;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-border: #cbd5e1;
  --color-light-bg: #f1f5f9;
  --color-surface: #ffffff;
  --color-success: #0d7a3e;
  --color-danger: #b91c1c;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 50px rgba(10, 22, 40, 0.12);
  --font: "Segoe UI", "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  font-size: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: linear-gradient(180deg, var(--biz-50) 0%, var(--color-light-bg) 35%, #e2e8f0 100%);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  background: linear-gradient(105deg, var(--biz-950) 0%, var(--biz-900) 45%, #0d2138 100%);
  color: #e8eef5;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.site-header a {
  color: #e8eef5;
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  line-height: 0;
}

.site-logo img {
  display: block;
  height: 2.25rem;
  width: auto;
  max-width: min(200px, 42vw);
  object-fit: contain;
}

.site-logo:hover {
  text-decoration: none;
  opacity: 0.92;
}

.site-logo:hover img {
  filter: brightness(1.05);
}

.nav-toggle {
  display: none;
  margin-inline-start: auto;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 0.35rem 1rem;
  flex: 1;
  flex-wrap: wrap;
}

.nav-main a {
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.nav-main a:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: #fff;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.lang-select {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.35rem 0.5rem;
  font-size: 0.875rem;
}

.credit-badge {
  background: rgba(201, 162, 39, 0.15);
  color: #f5e6a8;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 6.5rem;
}

.credit-badge__num {
  font-size: 0.95rem;
  font-weight: 800;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(11, 92, 173, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
  box-shadow: 0 6px 22px rgba(11, 92, 173, 0.45);
}

.btn-accent {
  background: linear-gradient(135deg, #c9a227, var(--color-accent));
  color: #0f172a;
}

.btn-outline-light {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: #fff;
}

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

.site-main {
  flex: 1;
  background: transparent;
}

.site-main__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.35rem 3.5rem;
}

.page-eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-size: clamp(1.65rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--biz-950);
}

.page-header .lead {
  margin: 0;
  color: var(--color-muted);
  max-width: 40rem;
  font-size: 1.05rem;
}

.hero {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.75rem 2rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--color-primary), var(--color-accent-light));
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--biz-950);
}

.hero p {
  margin: 0 0 1.5rem;
  color: var(--color-muted);
  max-width: 38rem;
  font-size: 1.05rem;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.stats-strip li {
  background: var(--biz-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  text-align: center;
}

.stats-strip strong {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.35rem;
}

.stats-strip span {
  font-size: 0.9rem;
  color: var(--color-text);
  font-weight: 600;
}

.enterprise-section {
  margin: 2.75rem 0;
}

.enterprise-section > h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--biz-950);
  margin: 0 0 1.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card,
.template-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.template-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--biz-200);
}

.card img,
.template-card img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--biz-100), var(--biz-50));
}

.card-body,
.template-card .card-body {
  padding: 1.15rem 1.25rem 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-body h3,
.template-card .card-body h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--biz-950);
}

.meta {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.site-footer {
  background: var(--color-footer);
  color: #cbd5e1;
  margin-top: auto;
}

.site-footer a {
  color: #e2e8f0;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.site-footer h4 {
  margin: 0 0 0.5rem;
  color: #fff;
  font-size: 0.95rem;
}

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav li {
  margin-bottom: 0.35rem;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 1.25rem;
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

label {
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.25rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font: inherit;
  background: var(--color-surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11, 92, 173, 0.18);
}

input[type="color"] {
  width: 3.25rem;
  height: 2.5rem;
  padding: 2px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  background: var(--color-surface);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.form-error {
  color: var(--color-danger);
  font-size: 0.85rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.pricing-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.65rem 1.5rem;
  background: var(--color-surface);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pricing-card h3 {
  margin: 0;
}

.pricing-card--featured {
  position: relative;
  border-color: var(--color-primary);
  box-shadow: 0 16px 48px rgba(11, 92, 173, 0.18);
}

.pricing-card__badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: linear-gradient(135deg, #c9a227, var(--color-accent));
  color: #0f172a;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.how-it-works {
  margin: 2.5rem 0;
}

.how-it-works h2 {
  margin-top: 0;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.how-step {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.25rem;
  box-shadow: var(--shadow);
}

.how-step__num {
  display: inline-flex;
  width: 2.1rem;
  height: 2.1rem;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.65rem;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem 1.25rem;
  margin-top: 1rem;
}

.trust-grid li {
  padding-left: 1.25rem;
  position: relative;
}

.trust-grid li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--color-primary);
}

.price-tag {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: flex-end;
  padding: 1.25rem 1.35rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.filters .field {
  min-width: 150px;
  flex: 1 1 140px;
}

.editor-shell {
  margin-top: 0.5rem;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1.1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.editor-intro {
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.25rem;
  background: var(--biz-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  border-inline-start: 3px solid var(--color-primary);
  font-size: 0.92rem;
  color: var(--color-text);
}

.editor-intro p {
  margin: 0 0 0.4rem;
}

.editor-intro p:last-child {
  margin-bottom: 0;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  gap: 1.75rem;
  align-items: start;
}

.editor-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}

.form-section__title {
  margin: 0 0 1rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.form-section .field-grid {
  display: grid;
  gap: 1rem;
}

.form-section .field-grid--colors {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.color-field {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  background: var(--biz-50);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.color-field label {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.color-field input[type="color"] {
  grid-column: 1;
}

.color-field .color-field__hex {
  grid-column: 2;
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  max-width: 8.5rem;
}

.preview-panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  background: var(--color-surface);
  position: sticky;
  top: 5.25rem;
  box-shadow: var(--shadow);
}

.preview-panel > h2 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--biz-950);
}

.preview-wrap {
  width: 100%;
  overflow: auto;
  max-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: repeating-conic-gradient(#f1f5f9 0% 25%, #e2e8f0 0% 50%) 50% / 20px 20px;
  border-radius: 8px;
  padding: 0.75rem;
}

#editorCanvas {
  max-width: 100%;
  height: auto;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.a11y-widget {
  position: fixed;
  bottom: 1rem;
  inset-inline-end: 1rem;
  z-index: 100;
}

.a11y-widget summary {
  list-style: none;
  cursor: pointer;
  background: var(--color-header);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  box-shadow: var(--shadow);
}

.a11y-panel {
  margin-top: 0.5rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.75rem;
  min-width: 220px;
  box-shadow: var(--shadow);
}

.a11y-panel button {
  width: 100%;
  margin-bottom: 0.35rem;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-main {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    order: 3;
  }

  body.nav-open .nav-main {
    display: flex;
    padding-top: 0.5rem;
  }

  .header-actions {
    margin-inline-start: auto;
  }

  .editor-layout {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    position: static;
  }
}

@media (max-width: 576px) {
  .site-main__inner {
    padding: 1.25rem 1rem 2rem;
  }
}
