/* BlackCow Help Documentation Styles */

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

html {
  font-size: 15px;
}

body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: #333;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
}

/* ── Page wrapper ──────────────────────────────────── */
.page-wrapper {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* ── Site header ──────────────────────────────────── */
.site-header {
  background: #1a1a1a;
  color: #fff;
  padding: 0 24px;
}

.site-header-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  gap: 16px;
}

.site-header .app-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.site-header .page-title {
  font-size: 14px;
  color: #aaa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Breadcrumb / back link ──────────────────────── */
.breadcrumb {
  margin: 20px 0 28px;
  font-size: 13px;
  color: #888;
}

.breadcrumb a {
  color: #555;
  text-decoration: none;
  border-bottom: 1px solid #ddd;
  padding-bottom: 1px;
}

.breadcrumb a:hover {
  color: #1a1a1a;
  border-bottom-color: #1a1a1a;
}

/* ── Page headings ───────────────────────────────── */
h1 {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 32px 0 12px;
  letter-spacing: -0.4px;
}

h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 40px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8e8e8;
}

h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 28px 0 8px;
}

p {
  margin: 0 0 16px;
}

/* ── Table of contents ───────────────────────────── */
.toc {
  background: #f5f5f5;
  border-left: 4px solid #1a1a1a;
  border-radius: 0 8px 8px 0;
  padding: 18px 24px;
  margin: 24px 0 36px;
}

.toc p {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #555;
  margin: 0 0 10px;
}

.toc ul {
  margin: 0;
  padding: 0 0 0 18px;
}

.toc li {
  margin: 5px 0;
  font-size: 14px;
}

.toc a {
  color: #1a1a1a;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.toc a:hover {
  border-bottom-color: #1a1a1a;
}

/* ── Tables ──────────────────────────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 28px;
  font-size: 14px;
}

thead th {
  background: #1a1a1a;
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  font-size: 13px;
}

tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

tbody tr:nth-child(even) td {
  background: #fafafa;
}

tbody tr:hover td {
  background: #f0f0f0;
}

/* ── Note / tip boxes ────────────────────────────── */
.note,
.tip,
.warning {
  border-radius: 8px;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 14px;
  line-height: 1.6;
}

.note {
  background: #e8f0fe;
  border-left: 4px solid #4285f4;
  color: #1a3060;
}

.tip {
  background: #e6f4ea;
  border-left: 4px solid #34a853;
  color: #1a3a22;
}

.warning {
  background: #fef7e0;
  border-left: 4px solid #fbbc04;
  color: #3d2f00;
}

.note strong,
.tip strong,
.warning strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.75;
}

/* ── Numbered / bulleted lists ───────────────────── */
ol, ul {
  margin: 0 0 16px;
  padding-left: 24px;
}

li {
  margin: 6px 0;
}

/* ── Steps (ordered list styled as steps) ────────── */
ol.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

ol.steps li {
  counter-increment: step;
  display: flex;
  gap: 14px;
  margin: 14px 0;
  align-items: flex-start;
}

ol.steps li::before {
  content: counter(step);
  min-width: 28px;
  height: 28px;
  background: #1a1a1a;
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Index page: topic grid ──────────────────────── */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.topic-card {
  display: block;
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.topic-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.09);
  border-color: #bbb;
}

.topic-card .topic-icon {
  font-size: 22px;
  margin-bottom: 8px;
  display: block;
}

.topic-card .topic-name {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
}

.topic-card .topic-desc {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

/* ── Field reference inline badge ────────────────── */
.field {
  display: inline-block;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1px 7px;
  font-size: 13px;
  font-family: inherit;
  color: #333;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 600px) {
  .page-wrapper {
    padding: 0 16px 48px;
  }

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 16px;
  }

  .site-header-inner {
    height: 48px;
  }

  .site-header .app-name {
    font-size: 16px;
  }

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

  table {
    font-size: 13px;
  }

  thead th,
  tbody td {
    padding: 8px 10px;
  }
}
