/* Fiber Archive — fancyindex directory listings (always LTR) */
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/vazirmatn-arabic-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/vazirmatn-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/vazirmatn-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/vazirmatn-arabic-600.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/vazirmatn-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/vazirmatn-arabic-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/vazirmatn-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/fraunces-latin-600.woff2") format("woff2");
}

:root {
  --ink: #0b1220;
  --graphite: #1a2332;
  --fiber: #2ec4b6;
  --fiber-deep: #1a9e94;
  --paper: #f7f4ef;
  --slate: #8b95a8;
  --ink-soft: #2a3548;
  --font-fa: "Vazirmatn", sans-serif;
  --font-brand: "Fraunces", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  direction: ltr;
  scroll-behavior: smooth;
}

body,
.fi-body {
  margin: 0;
  min-height: 100vh;
  direction: ltr;
  unicode-bidi: isolate;
  font-family: var(--font-fa);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
  background:
    radial-gradient(120% 80% at 10% -10%, color-mix(in srgb, var(--fiber) 14%, transparent), transparent 55%),
    radial-gradient(90% 60% at 100% 0%, color-mix(in srgb, var(--ink) 8%, transparent), transparent 50%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--fiber-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--ink);
}

.fi-top {
  background: linear-gradient(165deg, var(--ink) 0%, var(--graphite) 100%);
  color: var(--paper);
  border-bottom: 2px solid var(--fiber);
}

.fi-top__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.1rem 1.25rem 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.fi-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--paper);
  text-decoration: none;
}

.fi-brand:hover {
  color: var(--fiber);
}

.fi-brand__mark {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.fi-brand__text {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.fi-brand__fa {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--font-fa);
  font-size: 0.8rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--paper) 70%, var(--fiber));
  direction: rtl;
  unicode-bidi: isolate;
}

.fi-top__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.875rem;
}

.fi-top__links a {
  color: color-mix(in srgb, var(--paper) 78%, var(--slate));
  text-decoration: none;
}

.fi-top__links a:hover {
  color: var(--fiber);
}

.fi-heading {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.35rem 1.25rem 1.65rem;
}

.fi-heading__label {
  margin: 0;
  font-family: var(--font-fa);
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.fi-heading__en {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 0.72em;
  color: color-mix(in srgb, var(--paper) 55%, var(--fiber));
  margin-inline-start: 0.35rem;
}

.fi-crumb {
  margin: 0.65rem 0 0;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: color-mix(in srgb, var(--paper) 82%, var(--slate));
  word-break: break-all;
  direction: ltr !important;
  unicode-bidi: isolate;
  text-align: left;
}

.fi-crumb a {
  color: color-mix(in srgb, var(--paper) 88%, var(--fiber));
  text-decoration: none;
  white-space: nowrap;
}

.fi-crumb a:hover {
  color: var(--fiber);
}

.fi-crumb__root {
  margin-inline-end: 0;
}

.fi-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  direction: ltr !important;
  unicode-bidi: isolate;
}

/* Hide ngx-fancyindex default path heading — we render our own crumb */
.fi-main > h1,
.fi-ngx-h1 {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#list {
  width: 100%;
  border-collapse: collapse;
  direction: ltr !important;
  unicode-bidi: isolate;
  text-align: left;
  background: color-mix(in srgb, var(--paper) 92%, white);
  border: 1px solid color-mix(in srgb, var(--slate) 35%, transparent);
  border-radius: 8px;
  overflow: hidden;
}

#list thead th {
  background: var(--graphite);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.8125rem;
  text-align: left;
  padding: 0.75rem 1rem;
  border: none;
}

#list thead th a {
  color: var(--paper);
  text-decoration: none;
}

#list thead th a:hover {
  color: var(--fiber);
}

#list tbody td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--slate) 28%, transparent);
  vertical-align: middle;
  text-align: left;
  direction: ltr;
  unicode-bidi: isolate;
}

#list tbody tr:last-child td {
  border-bottom: none;
}

#list tbody tr:hover td {
  background: color-mix(in srgb, var(--fiber) 8%, transparent);
}

#list .link a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink);
  text-decoration: none;
  direction: ltr;
  unicode-bidi: isolate;
}

#list .link a:hover {
  color: var(--fiber-deep);
}

#list .size,
#list .date {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--slate);
  white-space: nowrap;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

/* —— Footer —— */
.fi-foot {
  margin-top: auto;
  background: var(--ink);
  color: var(--slate);
  border-top: 1px solid color-mix(in srgb, var(--fiber) 35%, transparent);
  direction: ltr;
  unicode-bidi: isolate;
}

.fi-foot__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2.25rem;
  display: grid;
  gap: 1.25rem 2rem;
}

@media (min-width: 720px) {
  .fi-foot__inner {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
    align-items: end;
  }
}

.fi-foot__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--paper);
  text-decoration: none;
}

.fi-foot__logo:hover {
  color: var(--fiber);
}

.fi-foot__logo strong {
  display: block;
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.fi-foot__logo span span {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-fa);
  font-size: 0.8rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--paper) 65%, var(--fiber));
  direction: rtl;
  unicode-bidi: isolate;
}

.fi-foot__host {
  margin: 0.55rem 0 0;
  font-size: 0.8125rem;
}

.fi-foot__host code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: color-mix(in srgb, var(--slate) 80%, var(--fiber));
}

.fi-foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.15rem;
  align-items: center;
}

.fi-foot__nav a {
  color: color-mix(in srgb, var(--paper) 78%, var(--slate));
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
}

.fi-foot__nav a:hover {
  color: var(--fiber);
  border-bottom-color: color-mix(in srgb, var(--fiber) 45%, transparent);
}

.fi-foot__sep {
  margin: 0 0.3rem;
  color: color-mix(in srgb, var(--slate) 70%, transparent);
  font-weight: 400;
}

.fi-foot__copy {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--slate);
  font-family: var(--font-fa);
  direction: rtl;
  unicode-bidi: isolate;
  text-align: left;
}

@media (max-width: 640px) {
  .fi-top__links {
    width: 100%;
  }

  .fi-heading__label {
    font-size: 1.35rem;
  }

  .fi-crumb {
    font-size: 1rem;
  }

  #list thead th:nth-child(3),
  #list tbody td.date {
    display: none;
  }
}
