@font-face {
  font-family: Vazirmatn;
  src: url("/vazirmatn-arabic-wght-normal.woff2");
  font-weight: 100 900;
  font-display: swap;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: #f4f5f2;
  color: #2f3e46;
  font:
    15px/2.15 Vazirmatn,
    Tahoma,
    sans-serif;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
input,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #f2a900;
  outline-offset: 4px;
}
.container {
  max-width: 1120px;
  padding: 0 28px;
  margin: auto;
}
header {
  border-bottom: 1px solid #dfe4da;
  background: #fff;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 79px;
  gap: 20px;
}
.brand {
  font-size: 25px;
  font-weight: 850;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img {
  width: 38px;
  height: 38px;
}
.top-nav {
  display: flex;
  gap: 25px;
  font-size: 12px;
}
.top-nav a {
  text-decoration: none;
}
.hero {
  background: #2f3e46;
  color: #fff;
  padding: 48px 0 45px;
}
.breadcrumb {
  font-size: 11px;
  color: #bdccc5;
}
.breadcrumb a {
  text-decoration: none;
}
.eyebrow {
  font-size: 12px;
  color: #f2c65a;
  margin-top: 18px;
}
h1 {
  font-size: 36px;
  line-height: 1.8;
  letter-spacing: -0.7px;
  font-weight: 800;
  margin: 10px 0 15px;
  max-width: 870px;
}
.hero p {
  max-width: 850px;
  font-size: 14px;
  color: #d1ddd4;
  line-height: 2.2;
}
.hero-tags {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.hero-tags span {
  font-size: 10px;
  padding: 4px 10px;
  border: 1px solid #78908570;
  border-radius: 4px;
  color: #dbe4db;
}
main {
  padding-top: 30px;
}
.tool-box,
.article-section,
.faq,
.reference,
.hub-intro {
  border: 1px solid #e1e5db;
  background: white;
  border-radius: 11px;
  padding: 28px;
  margin-bottom: 24px;
}
h2 {
  font-size: 23px;
  line-height: 1.9;
  margin: 0 0 17px;
}
h3 {
  font-size: 17px;
  margin: 0 0 12px;
}
.tool-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 25px;
}
.tool-heading h2 {
  margin: 0;
}
.badge {
  font-size: 10px;
  color: #647659;
  background: #edf2e6;
  border-radius: 4px;
  padding: 5px 10px;
}
.tool-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 30px;
  align-items: start;
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}
.tool-field {
  display: block;
  min-width: 0;
}
.tool-field > span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 7px;
}
.tool-field small {
  font-size: 10px;
  display: block;
  color: #53624e;
  margin-top: 4px;
}
.tool-field input,
.tool-field textarea {
  padding: 11px 12px;
  border: 1px solid #dce2d7;
  border-radius: 6px;
  background: #fbfcf9;
  color: #2f3e46;
  width: 100%;
  min-width: 0;
  outline: none;
  direction: ltr;
  text-align: right;
}
.tool-field input:focus,
.tool-field textarea:focus {
  border-color: #ab861f;
  box-shadow: 0 0 0 3px #f2a90022;
}
.tool-field textarea {
  min-height: 115px;
  resize: vertical;
  font-family: monospace;
  font-size: 13px;
  text-align: left;
}
.tool-field.wide {
  grid-column: 1/-1;
}
.tool-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.btn {
  padding: 10px 16px;
  border: 1px solid #dce1d7;
  border-radius: 6px;
  font-weight: 650;
  font-size: 12px;
  color: #2f3e46;
  background: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
}
.btn.primary {
  background: #f2a900;
  border-color: #f2a900;
}
.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}
.result-side {
  background: #eef1e7;
  border: 1px solid #d9dfcf;
  border-radius: 8px;
  padding: 22px;
  min-height: 220px;
  position: sticky;
  top: 20px;
}
.result-side > p {
  font-size: 11px;
  color: #53624e;
}
.tool-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}
.tool-metrics > div {
  padding: 13px;
  background: #ffffffb0;
  border-radius: 6px;
}
.tool-metrics span,
.tool-metrics small {
  display: block;
  font-size: 10px;
  color: #6d7b65;
}
.tool-metrics strong {
  display: block;
  font-size: 24px;
  line-height: 1.7;
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.result-side li {
  font-size: 11px;
  overflow-wrap: anywhere;
  margin-bottom: 12px;
}
.result-side ol {
  padding-inline-start: 20px;
}
.result-side h3 {
  font-size: 17px;
}
.result-side p {
  font-size: 11px;
  line-height: 2.1;
}
.tool-error {
  color: #a33d22;
  font-size: 12px;
  line-height: 2;
  margin-top: 15px;
}
.tool-error:empty {
  display: none;
}
.assumptions {
  border-top: 1px dashed #dce2d4;
  margin-top: 26px;
  padding-top: 18px;
  font-size: 12px;
  color: #53624e;
}
.article-section p,
.faq p,
.reference p {
  color: #53624e;
  line-height: 2.3;
  font-size: 14px;
}
.example {
  background: #edf1e5;
  border-color: #d9e1ca;
}
.formula {
  display: block;
  direction: ltr;
  text-align: left;
  font: 12px/1.9 monospace;
  background: #f3f5ef;
  padding: 17px;
  border-radius: 6px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.guide-grid > div {
  border: 1px solid #e6e9e1;
  padding: 14px;
  border-radius: 6px;
}
.guide-grid h3 {
  font-size: 13px;
}
.guide-grid p {
  font-size: 12px;
  margin: 6px 0;
}
.faq details {
  border-bottom: 1px solid #e3e8dd;
  padding: 15px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 14px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 28px;
}
.related-grid a,
.tool-card {
  background: #fff;
  border: 1px solid #e0e5d9;
  border-radius: 8px;
  padding: 20px;
  text-decoration: none;
}
.related-grid a {
  font-size: 12px;
}
.related-grid a:hover,
.tool-card:hover {
  border-color: #b8a565;
}
.reference {
  font-size: 12px;
}
.reference p {
  font-size: 12px;
}
.reference a {
  font-size: 12px;
}
.site-footer {
  padding: 30px 0 38px;
  border-top: 1px solid #dce2d4;
  margin-top: 35px;
  font-size: 11px;
  color: #53624e;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 35px;
}
.tool-card span {
  font-size: 10px;
  color: #53624e;
}
.tool-card h2 {
  font-size: 17px;
  margin: 8px 0;
}
.tool-card p {
  font-size: 11px;
  line-height: 2;
  color: #53624e;
}
.hub-groups {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.hub-groups a {
  font-size: 12px;
  padding: 7px 13px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #dce2d7;
  text-decoration: none;
}
.hub-intro p {
  font-size: 14px;
  line-height: 2.3;
  color: #65745f;
}
.privacy-list li {
  margin-bottom: 14px;
}
.hub-group h2 {
  margin-top: 35px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
@media (max-width: 850px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
  .result-side {
    position: static;
  }
  .hub-grid {
    grid-template-columns: 1fr 1fr;
  }
  h1 {
    font-size: 29px;
  }
}
@media (max-width: 500px) {
  body {
    font-size: 13px;
  }
  .container {
    padding: 0 17px;
  }
  .header-inner {
    min-height: 66px;
    gap: 10px;
  }
  .brand {
    font-size: 22px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .top-nav {
    font-size: 10px;
    gap: 12px;
  }
  .hero {
    padding: 28px 0;
  }
  .hero p {
    font-size: 12px;
  }
  h1 {
    font-size: 26px;
  }
  .breadcrumb {
    font-size: 10px;
  }
  .eyebrow {
    font-size: 10px;
  }
  .tool-box,
  .article-section,
  .faq,
  .reference,
  .hub-intro {
    padding: 21px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
  }
  h2 {
    font-size: 20px;
  }
  .tool-heading {
    gap: 8px;
    margin-bottom: 20px;
  }
  .tool-heading h2 {
    font-size: 18px;
  }
  .badge {
    font-size: 9px;
  }
  .field-grid {
    gap: 14px 10px;
  }
  .tool-field > span {
    font-size: 11px;
  }
  .tool-field input {
    font-size: 14px;
    padding: 11px 9px;
  }
  .tool-field small {
    font-size: 9px;
  }
  .result-side {
    padding: 17px;
  }
  .tool-metrics strong {
    font-size: 23px;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .article-section p,
  .faq p {
    font-size: 13px;
  }
  .related-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .related-grid a {
    font-size: 11px;
    padding: 14px;
  }
  .hub-grid {
    grid-template-columns: 1fr;
  }
  .tool-actions .btn {
    flex: 1;
    font-size: 11px;
  }
  .formula {
    font-size: 11px;
  }
  .tool-card h2 {
    font-size: 18px;
  }
  .hero-tags {
    gap: 6px;
  }
  .hero-tags span {
    font-size: 9px;
  }
  .site-footer {
    font-size: 10px;
  }
  .footer-inner {
    flex-direction: column;
    gap: 10px;
  }
}
@media print {
  header,
  .hero-tags,
  .tool-actions,
  .top-nav,
  .related-grid,
  .site-footer,
  #tool-example,
  form,
  .assumptions {
    display: none !important;
  }
  body {
    background: #fff;
    font-size: 12px;
  }
  .hero {
    background: white;
    color: #2f3e46;
    padding: 0;
  }
  .hero p {
    color: #536251;
  }
  .breadcrumb,
  .eyebrow {
    display: none;
  }
  .container {
    max-width: none;
    padding: 0;
  }
  .tool-layout {
    display: block;
  }
  .result-side {
    position: static;
    background: #fff;
    border: 1px solid #ccc;
  }
  .tool-box,
  .article-section,
  .faq,
  .reference {
    break-inside: avoid;
    padding: 14px;
  }
  .tool-metrics strong {
    font-size: 20px;
  }
  @page {
    size: A4;
    margin: 15mm;
  }
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.scenario-grid article {
  background: #f4f5f2;
  border: 1px solid #d8dfd5;
  border-radius: 10px;
  padding: 20px;
  min-width: 0;
}
.scenario-grid dl {
  font-size: 13px;
}
.scenario-grid dl > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #d8dfd5;
  padding: 6px 0;
}
.scenario-grid dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.scenario-grid h4 {
  margin-bottom: 8px;
}
.scenario-grid li {
  font-size: 14px;
}
.scenario-grid .btn {
  white-space: normal;
}
@media (max-width: 650px) {
  .scenario-grid {
    grid-template-columns: 1fr;
  }
}
