/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Tokens ────────────────────────────────────────────────────────────── */
:root {
  --bg:        #0a0a0a;
  --fg:        #ffffff;
  --muted:     rgba(255,255,255,.45);
  --dim:       rgba(255,255,255,.2);
  --border:    rgba(255,255,255,.08);
  --surface:   rgba(255,255,255,.03);
  --surface-h: rgba(255,255,255,.055);

  --f-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --f-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --page-w:    960px;
  --page-px:   24px;
}

/* ── Base ──────────────────────────────────────────────────────────────── */
html { overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

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

/* ── Layout ────────────────────────────────────────────────────────────── */
.page-wrap {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 0 var(--page-px);
}

/* ── Site Header ───────────────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.site-header .page-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.site-logo .dot {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  display: inline-block;
}

.site-logo a {
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
  transition: color .2s;
}
.site-logo a:hover { color: var(--fg); }

.header-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 15px;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
}

/* ── Apps Grid ─────────────────────────────────────────────────────────── */
.apps-section {
  padding: 60px 0;
}

.section-label {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 32px;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.app-card {
  background: var(--bg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: background .2s;
  text-decoration: none;
  color: inherit;
}
.app-card:hover { background: var(--surface-h); }

.app-card-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.app-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  overflow: hidden;
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-meta { flex: 1; }

.app-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-bottom: 2px;
}

.app-category {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.app-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.app-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.app-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  transition: color .2s;
  text-decoration: none;
}
.app-link-item:last-child { border-bottom: none; }
.app-link-item:hover { color: var(--fg); }

.app-link-item span:last-child {
  font-size: 10px;
  opacity: .4;
}

/* ── Legal Page ────────────────────────────────────────────────────────── */
.legal-nav {
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb a { transition: color .2s; }
.breadcrumb a:hover { color: var(--fg); }
.breadcrumb-sep { color: var(--dim); }
.breadcrumb-current { color: var(--fg); }

.legal-hero {
  padding: 60px 0 48px;
  border-bottom: 1px solid var(--border);
}

.legal-hero .app-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px 6px 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
}

.legal-hero .app-badge .badge-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.legal-hero .app-badge .badge-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.legal-hero h1 {
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.legal-hero .meta {
  font-size: 12px;
  color: var(--muted);
}

.legal-tabs {
  display: flex;
  gap: 0;
  padding: 24px 0 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.legal-tab {
  font-size: 13px;
  color: var(--muted);
  padding: 12px 20px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
  text-decoration: none;
  display: block;
}
.legal-tab:hover { color: var(--fg); }
.legal-tab.active { color: var(--fg); border-bottom-color: var(--fg); }

/* ── Legal Content ─────────────────────────────────────────────────────── */
.legal-content {
  padding: 60px 0 100px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 60px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 32px;
}

.legal-toc-label {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 16px;
}

.legal-toc a {
  display: block;
  font-size: 12px;
  color: var(--muted);
  padding: 5px 0;
  border-left: 1px solid var(--border);
  padding-left: 12px;
  transition: color .2s, border-color .2s;
  line-height: 1.5;
}
.legal-toc a:hover { color: var(--fg); border-left-color: rgba(255,255,255,.3); }
.legal-toc a.active { color: var(--fg); border-left-color: var(--fg); }

.legal-body h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--fg);
}
.legal-body h2:first-child { margin-top: 0; }

.legal-body p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 14px;
}

.legal-body ul, .legal-body ol {
  margin-left: 20px;
  margin-bottom: 14px;
}

.legal-body li {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 4px;
}

.legal-body a {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: .7;
  transition: opacity .2s;
}
.legal-body a:hover { opacity: 1; }

.legal-body strong { color: var(--fg); font-weight: 600; }

.legal-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.site-footer .page-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 11px;
  color: var(--dim);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 11px;
  color: var(--dim);
  transition: color .2s;
}
.footer-links a:hover { color: var(--muted); }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .legal-content {
    grid-template-columns: 1fr;
  }
  .legal-toc { display: none; }
  .hero { padding: 48px 0 40px; }
  .apps-grid { grid-template-columns: 1fr; }
}
