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

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

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

:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-soft: #fafaf8;
  --text: #17181a;
  --muted: #6f7378;
  --line: #e4e3df;
  --line-strong: #d2d1cc;
  --accent: #155e52;
  --accent-hover: #114a41;
  --accent-soft: #edf3f1;
  --danger: #a3352c;
  --danger-soft: #fbf0ee;
  --danger-line: #e6c3be;
  --radius: 10px;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

a:hover {
  border-bottom-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -48px;
  z-index: 10;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  transition: top 0.12s ease;
}

.skip-link:focus {
  top: 10px;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 940px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  flex-wrap: wrap;
  min-height: 56px;
}

.brand {
  border-bottom: none;
  color: var(--text);
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.brand-dot {
  color: var(--accent);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.navlink {
  font-size: 13px;
  font-weight: 500;
  border-bottom: none;
  color: var(--accent);
}

.navlink:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.page {
  max-width: 940px;
  width: 100%;
  margin: 0 auto;
  padding: 26px 20px 56px;
  flex: 1 0 auto;
}

.hero {
  padding: 14px 0 6px;
}

.hero-title {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.hero-sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero-user {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
}

.hero-user bdi {
  color: var(--text);
  font-weight: 500;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  border-bottom-width: 1px;
}

.btn:hover {
  border-color: #b9b8b3;
  background: var(--surface-soft);
}

.btn-primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  height: 48px;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-ghost {
  background: var(--surface);
}

.btn-ghost:hover {
  background: var(--surface-soft);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.kicker {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.2px;
}

.services {
  margin-top: 28px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.section-title {
  font-size: 17px;
  font-weight: 600;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px 14px;
}

.service-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  border-bottom-width: 1px;
  transition: border-color 0.12s ease, background 0.12s ease;
}

a.service-card:hover {
  border-color: #b9b8b3;
  background: var(--surface-soft);
  border-bottom-color: #b9b8b3;
}

.service-card.is-soon {
  background: var(--surface-soft);
}

.service-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.service-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.service-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.service-name {
  font-size: 14px;
  font-weight: 600;
}

.service-desc {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.service-host {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.service-arrow {
  margin-inline-start: auto;
  align-self: center;
  color: var(--accent);
  font-size: 16px;
}

.badge {
  display: inline-block;
  font-size: 11.5px;
  line-height: 1.7;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-soft);
  color: #44484d;
  white-space: nowrap;
}

.badge-live {
  color: var(--accent);
  border-color: #bcd3cd;
  background: var(--accent-soft);
}

.badge-soon {
  color: var(--muted);
}

.notice {
  margin-top: 14px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 13px;
  color: #3f4348;
}

.notice-list {
  padding-inline-start: 18px;
  margin: 4px 0 0;
  font-size: 13px;
}

.notice-list li {
  margin-bottom: 2px;
}

.notice-error {
  background: var(--danger-soft);
  border-color: var(--danger-line);
  border-inline-start-color: var(--danger);
}

.notice-ok {
  background: var(--accent-soft);
  border-color: #bcd3cd;
  border-inline-start-color: var(--accent);
  color: var(--accent-hover);
}

.auth-slot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.auth-btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
}

.auth-btn-ghost {
  background: transparent;
  color: var(--accent);
}

.auth-btn-ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.auth-slot.is-user {
  gap: 7px;
  padding: 3px 4px 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.auth-avatar {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.auth-identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.auth-name,
.auth-email {
  display: block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.auth-email {
  font-size: 10.5px;
  color: var(--muted);
  direction: ltr;
  text-align: right;
}

.auth-link {
  font-family: inherit;
  font-size: 11.5px;
  line-height: 1;
  padding: 6px 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.auth-link:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.auth-logout {
  display: inline-flex;
  margin: 0;
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: auto;
}

.footer-inner {
  max-width: 940px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .page {
    padding: 20px 14px 44px;
  }

  .topbar-inner {
    padding: 9px 14px;
  }

  .hero-title {
    font-size: 21px;
  }

  .auth-email {
    display: none;
  }

  .auth-name {
    max-width: 110px;
  }

  .auth-btn {
    padding: 7px 12px;
  }
}

@media (max-width: 520px) {
  .topnav {
    gap: 12px;
  }

  .service-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
