/* ── Zeekr 7X Manual — shared stylesheet ─────────────────────────────────── */

:root {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --border: #e0ddd6;
  --text: #1a1a1a;
  --muted: #888880;
  --accent: #1a1a1a;
  --highlight: #d4e8c2;
  --section-dot: #c8c4bc;
  --warning-bg: #fffbeb;
  --warning-border: #d4a800;
  --note-bg: #f0f4ff;
  --note-border: #4a7aff;
  --caution-bg: #fff4f0;
  --caution-border: #e04a1a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ───────────────────────────────────────────────────────────────── */

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */

.sidebar {
  background: var(--accent);
  color: var(--bg);
  padding: 40px 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.45);
  margin-bottom: 6px;
}

.sidebar-model {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--bg);
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

.sidebar-search-link {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(245,244,240,0.1);
  border: 1px solid rgba(245,244,240,0.15);
  border-radius: 6px;
  padding: 9px 13px;
  color: rgba(245,244,240,0.75);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 24px;
  transition: background 0.15s;
}
.sidebar-search-link:hover { background: rgba(245,244,240,0.18); }

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  font-size: 11px;
  color: rgba(245,244,240,0.3);
  line-height: 1.6;
}

/* ── Sidebar nav (page template) ─────────────────────────────────────────── */

.sb-nav {
  flex: 1;
  overflow-y: auto;
  margin: 0 -28px;
  padding: 0 0 16px;
}

.sb-section {
  border-bottom: 1px solid rgba(245,244,240,0.07);
}

.sb-section-name {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.35);
  padding: 11px 28px 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.sb-section-name::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 1.5px solid rgba(245,244,240,0.25);
  border-bottom: 1.5px solid rgba(245,244,240,0.25);
  transform: rotate(-45deg);
  margin-right: 2px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.sb-section--active .sb-section-name,
.sb-section--open .sb-section-name {
  color: rgba(245,244,240,0.65);
}

.sb-section--active .sb-section-name::after,
.sb-section--open .sb-section-name::after {
  transform: rotate(45deg);
  border-color: rgba(245,244,240,0.5);
}

.sb-pages {
  list-style: none;
  padding: 0 0 8px;
  display: none;
}

.sb-section--active .sb-pages,
.sb-section--open .sb-pages {
  display: block;
}

.sb-pages a {
  display: block;
  font-size: 12px;
  color: rgba(245,244,240,0.5);
  text-decoration: none;
  padding: 4px 28px;
  line-height: 1.5;
  transition: color 0.12s, background 0.12s;
  border-left: 2px solid transparent;
}

.sb-pages a:hover {
  color: rgba(245,244,240,0.9);
  background: rgba(245,244,240,0.05);
}

.sb-pages a.sb-page--active {
  color: #f5f4f0;
  border-left-color: #f5f4f0;
  background: rgba(245,244,240,0.08);
  font-weight: 500;
}

/* ── Sidebar nav (search template) ───────────────────────────────────────── */

.sidebar-nav-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245,244,240,0.4);
  margin-bottom: 10px;
  margin-top: 24px;
}

.sidebar-nav a {
  display: block;
  font-size: 12px;
  color: rgba(245,244,240,0.7);
  text-decoration: none;
  padding: 5px 0;
  border-bottom: 1px solid rgba(245,244,240,0.08);
  transition: color 0.15s;
}

.sidebar-nav a:hover { color: var(--bg); }
.sidebar-nav a.active { color: var(--bg); font-weight: 500; }

/* ── Page main area ───────────────────────────────────────────────────────── */

.main {
  padding: 48px 56px 80px;
  max-width: 820px;
}

.breadcrumb {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span { margin: 0 8px; opacity: 0.4; }

.page-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

/* ── Content ──────────────────────────────────────────────────────────────── */

.content {
  font-size: 14px;
  line-height: 1.65;
  color: #1a1a1a;
}

.content h1,
.content h2,
.content .title {
  font-size: 17px;
  font-weight: 600;
  margin: 28px 0 10px;
  color: var(--text);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.content h3,
.content h4,
.content .subtitle {
  font-size: 13px;
  font-weight: 700;
  margin: 24px 0 6px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.content > h1:first-child,
.content > h2:first-child {
  display: none;
}

.content p { margin-bottom: 12px; }

.content ul,
.content ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.content li {
  margin-bottom: 2px;
  padding-left: 3px;
}

.content li p,
.content li > p:first-child {
  margin-bottom: 0;
}

.content li img { margin: 4px 0; }

.content strong, .content b { font-weight: 600; }
.content em, .content i { font-style: italic; }

/* Tables */
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0;
  font-size: 13px;
}

.content th {
  background: var(--accent);
  color: var(--bg);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 9px 13px;
  text-align: left;
}

.content td {
  padding: 0 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.content tr:last-child td { border-bottom: none; }
.content tr:nth-child(even) td { background: rgba(0,0,0,0.02); }

/* Warning / Note / Caution boxes */
.content .warning,
.content [data-type="warning"] {
  background: var(--warning-bg);
  border-left: 3px solid var(--warning-border);
  padding: 14px 18px;
  margin: 20px 0;
  border-radius: 0 4px 4px 0;
}

.content .note,
.content [data-type="note"] {
  background: var(--note-bg);
  border-left: 3px solid var(--note-border);
  padding: 14px 18px;
  margin: 20px 0;
  border-radius: 0 4px 4px 0;
}

.content .caution,
.content [data-type="caution"] {
  background: var(--caution-bg);
  border-left: 3px solid var(--caution-border);
  padding: 14px 18px;
  margin: 20px 0;
  border-radius: 0 4px 4px 0;
}

/* Images */
.content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 20px 0;
  border-radius: 4px;
}

.content img[src=""], .content img:not([src]) { display: none; }

/* Links */
.content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
}
.content a:hover { text-decoration-color: var(--accent); }

/* Step lists */
.content ol.steps,
.content [class*="steps"] ol,
.content [class*="procedure"] ol {
  counter-reset: steps;
  list-style: none;
  padding-left: 0;
}

.content ol.steps li,
.content [class*="steps"] ol li {
  counter-increment: steps;
  padding-left: 36px;
  position: relative;
  margin-bottom: 12px;
}

.content ol.steps li::before,
.content [class*="steps"] ol li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  background: var(--accent);
  color: var(--bg);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* ── Search page ──────────────────────────────────────────────────────────── */

.search-header { margin-bottom: 40px; }

.page-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.search-wrap { position: relative; }

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

#search-input {
  width: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px 14px 44px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,26,26,0.06);
}

#search-input::placeholder { color: var(--muted); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.filter-chip {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.filter-chip:hover, .filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.results-meta {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin: 28px 0 20px;
  min-height: 18px;
}

.result-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.result-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 20px 24px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.result-card:hover {
  border-color: var(--accent);
  transform: translateX(3px);
  box-shadow: -3px 0 0 var(--accent);
}

.result-section {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.result-section::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--section-dot);
}

.result-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.result-excerpt {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.result-excerpt mark, mark {
  background: var(--highlight);
  color: var(--text);
  padding: 0 2px;
  border-radius: 2px;
}

.state-message {
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.state-message .big {
  font-size: 44px;
  font-weight: 300;
  margin-bottom: 12px;
  display: block;
  letter-spacing: -0.02em;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .main { padding: 28px 20px 60px; }
  .page-title { font-size: 22px; }
}
