:root {
  color-scheme: light;
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --ink: #16211f;
  --muted: #64726d;
  --line: #d9e1dc;
  --line-strong: #bac8c2;
  --teal: #087568;
  --teal-dark: #075f56;
  --coral: #d95f45;
  --yellow: #f0c14b;
  --blue: #2f66b2;
  --soft: #edf5f1;
  --shadow: 0 14px 34px rgba(25, 38, 35, 0.09);
  --radius: 8px;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

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

p,
h1,
h2,
h3 {
  margin-top: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 10px 14px;
  background: var(--ink);
  color: #ffffff;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(217, 225, 220, 0.92);
  backdrop-filter: blur(14px);
}

.nav-shell,
.intro-section,
.generator-section,
.template-library,
.content-with-ad,
.ad-shell-content,
.faq-section,
.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.nav-shell {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  font-weight: 900;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: block;
  filter: drop-shadow(0 7px 12px rgba(22, 33, 31, 0.14));
  transition: transform 160ms ease, filter 160ms ease;
}

.brand-icon {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-icon-bg {
  fill: #14211e;
}

.brand-icon-hook {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 3.6;
  stroke-linecap: round;
}

.brand-icon-card {
  fill: #fffdf7;
  stroke: var(--yellow);
  stroke-width: 2.2;
  transition: fill 160ms ease;
}

.brand-icon-line {
  fill: none;
  stroke: var(--teal);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke 160ms ease;
}

.brand-icon-pin {
  fill: #14211e;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.brand-name {
  display: inline-flex;
  align-items: baseline;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1;
  letter-spacing: 0;
}

.brand-name span:nth-child(2) {
  color: var(--teal-dark);
}

.brand-name span:nth-child(3) {
  color: var(--coral);
}

.brand-kicker {
  color: #6b766f;
  font-size: 0.58rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand:hover .brand-mark {
  transform: translateY(-1px) rotate(-2deg);
  filter: drop-shadow(0 10px 16px rgba(22, 33, 31, 0.18));
}

.brand:hover .brand-icon-card {
  fill: #fff6df;
}

.brand:hover .brand-icon-line {
  stroke: var(--coral);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a,
.site-footer nav a {
  padding: 9px 10px;
  color: #33423f;
  border-radius: var(--radius);
}

.nav-links a:hover,
.site-footer nav a:hover {
  background: #e7efeb;
}

.intro-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 26px;
  align-items: center;
  padding: 34px 0 16px;
}

.ads-disabled .intro-section,
.ads-disabled .content-with-ad {
  grid-template-columns: minmax(0, 1fr);
}

.intro-copy {
  max-width: 790px;
}

.ads-disabled .intro-copy {
  max-width: 880px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 850px;
  margin-bottom: 12px;
  font-size: clamp(2.45rem, 4.7vw, 4.65rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lede {
  max-width: 760px;
  color: #42524d;
  font-size: clamp(1.02rem, 1.55vw, 1.16rem);
}

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

.trust-row span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: #354541;
  font-weight: 760;
  font-size: 0.88rem;
  box-shadow: 0 1px 0 rgba(22, 33, 31, 0.04);
}

.ad-shell {
  min-height: 170px;
  padding: 9px;
  border: 1px solid #d6ded9;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.ad-shell > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.ad-slot {
  min-height: 130px;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(22, 33, 31, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(22, 33, 31, 0.04) 1px, transparent 1px),
    #f7faf7;
  background-size: 16px 16px;
}

.ad-slot ins {
  display: block;
  width: 100%;
}

.generator-section {
  padding: 14px 0 58px;
  scroll-margin-top: 84px;
}

.section-heading {
  max-width: 800px;
  margin-bottom: 18px;
}

.section-heading h2,
.seo-content h2,
.faq-section h2 {
  margin-bottom: 10px;
  font-size: clamp(1.7rem, 2.7vw, 2.35rem);
  line-height: 1.03;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.seo-content p {
  color: #4c5752;
}

.compact-heading {
  margin-bottom: 14px;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(300px, 410px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.intro-section > *,
.setup-grid > *,
.tool-grid > *,
.content-with-ad > * {
  min-width: 0;
}

.setup-panel,
.control-panel,
.preview-panel,
.seo-content,
.faq-grid details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.setup-panel {
  padding: 16px;
  margin-bottom: 18px;
}

.setup-heading,
.panel-heading {
  margin-bottom: 12px;
}

.setup-heading h3,
.panel-heading h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.15;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
  gap: 18px;
  align-items: start;
}

.setup-options {
  display: grid;
  gap: 14px;
}

.control-panel {
  padding: 16px;
  position: sticky;
  top: 82px;
  max-height: calc(100vh - 98px);
  overflow: auto;
}

.control-block {
  margin-bottom: 0;
}

.control-block h3,
.preview-toolbar h3,
.sign-form label,
.theme-picker legend,
.segmented-control legend {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
}

.template-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.template-tab {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: #34403b;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 760;
}

.template-tab[aria-selected="true"] {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
  color: #ffffff;
}

.control-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 0;
}

.segmented-control,
.theme-picker {
  width: 100%;
  min-width: 0;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.segmented-control legend,
.theme-picker legend {
  grid-column: 1 / -1;
  margin-bottom: 8px;
  color: #303b36;
}

.segmented-control label,
.theme-option {
  position: relative;
  min-width: 0;
  display: block;
}

.segmented-control input,
.theme-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.segmented-control span {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: #43504b;
  font-size: 0.84rem;
  font-weight: 760;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.segmented-control input:checked + span,
.theme-option input:checked + span {
  border-color: var(--teal-dark);
  box-shadow: inset 0 0 0 2px var(--teal-dark);
}

.theme-picker {
  margin-bottom: 0;
}

.mini-button {
  width: 100%;
  min-height: 30px;
  margin: 0 0 8px;
  padding: 5px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #eef7f3;
  color: var(--teal-dark);
  font-size: 0.76rem;
  font-weight: 850;
}

.mini-button:hover {
  background: #dff0ea;
}

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

.theme-option span {
  min-height: 46px;
  display: grid;
  align-items: end;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: #23312c;
  font-size: 0.78rem;
  font-weight: 800;
}

.theme-swatch {
  display: flex;
  gap: 3px;
  margin-bottom: 6px;
}

.theme-swatch i {
  width: 18px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.sign-form {
  display: grid;
  gap: 13px;
}

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

.field-group label {
  color: #2e3935;
}

.field-group input,
.field-group textarea,
.field-group select {
  width: 100%;
  min-height: 44px;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fbfdfb;
  color: var(--ink);
  outline: none;
}

.field-group textarea {
  min-height: 92px;
  resize: vertical;
}

.field-group input:focus,
.field-group textarea:focus,
.field-group select:focus {
  border-color: var(--teal-dark);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.field-hint {
  color: var(--muted);
  font-size: 0.78rem;
}

.utility-actions,
.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.utility-actions {
  margin-top: 16px;
}

.button {
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font-weight: 850;
}

.button:hover {
  transform: translateY(-1px);
}

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

.button-muted {
  border-color: var(--line-strong);
  color: #3c4742;
}

.preview-panel {
  padding: 16px;
  background: #fdfefe;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.privacy-chip {
  flex: none;
  padding: 6px 9px;
  border: 1px solid #b9d5d0;
  border-radius: var(--radius);
  color: var(--teal-dark);
  background: #ecfbf7;
  font-size: 0.78rem;
  font-weight: 850;
}

.preview-stage {
  height: clamp(500px, 48vw, 640px);
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px solid #cedbd5;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px),
    #dfe9e4;
  background-size: 24px 24px;
  overflow: hidden;
}

#signPreview {
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 816 / 1056;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  border-radius: 4px;
  background-color: #ffffff;
  box-shadow: 0 18px 45px rgba(27, 45, 41, 0.22);
}

.preview-stage[data-orientation="landscape"] #signPreview {
  width: 100%;
  height: auto;
}

.download-actions {
  margin-top: 12px;
}

.template-library,
.faq-section {
  padding: 34px 0 54px;
}

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

.template-card {
  min-height: 198px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(22, 33, 31, 0.04);
}

.template-card h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.template-card p {
  margin-bottom: 14px;
  color: #53605a;
  font-size: 0.93rem;
}

.template-card button {
  align-self: flex-start;
}

.guide-card {
  color: inherit;
}

.guide-card .button {
  align-self: flex-start;
}

.content-with-ad {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: start;
  padding: 12px 0 42px;
}

.seo-content {
  padding: clamp(20px, 4vw, 38px);
}

.seo-content section + section {
  margin-top: 36px;
}

.tip-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tip-list div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbf8;
}

.tip-list h3 {
  margin-bottom: 6px;
}

.sidebar-stack {
  display: grid;
  gap: 14px;
}

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

.faq-grid details {
  padding: 16px 18px;
  box-shadow: none;
}

.faq-grid summary {
  cursor: pointer;
  font-weight: 850;
}

.faq-grid p {
  margin: 10px 0 0;
  color: #4d5a55;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  max-width: 560px;
  margin: 12px 0 0;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 4px;
}

.policy-page {
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
}

.policy-page article {
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.policy-page h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.policy-page h2 {
  margin-top: 30px;
  font-size: 1.45rem;
}

.policy-page p,
.policy-page li {
  color: #4c5752;
}

.policy-page a {
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(340px, calc(100% - 36px));
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
  box-shadow: var(--shadow);
}

@media (max-width: 980px) {
  .intro-section,
  .setup-grid,
  .tool-grid,
  .content-with-ad {
    grid-template-columns: 1fr;
  }

  .control-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

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

  .preview-stage {
    min-height: 460px;
  }
}

@media (max-width: 720px) {
  .nav-shell,
  .intro-section,
  .generator-section,
  .template-library,
  .content-with-ad,
  .ad-shell-content,
  .faq-section,
  .site-footer {
    width: min(calc(100% - 20px), var(--max));
  }

  .nav-shell {
    min-height: auto;
    padding: 12px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 2px;
  }

  .nav-links a {
    padding: 7px;
    font-size: 0.88rem;
  }

  .intro-section {
    padding-top: 34px;
  }

  h1 {
    max-width: 9.5em;
    font-size: clamp(2.18rem, 10vw, 2.75rem);
    line-height: 1.02;
  }

  .lede {
    font-size: 1rem;
  }

  .tool-grid {
    gap: 12px;
  }

  .setup-panel,
  .control-panel,
  .preview-panel {
    padding: 12px;
  }

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

  .control-row {
    grid-template-columns: 1fr;
  }

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

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

  .preview-stage {
    height: min(115vw, 530px);
    min-height: 390px;
    padding: 14px;
  }

  .download-actions .button,
  .utility-actions .button {
    flex: 1 1 auto;
  }

  .template-grid,
  .faq-grid,
  .tip-list {
    grid-template-columns: 1fr;
  }

  .template-card {
    min-height: 0;
  }

  .site-footer {
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .site-header,
  .intro-section,
  .setup-panel,
  .control-panel,
  .download-actions,
  .template-library,
  .content-with-ad,
  .ad-shell,
  .faq-section,
  .site-footer,
  .preview-toolbar {
    display: none !important;
  }

  .generator-section,
  .tool-grid,
  .preview-panel,
  .preview-stage {
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
    border: 0;
    box-shadow: none;
    background: #ffffff;
  }

  #signPreview {
    width: 100%;
    max-height: none;
    box-shadow: none;
  }
}
