/* ============================================================================
   FOUNDRY CONTROL — PROJECTS + INSPECT styles
   Layers on tokens.css + foundryctl.css. Control-room density; the inspected
   "site" preview uses its own light surface so it reads as the real website.
   ========================================================================== */

/* ---- project selector -------------------------------------------------- */
.fp-selector { padding-top: var(--s-2); }
.fp-sel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-6); margin-bottom: var(--s-7); flex-wrap: wrap; }
.fp-sel-eyebrow { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--violet-ink); margin-bottom: 6px; }
.fp-sel-title { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; }
.fp-sel-sub { color: var(--ink-3); font-size: 13px; max-width: 56ch; margin-top: 6px; }
.fp-sel-search { min-width: 220px; background: var(--graphite); }

.fp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(316px, 1fr)); gap: var(--s-5); }
.fp-card { --ac: var(--violet-bright); text-align: left; cursor: pointer; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--hairline-2); border-radius: var(--r-lg); padding: 15px 16px 13px; display: flex; flex-direction: column; gap: 12px; transition: border-color var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast); }
.fp-card:hover { border-color: color-mix(in srgb, var(--ac) 55%, transparent); transform: translateY(-2px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ac) 22%, transparent), 0 14px 34px rgba(0,0,0,0.35); }
.fp-card-top { display: flex; align-items: center; gap: 11px; }
.fp-card-glyph { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(150deg, var(--ac), color-mix(in srgb, var(--ac) 50%, #000)); box-shadow: 0 0 16px color-mix(in srgb, var(--ac) 40%, transparent); }
.fp-card-id { flex: 1; min-width: 0; }
.fp-card-id b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.fp-card-id span { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-4); }
.fp-prod { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 10.5px; white-space: nowrap; }
.fp-prod.sm { gap: 0; }
.fp-int { display: flex; flex-direction: column; gap: 5px; padding: 10px 11px; background: var(--graphite); border: 1px solid var(--hairline); border-radius: var(--r-md); }
.fp-int-row { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); min-width: 0; }
.fp-int-row .glyph { color: var(--ink-4); flex: none; }
.fp-int-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-card-foot { display: flex; align-items: center; gap: 12px; }
.fp-stat { font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); }
.fp-stat b { font-size: 14px; margin-right: 3px; }
.fp-risk { font-family: var(--font-mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 7px; border-radius: 99px; border: 1px solid; }
.fp-open { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); }
.fp-card:hover .fp-open { color: var(--ac); }
.fp-prev { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 9.5px; color: var(--ink-4); padding-top: 2px; border-top: 1px solid var(--hairline); margin-top: 1px; padding-top: 9px; }
.fp-prev .glyph { color: var(--state-clear); flex: none; }

/* ---- project switcher (bar) ------------------------------------------- */
.fp-switch { position: relative; flex: none; }
.fp-switch-btn { --ac: var(--violet-bright); display: inline-flex; align-items: center; gap: 9px; cursor: pointer; padding: 6px 11px 6px 7px; border-radius: var(--r-md); border: 1px solid var(--hairline-2); background: var(--graphite); transition: border-color var(--dur-fast); }
.fp-switch-btn:hover { border-color: var(--hairline-3); }
.fp-switch-glyph { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(150deg, var(--ac), color-mix(in srgb, var(--ac) 50%, #000)); }
.fp-switch-name { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; text-align: left; }
.fp-switch-name b { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.fp-switch-name em { font-family: var(--font-mono); font-size: 9px; color: var(--ink-4); font-style: normal; }
.fp-switch-bd { position: fixed; inset: 0; z-index: 40; }
.fp-switch-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 41; width: 280px; padding: 6px; background: var(--panel-3); border: 1px solid var(--hairline-3); border-radius: var(--r-md); box-shadow: var(--shadow-3); }
.fp-switch-menulabel { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-4); padding: 6px 8px 5px; }
.fp-switch-item { --ac: var(--violet-bright); display: flex; align-items: center; gap: 9px; width: 100%; cursor: pointer; padding: 7px 8px; border-radius: var(--r-sm); border: 1px solid transparent; background: transparent; color: var(--ink-2); transition: background var(--dur-fast); }
.fp-switch-item:hover { background: var(--panel-2); }
.fp-switch-item.on { background: color-mix(in srgb, var(--ac) 14%, transparent); }
.fp-switch-count { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--ink-4); padding: 2px 7px; border-radius: 99px; border: 1px solid var(--hairline-2); }
.fp-switch-all { display: flex; align-items: center; gap: 8px; width: 100%; cursor: pointer; margin-top: 4px; padding: 8px; border-radius: var(--r-sm); border: 1px solid var(--hairline-2); background: var(--graphite); color: var(--ink-3); font-family: var(--font-mono); font-size: 11px; }
.fp-switch-all:hover { color: var(--ink); border-color: var(--hairline-3); }

/* ---- inspect: desktop -------------------------------------------------- */
.fctld-inspectwrap { flex: 1; min-height: 0; }
.fp-inspect { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: var(--s-6); height: 100%; }
.fp-browser { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--hairline-2); border-radius: var(--r-lg); overflow: hidden; background: var(--panel); }
.fp-bchrome { flex: none; display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--panel-2); border-bottom: 1px solid var(--hairline-2); }
.fp-dots { display: inline-flex; gap: 6px; flex: none; }
.fp-dots i { width: 10px; height: 10px; border-radius: 99px; background: var(--hairline-3); }
.fp-dots i:nth-child(1) { background: #f0685f; } .fp-dots i:nth-child(2) { background: #f5bd4f; } .fp-dots i:nth-child(3) { background: #61c554; }
.fp-urlbar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); padding: 6px 11px; background: var(--graphite); border: 1px solid var(--hairline); border-radius: 99px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-urlbar .glyph { color: var(--state-clear); flex: none; }
.fp-inspect-toggle { flex: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-family: var(--font-ui); font-size: 12px; font-weight: 500; color: var(--ink-3); padding: 6px 11px; border-radius: var(--r-sm); border: 1px solid var(--hairline-2); background: var(--graphite); transition: all var(--dur-fast); }
.fp-inspect-toggle:hover { color: var(--ink); border-color: var(--hairline-3); }
.fp-inspect-toggle.on { color: var(--violet-bright); border-color: color-mix(in srgb, var(--violet-bright) 55%, transparent); background: color-mix(in srgb, var(--violet-bright) 14%, transparent); }
.fp-viewport { position: relative; flex: 1; min-height: 0; overflow: auto; background: #0e0d16; }
.fp-stagewrap { position: relative; min-height: 100%; }
.fp-inspect-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6; display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-2); padding: 7px 13px; border-radius: 99px; background: rgba(11,10,19,0.86); backdrop-filter: blur(8px); border: 1px solid var(--hairline-2); pointer-events: none; }
.fp-inspect-hint .glyph { color: var(--violet-bright); }

/* element-picker overlay */
.fp-overlay { position: absolute; z-index: 5; pointer-events: none; border: 1.5px solid var(--violet-bright); background: color-mix(in srgb, var(--violet-bright) 14%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--violet-bright) 30%, transparent); }
.fp-overlay-tag { position: absolute; top: -22px; left: -1.5px; font-family: var(--font-mono); font-size: 10px; color: #fff; background: var(--violet-bright); padding: 2px 7px; border-radius: 4px 4px 4px 0; white-space: nowrap; }
.fp-overlay-tag em { opacity: 0.8; font-style: normal; margin-left: 5px; }

/* the inspected "site" (its own light surface) */
.fp-site { min-height: 100%; font-family: var(--font-ui); background: #f7f6fb; color: #1c1a26; }
.fp-site.inspecting [data-sel] { cursor: crosshair; }
.fps-nav { display: flex; align-items: center; gap: 18px; padding: 16px 26px; background: #fff; border-bottom: 1px solid #e7e4f0; }
.fps-brand { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: #14121c; }
.fps-navlinks { display: flex; gap: 18px; margin-left: 10px; }
.fps-navlinks a { font-size: 13px; color: #57536a; text-decoration: none; }
.fps-navcta { margin-left: auto; font-size: 13px; font-weight: 600; color: #fff; background: #2b2740; border: none; border-radius: 8px; padding: 8px 15px; }
.fps-hero { padding: 54px 26px 46px; text-align: center; background: radial-gradient(110% 130% at 50% 0%, #efe9ff 0%, #f7f6fb 60%); }
.fps-h1 { font-family: var(--font-display); font-weight: 700; font-size: 34px; letter-spacing: -0.02em; margin: 0 0 12px; color: #15131f; }
.fps-sub { font-size: 15px; color: #5a5670; max-width: 46ch; margin: 0 auto 22px; line-height: 1.5; }
.fps-herocta { display: flex; gap: 11px; justify-content: center; }
.fps-btn { font-size: 13.5px; font-weight: 600; padding: 11px 20px; border-radius: 9px; border: 1px solid #d9d4e8; background: #fff; color: #2b2740; cursor: pointer; }
.fps-btn.primary { background: #6d4bd8; border-color: #6d4bd8; color: #fff; }
.fps-feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 36px 26px; }
.fps-card { background: #fff; border: 1px solid #e7e4f0; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.fps-card-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #6d4bd8; background: #efeaff; }
.fps-card b { font-family: var(--font-display); font-size: 15px; color: #1c1a26; }
.fps-card span { font-size: 12.5px; color: #5a5670; line-height: 1.5; }
.fps-foot { padding: 22px 26px; text-align: center; font-family: var(--font-mono); font-size: 11px; color: #8b87a0; background: #fff; border-top: 1px solid #e7e4f0; }

/* element inspector panel */
.fp-insp-panel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.fp-insp-panel .phead { display: flex; align-items: center; justify-content: space-between; }
.fp-insp-panel .phead .eyebrow { display: inline-flex; align-items: center; gap: 7px; }
.fp-insp-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 30px 24px; }
.fp-insp-ring { width: 50px; height: 50px; border-radius: 99px; display: grid; place-items: center; color: var(--ink-3); border: 1px solid var(--hairline-2); background: var(--graphite); margin-bottom: 4px; }
.fp-insp-empty b { font-size: 13.5px; }
.fp-insp-empty em { font-style: normal; font-size: 12px; color: var(--ink-4); line-height: 1.5; max-width: 30ch; }
.fp-insp-body { flex: 1; min-height: 0; overflow-y: auto; padding: var(--s-5) var(--s-6); }
.fp-shotgrab { position: relative; height: 116px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--hairline-2); margin-bottom: 13px; }
.fp-shotgrab-tag { position: absolute; top: 9px; left: 9px; font-family: var(--font-mono); font-size: 9.5px; color: #fff; background: color-mix(in srgb, var(--violet-bright) 75%, #000); padding: 3px 7px; border-radius: 5px; }
.fp-shotgrab-cap { position: absolute; bottom: 8px; left: 10px; font-family: var(--font-mono); font-size: 9px; color: var(--ink-3); }
.fp-meta { display: flex; flex-direction: column; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline-2); border-radius: var(--r-md); overflow: hidden; }
.fp-meta-row { display: flex; align-items: baseline; gap: 12px; padding: 9px 12px; background: var(--panel); }
.fp-meta-row span { flex: none; width: 104px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-4); }
.fp-meta-row b { font-size: 12px; font-weight: 500; color: var(--ink); word-break: break-word; min-width: 0; }
.fp-meta-row b.mono { font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); }
.fp-insp-note { display: flex; align-items: flex-start; gap: 7px; font-size: 10.5px; line-height: 1.45; color: var(--ink-4); margin-top: 13px; padding: 9px 11px; border-radius: 8px; background: var(--graphite); border: 1px solid var(--hairline); }
.fp-insp-note .glyph { flex: none; margin-top: 1px; color: var(--ink-3); }
.fp-insp-act { flex: none; padding: 12px; border-top: 1px solid var(--hairline-2); }
.fp-insp-act .full { width: 100%; justify-content: center; }

/* edit-target card (in the new-request form + request detail) */
.fp-targetcard { border: 1px solid color-mix(in srgb, var(--violet-bright) 30%, var(--hairline-2)); border-radius: var(--r-md); padding: 11px; margin-bottom: var(--s-5); background: color-mix(in srgb, var(--violet-bright) 6%, var(--panel)); }
.fp-targetcard.mini { background: var(--graphite); border-color: var(--hairline-2); }
.fp-targetcard-head { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; }
.fp-targetcard-head .glyph { color: var(--violet-bright); }
.fp-targetcard-head b { font-size: 12px; }
.fp-targetcard-sel { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--ink-2); padding: 2px 7px; border-radius: 5px; background: var(--graphite); border: 1px solid var(--hairline-2); }
.fp-targetcard.mini .fp-targetcard-sel { margin-left: 0; }
.fp-targetcard-shot { position: relative; height: 78px; border-radius: 8px; overflow: hidden; border: 1px solid var(--hairline); margin-bottom: 9px; }
.fp-targetcard-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); }
.fp-targetcard-meta b { color: var(--ink-4); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; margin-right: 4px; }

/* locked target field in form */
.fctl-locked { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.fctl-locked .glyph { color: var(--violet-ink); flex: none; }
.fctl-locktag { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--ink-4); }

/* ---- mobile bar + annotation ------------------------------------------ */
.fp-mobbar { flex: none; padding: 9px 11px; border-bottom: 1px solid var(--hairline); background: var(--panel); }
.fp-mobbar .fp-switch-btn { width: 100%; }
.fp-mobbar .fp-switch-name { flex: 1; }
.fp-mobbar .fp-switch-menu { width: calc(100% - 0px); }

.fp-annot-drop { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; width: 100%; cursor: pointer; padding: 34px 18px; border-radius: var(--r-md); border: 1.5px dashed var(--hairline-3); background: var(--graphite); color: var(--ink-3); }
.fp-annot-drop .glyph { color: var(--violet-ink); }
.fp-annot-drop b { font-size: 13px; color: var(--ink); }
.fp-annot-drop em { font-style: normal; font-size: 11px; color: var(--ink-4); line-height: 1.45; }
.fp-annot-stage { position: relative; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--hairline-2); cursor: crosshair; margin-bottom: 13px; }
.fp-annot-shot { position: relative; height: 240px; }
.fp-annot-pin { position: absolute; transform: translate(-50%, -50%); pointer-events: none; }
.fp-annot-ring { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 99px; border: 2px solid var(--violet-bright); box-shadow: 0 0 14px color-mix(in srgb, var(--violet-bright) 60%, transparent); animation: liveBlink 1.1s infinite; }
.fp-annot-dot { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 10px; height: 10px; border-radius: 99px; background: var(--violet-bright); }
.fp-annot-meta { display: flex; flex-direction: column; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline-2); border-radius: var(--r-md); overflow: hidden; margin-bottom: 13px; }

@media (max-width: 1100px) {
  .fctld-inspectwrap { overflow-y: auto; }
  .fp-inspect { grid-template-columns: 1fr; height: auto; }
  .fp-browser { height: 420px; }
}
