/* حسابیست ۲ — Glassmorphism theme. Logical properties only (RTL/LTR safe). */

:root {
  --hs-bg: #eef4ff;
  --hs-fg: #0b1b33;
  --hs-muted: #4a5d78;
  --hs-subtle: #7a8ba3;
  --hs-primary: #1d4ed8;
  --hs-primary-2: color-mix(in oklab, var(--hs-primary) 55%, #38bdf8);
  --hs-primary-fg: #ffffff;
  --hs-glass: rgba(255, 255, 255, 0.62);
  --hs-glass-solid: #ffffff;
  --hs-edge: rgba(255, 255, 255, 0.8);
  --hs-line: rgba(29, 78, 216, 0.14);
  --hs-wash: rgba(29, 78, 216, 0.07);
  --hs-danger: #b42318;
  --hs-shadow: 0 10px 34px -12px rgba(29, 78, 216, 0.28);
  --hs-blur: 18px;
  --hs-radius: 20px;
  --hs-font: "Vazirmatn", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

.dark {
  --hs-bg: #04070d;
  --hs-fg: #e6eefc;
  --hs-muted: #9fb0cc;
  --hs-subtle: #6f819f;
  --hs-primary: #4d8dff;
  --hs-primary-2: color-mix(in oklab, var(--hs-primary) 60%, #7dd3fc);
  --hs-primary-fg: #04101f;
  --hs-glass: rgba(14, 23, 41, 0.58);
  --hs-glass-solid: #0b111d;
  --hs-edge: rgba(130, 170, 255, 0.16);
  --hs-line: rgba(130, 170, 255, 0.16);
  --hs-wash: rgba(77, 141, 255, 0.1);
  --hs-danger: #f0928a;
  --hs-shadow: 0 12px 40px -14px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

/* Bilingual switching: both languages are in the markup, CSS shows one. */
html[lang="en"] [data-fa] { display: none !important; }
html:not([lang="en"]) [data-en] { display: none !important; }

body {
  margin: 0;
  background: var(--hs-bg);
  color: var(--hs-fg);
  font-family: var(--hs-font);
  line-height: 1.7;
  min-height: 100vh;
}

.hs-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60rem 38rem at 85% -10%, color-mix(in oklab, var(--hs-primary) 26%, transparent), transparent 62%),
    radial-gradient(48rem 34rem at 0% 18%, color-mix(in oklab, var(--hs-primary-2) 22%, transparent), transparent 62%),
    radial-gradient(42rem 30rem at 60% 108%, color-mix(in oklab, var(--hs-primary) 16%, transparent), transparent 62%);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--hs-primary); outline-offset: 2px; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.hs-skip { position: absolute; inset-inline-start: -999px; top: 0; }
.hs-skip:focus { inset-inline-start: 12px; top: 12px; background: var(--hs-glass-solid); padding: 8px 14px; border-radius: 10px; z-index: 100; }

.hs-wrap { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }

/* ---------- Glass surface ---------- */
.hs-glass {
  background: var(--hs-glass);
  border: 1px solid var(--hs-edge);
  border-radius: var(--hs-radius);
  box-shadow: var(--hs-shadow);
  -webkit-backdrop-filter: blur(var(--hs-blur)) saturate(150%);
  backdrop-filter: blur(var(--hs-blur)) saturate(150%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hs-glass { background: var(--hs-glass-solid); }
}
@media (prefers-reduced-transparency: reduce) {
  .hs-glass { background: var(--hs-glass-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- Header ---------- */
.hs-header { position: sticky; top: 0; z-index: 50; padding-block: 12px 0; }
.hs-header .hs-wrap { position: relative; }
.hs-bar { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px; border-radius: 18px; background: color-mix(in oklab, var(--hs-glass-solid) 74%, transparent); }
.hs-brand { display: flex; align-items: center; gap: 12px; }
.hs-brand .custom-logo { width: 36px; height: 36px; border-radius: 10px; object-fit: contain; }
.hs-mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 700; color: var(--hs-primary-fg);
  background: linear-gradient(135deg, var(--hs-primary), var(--hs-primary-2));
  box-shadow: 0 6px 16px -6px var(--hs-primary);
}
.hs-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.hs-brand-fa { font-weight: 700; font-size: 15px; }
.hs-brand-en { font-size: 10px; letter-spacing: 0.22em; color: var(--hs-muted); }

.hs-nav { margin-inline-start: auto; }
.hs-menu { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.hs-menu li { position: relative; }
.hs-menu a { display: block; padding: 8px 14px; border-radius: 12px; color: var(--hs-muted); font-size: 14px; transition: background 0.2s, color 0.2s; }
.hs-menu a:hover, .hs-menu .current-menu-item > a, .hs-menu .current_page_item > a { background: var(--hs-wash); color: var(--hs-primary); }
.hs-menu .sub-menu {
  display: none; position: absolute; inset-inline-start: 0; top: 100%; min-width: 190px; margin: 6px 0 0; padding: 6px; list-style: none;
  background: var(--hs-glass-solid); border: 1px solid var(--hs-line); border-radius: 14px; box-shadow: var(--hs-shadow); z-index: 5;
}
.hs-menu li:hover > .sub-menu, .hs-menu li:focus-within > .sub-menu { display: block; }

.hs-actions { display: flex; align-items: center; gap: 6px; }
.hs-icon-btn {
  display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--hs-line);
  border-radius: 12px; background: var(--hs-wash); color: var(--hs-fg); font-size: 13px; font-weight: 600; transition: background 0.2s, transform 0.2s;
}
.hs-icon-btn:hover { background: color-mix(in oklab, var(--hs-primary) 16%, transparent); }
.hs-i-sun { display: none; }
.dark .hs-i-sun { display: block; }
.dark .hs-i-moon { display: none; }

.hs-burger { display: none; }
.hs-burger-lines { display: grid; gap: 4px; width: 18px; }
.hs-burger-lines i { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.25s, opacity 0.2s; }
.hs-burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hs-burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.hs-burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 720px) {
  .hs-burger { display: inline-grid; }
  .hs-actions { margin-inline-start: auto; }
  .hs-nav {
    display: none; position: absolute; inset-inline: 0; top: calc(100% + 8px); margin: 0; padding: 10px; border-radius: 18px;
    background: var(--hs-glass-solid); border: 1px solid var(--hs-line); box-shadow: var(--hs-shadow);
    max-height: calc(100vh - 100px); overflow-y: auto;
  }
  .hs-header.is-open .hs-nav { display: block; }
  .hs-menu { flex-direction: column; gap: 0; }
  .hs-menu a { padding: 12px 14px; font-size: 15px; }
  .hs-menu .sub-menu { display: block; position: static; box-shadow: none; border: 0; margin: 0; padding-inline-start: 14px; background: transparent; }
}

/* ---------- Hero ---------- */
.hs-hero { padding: 64px 0 24px; text-align: center; }
.hs-kicker { font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--hs-primary); margin: 0 0 10px; font-weight: 600; }
.hs-hero-title {
  font-size: clamp(42px, 8vw, 76px); line-height: 1.15; margin: 0; letter-spacing: -0.03em; font-weight: 700; text-wrap: balance;
  background: linear-gradient(135deg, var(--hs-fg) 10%, var(--hs-primary) 55%, var(--hs-primary-2));
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.hs-lead { font-size: 18px; color: var(--hs-muted); max-width: 38rem; margin: 14px auto 0; }

.hs-search { position: relative; display: flex; align-items: center; gap: 10px; width: min(560px, 100%); margin: 28px auto 0; padding: 0 18px; height: 56px; border-radius: 18px; color: var(--hs-muted); }
.hs-search input[type="search"] { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font-size: 16px; outline: none; color: var(--hs-fg); }
.hs-search:focus-within { border-color: var(--hs-primary); box-shadow: 0 0 0 4px color-mix(in oklab, var(--hs-primary) 18%, transparent), var(--hs-shadow); }
.hs-suggest { position: absolute; inset-inline: 0; top: calc(100% + 8px); z-index: 20; padding: 6px; text-align: start; background: var(--hs-glass-solid); }
.hs-suggest a { display: block; padding: 10px 14px; border-radius: 12px; font-size: 15px; color: var(--hs-fg); }
.hs-suggest a:hover, .hs-suggest a:focus { background: var(--hs-wash); color: var(--hs-primary); }

.hs-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.hs-stats > div { display: flex; flex-direction: column-reverse; align-items: center; min-width: 112px; padding: 12px 20px; border-radius: 16px; }
.hs-stats dt { font-size: 12px; color: var(--hs-subtle); }
.hs-stats dd { margin: 0; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--hs-primary); }

/* ---------- Sections ---------- */
.hs-section { padding-block: 28px; }
.hs-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.hs-section-head h1, .hs-section-head h2 { margin: 0; font-size: 22px; font-weight: 700; }
.hs-section-head h1 { font-size: 28px; }

.hs-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.hs-cat { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; transition: transform 0.2s, border-color 0.2s; }
.hs-cat:hover { transform: translateY(-3px); border-color: var(--hs-primary); }
.hs-cat strong { font-size: 15px; }
.hs-cat small { color: var(--hs-subtle); font-size: 12px; }

.hs-pills { display: flex; gap: 8px; overflow-x: auto; padding-block: 4px 10px; scrollbar-width: none; }
.hs-pills::-webkit-scrollbar { display: none; }
.hs-pill {
  flex: none; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--hs-edge); white-space: nowrap;
  background: var(--hs-glass); color: var(--hs-muted); font-size: 14px; display: inline-flex; align-items: center; gap: 4px; transition: background 0.2s, color 0.2s;
}
.hs-pill:hover { color: var(--hs-primary); }
.hs-pill.is-active { background: linear-gradient(135deg, var(--hs-primary), var(--hs-primary-2)); color: var(--hs-primary-fg); border-color: transparent; }

/* ---------- Tool cards ---------- */
.hs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
@media (min-width: 768px) { .hs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1024px) { .hs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.hs-card {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 18px;
  background: var(--hs-glass); border: 1px solid var(--hs-edge); box-shadow: var(--hs-shadow);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s;
}
.hs-card:hover { transform: translateY(-3px); border-color: var(--hs-primary); }
.hs-card-icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 8px; color: var(--hs-primary-fg);
  background: linear-gradient(135deg, var(--hs-primary), var(--hs-primary-2)); box-shadow: 0 6px 14px -6px var(--hs-primary);
}
.hs-card-title { margin: 0; font-size: 15px; font-weight: 700; }
.hs-card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.hs-card-text { margin: 0; font-size: 13px; color: var(--hs-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hs-card-post .hs-card-title { font-size: 17px; }

.hs-fav {
  position: absolute; inset-block-start: 10px; inset-inline-end: 10px; z-index: 2; display: grid; place-items: center; width: 32px; height: 32px;
  border: 0; border-radius: 10px; background: transparent; color: var(--hs-subtle); transition: color 0.2s, background 0.2s, transform 0.2s;
}
.hs-fav:hover { background: var(--hs-wash); color: var(--hs-primary); }
.hs-fav svg { fill: none; }
.hs-fav[aria-pressed="true"] { color: #f5a524; }
.hs-fav[aria-pressed="true"] svg { fill: currentColor; }
.hs-fav-lg { position: static; width: 40px; height: 40px; border: 1px solid var(--hs-line); background: var(--hs-wash); flex: none; }

/* ---------- Tool page ---------- */
.hs-tool-page { padding: 24px 0 40px; }
.hs-crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--hs-muted); }
.hs-crumbs a:hover { color: var(--hs-primary); }
.hs-tool-layout { display: grid; gap: 20px; margin-top: 16px; }
@media (min-width: 960px) { .hs-tool-layout { grid-template-columns: 1.15fr 0.85fr; align-items: start; } }
.hs-panel { padding: 28px; }
.hs-tool-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.hs-tool-head h1 { margin: 2px 0 0; font-size: 28px; line-height: 1.3; }
.hs-aside { display: grid; gap: 14px; }
.hs-box-pad { padding: 20px 24px; }
.hs-related { display: grid; gap: 12px; }

.hs-field { display: block; margin-bottom: 14px; }
.hs-field > span { display: block; margin-bottom: 6px; font-size: 14px; color: var(--hs-muted); }
.hs-field input, .hs-field textarea, .hs-field select {
  width: 100%; border: 1px solid var(--hs-line); border-radius: 12px; background: var(--hs-wash); padding: 12px 14px; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.hs-field input:focus, .hs-field textarea:focus, .hs-field select:focus { border-color: var(--hs-primary); box-shadow: 0 0 0 4px color-mix(in oklab, var(--hs-primary) 16%, transparent); }
.hs-field textarea { min-height: 140px; font-family: ui-monospace, monospace; }
.hs-field input[type="range"] { padding: 0; height: 28px; accent-color: var(--hs-primary); background: transparent; border: 0; box-shadow: none; }
.hs-range-out { float: inline-end; font-variant-numeric: tabular-nums; color: var(--hs-primary); font-weight: 600; }
.hs-field select option { color: #0b1b33; }

.hs-btn, .hs-ghost {
  display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 20px; border: 0; border-radius: 12px; font-weight: 600;
}
.hs-btn { background: linear-gradient(135deg, var(--hs-primary), var(--hs-primary-2)); color: var(--hs-primary-fg); box-shadow: 0 8px 20px -8px var(--hs-primary); transition: transform 0.2s, opacity 0.2s; }
.hs-btn:hover { transform: translateY(-1px); opacity: 0.95; }
.hs-ghost { background: var(--hs-wash); color: var(--hs-muted); }

.hs-result { margin-top: 14px; background: var(--hs-wash); border: 1px solid var(--hs-line); border-radius: 14px; padding: 14px 16px; }
.hs-result small { display: block; color: var(--hs-muted); font-size: 13px; }
.hs-result strong { display: block; font-size: 22px; color: var(--hs-primary); white-space: pre-wrap; word-break: break-word; font-variant-numeric: tabular-nums; }
.hs-result.is-error strong { color: var(--hs-danger); }

.hs-counter { text-align: center; }
.hs-counter b { font-size: 56px; font-variant-numeric: tabular-nums; }
.hs-row { display: flex; gap: 8px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.hs-breath {
  width: 144px; height: 144px; border-radius: 999px; margin: 16px auto; color: var(--hs-primary-fg); display: grid; place-items: center;
  background: linear-gradient(135deg, var(--hs-primary), var(--hs-primary-2)); box-shadow: 0 0 60px -10px var(--hs-primary); transition: transform 4s ease-in-out;
}
.hs-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: 13px; }
.hs-cal b { font-variant-numeric: tabular-nums; padding: 8px 0; border-radius: 10px; }
.hs-cal .today { background: var(--hs-primary); color: var(--hs-primary-fg); }
.hs-clock { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--hs-line); font-variant-numeric: tabular-nums; }
.hs-swatch { height: 40px; border-radius: 8px; border: 0; }
.hs-swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }

/* ---------- Content (pages, posts, editor blocks) ---------- */
.hs-prose { padding: 40px 0 60px; max-width: 760px; }
.hs-prose h1 { font-size: 34px; letter-spacing: -0.02em; margin-top: 0; }
.hs-content a, .hs-prose-inline a { color: var(--hs-primary); text-decoration: underline; text-underline-offset: 3px; }
.hs-content img, .hs-prose-inline img { border-radius: 14px; }
.hs-content blockquote { margin-inline: 0; padding-inline-start: 16px; border-inline-start: 3px solid var(--hs-primary); color: var(--hs-muted); }
.hs-content pre, .hs-content code { background: var(--hs-wash); border-radius: 8px; }
.hs-content pre { padding: 14px; overflow-x: auto; direction: ltr; }
.hs-content table { width: 100%; border-collapse: collapse; }
.hs-content th, .hs-content td { padding: 8px 10px; border-bottom: 1px solid var(--hs-line); }
.hs-content .alignwide { width: min(1180px, 100vw - 32px); max-width: none; }
.hs-article { padding: 20px 24px; margin-bottom: 14px; }
.hs-article h2 { margin: 0 0 6px; font-size: 20px; }
.hs-404 { text-align: center; margin-inline: auto; padding: 100px 0; }
.hs-woo { max-width: 1180px; }
.has-hs-blue-color { color: #1d4ed8; } .has-hs-blue-background-color { background: #1d4ed8; }
.has-hs-sky-color { color: #4d8dff; } .has-hs-sky-background-color { background: #4d8dff; }
.has-hs-navy-color { color: #0b2a5c; } .has-hs-navy-background-color { background: #0b2a5c; }
.has-hs-white-color { color: #fff; } .has-hs-white-background-color { background: #fff; }
.has-hs-ink-color { color: #05080f; } .has-hs-ink-background-color { background: #05080f; }
.hs-prose .page-numbers, .hs-section .page-numbers { display: inline-block; padding: 6px 12px; border-radius: 10px; background: var(--hs-glass); margin-inline-end: 4px; }
.hs-section .nav-links, .hs-prose .nav-links { margin-top: 20px; }

/* ---------- Footer ---------- */
.hs-footer { margin-top: 56px; padding-bottom: 28px; }
.hs-footer-box { padding: 32px; }
.hs-footer-grid { display: grid; gap: 28px; }
@media (min-width: 768px) { .hs-footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.hs-footer-brand { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.hs-muted { color: var(--hs-muted); font-size: 14px; }
.hs-footer ul { list-style: none; margin: 0; padding: 0; }
.hs-footer li { margin: 6px 0; }
.hs-footer a { color: var(--hs-muted); font-size: 14px; }
.hs-footer a:hover { color: var(--hs-primary); }
.hs-copy { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--hs-line); font-size: 13px; }
.hs-widget-title { font-size: 15px; margin: 0 0 8px; }

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

.hs-debug { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--hs-wash); border: 1px dashed var(--hs-line); font: 12px/1.6 ui-monospace, monospace; direction: ltr; text-align: left; white-space: pre-wrap; }
