/* MEO GEAR Help Center — Original Design
   Brand palette derived from MEO GEAR logo (blue→green gradient) */

:root {
  --brand-blue: #3FA7E0;
  --brand-green: #5BBE56;
  --brand-gradient: linear-gradient(135deg, #3FA7E0 0%, #5BBE56 100%);
  --text-primary: #1A1F2E;
  --text-secondary: #5A6573;
  --text-muted: #8993A4;
  --border: #E5EAF0;
  --border-strong: #C9D2DE;
  --surface: #FFFFFF;
  --surface-alt: #F7F9FB;
  --surface-hover: #EEF3F8;
  --shadow-sm: 0 1px 2px rgba(20, 30, 50, 0.04);
  --shadow-md: 0 4px 12px rgba(20, 30, 50, 0.06);
  --shadow-lg: 0 12px 32px rgba(20, 30, 50, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --container: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

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

/* ============== Header ============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(8px);
}

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

.brand-logo img {
  height: 38px;
  width: auto;
}

.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.header-search input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--surface-alt);
  color: var(--text-primary);
  transition: border-color .15s, background .15s, box-shadow .15s;
}

.header-search input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(63, 167, 224, 0.15);
}

.header-search::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238993A4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
  background-repeat: no-repeat;
  pointer-events: none;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

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

/* ============== Breadcrumb ============== */
.breadcrumb {
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}

.breadcrumb-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  font-size: 13px;
  color: var(--text-secondary);
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--brand-blue); }
.breadcrumb .sep { color: var(--text-muted); }
.breadcrumb .current { color: var(--text-primary); font-weight: 500; }

/* ============== Hero ============== */
.hero {
  position: relative;
  padding: 64px 0 56px;
  background: linear-gradient(180deg, #F4F8FC 0%, #FFFFFF 100%);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -50% auto;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: var(--brand-gradient);
  opacity: 0.08;
  filter: blur(20px);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
}

.hero h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 12px;
  color: var(--text-primary);
}

.hero p {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0 0 32px;
}

.hero-search {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

.hero-search input {
  width: 100%;
  height: 56px;
  padding: 0 24px 0 56px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  font-size: 16px;
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  transition: border-color .15s, box-shadow .15s;
}

.hero-search input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(63, 167, 224, 0.15), var(--shadow-md);
}

.hero-search::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6573' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
  background-repeat: no-repeat;
  pointer-events: none;
}

/* ============== Section ============== */
.section {
  padding: 64px 0;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 0 28px;
}

.section-heading h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.01em;
}

.section-heading .accent {
  display: inline-block;
  width: 4px;
  height: 22px;
  border-radius: 2px;
  background: var(--brand-gradient);
  margin-right: 12px;
  transform: translateY(3px);
}

/* ============== Category grid ============== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.category-card {
  display: block;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
  color: inherit;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  text-decoration: none;
}

.category-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #fff;
}

.category-icon svg {
  width: 22px;
  height: 22px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.category-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
}

.category-card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 14px;
  line-height: 1.6;
}

.category-card .article-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============== Popular articles ============== */
.article-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}

.article-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  transition: background .12s;
}

.article-list a:nth-child(odd) { border-right: 1px solid var(--border); }
.article-list a:last-child,
.article-list a:nth-last-child(2):nth-child(odd) { border-bottom: none; }

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

.article-list .icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--brand-blue);
}

/* ============== Article body ============== */
.layout-with-sidebar {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  padding: 40px 0 80px;
}

.sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  font-size: 14px;
}

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

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

.sidebar li a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  transition: background .12s, color .12s;
}

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

.sidebar li a.active {
  background: rgba(63, 167, 224, 0.08);
  color: var(--brand-blue);
  font-weight: 500;
}

.article-body {
  min-width: 0;
}

.article-body h1 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 8px;
}

.article-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 32px;
}

.article-body h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 40px 0 16px;
  padding-top: 8px;
}

.article-body h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 32px 0 12px;
}

.article-body p { margin: 0 0 16px; }

.article-body ul, .article-body ol {
  padding-left: 24px;
  margin: 0 0 16px;
}

.article-body li { margin: 4px 0; }

.article-body code {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 13px;
}

.article-body pre {
  background: #1A1F2E;
  color: #E5EAF0;
  padding: 16px 20px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
}

.article-body pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
}

.callout {
  padding: 16px 20px;
  border-left: 4px solid var(--brand-blue);
  background: var(--surface-alt);
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
  font-size: 14px;
}

.callout.warning { border-left-color: #E8A33F; background: #FFF8EC; }
.callout.danger { border-left-color: #E0533F; background: #FDECEA; }

.article-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

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

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

.footer-brand {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-brand strong {
  color: var(--text-primary);
  font-weight: 600;
}

.footer-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============== Responsive ============== */
@media (max-width: 900px) {
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-list { grid-template-columns: 1fr; }
  .article-list a:nth-child(odd) { border-right: none; }
  .layout-with-sidebar { grid-template-columns: 1fr; gap: 24px; }
  .sidebar { position: static; }
  .header-search { display: none; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 26px; }
}

@media (max-width: 560px) {
  .category-grid { grid-template-columns: 1fr; }
  .header-nav { display: none; }
  .brand-logo img { height: 30px; }
  .header-inner { height: 60px; }
  .hero h1 { font-size: 22px; }
  .article-body h1 { font-size: 24px; }
  .container { padding: 0 16px; }
}
