/* apps/embedded-systems/rc-time-constant-calculator/style.css */
.converter-page .tool-header { margin-bottom: 1.2rem; }
.divider-grid { display:grid; gap:1rem; grid-template-columns:1fr 1fr; align-items:start; }
.panel { border:1px solid var(--border); border-radius:16px; background:var(--surface); box-shadow:var(--shadow); padding:1rem; }
.panel h2 { margin:0 0 0.8rem; font-size:1.15rem; }
.field-group { display:grid; gap:0.4rem; margin-bottom:0.8rem; }
.field-label { font-size:0.85rem; font-weight:700; color:var(--muted); }
.inline-row { display:grid; grid-template-columns:1fr 120px; gap:0.5rem; }
.unit-select { min-width:110px; }
.error-text { color:#d94848; font-size:0.85rem; }
.schematic-wrap { border:1px solid var(--border); border-radius:12px; background:#0f1d24; padding:0.75rem; }
.schematic-image { width:100%; max-width:100%; height:auto; object-fit:contain; }
.result-grid { display:grid; gap:0.6rem; }
.result-row { display:grid; grid-template-columns:180px 1fr; gap:0.6rem; align-items:start; }
.result-key { color:var(--muted); font-weight:600; }
.result-value { font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; word-break:break-word; }
.result-cell { display:flex; align-items:center; justify-content:space-between; gap:0.55rem; }
.highlight { color:var(--primary); font-weight:700; }
.copy-btn { min-width:82px; padding:0.35rem 0.7rem; }
.history-copy-btn { min-width:76px; padding:0.32rem 0.65rem; }
.panel-actions { display:flex; justify-content:flex-end; gap:0.5rem; margin-bottom:0.6rem; }
.history-table { width:100%; border-collapse:collapse; }
.history-table th,.history-table td { border-bottom:1px solid var(--border); padding:0.5rem; text-align:left; font-size:0.9rem; vertical-align:top; }
.history-table tbody tr { cursor:pointer; }
.history-table tbody tr:hover { background:var(--surface-muted); }
.rc-canvas { width:100%; height:auto; border:1px solid var(--border); border-radius:10px; display:block; }
@media (max-width:900px){
  .divider-grid { grid-template-columns:1fr; }
  .result-row { grid-template-columns:1fr; }
  .result-cell { flex-direction:column; align-items:flex-start; }
}

/* Mobile resilience patch */
.panel { overflow-x: auto; }
.copy-btn,
.history-copy-btn { width:auto; max-width:100%; }
.history-table { min-width:760px; }

@media (max-width: 720px) {
  .inline-row { grid-template-columns:1fr; }
  .panel-actions { justify-content:flex-start; flex-wrap:wrap; }
  .panel-actions .btn { width:auto; }
  .copy-btn,
  .history-copy-btn { align-self:flex-start; }
}

.warn-text { color:#b0701f; font-size:0.9rem; margin-top:0.4rem; }

.rc-legend { display:flex; gap:1rem; align-items:center; flex-wrap:wrap; margin-bottom:0.45rem; }
.legend-item { display:inline-flex; align-items:center; gap:0.4rem; font-weight:600; color:var(--text); }
.legend-swatch { display:inline-block; width:22px; height:3px; border-radius:999px; }
.legend-charge { background:#111111; }
.legend-current { background:#f25b5b; }
.rc-canvas { cursor: crosshair; }

.result-hero {
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface-muted);
  padding:0.75rem 0.85rem;
  margin-top:0.2rem;
}
.result-hero-label {
  font-size:0.8rem;
  color:var(--muted);
  font-weight:700;
  margin-bottom:0.25rem;
}
.result-hero-value {
  font-size:2rem;
  line-height:1.1;
  font-weight:800;
  color:var(--primary);
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
  word-break:break-word;
}
