#rccRoot {
  --primary-color: var(--accent);
  --secondary-color: var(--ink);
  --border-color: var(--line);
  --paper: var(--rail);
  --accent-color: var(--accent);
}
.rcc-wrap .docs-crumb,
.portal .docs-crumb {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 400;
}
.rcc-wrap .docs-crumb a { color: var(--accent); }
.rcc-wrap .docs-crumb a:hover { text-decoration: underline; }
.rcc-wrap .disclaimer { color: var(--muted); font-size: 0.8rem; margin: 0.45rem 0 0; }
.docs-layout .docs-content.rcc-wrap { max-width: 1120px; }
.rcc-wrap .calc {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 16px;
  align-items: stretch;
}
.rcc-wrap .panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--rail);
  padding: 12px;
  box-sizing: border-box;
  height: 100%;
}
.rcc-wrap .calc > .panel {
  display: flex;
  flex-direction: column;
}
.rcc-wrap .result-panel { background: var(--surface); }
.rcc-wrap .seg {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
  background: var(--surface);
  box-sizing: border-box;
}
.rcc-wrap .seg button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  min-height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1;
  padding: 0 8px;
  box-sizing: border-box;
}
.rcc-wrap .seg button.on { background: var(--accent); color: var(--on-accent); }
.rcc-wrap .resistor-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1 1 auto;
  padding: 8px 4px 4px;
  min-height: 0;
}
.rcc-wrap .resistor-wrap svg { width: 100%; max-width: 340px; height: auto; }
.rcc-wrap .band-hit { cursor: pointer; }
.rcc-wrap .field { margin-bottom: 10px; }
.rcc-wrap .field label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.rcc-wrap .field-row { display: flex; gap: 6px; }
.rcc-wrap .field-row input,
.rcc-wrap .field-row select,
.rcc-simple input,
.rcc-simple select {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 8px;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  color: var(--ink);
}
.rcc-wrap .field-row input { flex: 1; min-width: 0; }
.rcc-wrap .field-row select,
.rcc-simple .field-row select {
  width: 96px;
  padding-right: 1.85rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231677ff'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.45rem center;
  background-size: 1rem 1rem;
  cursor: pointer;
}
.rcc-wrap .field-row input + select {
  width: 96px;
  flex: 0 0 96px;
}
.rcc-wrap .field-row select:only-child,
.rcc-wrap .field-row select.tol:only-child {
  width: 100%;
  flex: 1 1 auto;
}
.rcc-wrap .toolbar {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.rcc-wrap .toolbar button,
.rcc-wrap .result-tools button {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 10px;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
}
.rcc-wrap .toolbar .btn-example {
  background: #0891b2;
  border-color: transparent;
  color: #fff;
}
.rcc-wrap .toolbar .btn-example:hover {
  background: #0e7490;
  color: #fff;
}
.docs-layout .rcc-wrap .panel {
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
}
.docs-layout .rcc-wrap .result-panel {
  background: var(--accent-soft);
  border-radius: 0.5rem;
  padding: 0.85rem 1rem 1rem;
}
.docs-layout .rcc-wrap .ohm-num,
.docs-layout .rcc-wrap .out-num {
  color: var(--accent);
}
.rcc-wrap .btn-clear,
.rcc-wrap .btn-copy { background: var(--surface); border-color: var(--line); color: var(--ink); }
.rcc-wrap .note { font-size: 0.75rem; color: var(--muted); margin-top: 8px; }
.rcc-wrap .ohm-num {
  font-size: 2.55rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.rcc-wrap .formula-cap { color: var(--ink); font-size: 0.82rem; margin: 4px 0 8px; opacity: 0.82; }
.rcc-wrap .abbr {
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: auto;
}
.rcc-wrap .steps {
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink);
  white-space: pre-wrap;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 8px 10px;
  border-radius: var(--radius);
  margin: 0 0 10px;
  line-height: 1.5;
  -webkit-font-smoothing: auto;
}
.rcc-wrap .e-near,
.rcc-wrap .range { display: grid; gap: 8px; margin-bottom: 10px; }
.rcc-wrap .range { grid-template-columns: 1fr 1fr; }
.rcc-wrap .e-near { grid-template-columns: repeat(3, 1fr); }
.rcc-wrap .e-near div,
.rcc-wrap .range div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: var(--rail);
}
.rcc-wrap .e-near span,
.rcc-wrap .range span { display: block; font-size: 0.72rem; color: var(--muted); }
.rcc-wrap .e-near strong,
.rcc-wrap .range strong { font-variant-numeric: tabular-nums; }
.rcc-wrap .e-near .exact { color: var(--accent); }
.rcc-wrap .common { margin-top: 14px; }
.rcc-wrap .common-label { font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; }
.rcc-wrap .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.rcc-wrap .chips a,
.rcc-wrap .chips button {
  padding: 4px 8px;
  font-size: 0.78rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
}
.rcc-wrap .chips a:hover,
.rcc-wrap .chips button.on {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.rcc-wrap .next {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 10px;
  margin-bottom: 10px;
  background: var(--surface);
}
.rcc-wrap .next-label { font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; }
.rcc-wrap .result-tools { display: flex; gap: 8px; margin-top: 10px; }
.rcc-wrap .encode-box { display: none; }
.rcc-wrap.is-encode .encode-box { display: block; }
.rcc-wrap .table-wrap { margin-top: 16px; overflow-x: auto; }
.rcc-wrap table.bands { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.rcc-wrap table.bands th,
.rcc-wrap table.bands td {
  border: 1px solid var(--line);
  padding: 0;
  text-align: center;
}
.rcc-wrap table.bands th {
  background: #d7dee6;
  color: #243040;
  font-weight: 700;
  padding: 6px 4px;
}
.rcc-wrap table.bands th.is-active-col {
  background: var(--accent);
  color: var(--on-accent);
}
html[data-theme="dark"] .rcc-wrap table.bands th {
  background: #2a2a30;
  color: #e4e4e7;
}
html[data-theme="dark"] .rcc-wrap table.bands th.is-active-col {
  background: var(--accent);
  color: var(--on-accent);
}
.rcc-wrap table.bands td.lab {
  padding: 6px 8px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  background: var(--surface);
}
.rcc-wrap table.bands button.cell {
  display: block;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 0;
  padding: 6px 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}
.rcc-wrap table.bands button.cell:disabled { background: var(--rail); color: var(--muted); cursor: default; opacity: 0.55; }
.rcc-wrap table.bands button.cell.on {
  z-index: 1;
  font-weight: 800;
  box-shadow:
    inset 0 0 0 2px #fff,
    inset 0 0 0 5px var(--accent);
}
.rcc-wrap .lab .code {
  color: var(--muted);
  font-weight: 500;
  margin-left: 6px;
  font-family: var(--mono);
  font-size: 0.72rem;
}
.rcc-wrap details.common-tbl { margin-top: 10px; font-size: 0.82rem; }
.rcc-wrap details.common-tbl summary { cursor: pointer; }
.rcc-wrap details.common-tbl table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.rcc-wrap details.common-tbl th,
.rcc-wrap details.common-tbl td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--line); }
.rcc-wrap details.common-tbl th { background: var(--rail); }
.rcc-wrap details.common-tbl tr { cursor: pointer; }
.rcc-wrap details.common-tbl tr:hover { background: var(--accent-soft); }
.rcc-wrap .hint { font-size: 0.75rem; color: var(--warn); min-height: 1em; margin-top: 3px; }
.rcc-simple {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 16px;
  align-items: stretch;
}
.rcc-simple > .panel { height: 100%; box-sizing: border-box; }
.rcc-simple .out-num { font-size: 2.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rcc-dir { line-height: 1.8; }
.rcc-toast {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: var(--radius);
  font-size: 0.82rem; display: none; z-index: 20;
}
.rcc-wrap .toolbar button,
.rcc-simple .toolbar button {
  width: auto !important;
  flex: 0 0 auto;
}
.rcc-related { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.rcc-related h2 { font-size: 1.1rem; margin: 0 0 8px; }
.rcc-related ul { margin: 0; padding-left: 1.2rem; line-height: 1.8; }
.rcc-wrap .info-sections {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.rcc-guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}
.rcc-guide-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  color: inherit;
  background: var(--surface);
  text-decoration: none;
}
.rcc-guide-card:hover { text-decoration: none; border-color: var(--accent); }
.rcc-guide-card h2 { margin: 0 0 6px; font-size: 1.05rem; }
.rcc-guide-card p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.rcc-ad { margin: 12px 0; }
.combo-list { list-style: none; margin: 8px 0 0; padding: 0; }
.combo-list li { padding: 6px 0; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--ink); }
@media (max-width: 760px) {
  .rcc-wrap .calc,
  .rcc-simple,
  .rcc-guide-grid { grid-template-columns: 1fr; }
  .rcc-wrap .ohm-num { font-size: 2.1rem; }
  .rcc-wrap .e-near { grid-template-columns: 1fr; }
}
@media print {
  .site-header, .site-footer, .toolbar, .result-tools, .next, .rcc-ad { display: none !important; }
}
