:root {
  --maf-bg: #f8fafc;
  --maf-surface: #ffffff;
  --maf-card: #ffffff;
  --maf-border: #e2e8f0;
  --maf-border-focus: #4f46e5;
  --maf-indigo: #4f46e5;
  --maf-indigo-hover: #4338ca;
  --maf-amber: #f59e0b;
  --maf-text: #0f172a;
  --maf-muted: #64748b;
  --maf-radius: 8px;
}

body {
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

.maf-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

.maf-header {
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--maf-border);
  background: #ffffff;
}

.maf-breadcrumbs {
  font-size: 0.875rem;
  color: var(--maf-muted);
  margin-bottom: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.maf-breadcrumbs a {
  color: var(--maf-indigo);
  text-decoration: none;
  font-weight: 600;
}

.maf-breadcrumbs a:hover {
  text-decoration: underline;
}

.maf-title {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--maf-text);
  letter-spacing: -0.025em;
}

.maf-subtitle {
  font-size: 1.0625rem;
  color: var(--maf-muted);
  margin: 0;
}

.maf-main {
  padding: 32px 0 60px;
}

/* Filter Card */
.maf-card {
  background: var(--maf-card);
  border: 1px solid var(--maf-border);
  border-radius: var(--maf-radius);
  padding: 24px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  margin-bottom: 24px;
}

.maf-search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.maf-input {
  flex: 1;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: var(--maf-text);
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.maf-input:focus {
  outline: none;
  border-color: var(--maf-border-focus);
}

.maf-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--maf-indigo);
  color: #ffffff;
  border: none;
  padding: 12px 22px;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.maf-btn-primary:hover {
  background: var(--maf-indigo-hover);
}

/* Specialty Filters */
.maf-services-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.maf-filter-lbl {
  font-size: 0.8125rem;
  color: var(--maf-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.maf-service-chip {
  background: #f8fafc;
  color: var(--maf-muted);
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.maf-service-chip.active {
  background: var(--maf-indigo);
  color: #ffffff;
  border-color: var(--maf-indigo);
  font-weight: 700;
}

/* Budget Row */
.maf-budget-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--maf-border);
}

.maf-select-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.maf-select-lbl {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--maf-text);
}

.maf-select {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--maf-text);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Status Bar */
.maf-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 0.875rem;
  color: var(--maf-muted);
  font-weight: 600;
}

/* Agency Grid */
.maf-agency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.maf-agency-card {
  background: #ffffff;
  border: 1px solid var(--maf-border);
  border-radius: var(--maf-radius);
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.maf-agency-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border-color: var(--maf-indigo);
}

.maf-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.maf-agency-name {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--maf-text);
  margin: 0;
}

.maf-rating-badge {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.maf-location {
  font-size: 0.8125rem;
  color: var(--maf-muted);
  margin-bottom: 12px;
}

.maf-services-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.maf-tag {
  background: #f1f5f9;
  color: #334155;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.maf-agency-desc {
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.45;
  margin: 0 0 16px;
  flex: 1;
}

.maf-card-meta {
  background: #f8fafc;
  border: 1px solid var(--maf-border);
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

.maf-meta-item strong {
  display: block;
  font-size: 0.875rem;
  color: var(--maf-text);
}

.maf-btn-rfp {
  width: 100%;
  background: #ffffff;
  color: var(--maf-indigo);
  border: 1px solid var(--maf-indigo);
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.maf-btn-rfp:hover {
  background: #eef2ff;
}

/* Ad slots */
.maf-ad-container {
  width: 100%;
  margin: 36px 0;
  display: flex;
  justify-content: center;
}

.maf-ad-box {
  width: 100%;
  max-width: 728px;
  min-height: 280px;
  background: #ffffff;
  border: 1px dashed var(--maf-border);
  border-radius: var(--maf-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Content */
.maf-content-section {
  margin-top: 48px;
}

.maf-content-section h2 {
  font-size: 1.5rem;
  color: var(--maf-text);
  margin-bottom: 16px;
}

.maf-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 28px 0;
}

.maf-feature-card {
  background: #ffffff;
  border: 1px solid var(--maf-border);
  border-radius: var(--maf-radius);
  padding: 20px;
}

.maf-feature-card h3 {
  font-size: 1.125rem;
  margin: 0 0 8px;
  color: var(--maf-indigo);
}

.maf-feature-card p {
  font-size: 0.875rem;
  color: var(--maf-muted);
  margin: 0;
}

.maf-footer {
  background: #ffffff;
  border-top: 1px solid var(--maf-border);
  padding: 28px 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--maf-muted);
}

.maf-footer a {
  color: var(--maf-indigo);
  text-decoration: none;
  font-weight: 600;
}

.maf-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.maf-consent-inner {
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.maf-consent-text {
  font-size: 0.875rem;
  color: #cbd5e1;
  margin: 0;
}

.maf-consent-actions {
  display: flex;
  gap: 8px;
}

.maf-btn-consent-yes {
  background: var(--maf-indigo);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.maf-btn-consent-no {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #475569;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.maf-honesty-note {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--maf-muted);
  background: var(--maf-bg);
  border: 1px solid var(--maf-border);
  border-radius: 6px;
  padding: 10px 12px;
  margin: 0 0 16px;
}

.maf-brief-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.maf-brief-title {
  font-size: 1.05rem;
  margin: 0;
  color: var(--maf-text);
}

.maf-brief-textarea {
  width: 100%;
  min-height: 260px;
  padding: 14px;
  border: 1.5px solid var(--maf-border);
  border-radius: var(--maf-radius);
  background: var(--maf-surface);
  color: var(--maf-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  resize: vertical;
}

.maf-btn-copy {
  background: var(--maf-indigo);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.maf-btn-copy:hover {
  background: var(--maf-indigo-hover);
}
/* 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"] {
  --maf-bg: var(--tf-surface);
  --maf-surface: var(--tf-surface);
  --maf-card: var(--tf-surface);
  --maf-border: var(--tf-surface);
  --maf-border-focus: #8681da;
  --maf-indigo: #8681da;
  --maf-indigo-hover: #8781da;
  --maf-amber: #dab981;
  --maf-text: var(--tf-ink);
  --maf-muted: var(--tf-ink-faint);
}
