:root {
  --color-bg: #ffffff;
  --color-surface: #f7f8fa;
  --color-surface-2: #eef0f4;
  --color-border: #e4e7ec;
  --color-text: #1a1d23;
  --color-text-muted: #5a6270;
  --color-text-subtle: #8a92a0;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-soft: #eff4ff;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.06);
  --max-width: 1120px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--color-text);
}

.logo:hover {
  text-decoration: none;
}

.header-nav {
  display: flex;
  gap: 28px;
}

.header-nav a {
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 500;
}

.header-nav a:hover {
  color: var(--color-text);
  text-decoration: none;
}

.header-nav a[aria-current="page"] {
  color: var(--color-text);
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(180deg, var(--color-surface) 0%, #ffffff 100%);
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--color-border);
}

.breadcrumb {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--color-text-subtle);
}

.breadcrumb a {
  color: var(--color-text-muted);
}

.breadcrumb span {
  margin: 0 6px;
  color: var(--color-text-subtle);
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-lead {
  margin: 0 0 28px;
  color: var(--color-text-muted);
  font-size: 16px;
  max-width: 640px;
}

.search-box {
  position: relative;
  max-width: 640px;
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--color-text-subtle);
  pointer-events: none;
}

#faq-search {
  width: 100%;
  padding: 16px 48px 16px 50px;
  font-size: 16px;
  font-family: inherit;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

#faq-search::placeholder {
  color: var(--color-text-subtle);
}

#faq-search:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-clear:hover {
  background: var(--color-border);
}

.search-result {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ===== Main Grid ===== */
.main-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  padding-top: 48px;
  padding-bottom: 80px;
}

/* ===== Sidebar ===== */
.sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
}

.sidebar-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
}

.sidebar-list li {
  margin: 0;
}

.sidebar-list a {
  display: block;
  padding: 8px 12px;
  margin: 2px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.sidebar-list a:hover {
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
}

.sidebar-list a.active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  border-left-color: var(--color-primary);
}

.sidebar-contact {
  padding: 20px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.sidebar-contact-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
}

.sidebar-contact-text {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.btn-contact {
  display: inline-block;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.btn-contact:hover {
  background: var(--color-surface-2);
  text-decoration: none;
}

/* ===== Content / FAQ ===== */
.content {
  min-width: 0;
}

.faq-category {
  margin-bottom: 48px;
}

.faq-category:last-of-type {
  margin-bottom: 24px;
}

.category-title {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.faq-item:hover {
  border-color: #cfd5de;
}

.faq-item[open] {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.faq-item summary {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.q-mark {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 14px;
  border-radius: 50%;
}

.q-text {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--color-text);
  padding-top: 3px;
}

.chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 5px;
  position: relative;
  transition: transform 0.2s ease;
}

.chevron::before,
.chevron::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 2px;
  background: var(--color-text-muted);
  border-radius: 1px;
  transform-origin: center;
}

.chevron::before {
  transform: translate(-75%, -50%) rotate(45deg);
}

.chevron::after {
  transform: translate(-25%, -50%) rotate(-45deg);
}

.faq-item[open] .chevron {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 20px 20px 62px;
  color: var(--color-text-muted);
  font-size: 14.5px;
  line-height: 1.8;
  border-top: 1px solid var(--color-surface-2);
  padding-top: 16px;
  margin-top: -1px;
}

.faq-answer p {
  margin: 0 0 12px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* ===== No Results ===== */
.no-results {
  padding: 48px 24px;
  text-align: center;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px dashed var(--color-border);
}

/* ===== CTA Card ===== */
.cta-card {
  margin-top: 48px;
  padding: 32px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.cta-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
}

.cta-card p {
  margin: 0 0 20px;
  color: var(--color-text-muted);
  font-size: 14.5px;
}

.btn-primary {
  display: inline-block;
  padding: 12px 24px;
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  text-decoration: none;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a {
  font-size: 13px;
  color: var(--color-text-muted);
}

.footer-nav a:hover {
  color: var(--color-text);
}

/* ===== Responsive ===== */
@media (max-width: 880px) {
  .main-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 32px;
  }

  .sidebar {
    position: static;
  }

  .sidebar-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
  }

  .sidebar-list a {
    border-left: none;
    border: 1px solid var(--color-border);
    background: #fff;
    padding: 6px 12px;
    font-size: 13px;
  }

  .sidebar-list a.active {
    border-color: var(--color-primary);
  }

  .sidebar-contact {
    display: none;
  }

  .hero {
    padding: 40px 0 32px;
  }

  .hero h1 {
    font-size: 28px;
  }
}

@media (max-width: 560px) {
  .header-nav {
    gap: 16px;
  }

  .header-nav a {
    font-size: 13px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .faq-item summary {
    padding: 16px;
    gap: 10px;
  }

  .faq-answer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cta-card {
    padding: 24px 20px;
  }

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