/* Emergency Fund Calculator - Content Area Styles */
:root {
  --efc-bg: #ffffff;
  --efc-surface: #f8fafc;
  --efc-card: #ffffff;
  --efc-border: #e2e8f0;
  --efc-line: #cbd5e1;
  --efc-ink: #0f172a;
  --efc-ink-soft: #475569;
  --efc-ink-faint: #94a3b8;
  --efc-primary: var(--tf-accent, #0284c7);
  --efc-primary-hover: #0369a1;
  --efc-green: #15803d;
  --efc-radius: 2px;
}

.efc-main {
  width: 100%;
  color: var(--efc-ink);
}

.efc-wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Controls bar */
.efc-controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--efc-surface);
  border: 1px solid var(--efc-line);
  border-radius: var(--efc-radius);
}

.efc-control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.efc-control-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--efc-ink-soft);
}

/* 2-column Grid */
.efc-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 860px) {
  .efc-editor-grid {
    grid-template-columns: 1fr;
  }
}

/* Panels */
.efc-panel {
  background: var(--efc-card);
  border: 1px solid var(--efc-line);
  border-radius: var(--efc-radius);
  padding: 24px;
  margin-bottom: 24px;
}

.efc-form-panel,
.efc-preview-panel,
.efc-results-panel {
  position: relative;
}

.efc-panel-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--efc-ink);
}

.efc-panel-subtitle {
  font-size: 0.8125rem;
  color: var(--efc-ink-soft);
  margin: 0 0 16px 0;
}

.efc-subhead {
  font-size: 0.8125rem;
  font-weight: 700;
  margin: 18px 0 10px 0;
  color: var(--efc-ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.efc-ad {
  overflow: hidden;
  min-height: 280px;
}

/* Inputs */
.efc-grid {
  display: grid;
  gap: 12px;
}

.efc-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.efc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.efc-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--efc-ink);
}

.efc-input-wrap {
  display: flex;
  align-items: center;
  position: relative;
}

.efc-input,
.efc-select {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.875rem;
  color: var(--efc-ink);
  background: var(--efc-card);
  border: 1px solid var(--efc-line);
  border-radius: var(--efc-radius);
  font-family: inherit;
  box-sizing: border-box;
}

.efc-input:focus,
.efc-select:focus {
  outline: 2px solid var(--efc-primary);
  border-color: var(--efc-primary);
}

.efc-curr-pfx {
  position: absolute;
  left: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--efc-ink-soft);
  pointer-events: none;
}

.efc-curr-pfx + .efc-input {
  padding-left: 22px;
}

.efc-checkbox-row {
  margin-top: 10px;
}

.efc-checkbox-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--efc-ink-soft);
  cursor: pointer;
  line-height: 1.4;
}

/* Progress bar */
.efc-progress-wrap {
  margin-top: 20px;
  padding: 16px;
  background: var(--efc-surface);
  border: 1px solid var(--efc-line);
  border-radius: var(--efc-radius);
}

.efc-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  margin-bottom: 8px;
  color: var(--efc-ink-soft);
}

.efc-progress-header strong {
  color: var(--efc-primary);
}

.efc-progress-bar {
  width: 100%;
  height: 10px;
  background: var(--efc-line);
  border-radius: 9999px;
  overflow: hidden;
}

.efc-progress-fill {
  height: 100%;
  background: var(--efc-primary);
  transition: width 0.25s ease;
}

/* Action Bar */
.efc-action-bar {
  margin-top: 20px;
}

.efc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--efc-radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease;
  background: var(--efc-primary);
  color: #ffffff;
}

.efc-btn:hover {
  background: var(--efc-primary-hover);
}

.efc-btn-primary {
  background: var(--efc-primary);
  color: #ffffff;
}

.efc-btn-primary:hover {
  background: var(--efc-primary-hover);
}

.efc-btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
}

.efc-btn-secondary {
  background: var(--efc-surface);
  color: var(--efc-ink);
  border-color: var(--efc-line);
}

.efc-btn-secondary:hover {
  background: var(--efc-card);
  border-color: var(--efc-ink);
}

/* Hero Summary */
.efc-summary-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.efc-hero-card {
  padding: 20px;
  border: 1px solid var(--efc-line);
  border-radius: var(--efc-radius);
  background: var(--efc-surface);
}

.efc-hero-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--efc-ink-soft);
  margin-bottom: 6px;
}

.efc-hero-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--efc-primary);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.efc-hero-sub {
  font-size: 0.8125rem;
  color: var(--efc-ink-soft);
}

/* Stat Grid */
.efc-grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.efc-stat-grid {
  margin-top: 16px;
}

.efc-stat-box {
  padding: 14px;
  background: var(--efc-card);
  border: 1px solid var(--efc-line);
  border-radius: var(--efc-radius);
}

.efc-stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--efc-ink-soft);
  margin-bottom: 4px;
}

.efc-stat-num {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--efc-ink);
  font-variant-numeric: tabular-nums;
}

.efc-stat-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--efc-ink-soft);
  margin-top: 2px;
}

/* Callout */
.efc-callout {
  margin-top: 20px;
  padding: 16px;
  background: var(--efc-surface);
  border-left: 3px solid var(--efc-primary);
  border-radius: 0 var(--efc-radius) var(--efc-radius) 0;
}

.efc-callout-title {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--efc-ink);
}

.efc-callout-text {
  font-size: 0.8125rem;
  line-height: 1.5;
  margin: 0;
  color: var(--efc-ink-soft);
}

@media (max-width: 640px) {
  .efc-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .efc-control-group {
    justify-content: space-between;
  }
}

/* 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"] {
  --efc-bg: var(--tf-surface);
  --efc-surface: var(--tf-surface);
  --efc-card: var(--tf-surface);
  --efc-border: var(--tf-surface);
  --efc-line: #98abc3;
  --efc-ink: var(--tf-ink);
  --efc-ink-soft: var(--tf-ink-soft);
  --efc-ink-faint: var(--tf-ink-faint);
  --efc-primary-hover: #69aed4;
  --efc-green: #5ed089;
}
