:root {
  --bg: #fafbfc;
  --panel: #ffffff;
  --text: #1a1d29;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  background: var(--bg);
  font-size: 16px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.site-header__top {
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
}

.site-logo:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.site-nav--primary {
  justify-content: flex-end;
  align-items: center;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--accent);
}

.site-nav__plain {
  align-self: center;
}

/* Hover / keyboard focus dropdown (primary nav). !important avoids stray rules showing the panel. */
.nav-dropdown {
  position: relative;
}

.nav-dropdown__trigger {
  display: inline-block;
  padding: 4px 2px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-dropdown__trigger:hover {
  color: var(--accent);
}

.nav-dropdown__panel {
  display: none !important;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  min-width: 240px;
  max-width: min(320px, calc(100vw - 32px));
  max-height: min(70vh, 440px);
  overflow-y: auto;
  padding: 8px;
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 14px 44px rgba(15, 23, 42, 0.14);
  z-index: 400;
}

.nav-dropdown__panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 10px;
}

.nav-dropdown:hover .nav-dropdown__panel,
.nav-dropdown:focus-within .nav-dropdown__panel {
  display: block !important;
}

.site-nav--primary > .nav-dropdown:nth-of-type(3) .nav-dropdown__panel {
  left: auto;
  right: 0;
}

.nav-dropdown__item {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.nav-dropdown__item:hover {
  background: #f0f4fa;
  color: var(--accent);
  text-decoration: none;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.25;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 24px 0 12px;
}

p {
  margin: 0 0 12px;
  color: var(--text-muted);
}

.breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  margin: 0 6px;
  color: var(--border);
}

.card-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-top: 16px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  background: var(--panel);
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.card p {
  font-size: 0.875rem;
  margin: 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--panel);
  margin-top: 48px;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}

.placeholder-note {
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  background: #eff6ff;
  color: #1e40af;
  border-radius: 0 8px 8px 0;
  font-size: 0.9375rem;
  margin-top: 8px;
}

ul.link-list {
  margin: 8px 0 0 20px;
  color: var(--text-muted);
}

ul.link-list li {
  margin-bottom: 6px;
}
