:root {
  --blue: #8aa8ff;
  --gold: #f5b63a;
  --green: #37d39c;
  --gray-light: #030712;
  --gray-mid: #9ca9c7;
  --ink: #f2f5ff;
  --surface: #090f1f;
  --card: #111a2e;
  --border: rgba(148, 163, 184, 0.25);
  --glow: rgba(55, 211, 156, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: radial-gradient(
      circle at 10% 20%,
      rgba(55, 211, 156, 0.08),
      transparent 55%
    ),
    linear-gradient(135deg, var(--gray-light), #05070f 55%, #090f1d);
  color: var(--ink);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.tos-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(4, 7, 17, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.tos-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tos-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background-image: url("../assets/ethiopic_ai_logo.png");
  background-size: cover;
  background-position: center;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.45);
}

.brand span {
  color: var(--gray-mid);
  font-weight: 600;
}

.tos-nav-link {
  color: var(--gray-mid);
  font-size: 0.95rem;
  transition: color 0.25s ease;
}

.tos-nav-link:hover,
.tos-nav-link:focus-visible {
  color: var(--green);
}

.tos-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 40px;
}

.toc {
  background: rgba(8, 13, 24, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.35);
  height: fit-content;
  position: sticky;
  top: 96px;
}

.toc h2 {
  margin: 0 0 18px;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-mid);
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toc a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--gray-mid);
  border: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.toc a::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray-mid);
  opacity: 0.6;
  transition: background 0.2s ease;
}

.toc a:hover,
.toc a:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
}

.toc a:hover::before,
.toc a:focus-visible::before {
  background: var(--green);
}

.tos-content {
  background: rgba(9, 15, 31, 0.9);
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  padding: 40px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.tos-content h1 {
  margin-top: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
}

.tos-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--gray-mid);
}

.meta-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.85rem;
}

.intro-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 24px;
  background: rgba(17, 26, 46, 0.75);
  margin-bottom: 32px;
}

.tos-section + .tos-section {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tos-section h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.tos-section p {
  margin: 12px 0;
  color: var(--gray-mid);
}

.tos-section ul {
  margin: 12px 0 12px 18px;
  color: var(--gray-mid);
  padding-left: 12px;
}

.callout {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(55, 211, 156, 0.08);
  border: 1px solid rgba(55, 211, 156, 0.25);
  color: var(--green);
  font-size: 0.95rem;
}

.cta-link {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}

.cta-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

@media (max-width: 980px) {
  .tos-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }
}

@media (max-width: 600px) {
  .tos-content {
    padding: 28px;
  }

  .tos-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .tos-actions {
    flex-wrap: wrap;
  }
}
