/* Sleep Coach legal pages — clean, professional, mobile-first */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #525252;
  --text-tertiary: #737373;
  --accent: #4B8BD4;
  --accent-soft: #e8f0fa;
  --border: #e5e5e5;
  --rule: #f0f0f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

header.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.92);
  z-index: 10;
}

.site-header .inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
}

.brand .logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

nav.lang {
  position: relative;
  font-size: 13px;
}

nav.lang summary {
  list-style: none;
  cursor: pointer;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  user-select: none;
}

nav.lang summary::-webkit-details-marker { display: none; }
nav.lang summary::after {
  content: "▾";
  font-size: 10px;
  opacity: 0.6;
}

nav.lang summary:hover { border-color: var(--accent); color: var(--accent); }

nav.lang ul.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  padding: 6px;
  list-style: none;
  min-width: 200px;
  max-height: 420px;
  overflow-y: auto;
  z-index: 20;
}

nav.lang ul.menu li { margin: 0; }

nav.lang ul.menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 5px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}

nav.lang ul.menu a:hover { background: var(--accent-soft); color: var(--accent); }
nav.lang ul.menu a.active { background: var(--accent); color: white; }
nav.lang ul.menu .label-native { color: var(--text-tertiary); margin-left: 6px; font-size: 11px; }

h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.2;
}

.meta {
  color: var(--text-tertiary);
  font-size: 14px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}

.meta strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.intro {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 10px;
  color: var(--text);
}

p {
  margin-bottom: 14px;
  color: var(--text);
}

ul, ol {
  margin-bottom: 16px;
  padding-left: 22px;
}

ul li, ol li {
  margin-bottom: 6px;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  text-decoration-thickness: 2px;
}

strong { font-weight: 600; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

table th,
table td {
  text-align: left;
  padding: 12px;
  border: 1px solid var(--border);
  vertical-align: top;
}

table th {
  background: var(--accent-soft);
  font-weight: 600;
  color: var(--text);
}

.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 16px 18px;
  border-radius: 6px;
  margin: 20px 0;
  font-size: 15px;
  color: var(--text-secondary);
}

.callout strong { color: var(--text); }

footer.site-footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  color: var(--text-tertiary);
  font-size: 13px;
  text-align: center;
}

footer.site-footer p { color: inherit; }
footer.site-footer a { color: var(--text-secondary); }

/* Index page */
.hero {
  text-align: center;
  padding: 60px 0 40px;
}

.hero h1 {
  font-size: 40px;
  margin-bottom: 12px;
}

.hero p {
  color: var(--text-secondary);
  font-size: 18px;
  margin-bottom: 32px;
}

.doc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 40px;
}

@media (min-width: 600px) {
  .doc-grid { grid-template-columns: 1fr 1fr; }
}

.doc-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}

.doc-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.doc-card h3 {
  margin-top: 0;
  font-size: 18px;
}

.doc-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 6px;
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .container { padding: 24px 18px 60px; }
  h1 { font-size: 26px; }
  h2 { font-size: 19px; }
  .intro { font-size: 16px; }
  body { font-size: 15px; }
}
