:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-alt: #eef4ff;
  --text: #162132;
  --muted: #607087;
  --line: #d7deea;
  --primary: #123c73;
  --primary-strong: #0b2950;
  --accent: #27b07d;
  --accent-soft: #dff8ee;
  --warning: #d9a441;
  --shadow: 0 18px 50px rgba(18, 60, 115, 0.08);
  --radius: 18px;
  --wrap: min(1160px, calc(100% - 32px));
  --sidebar: 300px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
  line-height: 1.75;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { opacity: 0.85; }
.wrap { width: var(--wrap); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(215,222,234,0.8);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 84px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
}
.brand strong {
  display: block;
  font-size: 1.05rem;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-nav ul,
.footer-links,
.side-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-nav a {
  display: inline-block;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 600;
}
.site-nav a:hover { background: var(--surface-alt); }

.nav-toggle,
.nav-toggle-label { display: none; }

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar);
  gap: 28px;
  padding: 32px 0 56px;
  align-items: start;
}
.content-area {
  display: grid;
  gap: 24px;
}
.panel,
.widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { padding: 28px; }
.widget { padding: 22px; }
.hero {
  background: radial-gradient(circle at top right, rgba(39,176,125,0.16), transparent 24%), linear-gradient(135deg, #ffffff 0%, #eef5ff 100%);
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
}
h1,h2,h3 { line-height: 1.3; margin-top: 0; }
h1 { font-size: clamp(1.9rem, 3vw, 2.8rem); margin-bottom: 14px; }
h2 { font-size: clamp(1.25rem, 2vw, 1.7rem); margin-bottom: 12px; }
h3 { font-size: 1.08rem; margin-bottom: 8px; }
p { margin: 0 0 1em; }
.lead { font-size: 1.08rem; color: var(--muted); }
.section-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 16px; }
.hero-actions,
.filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.button,
.chip,
.ad-banner {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
}
.button {
  min-height: 46px;
  padding: 0 18px;
}
.button.primary {
  background: var(--primary);
  color: #fff;
}
.button.secondary {
  background: var(--surface-alt);
  color: var(--primary);
}
.chip {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 10px 14px;
  cursor: pointer;
}
.chip.active,
.chip:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.cards {
  display: grid;
  gap: 18px;
}
.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
}
.text-link { font-weight: 700; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.feature-grid article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-alt);
}
.sidebar {
  display: grid;
  gap: 20px;
}
.ad-widget h2,
.widget h2 { font-size: 1.05rem; }
.ad-banner {
  width: 100%;
  min-height: 250px;
  border: 2px dashed #87a4cc;
  background: linear-gradient(135deg, #e6f0ff 0%, #f7fbff 100%);
  color: var(--primary);
  margin-bottom: 14px;
}
.side-links li + li,
.footer-links li + li { margin-top: 8px; }
.article-single p + p { margin-top: 1rem; }
.note-box,
.notice,
.result-box {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #f9fbff;
  padding: 18px;
}
.success {
  background: var(--accent-soft);
  border-color: #bcebcf;
}
.contact-form {
  display: grid;
  gap: 14px;
}
.contact-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #c7d3e5;
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
  background: #fff;
}
.prose ul { padding-left: 1.2rem; }
.site-footer {
  background: #0f1c2d;
  color: #d7e1ef;
  padding: 28px 0 18px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: start;
}
.footer-brand {
  font-weight: 800;
  font-size: 1.1rem;
}
.footer-copy,
.copyright,
.site-footer a { color: #d7e1ef; }
.copyright {
  text-align: center;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(215,225,239,0.18);
}

@media (max-width: 960px) {
  .feature-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .main-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .section-head {
    flex-direction: column;
    align-items: start;
  }

  .nav-toggle-label {
    display: inline-flex;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .nav-toggle-label span,
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    content: "";
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    position: relative;
    transition: 0.2s ease;
  }
  .nav-toggle-label span::before { position: absolute; top: -6px; }
  .nav-toggle-label span::after { position: absolute; top: 6px; }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 84px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 14px;
    display: none;
  }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .nav-toggle:checked + .nav-toggle-label + .site-nav {
    display: block;
  }
}

@media (max-width: 640px) {
  .panel { padding: 22px; }
  .header-inner { min-height: 74px; }
  .brand img { width: 40px; height: 40px; }
  .hero-actions .button,
  .filter-row .chip { width: 100%; }
}
