/* Sowda Dunyasi — Legal Pages (Apple-style) */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.58824;
  font-weight: 400;
  letter-spacing: -0.022em;
  color: #1d1d1f;
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #004499;
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Header */

.site-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 16px 22px;
}

.site-header__inner {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-brand {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #1d1d1f;
  text-decoration: none;
}

.site-brand:hover {
  color: #1d1d1f;
  text-decoration: none;
  opacity: 0.7;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-size: 12px;
  color: #6e6e73;
}

.site-nav a:hover {
  color: #1d1d1f;
}

.site-nav a.is-active {
  color: #1d1d1f;
  font-weight: 500;
}

/* Main */

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 22px 80px;
}

.page-header {
  margin-bottom: 40px;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: 40px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.page-header .brand-line {
  margin: 0 0 4px;
  font-size: 17px;
  color: #6e6e73;
}

.page-header .updated {
  margin: 0;
  font-size: 14px;
  color: #6e6e73;
}

/* Content */

.loading {
  font-size: 17px;
  color: #6e6e73;
  padding: 24px 0;
}

.loading.hidden {
  display: none;
}

.content {
  opacity: 0;
  transition: opacity 0.45s ease;
}

.content.is-visible {
  opacity: 1;
}

.content.hidden {
  display: none;
}

.content h2 {
  margin: 40px 0 16px;
  font-size: 24px;
  line-height: 1.16667;
  font-weight: 600;
  letter-spacing: 0.009em;
}

.content h2:first-child {
  margin-top: 0;
}

.content h3 {
  margin: 32px 0 12px;
  font-size: 19px;
  line-height: 1.21053;
  font-weight: 600;
  letter-spacing: 0.012em;
}

.content p {
  margin: 0 0 16px;
}

.content ul {
  margin: 0 0 16px;
  padding-left: 1.4em;
}

.content li {
  margin-bottom: 8px;
}

.content li:last-child {
  margin-bottom: 0;
}

.content strong {
  font-weight: 600;
}

.error {
  padding: 16px 20px;
  background: #fff5f5;
  border: 1px solid #ffd4d4;
  border-radius: 8px;
  color: #bf0808;
  font-size: 15px;
}

/* Index page */

.index-intro {
  margin-bottom: 48px;
}

.index-intro h1 {
  margin: 0 0 12px;
  font-size: 48px;
  line-height: 1.08349;
  font-weight: 600;
  letter-spacing: -0.003em;
}

.index-intro p {
  margin: 0;
  font-size: 19px;
  line-height: 1.42105;
  color: #6e6e73;
  max-width: 600px;
}

.legal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.legal-list li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.legal-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  color: #1d1d1f;
  font-size: 17px;
  font-weight: 400;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.legal-list a:hover {
  opacity: 0.65;
  text-decoration: none;
  color: #1d1d1f;
}

.legal-list a::after {
  content: "›";
  font-size: 20px;
  color: #6e6e73;
  font-weight: 300;
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 24px 22px 40px;
  margin-top: auto;
}

.site-footer__inner {
  max-width: 800px;
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.footer-nav a {
  font-size: 12px;
  color: #6e6e73;
}

.footer-nav a:hover {
  color: #1d1d1f;
}

.footer-nav a.is-active {
  color: #1d1d1f;
}

.footer-copy {
  margin: 0;
  font-size: 12px;
  color: #86868b;
}

/* Layout wrapper */

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Dark mode */

@media (prefers-color-scheme: dark) {
  body {
    color: #f5f5f7;
    background-color: #000;
  }

  a {
    color: #2997ff;
  }

  a:hover {
    color: #64b5ff;
  }

  a:focus-visible {
    outline-color: #2997ff;
  }

  .site-header {
    border-bottom-color: rgba(255, 255, 255, 0.12);
  }

  .site-brand {
    color: #f5f5f7;
  }

  .site-brand:hover {
    color: #f5f5f7;
  }

  .site-nav a {
    color: #86868b;
  }

  .site-nav a:hover,
  .site-nav a.is-active {
    color: #f5f5f7;
  }

  .page-header .brand-line,
  .page-header .updated,
  .loading {
    color: #86868b;
  }

  .index-intro p {
    color: #86868b;
  }

  .legal-list {
    border-top-color: rgba(255, 255, 255, 0.12);
  }

  .legal-list li {
    border-bottom-color: rgba(255, 255, 255, 0.12);
  }

  .legal-list a {
    color: #f5f5f7;
  }

  .legal-list a:hover {
    color: #f5f5f7;
  }

  .legal-list a::after {
    color: #86868b;
  }

  .site-footer {
    border-top-color: rgba(255, 255, 255, 0.12);
  }

  .footer-nav a {
    color: #86868b;
  }

  .footer-nav a:hover,
  .footer-nav a.is-active {
    color: #f5f5f7;
  }

  .footer-copy {
    color: #6e6e73;
  }

  .error {
    background: #2c1515;
    border-color: #5c2020;
    color: #ff6b6b;
  }
}

/* Responsive */

@media (max-width: 734px) {
  .page-header h1 {
    font-size: 32px;
  }

  .index-intro h1 {
    font-size: 36px;
  }

  main {
    padding-top: 32px;
  }

  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
