:root {
  color-scheme: light;
  --ink: #1b1a18;
  --muted: #4b463f;
  --paper: #fff7ef;
  --accent: #d44f2f;
  --accent-dark: #b73f23;
  --accent-soft: #f6c9b6;
  --sky: #f4e2cf;
  --shadow: rgba(27, 26, 24, 0.15);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Fraunces", "Georgia", serif;
  color: var(--ink);
  background: radial-gradient(circle at 20% 20%, #fff1df 0%, #fff7ef 40%, #f4e2cf 100%);
  min-height: 100vh;
  line-height: 1.6;
}

.page {
  position: relative;
  overflow-x: hidden;
}

.page::before,
.page::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(0px);
  z-index: 0;
  opacity: 0.5;
}

.page::before {
  top: -160px;
  right: -120px;
  background: radial-gradient(circle, #ffd7b8 0%, rgba(255, 215, 184, 0) 70%);
}

.page::after {
  bottom: -200px;
  left: -140px;
  background: radial-gradient(circle, #f6c9b6 0%, rgba(246, 201, 182, 0) 70%);
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  position: relative;
  z-index: 1;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-decoration: none;
  color: var(--ink);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 15px;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.85);
}

.hero {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
  margin-bottom: 36px;
  animation: rise 0.6s ease-out;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 10px;
}

.hero p {
  margin: 0 0 18px;
  color: var(--muted);
  font-family: "Figtree", "Arial", sans-serif;
}

.hero .hero-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 18px 40px var(--shadow);
  border: 1px solid rgba(27, 26, 24, 0.08);
}

.hero .hero-card strong {
  display: block;
  font-size: 18px;
  margin-bottom: 6px;
}

.section {
  background: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 16px 36px var(--shadow);
  border: 1px solid rgba(27, 26, 24, 0.08);
  margin-bottom: 24px;
  animation: fade 0.8s ease-out;
}

.section h2,
.section h3 {
  margin-top: 0;
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tool-form {
  display: grid;
  gap: 14px;
}

.tool-form label {
  font-family: "Figtree", "Arial", sans-serif;
  font-size: 14px;
  color: var(--muted);
}

.tool-form input,
.tool-form select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(27, 26, 24, 0.15);
  background: #fffdfb;
  font-family: "Figtree", "Arial", sans-serif;
  font-size: 15px;
}

.tool-form .row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.button {
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-dark));
  cursor: pointer;
  font-family: "Figtree", "Arial", sans-serif;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(212, 79, 47, 0.3);
}

.results {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.result-card {
  background: #fff5ea;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(27, 26, 24, 0.1);
}

.result-card span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
  font-family: "Figtree", "Arial", sans-serif;
}

.result-card strong {
  font-size: 20px;
}

.ad-slot {
  padding: 18px;
  border-radius: 16px;
  border: 2px dashed rgba(27, 26, 24, 0.2);
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.4);
  font-family: "Figtree", "Arial", sans-serif;
}

.list {
  display: grid;
  gap: 12px;
}

.list a {
  text-decoration: none;
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(27, 26, 24, 0.08);
  transition: transform 0.2s ease;
}

.list a:hover {
  transform: translateY(-2px);
}

.footer {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 30px;
  font-family: "Figtree", "Arial", sans-serif;
}

[dir="rtl"] {
  direction: rtl;
}

[dir="rtl"] .nav {
  flex-direction: row-reverse;
}

[dir="rtl"] .navlinks {
  flex-direction: row-reverse;
}

[dir="rtl"] .brand {
  align-items: flex-end;
  text-align: right;
}

[dir="rtl"] .hero,
[dir="rtl"] .panel,
[dir="rtl"] .card,
[dir="rtl"] .sectionTitle {
  text-align: right;
}

[dir="rtl"] .form {
  direction: rtl;
}

[dir="rtl"] .actions {
  justify-content: flex-end;
}

[dir="rtl"] input,
[dir="rtl"] select,
[dir="rtl"] .kpiItem .v,
[dir="rtl"] .resultList,
[dir="rtl"] .result-card strong {
  direction: ltr;
  unicode-bidi: bidi-override;
  text-align: left;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 720px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }
}
