:root {
  --rb-primary: var(--tf-accent, #4a5d23);
  --rb-primary-hover: var(--tf-accent-hover, #3b4b1c);
  --rb-bg-card: #ffffff;
  --rb-border: var(--tf-rule, #e5e0d8);
  --rb-text-main: var(--tf-ink, #12100e);
  --rb-text-muted: var(--tf-muted, #5c5549);
  --rb-pill-bg: var(--tf-surface, #faf9f7);
  --rb-pill-hover: var(--tf-rule, #e5e0d8);
  --rb-result-bg: var(--tf-surface, #faf9f7);
}

.rb-tool-container {
  max-width: 900px;
  margin: 0 auto 3rem auto;
  font-family: inherit;
  color: var(--rb-text-main);
}

.rb-editor-card {
  background: var(--rb-bg-card);
  border: 1px solid var(--rb-border);
  border-radius: 2px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: none;
}

.rb-presets-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rb-border);
}

.rb-presets-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--rb-text-muted);
}

.rb-pill-btn {
  background: var(--rb-pill-bg);
  border: 1px solid var(--rb-border);
  color: var(--rb-text-main);
  border-radius: 2px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.rb-pill-btn:hover {
  background: var(--rb-pill-hover);
  border-color: var(--rb-primary);
}

.rb-search-bar-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.rb-search-input {
  width: 100%;
  padding: 0.85rem 2.5rem 0.85rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--rb-border);
  border-radius: 2px;
  background: var(--rb-bg-card);
  color: var(--rb-text-main);
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rb-search-input:focus {
  outline: none;
  border-color: var(--rb-primary);
  box-shadow: none;
}

.rb-clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--rb-text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  line-height: 1;
}

.rb-clear-btn:hover {
  color: var(--rb-text-main);
}

.rb-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rb-filter-chip {
  background: var(--rb-pill-bg);
  border: 1px solid var(--rb-border);
  color: var(--rb-text-muted);
  border-radius: 2px;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.rb-filter-chip:hover {
  background: var(--rb-pill-hover);
  color: var(--rb-text-main);
}

.rb-filter-chip.rb-active {
  background: var(--rb-primary);
  color: #ffffff;
  border-color: var(--rb-primary);
}

.rb-results-card {
  background: var(--rb-result-bg);
  border: 1px solid var(--rb-border);
  border-radius: 2px;
  padding: 1.75rem;
}

.rb-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.rb-sub-title {
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
  color: var(--rb-text-main);
}

.rb-count-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--rb-primary);
}

.rb-items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .rb-items-grid {
    grid-template-columns: 1fr;
  }
}

.rb-item-card {
  background: var(--rb-bg-card);
  border: 1px solid var(--rb-border);
  border-radius: 2px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.rb-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.rb-item-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--rb-text-main);
  margin: 0;
}

.rb-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  white-space: nowrap;
  display: inline-block;
}

.rb-b-recycle { background: #dbeafe; color: #1e40af; }
.rb-b-compost { background: #dcfce7; color: #166534; }
.rb-b-trash { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.rb-b-depot { background: #fef3c7; color: #92400e; }

.rb-item-rule {
  font-size: 0.85rem;
  color: var(--rb-text-main);
  line-height: 1.45;
}

.rb-item-note {
  font-size: 0.75rem;
  color: var(--rb-text-muted);
  line-height: 1.4;
  margin-top: 0.2rem;
}

.rb-resin-card {
  background: var(--rb-bg-card);
  border: 1px solid var(--rb-border);
  border-radius: 2px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.rb-resin-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0 0 0.85rem 0;
  color: var(--rb-text-main);
}

.rb-resin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.75rem;
}

.rb-resin-item {
  background: var(--rb-pill-bg);
  border: 1px solid var(--rb-border);
  border-radius: 2px;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
}

.rb-resin-item strong {
  font-size: 0.85rem;
  color: var(--rb-text-main);
}

.rb-resin-item span {
  color: var(--rb-text-muted);
}

.rb-tip-box {
  background: var(--rb-bg-card);
  border: 1px solid var(--rb-border);
  border-radius: 2px;
  padding: 1.25rem;
}

.rb-tip-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--rb-primary);
}

.rb-tip-box p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--rb-text-muted);
  line-height: 1.5;
}

.rb-ad {
  overflow: hidden;
  min-height: 280px;
  margin: 32px 0;
  text-align: center;
}
/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --rb-bg-card: var(--tf-surface);
}
