:root {
  --bg: #f7f5f2;
  --surface: #ffffff;
  --surface-soft: #f1eee9;
  --surface-strong: #fffdfb;
  --text: #1e1a18;
  --muted: #6c5f58;
  --line: #e3dcd4;
  --accent: #e85d3f;
  --accent-2: #0f8b8d;
  --accent-3: #ffb347;
  --shadow-soft: 0 10px 28px rgba(35, 25, 18, 0.08);
  --shadow: 0 18px 40px rgba(35, 25, 18, 0.13);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 2%, rgba(232, 93, 63, 0.1), transparent 32%),
    radial-gradient(circle at 92% 96%, rgba(15, 139, 141, 0.08), transparent 36%),
    linear-gradient(180deg, #f9f7f4 0%, #f7f5f2 100%);
  overflow-x: hidden;
}

.stack > * + * {
  margin-top: 20px;
}

h1,
h2,
h3,
.brand strong,
.btn {
  font-family: "Outfit", "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
}

.site-wrap {
  width: 100%;
}

.section {
  width: 100%;
  padding: 60px 20px;
}

.section-top {
  padding-bottom: 18px;
}

.content {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.section-light {
  background: transparent;
}

.section-soft {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(241, 238, 233, 0.6));
  border-top: 1px solid rgba(227, 220, 212, 0.6);
  border-bottom: 1px solid rgba(227, 220, 212, 0.6);
}

.section-gradient {
  color: #fff;
}

.section-gradient .content {
  position: relative;
}

.section-gradient .content::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 34px;
  background:
    radial-gradient(circle at 12% 15%, rgba(255, 179, 71, 0.35), transparent 42%),
    radial-gradient(circle at 88% 85%, rgba(15, 139, 141, 0.28), transparent 42%),
    linear-gradient(132deg, #e85d3f 0%, #ce4d31 40%, #0f8b8d 100%);
  box-shadow: var(--shadow);
}

.section-gradient .hero {
  position: relative;
  z-index: 1;
}

.section-ad {
  padding-top: 22px;
  padding-bottom: 22px;
}

.section-overlap {
  margin-top: -8px;
}

.topbar {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, var(--accent), #d04b2f);
  box-shadow: 0 8px 18px rgba(232, 93, 63, 0.35);
}

.badge,
.mini-link {
  font-size: 0.84rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  padding: 8px 12px;
  text-decoration: none;
}

.hero {
  min-height: 68vh;
  display: grid;
  gap: 18px;
  align-items: center;
  padding: 42px;
  border-radius: 34px;
}

@media (min-width: 920px) {
  .hero {
    grid-template-columns: 1.45fr 1fr;
  }
}

.hero-main h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1.02;
  max-width: 13ch;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.hero-copy {
  margin: 14px 0 0;
  max-width: 45ch;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.55;
}

.hero-cta-row {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.instant-tools {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.instant-tool {
  text-decoration: none;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 10px 12px;
  backdrop-filter: blur(3px);
}

.instant-tool small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
}

.hero-panel {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.16);
  padding: 20px;
  backdrop-filter: blur(6px);
}

.hero-panel-title {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.78);
}

.hero-panel h2 {
  margin: 8px 0;
  font-size: 1.6rem;
}

.hero-panel p {
  margin: 0;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}

.hero-panel a {
  margin-top: 12px;
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-stat-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.quick-kicker {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.quick-stat-card h3 {
  margin: 5px 0;
  font-size: 1.45rem;
}

.quick-stat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.section-head {
  text-align: center;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3.2vw, 2.1rem);
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.tool-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.tool-card,
.trend-card,
.card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.tool-card,
.trend-card {
  text-decoration: none;
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tool-card::before,
.trend-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 93, 63, 0.16), transparent 65%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.tool-card:hover,
.tool-card:focus-visible,
.trend-card:hover,
.trend-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: #d9cfc6;
}

.tool-card:hover::before,
.tool-card:focus-visible::before,
.trend-card:hover::before,
.trend-card:focus-visible::before {
  opacity: 1;
}

.chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}

.chip-meta {
  font-size: 0.76rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 139, 141, 0.12);
  color: var(--accent-2);
}

.chip-meta-alt {
  background: rgba(232, 93, 63, 0.11);
  color: var(--accent);
}

.open-test-link {
  margin-top: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-2);
}

.tool-card h3,
.trend-card h3 {
  margin: 8px 0 6px;
  font-size: 1.08rem;
}

.tool-card p,
.trend-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.tool-card .chip,
.trend-card .chip {
  font-size: 1.35rem;
}

.trending-block h2 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 3.2vw, 1.9rem);
}

.trending-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.card {
  padding: 22px;
}

.tool-layout {
  width: min(1120px, calc(100% - 40px));
  margin: 22px auto 0;
  display: grid;
  gap: 14px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  font-weight: 600;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  padding: 12px 13px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(15, 139, 141, 0.12);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 720px) {
  .field-row.two {
    grid-template-columns: 1fr 1fr;
  }
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  min-height: 46px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--accent), #d84c2e);
  box-shadow: 0 10px 24px rgba(232, 93, 63, 0.3);
}

.btn-secondary {
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
}

.btn:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

.btn-ripple {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background: rgba(255, 255, 255, 0.45);
  animation: ripple-anim 0.55s ease-out forwards;
}

@keyframes ripple-anim {
  from {
    opacity: 0.7;
    width: 10px;
    height: 10px;
  }
  to {
    opacity: 0;
    width: 230px;
    height: 230px;
  }
}

.ad-slot {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 120px;
  border-radius: 14px;
  border: 1px dashed #ccbfb3;
  background: #fbf9f6;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  gap: 8px 10px;
  font-size: 0.9rem;
}

.ad-slot::before {
  content: "Sponsored";
  width: 100%;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

.ad-fallback {
  width: 100%;
  opacity: 0.68;
}

.ad-fallback-links {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ad-fallback-links a {
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  font-size: 0.78rem;
  color: var(--muted);
}

.result-wrap {
  margin-top: 16px;
  text-align: center;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  padding: 16px;
}

.result-pill {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 0.84rem;
  padding: 8px 12px;
}

.result-confidence {
  margin: 10px auto 0;
  display: inline-block;
  border-radius: 999px;
  border: 1px solid #d8cec4;
  background: #fff;
  color: var(--muted);
  font-size: 0.78rem;
  padding: 6px 10px;
}

.result-number {
  margin: 12px 0 6px;
  font-size: clamp(2.2rem, 8vw, 4.3rem);
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--accent), var(--accent-3), var(--accent-2));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.result-copy {
  margin: 0;
  color: var(--muted);
}

.result-meter {
  margin: 14px auto 10px;
  width: min(360px, 92%);
  height: 10px;
  border-radius: 999px;
  background: #e6dfd8;
  overflow: hidden;
}

.result-meter-fill {
  width: var(--score-width, 50%);
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent-2));
  transition: width 0.5s ease;
}

.result-share-preview {
  margin: 12px auto 0;
  width: min(440px, 96%);
  border: 1px dashed #d2c8bd;
  border-radius: 11px;
  background: #fff;
  color: var(--muted);
  font-size: 0.84rem;
  padding: 10px;
}

.story-poster-box {
  margin: 16px auto 0;
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffdfb, #f7f1eb);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  display: grid;
  gap: 12px;
}

.story-poster-kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.story-poster-copy h3 {
  margin: 0 0 6px;
}

.story-poster-sub {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.story-poster-shell {
  width: min(320px, 100%);
  margin: 0 auto;
  padding: 10px;
  border-radius: 24px;
  background: #20111d;
  box-shadow: 0 18px 42px rgba(35, 25, 18, 0.18);
}

.story-poster-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  background: #20111d;
}

.story-poster-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.story-tone-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.story-tone-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, color 0.16s, transform 0.12s;
}

.story-tone-btn:hover {
  border-color: #cfbfb0;
  color: #35271d;
  background: #fff8f1;
  transform: translateY(-1px);
}

.story-tone-btn.is-active {
  border-color: #d79d8f;
  color: #fff;
  background: linear-gradient(120deg, var(--accent), #d84c2e);
}

.pronoun-selector {
  margin: 20px 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pronoun-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pronoun-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pronoun-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, color 0.16s, transform 0.12s;
}

.pronoun-btn:hover {
  border-color: #b8b0a8;
  color: #3d332e;
  background: #faf8f5;
  transform: translateY(-1px);
}

.pronoun-btn.is-active {
  border-color: #9ecef0;
  color: #fff;
  background: linear-gradient(135deg, #4a90e2, #357abd);
}

.result-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 640px) {
  .story-tone-row {
    justify-content: center;
  }

  .story-poster-actions {
    grid-template-columns: 1fr;
  }

  .story-poster-shell {
    width: min(290px, 100%);
  }
}

.result-state-good {
  box-shadow: 0 0 0 1px rgba(15, 139, 141, 0.28), 0 0 24px rgba(15, 139, 141, 0.12);
}

.result-state-mid {
  box-shadow: 0 0 0 1px rgba(255, 179, 71, 0.3), 0 0 24px rgba(255, 179, 71, 0.16);
}

.result-state-low {
  box-shadow: 0 0 0 1px rgba(232, 93, 63, 0.28), 0 0 24px rgba(232, 93, 63, 0.14);
}

.loading-indicator {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  padding: 8px 12px;
  font-size: 0.84rem;
}

.dot-spinner {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: pulse-dot 0.75s ease-in-out infinite alternate;
}

@keyframes pulse-dot {
  from {
    transform: scale(0.7);
    opacity: 0.5;
  }
  to {
    transform: scale(1.05);
    opacity: 1;
  }
}

.animate-pop {
  animation: pop-in 0.3s ease;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.seo-copy {
  margin-top: 14px;
}

.seo-copy h2 {
  margin: 14px 0 6px;
  font-size: 1.08rem;
}

.seo-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.confetti-layer {
  margin-top: 8px;
  min-height: 18px;
  position: relative;
}

.result-insight-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.result-insight-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  text-align: left;
}

.result-insight-card strong {
  display: block;
  font-size: 0.84rem;
  margin-bottom: 4px;
}

.result-insight-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.result-next-steps {
  margin-top: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.result-next-steps h3 {
  margin: 0 0 8px;
  font-size: 0.98rem;
}

.result-next-steps ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 5px;
}

.result-disclaimer {
  margin: 12px auto 0;
  width: min(460px, 100%);
  color: var(--muted);
  font-size: 0.82rem;
}

.confetti-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0;
  animation: confetti-rise 0.9s ease-out forwards;
}

@keyframes confetti-rise {
  0% {
    opacity: 0;
    transform: translateY(4px) scale(0.75);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-22px) scale(1.1);
  }
}

.tools-inline,
.footer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tools-inline {
  margin-top: 10px;
}

.tools-inline a,
.footer-tools a {
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 0.84rem;
  padding: 7px 11px;
}

.footer-tools {
  justify-content: center;
  margin-bottom: 10px;
}

footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

footer p {
  margin: 6px 0;
}

@media (max-width: 900px) {
  .quick-stats,
  .trending-grid,
  .instant-tools,
  .result-insight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .section {
    padding: 36px 14px;
  }

  .topbar {
    width: calc(100% - 28px);
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    padding: 24px;
    min-height: auto;
  }

  .btn {
    min-height: 48px;
  }

  .tool-layout,
  .ad-slot,
  footer {
    width: calc(100% - 28px);
  }
}
