/* Smart Home Energy Savings Estimator - Content Area Styles */
:root {
  --she-bg: #ffffff;
  --she-surface: #f7f9f6;
  --she-card: #ffffff;
  --she-border: #e2e8e0;
  --she-line: #cbd5c8;
  --she-ink: #141c14;
  --she-ink-soft: #425242;
  --she-ink-faint: #788a78;
  --she-primary: var(--tf-accent, #4a5d23);
  --she-primary-hover: #3b4b1a;
  --she-eco: #2e7d32;
  --she-eco-bg: rgba(46, 125, 50, 0.08);
  --she-radius: 2px;
}

.she-main {
  width: 100%;
  color: var(--she-ink);
}

.she-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Controls bar */
.she-controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--she-surface);
  border: 1px solid var(--she-line);
  border-radius: var(--she-radius);
}

.she-control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.she-control-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--she-ink-soft);
}

/* Panels */
.she-panel {
  background: var(--she-card);
  border: 1px solid var(--she-line);
  border-radius: var(--she-radius);
  padding: 24px;
  margin-bottom: 24px;
}

.she-tariff-panel,
.she-upgrades-panel,
.she-results-panel {
  position: relative;
}

.she-ad {
  overflow: hidden;
  min-height: 280px;
}

.she-panel-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--she-ink);
}

/* Grid & Inputs */
.she-grid {
  display: grid;
  gap: 16px;
}

.she-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.she-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.she-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.she-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.she-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--she-ink);
}

.she-hint {
  font-size: 0.75rem;
  color: var(--she-ink-faint);
}

.she-input-wrap {
  display: flex;
  align-items: center;
  position: relative;
}

.she-input,
.she-select {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.875rem;
  color: var(--she-ink);
  background: var(--she-card);
  border: 1px solid var(--she-line);
  border-radius: var(--she-radius);
  font-family: inherit;
  box-sizing: border-box;
}

.she-input:focus,
.she-select:focus {
  outline: 2px solid var(--she-primary);
  border-color: var(--she-primary);
}

.she-unit {
  position: absolute;
  right: 12px;
  font-size: 0.8125rem;
  color: var(--she-ink-faint);
  pointer-events: none;
}

.she-curr-prefix {
  position: absolute;
  left: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--she-ink-faint);
  pointer-events: none;
}

.she-curr-prefix + .she-input {
  padding-left: 24px;
}

/* Upgrade cards */
.she-upgrade-card {
  border: 1px solid var(--she-line);
  border-radius: var(--she-radius);
  padding: 16px;
  margin-bottom: 16px;
  background: var(--she-surface);
}

.she-upgrade-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.she-check-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.she-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--she-primary);
}

.she-upgrade-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--she-ink);
}

.she-tag {
  display: inline-flex;
  align-items: center;
}

.she-tag-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--she-radius);
  background: var(--she-eco-bg);
  color: var(--she-eco);
}

.she-stat-grid {
  margin-top: 16px;
}

.she-upgrade-body {
  padding-top: 10px;
  border-top: 1px solid var(--she-line);
}

/* Buttons */
.she-action-bar {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.she-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--she-radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease;
}

.she-btn-primary {
  background: var(--she-primary);
  color: #ffffff;
}

.she-btn-primary:hover {
  background: var(--she-primary-hover);
}

.she-btn-secondary {
  background: var(--she-surface);
  color: var(--she-ink);
  border-color: var(--she-line);
}

.she-btn-secondary:hover {
  background: var(--she-card);
  border-color: var(--she-ink);
}

/* Results Hero */
.she-summary-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.she-hero-card {
  padding: 20px;
  border: 1px solid var(--she-line);
  border-radius: var(--she-radius);
  background: var(--she-surface);
}

.she-hero-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--she-ink-soft);
  margin-bottom: 6px;
}

.she-hero-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--she-eco);
  margin-bottom: 6px;
}

.she-hero-sub {
  font-size: 0.8125rem;
  color: var(--she-ink-soft);
}

/* Stat Grid */
.she-stat-box {
  padding: 14px;
  background: var(--she-card);
  border: 1px solid var(--she-line);
  border-radius: var(--she-radius);
}

.she-stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--she-ink-soft);
  margin-bottom: 4px;
}

.she-stat-num {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--she-ink);
}

.she-stat-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--she-ink-faint);
  margin-top: 2px;
}

/* Breakdown Bars */
.she-breakdown-card {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--she-line);
  border-radius: var(--she-radius);
  background: var(--she-surface);
}

.she-breakdown-title {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--she-ink);
}

.she-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.she-breakdown-row {
  display: grid;
  grid-template-columns: 180px 1fr 90px;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
}

.she-row-label {
  font-weight: 600;
  color: var(--she-ink);
}

.she-bar-wrap {
  height: 8px;
  background: var(--she-line);
  border-radius: var(--she-radius);
  overflow: hidden;
}

.she-bar-fill {
  height: 100%;
  border-radius: var(--she-radius);
  transition: width 0.3s ease;
}

.she-bar-thermo { background: #e07a5f; }
.she-bar-led { background: #f2cc8f; }
.she-bar-plugs { background: #81b29a; }

.she-row-val {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--she-ink);
}

@media (max-width: 640px) {
  .she-breakdown-row {
    grid-template-columns: 1fr auto;
    gap: 6px;
  }
  .she-bar-wrap {
    grid-column: 1 / -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"] {
  --she-bg: var(--tf-surface);
  --she-surface: var(--tf-surface);
  --she-card: var(--tf-surface);
  --she-border: var(--tf-surface);
  --she-line: var(--tf-rule);
  --she-ink: var(--tf-ink);
  --she-ink-soft: var(--tf-ink-soft);
  --she-ink-faint: var(--tf-ink-faint);
  --she-primary-hover: var(--tf-ink);
  --she-eco: #77cd7b;
}
