/* ============================================================
   FastLocations Industry Fit - NAICS scorecard
   Loaded after prospect.css (tokens, masthead, cards, fields).
   ============================================================ */
[hidden] { display: none !important; }

/* ---------- summary ---------- */
.if-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 24px; justify-content: space-between; }
.if-head h2 { font-size: 22px; margin: 0; }
.if-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.if-sizes { display: inline-flex; background: var(--line-soft); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px; }
.if-sizes button { border: 0; background: none; font: 600 13px var(--sans); color: var(--ink-secondary); padding: 7px 16px; border-radius: var(--r-pill); cursor: pointer; }
.if-sizes button.is-on { background: #fff; color: var(--fl-blue); box-shadow: var(--shadow-sm); }
.if-sizes button small { display: block; font-weight: 400; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
@media (max-width: 480px) { .if-sizes button { padding: 6px 10px; } }

.if-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; }
@media (max-width: 760px) { .if-cols { grid-template-columns: 1fr; } }
.if-box { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; background: #fff; }
.if-box h3 { font-size: 14px; margin: 0 0 10px; display: flex; gap: 8px; align-items: center; }
.if-box ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.if-box li { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; cursor: pointer; }
.if-box li:hover .t { color: var(--fl-blue); text-decoration: underline; }
.if-box li .t small { display: block; color: var(--muted); font-size: 11.5px; }
.if-box .empty { color: var(--muted); font-size: 13px; }

.if-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; color: var(--muted); margin-top: 18px; align-items: center; }
.if-legend span { display: inline-flex; gap: 6px; align-items: center; }
.if-how { margin-top: 14px; font-size: 13px; color: var(--ink-secondary); }
.if-how summary { cursor: pointer; font-weight: 600; color: var(--fl-blue); }
.if-how p, .if-how ul { margin: 8px 0; line-height: 1.55; max-width: 80ch; }
.if-how ul { padding-left: 20px; }

/* ---------- score pills ---------- */
.pill { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; padding: 3px 8px; border-radius: var(--r-pill); font: 700 13px var(--mono); border: 1px solid transparent; }
.pill.b4 { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.pill.b3 { background: #eaf1f9; color: #123f7a; border-color: #c9dcf0; }
.pill.b2 { background: #fef9c3; color: #854d0e; border-color: #fde68a; }
.pill.b1 { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.pill.na { background: var(--line-soft); color: var(--muted-light); }
.pill.big { font-size: 30px; min-width: 88px; padding: 10px 16px; border-radius: var(--r-md); }

/* ---------- table ---------- */
.if-tools { display: grid; grid-template-columns: 1fr 240px 200px; gap: 12px; margin-bottom: 14px; }
@media (max-width: 760px) { .if-tools { grid-template-columns: 1fr; } }
.if-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.if-table th { text-align: left; font: 600 11.5px var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.if-table th.c, .if-table td.c { text-align: center; }
.if-table td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.if-table tr.sec td { background: var(--line-soft); font: 700 12px var(--head); color: var(--ink-secondary); text-transform: uppercase; letter-spacing: .04em; padding: 7px 10px; }
.if-table tr.row { cursor: pointer; }
.if-table tr.row:hover td { background: #f8fbff; }
.if-table .code { font-family: var(--mono); color: var(--muted); width: 54px; }
.if-table .nm { font-weight: 600; }
.if-table .rk { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.if-table td.sel { box-shadow: inset 0 0 0 2px var(--fl-blue-border); border-radius: 6px; }
.if-table tr.det > td { padding: 0; background: #fbfdff; }
@media (max-width: 640px) { .if-table .hide-sm { display: none; } }

/* ---------- detail ---------- */
.if-det { padding: 20px 22px 24px; border-bottom: 2px solid var(--fl-blue-border); }
.if-det-top { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; }
.if-det-top .what { flex: 1; min-width: 240px; }
.if-det-top .what b { font-size: 16px; }
.if-det-top .what div { color: var(--ink-secondary); font-size: 13px; margin-top: 3px; line-height: 1.5; }
.if-spec { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.if-spec span { font: 500 11.5px var(--mono); background: #fff; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2px 9px; color: var(--ink-secondary); }
.if-grid2 { display: grid; grid-template-columns: 1fr 1.15fr; gap: 24px; margin-top: 20px; }
@media (max-width: 820px) { .if-grid2 { grid-template-columns: 1fr; } }
.if-det h4 { font: 700 13px var(--head); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 10px; }
.if-bars { display: grid; gap: 7px; }
.if-bar { display: grid; grid-template-columns: 158px 1fr 34px; gap: 10px; align-items: center; font-size: 12.5px; }
.if-bar .lb small { color: var(--muted-light); font-family: var(--mono); font-size: 10.5px; margin-left: 4px; }
.if-bar .tr { height: 9px; background: var(--line-soft); border-radius: var(--r-pill); overflow: hidden; position: relative; }
.if-bar .tr i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-pill); }
.if-bar .tr::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; border-left: 1px dashed var(--muted-light); }
.if-bar .v { font: 600 12px var(--mono); text-align: right; }
.if-bar.na .v { color: var(--muted-light); font-weight: 400; }
.if-note-s { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.45; }

.if-notes { display: grid; gap: 10px; }
.if-note { border: 1px solid var(--line); border-left: 4px solid var(--fl-blue); border-radius: var(--r-sm); padding: 11px 14px; background: #fff; font-size: 13px; line-height: 1.5; }
.if-note.quick { border-left-color: var(--ok); }
.if-note.long { border-left-color: var(--muted-light); }
.if-note.good { border-left-color: var(--gold); }
.if-note .hd { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; margin-bottom: 3px; }
.if-note .hd b { font-size: 13.5px; }
.if-note .gain { font: 700 12px var(--mono); color: var(--ok); white-space: nowrap; }
.if-note .tag { font: 600 10.5px var(--sans); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.if-note a { font-weight: 600; }

.if-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.if-src { font-size: 12px; color: var(--muted); margin-top: 18px; line-height: 1.5; }
.if-disc { font-size: 12px; color: var(--muted); line-height: 1.55; border-top: 1px dashed var(--line); padding-top: 10px; margin: 22px 0 0; max-width: 110ch; }

/* ---------- pop-up ---------- */
.if-imp { font: 600 12px var(--sans); color: var(--fl-blue); background: var(--fl-blue-soft); border: 1px solid var(--fl-blue-border); border-radius: var(--r-pill); padding: 5px 12px; cursor: pointer; white-space: nowrap; }
.if-imp:hover { background: #fff; }
.if-modal { width: min(1000px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: var(--r-lg); box-shadow: 0 30px 80px -20px rgba(15,23,42,.45); overflow: hidden; color: var(--ink); }
.if-modal[open] { display: flex; flex-direction: column; }
.if-modal::backdrop { background: rgba(15,23,42,.55); }
.if-mhead { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); background: var(--fl-blue-soft); }
.if-mhead h3 { flex: 1; margin: 0; font-size: 17px; }
.if-mx { border: 0; background: none; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.if-mx:hover { color: var(--ink); }
.if-mbody { padding: 20px 22px 24px; overflow: auto; }
.if-steps { margin: 6px 0 0; padding-left: 18px; }
.if-steps li { margin: 3px 0; }
@media (max-width: 640px) { .if-bar { grid-template-columns: 118px 1fr 30px; gap: 8px; } }
@media (max-width: 640px) { .if-modal { width: 100vw; max-width: 100vw; max-height: 100vh; border-radius: 0; } .if-mbody { padding: 16px; } }

@media print {
  body.if-print-modal > *:not(.if-modal) { display: none !important; }
  body.if-print-modal .if-modal { position: static; width: auto; max-height: none; box-shadow: none; }
  body.if-print-modal .if-mbody { overflow: visible; }
  body.if-print-modal .if-mx, body.if-print-modal #ifMPrint, body.if-print-modal .if-sizes { display: none !important; }
  .flnav-topbar, .if-sizes, .if-tools, #orgCard, .if-actions, .masthead .meta { display: none !important; }
  .masthead { padding: 20px 24px 24px; }
  .fl-card { box-shadow: none; break-inside: avoid-page; }
  .if-table tr.row { break-inside: avoid; }
  .if-det { break-inside: avoid; }
}
