:root {
  --ink:        #2E4057;
  --vermilion:  #E84855;
  --paper:      #FFF8F0;
  --rice:       #F4F0E8;
  --line:       #E0D8CC;
  --muted:      #6F6660;
  --link:       #2E4057;
  --max-width:  720px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 96px;
}

header.site {
  border-bottom: 1px solid var(--line);
  background: var(--rice);
}
header.site .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
header.site .brand {
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}
header.site nav a {
  margin-left: 16px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}
header.site nav a:hover { color: var(--ink); }

.locale-switcher {
  position: relative;
  flex: 0 0 auto;
}
.locale-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  min-height: 34px;
  white-space: nowrap;
}
.locale-trigger:hover,
.locale-trigger[aria-expanded="true"] {
  color: var(--ink);
  border-color: #B9AEA1;
  background: rgba(255, 248, 240, 0.6);
}
.locale-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.locale-caret {
  font-size: 14px;
  line-height: 1;
}
.locale-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  min-width: 136px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 14px 32px rgba(46, 64, 87, 0.14);
}
.locale-menu button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
  padding: 9px 10px;
  text-align: left;
}
.locale-menu button:hover,
.locale-menu button.active {
  background: var(--ink);
  color: var(--paper);
}

h1 {
  font-size: 32px;
  margin: 0 0 8px;
  letter-spacing: 0.01em;
}
h2 {
  font-size: 20px;
  margin: 40px 0 12px;
  color: var(--ink);
}
.updated {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}
p, ul, ol { margin: 12px 0; }
ul, ol { padding-left: 24px; }
li { margin: 6px 0; }

a { color: var(--link); }
code {
  background: var(--rice);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
}

.locale { display: none; }
.locale.active { display: block; }

footer.site {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}
footer.site a { color: var(--muted); }

.hero {
  padding: 80px 24px 40px;
  text-align: center;
}
.hero h1 {
  font-size: 48px;
  margin-bottom: 12px;
}
.hero .tagline {
  font-size: 18px;
  color: var(--muted);
  margin-bottom: 32px;
}
.hero .cta {
  display: inline-block;
  background: var(--vermilion);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 640px) {
  header.site .inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 16px 20px;
  }
  header.site .brand {
    min-width: 0;
    font-size: 19px;
  }
  header.site nav {
    display: none;
  }
  .locale-trigger {
    padding: 7px 9px;
  }
  .locale-current {
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hero h1 { font-size: 36px; }
  h1 { font-size: 26px; }
  main { padding: 32px 20px 64px; }
}
