.pravo-page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.9rem 0.85rem;
}

.pravo-page h1 {
  margin-bottom: 0.5rem;
}

.pravo-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.pravo-intro {
  color: hsl(var(--muted-foreground));
  margin-bottom: 1rem;
}

.pravo-select-wrap {
  position: relative;
  min-width: 260px;
}

.pravo-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.pravo-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 260px;
  padding: 0.5rem 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  font-size: 1rem;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  cursor: pointer;
  text-align: left;
}

.pravo-select-trigger::after {
  content: "▾";
  margin-left: 0.5rem;
  color: hsl(var(--muted-foreground));
}

.pravo-select-trigger[aria-expanded="true"] {
  border-color: hsl(var(--gold) / 0.5);
}

.pravo-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 2px;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
  box-shadow: 0 8px 24px hsl(var(--foreground) / 0.12);
  z-index: 100;
  list-style: none;
  padding: 0.25rem 0;
}

.pravo-select-dropdown[hidden] {
  display: none !important;
}

.pravo-select-option {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 1rem;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  white-space: normal;
  word-wrap: break-word;
  word-break: break-word;
}

.pravo-select-option:hover,
.pravo-select-option[aria-selected="true"] {
  background: hsl(var(--accent) / 0.2);
}

.pravo-select {
  min-width: 260px;
  padding: 0.5rem 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  font-size: 1rem;
  background: hsl(var(--background));
}

#pravoRuleListWrap {
  width: 100%;
}

.pravo-rule-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pravo-rule-item {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  cursor: pointer;
  margin-bottom: 0.5rem;
  border: 1px solid hsl(var(--border) / 0.6);
  background: hsl(var(--card));
  transition: background 0.12s;
}

.pravo-rule-item:hover {
  background: hsl(var(--accent) / 0.15);
}

.pravo-rule-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.pravo-rule-item .pravo-rule-title {
  font-weight: 500;
  flex: 1;
}

.pravo-comment-btn {
  flex-shrink: 0;
  padding: 0.25rem 0.4rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--card));
  cursor: pointer;
  font-size: 1rem;
}

.pravo-comment-btn:hover {
  background: hsl(var(--accent) / 0.2);
}

.pravo-rule-item .pravo-rule-meta {
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
  margin-top: 0.2rem;
}

.pravo-empty {
  color: hsl(var(--muted-foreground));
  padding: 1rem;
}

.pravo-detail-panel {
  padding: 0.5rem 0;
}

.pravo-detail-panel.hidden {
  display: none;
}

.pravo-detail-back {
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
}

.pravo-detail-content {
  line-height: 1.6;
}

.pravo-detail-content h2 {
  font-size: 1.25rem;
  margin: 1rem 0 0.5rem;
}

.pravo-detail-content .text-ru,
.pravo-detail-content .text-el {
  margin: 0.75rem 0;
  padding: 0.75rem;
  background: hsl(var(--muted));
  border-radius: var(--radius);
}

.pravo-detail-content .interpretations {
  margin-top: 1.5rem;
  white-space: pre-wrap;
}

.pravo-source-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: hsl(var(--muted-foreground));
}

/* Кликабельные слова для словаря */
.pravo-rule-text .pravo-rule-word {
  cursor: pointer;
  border-radius: 2px;
  padding: 0 1px;
}

.pravo-rule-text .pravo-rule-word:hover {
  background: hsl(var(--accent) / 0.3);
}

.pravo-detail-content.no-word-click .pravo-rule-word {
  cursor: default;
}

.pravo-detail-content.no-word-click .pravo-rule-word:hover {
  background: transparent;
}

.pravo-interpretations-btn {
  margin-bottom: 0.5rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--background));
  cursor: pointer;
  font-size: 0.9rem;
}

.pravo-interpretations-btn:hover {
  background: hsl(var(--accent) / 0.15);
}

/* Visual vars для оформления */
.pravo-page .pravo-detail-content,
.pravo-page .pravo-rule-list {
  font-family: var(--reader-font, inherit);
  font-size: var(--reader-size, 16px);
  color: var(--reader-color);
}

.hidden {
  display: none !important;
}
