:root {
  --bg-top: #f4f7f2;
  --bg-bottom: #e8f0e6;
  --surface: #ffffff;
  --text: #1a1f1c;
  --text-muted: #4a554f;
  --accent: #2d8a4e;
  --accent-dark: #1f6b3a;
  --border: #d5e0d8;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --radius: 1.25rem;
  --table-border: #b8cdbf;
  --table-header-bg: #edf5ef;
}

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

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(var(--bg-top), var(--bg-bottom) 85%);
  background-color: var(--bg-top);
  color: var(--text);
  scroll-behavior: smooth;
  min-height: 100vh;
  width: 100%;
  overflow-x: clip;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: none;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1rem 0.5rem;
}

.logo {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  object-fit: cover;
  display: block;
  box-shadow: var(--shadow);
}

.site-footer {
  background: transparent;
  padding: 1.25rem 1rem 1.5rem;
  text-align: center;
  font-size: 0.98rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 0.5rem 0;
}

.footer-sep {
  color: #8a968f;
  user-select: none;
}

.footer-copy {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: #6b756f;
}

.footer-link {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
  transition: text-decoration 0.1s;
  word-break: break-word;
}

.footer-link:hover,
.footer-link:focus {
  text-decoration: underline;
}

.legal-page {
  flex: 1 0 auto;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  box-sizing: border-box;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
  margin: 0.5rem 0 1.5rem 0;
  font-size: 0.95rem;
}

.legal-nav a {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
}

.legal-nav a:hover,
.legal-nav a:focus {
  text-decoration: underline;
}

.legal-card {
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.75rem;
  line-height: 1.65;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.legal-card h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.35rem 0;
  letter-spacing: -0.02em;
}

.legal-card .legal-updated {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem 0;
}

.legal-card h2 {
  font-size: 1.05rem;
  color: var(--text);
  margin: 1.6rem 0 0.5rem 0;
  letter-spacing: -0.01em;
}

.legal-card h3 {
  font-size: 0.98rem;
  color: #2f3833;
  margin: 1.1rem 0 0.35rem 0;
}

.legal-card p,
.legal-card li {
  font-size: 0.97rem;
  color: var(--text-muted);
}

.legal-card ul,
.legal-card ol {
  margin: 0.4rem 0 0.8rem 0;
  padding-left: 1.35rem;
}

.legal-card li + li {
  margin-top: 0.35rem;
}

.legal-card a {
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: none;
}

.legal-card a:hover,
.legal-card a:focus {
  text-decoration: underline;
}

.table-wrap {
  width: 100%;
  margin: 0.75rem 0 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 2px solid var(--table-border);
  border-radius: 0.65rem;
  background: var(--surface);
}

.legal-card table,
.data-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 0;
  border: none;
}

.legal-card th,
.legal-card td,
.data-table th,
.data-table td {
  border: 1px solid var(--table-border);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.legal-card th,
.data-table th {
  background: var(--table-header-bg);
  font-weight: 600;
  color: var(--text);
}

.legal-card tbody tr:nth-child(even) td,
.data-table tbody tr:nth-child(even) td {
  background: #f7faf8;
}

@media (max-width: 640px) {
  .table-wrap {
    overflow-x: visible;
    border: none;
    background: transparent;
  }

  .legal-card table,
  .data-table {
    min-width: 0;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody tr {
    display: block;
    margin-bottom: 0.85rem;
    border: 2px solid var(--table-border);
    border-radius: 0.65rem;
    overflow: hidden;
    background: var(--surface);
  }

  .data-table tbody tr:nth-child(even) {
    background: var(--surface);
  }

  .data-table td {
    display: block;
    border: none;
    border-bottom: 1px solid var(--table-border);
    padding: 0.7rem 0.85rem;
    background: transparent;
  }

  .data-table td:last-child {
    border-bottom: none;
  }

  .data-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    color: var(--text);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.35rem;
  }
}

@media (max-width: 600px) {
  .logo {
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }

  .legal-card {
    padding: 1.1rem 1rem;
  }

  .legal-card h1 {
    font-size: 1.35rem;
    line-height: 1.35;
  }

  .legal-card h2 {
    font-size: 1rem;
  }

  .legal-nav {
    font-size: 0.9rem;
    gap: 0.5rem 0.85rem;
  }

  .footer-sep {
    display: none;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 500px) {
  .legal-page {
    padding: 0.75rem 0.75rem 1.5rem;
  }
}
