:root {
  color-scheme: light;
  --background: #f6f7fb;
  --surface: #ffffff;
  --text: #202124;
  --muted: #656b76;
  --border: #e1e4ea;
  --accent: #1769e0;
  --notice: #fff8df;
  --notice-border: #e6c85d;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans",
    "Yu Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
}

a {
  color: var(--accent);
  overflow-wrap: anywhere;
}

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

.header-inner,
main,
footer {
  width: min(100% - 32px, 840px);
  margin: 0 auto;
}

.header-inner {
  padding: 18px 0;
}

.brand {
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 8px;
  font-size: 0.92rem;
}

main {
  margin-top: 24px;
  margin-bottom: 48px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}

h1 {
  margin-top: 0;
  font-size: clamp(1.65rem, 5vw, 2.2rem);
  line-height: 1.35;
}

h2 {
  margin-top: 2.4rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  font-size: 1.35rem;
}

h3 {
  margin-top: 1.8rem;
  font-size: 1.1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

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

th {
  background: #f3f5f9;
}

.meta,
.muted {
  color: var(--muted);
}

.notice {
  margin: 1.2rem 0;
  padding: 14px 16px;
  background: var(--notice);
  border: 1px solid var(--notice-border);
  border-radius: 10px;
}

.link-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  padding: 0;
  list-style: none;
}

.link-cards a {
  display: block;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
}

.link-cards a:hover,
.link-cards a:focus-visible {
  border-color: var(--accent);
}

footer {
  padding-bottom: 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  main {
    width: 100%;
    margin-top: 0;
    padding: 22px 18px 36px;
    border: 0;
    border-radius: 0;
  }

  .header-inner,
  footer {
    width: min(100% - 28px, 840px);
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: normal;
  }
}
