/* Pure Zip Core online tutorial — white theme, COOLLEGET-inspired chrome */
:root {
  --bg-page: #f5f6f8;
  --bg-card: #ffffff;
  --text: #1a1d24;
  --muted: #5c6370;
  --border: #e2e6ee;
  --accent: #c62828;
  --accent-hover: #b71c1c;
  --header-bg: #0d0d0d;
  --link: #1565c0;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-page);
}

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

.site-header {
  background: var(--header-bg);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.04em;
  font-size: 1.25rem;
  color: #fff;
  text-decoration: none;
}
.site-logo:hover {
  color: #f5f5f5;
  text-decoration: none;
}
.site-logo__mark {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #8b0000);
  display: grid;
  place-items: center;
  font-size: 14px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
}
.site-nav a {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover {
  color: #fff;
  text-decoration: underline;
}
.site-nav a.is-home {
  font-weight: 700;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}
.site-nav a.is-home:hover {
  background: rgba(255, 255, 255, 0.2);
  text-decoration: none;
}
.site-nav a.is-active {
  color: #ff6b6b;
  font-weight: 600;
}

.layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    order: -1;
  }
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.breadcrumb a {
  color: var(--muted);
}
.breadcrumb a:hover {
  color: var(--accent);
}

.main-card {
  background: var(--bg-card);
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 28px 32px 36px;
}

@media (max-width: 600px) {
  .main-card {
    padding: 20px 18px 28px;
  }
}

.page-title {
  margin: 0 0 8px;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.block-title {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin: 28px 0 14px;
  font-size: 1.2rem;
  font-weight: 700;
}
.block-title::before {
  content: "";
  width: 4px;
  flex-shrink: 0;
  background: var(--accent);
  border-radius: 2px;
}
.block-title:first-of-type {
  margin-top: 0;
}

.lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 0 20px;
}

.faq-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.faq-list li {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  background: #fafbfc;
}
.faq-list summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary::before {
  content: "▸";
  color: var(--accent);
  font-size: 0.85em;
  transition: transform 0.2s;
}
.faq-list details[open] summary::before {
  transform: rotate(90deg);
}
.faq-list .answer {
  padding: 0 18px 16px 42px;
  color: var(--text);
  font-size: 0.95rem;
}
.faq-list .answer p:first-child {
  margin-top: 0;
}
.faq-list .answer p:last-child {
  margin-bottom: 0;
}
.faq-list code,
.tip code {
  background: #eef1f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

.tip {
  margin: 16px 0;
  padding: 14px 16px;
  border-left: 4px solid #1565c0;
  background: #f0f7ff;
  border-radius: 0 8px 8px 0;
  font-size: 0.95rem;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.pagination a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.pagination .is-muted {
  opacity: 0.45;
  pointer-events: none;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.widget__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}
.widget__head::before {
  content: "";
  width: 3px;
  height: 18px;
  background: var(--accent);
  border-radius: 2px;
}
.widget__body {
  padding: 16px;
  font-size: 0.9rem;
  color: var(--muted);
}

.toc {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc li {
  margin-bottom: 6px;
}
.toc a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
}
.toc a:hover {
  background: #f0f2f6;
  text-decoration: none;
}
.toc a.is-current {
  background: #ffebee;
  color: var(--accent);
  font-weight: 700;
}

.ad-slot {
  min-height: 250px;
  background: #f8f9fb;
  border: 1px dashed #cfd6e4;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* AdSense unit sits inside widget; let responsive block use full sidebar width */
.ad-widget-body .adsbygoogle {
  display: block;
  min-height: 120px;
}

.site-footer {
  text-align: center;
  padding: 24px 20px;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: #fff;
}
