:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --content-width: 46rem;
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #d9dee7;
  --link: #1d4ed8;
  --focus: #1d4ed8;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.container {
  width: min(calc(100% - 2rem), var(--content-width));
  margin: 0 auto;
}

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

.header-inner {
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

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

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 550;
  padding: 0.38rem 0.56rem;
  border-radius: 0.5rem;
}

.site-nav a[aria-current="page"],
.site-nav a:hover {
  color: var(--link);
  background: #eef3ff;
}

.main-content {
  flex: 1;
  padding: 1.5rem 0 2rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1.2rem;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.55rem, 3.8vw, 2rem);
  line-height: 1.2;
}

h2 {
  margin: 0;
  font-size: 1.02rem;
}

p,
ul,
address {
  margin: 0;
}

.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.link-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 0.75rem 0.85rem;
}

.link-card:hover {
  background: #f9fbff;
  border-color: #cad3e3;
}

.legal-panel > * + * {
  margin-top: 0.95rem;
}

.legal-panel section > * + * {
  margin-top: 0.45rem;
}

.legal-panel ul {
  padding-left: 1.1rem;
}

.legal-panel address {
  font-style: normal;
}

.back-link {
  margin-top: 1.15rem;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-inner {
  min-height: 3.4rem;
  padding: 0.8rem 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

@media (max-width: 36rem) {
  .header-inner {
    min-height: 0;
    padding: 0.72rem 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
