@font-face {
  font-family: IranSansX;
  src: url("/assets/iransansx.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: IranSansX, Tahoma, sans-serif;
  color: #092564;
  background: #f5f7fb;
  font-synthesis: none;
  --blue: #0879d0;
  --blue-dark: #0669b5;
  --navy: #092564;
  --muted: #5b6780;
  --space-50: 4px;
  --space-75: 8px;
  --space-100: 12px;
  --space-200: 16px;
  --space-300: 24px;
  --space-400: 32px;
  --space-500: 40px;
  --space-600: 48px;
  --space-700: 64px;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button[hidden] { display: none; }
button:disabled { cursor: wait; opacity: 0.6; }
img { max-width: 100%; display: block; }
h1, p { margin: 0; }
h1 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }

.heading-5 { font-size: 1.5rem; line-height: 2rem; font-weight: 600; }
.body-3 { font-size: 1rem; line-height: 1.5rem; font-weight: 400; }
.body-6 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; }
.button-md { font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.caption-2 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; }

.skip-link {
  position: fixed;
  z-index: 1;
  inset-block-start: var(--space-200);
  inset-inline-start: var(--space-200);
  padding: var(--space-100) var(--space-200);
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.page-shell {
  min-height: 100svh;
  width: min(100%, 576px);
  margin-inline: auto;
  padding: var(--space-600) var(--space-300) var(--space-300);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-200);
  padding-inline: var(--space-75);
  margin-block-end: var(--space-300);
}
.brand img { width: 151px; height: 40px; }
.brand span { color: var(--muted); }
.status-panel {
  padding: var(--space-500) var(--space-400);
  background: #fff;
  border: 1px solid #e1e7f0;
  border-radius: 16px;
  box-shadow: 0 8px 32px #09256408;
}
.status-panel:focus { outline: none; }
.status-panel:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.status-visual {
  display: flex;
  align-items: center;
  gap: var(--space-75);
  width: fit-content;
  min-height: 48px;
  padding: var(--space-200);
  background: #edf5fc;
  border-radius: 12px;
  margin-block-end: var(--space-300);
}
.status-visual span {
  display: block;
  width: 8px;
  height: 16px;
  border-radius: 4px;
  background: var(--blue);
}
.status-visual span:nth-child(2) { height: 24px; }
.status-visual span:nth-child(3) { height: 32px; }
[data-state="checking"] .status-visual span {
  animation: checking 1.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
[data-state="checking"] .status-visual span:nth-child(2) { animation-delay: 160ms; }
[data-state="checking"] .status-visual span:nth-child(3) { animation-delay: 320ms; }
[data-state="unreachable"] .status-visual,
[data-state="offline"] .status-visual { background: #fff4e4; }
[data-state="unreachable"] .status-visual span,
[data-state="offline"] .status-visual span { background: #996015; }
[data-state="reachable"] .status-visual { background: #eaf6ef; }
[data-state="reachable"] .status-visual span { background: #23754c; }
.status-copy h1 { margin-block-end: var(--space-200); }
#status-message { color: #273d67; }
#status-detail { margin-block-start: var(--space-200); color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-100); margin-block-start: var(--space-400); }
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: var(--space-75);
  padding: var(--space-75) var(--space-100);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 300ms cubic-bezier(0.22, 1, 0.36, 1), transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}
.button-primary { color: #fff; background: var(--blue); flex: 1; }
.button-secondary { color: var(--navy); background: #f2f5fa; flex: 1; }
.button-primary:hover:enabled { background: var(--blue-dark); }
.button-secondary:hover { background: #e7edf6; }
.button:active:enabled, a.button:active { transform: scale(0.98); }
.button:focus-visible, .skip-link:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.button-primary:focus-visible { outline-color: var(--navy); }
.button span { font-family: inherit; }
.noscript-note { margin-block-start: var(--space-300); color: var(--muted); }
.page-footer { color: var(--muted); text-align: center; margin-block-start: var(--space-300); }

@keyframes checking { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

@media (max-width: 420px) {
  .page-shell { padding: var(--space-400) var(--space-200) var(--space-300); }
  .status-panel { padding: var(--space-400) var(--space-300); }
  .actions { flex-direction: column; }
  .button { width: 100%; }
}

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