:root {
  --ink: #1F2937;
  --muted: #6B7280;
  --lilac: #8E7CC3;
  --lilac-deep: #6F5DA6;
  --page-bg: #EDE7F6;
  --surface: #F8F6FC;
  --line: #D9D1EA;
  --alert: #D64545;
  --ok: #3E9B5E;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--page-bg);
  color: var(--ink);
  line-height: 1.65;
}

.site-header {
  max-width: 880px;
  margin: 0 auto;
  padding: 24px 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

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

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.lang-switch {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lilac-deep);
  text-decoration: none;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
}

nav.site-nav {
  max-width: 880px;
  margin: 12px auto 0;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 0.92rem;
}

nav.site-nav a {
  color: var(--lilac-deep);
  text-decoration: none;
  font-weight: 600;
}

nav.site-nav a:hover,
nav.site-nav a[aria-current="page"] {
  text-decoration: underline;
}

main {
  max-width: 880px;
  margin: 24px auto 48px;
  padding: 0 16px;
}

.card {
  background: var(--surface);
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 1px 3px rgba(31, 41, 55, 0.08);
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .card {
    padding: 20px 18px;
  }
}

h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  margin-top: 0;
}

h2 {
  font-size: 1.25rem;
  color: var(--lilac-deep);
  margin-top: 1.8em;
}

h3 {
  font-size: 1.05rem;
  margin-bottom: 0.3em;
}

.card > h2:first-child {
  margin-top: 0;
}

p, li {
  font-size: 1rem;
}

a {
  color: var(--lilac-deep);
}

.lead {
  font-size: 1.1rem;
}

.updated {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: -8px;
}

.hero {
  text-align: center;
  padding: 24px 8px 8px;
}

.hero img.logo {
  width: 120px;
  height: 120px;
  border-radius: 26px;
  box-shadow: 0 4px 16px rgba(31, 41, 55, 0.15);
}

.hero h1 {
  margin: 18px 0 4px;
  font-size: 2.2rem;
}

.hero .tagline {
  color: var(--lilac-deep);
  font-weight: 600;
  margin-top: 0;
}

.hero .lead {
  max-width: 640px;
  margin: 0 auto;
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 24px 0 8px;
}

.button {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--lilac);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.button:hover {
  background: var(--lilac-deep);
}

.button.secondary {
  background: transparent;
  border: 1.5px solid var(--lilac);
  color: var(--lilac-deep);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.features div {
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
}

.features h3 {
  margin-top: 0;
}

.features p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0 0;
}

.gallery figure {
  margin: 0;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

.gallery figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 4px;
  text-align: center;
}

figure.diagram {
  margin: 20px 0;
  text-align: center;
}

figure.diagram svg {
  width: 100%;
  max-width: 320px;
  height: auto;
}

figure.diagram figcaption {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 560px;
  margin: 6px auto 0;
}

.clue {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1px 10px;
  font-style: italic;
}

.tip {
  background: #fff;
  border-left: 4px solid var(--lilac);
  border-radius: 0 10px 10px 0;
  padding: 10px 16px;
  margin: 16px 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  margin: 12px 0;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--lilac-deep);
}

.table-wrap {
  overflow-x: auto;
}

details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 10px 0;
}

details summary {
  font-weight: 700;
  cursor: pointer;
}

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

.site-footer {
  max-width: 880px;
  margin: 0 auto 40px;
  padding: 0 16px;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

.site-footer a {
  color: var(--muted);
}
