:root {
  --lcfc-bg-card: #ffffff;
  --lcfc-border: #e2e8f0;
  --lcfc-text: #1e293b;
  --lcfc-muted: #64748b;
  --lcfc-primary: #0284c7;
  --lcfc-primary-hover: #0369a1;
  --lcfc-primary-fg: #ffffff;
  --lcfc-btn-bg: #f8fafc;
  --lcfc-btn-border: #cbd5e1;
  --lcfc-btn-hover: #e2e8f0;
  --lcfc-stat-bg: #f8fafc;
  --lcfc-bar-track: #e2e8f0;
  --lcfc-bar-fill: #0284c7;
  --lcfc-feedback-bg: #e0f2fe;
  --lcfc-feedback-text: #0369a1;
}

.lcfc-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.lcfc-card {
  background: var(--lcfc-bg-card);
  border: 1px solid var(--lcfc-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.lcfc-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.lcfc-toolbar-group {
  display: flex;
  gap: 0.5rem;
}

.lcfc-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lcfc-btn-primary {
  background: var(--lcfc-primary);
  color: var(--lcfc-primary-fg);
  border: 1px solid var(--lcfc-primary);
}

.lcfc-btn-primary:hover {
  background: var(--lcfc-primary-hover);
  border-color: var(--lcfc-primary-hover);
}

.lcfc-btn-outline {
  background: var(--lcfc-btn-bg);
  color: var(--lcfc-text);
  border: 1px solid var(--lcfc-btn-border);
}

.lcfc-btn-outline:hover {
  background: var(--lcfc-btn-hover);
}

.lcfc-input-wrapper {
  margin-bottom: 1.5rem;
}

.lcfc-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--lcfc-text);
  margin-bottom: 0.5rem;
}

.lcfc-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--lcfc-text);
  background-color: var(--lcfc-stat-bg);
  border: 1px solid var(--lcfc-border);
  border-radius: 8px;
  resize: vertical;
}

.lcfc-textarea:focus {
  outline: 2px solid var(--lcfc-primary);
  outline-offset: -1px;
}

.lcfc-feedback {
  display: none;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background-color: var(--lcfc-feedback-bg);
  color: var(--lcfc-feedback-text);
  font-size: 0.875rem;
  font-weight: 500;
}

.lcfc-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.lcfc-metric-card {
  background: var(--lcfc-stat-bg);
  border: 1px solid var(--lcfc-border);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
}

.lcfc-metric-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lcfc-muted);
  margin-bottom: 0.25rem;
}

.lcfc-metric-val {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--lcfc-text);
}

.lcfc-dist-section {
  border-top: 1px solid var(--lcfc-border);
  padding-top: 1.25rem;
}

.lcfc-dist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.lcfc-dist-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--lcfc-text);
  margin: 0;
}

.lcfc-dist-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lcfc-sort-label {
  font-size: 0.875rem;
  color: var(--lcfc-muted);
}

.lcfc-select {
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--lcfc-border);
  border-radius: 6px;
  background-color: var(--lcfc-stat-bg);
  color: var(--lcfc-text);
  cursor: pointer;
}

.lcfc-freq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.625rem;
}

.lcfc-freq-item {
  background: var(--lcfc-stat-bg);
  border: 1px solid var(--lcfc-border);
  border-radius: 6px;
  padding: 0.5rem 0.625rem;
}

.lcfc-freq-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.lcfc-freq-char {
  font-weight: 700;
  font-size: 1rem;
  color: var(--lcfc-text);
}

.lcfc-freq-count {
  font-size: 0.75rem;
  color: var(--lcfc-muted);
}

.lcfc-freq-bar-bg {
  height: 6px;
  background-color: var(--lcfc-bar-track);
  border-radius: 3px;
  overflow: hidden;
}

.lcfc-freq-bar-fill {
  height: 100%;
  background-color: var(--lcfc-bar-fill);
  border-radius: 3px;
  transition: width 0.2s ease;
}

@media (max-width: 600px) {
  .lcfc-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lcfc-freq-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* 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"] {
  --lcfc-bg-card: var(--tf-surface);
  --lcfc-border: var(--tf-surface);
  --lcfc-text: var(--tf-ink);
  --lcfc-muted: var(--tf-ink-faint);
  --lcfc-primary: #81bcda;
  --lcfc-primary-hover: #69aed4;
  --lcfc-primary-fg: var(--tf-surface);
  --lcfc-btn-bg: var(--tf-surface);
  --lcfc-btn-border: #98abc3;
  --lcfc-btn-hover: var(--tf-surface);
  --lcfc-stat-bg: var(--tf-surface);
  --lcfc-bar-track: var(--tf-surface);
  --lcfc-bar-fill: #81bcda;
  --lcfc-feedback-bg: var(--tf-surface);
  --lcfc-feedback-text: #69aed4;
}
