/* Permit checklist (permit-check.js) and crew finder (crew-finder.js). Flat, ruled, one family, one cyan accent.
   Print rules apply only while the checklist route is open (body.fb-check-on), so every other print output is unchanged. */
@media screen {
  .fb-tool-links { display: flex; flex-wrap: wrap; gap: 0 20px; padding: 2px 0; border-bottom: 1px solid var(--hair); }
  .fb-tool-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; color: inherit; text-underline-offset: 3px; }
  .fb-tool-links a:focus-visible { outline: 2px solid var(--neon, #46e6f2); outline-offset: 2px; }
  .fb-tool { padding: 8px 0 48px; max-width: 980px; outline: none; }
  .fb-tool[hidden] { display: none; }
  .fb-tool:focus, .fb-tool:focus-visible { outline: none; }
  .fb-tool-head { border-bottom: 1px solid var(--ink, #000); padding-bottom: 14px; margin-bottom: 16px; }
  .fb-tool h1 { margin: 4px 0 6px; font-size: var(--t5, 34px); line-height: 1.05; }
  .fb-tool-meta { margin: 0 0 12px; font-size: 16px; line-height: 1.45; max-width: 70ch; }
  .fb-tool .secondary { font-size: 14px; }
  .fb-tool-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 8px 0; }
  .fb-tool-bar button, .fb-tool-act { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font-size: 15px; box-sizing: border-box; }
  .fb-tool-act { border: 1px solid var(--ink, #000); color: inherit; text-decoration: none; }
  .fb-tool-act:hover { border-color: var(--neon, #46e6f2); }
  .fb-tool-act:focus-visible, .fb-tool-src:focus-visible { outline: 2px solid var(--neon, #46e6f2); outline-offset: 2px; }
  .fb-tool-field { display: grid; gap: 4px; margin: 0 0 14px; max-width: 520px; }
  .fb-tool-field label { font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
  .fb-tool-field select { min-height: 44px; font-size: 16px; padding: 0 10px; width: 100%; box-sizing: border-box; }
  .fb-tool-status { min-height: 1.4em; margin: 4px 0 0; font-size: 15px; }
  .fb-tool-url { display: grid; gap: 4px; margin: 4px 0 8px; }
  .fb-tool-url label { font-size: 14px; font-weight: 600; }
  .fb-tool-url input { min-height: 44px; width: 100%; font-size: 15px; padding: 0 10px; box-sizing: border-box; }
  .fb-tool-empty { padding: 20px 0; font-size: 16px; border-top: 1px solid var(--hair); }
  .fb-tool-empty h2 { font-size: var(--t4, 22px); margin: 0 0 8px; }
  .fb-tool-eyebrow { margin: 0; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
  .fb-tool-h { margin: 22px 0 6px; padding-top: 10px; border-top: 1px solid var(--hair); font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
  .fb-tool-lead { margin: 8px 0 2px; font-weight: 600; font-size: 15px; }
  .fb-tool-facts { margin: 0; padding-left: 18px; }
  .fb-tool-facts li, .fb-tool-ns, .fb-tool-note { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; margin: 4px 0; }
  .fb-tool-src { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-underline-offset: 2px; }
  .fb-tool-ns { font-weight: 500; }
  .fb-tool-note { margin-top: 20px; max-width: 75ch; color: var(--soft); }
  .fb-tool-entry { margin: 8px 0 12px; }
  .fb-tool-hint { margin: 4px 0 0; font-size: 14px; color: var(--soft); }
  /* Permit checklist */
  .fb-check-form { border-bottom: 1px solid var(--hair); padding-bottom: 8px; }
  .fb-check-qs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0 24px; }
  .fb-check-q { border: 0; border-top: 1px solid var(--hair); margin: 0; padding: 10px 0 12px; min-width: 0; }
  .fb-check-q legend { float: left; width: 100%; padding: 0; margin: 0 0 6px; font-size: 15px; font-weight: 600; line-height: 1.35; }
  .fb-check-yn { clear: both; display: flex; gap: 0; }
  .fb-check-yn label { position: relative; flex: 0 0 auto; }
  .fb-check-yn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
  .fb-check-yn span { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 72px; padding: 0 14px; border: 1px solid var(--ink, #000); font-size: 15px; cursor: pointer; box-sizing: border-box; }
  .fb-check-yn label + label span { border-left: 0; }
  .fb-check-yn input:checked + span { background: var(--ink, #000); color: var(--paper, #fff); }
  .fb-check-yn input:focus-visible + span { outline: 2px solid var(--neon, #46e6f2); outline-offset: 2px; }
  .fb-check-result { padding-top: 8px; }
  .fb-check-result h2 { margin: 8px 0 4px; font-size: var(--t4, 26px); line-height: 1.15; }
  .fb-check-steps { list-style: none; margin: 12px 0 0; padding: 0; }
  .fb-check-step { border-top: 1px solid var(--hair); padding: 10px 0 12px; }
  .fb-check-step h3 { margin: 0 0 4px; font-size: 17px; line-height: 1.3; }
  .fb-check-n { display: inline-block; min-width: 1.6em; font-variant-numeric: tabular-nums; color: var(--soft); }
  /* Crew finder */
  .fb-crew-form { display: flex; flex-wrap: wrap; gap: 0 16px; border-bottom: 1px solid var(--hair); }
  .fb-crew-form .fb-tool-field { flex: 1 1 240px; }
  .fb-crew-list { border-top: 1px solid var(--ink, #000); margin-top: 8px; }
  .fb-crew-item { border-bottom: 1px solid var(--hair); padding: 14px 0 16px; min-width: 0; }
  .fb-crew-item h3 { margin: 2px 0 2px; font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
  .fb-crew-item h3 a { color: inherit; display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 3px; }
  .fb-crew-area { margin: 0 0 8px; font-size: 15px; }
  .fb-crew-facts { margin: 0; }
  .fb-crew-row { display: grid; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr); gap: 2px 16px; padding: 6px 0; border-top: 1px solid var(--hair); }
  .fb-crew-row dt { font-weight: 600; margin: 0; font-size: 15px; }
  .fb-crew-row dd { margin: 0; min-width: 0; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
  .fb-crew-links { display: flex; flex-wrap: wrap; gap: 0 16px; }
  @media (max-width: 520px) {
    .fb-tool h1 { font-size: 28px; }
    .fb-crew-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .fb-tool-bar button, .fb-tool-bar .fb-tool-act { flex: 1 1 auto; justify-content: center; }
  }
}

/* Print: only while the checklist route is open, and never over another print job (#printArea). */
@media print {
  body.fb-check-on:not(:has(> #printArea)) > main { display: block !important; padding: 0 !important; margin: 0 !important; }
  body.fb-check-on:not(:has(> #printArea)) > main > :not(#permitCheckPane), body.fb-check-on:not(:has(> #printArea)) > header,
  body.fb-check-on:not(:has(> #printArea)) > nav, body.fb-check-on:not(:has(> #printArea)) > footer { display: none !important; }
  body.fb-check-on #permitCheckPane { display: block !important; font-family: Jost, "Helvetica Neue", Arial, sans-serif; color: #000; font-size: 10pt; line-height: 1.35; }
  body.fb-check-on #permitCheckPane .fb-tool-bar, body.fb-check-on #permitCheckPane .fb-tool-status, body.fb-check-on #permitCheckPane .fb-tool-url,
  body.fb-check-on #permitCheckPane .fb-tool-field, body.fb-check-on #permitCheckPane .fb-tool-hint, body.fb-check-on #permitCheckPane .notice { display: none !important; }
  body.fb-check-on #permitCheckPane .fb-check-qs { display: block !important; }
  body.fb-check-on #permitCheckPane .fb-check-q { border: 0; padding: 0; margin: 0 0 1pt; break-inside: avoid; }
  body.fb-check-on #permitCheckPane .fb-check-q legend { float: none; display: inline; font-size: 9pt; font-weight: 400; }
  body.fb-check-on #permitCheckPane .fb-check-yn { display: inline; }
  body.fb-check-on #permitCheckPane .fb-check-yn label { display: none; }
  body.fb-check-on #permitCheckPane .fb-check-yn label:has(input:checked) { display: inline; }
  body.fb-check-on #permitCheckPane .fb-check-yn input { display: none; }
  body.fb-check-on #permitCheckPane .fb-check-yn span { border: 0; min-height: 0; min-width: 0; padding: 0 0 0 4pt; font-weight: 600; background: none; color: #000; }
  body.fb-check-on #permitCheckPane h1 { font: 600 20pt/1.1 Jost, "Helvetica Neue", Arial, sans-serif; margin: 0 0 4pt; }
  body.fb-check-on #permitCheckPane h2 { font: 600 14pt/1.15 Jost, "Helvetica Neue", Arial, sans-serif; margin: 6pt 0 2pt; }
  body.fb-check-on #permitCheckPane h3 { font: 600 10.5pt/1.3 Jost, "Helvetica Neue", Arial, sans-serif; margin: 0 0 2pt; break-after: avoid; page-break-after: avoid; }
  body.fb-check-on #permitCheckPane .fb-check-step { border-top: 1px solid #999; padding: 3pt 0; break-inside: avoid; }
  body.fb-check-on #permitCheckPane p, body.fb-check-on #permitCheckPane li { font-size: 9.5pt; margin: 0 0 2pt; }
  body.fb-check-on #permitCheckPane a { color: #000; text-decoration: underline; min-height: 0; display: inline; }
  body.fb-check-on #permitCheckPane .fb-tool-src[href^="http"]::after { content: " (" attr(href) ")"; font-size: 7.5pt; overflow-wrap: anywhere; }
}
