:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --paper: #ffffff;
  --ink: #182026;
  --muted: #5c6b77;
  --line: #e1e6eb;
  --accent: #b86614;
  --accent-soft: rgba(184, 102, 20, 0.1);
  --header-bg: #182026;
  --header-ink: #f7f9fb;
  --header-accent: #f4d09a;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419;
    --paper: #171e26;
    --ink: #ecf1f6;
    --muted: #98a6b3;
    --line: #28333f;
    --accent: #f0b364;
    --accent-soft: rgba(240, 179, 100, 0.14);
    --header-bg: #131920;
    --header-ink: #f2f6fa;
    --header-accent: #f4d09a;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.75 system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.site-header {
  background: var(--header-bg);
  color: var(--header-ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-size: 1.2rem;
  font-weight: 750;
  color: var(--header-ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand-badge {
  font-size: 0.78rem;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--header-accent);
  text-decoration: none;
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.primary-nav a {
  color: var(--header-accent);
  text-decoration: none;
  font-weight: 500;
}

.primary-nav a:hover {
  text-decoration: underline;
}

.primary-nav a[aria-current="page"] {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

main {
  max-width: 960px;
  margin: 34px auto;
  padding: 0 24px 48px;
}

.lang-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
}

.lang-bar a {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9rem;
}

.lang-bar a:hover {
  border-color: var(--accent);
}

.lang-bar a[aria-current="page"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.45rem);
  line-height: 1.25;
  margin: 0 0 10px;
}

h2 {
  font-size: 1.22rem;
  line-height: 1.45;
  margin: 24px 0 10px;
}

h3 {
  font-size: 1.04rem;
  margin: 18px 0 6px;
}

p {
  margin: 10px 0;
}

.meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.intro {
  font-size: 1.08rem;
  max-width: 720px;
  color: var(--muted);
}

.card,
.panel,
article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin: 20px 0;
}

.panel {
  border-left: 4px solid var(--accent);
}

article h2:first-child,
.card h2:first-child,
.panel h2:first-child {
  margin-top: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.app-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-card h2 {
  margin: 0;
  font-size: 1.2rem;
}

.app-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.chip-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.chip-links a {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--accent-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.chip-links a:hover {
  text-decoration: underline;
}

details {
  border-top: 1px solid var(--line);
  padding: 15px 0;
}

details:first-of-type {
  border-top: none;
  padding-top: 4px;
}

summary {
  font-weight: 650;
  cursor: pointer;
}

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

li {
  margin: 6px 0;
}

.email {
  font-weight: 650;
}

footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 22px 24px 36px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

@media (max-width: 600px) {
  .site-header-inner,
  main,
  footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .card,
  .panel,
  article {
    padding: 18px;
  }
}
