/* Field-service interactive demonstration and example report */

.fs-label { display: inline-block; background: #fef3c7; color: #78350f; border: 1px solid #fcd34d; border-radius: 999px; padding: 0.25rem 0.875rem; font-size: 0.875rem; margin: 0.5rem 0 1rem; }

.fs-sources { display: grid; gap: 1.25rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 1.5rem 0; }
.fs-panel { min-width: 0; background: var(--am-surface); border: 1px solid var(--am-border); border-radius: var(--am-radius-card); padding: 1rem; }
.fs-scroll { overflow-x: auto; max-width: 100%; }
.fs-scroll:focus-visible { outline: 2px solid var(--am-blue); outline-offset: 2px; }
.fs-table { font-size: 0.875rem; margin: 0; }
.fs-table th, .fs-table td { white-space: nowrap; vertical-align: middle; }

.fs-controls { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }
.fs-error { color: #b91c1c; font-weight: 600; }

.fs-metrics { display: grid; gap: 0.75rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 1rem 0 1.5rem; }
.fs-metric { border: 1px solid var(--am-border); border-radius: var(--am-radius-card); padding: 1rem; background: var(--am-surface-alt); min-width: 0; }
.fs-metric span { display: block; font-size: 0.8125rem; color: var(--am-text-muted); }
.fs-metric strong { font-size: 1.5rem; overflow-wrap: anywhere; }
.fs-metric--ok { border-left: 4px solid var(--am-positive); }
.fs-metric--warn { border-left: 4px solid var(--am-warning); }

.fs-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.fs-filters [aria-pressed="true"] { background: var(--am-blue); border-color: var(--am-blue); color: #fff; }

.fs-badge { display: inline-block; padding: 0.125rem 0.625rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.fs-badge--ok { background: #dcfce7; color: #14532d; }
.fs-badge--warn { background: #fef3c7; color: #78350f; }

.fs-detail { margin-top: 1.5rem; border: 1px solid var(--am-border); border-left: 4px solid var(--am-blue); border-radius: var(--am-radius-card); padding: 1.25rem; background: var(--am-surface); }
.fs-detail h3 { font-size: 1.125rem; }
.fs-detail h4 { font-size: 0.9375rem; margin-top: 1rem; }
.fs-detail__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.5rem 1rem; margin: 0.5rem 0; }
.fs-detail__list dt { font-size: 0.8125rem; color: var(--am-text-muted); font-weight: 500; }
.fs-detail__list dd { margin: 0; font-weight: 600; }
.fs-detail__review { font-weight: 700; color: #78350f; margin-top: 1rem; }

.fs-limits { margin-top: 2.5rem; padding: 1.25rem; background: var(--am-surface-alt); border-radius: var(--am-radius-card); }
.fs-limits ul { columns: 2; }

/* Homepage demo preview */
.hp-demo-preview { max-width: 720px; margin: 0 auto 1.5rem; }
.hp-demo-preview .fs-results { overflow-x: auto; }

/* Report */
.fs-report__actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.fs-report__doc { background: #fff; border: 1px solid var(--am-border); border-radius: var(--am-radius-panel); padding: clamp(1.25rem, 1rem + 2vw, 3rem); max-width: 900px; margin: 0 auto 2rem; }
.fs-report__doc h2 { font-size: 1.125rem; margin-top: 1.75rem; }
.fs-report__head { border-bottom: 3px solid var(--am-navy-800); padding-bottom: 1rem; }
.fs-report__brand { font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--am-blue); margin: 0; }
.fs-report__head h1 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.fs-report__summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; }
.fs-report__summary > div { border: 1px solid var(--am-border); border-radius: 10px; padding: 0.75rem 1rem; }
.fs-report__summary dt { font-size: 0.8125rem; color: var(--am-text-muted); }
.fs-report__summary dd { margin: 0; font-weight: 700; }

@media (max-width: 900px) {
    .fs-sources { grid-template-columns: minmax(0, 1fr); }
    .fs-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .fs-limits ul { columns: 1; }
    .fs-controls .btn { flex: 1 1 100%; }
    .fs-table--results thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .fs-table--results, .fs-table--results tbody, .fs-table--results tr, .fs-table--results td { display: block; width: 100%; }
    .fs-table--results tr { border: 1px solid var(--am-border); border-radius: 10px; margin-bottom: 0.75rem; padding: 0.5rem 0.75rem; }
    .fs-table--results td { display: flex; justify-content: space-between; gap: 1rem; white-space: normal; border: 0; padding: 0.375rem 0; }
    .fs-table--results td::before { content: attr(data-label); font-weight: 600; color: var(--am-text-muted); }
}

@media print {
    header, footer, nav, .no-print, .site-header, .site-footer { display: none !important; }
    .fs-report__doc { border: 0; padding: 0; max-width: none; }
    .fs-table th, .fs-table td { white-space: normal; }
}
