.doc-grid-wrapper {
  max-width: 1040px;
  margin: 30px auto 30px auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 30px;
  border-radius: 12px;
}

.doc-wrapper {
  max-width: 1040px;
  margin: 30px auto;
  border-radius: 12px;
}

.doc-wrapper ul {
  list-style-type: disc;
  padding-left: 40px;
}

.scroll-margin-top {
  scroll-margin-top: 65px;
}

pre {
  background: #0f172a;
  color: #e5e7eb;
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 15px;
  white-space: pre-wrap; /* Since CSS 2.1 */
  white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
  white-space: -pre-wrap; /* Opera 4-6 */
  white-space: -o-pre-wrap; /* Opera 7 */
  word-wrap: break-word; /* Internet Explorer 5.5+ */
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
}

.sidebar {
  padding: 30px 22px;
  border-right: 1px solid var(--apple-border);
  background: var(--apple-surface);
  border-radius: 12px;
  box-shadow: 0 1px 4px var(--apple-shadow);
  border: 1px solid var(--border);
}

.sidebar h3 {
  color: var(--apple-text);
  margin-bottom: 16px;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.sidebar nav a {
  display: block;
  padding: 8px 0;
  color: var(--apple-text-dim);
  text-decoration: none;
  transition: color 0.18s ease;
}

.note {
  background: #f1f5f9;
  border-left: 4px solid #3b82f6;
  padding: 12px 16px;
  margin-top: 16px;
  color: #1e293b;
}

.sidebar nav a:hover {
  color: var(--apple-accent);
}

.content {
  position: relative;
  padding: 20px 20px 0 20px;
  background: var(--apple-surface);
  border-radius: 12px;
  box-shadow: 0 1px 4px var(--apple-shadow);
  border: 1px solid var(--apple-border);
  border: 1px solid var(--border);
}

.content h1 {
  margin: 0 0 20px;
  font-size: 2rem;
  letter-spacing: -0.02em;
  color: var(--apple-text);
}

.updated {
  font-size: 0.85rem;
  margin-top: 5px;
}

.version-badge {
  display: inline-block;
  background: var(--apple-accent);
  color: #000;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 600;
  margin: 15px 0 25px 0;
  letter-spacing: 0.02em;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.link-card {
  padding: 18px 20px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--apple-text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.link-card:hover {
  border-color: var(--apple-border-strong);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--apple-shadow);
}

.component-card {
  background: var(--apple-surface);
  border: 1px solid var(--apple-border);
  padding: 20px;
  border-radius: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.component-card:hover {
  border-color: var(--apple-border-strong);
  background: var(--apple-surface-hover);
}

.related-content {
  margin: 0;
  padding: 0 !important;
}

.related-content li {
  list-style-type: none;
  margin-bottom: 30px;
}

.component-card h3 {
  margin-bottom: 10px;
  color: var(--apple-text);
}

.component-card p {
  color: var(--apple-text-dim);
}

[repo] {
  color: var(--accent);
}

@media (max-width: 1060px) {
  .doc-grid-wrapper,
  .doc-wrapper {
    margin: 30px 20px;
  }
}

@media (max-width: 800px) {
  .doc-grid-wrapper {
    display: block;
  }

  .doc-wrapper ul {
    list-style-type: disc;
    padding-left: 30px;
  }

  .content {
    padding: 20px 20px 0 20px;
  }

  .sidebar {
    margin-bottom: 30px;
  }
}

@media (max-width: 510px) {
  .doc-wrapper ul {
    list-style-type: disc;
    padding-left: 20px;
  }

  .doc-grid-wrapper h3 {
    font-size: 1.075rem;
  }
}
