.home-intro {
  width: 100%;
  margin: 20px auto 4px;
}

.home-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr);
  align-items: center;
  gap: clamp(16px, 3vw, 44px);
  overflow: hidden;
  padding: clamp(24px, 4vw, 48px);
  border-radius: 24px;
  color: #f9f7ff;
  background: radial-gradient(ellipse at 98% 15%, #633ccc, transparent 58%), #211643;
  box-shadow: 0 18px 45px #30215325;
}
.home-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(#e5d6ff55 1px, transparent 1px);
  background-size: 16px 16px;
  mask-image: linear-gradient(90deg, transparent 42%, #000);
  content: "";
}
.home-hero h1 {
  max-width: 14ch;
  font-size: clamp(2.4rem, 5.6vw, 4.55rem);
  line-height: .99;
  letter-spacing: -.073em;
  font-weight: 900;
}
.home-hero h1 em { color: #ddd1ff; font-style: normal; }
.home-hero-copy > p {
  max-width: 43ch;
  margin-top: 13px;
  color: #e0d9ee;
  font-size: 1rem;
  line-height: 1.5;
}
.home-start {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  margin-top: 17px;
  padding: 9px 16px;
  border-radius: 9px;
  background: #e2fa9d;
  color: #241a36;
  text-decoration: none;
  font-weight: 800;
}
.home-start:hover { background: #edffc0; }
.home-start:focus-visible, .homepage-business-offer a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.home-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 15px;
  margin-top: 13px;
  list-style: none;
  color: #e0d9ee;
  font-size: .8125rem;
}
.home-benefits li::before { content: "✓"; margin-right: 5px; color: #e2fa9d; font-weight: 800; }

.home-preview {
  width: min(100%, 348px);
  justify-self: center;
  padding: 20px 12px;
}
.home-preview-paper {
  isolation: isolate;
  position: relative;
  padding: clamp(14px, 2vw, 25px);
  border-radius: 15px;
  background: #fff;
  color: #241a36;
  transform: rotate(-5deg);
  box-shadow: 12px 12px 0 #a98af7, 0 24px 45px #13082d70;
}
.home-preview-head, .home-preview-items div, .home-preview-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.home-preview-head strong { font-size: 1.125rem; letter-spacing: -.045em; }
.home-preview-head span { color: #55446c; font-size: .8125rem; }
.home-preview-items { margin: 16px 0 10px; }
.home-preview-items div { border-top: 1px solid #e8e0f6; padding: 9px 0; font-size: .875rem; }
.home-preview-items dd { font-weight: 700; }
.home-preview-total {
  border-radius: 8px;
  background: #eee8fd;
  padding: 9px 10px;
  font-size: .875rem;
}
.home-preview-total strong { font-size: 1.125rem; letter-spacing: -.04em; }
.homepage-business-offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 10px;
  padding: 10px 13px;
  border: 1px solid #c2dfce;
  border-radius: 12px;
  background: #e9f6ee;
  color: #123328;
}
.homepage-business-offer strong { font-size: .9375rem; }
.homepage-business-offer p { margin: 1px 0 0; color: #375b4c; font-size: .875rem; }
.homepage-business-offer a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 7px 12px;
  border-radius: 8px;
  background: #183c2e;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 800;
}
.homepage-business-offer a:hover { background: #286047; }
.homepage-business-offer a:focus-visible { outline-color: #183c2e; }

@media (max-width: 768px) {
  .home-intro { margin-top: 12px; }

}
@media (max-width: 640px) {
  .home-hero { grid-template-columns: minmax(0, 1fr); border-radius: 17px; }
  .home-preview { display: none; }
  .homepage-business-offer { flex-wrap: wrap; }
  .homepage-business-offer a { flex: 0 1 auto; }
}
@media print {
  .home-intro { display: none !important; }
}

/* Homepage workspace and editorial layout */
.invoice-home {
  --home-container-width: 1180px;
  --home-gutter: 16px;
  background: #f5f6fa;
}

@media screen {
  .invoice-home .app-header {
    background: #fff;
    border-color: #e0e2ec;
    box-shadow: 0 2px 10px #15132b0a;
    backdrop-filter: none;
  }

  .invoice-home :is(.home-intro, .invoice-sheet-wrapper, .seo-section, .home-share, .site-footer > .container) {
    width: 100%;
    max-width: var(--home-container-width);
    padding-inline: var(--home-gutter);
  }

  .invoice-home .app-header .container {
    max-width: var(--home-container-width) !important;
    padding: 8px var(--home-gutter) !important;
  }

  .invoice-home .header-flex {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto) max-content;
    grid-template-areas: "brand actions pdf" "format format format";
    gap: 8px 12px;
  }

  .invoice-home .brand-group { grid-area: brand; }
  .invoice-home .header-nav-actions {
    grid-area: actions;
    justify-content: flex-end;
    flex-wrap: wrap;
    min-width: 0;
    max-width: 100%;
    gap: 4px;
  }

  .invoice-home .header-nav-actions button {
    min-height: 36px;
    border-radius: 7px;
    white-space: nowrap;
  }

  .invoice-home .header-nav-tools {
    grid-area: format;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px 7px;
    width: 100%;
    min-width: 0;
    padding: 4px 7px;
    background: #f6f6fb;
    box-shadow: none;
    border-color: #e5e5ef;
  }

  .invoice-home .header-nav-tools select {
    min-height: 32px;
    font-size: .8125rem;
  }

  .invoice-home #btnDownloadPdf {
    grid-area: pdf;
    justify-self: end;
    width: auto;
    min-height: 40px;
    margin: 0 !important;
    background: #4c33b0;
    box-shadow: none;
    transform: none;
  }

  .invoice-home #btnDownloadPdf:hover { background: #392484; }
  .invoice-home #btnDownloadPdf::after { content: none; }

  .invoice-home #invoice-editor,
  .invoice-home #how-to-invoice,
  .invoice-home #faq { scroll-margin-top: 134px; }

  .invoice-home .invoice-sheet-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    margin: 25px auto 38px;
    animation: none;
  }

  .home-editor-heading {
    padding: 12px 16px;
    border: 1px solid #e1ddec;
    border-left: 4px solid #6c54c2;
    border-radius: 10px;
    background: #f0ecfa;
  }

  .home-editor-heading h2 { font-size: 1.25rem; letter-spacing: -.035em; }
  .home-editor-heading p { color: #4f4565; font-size: .875rem; }

  .invoice-home #invoice-editor > .invoice-sheet {
    max-width: none;
    min-width: 0;
    border-color: #dedbe9;
    border-radius: 14px;
    box-shadow: 0 12px 32px #211b3510;
    transform: none !important;
  }
}

.invoice-home .home-hero {
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid #ded6f6;
  border-radius: 18px;
  background: radial-gradient(ellipse at 100% 25%, #e5d9ff, transparent 64%), #f0ebfc;
  color: #22153e;
  box-shadow: none;
}
.invoice-home .home-hero::before { background-image: radial-gradient(#6d51b044 1px, transparent 1px); }
.invoice-home .home-hero h1 { font-size: clamp(2.35rem, 5.3vw, 4.15rem); }
.invoice-home .home-hero h1 em { display: block; color: #5337a0; }
.invoice-home .home-hero-copy > p,
.invoice-home .home-benefits { color: #524568; }
.invoice-home .home-benefits li::before { color: #5740a2; }
.invoice-home .home-start { background: #4c33b0; color: #fff; }
.invoice-home .home-start:hover { background: #392484; }
.invoice-home .home-start:focus-visible { outline-color: #4c33b0; }
.invoice-home .home-preview-paper {
  transform: rotate(-3deg);
  border: 1px solid #ddd2f1;
  box-shadow: 9px 9px 0 #cfb9fa, 0 18px 35px #30175825;
}
.invoice-home .homepage-business-offer { margin-top: 12px; }

.invoice-home .seo-section {
  width: 100%;
  margin: 16px auto 0;
  padding-top: 34px;
  color: #454b61;
}
.invoice-home .seo-title,
.invoice-home .faq-title,
.home-share h2 {
  text-align: left;
  color: #211b35;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -.045em;
}
.invoice-home .guide-header-wrap {
  max-width: none;
  margin: 0 0 18px;
  align-items: start;
  text-align: left;
}
.invoice-home .seo-subtitle { text-align: left; margin: 0; }
.home-steps {
  list-style: none;
  counter-reset: invoice-step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.home-steps li {
  counter-increment: invoice-step;
  padding: 15px;
  background: #fff;
  border: 1px solid #e1e2ed;
  border-radius: 12px;
}
.home-steps li::before {
  content: counter(invoice-step);
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  margin-bottom: 8px;
  border-radius: 7px;
  color: #493399;
  background: #ede7fb;
  font-weight: 800;
}
.home-steps strong { display: block; margin-bottom: 3px; color: #211b35; }
.home-how-to > p { margin: 9px 0; }
.invoice-home .seo-cards-grid { gap: 14px; }
.invoice-home .seo-card,
.invoice-home .faq-item { border: 1px solid #e1e2ed; border-radius: 12px; box-shadow: none; }
.invoice-home .seo-card {
  min-width: 0;
  padding: clamp(16px, 2.2vw, 25px);
  background: #fff;
}
.invoice-home .seo-card:hover { transform: none; box-shadow: 0 4px 15px #211b3510; }
.invoice-home .faq-title { margin-bottom: 12px; }

.home-featured { margin-top: 36px; }
.home-featured-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 14px;
}
.home-featured-heading h3 {
  color: #211b35;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  letter-spacing: -.035em;
}
.home-guide-card { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.home-guide-card h4 { color: #211b35; font-size: 1.05rem; line-height: 1.35; }
.home-guide-card h4 a { color: inherit; text-decoration: none; }
.home-guide-card .seo-text { flex: 1; margin: 0; color: #4c5065; line-height: 1.55; }
.home-guide-topic {
  padding: 2px 8px;
  border-radius: 5px;
  background: #eee8fa;
  color: #48347a;
  font-size: .8125rem;
  font-weight: 700;
}
.home-guide-link { color: #4c33a0; font-size: .875rem; font-weight: 700; text-decoration: none; }
.home-guide-link:hover, .home-guide-card h4 a:hover { text-decoration: underline; }
@media (min-width: 980px) {
  .invoice-home .home-featured-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.home-share { margin: 28px auto 0; }
.home-share-card {
  padding: clamp(16px, 3vw, 26px);
  background: #fff;
  border: 1px solid #e1e2ed;
  border-radius: 12px;
}
.home-share h2, .home-share p { text-align: center; }
.home-share p { margin: 3px 0 14px; color: #555b70; }

.invoice-home .site-footer {
  margin-top: 36px;
  background: #211b35;
  color: #d4cbeb;
  text-align: left;
}
.invoice-home .site-footer h2 { color: #fff; font-size: 1.25rem; letter-spacing: -.025em; }
.home-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 18px;
}
.home-footer-group {
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: start;
  gap: 5px;
  margin: 0;
}
.home-footer-group h3 { color: #fff; font-size: .9375rem; margin-bottom: 3px; }
.invoice-home .site-footer .footer-links a { color: #ded7ee; }
.invoice-home .site-footer .footer-links a:hover { color: #fff; text-decoration: underline; }
.home-footer-meta {
  justify-content: start;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 22px 0 10px;
  padding-top: 14px;
  border-top: 1px solid #504663;
}

@media screen and (max-width: 900px) {
  .invoice-home .header-flex {
    grid-template-columns: minmax(0, 1fr) max-content;
    grid-template-areas: "brand pdf" "actions actions" "format format";
  }

  .invoice-home .brand-group { min-width: 0; width: auto; justify-content: flex-start; }
  .invoice-home .header-nav-actions { width: 100%; justify-content: flex-start; }
  .invoice-home .header-nav-tools .select-clean { flex: 1 1 27%; max-width: none; min-width: 0; }
  .invoice-home .header-nav-tools .color-picker-wrap { flex: 1 1 27%; width: auto; }
  .invoice-home #invoice-editor,
  .invoice-home #how-to-invoice,
  .invoice-home #faq { scroll-margin-top: 190px; }
  .home-steps, .home-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media screen and (max-width: 480px) {
  .invoice-home { --home-gutter: 12px; }
  .invoice-home .header-flex { gap: 6px; }
  .invoice-home .header-nav-actions button { min-height: 32px; }
  .invoice-home .brand-group { gap: 4px; flex-wrap: wrap; }
  .invoice-home .header-nav-tools .select-clean { font-size: .75rem; }
  .invoice-home #btnDownloadPdf { padding-inline: 9px; font-size: .75rem; }
  .invoice-home #invoice-editor, .invoice-home #how-to-invoice, .invoice-home #faq { scroll-margin-top: 200px; }
  .home-steps { grid-template-columns: minmax(0, 1fr); }
  .home-footer-grid { gap: 16px 12px; }
}

@media print {
  .home-editor-heading, .home-share { display: none !important; }
}
