/*
 * First-Gen Fit Filter — SEO Pages Stylesheet
 * Supplements assets/style.css for /firstgen-fit/* virtual pages.
 */

/* ── Page wrapper ─────────────────────────────────────── */
.fgf-seo-page-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a2e;
}

/* ── Breadcrumb ───────────────────────────────────────── */
.fgf-seo-breadcrumb {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 20px;
}
.fgf-seo-breadcrumb a { color: #16a34a; text-decoration: none; }
.fgf-seo-breadcrumb a:hover { text-decoration: underline; }
.fgf-seo-breadcrumb span { margin: 0 6px; }

/* ── Hero ─────────────────────────────────────────────── */
.fgf-seo-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 28px;
}
.fgf-seo-hero h1 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.2;
}
.fgf-seo-location {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}
.fgf-seo-location a { color: #16a34a; text-decoration: none; }
.fgf-seo-location a:hover { text-decoration: underline; }
.fgf-seo-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    background: #dcfce7;
    color: #15803d;
    border-radius: 4px;
    padding: 2px 6px;
    letter-spacing: 0.04em;
}

/* ── Score dial ───────────────────────────────────────── */
.fgf-seo-score-dial {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.fgf-seo-dial-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    text-align: center;
}

/* ── Tier colour tokens ───────────────────────────────── */
.fgf-tier--excellent { color: #16a34a; }
.fgf-tier--good      { color: #2563eb; }
.fgf-tier--fair      { color: #d97706; }
.fgf-tier--low       { color: #dc2626; }

/* ── Score breakdown ──────────────────────────────────── */
.fgf-seo-breakdown { margin-bottom: 36px; }
.fgf-seo-breakdown h2,
.fgf-seo-stats-section h2,
.fgf-seo-widget-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 16px;
}
.fgf-seo-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}
.fgf-seo-breakdown-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
}
.fgf-seo-breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.fgf-seo-breakdown-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}
.fgf-seo-breakdown-pts {
    font-size: 0.82rem;
    font-weight: 700;
    color: #16a34a;
}
.fgf-seo-bar-track {
    height: 7px;
    background: #f0fdf4;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 6px;
}
.fgf-seo-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ade80, #16a34a);
    border-radius: 99px;
    transition: width 0.4s ease;
}
.fgf-seo-breakdown-raw {
    font-size: 0.78rem;
    color: #9ca3af;
}

/* ── Key stats grid ───────────────────────────────────── */
.fgf-seo-stats-section { margin-bottom: 36px; }
.fgf-seo-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.fgf-seo-stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.fgf-seo-stat-card.fgf-card--firstgen { border-top: 3px solid #16a34a; }
.fgf-seo-stat-card.fgf-card--pell     { border-top: 3px solid #2563eb; }
.fgf-seo-stat-card.fgf-card--price    { border-top: 3px solid #d97706; }
.fgf-seo-stat-card.fgf-card--share    { border-top: 3px solid #7c3aed; }
.fgf-seo-stat-card.fgf-card--retention{ border-top: 3px solid #0891b2; }
.fgf-seo-stat-card.fgf-card--salary   { border-top: 3px solid #db2777; }
.fgf-seo-stat-icon  { font-size: 1.4rem; }
.fgf-seo-stat-label { font-size: 0.78rem; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; }
.fgf-seo-stat-value { font-size: 1.5rem; font-weight: 800; color: #1a1a2e; }
.fgf-seo-stat-sub   { font-size: 0.78rem; color: #9ca3af; }

/* ── Widget section ───────────────────────────────────── */
.fgf-seo-widget-section {
    margin-bottom: 36px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    padding: 24px;
}
.fgf-seo-widget-section p { margin: 0 0 16px; color: #374151; font-size: 0.9rem; }

/* ── Attribution ──────────────────────────────────────── */
.fgf-seo-attribution {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 40px;
}

/* ── State table ──────────────────────────────────────── */
.fgf-seo-tier-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.fgf-seo-tier-pill {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 99px;
    padding: 4px 12px;
}
.fgf-seo-tier-pill.fgf-tier--excellent { background: #dcfce7; color: #15803d; }
.fgf-seo-tier-pill.fgf-tier--good      { background: #dbeafe; color: #1d4ed8; }
.fgf-seo-tier-pill.fgf-tier--fair      { background: #fef9c3; color: #92400e; }
.fgf-seo-tier-pill.fgf-tier--low       { background: #fee2e2; color: #991b1b; }

.fgf-seo-table-section { margin-bottom: 40px; }
.fgf-seo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
.fgf-seo-table thead tr {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff;
}
.fgf-seo-table th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.fgf-seo-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0fdf4;
    vertical-align: middle;
}
.fgf-seo-table tbody tr:last-child td { border-bottom: none; }
.fgf-seo-table tbody tr:hover { background: #f0fdf4; }
.fgf-seo-table a { color: #16a34a; font-weight: 600; text-decoration: none; }
.fgf-seo-table a:hover { text-decoration: underline; }
.fgf-seo-table small { color: #9ca3af; font-size: 0.75rem; }
.fgf-seo-rank { color: #9ca3af; font-weight: 700; width: 36px; text-align: center; }

.fgf-seo-score-cell { display: flex; flex-direction: column; gap: 2px; }
.fgf-seo-score-num  { font-size: 1.3rem; font-weight: 800; line-height: 1; }
.fgf-seo-score-tier { font-size: 0.72rem; color: #6b7280; }

/* ── Hub ──────────────────────────────────────────────── */
.fgf-seo-legend {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.85rem;
}

.fgf-seo-explainer {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 0.875rem;
}
.fgf-seo-explainer summary {
    cursor: pointer;
    font-weight: 600;
    color: #15803d;
    list-style: none;
}
.fgf-seo-explainer summary::-webkit-details-marker { display: none; }
.fgf-seo-explainer summary::before { content: '▶ '; font-size: 0.7em; }
details[open] .fgf-seo-explainer summary::before { content: '▼ '; }
.fgf-seo-explainer-table {
    width: 100%;
    max-width: 460px;
    border-collapse: collapse;
    margin: 12px 0 8px;
    font-size: 0.82rem;
}
.fgf-seo-explainer-table th, .fgf-seo-explainer-table td {
    text-align: left;
    padding: 5px 10px;
    border-bottom: 1px solid #d1fae5;
}
.fgf-seo-explainer p { margin: 6px 0 0; color: #6b7280; font-size: 0.8rem; }

.fgf-seo-states-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 4px;
}
.fgf-seo-state-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #fff;
    border: 1px solid #d1fae5;
    border-radius: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: #1a1a2e;
    transition: box-shadow 0.18s, border-color 0.18s, transform 0.18s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.fgf-seo-state-abbr {
    font-size: 1rem;
    font-weight: 800;
    color: #16a34a;
}
.fgf-seo-state-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1a2e;
}
.fgf-seo-state-cta {
    font-size: 0.75rem;
    color: #6b7280;
}
.fgf-seo-state-card:hover {
    border-color: #16a34a;
    box-shadow: 0 4px 16px rgba(22,163,74,0.15);
    transform: translateY(-2px);
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
    .fgf-seo-hero { flex-direction: column; }
    .fgf-seo-score-dial { align-self: flex-start; }
    .fgf-seo-table th:nth-child(n+5),
    .fgf-seo-table td:nth-child(n+5) { display: none; }
    .fgf-seo-breakdown-grid { grid-template-columns: 1fr; }
}
