.berkshire-skills-guide {
  margin: 0.75rem 0 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.berkshire-skills-guide h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
}

.berkshire-skills-guide ol {
  margin: 0 0 0.65rem;
  padding-left: 1.25rem;
  line-height: 1.55;
  font-size: 0.88rem;
}

.berkshire-skills-lang {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.berkshire-skills-lang button.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}

.berkshire-skill-when,
.berkshire-skill-when-inline {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.berkshire-skill-when-inline {
  margin-top: 0.5rem;
}

.berkshire-india-note {
  margin-bottom: 0.75rem;
}

.berkshire-india-note .linkish {
  background: none;
  border: none;
  padding: 0;
  color: var(--gold);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.berkshire-india-note .linkish:hover {
  color: var(--text);
}

.berkshire-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
  -webkit-overflow-scrolling: touch;
}

.berkshire-tabs button {
  min-height: 44px;
  flex: 1 1 auto;
}

.berkshire-tabs button.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}

.berkshire-pane {
  display: none;
}

.berkshire-pane.active {
  display: block;
}

.berkshire-out {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  white-space: pre-wrap;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.55;
  max-height: 420px;
  overflow: auto;
}

.berkshire-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.berkshire-skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.berkshire-skill-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.berkshire-skill-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
}

.berkshire-skill-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.berkshire-skill-detail {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  max-height: 480px;
  overflow: auto;
  font-size: 0.88rem;
  line-height: 1.6;
}

.berkshire-skill-body {
  white-space: pre-wrap;
  font-family: inherit;
  color: var(--text);
}

.berkshire-skill-body a {
  color: inherit;
  text-decoration: none;
  pointer-events: none;
}

.berkshire-skill-detail h1,
.berkshire-skill-detail h2,
.berkshire-skill-detail h3,
.berkshire-skill-detail h4 {
  margin-top: 1rem;
  white-space: normal;
}

.berkshire-skill-detail h3:first-child {
  margin-top: 0;
}

.berkshire-signal-buy {
  color: var(--bull);
  font-weight: 700;
}

.berkshire-signal-watch {
  color: var(--warn);
}

@media (max-width: 768px) {
  .berkshire-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.4rem;
    margin: 0.85rem -0.25rem 1rem;
    padding: 0.15rem 0.25rem 0.35rem;
    scrollbar-width: none;
  }

  .berkshire-tabs::-webkit-scrollbar {
    display: none;
  }

  .berkshire-tabs button {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.82rem;
    padding: 0.65rem 0.85rem;
  }

  .berkshire-skills-guide {
    padding: 0.85rem;
  }

  .berkshire-skills-guide ol {
    padding-left: 1.1rem;
    font-size: 0.84rem;
  }

  .berkshire-skills-lang {
    flex-wrap: wrap;
  }

  .berkshire-skills-grid {
    grid-template-columns: 1fr;
  }

  .berkshire-skill-card {
    padding: 0.75rem 0.85rem;
  }

  .berkshire-skill-detail {
    max-height: min(60vh, 480px);
    padding: 0.85rem;
    font-size: 0.85rem;
  }

  .berkshire-out {
    max-height: min(50vh, 360px);
    font-size: 0.78rem;
    padding: 0.85rem;
    -webkit-overflow-scrolling: touch;
  }

  #berkshire-section .search-options {
    flex-direction: column;
    align-items: stretch;
  }

  #berkshire-section .field-group {
    width: 100% !important;
    max-width: none !important;
    flex: 1 1 100% !important;
  }

  #berkshire-section .field-group input,
  #berkshire-section .field-group select {
    width: 100%;
    min-height: 44px;
  }

  #berkshire-section .field-group button {
    width: 100%;
    min-height: 44px;
  }

  #berkshire-section .hero-search .lead {
    font-size: 0.86rem;
    line-height: 1.55;
  }
}
