:root {
  --htcc-primary: #0284c7;
  --htcc-primary-hover: #0369a1;
  --htcc-bg-card: #ffffff;
  --htcc-border: #e2e8f0;
  --htcc-text: #1e293b;
  --htcc-muted: #64748b;
  --htcc-success: #16a34a;
  --htcc-warning: #b45309;
  --htcc-danger: #dc2626;
  --htcc-chip-bg: #eff6ff;
  --htcc-chip-border: #bfdbfe;
  --htcc-chip-text: #1d4ed8;
}

.htcc-main {
  padding: 1.5rem 1rem 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  color: var(--htcc-text);
  font-family: inherit;
}

.htcc-wrap {
  width: 100%;
}

.htcc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .htcc-grid {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.htcc-card {
  background: var(--htcc-bg-card);
  border: 1px solid var(--htcc-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.htcc-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.htcc-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--htcc-text);
}

.htcc-sub-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--htcc-text);
}

.htcc-head-btns {
  display: flex;
  gap: 0.5rem;
}

.htcc-form-group {
  margin-bottom: 1.25rem;
}

.htcc-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--htcc-text);
}

.htcc-sub-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--htcc-muted);
  margin-bottom: 0.35rem;
}

.htcc-textarea,
.htcc-select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--htcc-border);
  border-radius: 6px;
  background: transparent;
  color: var(--htcc-text);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
}

.htcc-textarea:focus,
.htcc-select:focus {
  outline: none;
  border-color: var(--htcc-primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.htcc-textarea-out {
  background: rgba(0, 0, 0, 0.02);
  font-family: monospace;
  font-size: 0.85rem;
}

.htcc-controls-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 576px) {
  .htcc-controls-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.htcc-control-item {
  display: flex;
  flex-direction: column;
}

.htcc-checkbox-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

@media (min-width: 576px) {
  .htcc-checkbox-row {
    flex-direction: row;
    gap: 1.5rem;
  }
}

.htcc-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--htcc-text);
  cursor: pointer;
}

.htcc-btn-ghost {
  background: transparent;
  color: var(--htcc-text);
  border: 1px solid var(--htcc-border);
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.htcc-btn-ghost:hover {
  background: var(--htcc-border);
}

.htcc-btn-action {
  background: var(--htcc-primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}

.htcc-btn-action:hover {
  background: var(--htcc-primary-hover);
}

.htcc-action-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.htcc-status-msg {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--htcc-success);
}

/* KPI Cards */
.htcc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 576px) {
  .htcc-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.htcc-kpi-card {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--htcc-border);
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
}

.htcc-kpi-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--htcc-muted);
  margin-bottom: 0.25rem;
}

.htcc-kpi-val {
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.htcc-kpi-sub {
  font-size: 0.7rem;
  color: var(--htcc-muted);
  margin-top: 0.25rem;
}

.htcc-text-primary {
  color: var(--htcc-primary);
}

.htcc-text-success {
  color: var(--htcc-success);
}

.htcc-text-warning {
  color: var(--htcc-warning);
}

.htcc-text-danger {
  color: var(--htcc-danger);
}

/* Advice Banner */
.htcc-advice-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.htcc-advice-icon {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0284c7;
  line-height: 1.3;
}

.htcc-advice-text {
  font-size: 0.825rem;
  color: #0369a1;
  margin: 0;
  line-height: 1.4;
}

/* Chips Container */
.htcc-tags-container {
  border: 1px solid var(--htcc-border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.htcc-tags-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.htcc-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 38px;
}

.htcc-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--htcc-chip-bg);
  border: 1px solid var(--htcc-chip-border);
  color: var(--htcc-chip-text);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.htcc-chip-del {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.15s;
}

.htcc-chip-del:hover {
  opacity: 1;
}
/* 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"] {
  --htcc-primary: #81bcda;
  --htcc-primary-hover: #69aed4;
  --htcc-bg-card: var(--tf-surface);
  --htcc-border: var(--tf-surface);
  --htcc-text: var(--tf-ink);
  --htcc-muted: var(--tf-ink-faint);
  --htcc-success: #7ad89d;
  --htcc-warning: #d9a57d;
  --htcc-danger: #da8181;
  --htcc-chip-bg: var(--tf-surface);
  --htcc-chip-border: #81a8da;
  --htcc-chip-text: #8198da;
}
