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

/* === VARIABLES === */
:root {
  --bg: #f9f9f8;
  --fg: #111;
  --muted: #666;
  --accent: #2563eb;
  --border: #e4e4e4;
}

/* === BASE === */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* === HEADER === */
header {
  padding: 2rem 2.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--fg);
}

.tag {
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* === FOOTER === */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

footer a:hover {
  color: var(--fg);
}

/* === LEGAL PAGES (terms + privacy) === */
.page-legal main {
  flex: 1;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding: 4rem 2.5rem 5rem;
}

.page-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.effective {
  font-size: 0.9rem;
  color: var(--muted);
}

.page-terms .effective {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.page-privacy .effective {
  margin-bottom: 1rem;
}

.intro-note {
  font-size: 1rem;
  line-height: 1.7;
  color: #333;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

/* Table of contents */
.toc {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 3rem;
}

.toc-title {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.toc ol {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.toc a {
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* Sections */
section {
  margin-bottom: 2.75rem;
}

h2 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.85rem;
  scroll-margin-top: 2rem;
}

h3 {
  font-size: 0.975rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  margin-top: 1.25rem;
  color: var(--fg);
}

p {
  font-size: 0.975rem;
  line-height: 1.75;
  color: #333;
  margin-bottom: 0.85rem;
}

p:last-child {
  margin-bottom: 0;
}

.page-legal ul,
.page-legal ol {
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.page-legal li {
  font-size: 0.975rem;
  line-height: 1.7;
  color: #333;
}

/* Divider */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 2.75rem;
}

/* Notice box — shared shape */
.notice {
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.85rem;
}

.notice p {
  font-size: 0.9rem;
  margin: 0;
}

/* Notice box — terms (amber) */
.page-terms .notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.page-terms .notice p {
  color: #92400e;
}

/* Notice box — privacy (green) */
.page-privacy .notice {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.page-privacy .notice p {
  color: #14532d;
}

/* Subscription box (terms) */
.sub-box {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 0.85rem;
}

.sub-box p {
  margin-bottom: 0.5rem;
}

.sub-box p:last-child {
  margin-bottom: 0;
}

/* Info box (privacy) */
.info-box {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 0.85rem;
}

.info-box p {
  margin-bottom: 0.5rem;
}

.info-box p:last-child {
  margin-bottom: 0;
}

/* Data table (privacy) */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
}

.data-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  background: white;
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table td {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
  color: #333;
  background: white;
}

.data-table tr:nth-child(even) td {
  background: #fafafa;
}
