:root {
  --bg: #f0f3f5;
  --surface: #f0f3f5;
  --surface-soft: #f4f7f9;
  --surface-strong: #edf1f3;
  --text: #1f2733;
  --muted: #5f6773;
  --primary: #6200ea;
  --primary-strong: #4f00be;
  --success: #168a4a;
  --border: #dde2e6;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-raised: 10px 10px 22px #d4d9dc, -10px -10px 22px #ffffff;
  --shadow-soft: 6px 6px 16px #d9dee2, -6px -6px 16px #ffffff;
  --shadow-inset: inset 5px 5px 12px #d7dde1, inset -5px -5px 12px #ffffff;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", "SF Pro Text", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 5%, #fbfdff 0%, rgba(251, 253, 255, 0) 40%),
    radial-gradient(circle at 90% 95%, #e8edf1 0%, rgba(232, 237, 241, 0) 45%),
    var(--bg);
  line-height: 1.65;
  min-height: 100vh;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem;
  background: rgba(240, 243, 245, 0.9);
  backdrop-filter: blur(10px);
}

.site-nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.logo span {
  color: var(--primary);
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-label {
  display: none;
  margin-left: auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.nav-toggle-label span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  display: block;
}

.nav-links {
  list-style: none;
  padding: 0;
  margin: 0 0 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  font-weight: 600;
  color: #333d4a;
  padding: 0 0.95rem;
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.numify-breadcrumbs {
  width: min(100%, 1120px);
  margin: 0.35rem auto 0;
  padding: 0 1rem;
}

.numify-breadcrumbs ol {
  margin: 0;
  list-style: none;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.numify-breadcrumbs li {
  color: #3c4758;
  font-weight: 600;
}

.numify-breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.55rem;
  color: #7a8391;
}

.numify-breadcrumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--primary-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--primary);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.page-main,
.legal-main {
  width: min(100%, 980px);
  margin: 2.6rem auto 7.5rem;
  padding: 0 1rem;
  display: grid;
  gap: 1.6rem;
}

.ad-slot-placeholder {
  min-height: 90px;
  width: 100%;
  margin: 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
}

.hero-section,
.page-hero,
#numify-tool-container,
#seo-content-area,
.content-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-raised);
}

.hero-section,
.page-hero {
  text-align: center;
  padding: clamp(1.5rem, 5vw, 3rem);
}

.hero-section h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(1.55rem, 3.9vw, 2.55rem);
  line-height: 1.2;
  letter-spacing: 0.2px;
}

.hero-section p,
.page-hero p {
  margin: 0.95rem auto 0;
  max-width: 74ch;
  color: var(--muted);
  font-size: clamp(0.98rem, 2vw, 1.08rem);
}

#numify-tool-container {
  min-height: 500px;
  padding: clamp(1rem, 3vw, 1.6rem);
}

.numify-tool-panel {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-inset);
  padding: clamp(1rem, 2.8vw, 1.7rem);
}

.numify-tool-panel h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.8vw, 1.7rem);
}

.tool-intro {
  margin: 0.55rem 0 1rem;
  color: var(--muted);
}

.input-label {
  font-weight: 700;
  display: block;
  margin-bottom: 0.6rem;
}

.tool-input {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  box-shadow: var(--shadow-inset);
  color: var(--text);
  padding: 0.95rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
}

.tool-input:focus-visible,
.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 3px solid rgba(98, 0, 234, 0.35);
  outline-offset: 2px;
}

.tool-output-grid {
  margin-top: 1.1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.output-box {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
  padding: 1rem;
}

.output-box h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.output-value {
  min-height: 4.6rem;
  color: #29313d;
  font-weight: 600;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.45rem;
}

.stat-row span {
  color: var(--muted);
}

.stat-row strong {
  color: #263244;
}

.stat-row.extraction {
  display: grid;
  gap: 0.32rem;
}

#number-extraction {
  color: #2d3644;
  font-weight: 600;
}

.tool-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.clear-btn,
.copy-btn {
  border: 1px solid var(--border);
  border-radius: 999px;
  min-height: 48px;
  padding: 0.56rem 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.clear-btn {
  background: var(--surface);
  color: #2f3a49;
  box-shadow: var(--shadow-soft);
}

.copy-btn {
  background: linear-gradient(135deg, #7e35ff, var(--primary));
  color: #fff;
  box-shadow: 0 10px 18px rgba(98, 0, 234, 0.18);
}

.copy-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.dynamic-insight {
  margin-top: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #eef2f5;
  box-shadow: var(--shadow-soft);
  padding: 0.8rem 0.9rem;
  color: #384355;
  font-weight: 600;
}

.author-bio-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
}

.neumorphic-panel {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-raised);
  padding: clamp(1rem, 3.2vw, 1.4rem);
}

.author-avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  background: linear-gradient(145deg, #ffffff, #e6ebef);
  display: grid;
  place-items: center;
}

.author-avatar svg {
  width: 56px;
  height: 56px;
}

.author-bio-card h2 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
}

.author-bio-card p {
  margin: 0;
  color: #374252;
}

#seo-content-area {
  padding: clamp(1.2rem, 4vw, 2rem);
}

#seo-content-area h2,
.content-card h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.22rem, 3vw, 1.85rem);
  line-height: 1.3;
}

#seo-content-area h3,
.content-card h3 {
  margin: 1.4rem 0 0.55rem;
  font-size: clamp(1.05rem, 2.4vw, 1.28rem);
}

#seo-content-area p,
.content-card p,
.content-card li {
  margin: 0 0 0.9rem;
  color: #374252;
}

#seo-content-area strong,
.content-card strong {
  color: #1d2531;
}

#seo-content-area a,
.content-card a {
  color: var(--primary-strong);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.seo-bullets,
.content-list {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

.seo-bullets li,
.content-list li {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 0.78rem 0.95rem;
}

.faq-section {
  margin-top: 1.9rem;
  padding-top: 0.6rem;
}

.faq-item {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 0.9rem 0.95rem;
  margin-bottom: 0.8rem;
}

.faq-item h3 {
  margin-top: 0;
}

.content-card {
  padding: clamp(1.2rem, 4vw, 2rem);
}

.contact-form {
  display: grid;
  gap: 0.9rem;
}

.field-group {
  display: grid;
  gap: 0.4rem;
}

.field-group label {
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  box-shadow: var(--shadow-inset);
  color: var(--text);
  padding: 0.75rem 0.85rem;
  font-size: 1rem;
}

.contact-submit {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  padding: 0.62rem 1.2rem;
  background: linear-gradient(135deg, #7e35ff, var(--primary));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(98, 0, 234, 0.18);
}

.form-status {
  min-height: 1.5rem;
  font-weight: 700;
  color: var(--muted);
}

.form-status.success {
  color: var(--success);
}

.site-footer {
  padding: 0 1rem 8.5rem;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 1.4rem 1.2rem;
  display: grid;
  gap: 0.9rem;
  justify-items: center;
  text-align: center;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.social-icons a {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  color: var(--primary);
}

.social-icons svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 0.95rem;
  color: #374252;
  font-weight: 600;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--primary);
}

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: min(94%, 760px);
  padding: 0.72rem 0.85rem 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(31, 39, 51, 0.94);
  color: #f7f8fb;
  box-shadow: 0 14px 26px rgba(20, 26, 35, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  z-index: 1100;
}

.cookie-banner p {
  margin: 0;
  font-size: 0.9rem;
}

.cookie-banner button {
  border: 0;
  border-radius: 999px;
  min-height: 48px;
  padding: 0.55rem 1rem;
  background: linear-gradient(135deg, #7e35ff, var(--primary));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.cookie-banner button:hover,
.cookie-banner button:focus-visible {
  background: linear-gradient(135deg, #8c4dff, var(--primary-strong));
}

.cookie-banner.is-hidden {
  display: none;
}

.error-card {
  text-align: center;
}

.error-code {
  margin: 0;
  line-height: 0.9;
  font-size: clamp(4.8rem, 20vw, 11rem);
  letter-spacing: 0.08em;
  color: #ffffff;
  text-shadow:
    8px 8px 18px #c2c8cd,
    -6px -6px 14px #ffffff,
    0 4px 2px rgba(68, 78, 94, 0.25);
}

.error-message {
  margin: 1rem auto 1.2rem;
  max-width: 60ch;
  color: #404b5d;
  font-weight: 600;
}

.home-return-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.72rem 1.4rem;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, #7e35ff, var(--primary));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(98, 0, 234, 0.18);
}

a:focus-visible,
button:focus-visible,
label:focus-visible {
  outline: 3px solid rgba(98, 0, 234, 0.35);
  outline-offset: 2px;
}

@media (max-width: 920px) {
  .tool-output-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 880px) {
  .site-nav {
    flex-wrap: wrap;
    position: relative;
  }

  .nav-toggle-label {
    display: inline-flex;
  }

  .nav-links {
    width: 100%;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
  }

  .nav-toggle:checked ~ .nav-links {
    max-height: 430px;
    padding-top: 0.4rem;
  }

  .nav-links a {
    text-align: center;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
  }

  .cookie-banner {
    border-radius: 24px;
    padding: 0.9rem;
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding: 0.7rem;
  }

  .site-nav {
    padding: 0.75rem;
  }

  .page-main,
  .legal-main {
    margin-top: 1.8rem;
    margin-bottom: 8rem;
  }

  .numify-tool-panel {
    padding: 0.9rem;
  }

  .author-bio-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}
