:root {
  --brand: #0d9488;
  --brand-hover: #0f766e;
  --brand-soft: #f0fdfa;
  --text: #0f172a;
  --muted: #64748b;
  --surface: #f8fafc;
  --surface-raised: #ffffff;
  --border: #e2e8f0;
  --radius: 0.5rem;
  --max-width: 44rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--brand-hover);
}

.site-header {
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner,
.site-footer__inner,
.main,
.chooser {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.9rem 0;
}

.brand {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--brand);
}

.brand span {
  color: var(--brand);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--brand);
}

.lang-switch {
  display: inline-flex;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.lang-switch a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.2rem 0.45rem;
  border-radius: 0.35rem;
}

.lang-switch a:hover,
.lang-switch a[aria-current="true"] {
  color: var(--brand);
  background: var(--brand-soft);
}

.main {
  padding: 2rem 0 3.5rem;
}

.page-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.updated {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.prose h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin: 1.35rem 0 0.5rem;
  font-size: 1.05rem;
}

.prose p,
.prose ul {
  margin: 0 0 1rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose li::marker {
  color: var(--brand);
}

.card-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.85rem;
}

.card-list a {
  display: block;
  padding: 1rem 1.15rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card-list a:hover {
  border-color: var(--brand);
  box-shadow: 0 1px 3px rgb(15 23 42 / 0.08);
}

.card-list strong {
  display: block;
  color: var(--brand);
  margin-bottom: 0.2rem;
}

.card-list span {
  color: var(--muted);
  font-size: 0.925rem;
}

.chooser {
  min-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 0;
  text-align: center;
}

.chooser h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: -0.03em;
}

.chooser h1 span {
  color: var(--brand);
}

.chooser p {
  margin: 0 0 1.75rem;
  color: var(--muted);
}

.chooser__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 8rem;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  background: var(--brand);
  color: #fff;
}

.btn:hover {
  background: var(--brand-hover);
  color: #fff;
}

.btn--ghost {
  background: var(--surface-raised);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface-raised);
  padding: 1.25rem 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0 0 0.35rem;
}

.site-footer p:last-child {
  margin-bottom: 0;
}

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

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

@media (max-width: 640px) {
  .site-header__inner {
    align-items: flex-start;
  }

  .nav {
    width: 100%;
  }
}
