/* ---------- Professional baseline ---------- */
:root {
  --text: #1f2328;
  --muted: #5b6470;
  --border: rgba(31, 35, 40, 0.12);
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --shadow: 0 1px 2px rgba(31, 35, 40, 0.06);
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

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

/* Background: soft tint + gentle gradient */
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f6f7fb 0%, #ffffff 55%, #f7f9fb 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

/* Layout */
main {
  max-width: 820px;
  margin: 0 auto;
  padding: 28px 16px 34px;
}

/* Headings & text */
h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  line-height: 1.15; /* tighter heading */
  letter-spacing: -0.01em;
}

.lead {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.4;
}

.hint {
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

/* ---------- Language switch ---------- */
.lang-switch {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 6px 11px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.lang-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 35, 40, 0.22);
}

/* ---------- Rules (accordion) ---------- */
.rules {
  margin-top: 12px;
  border: 1px solid rgba(31, 35, 40, 0.10);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

/* Each rule row */
details {
  padding: 0;
  border-top: 1px solid var(--border);
}

details:first-child {
  border-top: 0;
}

/* Clickable header */
summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  display: block;
  padding: 10px 14px 10px 28px; /* slightly tighter */

  font-weight: 650;
  font-size: 0.97rem;
  line-height: 1.35; /* tighter */
  letter-spacing: -0.005em;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "▸";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  transition: transform 0.18s ease;
  font-size: 0.85rem;
}

summary:hover {
  background: rgba(9, 105, 218, 0.06);
}

details[open] > summary {
  background: var(--surface-2);
}

details[open] > summary::before {
  transform: translateY(-50%) rotate(90deg);
}

/* Body text */
details p {
  margin: 0;
  padding: 0 14px 12px 28px;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.4; /* tighter paragraph spacing */
}

/* Footer */
footer {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.3;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .lang-btn,
  summary::before {
    transition: none;
  }
}
.authors h2 {
  margin-bottom: 4px;
}

.author {
  margin-bottom: 8px;
}