@font-face {
  font-family: "HPCPersian";
  src: url("/assets/fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HPCPersian";
  src: url("/assets/fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --md-text-font: "HPCPersian";
  --md-code-font: "SFMono-Regular", Consolas, Monaco, monospace;
}

body,
.md-typeset,
.md-header,
.md-tabs,
.md-nav,
.md-search,
.md-footer {
  font-family: "HPCPersian", Vazirmatn, Tahoma, Arial, sans-serif;
}

.md-typeset {
  font-size: 0.78rem;
  line-height: 2.05;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  font-weight: 900;
  letter-spacing: -0.02em;
}

.md-typeset h1 {
  color: #eaf9ff;
}

.md-typeset h2 {
  color: #7dd3fc;
}

.md-typeset code,
.md-typeset pre {
  direction: ltr;
  text-align: left;
}

.md-typeset pre {
  border-radius: 14px;
}

.md-typeset table {
  font-size: 0.72rem;
}

.md-button {
  border-radius: 999px;
  font-weight: 800;
}

.help-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.help-card {
  border: 1px solid rgba(125, 211, 252, .22);
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(145deg, rgba(8, 20, 38, .8), rgba(20, 33, 62, .55));
  box-shadow: 0 18px 55px rgba(0, 0, 0, .22);
}

.help-card h3 {
  margin-top: 0;
  color: #a5f3fc;
}

.md-search__form {
  border-radius: 999px;
}

.md-nav__title {
  font-weight: 900;
}

.md-typeset .admonition,
.md-typeset details {
  border-radius: 16px;
}

.login-status,
#loginFormStatus {
  display: none !important;
}


/* ===== IASBS HPC Help top action bar ===== */
.hpc-help-entrybar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 28px;
  padding: 18px 20px;
  border: 1px solid rgba(125, 211, 252, .24);
  border-radius: 20px;
  background:
    radial-gradient(circle at 20% 10%, rgba(35, 228, 239, .14), transparent 34%),
    linear-gradient(135deg, rgba(8, 20, 38, .92), rgba(26, 36, 70, .78));
  box-shadow: 0 18px 55px rgba(0, 0, 0, .24);
}

.hpc-help-entrybar-text {
  display: grid;
  gap: 4px;
}

.hpc-help-entrybar-text strong {
  color: #eaf9ff;
  font-size: .86rem;
  font-weight: 900;
}

.hpc-help-entrybar-text span {
  color: rgba(226, 232, 240, .78);
  font-size: .68rem;
  line-height: 1.9;
}

.hpc-help-entrybar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hpc-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 900;
  text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.hpc-help-btn:hover {
  transform: translateY(-1px);
}

.hpc-help-btn-primary {
  color: #03101f !important;
  background: linear-gradient(135deg, #23e4ef, #7dd3fc);
  box-shadow: 0 14px 35px rgba(35, 228, 239, .22);
}

.hpc-help-btn-secondary {
  color: #eaf9ff !important;
  border: 1px solid rgba(167, 139, 250, .45);
  background: rgba(255, 255, 255, .06);
}

@media (max-width: 760px) {
  .hpc-help-entrybar {
    align-items: stretch;
    flex-direction: column;
  }

  .hpc-help-entrybar-actions {
    width: 100%;
  }

  .hpc-help-btn {
    flex: 1 1 100%;
  }
}


/* ===== IASBS HPC Help Phase 1 content polish ===== */
.md-typeset table:not([class]) {
  border-radius: 14px;
  overflow: hidden;
}

.md-typeset table:not([class]) th {
  font-weight: 900;
}

.md-typeset .highlight,
.md-typeset pre {
  box-shadow: 0 14px 38px rgba(0, 0, 0, .18);
}

.md-typeset .admonition-title {
  font-weight: 900;
}

.md-typeset ul li,
.md-typeset ol li {
  margin-bottom: .22rem;
}

.md-typeset .help-card p {
  margin-bottom: 0;
}


/* ===== IASBS HPC Help CodeBox Polish ===== */

/* Fix oversized headings and keep the documentation balanced */
.md-typeset h1 {
  font-size: 1.42rem;
  line-height: 1.75;
  margin-bottom: 1.1rem;
}

.md-typeset h2 {
  font-size: 1.16rem;
  line-height: 1.85;
  margin-top: 2.1rem;
}

.md-typeset h3 {
  font-size: .94rem;
  line-height: 1.85;
}

.md-typeset p,
.md-typeset li {
  font-size: .77rem;
}

.md-typeset table:not([class]) {
  font-size: .70rem;
}

/* Inline code */
.md-typeset :not(pre) > code {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  padding: .08rem .34rem;
  border-radius: .45rem;
  font-size: .72em;
  background: rgba(125, 211, 252, .10);
  border: 1px solid rgba(125, 211, 252, .16);
}

/* Block code container */
.md-typeset .highlight,
.md-typeset .hpc-codebox {
  position: relative;
  direction: ltr;
  text-align: left;
  margin: 1.05rem 0 1.4rem;
  border-radius: 18px;
  border: 1px solid rgba(125, 211, 252, .18);
  background:
    linear-gradient(135deg, rgba(5, 14, 27, .96), rgba(15, 23, 42, .94));
  box-shadow: 0 16px 44px rgba(0, 0, 0, .24);
  overflow: hidden;
}

/* Small label above code blocks */
.md-typeset .highlight::before,
.md-typeset .hpc-codebox::before {
  content: "دستور / نمونه کد";
  position: absolute;
  top: .52rem;
  right: .72rem;
  z-index: 3;
  direction: rtl;
  color: rgba(226, 232, 240, .72);
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: 0;
}

/* Real code text */
.md-typeset .highlight pre,
.md-typeset pre {
  direction: ltr !important;
  text-align: left !important;
  margin: 0 !important;
  padding: 2.25rem 1rem 1rem !important;
  overflow-x: auto;
  white-space: pre;
  border-radius: 18px;
  background: transparent !important;
}

.md-typeset .highlight pre code,
.md-typeset pre code {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: plaintext;
  white-space: pre;
  font-size: .73rem !important;
  line-height: 1.85 !important;
  font-weight: 500 !important;
  color: #e5f7ff;
}

/* Material copy button */
.md-typeset .highlight .md-clipboard {
  top: .48rem;
  left: .52rem;
  right: auto;
  width: auto;
  height: 30px;
  padding: 0 .62rem;
  border-radius: 999px;
  background: rgba(34, 211, 238, .13);
  border: 1px solid rgba(34, 211, 238, .25);
  color: #e0faff;
}

/* Fallback custom copy button */
.hpc-copy-btn {
  position: absolute;
  top: .48rem;
  left: .52rem;
  z-index: 10;
  min-height: 30px;
  padding: 0 .72rem;
  border: 1px solid rgba(34, 211, 238, .28);
  border-radius: 999px;
  background: rgba(34, 211, 238, .14);
  color: #e0faff;
  font-family: inherit;
  font-size: .62rem;
  font-weight: 900;
  cursor: pointer;
}

.hpc-copy-btn:hover {
  background: rgba(34, 211, 238, .22);
}

.hpc-copy-btn.is-copied {
  border-color: rgba(52, 211, 153, .45);
  background: rgba(16, 185, 129, .20);
  color: #d1fae5;
}

/* Prevent accidental huge #SBATCH rendering if a page still contains malformed code */
.md-typeset h1 code,
.md-typeset h2 code,
.md-typeset h3 code {
  font-size: .78em;
}

/* Better mobile code reading */
@media (max-width: 760px) {
  .md-typeset h1 {
    font-size: 1.22rem;
  }

  .md-typeset h2 {
    font-size: 1.04rem;
  }

  .md-typeset .highlight pre,
  .md-typeset pre {
    padding: 2.35rem .85rem .9rem !important;
  }

  .md-typeset .highlight pre code,
  .md-typeset pre code {
    font-size: .66rem !important;
  }
}


/* ===== IASBS HPC Help Final Code Fence Fix ===== */
.md-typeset .highlight,
.md-typeset .highlighttable,
.md-typeset .hpc-codebox {
  direction: ltr !important;
  text-align: left !important;
  border-radius: 18px !important;
  border: 1px solid rgba(125, 211, 252, .20);
  background: linear-gradient(135deg, rgba(5, 14, 27, .97), rgba(15, 23, 42, .95));
  box-shadow: 0 16px 44px rgba(0, 0, 0, .24);
  overflow: hidden;
}

.md-typeset .highlight pre,
.md-typeset .highlighttable pre,
.md-typeset pre {
  direction: ltr !important;
  text-align: left !important;
  margin: 0 !important;
  padding: 2.25rem 1rem 1rem !important;
  white-space: pre !important;
  overflow-x: auto !important;
  background: transparent !important;
}

.md-typeset .highlight code,
.md-typeset .highlighttable code,
.md-typeset pre code {
  direction: ltr !important;
  text-align: left !important;
  unicode-bidi: plaintext !important;
  white-space: pre !important;
  font-size: .73rem !important;
  line-height: 1.85 !important;
  font-weight: 500 !important;
}

.md-typeset .highlight::before,
.md-typeset .hpc-codebox::before {
  content: "دستور / نمونه کد";
  position: absolute;
  top: .52rem;
  right: .72rem;
  z-index: 3;
  direction: rtl;
  color: rgba(226, 232, 240, .72);
  font-size: .61rem;
  font-weight: 800;
}

.md-typeset .highlight {
  position: relative;
}

.md-typeset .highlight .md-clipboard {
  top: .48rem;
  left: .52rem;
  right: auto;
  border-radius: 999px;
  background: rgba(34, 211, 238, .13);
  border: 1px solid rgba(34, 211, 238, .25);
  color: #e0faff;
}

/* Keep accidental Markdown headings from becoming visually huge */
.md-typeset h1 {
  font-size: 1.36rem !important;
  line-height: 1.75 !important;
}

.md-typeset h2 {
  font-size: 1.10rem !important;
  line-height: 1.85 !important;
}

.md-typeset h3 {
  font-size: .92rem !important;
  line-height: 1.85 !important;
}


/* ===== IASBS HPC Help Phase 2 Slurm Pages Safe ===== */
.md-typeset .help-card-grid .help-card {
  min-height: 128px;
}

.md-typeset .help-card h3 {
  font-size: .86rem;
}

.md-typeset .help-card p {
  font-size: .70rem;
  line-height: 1.9;
}


/* ===== IASBS HPC Help Phase 3 Software Pages Safe ===== */
.md-typeset .help-card-grid .help-card {
  min-height: 128px;
}

.md-typeset .help-card h3 {
  font-size: .86rem;
}

.md-typeset .help-card p {
  font-size: .70rem;
  line-height: 1.9;
}


/* ===== IASBS HPC Help Phase 4 Troubleshooting Pages Safe ===== */
.md-typeset .admonition.tip,
.md-typeset .admonition.warning {
  border-radius: 16px;
}

.md-typeset table:not([class]) td,
.md-typeset table:not([class]) th {
  vertical-align: top;
}

.md-typeset .hpc-support-note {
  border: 1px solid rgba(125, 211, 252, .18);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(125, 211, 252, .07);
}

