/* View styles owned by the findings/actions/map/roles views. */

/* ---------- shared (findings + actions) */
.fa-toolbar { padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.fa-toolbar select { min-width: 150px; }
.fa-title-row { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.fa-title-row h3 { font-size: .98rem; }
.fcard:focus-visible, .aa-card:focus-visible { outline: none; box-shadow: var(--focus); }
.fa-sec { padding: 16px 0; border-top: 1px solid var(--line); }
.drawer .body > .fa-sec:first-of-type, .drawer .body > .chips + .fa-sec { border-top: none; padding-top: 4px; }
.fa-sec > h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; font-weight: 700; }
.fa-sec p { margin: 0 0 6px; }
.fa-src-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 600; }
.fa-src-head .ico { width: 15px; height: 15px; color: var(--muted); }
.fa-meters { display: grid; gap: 6px; margin-top: 10px; }
.fa-meter { display: grid; grid-template-columns: minmax(130px, 180px) auto 1fr; gap: 12px; align-items: center; }
.fa-dots { display: inline-flex; gap: 4px; }
.fa-dots i { width: 22px; height: 7px; border-radius: 4px; background: var(--line); display: block; }
.fa-dots i.on { background: var(--accent-2); }
.fa-sure { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kv-row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: start; }
.kv-row .chips a.badge { text-decoration: none; }
.kv-row .chips a.badge:hover { border-color: var(--accent); }
.fa-linkbtn { width: 100%; border: none; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.fa-linkbtn .ico { color: var(--muted); align-self: center; }
.drawer footer:has(.fa-foot) { display: block; }
.fa-foot-in { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.fa-note { flex: 1 1 100%; min-height: 38px; }
.drawer .body .table-wrap table.t td, .drawer .body .table-wrap table.t th { padding: 8px 8px; }

/* ---------- actions */
.aa-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: var(--gap); align-items: stretch; }
.aa-top-left { display: flex; flex-direction: column; gap: var(--gap); }
.aa-kpis { --gap: 14px; }
.aa-kpis .kpi { padding: 14px 18px; }
.aa-kpis .kpi .value { font-size: 1.8rem; }
.aa-chart svg.chart { max-width: 340px; margin: 0 auto; }
.aa-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.aa-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-width: 0; }
.aa-col-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 10px; }
.aa-col-body { display: flex; flex-direction: column; gap: 10px; }
.aa-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s; }
.aa-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.aa-card-top { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; }
.aa-card h3 { font-size: .92rem; line-height: 1.35; }
.aa-card p { margin: 6px 0 8px; color: var(--ink-2); }
.aa-card .chips { margin-bottom: 6px; }
.aa-card .meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .78rem; }
.aa-card .meta .ico { width: 14px; height: 14px; }
.aa-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aa-pill { flex: none; min-width: 34px; text-align: center; font-weight: 750; font-size: .8rem; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.aa-notefield .help { display: block; margin-top: 2px; }
.aa-late { color: var(--crit); font-weight: 650; }
.aa-kpi-bad .value { color: var(--crit); }
.aa-table td a { font-weight: 600; }
.aa-steps { list-style: none; padding: 0; margin: 0 0 6px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; counter-reset: s; }
.aa-step { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; position: relative; font-size: .74rem; color: var(--muted); }
.aa-step::before { content: ""; position: absolute; top: 13px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 0; }
.aa-step:first-child::before { display: none; }
.aa-step.done::before, .aa-step.current::before { background: var(--accent-2); }
.aa-step .dot { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-2); font-weight: 700; font-size: .75rem; }
.aa-step .dot .ico { width: 14px; height: 14px; }
.aa-step.done .dot { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.aa-step.current .dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.aa-step.current { color: var(--ink); font-weight: 650; }
.aa-ownerline { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0 2px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; }
.aa-ownerline .ico { width: 15px; height: 15px; color: var(--muted); }
.aa-score { display: flex; align-items: center; gap: 14px; }
.aa-score .num { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; color: var(--accent); line-height: 1; }

/* ---------- company map */
.am-toolbar { padding: 14px 16px; }
.am-search { min-width: 260px; }
.am-chips { gap: 8px; }
.am-chip { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: .82rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); cursor: pointer; }
.am-chip[aria-pressed="true"] { color: var(--ink); background: var(--accent-soft); border-color: var(--accent); }
.am-chip[aria-pressed="false"] .legend-dot { opacity: .35; }
.am-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
.am-layout.has-panel { grid-template-columns: minmax(0, 1fr) 360px; }
.am-main { min-width: 0; }
.am-wrap { background: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0) 0 0 / 22px 22px, var(--surface); }
.am-svg { display: block; }
.am-svg:focus-visible { box-shadow: inset 0 0 0 3px rgba(47, 107, 240, .45); border-radius: var(--radius); }
.am-svg .node { cursor: pointer; }
.am-svg .node circle:not(.am-flag) { stroke: var(--surface); stroke-width: 2; }
.am-svg .node text { font-size: 11px; }
.am-svg .node.major text { font-weight: 650; fill: var(--ink); }
.am-svg.lo .node.minor text { display: none; }
.am-svg.vlo .node:not(.major) text { display: none; }
.am-svg .node.sel text, .am-svg .node.nb text { display: inline !important; fill: var(--ink); font-weight: 650; }
.am-svg .am-flag { fill: var(--crit); stroke: var(--surface); stroke-width: 1.5; }
.am-svg .edge { stroke-width: 1.2; }
.am-svg .edge.hl { stroke: var(--accent); stroke-width: 2.4; opacity: 1; }
.am-svg .edge.manual.hl { stroke: var(--high); }
.am-svg .am-empty { fill: var(--muted); font-size: 14px; }
.am-tool { width: 38px; height: 38px; padding: 0; box-shadow: var(--shadow-1); }
.am-legend { max-height: calc(100% - 28px); overflow: auto; }
.am-leg-line { display: flex; align-items: center; gap: 6px; }
.am-leg-line .l { display: inline-block; width: 22px; height: 0; border-top: 2px solid var(--line-2); }
.am-leg-line .l.manual { border-top: 2px dashed var(--high); }
.am-leg-line .l.none { border-top: 2px dotted var(--crit); }
.am-panel { padding: 18px; max-height: calc(100vh - 230px); min-height: 520px; overflow-y: auto; position: sticky; top: calc(var(--top-h) + 16px); align-self: start; }
.am-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.am-panel-head h2 { font-size: 1.1rem; word-break: break-word; }
.am-h { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 6px; font-weight: 700; }
.am-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: .88rem; }
.am-nodebtn { border: none; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-align: left; display: inline-flex; align-items: center; gap: 0; font-weight: 600; }
.am-nodebtn:hover { text-decoration: underline; }
.am-kv { grid-template-columns: minmax(90px, 130px) 1fr; font-size: .85rem; word-break: break-word; }
.am-listwrap { padding: 18px; }
.am-tablewrap { max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.am-tablewrap thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.am-row-sel td { background: var(--accent-soft) !important; }
.am-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.am-tile { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.am-tile b { font-size: 1.25rem; }
.am-tile .ico { width: 16px; height: 16px; color: var(--muted); }
.am-badgebtn { cursor: pointer; font: inherit; font-size: .76rem; font-weight: 650; }
.am-badgebtn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- executive views */
.ar-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px; margin: -4px -4px 22px; scrollbar-width: thin; }
.ar-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.ar-tab:hover { text-decoration: none; border-color: var(--line-2); background: var(--surface-2); }
.ar-tab[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ar-off { font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--low-soft); color: var(--low); }
.ar-title { display: flex; align-items: center; gap: 12px; }
.ar-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; flex: none; }
.ar-ico .ico { width: 20px; height: 20px; }
.ar-sec { font-size: 1.05rem; margin: 0 0 12px; }
.ar-sec-head { margin: 30px 0 10px; }
.ar-sec-head p { margin: 4px 0 0; }
.ar-jump { margin-bottom: 16px; }
.ar-jumpbtn { cursor: pointer; font: inherit; font-size: .76rem; font-weight: 650; }
.ar-jumpbtn:hover { border-color: var(--accent); color: var(--accent); }
.ar-pair { align-items: start; }
.ar-pair > .card + .card { margin-top: 0; }
.ar-unknowns { margin-top: 14px; padding: 14px 18px; background: var(--surface-2); box-shadow: none; }
.ar-kpisub { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.ar-know { display: flex; gap: 20px; align-items: center; }
.ar-know .ring { width: 96px; height: 96px; }
.ar-big { font-size: 1.5rem; }
.ar-bars { display: flex; flex-direction: column; gap: 12px; }
.ar-barlabel { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; margin-bottom: 4px; }
.ar-score { flex: none; min-width: 36px; text-align: center; font-weight: 750; font-size: .8rem; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); align-self: center; }
.ar-dl h2:focus { outline: none; }
.ar-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 6px; font-weight: 700; }
.ar-road ul { margin: 0; padding-left: 1.1em; }
.ar-roadcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.ar-roadhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ar-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.ar-tile { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.ar-tile b { font-size: 1.3rem; display: block; margin-top: 2px; }
.ar-groups { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ar-group { border-bottom: 1px solid var(--line); }
.ar-group:last-child { border-bottom: none; }
.ar-group summary { cursor: pointer; padding: 11px 14px; }
.ar-group summary:hover { background: var(--surface-2); }
.ar-group[open] summary { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ar-links { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 4px; }
.ar-disclaimer { border: 1px solid var(--high); }
.ar-fw { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.ar-fw-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.ar-controls { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 24px; }
.ar-controls li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .88rem; break-inside: avoid; }

/* ---------- responsive */
@media (max-width: 1180px) {
  .aa-top { grid-template-columns: minmax(0, 1fr); }
  .am-layout.has-panel { grid-template-columns: minmax(0, 1fr); }
  .am-panel { position: static; max-height: none; min-height: 0; }
}
@media (max-width: 900px) {
  .aa-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .aa-board { grid-template-columns: minmax(0, 1fr); }
  .ar-controls { columns: 1; }
  .mapwrap.am-wrap { height: 62vh; min-height: 420px; }
}
@media (max-width: 640px) {
  .fa-sure { grid-template-columns: 1fr; }
  .fa-meter { grid-template-columns: 1fr auto; }
  .fa-meter .tiny { display: none; }
  .kv-row { grid-template-columns: 1fr; gap: 4px; }
  .fa-toolbar select, .fa-toolbar .seg, .am-search { flex: 1 1 100%; min-width: 0; width: 100%; }
  .aa-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; }
  .aa-step:nth-child(4)::before { display: none; }
  .am-legend { display: none; }
  .ar-know { flex-direction: column; align-items: flex-start; }
  .drawer header, .drawer .body, .drawer footer { padding-left: 16px; padding-right: 16px; }
}
