:root {
  --pink: #da3166;
  --pink-soft: #fff0f5;
  --black: #101010;
  --white: #fff;
  --gray-50: #f7f7f7;
  --gray-100: #ececec;
  --gray-500: #676767;
  --shadow: 0 14px 42px rgba(16, 16, 16, .07);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  direction: rtl;
  text-align: right;
  background: var(--gray-50);
  color: var(--black);
  font-family: Arial, "Helvetica Neue", sans-serif;
  line-height: 1.6;
}

button, textarea { font: inherit; }

button:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(218, 49, 102, .28);
  outline-offset: 3px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 36px;
  padding: 42px max(24px, calc((100vw - 1240px) / 2));
  background: var(--black);
  color: var(--white);
  border-bottom: 5px solid var(--pink);
}

.header-copy { min-width: 0; }

.header-logo {
  flex: 0 1 360px;
  width: min(360px, 34vw);
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.site-header h1 {
  margin: 2px 0 6px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.site-header p:last-child { margin: 0; color: #cfcfcf; }

.eyebrow {
  margin: 0;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .18em;
}

.pink { color: var(--pink); }

.app-shell {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0;
  background: rgba(247, 247, 247, .94);
  scrollbar-width: thin;
}

.tab {
  flex: 0 0 auto;
  padding: 10px 16px;
  border: 1px solid var(--gray-100);
  border-radius: 999px;
  background: var(--white);
  color: var(--black);
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}

.tab:hover { border-color: var(--pink); color: var(--pink); }
.tab.active { border-color: var(--pink); background: var(--pink); color: var(--white); }

.panel { display: none; padding-top: 28px; }
.panel.active { display: block; animation: reveal .25s ease; }

.prompt-builder-panel {
  display: block;
  margin-top: 54px;
  padding-top: 42px;
  border-top: 1px solid #dddddd;
}

.prompt-builder-panel.builder-focus {
  margin-top: 0;
  border-top: 0;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(6px); }
}

.intro-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(28px, 6vw, 90px);
  min-height: 430px;
  align-items: center;
  padding: clamp(34px, 7vw, 88px);
  border-radius: 30px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.step-mark {
  color: var(--pink);
  font-size: clamp(5rem, 15vw, 11rem);
  font-weight: 800;
  line-height: 1;
  opacity: .14;
}

.intro-card h2 {
  max-width: 700px;
  margin: 8px 0 14px;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -.05em;
}

.intro-card p:not(.eyebrow) { max-width: 650px; color: var(--gray-500); }

.general-description-card {
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.general-description-card h2 {
  margin: 5px 0 14px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.12;
}

.general-description-lead {
  max-width: 760px;
  margin: 0 0 28px;
  color: var(--gray-500);
  font-size: 1.06rem;
}

.general-description-card label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
}

#general-description-input {
  min-height: 210px;
  background: var(--gray-50);
  font-size: 1.05rem;
}

.field-note {
  margin: 8px 0 0;
  color: var(--gray-500);
  font-size: .86rem;
}

.stage-navigation {
  display: flex;
  justify-content: flex-end;
  margin-top: 30px;
}

.stage-navigation[hidden] { display: none; }

.next-stage-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 42px;
  min-width: 310px;
  padding: 15px 20px;
  border: 0;
  border-radius: 14px;
  background: var(--pink);
  color: var(--white);
  text-align: right;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(218, 49, 102, .22);
  transition: transform .2s ease, box-shadow .2s ease;
}

.next-stage-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(218, 49, 102, .28);
}

.next-stage-button small {
  display: block;
  margin-bottom: 1px;
  opacity: .8;
}

.next-stage-button strong { font-size: 1.04rem; }
.next-arrow { font-size: 1.7rem; line-height: 1; }

.primary-action, .copy-button, .clear-button {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  transition: transform .2s ease, opacity .2s ease;
}

.primary-action:hover, .copy-button:hover, .clear-button:hover { transform: translateY(-2px); }
.primary-action { margin-top: 12px; padding: 13px 24px; background: var(--pink); color: var(--white); }

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  margin-bottom: 26px;
}

.section-heading h2 { margin: 3px 0 0; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.1; }
.section-heading > p { max-width: 540px; margin: 0; color: var(--gray-500); }

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

.option-card {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 26px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}

.option-card:hover { transform: translateY(-4px); }
.option-card.selected { border-color: var(--pink); background: linear-gradient(180deg, var(--white), var(--pink-soft)); }
.option-card h3 { margin: 0 0 12px; font-size: 1.35rem; }
.option-card .explanation { margin: 0; color: var(--gray-500); }
.english-value { margin: auto 0 18px; padding-top: 24px; color: var(--gray-500); font-size: .9rem; }
.english-value strong { display: block; color: var(--black); font-size: 1rem; }

.add-button {
  width: 100%;
  padding: 11px 16px;
  border: 1px solid var(--black);
  border-radius: 10px;
  background: var(--black);
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
}

.selected .add-button { border-color: var(--pink); background: var(--pink); }

.custom-entry {
  grid-column: 1 / -1;
  padding: 28px;
  border: 2px dashed #d8d8d8;
  border-radius: var(--radius);
  background: var(--white);
}

.custom-entry h3 { margin: 0 0 4px; font-size: 1.35rem; }
.custom-entry > p { margin: 0 0 20px; color: var(--gray-500); }

.custom-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.custom-fields label { display: grid; gap: 6px; font-weight: 700; }

.custom-fields input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-100);
  border-radius: 10px;
  background: var(--gray-50);
  color: var(--black);
  font: inherit;
}

.custom-fields input:focus-visible {
  outline: 3px solid rgba(218, 49, 102, .28);
  outline-offset: 2px;
}

.custom-actions { display: flex; gap: 10px; margin-top: 16px; }
.custom-actions .add-button { width: auto; min-width: 130px; }
.remove-custom { display: none; background: var(--white); color: var(--black); }
.custom-entry.has-value .remove-custom { display: inline-block; }

.prompt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.prompt-box {
  padding: 24px;
  background: var(--white);
}

.prompt-box + .prompt-box {
  border-right: 1px solid var(--gray-100);
}

.prompt-heading { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.prompt-heading h3 { margin: 0 0 12px; }
.prompt-heading span { color: var(--gray-500); font-size: .85rem; }

textarea {
  display: block;
  width: 100%;
  min-height: 240px;
  resize: vertical;
  padding: 16px;
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  background: var(--gray-50);
  color: var(--black);
  line-height: 1.7;
}

.copy-button { width: 100%; margin-top: 12px; padding: 12px; background: var(--pink); color: var(--white); }
.clear-button { display: block; margin: 20px auto 0; padding: 12px 28px; background: var(--black); color: var(--white); }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 20;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: .2s ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prompt-grid { grid-template-columns: 1fr; }
  .prompt-box + .prompt-box { border-top: 1px solid var(--gray-100); border-right: 0; }
}

@media (max-width: 620px) {
  .site-header {
    align-items: flex-start;
    padding: 30px 20px;
  }
  .header-logo { width: 145px; margin-top: 8px; }
  .app-shell { width: min(100% - 28px, 1240px); padding-top: 12px; }
  .intro-card { grid-template-columns: 1fr; min-height: 0; padding: 32px 24px; }
  .step-mark { display: none; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 12px; }
  .cards-grid { grid-template-columns: 1fr; }
  .option-card { min-height: 270px; }
  .custom-fields { grid-template-columns: 1fr; }
  .stage-navigation { margin-top: 22px; }
  .next-stage-button { width: 100%; min-width: 0; }
}

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

/* Final product refinements */
.header-logo-link { display: inline-flex; flex: 0 0 auto; }
.header-logo-link .header-logo { display: block; }

.whatsapp-help {
  margin-top: 34px;
  padding: 26px 30px;
  border: 1px solid #dbe9df;
  border-radius: var(--radius);
  background: #f5faf6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  box-shadow: 0 10px 28px rgba(35, 92, 54, .07);
}
.whatsapp-help-copy h3 { margin: 0 0 6px; font-size: 1.35rem; }
.whatsapp-help-copy p { margin: 0 0 16px; color: var(--gray-500); }
.whatsapp-help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 999px;
  background: #5f9870;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.whatsapp-help-button:hover { background: #4f825f; }
.whatsapp-help-icon {
  width: 110px;
  height: 110px;
  object-fit: contain;
  filter: sepia(1) saturate(.8) hue-rotate(75deg) brightness(.72);
  opacity: .9;
  flex: 0 0 auto;
}
@media (max-width: 620px) {
  .whatsapp-help { padding: 22px; gap: 18px; }
  .whatsapp-help-icon { width: 78px; height: 78px; }
}
