:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #fafafa;
  --surface-strong: #f0f0f3;
  --surface-dark: #171717;
  --text: #171717;
  --muted: #60646c;
  --faint: #999999;
  --line: #f0f0f3;
  --line-strong: #dcdee0;
  --primary: #000000;
  --primary-active: #1a1a1a;
  --primary-soft: #f0f0f3;
  --link: #0d74ce;
  --success: #16a34a;
  --danger: #d92d20;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  margin: 0;
  text-rendering: geometricPrecision;
}

a {
  color: var(--link);
}

.page {
  align-items: center;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 24px;
}

.hero {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  max-width: 1080px;
  padding: 28px;
  width: 100%;
}

.hero-copy {
  flex: 1 1 520px;
  min-width: 0;
}

.badge {
  align-items: center;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  margin: 0 0 14px;
  padding: 7px 10px;
}

.logo {
  display: block;
  filter: drop-shadow(0 10px 18px rgba(23, 23, 23, 0.14));
  height: 92px;
  margin-bottom: 18px;
  object-fit: contain;
  width: 92px;
}

h1 {
  color: var(--text);
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.12;
  margin: 0;
  max-width: 680px;
}

.lead {
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.75;
  margin: 14px 0 0;
  max-width: 720px;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.store-button,
.button {
  align-items: center;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 8px;
  color: #ffffff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.store-button {
  align-items: flex-start;
  flex-direction: column;
  min-width: 190px;
}

.store-button:hover,
.button:hover {
  background: var(--primary-active);
  border-color: var(--primary-active);
}

.store-button:active,
.button:active {
  transform: translateY(1px);
}

.store-button.disabled {
  background: var(--surface-strong);
  border-color: var(--surface-strong);
  color: var(--muted);
  cursor: default;
}

.store-button strong {
  font-size: 15px;
  font-weight: 900;
}

.store-button small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
}

.store-button.disabled small {
  color: var(--faint);
}

.admin-link {
  color: var(--link);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  margin-top: 16px;
  text-decoration: none;
}

.phone-preview {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  flex: 1 1 300px;
  max-width: 380px;
  min-width: 280px;
  padding: 16px;
}

.phone-top {
  background: var(--surface-dark);
  border-radius: 999px;
  height: 5px;
  margin: 0 auto 16px;
  opacity: 0.88;
  width: 76px;
}

.phone-card {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  padding: 16px;
}

.phone-card.compact {
  margin-bottom: 0;
}

.phone-card p {
  color: var(--faint);
  font-size: 11px;
  font-weight: 900;
  margin: 0 0 8px;
}

.phone-card strong {
  color: var(--text);
  display: block;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.phone-card span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  margin-top: 8px;
}

.features {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
  max-width: 1080px;
  width: 100%;
}

.features article {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 18px;
}

.features h2 {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
  margin: 0;
}

.features p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  margin: 8px 0 0;
}

.legal-page,
.shell {
  background: var(--bg);
  min-height: 100vh;
  padding: max(24px, env(safe-area-inset-top)) 20px max(40px, env(safe-area-inset-bottom));
}

.shell {
  align-items: center;
  display: flex;
  justify-content: center;
}

.legal-hero,
.legal-doc,
.card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  margin: 0 auto;
  max-width: 860px;
  padding: clamp(22px, 4vw, 34px);
  width: 100%;
}

.card {
  max-width: 440px;
}

.card h1 {
  font-size: clamp(28px, 8vw, 38px);
}

.card p {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.75;
  margin: 14px 0 22px;
}

.legal-logo {
  aspect-ratio: 1;
  border-radius: 22%;
  box-shadow: 0 12px 28px rgba(23, 23, 23, 0.14);
  display: block;
  height: 96px;
  margin-bottom: 18px;
  object-fit: cover;
  width: 96px;
}

.legal-links {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 24px;
}

.legal-links a,
.back-link {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  display: inline-flex;
  font-size: 14px;
  font-weight: 800;
  justify-content: space-between;
  min-height: 46px;
  padding: 12px 14px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.legal-links a::after {
  color: var(--faint);
  content: "→";
  font-weight: 900;
  margin-left: 12px;
}

.legal-links a:hover,
.back-link:hover {
  background: var(--surface-alt);
  border-color: var(--line-strong);
}

.legal-links a:active,
.back-link:active {
  transform: translateY(1px);
}

.back-link {
  align-self: flex-start;
  display: inline-flex;
  gap: 8px;
  justify-content: flex-start;
  margin-bottom: 18px;
}

.back-link::before {
  content: "←";
  font-weight: 900;
}

.legal-doc h1 {
  font-size: clamp(30px, 5vw, 44px);
  margin-bottom: 8px;
}

.updated {
  color: var(--faint);
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 22px;
}

.legal-doc h2 {
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.35;
  margin: 28px 0 10px;
  padding-top: 22px;
}

.announcements-doc .lead {
  margin-bottom: 22px;
}

.announcement-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.announcement-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 18px;
}

.announcement-card-meta {
  align-items: center;
  color: var(--faint);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 800;
  gap: 10px;
  margin-bottom: 8px;
}

.announcement-card h2 {
  border-top: 0;
  font-size: 20px;
  line-height: 1.35;
  margin: 0 0 8px;
  padding-top: 0;
}

.announcement-card p {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.75;
  margin: 0;
  white-space: pre-wrap;
}

.empty {
  background: var(--surface-alt);
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  padding: 18px;
}

.legal-doc p,
.legal-doc li {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.8;
}

.legal-doc ul {
  padding-left: 22px;
}

.legal-doc table {
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 18px;
  overflow: hidden;
  width: 100%;
}

.legal-doc th,
.legal-doc td {
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.7;
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
}

.legal-doc tr:first-child th,
.legal-doc tr:first-child td {
  border-top: 1px solid var(--line);
}

.legal-doc th {
  color: var(--faint);
  font-weight: 900;
  width: 28%;
}

.legal-doc td {
  color: var(--text);
  font-weight: 700;
}

.legal-doc td a {
  color: var(--link);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 860px) {
  .page {
    padding: 16px;
  }

  .hero {
    padding: 22px;
  }

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

@media (max-width: 560px) {
  .features {
    grid-template-columns: 1fr;
  }

  .store-button,
  .button {
    width: 100%;
  }

  .phone-preview {
    max-width: none;
    width: 100%;
  }

  .legal-page,
  .shell {
    padding: max(18px, env(safe-area-inset-top)) 14px max(28px, env(safe-area-inset-bottom));
  }

  .legal-hero,
  .legal-doc,
  .card {
    border-radius: 14px;
    padding: 20px;
  }

  .legal-logo {
    height: 86px;
    width: 86px;
  }

  .legal-links {
    grid-template-columns: 1fr;
  }

  .legal-doc th,
  .legal-doc td {
    display: block;
    width: 100%;
  }

  .legal-doc th {
    border-bottom: 0;
    padding-bottom: 4px;
  }

  .legal-doc td {
    padding-top: 0;
  }
}
