:root {
  color-scheme: light dark;
  --accent: #e16c2e;
  --background: #ffffff;
  --surface: #f6f6f6;
  --text: #171717;
  --muted: #666666;
  --line: #dedede;
  --max-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  line-height: 1.7;
  word-break: keep-all;
}

body {
  margin: 0;
}

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

header {
  border-bottom: 1px solid var(--line);
}

.nav,
main,
footer {
  width: min(calc(100% - 40px), var(--max-width));
  margin-inline: auto;
}

.nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 750;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

main {
  padding: 64px 0 80px;
}

h1,
h2,
h3 {
  line-height: 1.35;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 16px;
  font-size: 34px;
}

h2 {
  margin: 48px 0 12px;
  font-size: 21px;
}

h3 {
  margin: 28px 0 8px;
  font-size: 17px;
}

p,
li {
  font-size: 16px;
}

.lead {
  max-width: 620px;
  margin: 0 0 36px;
  color: var(--muted);
  font-size: 18px;
}

.updated {
  color: var(--muted);
  font-size: 14px;
}

.link-list {
  margin: 42px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.link-list li {
  border-bottom: 1px solid var(--line);
}

.link-list a {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 2px;
  font-weight: 650;
  text-decoration: none;
}

.link-list a::after {
  content: "→";
  color: var(--accent);
}

.note {
  margin: 28px 0;
  padding: 18px 20px;
  background: var(--surface);
  border-left: 3px solid var(--accent);
}

table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 14px;
}

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

th {
  background: var(--surface);
}

footer {
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #000000;
    --surface: #1c1c1e;
    --text: #f5f5f5;
    --muted: #aaaaaa;
    --line: #333333;
  }
}

@media (max-width: 620px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

  main {
    padding-top: 44px;
  }

  h1 {
    font-size: 29px;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  tr {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  td {
    padding: 5px 0;
    border: 0;
  }

  td::before {
    content: attr(data-label) ": ";
    color: var(--muted);
    font-weight: 650;
  }
}

/* Keep multilingual navigation readable on narrow screens. */
html { overflow-wrap: anywhere; }
.nav, nav { flex-wrap: wrap; }
.languages { justify-content: flex-end; margin-bottom: 28px; }
nav a[aria-current="page"] { font-weight: 750; text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
